Block Editor: Upgrade @wordpress packages to match version 4.7.1.

Updated packages:

- `@wordpress/annotations
- `@wordpress/api-fetch
- `@wordpress/block-library@2.2.10
- `@wordpress/block-serialization-default-parser@2.0.2`
- `@wordpress/block-serialization-spec-parser@2.0.2`
- `@wordpress/blocks@6.0.4`
- `@wordpress/components@7.0.4`
- `@wordpress/core-data@2.0.15`
- `@wordpress/data@4.1.0`
- `@wordpress/date@3.0.1`
- `@wordpress/edit-post@3.1.5`
- `@wordpress/editor@9.0.5`
- `@wordpress/eslint-plugin@1.0.0`
- `@wordpress/format-library@1.2.8`
- `@wordpress/html-entities@2.0.4`
- `@wordpress/list-reusable-blocks@1.1.17`
- `@wordpress/notices@1.1.1`
- `@wordpress/nux@3.0.5`
- `@wordpress/rich-text@3.0.3`
- `@wordpress/url@2.3.2`
- `@wordpress/viewport@2.0.13`

This also includes the updates the Core blocks.

The script loader is updated to match the Gutenberg repository as well.

Props atimmer, gziolo, joen, youknowriad.

Merges [44183] to trunk.

Fixes #45442, #45637.
Built from https://develop.svn.wordpress.org/trunk@44296


git-svn-id: http://core.svn.wordpress.org/trunk@44126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2018-12-19 03:16:48 +00:00
parent 43bdb0e193
commit d6e8d93412
50 changed files with 1429 additions and 1101 deletions

View File

@ -22,6 +22,10 @@ function render_block_core_block( $attributes ) {
return ''; return '';
} }
if ( 'publish' !== $reusable_block->post_status || ! empty( $reusable_block->post_password ) ) {
return '';
}
return do_blocks( $reusable_block->post_content ); return do_blocks( $reusable_block->post_content );
} }

View File

@ -72,7 +72,7 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
?> ?>
<script type='text/javascript'> <script type='text/javascript'>
/* <![CDATA[ */ /* <![CDATA[ */
(function() { ( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' ); var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() { function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) { if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {

View File

@ -5,8 +5,7 @@
* @package WordPress * @package WordPress
*/ */
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) { /**
/**
* Get the post title. * Get the post title.
* *
* The post title is fetched and if it is blank then a default string is * The post title is fetched and if it is blank then a default string is
@ -26,13 +25,12 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post. * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set. * @return string The post title if set; "(no title)" if no title is set.
*/ */
function gutenberg_draft_or_post_title( $post = 0 ) { function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post ); $title = get_the_title( $post );
if ( empty( $title ) ) { if ( empty( $title ) ) {
$title = __( '(no title)' ); $title = __( '(no title)' );
} }
return esc_html( $title ); return esc_html( $title );
}
} }
/** /**
@ -42,7 +40,7 @@ if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
* *
* @return string Returns the post content with latest comments added. * @return string Returns the post content with latest comments added.
*/ */
function gutenberg_render_block_core_latest_comments( $attributes = array() ) { function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php. // This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments( $comments = get_comments(
apply_filters( apply_filters(
@ -94,7 +92,7 @@ function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in // `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`. // `esc_html`.
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>'; $post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$list_items_markup .= sprintf( $list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */ /* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
@ -179,6 +177,6 @@ register_block_type(
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ), 'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
), ),
), ),
'render_callback' => 'gutenberg_render_block_core_latest_comments', 'render_callback' => 'render_block_core_latest_comments',
) )
); );

View File

@ -269,11 +269,13 @@ class WP_Block_Parser {
*/ */
if ( 0 === $stack_depth ) { if ( 0 === $stack_depth ) {
if ( isset( $leading_html_start ) ) { if ( isset( $leading_html_start ) ) {
$this->output[] = (array) self::freeform( substr( $this->output[] = (array) self::freeform(
substr(
$this->document, $this->document,
$leading_html_start, $leading_html_start,
$start_offset - $leading_html_start $start_offset - $leading_html_start
) ); )
);
} }
$this->output[] = (array) new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ); $this->output[] = (array) new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() );
@ -292,13 +294,16 @@ class WP_Block_Parser {
case 'block-opener': case 'block-opener':
// track all newly-opened blocks on the stack // track all newly-opened blocks on the stack
array_push( $this->stack, new WP_Block_Parser_Frame( array_push(
$this->stack,
new WP_Block_Parser_Frame(
new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ), new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
$start_offset, $start_offset,
$token_length, $token_length,
$start_offset + $token_length, $start_offset + $token_length,
$leading_html_start $leading_html_start
) ); )
);
$this->offset = $start_offset + $token_length; $this->offset = $start_offset + $token_length;
return true; return true;
@ -391,22 +396,22 @@ class WP_Block_Parser {
return array( 'no-more-tokens', null, null, null, null ); return array( 'no-more-tokens', null, null, null, null );
} }
list( $match, $started_at ) = $matches[ 0 ]; list( $match, $started_at ) = $matches[0];
$length = strlen( $match ); $length = strlen( $match );
$is_closer = isset( $matches[ 'closer' ] ) && -1 !== $matches[ 'closer' ][ 1 ]; $is_closer = isset( $matches['closer'] ) && -1 !== $matches['closer'][1];
$is_void = isset( $matches[ 'void' ] ) && -1 !== $matches[ 'void' ][ 1 ]; $is_void = isset( $matches['void'] ) && -1 !== $matches['void'][1];
$namespace = $matches[ 'namespace' ]; $namespace = $matches['namespace'];
$namespace = ( isset( $namespace ) && -1 !== $namespace[ 1 ] ) ? $namespace[ 0 ] : 'core/'; $namespace = ( isset( $namespace ) && -1 !== $namespace[1] ) ? $namespace[0] : 'core/';
$name = $namespace . $matches[ 'name' ][ 0 ]; $name = $namespace . $matches['name'][0];
$has_attrs = isset( $matches[ 'attrs' ] ) && -1 !== $matches[ 'attrs' ][ 1 ]; $has_attrs = isset( $matches['attrs'] ) && -1 !== $matches['attrs'][1];
/* /*
* Fun fact! It's not trivial in PHP to create "an empty associative array" since all arrays * Fun fact! It's not trivial in PHP to create "an empty associative array" since all arrays
* are associative arrays. If we use `array()` we get a JSON `[]` * are associative arrays. If we use `array()` we get a JSON `[]`
*/ */
$attrs = $has_attrs $attrs = $has_attrs
? json_decode( $matches[ 'attrs' ][ 0 ], /* as-associative */ true ) ? json_decode( $matches['attrs'][0], /* as-associative */ true )
: $this->empty_attrs; : $this->empty_attrs;
/* /*
@ -505,11 +510,13 @@ class WP_Block_Parser {
} }
if ( isset( $stack_top->leading_html_start ) ) { if ( isset( $stack_top->leading_html_start ) ) {
$this->output[] = (array) self::freeform( substr( $this->output[] = (array) self::freeform(
substr(
$this->document, $this->document,
$stack_top->leading_html_start, $stack_top->leading_html_start,
$stack_top->token_start - $stack_top->leading_html_start $stack_top->token_start - $stack_top->leading_html_start
) ); )
);
} }
$this->output[] = (array) $stack_top->block; $this->output[] = (array) $stack_top->block;

View File

@ -274,6 +274,8 @@
.wp-block-embed.is-loading p { .wp-block-embed.is-loading p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px; } font-size: 13px; }
.wp-block-embed .components-placeholder__error {
word-break: break-word; }
.wp-block-file { .wp-block-file {
display: flex; display: flex;
@ -903,6 +905,8 @@ figure.block-library-media-text__media-container {
border-top: 3px dashed #ccd0d4; } border-top: 3px dashed #ccd0d4; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph { .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-left: 108px; }
.wp-block .wp-block .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-left: 36px; } padding-left: 36px; }
.wp-block-preformatted pre { .wp-block-preformatted pre {

File diff suppressed because one or more lines are too long

View File

@ -275,6 +275,8 @@
.wp-block-embed.is-loading p { .wp-block-embed.is-loading p {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-size: 13px; } font-size: 13px; }
.wp-block-embed .components-placeholder__error {
word-break: break-word; }
.wp-block-file { .wp-block-file {
display: flex; display: flex;
@ -908,6 +910,8 @@ figure.block-library-media-text__media-container {
border-top: 3px dashed #ccd0d4; } border-top: 3px dashed #ccd0d4; }
.editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph { .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-right: 108px; }
.wp-block .wp-block .editor-rich-text__tinymce[data-is-placeholder-visible="true"] + .editor-rich-text__tinymce.wp-block-paragraph {
padding-right: 36px; } padding-right: 36px; }
.wp-block-preformatted pre { .wp-block-preformatted pre {

File diff suppressed because one or more lines are too long

View File

@ -540,6 +540,8 @@ body.is-fullscreen-mode .components-notice-list {
top: 10px; top: 10px;
left: 20px; left: 20px;
z-index: 5; } z-index: 5; }
.edit-post-meta-boxes-area .is-hidden {
display: none; }
.edit-post-meta-boxes-area__clear { .edit-post-meta-boxes-area__clear {
clear: both; } clear: both; }

File diff suppressed because one or more lines are too long

View File

@ -540,6 +540,8 @@ body.is-fullscreen-mode .components-notice-list {
top: 10px; top: 10px;
right: 20px; right: 20px;
z-index: 5; } z-index: 5; }
.edit-post-meta-boxes-area .is-hidden {
display: none; }
.edit-post-meta-boxes-area__clear { .edit-post-meta-boxes-area__clear {
clear: both; } clear: both; }

File diff suppressed because one or more lines are too long

View File

@ -2241,7 +2241,8 @@ body.admin-color-light .editor-post-text-editor__link{
.editor-rich-text__tinymce { .editor-rich-text__tinymce {
margin: 0; margin: 0;
position: relative; position: relative;
line-height: 1.8; } line-height: 1.8;
white-space: pre-wrap; }
.editor-rich-text__tinymce > p:empty { .editor-rich-text__tinymce > p:empty {
min-height: 28.8px; } min-height: 28.8px; }
.editor-rich-text__tinymce > p:first-child { .editor-rich-text__tinymce > p:first-child {

File diff suppressed because one or more lines are too long

View File

@ -2253,7 +2253,8 @@ body.admin-color-light .editor-post-text-editor__link{
.editor-rich-text__tinymce { .editor-rich-text__tinymce {
margin: 0; margin: 0;
position: relative; position: relative;
line-height: 1.8; } line-height: 1.8;
white-space: pre-wrap; }
.editor-rich-text__tinymce > p:empty { .editor-rich-text__tinymce > p:empty {
min-height: 28.8px; } min-height: 28.8px; }
.editor-rich-text__tinymce > p:first-child { .editor-rich-text__tinymce > p:first-child {

File diff suppressed because one or more lines are too long

View File

@ -132,7 +132,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -718,7 +718,7 @@ function __experimentalGetAnnotations(state) {
} }
// EXTERNAL MODULE: ./node_modules/uuid/v4.js // EXTERNAL MODULE: ./node_modules/uuid/v4.js
var v4 = __webpack_require__(56); var v4 = __webpack_require__(57);
var v4_default = /*#__PURE__*/__webpack_require__.n(v4); var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js // CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js
@ -1097,7 +1097,7 @@ var block_addAnnotationClassName = function addAnnotationClassName(OriginalCompo
return { return {
className: annotations.map(function (annotation) { className: annotations.map(function (annotation) {
return 'is-annotated-by-' + annotation.source; return 'is-annotated-by-' + annotation.source;
}) }).join(' ')
}; };
})(OriginalComponent); })(OriginalComponent);
}; };
@ -1115,7 +1115,7 @@ Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/anno
/***/ }), /***/ }),
/***/ 32: /***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -1251,7 +1251,7 @@ module.exports = function memize( fn, options ) {
/***/ }), /***/ }),
/***/ 56: /***/ 57:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
var rng = __webpack_require__(77); var rng = __webpack_require__(77);

File diff suppressed because one or more lines are too long

View File

@ -1093,7 +1093,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -1989,7 +1989,7 @@ var paragraph_settings = {
}; };
// EXTERNAL MODULE: external {"this":["wp","blob"]} // EXTERNAL MODULE: external {"this":["wp","blob"]}
var external_this_wp_blob_ = __webpack_require__(33); var external_this_wp_blob_ = __webpack_require__(32);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__(25); var slicedToArray = __webpack_require__(25);
@ -2458,7 +2458,7 @@ var DEFAULT_EMBED_BLOCK = 'core/embed';
var WORDPRESS_EMBED_BLOCK = 'core-embed/wordpress'; var WORDPRESS_EMBED_BLOCK = 'core-embed/wordpress';
// EXTERNAL MODULE: ./node_modules/classnames/dedupe.js // EXTERNAL MODULE: ./node_modules/classnames/dedupe.js
var dedupe = __webpack_require__(59); var dedupe = __webpack_require__(60);
var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe); var dedupe_default = /*#__PURE__*/__webpack_require__.n(dedupe);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
@ -2628,6 +2628,22 @@ function getClassNames(html) {
return existingClassNames; return existingClassNames;
} }
/**
* Fallback behaviour for unembeddable URLs.
* Creates a paragraph block containing a link to the URL, and calls `onReplace`.
*
* @param {string} url The URL that could not be embedded.
* @param {function} onReplace Function to call with the created fallback block.
*/
function util_fallback(url, onReplace) {
var link = Object(external_this_wp_element_["createElement"])("a", {
href: url
}, url);
onReplace(Object(external_this_wp_blocks_["createBlock"])('core/paragraph', {
content: Object(external_this_wp_element_["renderToString"])(link)
}));
}
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-size.js // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/image-size.js
@ -3221,7 +3237,7 @@ function (_Component) {
onChange: this.updateAlignment onChange: this.updateAlignment
}), toolbarEditButton); }), toolbarEditButton);
if (isEditing) { if (isEditing || !url) {
var src = isExternal ? url : undefined; var src = isExternal ? url : undefined;
return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["MediaPlaceholder"], { return Object(external_this_wp_element_["createElement"])(external_this_wp_element_["Fragment"], null, controls, Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["MediaPlaceholder"], {
icon: "format-image", icon: "format-image",
@ -7573,7 +7589,9 @@ var embed_placeholder_EmbedPlaceholder = function EmbedPlaceholder(props) {
value = props.value, value = props.value,
onSubmit = props.onSubmit, onSubmit = props.onSubmit,
onChange = props.onChange, onChange = props.onChange,
cannotEmbed = props.cannotEmbed; cannotEmbed = props.cannotEmbed,
fallback = props.fallback,
tryAgain = props.tryAgain;
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], { return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Placeholder"], {
icon: Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["BlockIcon"], { icon: Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["BlockIcon"], {
icon: icon, icon: icon,
@ -7595,7 +7613,13 @@ var embed_placeholder_EmbedPlaceholder = function EmbedPlaceholder(props) {
type: "submit" type: "submit"
}, Object(external_this_wp_i18n_["_x"])('Embed', 'button label')), cannotEmbed && Object(external_this_wp_element_["createElement"])("p", { }, Object(external_this_wp_i18n_["_x"])('Embed', 'button label')), cannotEmbed && Object(external_this_wp_element_["createElement"])("p", {
className: "components-placeholder__error" className: "components-placeholder__error"
}, Object(external_this_wp_i18n_["__"])('Sorry, we could not embed that content.')))); }, Object(external_this_wp_i18n_["__"])('Sorry, we could not embed that content.'), Object(external_this_wp_element_["createElement"])("br", null), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
isLarge: true,
onClick: tryAgain
}, Object(external_this_wp_i18n_["_x"])('Try again', 'button label')), " ", Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
isLarge: true,
onClick: fallback
}, Object(external_this_wp_i18n_["_x"])('Convert to link', 'button label')))));
}; };
/* harmony default export */ var embed_placeholder = (embed_placeholder_EmbedPlaceholder); /* harmony default export */ var embed_placeholder = (embed_placeholder_EmbedPlaceholder);
@ -7839,10 +7863,11 @@ function getEmbedEditComponent(title, icon) {
value: function componentDidUpdate(prevProps) { value: function componentDidUpdate(prevProps) {
var hasPreview = undefined !== this.props.preview; var hasPreview = undefined !== this.props.preview;
var hadPreview = undefined !== prevProps.preview; var hadPreview = undefined !== prevProps.preview;
var switchedPreview = this.props.preview && this.props.attributes.url !== prevProps.attributes.url; var previewChanged = prevProps.preview && this.props.preview && this.props.preview.html !== prevProps.preview.html;
var switchedPreview = previewChanged || hasPreview && !hadPreview;
var switchedURL = this.props.attributes.url !== prevProps.attributes.url; var switchedURL = this.props.attributes.url !== prevProps.attributes.url;
if (hasPreview && !hadPreview || switchedPreview || switchedURL) { if (switchedPreview || switchedURL) {
if (this.props.cannotEmbed) { if (this.props.cannotEmbed) {
// Can't embed this URL, and we've just received or switched the preview. // Can't embed this URL, and we've just received or switched the preview.
return; return;
@ -7958,7 +7983,8 @@ function getEmbedEditComponent(title, icon) {
className = _this$props2.className, className = _this$props2.className,
preview = _this$props2.preview, preview = _this$props2.preview,
cannotEmbed = _this$props2.cannotEmbed, cannotEmbed = _this$props2.cannotEmbed,
themeSupportsResponsive = _this$props2.themeSupportsResponsive; themeSupportsResponsive = _this$props2.themeSupportsResponsive,
tryAgain = _this$props2.tryAgain;
if (fetching) { if (fetching) {
return Object(external_this_wp_element_["createElement"])(embed_loading, null); return Object(external_this_wp_element_["createElement"])(embed_loading, null);
@ -7978,7 +8004,11 @@ function getEmbedEditComponent(title, icon) {
return _this2.setState({ return _this2.setState({
url: event.target.value url: event.target.value
}); });
} },
fallback: function fallback() {
return util_fallback(url, _this2.props.onReplace);
},
tryAgain: tryAgain
}); });
} }
@ -8107,6 +8137,17 @@ function getEmbedBlockSettings(_ref) {
themeSupportsResponsive: themeSupports['responsive-embeds'], themeSupportsResponsive: themeSupports['responsive-embeds'],
cannotEmbed: cannotEmbed cannotEmbed: cannotEmbed
}; };
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps) {
var url = ownProps.attributes.url;
var coreData = dispatch('core/data');
var tryAgain = function tryAgain() {
coreData.invalidateResolution('core', 'getEmbedPreview', [url]);
};
return {
tryAgain: tryAgain
};
}))(edit), }))(edit),
save: function save(_ref2) { save: function save(_ref2) {
var _classnames; var _classnames;
@ -9062,7 +9103,7 @@ function (_Component) {
var edit_ALLOWED_BLOCKS = ['core/button', 'core/paragraph', 'core/heading', 'core/list']; var edit_ALLOWED_BLOCKS = ['core/button', 'core/paragraph', 'core/heading', 'core/list'];
var TEMPLATE = [['core/paragraph', { var TEMPLATE = [['core/paragraph', {
fontSize: 'large', fontSize: 'large',
placeholder: 'Content…' placeholder: Object(external_this_wp_i18n_["_x"])('Content…', 'content placeholder')
}]]; }]];
var edit_MediaTextEdit = var edit_MediaTextEdit =
@ -11517,7 +11558,7 @@ var separator_settings = {
}; };
// EXTERNAL MODULE: external {"this":["wp","autop"]} // EXTERNAL MODULE: external {"this":["wp","autop"]}
var external_this_wp_autop_ = __webpack_require__(57); var external_this_wp_autop_ = __webpack_require__(58);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/shortcode/index.js
@ -13370,6 +13411,8 @@ var video_settings = {
var classic_edit_window = window,
wp = classic_edit_window.wp;
function isTmceEmpty(editor) { function isTmceEmpty(editor) {
// When tinyMce is empty the content seems to be: // When tinyMce is empty the content seems to be:
@ -13465,6 +13508,7 @@ function (_Component) {
content = _this$props2.attributes.content, content = _this$props2.attributes.content,
setAttributes = _this$props2.setAttributes; setAttributes = _this$props2.setAttributes;
var ref = this.ref; var ref = this.ref;
var bookmark;
this.editor = editor; this.editor = editor;
if (content) { if (content) {
@ -13474,11 +13518,20 @@ function (_Component) {
} }
editor.on('blur', function () { editor.on('blur', function () {
bookmark = editor.selection.getBookmark(2, true);
setAttributes({ setAttributes({
content: editor.getContent() content: editor.getContent()
}); });
editor.once('focus', function () {
if (bookmark) {
editor.selection.moveToBookmark(bookmark);
}
});
return false; return false;
}); });
editor.on('mousedown touchstart', function () {
bookmark = null;
});
editor.on('keydown', function (event) { editor.on('keydown', function (event) {
if ((event.keyCode === external_this_wp_keycodes_["BACKSPACE"] || event.keyCode === external_this_wp_keycodes_["DELETE"]) && isTmceEmpty(editor)) { if ((event.keyCode === external_this_wp_keycodes_["BACKSPACE"] || event.keyCode === external_this_wp_keycodes_["DELETE"]) && isTmceEmpty(editor)) {
// delete the block // delete the block
@ -13765,6 +13818,13 @@ var build_module_registerCoreBlocks = function registerCoreBlocks() {
/***/ }), /***/ }),
/***/ 32: /***/ 32:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -13775,13 +13835,6 @@ function _iterableToArray(iter) {
/***/ }), /***/ }),
/***/ 33:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 35: /***/ 35:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -13984,14 +14037,21 @@ module.exports = g;
/***/ }), /***/ }),
/***/ 57: /***/ 58:
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["autop"]; }()); (function() { module.exports = this["wp"]["autop"]; }());
/***/ }), /***/ }),
/***/ 59: /***/ 6:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["editor"]; }());
/***/ }),
/***/ 60:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
@ -14105,13 +14165,6 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
}()); }());
/***/ }),
/***/ 6:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["editor"]; }());
/***/ }), /***/ }),
/***/ 65: /***/ 65:

File diff suppressed because one or more lines are too long

View File

@ -5335,7 +5335,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -5450,6 +5450,7 @@ __webpack_require__.d(actions_namespaceObject, "setDefaultBlockName", function()
__webpack_require__.d(actions_namespaceObject, "setFreeformFallbackBlockName", function() { return setFreeformFallbackBlockName; }); __webpack_require__.d(actions_namespaceObject, "setFreeformFallbackBlockName", function() { return setFreeformFallbackBlockName; });
__webpack_require__.d(actions_namespaceObject, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; }); __webpack_require__.d(actions_namespaceObject, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; });
__webpack_require__.d(actions_namespaceObject, "setCategories", function() { return setCategories; }); __webpack_require__.d(actions_namespaceObject, "setCategories", function() { return setCategories; });
__webpack_require__.d(actions_namespaceObject, "updateCategory", function() { return updateCategory; });
// EXTERNAL MODULE: external {"this":["wp","data"]} // EXTERNAL MODULE: external {"this":["wp","data"]}
var external_this_wp_data_ = __webpack_require__(5); var external_this_wp_data_ = __webpack_require__(5);
@ -5610,8 +5611,28 @@ function reducer_categories() {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CATEGORIES; var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_CATEGORIES;
var action = arguments.length > 1 ? arguments[1] : undefined; var action = arguments.length > 1 ? arguments[1] : undefined;
if (action.type === 'SET_CATEGORIES') { switch (action.type) {
case 'SET_CATEGORIES':
return action.categories || []; return action.categories || [];
case 'UPDATE_CATEGORY':
{
if (!action.category || Object(external_lodash_["isEmpty"])(action.category)) {
return state;
}
var categoryToChange = Object(external_lodash_["find"])(state, ['slug', action.slug]);
if (categoryToChange) {
return Object(external_lodash_["map"])(state, function (category) {
if (category.slug === action.slug) {
return Object(objectSpread["a" /* default */])({}, category, action.category);
}
return category;
});
}
}
} }
return state; return state;
@ -5916,6 +5937,22 @@ function setCategories(categories) {
categories: categories categories: categories
}; };
} }
/**
* Returns an action object used to update a category.
*
* @param {string} slug Block category slug.
* @param {Object} category Object containing the category properties that should be updated.
*
* @return {Object} Action object.
*/
function updateCategory(slug, category) {
return {
type: 'UPDATE_CATEGORY',
slug: slug,
category: category
};
}
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/store/index.js
/** /**
@ -5936,7 +5973,7 @@ Object(external_this_wp_data_["registerStore"])('core/blocks', {
}); });
// EXTERNAL MODULE: ./node_modules/uuid/v4.js // EXTERNAL MODULE: ./node_modules/uuid/v4.js
var v4 = __webpack_require__(56); var v4 = __webpack_require__(57);
var v4_default = /*#__PURE__*/__webpack_require__.n(v4); var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
// EXTERNAL MODULE: external {"this":["wp","hooks"]} // EXTERNAL MODULE: external {"this":["wp","hooks"]}
@ -5952,7 +5989,6 @@ var external_this_wp_element_ = __webpack_require__(0);
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/utils.js
/** /**
* External dependencies * External dependencies
*/ */
@ -5963,7 +5999,6 @@ var external_this_wp_element_ = __webpack_require__(0);
*/ */
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -5993,12 +6028,18 @@ function isUnmodifiedDefaultBlock(block) {
if (block.name !== defaultBlockName) { if (block.name !== defaultBlockName) {
return false; return false;
} // Cache a created default block if no cache exists or the default block
// name changed.
if (!isUnmodifiedDefaultBlock.block || isUnmodifiedDefaultBlock.block.name !== defaultBlockName) {
isUnmodifiedDefaultBlock.block = createBlock(defaultBlockName);
} }
var newDefaultBlock = createBlock(defaultBlockName); var newDefaultBlock = isUnmodifiedDefaultBlock.block;
var attributeKeys = Object(external_this_wp_hooks_["applyFilters"])('blocks.isUnmodifiedDefaultBlock.attributes', Object(toConsumableArray["a" /* default */])(Object(external_lodash_["keys"])(newDefaultBlock.attributes)).concat(Object(toConsumableArray["a" /* default */])(Object(external_lodash_["keys"])(block.attributes)))); var blockType = registration_getBlockType(defaultBlockName);
return Object(external_lodash_["every"])(attributeKeys, function (key) { return Object(external_lodash_["every"])(blockType.attributes, function (value, key) {
return Object(external_lodash_["isEqual"])(newDefaultBlock.attributes[key], block.attributes[key]); return newDefaultBlock.attributes[key] === block.attributes[key];
}); });
} }
/** /**
@ -6972,7 +7013,7 @@ function query(selector, matchers) {
}; };
} }
// EXTERNAL MODULE: external {"this":["wp","autop"]} // EXTERNAL MODULE: external {"this":["wp","autop"]}
var external_this_wp_autop_ = __webpack_require__(57); var external_this_wp_autop_ = __webpack_require__(58);
// EXTERNAL MODULE: external {"this":["wp","blockSerializationDefaultParser"]} // EXTERNAL MODULE: external {"this":["wp","blockSerializationDefaultParser"]}
var external_this_wp_blockSerializationDefaultParser_ = __webpack_require__(183); var external_this_wp_blockSerializationDefaultParser_ = __webpack_require__(183);
@ -6981,7 +7022,7 @@ var external_this_wp_blockSerializationDefaultParser_ = __webpack_require__(183)
var arrayWithHoles = __webpack_require__(35); var arrayWithHoles = __webpack_require__(35);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = __webpack_require__(36); var nonIterableRest = __webpack_require__(36);
@ -9379,7 +9420,8 @@ var utils_window$Node = window.Node,
function getBlockContentSchema(transforms) { function getBlockContentSchema(transforms) {
var schemas = transforms.map(function (_ref) { var schemas = transforms.map(function (_ref) {
var blockName = _ref.blockName, var isMatch = _ref.isMatch,
blockName = _ref.blockName,
schema = _ref.schema; schema = _ref.schema;
// If the block supports the "anchor" functionality, it needs to keep its ID attribute. // If the block supports the "anchor" functionality, it needs to keep its ID attribute.
@ -9391,20 +9433,49 @@ function getBlockContentSchema(transforms) {
schema[tag].attributes.push('id'); schema[tag].attributes.push('id');
} }
} // If an isMatch function exists add it to each schema tag that it applies to.
if (isMatch) {
for (var _tag in schema) {
schema[_tag].isMatch = isMatch;
}
} }
return schema; return schema;
}); });
return external_lodash_["mergeWith"].apply(void 0, [{}].concat(Object(toConsumableArray["a" /* default */])(schemas), [function (objValue, srcValue, key) { return external_lodash_["mergeWith"].apply(void 0, [{}].concat(Object(toConsumableArray["a" /* default */])(schemas), [function (objValue, srcValue, key) {
if (key === 'children') { switch (key) {
case 'children':
{
if (objValue === '*' || srcValue === '*') { if (objValue === '*' || srcValue === '*') {
return '*'; return '*';
} }
return Object(objectSpread["a" /* default */])({}, objValue, srcValue); return Object(objectSpread["a" /* default */])({}, objValue, srcValue);
} else if (key === 'attributes' || key === 'require') { }
case 'attributes':
case 'require':
{
return Object(toConsumableArray["a" /* default */])(objValue || []).concat(Object(toConsumableArray["a" /* default */])(srcValue || [])); return Object(toConsumableArray["a" /* default */])(objValue || []).concat(Object(toConsumableArray["a" /* default */])(srcValue || []));
} }
case 'isMatch':
{
// If one of the values being merge is undefined (matches everything),
// the result of the merge will be undefined.
if (!objValue || !srcValue) {
return undefined;
} // When merging two isMatch functions, the result is a new function
// that returns if one of the source functions returns true.
return function () {
return objValue.apply(void 0, arguments) || srcValue.apply(void 0, arguments);
};
}
}
}])); }]));
} }
/** /**
@ -9504,9 +9575,10 @@ function deepFilterHTML(HTML) {
function cleanNodeList(nodeList, doc, schema, inline) { function cleanNodeList(nodeList, doc, schema, inline) {
Array.from(nodeList).forEach(function (node) { Array.from(nodeList).forEach(function (node) {
var tag = node.nodeName.toLowerCase(); // It's a valid child. var tag = node.nodeName.toLowerCase(); // It's a valid child, if the tag exists in the schema without an isMatch
// function, or with an isMatch function that matches the node.
if (schema.hasOwnProperty(tag)) { if (schema.hasOwnProperty(tag) && (!schema[tag].isMatch || schema[tag].isMatch(node))) {
if (node.nodeType === utils_ELEMENT_NODE) { if (node.nodeType === utils_ELEMENT_NODE) {
var _schema$tag = schema[tag], var _schema$tag = schema[tag],
_schema$tag$attribute = _schema$tag.attributes, _schema$tag$attribute = _schema$tag.attributes,
@ -10042,7 +10114,7 @@ function shallowTextContent(element) {
}); });
// EXTERNAL MODULE: external {"this":["wp","blob"]} // EXTERNAL MODULE: external {"this":["wp","blob"]}
var external_this_wp_blob_ = __webpack_require__(33); var external_this_wp_blob_ = __webpack_require__(32);
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/image-corrector.js // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/raw-handling/image-corrector.js
@ -10638,6 +10710,16 @@ function categories_getCategories() {
function categories_setCategories(categories) { function categories_setCategories(categories) {
Object(external_this_wp_data_["dispatch"])('core/blocks').setCategories(categories); Object(external_this_wp_data_["dispatch"])('core/blocks').setCategories(categories);
} }
/**
* Updates a category.
*
* @param {string} slug Block category slug.
* @param {Object} category Object containing the category properties that should be updated.
*/
function categories_updateCategory(slug, category) {
Object(external_this_wp_data_["dispatch"])('core/blocks').updateCategory(slug, category);
}
// CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/templates.js // CONCATENATED MODULE: ./node_modules/@wordpress/blocks/build-module/api/templates.js
@ -10792,6 +10874,7 @@ function synchronizeBlocksWithTemplate() {
/* concated harmony reexport isValidBlockContent */__webpack_require__.d(__webpack_exports__, "isValidBlockContent", function() { return isValidBlockContent; }); /* concated harmony reexport isValidBlockContent */__webpack_require__.d(__webpack_exports__, "isValidBlockContent", function() { return isValidBlockContent; });
/* concated harmony reexport getCategories */__webpack_require__.d(__webpack_exports__, "getCategories", function() { return categories_getCategories; }); /* concated harmony reexport getCategories */__webpack_require__.d(__webpack_exports__, "getCategories", function() { return categories_getCategories; });
/* concated harmony reexport setCategories */__webpack_require__.d(__webpack_exports__, "setCategories", function() { return categories_setCategories; }); /* concated harmony reexport setCategories */__webpack_require__.d(__webpack_exports__, "setCategories", function() { return categories_setCategories; });
/* concated harmony reexport updateCategory */__webpack_require__.d(__webpack_exports__, "updateCategory", function() { return categories_updateCategory; });
/* concated harmony reexport registerBlockType */__webpack_require__.d(__webpack_exports__, "registerBlockType", function() { return registerBlockType; }); /* concated harmony reexport registerBlockType */__webpack_require__.d(__webpack_exports__, "registerBlockType", function() { return registerBlockType; });
/* concated harmony reexport unregisterBlockType */__webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return unregisterBlockType; }); /* concated harmony reexport unregisterBlockType */__webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return unregisterBlockType; });
/* concated harmony reexport setFreeformContentHandlerName */__webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return setFreeformContentHandlerName; }); /* concated harmony reexport setFreeformContentHandlerName */__webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return setFreeformContentHandlerName; });
@ -11118,6 +11201,13 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }), /***/ }),
/***/ 32: /***/ 32:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -11128,13 +11218,6 @@ function _iterableToArray(iter) {
/***/ }), /***/ }),
/***/ 33:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 35: /***/ 35:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -12379,7 +12462,7 @@ else {}
/***/ }), /***/ }),
/***/ 56: /***/ 57:
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
var rng = __webpack_require__(77); var rng = __webpack_require__(77);
@ -12415,7 +12498,7 @@ module.exports = v4;
/***/ }), /***/ }),
/***/ 57: /***/ 58:
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["autop"]; }()); (function() { module.exports = this["wp"]["autop"]; }());

File diff suppressed because one or more lines are too long

View File

@ -377,7 +377,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -566,7 +566,8 @@ if (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else
/***/ }), /***/ }),
/* 31 */, /* 31 */,
/* 32 */ /* 32 */,
/* 33 */
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -576,7 +577,6 @@ function _iterableToArray(iter) {
} }
/***/ }), /***/ }),
/* 33 */,
/* 34 */ /* 34 */
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
@ -2423,7 +2423,8 @@ module.exports = g;
/* 52 */, /* 52 */,
/* 53 */, /* 53 */,
/* 54 */, /* 54 */,
/* 55 */ /* 55 */,
/* 56 */
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
var moment = __webpack_require__(27); var moment = __webpack_require__(27);
@ -2469,7 +2470,7 @@ module.exports = {
/***/ }), /***/ }),
/* 56 */ /* 57 */
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
var rng = __webpack_require__(77); var rng = __webpack_require__(77);
@ -2504,8 +2505,8 @@ module.exports = v4;
/***/ }), /***/ }),
/* 57 */, /* 58 */,
/* 58 */ /* 59 */
/***/ (function(module, exports, __webpack_require__) { /***/ (function(module, exports, __webpack_require__) {
"use strict"; "use strict";
@ -2514,7 +2515,6 @@ module.exports = v4;
module.exports = __webpack_require__(118); module.exports = __webpack_require__(118);
/***/ }), /***/ }),
/* 59 */,
/* 60 */, /* 60 */,
/* 61 */, /* 61 */,
/* 62 */, /* 62 */,
@ -3551,7 +3551,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -7598,7 +7598,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -8047,7 +8047,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -8675,7 +8675,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes); var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -9054,7 +9054,7 @@ var _moment = __webpack_require__(27);
var _moment2 = _interopRequireDefault(_moment); var _moment2 = _interopRequireDefault(_moment);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -10687,7 +10687,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes); var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -12295,7 +12295,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes); var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -13331,7 +13331,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes); var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -18761,7 +18761,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare); var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55); var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes); var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -23902,6 +23902,13 @@ function (_Component) {
/* harmony default export */ var build_module_tooltip = (tooltip_Tooltip); /* harmony default export */ var build_module_tooltip = (tooltip_Tooltip);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dashicon/icon-class.js
var IconClass = function IconClass(props) {
var icon = props.icon,
className = props.className;
return ['dashicon', 'dashicons-' + icon, className].filter(Boolean).join(' ');
};
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dashicon/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/dashicon/index.js
@ -23927,6 +23934,7 @@ OR if you're looking to change now SVGs get output, you'll need to edit strings
var dashicon_Dashicon = var dashicon_Dashicon =
/*#__PURE__*/ /*#__PURE__*/
function (_Component) { function (_Component) {
@ -23941,14 +23949,13 @@ function (_Component) {
Object(createClass["a" /* default */])(Dashicon, [{ Object(createClass["a" /* default */])(Dashicon, [{
key: "shouldComponentUpdate", key: "shouldComponentUpdate",
value: function shouldComponentUpdate(nextProps) { value: function shouldComponentUpdate(nextProps) {
return this.props.icon !== nextProps.icon || this.props.size !== nextProps.size || this.props.className !== nextProps.className; return this.props.icon !== nextProps.icon || this.props.size !== nextProps.size || this.props.className !== nextProps.className || this.props.ariaPressed !== nextProps.ariaPressed;
} }
}, { }, {
key: "render", key: "render",
value: function render() { value: function render() {
var _this$props = this.props, var _this$props = this.props,
icon = _this$props.icon, icon = _this$props.icon,
className = _this$props.className,
_this$props$size = _this$props.size, _this$props$size = _this$props.size,
size = _this$props$size === void 0 ? 20 : _this$props$size; size = _this$props$size === void 0 ? 20 : _this$props$size;
var path; var path;
@ -25107,7 +25114,7 @@ function (_Component) {
return null; return null;
} }
var iconClass = ['dashicon', 'dashicons-' + icon, className].filter(Boolean).join(' '); var iconClass = IconClass(this.props);
return Object(external_this_wp_element_["createElement"])(svg_SVG, { return Object(external_this_wp_element_["createElement"])(svg_SVG, {
"aria-hidden": true, "aria-hidden": true,
role: "img", role: "img",
@ -25181,6 +25188,7 @@ function (_Component) {
labelPosition = _this$props.labelPosition, labelPosition = _this$props.labelPosition,
additionalProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["icon", "children", "label", "className", "tooltip", "shortcut", "labelPosition"]); additionalProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["icon", "children", "label", "className", "tooltip", "shortcut", "labelPosition"]);
var ariaPressed = this.props['aria-pressed'];
var classes = classnames_default()('components-icon-button', className); var classes = classnames_default()('components-icon-button', className);
var tooltipText = tooltip || label; // Should show the tooltip if... var tooltipText = tooltip || label; // Should show the tooltip if...
@ -25195,7 +25203,8 @@ function (_Component) {
}, additionalProps, { }, additionalProps, {
className: classes className: classes
}), Object(external_lodash_["isString"])(icon) ? Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, { }), Object(external_lodash_["isString"])(icon) ? Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, {
icon: icon icon: icon,
ariaPressed: ariaPressed
}) : icon, children); }) : icon, children);
if (showTooltip) { if (showTooltip) {
@ -30983,7 +30992,6 @@ function RangeControl(_ref) {
*/ */
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -31020,6 +31028,9 @@ function FontSizePicker(_ref) {
var currentFont = fontSizes.find(function (font) { var currentFont = fontSizes.find(function (font) {
return font.size === value; return font.size === value;
}); });
var currentFontSizeName = currentFont && currentFont.name || !value && Object(external_this_wp_i18n_["_x"])('Normal', 'font size name') || Object(external_this_wp_i18n_["_x"])('Custom', 'font size name');
return Object(external_this_wp_element_["createElement"])(base_control, { return Object(external_this_wp_element_["createElement"])(base_control, {
label: Object(external_this_wp_i18n_["__"])('Font Size') label: Object(external_this_wp_i18n_["__"])('Font Size')
}, Object(external_this_wp_element_["createElement"])("div", { }, Object(external_this_wp_element_["createElement"])("div", {
@ -31036,22 +31047,26 @@ function FontSizePicker(_ref) {
isLarge: true, isLarge: true,
onClick: onToggle, onClick: onToggle,
"aria-expanded": isOpen, "aria-expanded": isOpen,
"aria-label": Object(external_this_wp_i18n_["__"])('Custom font size') "aria-label": Object(external_this_wp_i18n_["sprintf"])(
}, currentFont && currentFont.name || !value && Object(external_this_wp_i18n_["_x"])('Normal', 'font size name') || Object(external_this_wp_i18n_["_x"])('Custom', 'font size name')); /* translators: %s: font size name */
Object(external_this_wp_i18n_["__"])('Font size: %s'), currentFontSizeName)
}, currentFontSizeName);
}, },
renderContent: function renderContent() { renderContent: function renderContent() {
return Object(external_this_wp_element_["createElement"])(menu, null, Object(external_lodash_["map"])(fontSizes, function (_ref3) { return Object(external_this_wp_element_["createElement"])(menu, null, Object(external_lodash_["map"])(fontSizes, function (_ref3) {
var name = _ref3.name, var name = _ref3.name,
size = _ref3.size, size = _ref3.size,
slug = _ref3.slug; slug = _ref3.slug;
var isSelected = value === size || !value && slug === 'normal';
return Object(external_this_wp_element_["createElement"])(build_module_button, { return Object(external_this_wp_element_["createElement"])(build_module_button, {
key: slug, key: slug,
onClick: function onClick() { onClick: function onClick() {
return onChange(slug === 'normal' ? undefined : size); return onChange(slug === 'normal' ? undefined : size);
}, },
className: 'is-font-' + slug, className: "is-font-".concat(slug),
role: "menuitem" role: "menuitemradio",
}, (value === size || !value && slug === 'normal') && Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, { "aria-checked": isSelected
}, isSelected && Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, {
icon: "saved" icon: "saved"
}), Object(external_this_wp_element_["createElement"])("span", { }), Object(external_this_wp_element_["createElement"])("span", {
className: "components-font-size-picker__dropdown-text-size", className: "components-font-size-picker__dropdown-text-size",
@ -31075,8 +31090,7 @@ function FontSizePicker(_ref) {
return onChange(undefined); return onChange(undefined);
}, },
isSmall: true, isSmall: true,
isDefault: true, isDefault: true
"aria-label": Object(external_this_wp_i18n_["__"])('Reset font size')
}, Object(external_this_wp_i18n_["__"])('Reset'))), withSlider && Object(external_this_wp_element_["createElement"])(range_control, { }, Object(external_this_wp_i18n_["__"])('Reset'))), withSlider && Object(external_this_wp_element_["createElement"])(range_control, {
className: "components-font-size-picker__custom-input", className: "components-font-size-picker__custom-input",
label: Object(external_this_wp_i18n_["__"])('Custom Size'), label: Object(external_this_wp_i18n_["__"])('Custom Size'),
@ -31090,7 +31104,7 @@ function FontSizePicker(_ref) {
})); }));
} }
/* harmony default export */ var font_size_picker = (Object(external_this_wp_compose_["withInstanceId"])(FontSizePicker)); /* harmony default export */ var font_size_picker = (FontSizePicker);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-file-upload/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-file-upload/index.js
@ -31409,7 +31423,7 @@ function (_Component) {
/* harmony default export */ var token_input = (token_input_TokenInput); /* harmony default export */ var token_input = (token_input_TokenInput);
// EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js // EXTERNAL MODULE: ./node_modules/dom-scroll-into-view/lib/index.js
var lib = __webpack_require__(58); var lib = __webpack_require__(59);
var lib_default = /*#__PURE__*/__webpack_require__.n(lib); var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-token-field/suggestions-list.js // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-token-field/suggestions-list.js
@ -35516,7 +35530,7 @@ function withFilters(hookName) {
} }
// EXTERNAL MODULE: ./node_modules/uuid/v4.js // EXTERNAL MODULE: ./node_modules/uuid/v4.js
var v4 = __webpack_require__(56); var v4 = __webpack_require__(57);
var v4_default = /*#__PURE__*/__webpack_require__.n(v4); var v4_default = /*#__PURE__*/__webpack_require__.n(v4);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-notices/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/higher-order/with-notices/index.js

File diff suppressed because one or more lines are too long

View File

@ -156,7 +156,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -918,7 +918,7 @@ var getQueriedItems = Object(rememo["a" /* default */])(function (state) {
}); });
// EXTERNAL MODULE: ./node_modules/redux/es/redux.js // EXTERNAL MODULE: ./node_modules/redux/es/redux.js
var redux = __webpack_require__(61); var redux = __webpack_require__(62);
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]} // EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
var external_this_wp_apiFetch_ = __webpack_require__(30); var external_this_wp_apiFetch_ = __webpack_require__(30);
@ -2309,7 +2309,7 @@ Object(external_this_wp_data_["registerStore"])(REDUCER_KEY, {
/***/ }), /***/ }),
/***/ 32: /***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -2376,7 +2376,7 @@ module.exports = g;
/***/ }), /***/ }),
/***/ 61: /***/ 62:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";

File diff suppressed because one or more lines are too long

View File

@ -334,7 +334,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -483,7 +483,7 @@ var external_lodash_ = __webpack_require__(2);
var asyncToGenerator = __webpack_require__(38); var asyncToGenerator = __webpack_require__(38);
// EXTERNAL MODULE: ./node_modules/redux/es/redux.js // EXTERNAL MODULE: ./node_modules/redux/es/redux.js
var redux = __webpack_require__(61); var redux = __webpack_require__(62);
// EXTERNAL MODULE: ./node_modules/is-promise/index.js // EXTERNAL MODULE: ./node_modules/is-promise/index.js
var is_promise = __webpack_require__(86); var is_promise = __webpack_require__(86);
@ -1724,7 +1724,7 @@ var with_select_withSelect = function withSelect(mapSelectToProps) {
*/ */
function getNextMergeProps(props) { function getNextMergeProps(props) {
return mapSelectToProps(props.registry.select, props.ownProps) || DEFAULT_MERGE_PROPS; return mapSelectToProps(props.registry.select, props.ownProps, props.registry) || DEFAULT_MERGE_PROPS;
} }
var ComponentWithSelect = var ComponentWithSelect =
@ -1922,7 +1922,7 @@ var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
} }
// Original dispatcher is a pre-bound (dispatching) action creator. // Original dispatcher is a pre-bound (dispatching) action creator.
(_mapDispatchToProps = mapDispatchToProps(this.props.registry.dispatch, this.props.ownProps))[propName].apply(_mapDispatchToProps, args); (_mapDispatchToProps = mapDispatchToProps(this.props.registry.dispatch, this.props.ownProps, this.props.registry))[propName].apply(_mapDispatchToProps, args);
} }
}, { }, {
key: "setProxyProps", key: "setProxyProps",
@ -1935,11 +1935,16 @@ var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
// called, it is done only to determine the keys for which // called, it is done only to determine the keys for which
// proxy functions should be created. The actual registry // proxy functions should be created. The actual registry
// dispatch does not occur until the function is called. // dispatch does not occur until the function is called.
var propsToDispatchers = mapDispatchToProps(this.props.registry.dispatch, props.ownProps); var propsToDispatchers = mapDispatchToProps(this.props.registry.dispatch, props.ownProps, this.props.registry);
this.proxyProps = Object(external_lodash_["mapValues"])(propsToDispatchers, function (dispatcher, propName) { this.proxyProps = Object(external_lodash_["mapValues"])(propsToDispatchers, function (dispatcher, propName) {
// Prebind with prop name so we have reference to the original if (typeof dispatcher !== 'function') {
// eslint-disable-next-line no-console
console.warn("Property ".concat(propName, " returned from mapDispatchToProps in withDispatch must be a function."));
} // Prebind with prop name so we have reference to the original
// dispatcher to invoke. Track between re-renders to avoid // dispatcher to invoke. Track between re-renders to avoid
// creating new function references every render. // creating new function references every render.
if (_this2.proxyProps.hasOwnProperty(propName)) { if (_this2.proxyProps.hasOwnProperty(propName)) {
return _this2.proxyProps[propName]; return _this2.proxyProps[propName];
} }
@ -2021,7 +2026,7 @@ var build_module_use = default_registry.use;
/***/ }), /***/ }),
/***/ 32: /***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -2131,7 +2136,7 @@ module.exports = g;
/***/ }), /***/ }),
/***/ 61: /***/ 62:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -103,7 +103,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -127,17 +127,6 @@ function _toConsumableArray(arr) {
/***/ }), /***/ }),
/***/ 32:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }),
/***/ 324: /***/ 324:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -1004,6 +993,17 @@ var build_module_focus = {
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }) /***/ })
/******/ }); /******/ });

File diff suppressed because one or more lines are too long

View File

@ -330,7 +330,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -538,7 +538,7 @@ __webpack_require__.d(selectors_namespaceObject, "getPreferences", function() {
__webpack_require__.d(selectors_namespaceObject, "getPreference", function() { return getPreference; }); __webpack_require__.d(selectors_namespaceObject, "getPreference", function() { return getPreference; });
__webpack_require__.d(selectors_namespaceObject, "isPublishSidebarOpened", function() { return selectors_isPublishSidebarOpened; }); __webpack_require__.d(selectors_namespaceObject, "isPublishSidebarOpened", function() { return selectors_isPublishSidebarOpened; });
__webpack_require__.d(selectors_namespaceObject, "isEditorPanelRemoved", function() { return isEditorPanelRemoved; }); __webpack_require__.d(selectors_namespaceObject, "isEditorPanelRemoved", function() { return isEditorPanelRemoved; });
__webpack_require__.d(selectors_namespaceObject, "isEditorPanelEnabled", function() { return isEditorPanelEnabled; }); __webpack_require__.d(selectors_namespaceObject, "isEditorPanelEnabled", function() { return selectors_isEditorPanelEnabled; });
__webpack_require__.d(selectors_namespaceObject, "isEditorPanelOpened", function() { return selectors_isEditorPanelOpened; }); __webpack_require__.d(selectors_namespaceObject, "isEditorPanelOpened", function() { return selectors_isEditorPanelOpened; });
__webpack_require__.d(selectors_namespaceObject, "isModalActive", function() { return selectors_isModalActive; }); __webpack_require__.d(selectors_namespaceObject, "isModalActive", function() { return selectors_isModalActive; });
__webpack_require__.d(selectors_namespaceObject, "isFeatureActive", function() { return isFeatureActive; }); __webpack_require__.d(selectors_namespaceObject, "isFeatureActive", function() { return isFeatureActive; });
@ -619,9 +619,11 @@ var external_this_wp_i18n_ = __webpack_require__(1);
*/ */
// Getter for the sake of unit tests.
var getGalleryDetailsMediaFrame = function getGalleryDetailsMediaFrame() { var _window = window,
wp = _window.wp; // Getter for the sake of unit tests.
var media_upload_getGalleryDetailsMediaFrame = function getGalleryDetailsMediaFrame() {
/** /**
* Custom gallery details frame. * Custom gallery details frame.
* *
@ -644,7 +646,7 @@ var getGalleryDetailsMediaFrame = function getGalleryDetailsMediaFrame() {
filterable: 'uploaded', filterable: 'uploaded',
multiple: 'add', multiple: 'add',
editable: false, editable: false,
library: wp.media.query(_.defaults({ library: wp.media.query(Object(external_lodash_["defaults"])({
type: 'image' type: 'image'
}, this.options.library)) }, this.options.library))
}), new wp.media.controller.GalleryEdit({ }), new wp.media.controller.GalleryEdit({
@ -705,7 +707,7 @@ function (_Component) {
if (gallery) { if (gallery) {
var currentState = value ? 'gallery-edit' : 'gallery'; var currentState = value ? 'gallery-edit' : 'gallery';
var GalleryDetailsMediaFrame = getGalleryDetailsMediaFrame(); var GalleryDetailsMediaFrame = media_upload_getGalleryDetailsMediaFrame();
var attachments = getAttachmentsCollection(value); var attachments = getAttachmentsCollection(value);
var selection = new wp.media.model.Selection(attachments.models, { var selection = new wp.media.model.Selection(attachments.models, {
props: attachments.props.toJSON(), props: attachments.props.toJSON(),
@ -920,7 +922,6 @@ var enhance = Object(external_this_wp_compose_["compose"])(
* @return {Component} Enhanced component with merged state data props. * @return {Component} Enhanced component with merged state data props.
*/ */
Object(external_this_wp_data_["withSelect"])(function (select, block) { Object(external_this_wp_data_["withSelect"])(function (select, block) {
var blocks = select('core/editor').getBlocks();
var multiple = Object(external_this_wp_blocks_["hasBlockSupport"])(block.name, 'multiple', true); // For block types with `multiple` support, there is no "original var multiple = Object(external_this_wp_blocks_["hasBlockSupport"])(block.name, 'multiple', true); // For block types with `multiple` support, there is no "original
// block" to be found in the content, as the block itself is valid. // block" to be found in the content, as the block itself is valid.
@ -930,6 +931,7 @@ Object(external_this_wp_data_["withSelect"])(function (select, block) {
// block from the current one. // block from the current one.
var blocks = select('core/editor').getBlocks();
var firstOfSameType = Object(external_lodash_["find"])(blocks, function (_ref) { var firstOfSameType = Object(external_lodash_["find"])(blocks, function (_ref) {
var name = _ref.name; var name = _ref.name;
return block.name === name; return block.name === name;
@ -1022,7 +1024,7 @@ Object(external_this_wp_hooks_["addFilter"])('editor.BlockEdit', 'core/edit-post
// EXTERNAL MODULE: external {"this":["wp","plugins"]} // EXTERNAL MODULE: external {"this":["wp","plugins"]}
var external_this_wp_plugins_ = __webpack_require__(62); var external_this_wp_plugins_ = __webpack_require__(54);
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/plugins/copy-content-menu-item/index.js
@ -1780,7 +1782,7 @@ function isEditorPanelRemoved(state, panelName) {
* @return {boolean} Whether or not the panel is enabled. * @return {boolean} Whether or not the panel is enabled.
*/ */
function isEditorPanelEnabled(state, panelName) { function selectors_isEditorPanelEnabled(state, panelName) {
var panels = getPreference(state, 'panels'); var panels = getPreference(state, 'panels');
return !isEditorPanelRemoved(state, panelName) && Object(external_lodash_["get"])(panels, [panelName, 'enabled'], true); return !isEditorPanelRemoved(state, panelName) && Object(external_lodash_["get"])(panels, [panelName, 'enabled'], true);
} }
@ -1863,7 +1865,7 @@ var getActiveMetaBoxLocations = Object(rememo["a" /* default */])(function (stat
function isMetaBoxLocationVisible(state, location) { function isMetaBoxLocationVisible(state, location) {
return isMetaBoxLocationActive(state, location) && Object(external_lodash_["some"])(getMetaBoxesPerLocation(state, location), function (_ref) { return isMetaBoxLocationActive(state, location) && Object(external_lodash_["some"])(getMetaBoxesPerLocation(state, location), function (_ref) {
var id = _ref.id; var id = _ref.id;
return isEditorPanelEnabled(state, "meta-box-".concat(id)); return selectors_isEditorPanelEnabled(state, "meta-box-".concat(id));
}); });
} }
/** /**
@ -2029,6 +2031,11 @@ var effects = {
}); });
}, },
REQUEST_META_BOX_UPDATES: function REQUEST_META_BOX_UPDATES(action, store) { REQUEST_META_BOX_UPDATES: function REQUEST_META_BOX_UPDATES(action, store) {
// Saves the wp_editor fields
if (window.tinyMCE) {
window.tinyMCE.triggerSave();
}
var state = store.getState(); // Additional data needed for backwards compatibility. var state = store.getState(); // Additional data needed for backwards compatibility.
// If we do not provide this data, the post will be overridden with the default values. // If we do not provide this data, the post will be overridden with the default values.
@ -2229,6 +2236,20 @@ store_store.dispatch({
}); });
/* harmony default export */ var build_module_store = (store_store); /* harmony default export */ var build_module_store = (store_store);
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/prevent-event-discovery.js
/* harmony default export */ var prevent_event_discovery = ({
't a l e s o f g u t e n b e r g': function tALESOFGUTENBERG(event) {
if (!document.activeElement.classList.contains('edit-post-visual-editor') && document.activeElement !== document.body) {
return;
}
event.preventDefault();
window.wp.data.dispatch('core/editor').insertBlock(window.wp.blocks.createBlock('core/paragraph', {
content: '🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️'
}));
}
});
// EXTERNAL MODULE: ./node_modules/classnames/index.js // EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__(16); var classnames = __webpack_require__(16);
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
@ -2944,25 +2965,25 @@ function Header(_ref) {
/* harmony default export */ var header = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) { /* harmony default export */ var header = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_data_["withSelect"])(function (select) {
return { return {
hasActiveMetaboxes: select('core/edit-post').hasMetaBoxes(), hasActiveMetaboxes: select('core/edit-post').hasMetaBoxes(),
hasBlockSelection: !!select('core/editor').getBlockSelectionStart(),
isEditorSidebarOpened: select('core/edit-post').isEditorSidebarOpened(), isEditorSidebarOpened: select('core/edit-post').isEditorSidebarOpened(),
isPublishSidebarOpened: select('core/edit-post').isPublishSidebarOpened(), isPublishSidebarOpened: select('core/edit-post').isPublishSidebarOpened(),
isSaving: select('core/edit-post').isSavingMetaBoxes() isSaving: select('core/edit-post').isSavingMetaBoxes()
}; };
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref2) { }), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref2) {
var hasBlockSelection = _ref2.hasBlockSelection; var select = _ref2.select;
var _select = select('core/editor'),
getBlockSelectionStart = _select.getBlockSelectionStart;
var _dispatch = dispatch('core/edit-post'), var _dispatch = dispatch('core/edit-post'),
_openGeneralSidebar = _dispatch.openGeneralSidebar, _openGeneralSidebar = _dispatch.openGeneralSidebar,
closeGeneralSidebar = _dispatch.closeGeneralSidebar; closeGeneralSidebar = _dispatch.closeGeneralSidebar;
var sidebarToOpen = hasBlockSelection ? 'edit-post/block' : 'edit-post/document';
return { return {
openGeneralSidebar: function openGeneralSidebar() { openGeneralSidebar: function openGeneralSidebar() {
return _openGeneralSidebar(sidebarToOpen); return _openGeneralSidebar(getBlockSelectionStart() ? 'edit-post/block' : 'edit-post/document');
}, },
closeGeneralSidebar: closeGeneralSidebar, closeGeneralSidebar: closeGeneralSidebar
hasBlockSelection: undefined
}; };
}))(Header)); }))(Header));
@ -3869,7 +3890,10 @@ function OptionsModal(_ref) {
label: Object(external_this_wp_i18n_["__"])('Enable Tips') label: Object(external_this_wp_i18n_["__"])('Enable Tips')
})), Object(external_this_wp_element_["createElement"])(section, { })), Object(external_this_wp_element_["createElement"])(section, {
title: Object(external_this_wp_i18n_["__"])('Document Panels') title: Object(external_this_wp_i18n_["__"])('Document Panels')
}, Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["PostTaxonomies"], { }, Object(external_this_wp_element_["createElement"])(enable_panel, {
label: Object(external_this_wp_i18n_["__"])('Permalink'),
panelName: "post-link"
}), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["PostTaxonomies"], {
taxonomyWrapper: function taxonomyWrapper(content, taxonomy) { taxonomyWrapper: function taxonomyWrapper(content, taxonomy) {
return Object(external_this_wp_element_["createElement"])(enable_panel, { return Object(external_this_wp_element_["createElement"])(enable_panel, {
label: Object(external_lodash_["get"])(taxonomy, ['labels', 'menu_name']), label: Object(external_lodash_["get"])(taxonomy, ['labels', 'menu_name']),
@ -4055,8 +4079,14 @@ function (_Component) {
isVisible = _this$props.isVisible; isVisible = _this$props.isVisible;
var element = document.getElementById(id); var element = document.getElementById(id);
if (element) { if (!element) {
element.style.display = isVisible ? '' : 'none'; return;
}
if (isVisible) {
element.classList.remove('is-hidden');
} else {
element.classList.add('is-hidden');
} }
} }
}, { }, {
@ -4840,6 +4870,7 @@ function PostLink(_ref) {
getEditedPostAttribute = _select.getEditedPostAttribute; getEditedPostAttribute = _select.getEditedPostAttribute;
var _select2 = select('core/edit-post'), var _select2 = select('core/edit-post'),
isEditorPanelEnabled = _select2.isEditorPanelEnabled,
isEditorPanelOpened = _select2.isEditorPanelOpened; isEditorPanelOpened = _select2.isEditorPanelOpened;
var _select3 = select('core'), var _select3 = select('core'),
@ -4858,16 +4889,18 @@ function PostLink(_ref) {
isPublished: isCurrentPostPublished(), isPublished: isCurrentPostPublished(),
isOpened: isEditorPanelOpened(post_link_PANEL_NAME), isOpened: isEditorPanelOpened(post_link_PANEL_NAME),
permalinkParts: getPermalinkParts(), permalinkParts: getPermalinkParts(),
isEnabled: isEditorPanelEnabled(post_link_PANEL_NAME),
isViewable: Object(external_lodash_["get"])(postType, ['viewable'], false), isViewable: Object(external_lodash_["get"])(postType, ['viewable'], false),
postTitle: getEditedPostAttribute('title'), postTitle: getEditedPostAttribute('title'),
postSlug: getEditedPostAttribute('slug'), postSlug: getEditedPostAttribute('slug'),
postID: id postID: id
}; };
}), Object(external_this_wp_compose_["ifCondition"])(function (_ref2) { }), Object(external_this_wp_compose_["ifCondition"])(function (_ref2) {
var isNew = _ref2.isNew, var isEnabled = _ref2.isEnabled,
isNew = _ref2.isNew,
postLink = _ref2.postLink, postLink = _ref2.postLink,
isViewable = _ref2.isViewable; isViewable = _ref2.isViewable;
return !isNew && postLink && isViewable; return isEnabled && !isNew && postLink && isViewable;
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) { }), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
var _dispatch = dispatch('core/edit-post'), var _dispatch = dispatch('core/edit-post'),
toggleEditorPanelOpened = _dispatch.toggleEditorPanelOpened; toggleEditorPanelOpened = _dispatch.toggleEditorPanelOpened;
@ -5326,12 +5359,14 @@ function Layout(_ref) {
/** /**
* Internal dependencies * Internal dependencies
*/ */
function Editor(_ref) { function Editor(_ref) {
var settings = _ref.settings, var settings = _ref.settings,
hasFixedToolbar = _ref.hasFixedToolbar, hasFixedToolbar = _ref.hasFixedToolbar,
@ -5356,7 +5391,9 @@ function Editor(_ref) {
initialEdits: initialEdits initialEdits: initialEdits
}, props), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["ErrorBoundary"], { }, props), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["ErrorBoundary"], {
onError: onError onError: onError
}, Object(external_this_wp_element_["createElement"])(layout, null)), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["PostLockedModal"], null))); }, Object(external_this_wp_element_["createElement"])(layout, null), Object(external_this_wp_element_["createElement"])(external_this_wp_components_["KeyboardShortcuts"], {
shortcuts: prevent_event_discovery
})), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["PostLockedModal"], null)));
} }
/* harmony default export */ var editor = (Object(external_this_wp_data_["withSelect"])(function (select, _ref2) { /* harmony default export */ var editor = (Object(external_this_wp_data_["withSelect"])(function (select, _ref2) {
@ -5435,6 +5472,46 @@ var plugin_block_settings_menu_item_PluginBlockSettingsMenuItem = function Plugi
/* harmony default export */ var plugin_block_settings_menu_item = (plugin_block_settings_menu_item_PluginBlockSettingsMenuItem); /* harmony default export */ var plugin_block_settings_menu_item = (plugin_block_settings_menu_item_PluginBlockSettingsMenuItem);
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/plugin-more-menu-item/index.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
var plugin_more_menu_item_PluginMoreMenuItem = function PluginMoreMenuItem(_ref) {
var _ref$onClick = _ref.onClick,
onClick = _ref$onClick === void 0 ? external_lodash_["noop"] : _ref$onClick,
props = Object(objectWithoutProperties["a" /* default */])(_ref, ["onClick"]);
return Object(external_this_wp_element_["createElement"])(plugins_more_menu_group, null, function (fillProps) {
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], Object(esm_extends["a" /* default */])({}, props, {
onClick: Object(external_this_wp_compose_["compose"])(onClick, fillProps.onClose)
}));
});
};
/* harmony default export */ var plugin_more_menu_item = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_plugins_["withPluginContext"])(function (context, ownProps) {
return {
icon: ownProps.icon || context.icon
};
}))(plugin_more_menu_item_PluginMoreMenuItem));
// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/sidebar/plugin-sidebar/index.js
@ -5541,7 +5618,6 @@ function PluginSidebar(props) {
/** /**
* Internal dependencies * Internal dependencies
*/ */
@ -5553,14 +5629,12 @@ var plugin_sidebar_more_menu_item_PluginSidebarMoreMenuItem = function PluginSid
icon = _ref.icon, icon = _ref.icon,
isSelected = _ref.isSelected, isSelected = _ref.isSelected,
onClick = _ref.onClick; onClick = _ref.onClick;
return Object(external_this_wp_element_["createElement"])(plugins_more_menu_group, null, function (fillProps) { return Object(external_this_wp_element_["createElement"])(plugin_more_menu_item, {
return Object(external_this_wp_element_["createElement"])(external_this_wp_components_["MenuItem"], {
icon: isSelected ? 'yes' : icon, icon: isSelected ? 'yes' : icon,
isSelected: isSelected, isSelected: isSelected,
role: "menuitemcheckbox", role: "menuitemcheckbox",
onClick: Object(external_this_wp_compose_["compose"])(onClick, fillProps.onClose) onClick: onClick
}, children); }, children);
});
}; };
/* harmony default export */ var plugin_sidebar_more_menu_item = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_plugins_["withPluginContext"])(function (context, ownProps) { /* harmony default export */ var plugin_sidebar_more_menu_item = (Object(external_this_wp_compose_["compose"])(Object(external_this_wp_plugins_["withPluginContext"])(function (context, ownProps) {
@ -5597,6 +5671,7 @@ var plugin_sidebar_more_menu_item_PluginSidebarMoreMenuItem = function PluginSid
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reinitializeEditor", function() { return reinitializeEditor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reinitializeEditor", function() { return reinitializeEditor; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeEditor", function() { return initializeEditor; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeEditor", function() { return initializeEditor; });
/* concated harmony reexport PluginBlockSettingsMenuItem */__webpack_require__.d(__webpack_exports__, "PluginBlockSettingsMenuItem", function() { return plugin_block_settings_menu_item; }); /* concated harmony reexport PluginBlockSettingsMenuItem */__webpack_require__.d(__webpack_exports__, "PluginBlockSettingsMenuItem", function() { return plugin_block_settings_menu_item; });
/* concated harmony reexport PluginMoreMenuItem */__webpack_require__.d(__webpack_exports__, "PluginMoreMenuItem", function() { return plugin_more_menu_item; });
/* concated harmony reexport PluginPostPublishPanel */__webpack_require__.d(__webpack_exports__, "PluginPostPublishPanel", function() { return plugin_post_publish_panel; }); /* concated harmony reexport PluginPostPublishPanel */__webpack_require__.d(__webpack_exports__, "PluginPostPublishPanel", function() { return plugin_post_publish_panel; });
/* concated harmony reexport PluginPostStatusInfo */__webpack_require__.d(__webpack_exports__, "PluginPostStatusInfo", function() { return plugin_post_status_info; }); /* concated harmony reexport PluginPostStatusInfo */__webpack_require__.d(__webpack_exports__, "PluginPostStatusInfo", function() { return plugin_post_status_info; });
/* concated harmony reexport PluginPrePublishPanel */__webpack_require__.d(__webpack_exports__, "PluginPrePublishPanel", function() { return plugin_pre_publish_panel; }); /* concated harmony reexport PluginPrePublishPanel */__webpack_require__.d(__webpack_exports__, "PluginPrePublishPanel", function() { return plugin_pre_publish_panel; });
@ -5685,6 +5760,7 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
/***/ }), /***/ }),
/***/ 31: /***/ 31:
@ -5969,7 +6045,7 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }), /***/ }),
/***/ 32: /***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -6037,6 +6113,13 @@ function _nonIterableRest() {
/***/ }), /***/ }),
/***/ 54:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["plugins"]; }());
/***/ }),
/***/ 6: /***/ 6:
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -6044,13 +6127,6 @@ function _nonIterableRest() {
/***/ }), /***/ }),
/***/ 62:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["plugins"]; }());
/***/ }),
/***/ 7: /***/ 7:
/***/ (function(module, exports) { /***/ (function(module, exports) {

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -416,7 +416,7 @@ var utils_isEmptyElement = function isEmptyElement(element) {
var esm_typeof = __webpack_require__(28); var esm_typeof = __webpack_require__(28);
// EXTERNAL MODULE: external {"this":["wp","escapeHtml"]} // EXTERNAL MODULE: external {"this":["wp","escapeHtml"]}
var external_this_wp_escapeHtml_ = __webpack_require__(60); var external_this_wp_escapeHtml_ = __webpack_require__(61);
// CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/raw-html.js // CONCATENATED MODULE: ./node_modules/@wordpress/element/build-module/raw-html.js
@ -970,7 +970,7 @@ function renderStyle(style) {
/***/ }), /***/ }),
/***/ 60: /***/ 61:
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["escapeHtml"]; }()); (function() { module.exports = this["wp"]["escapeHtml"]; }());

File diff suppressed because one or more lines are too long

View File

@ -874,7 +874,7 @@ function createLinkFormat(_ref) {
if (opensInNewWindow) { if (opensInNewWindow) {
// translators: accessibility label for external links, where the argument is the link text // translators: accessibility label for external links, where the argument is the link text
var label = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%s (opens in a new tab)'), text).trim(); var label = Object(external_this_wp_i18n_["sprintf"])(Object(external_this_wp_i18n_["__"])('%s (opens in a new tab)'), text);
format.attributes.target = '_blank'; format.attributes.target = '_blank';
format.attributes.rel = 'noreferrer noopener'; format.attributes.rel = 'noreferrer noopener';
format.attributes['aria-label'] = label; format.attributes['aria-label'] = label;
@ -1009,10 +1009,11 @@ function (_Component) {
}); // Apply now if URL is not being edited. }); // Apply now if URL is not being edited.
if (!isShowingInput(this.props, this.state)) { if (!isShowingInput(this.props, this.state)) {
var selectedText = Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["slice"])(value));
onChange(Object(external_this_wp_richText_["applyFormat"])(value, createLinkFormat({ onChange(Object(external_this_wp_richText_["applyFormat"])(value, createLinkFormat({
url: url, url: url,
opensInNewWindow: opensInNewWindow, opensInNewWindow: opensInNewWindow,
text: value.text text: selectedText
}))); })));
} }
} }
@ -1036,10 +1037,11 @@ function (_Component) {
inputValue = _this$state.inputValue, inputValue = _this$state.inputValue,
opensInNewWindow = _this$state.opensInNewWindow; opensInNewWindow = _this$state.opensInNewWindow;
var url = Object(external_this_wp_url_["prependHTTP"])(inputValue); var url = Object(external_this_wp_url_["prependHTTP"])(inputValue);
var selectedText = Object(external_this_wp_richText_["getTextContent"])(Object(external_this_wp_richText_["slice"])(value));
var format = createLinkFormat({ var format = createLinkFormat({
url: url, url: url,
opensInNewWindow: opensInNewWindow, opensInNewWindow: opensInNewWindow,
text: value.text text: selectedText
}); });
event.preventDefault(); event.preventDefault();

File diff suppressed because one or more lines are too long

View File

@ -132,7 +132,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -156,17 +156,6 @@ function _toConsumableArray(arr) {
/***/ }), /***/ }),
/***/ 32:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }),
/***/ 326: /***/ 326:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -410,6 +399,17 @@ var isKeyboardEvent = Object(external_lodash_["mapValues"])(modifiers, function
}); });
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }) /***/ })
/******/ }); /******/ });

View File

@ -1 +1 @@
this.wp=this.wp||{},this.wp.keycodes=function(t){var n={};function r(e){if(n[e])return n[e].exports;var u=n[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var u in t)r.d(e,u,function(n){return t[n]}.bind(null,u));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=326)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},15:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",function(){return e})},19:function(t,n,r){"use strict";var e=r(32);function u(t){return function(t){if(Array.isArray(t)){for(var n=0,r=new Array(t.length);n<t.length;n++)r[n]=t[n];return r}}(t)||Object(e.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(n,"a",function(){return u})},2:function(t,n){!function(){t.exports=this.lodash}()},32:function(t,n,r){"use strict";function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(n,"a",function(){return e})},326:function(t,n,r){"use strict";r.r(n);var e=r(15),u=r(19),c=r(2),o=r(1);function i(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).navigator.platform;return-1!==t.indexOf("Mac")||Object(c.includes)(["iPad","iPhone"],t)}r.d(n,"BACKSPACE",function(){return a}),r.d(n,"TAB",function(){return f}),r.d(n,"ENTER",function(){return l}),r.d(n,"ESCAPE",function(){return d}),r.d(n,"SPACE",function(){return b}),r.d(n,"LEFT",function(){return s}),r.d(n,"UP",function(){return j}),r.d(n,"RIGHT",function(){return O}),r.d(n,"DOWN",function(){return p}),r.d(n,"DELETE",function(){return y}),r.d(n,"F10",function(){return v}),r.d(n,"ALT",function(){return h}),r.d(n,"CTRL",function(){return m}),r.d(n,"COMMAND",function(){return g}),r.d(n,"SHIFT",function(){return S}),r.d(n,"modifiers",function(){return A}),r.d(n,"rawShortcut",function(){return w}),r.d(n,"displayShortcutList",function(){return C}),r.d(n,"displayShortcut",function(){return P}),r.d(n,"shortcutAriaLabel",function(){return E}),r.d(n,"isKeyboardEvent",function(){return _});var a=8,f=9,l=13,d=27,b=32,s=37,j=38,O=39,p=40,y=46,v=121,h="alt",m="ctrl",g="meta",S="shift",A={primary:function(t){return t()?[g]:[m]},primaryShift:function(t){return t()?[S,g]:[m,S]},primaryAlt:function(t){return t()?[h,g]:[m,h]},secondary:function(t){return t()?[S,h,g]:[m,S,h]},access:function(t){return t()?[m,h]:[S,h]},ctrl:function(){return[m]},alt:function(){return[h]},ctrlShift:function(){return[m,S]},shift:function(){return[S]},shiftAlt:function(){return[S,h]}},w=Object(c.mapValues)(A,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return Object(u.a)(t(r)).concat([n.toLowerCase()]).join("+")}}),C=Object(c.mapValues)(A,function(t){return function(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=o(),f=(r={},Object(e.a)(r,h,a?"⌥":"Alt"),Object(e.a)(r,m,a?"^":"Ctrl"),Object(e.a)(r,g,"⌘"),Object(e.a)(r,S,a?"⇧":"Shift"),r),l=t(o).reduce(function(t,n){var r=Object(c.get)(f,n,n);return a?Object(u.a)(t).concat([r]):Object(u.a)(t).concat([r,"+"])},[]),d=Object(c.capitalize)(n);return Object(u.a)(l).concat([d])}}),P=Object(c.mapValues)(C,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t(n,r).join("")}}),E=Object(c.mapValues)(A,function(t){return function(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,f=a(),l=(r={},Object(e.a)(r,S,"Shift"),Object(e.a)(r,g,f?"Command":"Control"),Object(e.a)(r,m,"Control"),Object(e.a)(r,h,f?"Option":"Alt"),Object(e.a)(r,",",Object(o.__)("Comma")),Object(e.a)(r,".",Object(o.__)("Period")),Object(e.a)(r,"`",Object(o.__)("Backtick")),r);return Object(u.a)(t(a)).concat([n]).map(function(t){return Object(c.capitalize)(Object(c.get)(l,t,t))}).join(f?" ":" + ")}}),_=Object(c.mapValues)(A,function(t){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u=t(e);return!!u.every(function(t){return n["".concat(t,"Key")]})&&(r?n.key===r:Object(c.includes)(u,n.key.toLowerCase()))}})}}); this.wp=this.wp||{},this.wp.keycodes=function(t){var n={};function r(e){if(n[e])return n[e].exports;var u=n[e]={i:e,l:!1,exports:{}};return t[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,n){if(1&n&&(t=r(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(r.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var u in t)r.d(e,u,function(n){return t[n]}.bind(null,u));return e},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=326)}({1:function(t,n){!function(){t.exports=this.wp.i18n}()},15:function(t,n,r){"use strict";function e(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}r.d(n,"a",function(){return e})},19:function(t,n,r){"use strict";var e=r(33);function u(t){return function(t){if(Array.isArray(t)){for(var n=0,r=new Array(t.length);n<t.length;n++)r[n]=t[n];return r}}(t)||Object(e.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(n,"a",function(){return u})},2:function(t,n){!function(){t.exports=this.lodash}()},326:function(t,n,r){"use strict";r.r(n);var e=r(15),u=r(19),c=r(2),o=r(1);function i(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).navigator.platform;return-1!==t.indexOf("Mac")||Object(c.includes)(["iPad","iPhone"],t)}r.d(n,"BACKSPACE",function(){return a}),r.d(n,"TAB",function(){return f}),r.d(n,"ENTER",function(){return l}),r.d(n,"ESCAPE",function(){return d}),r.d(n,"SPACE",function(){return b}),r.d(n,"LEFT",function(){return s}),r.d(n,"UP",function(){return j}),r.d(n,"RIGHT",function(){return O}),r.d(n,"DOWN",function(){return p}),r.d(n,"DELETE",function(){return y}),r.d(n,"F10",function(){return v}),r.d(n,"ALT",function(){return h}),r.d(n,"CTRL",function(){return m}),r.d(n,"COMMAND",function(){return g}),r.d(n,"SHIFT",function(){return S}),r.d(n,"modifiers",function(){return A}),r.d(n,"rawShortcut",function(){return w}),r.d(n,"displayShortcutList",function(){return C}),r.d(n,"displayShortcut",function(){return P}),r.d(n,"shortcutAriaLabel",function(){return E}),r.d(n,"isKeyboardEvent",function(){return _});var a=8,f=9,l=13,d=27,b=32,s=37,j=38,O=39,p=40,y=46,v=121,h="alt",m="ctrl",g="meta",S="shift",A={primary:function(t){return t()?[g]:[m]},primaryShift:function(t){return t()?[S,g]:[m,S]},primaryAlt:function(t){return t()?[h,g]:[m,h]},secondary:function(t){return t()?[S,h,g]:[m,S,h]},access:function(t){return t()?[m,h]:[S,h]},ctrl:function(){return[m]},alt:function(){return[h]},ctrlShift:function(){return[m,S]},shift:function(){return[S]},shiftAlt:function(){return[S,h]}},w=Object(c.mapValues)(A,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return Object(u.a)(t(r)).concat([n.toLowerCase()]).join("+")}}),C=Object(c.mapValues)(A,function(t){return function(n){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=o(),f=(r={},Object(e.a)(r,h,a?"⌥":"Alt"),Object(e.a)(r,m,a?"^":"Ctrl"),Object(e.a)(r,g,"⌘"),Object(e.a)(r,S,a?"⇧":"Shift"),r),l=t(o).reduce(function(t,n){var r=Object(c.get)(f,n,n);return a?Object(u.a)(t).concat([r]):Object(u.a)(t).concat([r,"+"])},[]),d=Object(c.capitalize)(n);return Object(u.a)(l).concat([d])}}),P=Object(c.mapValues)(C,function(t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;return t(n,r).join("")}}),E=Object(c.mapValues)(A,function(t){return function(n){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,f=a(),l=(r={},Object(e.a)(r,S,"Shift"),Object(e.a)(r,g,f?"Command":"Control"),Object(e.a)(r,m,"Control"),Object(e.a)(r,h,f?"Option":"Alt"),Object(e.a)(r,",",Object(o.__)("Comma")),Object(e.a)(r,".",Object(o.__)("Period")),Object(e.a)(r,"`",Object(o.__)("Backtick")),r);return Object(u.a)(t(a)).concat([n]).map(function(t){return Object(c.capitalize)(Object(c.get)(l,t,t))}).join(f?" ":" + ")}}),_=Object(c.mapValues)(A,function(t){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,u=t(e);return!!u.every(function(t){return n["".concat(t,"Key")]})&&(r?n.key===r:Object(c.includes)(u,n.key.toLowerCase()))}})},33:function(t,n,r){"use strict";function e(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(n,"a",function(){return e})}});

View File

@ -139,7 +139,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -491,17 +491,6 @@ function isShallowEqual( a, b, fromIndex ) {
}); });
/***/ }),
/***/ 32:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }), /***/ }),
/***/ 321: /***/ 321:
@ -867,7 +856,7 @@ function DotTip(_ref) {
focusOnMount: "container", focusOnMount: "container",
getAnchorRect: getAnchorRect, getAnchorRect: getAnchorRect,
role: "dialog", role: "dialog",
"aria-label": Object(external_this_wp_i18n_["__"])('Gutenberg tips'), "aria-label": Object(external_this_wp_i18n_["__"])('Editor tips'),
onClick: onClick onClick: onClick
}, Object(external_this_wp_element_["createElement"])("p", null, children), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], { }, Object(external_this_wp_element_["createElement"])("p", null, children), Object(external_this_wp_element_["createElement"])("p", null, Object(external_this_wp_element_["createElement"])(external_this_wp_components_["Button"], {
isLink: true, isLink: true,
@ -917,6 +906,17 @@ function DotTip(_ref) {
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }), /***/ }),
/***/ 35: /***/ 35:

File diff suppressed because one or more lines are too long

View File

@ -157,7 +157,7 @@ function _arrayWithoutHoles(arr) {
} }
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32); var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() { function _nonIterableSpread() {
@ -699,6 +699,10 @@ function isEmptyLine(_ref2) {
/** /**
* Parse the given HTML into a body element. * Parse the given HTML into a body element.
* *
* Note: The current implementation will return a shared reference, reset on
* each call to `createElement`. Therefore, you should not hold a reference to
* the value to operate upon asynchronously, as it may have unexpected results.
*
* @param {HTMLDocument} document The HTML document to use to parse. * @param {HTMLDocument} document The HTML document to use to parse.
* @param {string} html The HTML to parse. * @param {string} html The HTML to parse.
* *
@ -707,11 +711,16 @@ function isEmptyLine(_ref2) {
function createElement(_ref, html) { function createElement(_ref, html) {
var implementation = _ref.implementation; var implementation = _ref.implementation;
var _implementation$creat = implementation.createHTMLDocument(''), // Because `createHTMLDocument` is an expensive operation, and with this
body = _implementation$creat.body; // function being internal to `rich-text` (full control in avoiding a risk
// of asynchronous operations on the shared reference), a single document
// is reused and reset for each call to the function.
if (!createElement.body) {
createElement.body = implementation.createHTMLDocument('').body;
}
body.innerHTML = html; createElement.body.innerHTML = html;
return body; return createElement.body;
} }
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/create.js // CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/create.js
@ -1017,12 +1026,12 @@ function createFromElement(_ref3) {
return accumulator; return accumulator;
} }
var length = element.childNodes.length; // Remove any line breaks in text nodes. They are not content, but used to var length = element.childNodes.length;
// format the HTML. Line breaks in HTML are stored as BR elements.
// See https://www.w3.org/TR/html5/syntax.html#newlines.
var filterStringComplete = function filterStringComplete(string) { var filterStringComplete = function filterStringComplete(string) {
string = string.replace(/[\r\n]/g, ''); // Reduce any whitespace used for HTML formatting to one space
// character, because it will also be displayed as such by the browser.
string = string.replace(/[\n\r\t]+/g, ' ');
if (filterString) { if (filterString) {
string = filterString(string); string = filterString(string);
@ -2268,6 +2277,7 @@ function toTree(_ref2) {
* Internal dependencies * Internal dependencies
*/ */
/** /**
* Browser dependencies * Browser dependencies
*/ */
@ -2324,13 +2334,21 @@ function getNodeByPath(node, path) {
offset: path[0] offset: path[0]
}; };
} }
/**
* Returns a new instance of a DOM tree upon which RichText operations can be
* applied.
*
* Note: The current implementation will return a shared reference, reset on
* each call to `createEmpty`. Therefore, you should not hold a reference to
* the value to operate upon asynchronously, as it may have unexpected results.
*
* @return {WPRichTextTree} RichText tree.
*/
function to_dom_createEmpty() {
var _document$implementat = document.implementation.createHTMLDocument(''),
body = _document$implementat.body;
return body; var to_dom_createEmpty = function createEmpty() {
} return createElement(document, '');
};
function to_dom_append(element, child) { function to_dom_append(element, child) {
if (typeof child === 'string') { if (typeof child === 'string') {
@ -2503,17 +2521,17 @@ function apply(_ref7) {
} }
function applyValue(future, current) { function applyValue(future, current) {
var i = 0; var i = 0;
var futureChild;
while (future.firstChild) { while (futureChild = future.firstChild) {
var currentChild = current.childNodes[i]; var currentChild = current.childNodes[i];
var futureNodeType = future.firstChild.nodeType;
if (!currentChild) { if (!currentChild) {
current.appendChild(future.firstChild); current.appendChild(futureChild);
} else if (futureNodeType !== currentChild.nodeType || futureNodeType !== to_dom_TEXT_NODE || future.firstChild.nodeValue !== currentChild.nodeValue) { } else if (!currentChild.isEqualNode(futureChild)) {
current.replaceChild(future.firstChild, currentChild); current.replaceChild(futureChild, currentChild);
} else { } else {
future.removeChild(future.firstChild); future.removeChild(futureChild);
} }
i++; i++;
@ -2523,6 +2541,21 @@ function applyValue(future, current) {
current.removeChild(current.childNodes[i]); current.removeChild(current.childNodes[i]);
} }
} }
/**
* Returns true if two ranges are equal, or false otherwise. Ranges are
* considered equal if their start and end occur in the same container and
* offset.
*
* @param {Range} a First range object to test.
* @param {Range} b First range object to test.
*
* @return {boolean} Whether the two ranges are equal.
*/
function isRangeEqual(a, b) {
return a.startContainer === b.startContainer && a.startOffset === b.startOffset && a.endContainer === b.endContainer && a.endOffset === b.endOffset;
}
function applySelection(selection, current) { function applySelection(selection, current) {
var _getNodeByPath = getNodeByPath(current, selection.startPath), var _getNodeByPath = getNodeByPath(current, selection.startPath),
startContainer = _getNodeByPath.node, startContainer = _getNodeByPath.node,
@ -2549,12 +2582,21 @@ function applySelection(selection, current) {
range.setEnd(endContainer, endOffset); range.setEnd(endContainer, endOffset);
} }
if (windowSelection.rangeCount > 0) {
// If the to be added range and the live range are the same, there's no
// need to remove the live range and add the equivalent range.
if (isRangeEqual(range, windowSelection.getRangeAt(0))) {
return;
}
windowSelection.removeAllRanges(); windowSelection.removeAllRanges();
}
windowSelection.addRange(range); windowSelection.addRange(range);
} }
// EXTERNAL MODULE: external {"this":["wp","escapeHtml"]} // EXTERNAL MODULE: external {"this":["wp","escapeHtml"]}
var external_this_wp_escapeHtml_ = __webpack_require__(60); var external_this_wp_escapeHtml_ = __webpack_require__(61);
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/to-html-string.js // CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/to-html-string.js
/** /**
@ -3074,7 +3116,7 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }), /***/ }),
/***/ 32: /***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -3210,7 +3252,7 @@ module.exports = function memize( fn, options ) {
/***/ }), /***/ }),
/***/ 60: /***/ 61:
/***/ (function(module, exports) { /***/ (function(module, exports) {
(function() { module.exports = this["wp"]["escapeHtml"]; }()); (function() { module.exports = this["wp"]["escapeHtml"]; }());

File diff suppressed because one or more lines are too long

View File

@ -87,39 +87,6 @@ this["wp"] = this["wp"] || {}; this["wp"]["viewport"] =
/************************************************************************/ /************************************************************************/
/******/ ({ /******/ ({
/***/ 19:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
arr2[i] = arr[i];
}
return arr2;
}
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__(32);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toConsumableArray; });
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}
/***/ }),
/***/ 2: /***/ 2:
/***/ (function(module, exports) { /***/ (function(module, exports) {
@ -186,16 +153,7 @@ function setIsMatching(values) {
}; };
} }
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(19);
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/selectors.js // CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/selectors.js
/**
* External dependencies
*/
/** /**
* Returns true if the viewport matches the given query, or false otherwise. * Returns true if the viewport matches the given query, or false otherwise.
* *
@ -212,12 +170,13 @@ var toConsumableArray = __webpack_require__(19);
* *
* @return {boolean} Whether viewport matches query. * @return {boolean} Whether viewport matches query.
*/ */
function isViewportMatch(state, query) { function isViewportMatch(state, query) {
// Pad to _at least_ two elements to take from the right, effectively // Default to `>=` if no operator is present.
// defaulting the left-most value. if (query.indexOf(' ') === -1) {
var key = Object(external_lodash_["takeRight"])(['>='].concat(Object(toConsumableArray["a" /* default */])(query.split(' '))), 2).join(' '); query = '>= ' + query;
return !!state[key]; }
return !!state[query];
} }
// CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/index.js // CONCATENATED MODULE: ./node_modules/@wordpress/viewport/build-module/store/index.js
@ -387,17 +346,6 @@ window.addEventListener('orientationchange', build_module_setIsMatching); // Set
build_module_setIsMatching(); build_module_setIsMatching();
/***/ }),
/***/ 32:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
}
/***/ }), /***/ }),
/***/ 5: /***/ 5:

View File

@ -1 +1 @@
this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=317)}({19:function(t,e,r){"use strict";var n=r(32);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||Object(n.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}r.d(e,"a",function(){return o})},2:function(t,e){!function(){t.exports=this.lodash}()},317:function(t,e,r){"use strict";r.r(e);var n={};r.r(n),r.d(n,"setIsMatching",function(){return a});var o={};r.r(o),r.d(o,"isViewportMatch",function(){return s});var i=r(2),c=r(5);var u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}var f=r(19);function s(t,e){return!!t[Object(i.takeRight)([">="].concat(Object(f.a)(e.split(" "))),2).join(" ")]}Object(c.registerStore)("core/viewport",{reducer:u,actions:n,selectors:o});var p=r(7),d=function(t){return Object(p.createHigherOrderComponent)(Object(c.withSelect)(function(e){return Object(i.mapValues)(t,function(t){return e("core/viewport").isViewportMatch(t)})}),"withViewportMatch")},l=function(t){return Object(p.createHigherOrderComponent)(Object(p.compose)([d({isViewportMatch:t}),Object(p.ifCondition)(function(t){return t.isViewportMatch})]),"ifViewportMatches")};r.d(e,"ifViewportMatches",function(){return l}),r.d(e,"withViewportMatch",function(){return d});var h={"<":"max-width",">=":"min-width"},b=Object(i.debounce)(function(){var t=Object(i.mapValues)(w,function(t){return t.matches});Object(c.dispatch)("core/viewport").setIsMatching(t)},{leading:!0}),w=Object(i.reduce)({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},function(t,e,r){return Object(i.forEach)(h,function(n,o){var i=window.matchMedia("(".concat(n,": ").concat(e,"px)"));i.addListener(b);var c=[o,r].join(" ");t[c]=i}),t},{});window.addEventListener("orientationchange",b),b()},32:function(t,e,r){"use strict";function n(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}r.d(e,"a",function(){return n})},5:function(t,e){!function(){t.exports=this.wp.data}()},7:function(t,e){!function(){t.exports=this.wp.compose}()}}); this.wp=this.wp||{},this.wp.viewport=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=317)}({2:function(t,e){!function(){t.exports=this.lodash}()},317:function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"setIsMatching",function(){return a});var i={};n.r(i),n.d(i,"isViewportMatch",function(){return f});var o=n(2),c=n(5);var u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"SET_IS_MATCHING":return e.values}return t};function a(t){return{type:"SET_IS_MATCHING",values:t}}function f(t,e){return-1===e.indexOf(" ")&&(e=">= "+e),!!t[e]}Object(c.registerStore)("core/viewport",{reducer:u,actions:r,selectors:i});var s=n(7),p=function(t){return Object(s.createHigherOrderComponent)(Object(c.withSelect)(function(e){return Object(o.mapValues)(t,function(t){return e("core/viewport").isViewportMatch(t)})}),"withViewportMatch")},d=function(t){return Object(s.createHigherOrderComponent)(Object(s.compose)([p({isViewportMatch:t}),Object(s.ifCondition)(function(t){return t.isViewportMatch})]),"ifViewportMatches")};n.d(e,"ifViewportMatches",function(){return d}),n.d(e,"withViewportMatch",function(){return p});var l={"<":"max-width",">=":"min-width"},h=Object(o.debounce)(function(){var t=Object(o.mapValues)(w,function(t){return t.matches});Object(c.dispatch)("core/viewport").setIsMatching(t)},{leading:!0}),w=Object(o.reduce)({huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},function(t,e,n){return Object(o.forEach)(l,function(r,i){var o=window.matchMedia("(".concat(r,": ").concat(e,"px)"));o.addListener(h);var c=[i,n].join(" ");t[c]=o}),t},{});window.addEventListener("orientationchange",h),h()},5:function(t,e){!function(){t.exports=this.wp.data}()},7:function(t,e){!function(){t.exports=this.wp.compose}()}});

View File

@ -225,42 +225,42 @@ function wp_default_packages_scripts( &$scripts ) {
$suffix = wp_scripts_get_suffix(); $suffix = wp_scripts_get_suffix();
$packages_versions = array( $packages_versions = array(
'api-fetch' => '2.2.5', 'api-fetch' => '2.2.6',
'a11y' => '2.0.2', 'a11y' => '2.0.2',
'annotations' => '1.0.3', 'annotations' => '1.0.4',
'autop' => '2.0.2', 'autop' => '2.0.2',
'blob' => '2.1.0', 'blob' => '2.1.0',
'block-library' => '2.2.9', 'block-library' => '2.2.10',
'block-serialization-default-parser' => '2.0.1', 'block-serialization-default-parser' => '2.0.2',
'blocks' => '6.0.3', 'blocks' => '6.0.4',
'components' => '7.0.3', 'components' => '7.0.4',
'compose' => '3.0.0', 'compose' => '3.0.0',
'core-data' => '2.0.14', 'core-data' => '2.0.15',
'data' => '4.0.1', 'data' => '4.1.0',
'date' => '3.0.0', 'date' => '3.0.1',
'deprecated' => '2.0.3', 'deprecated' => '2.0.3',
'dom' => '2.0.7', 'dom' => '2.0.7',
'dom-ready' => '2.0.2', 'dom-ready' => '2.0.2',
'edit-post' => '3.1.4', 'edit-post' => '3.1.5',
'editor' => '9.0.4', 'editor' => '9.0.5',
'element' => '2.1.8', 'element' => '2.1.8',
'escape-html' => '1.0.1', 'escape-html' => '1.0.1',
'format-library' => '1.2.7', 'format-library' => '1.2.8',
'hooks' => '2.0.3', 'hooks' => '2.0.3',
'html-entities' => '2.0.3', 'html-entities' => '2.0.4',
'i18n' => '3.1.0', 'i18n' => '3.1.0',
'is-shallow-equal' => '1.1.4', 'is-shallow-equal' => '1.1.4',
'keycodes' => '2.0.5', 'keycodes' => '2.0.5',
'list-reusable-blocks' => '1.1.16', 'list-reusable-blocks' => '1.1.17',
'notices' => '1.1.0', 'notices' => '1.1.1',
'nux' => '3.0.4', 'nux' => '3.0.5',
'plugins' => '2.0.9', 'plugins' => '2.0.9',
'redux-routine' => '3.0.3', 'redux-routine' => '3.0.3',
'rich-text' => '3.0.2', 'rich-text' => '3.0.3',
'shortcode' => '2.0.2', 'shortcode' => '2.0.2',
'token-list' => '1.1.0', 'token-list' => '1.1.0',
'url' => '2.3.1', 'url' => '2.3.2',
'viewport' => '2.0.12', 'viewport' => '2.0.13',
'wordcount' => '2.0.3', 'wordcount' => '2.0.3',
); );
@ -1990,6 +1990,7 @@ function wp_default_styles( &$styles ) {
array( array(
'wp-components', 'wp-components',
'wp-editor', 'wp-editor',
'wp-block-library',
// Always include visual styles so the editor never appears broken. // Always include visual styles so the editor never appears broken.
'wp-block-library-theme', 'wp-block-library-theme',
) )

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.1-alpha-44295'; $wp_version = '5.1-alpha-44296';
/** /**
* 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.