Block Editor: Upgrade @wordpress packages to the latest version (4.7).

Updated packages:

 - @wordpress/annotations@1.0.4
 - @wordpress/api-fetch@2.2.6
 - @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 too.

Props atimmer, gziolo, joen.
Fixes #45442, #45637.

Built from https://develop.svn.wordpress.org/branches/5.0@44183


git-svn-id: http://core.svn.wordpress.org/branches/5.0@44013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
youknowriad 2018-12-15 10:59:46 +00:00
parent 83a466d844
commit 6137ee183b
52 changed files with 1933 additions and 1062 deletions

View File

@ -22,6 +22,10 @@ function render_block_core_block( $attributes ) {
return '';
}
if ( 'publish' !== $reusable_block->post_status || ! empty( $reusable_block->post_password ) ) {
return '';
}
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'>
/* <![CDATA[ */
(function() {
( function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {

View File

@ -5,34 +5,32 @@
* @package WordPress
*/
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @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.
*/
function gutenberg_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @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.
*/
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no 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.
*/
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.
$comments = get_comments(
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
// `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(
/* 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', '' ),
),
),
'render_callback' => 'gutenberg_render_block_core_latest_comments',
'render_callback' => 'render_block_core_latest_comments',
)
);

View File

@ -0,0 +1,184 @@
<?php
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package WordPress
*/
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @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.
*/
function gutenberg_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
}
}
/**
* Renders the `core/latest-comments` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest comments added.
*/
function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
'widget_comments_args',
array(
'number' => $attributes['commentsToShow'],
'status' => 'approve',
'post_status' => 'publish',
)
)
);
$list_items_markup = '';
if ( ! empty( $comments ) ) {
// Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget().
$post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
_prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
foreach ( $comments as $comment ) {
$list_items_markup .= '<li class="wp-block-latest-comments__comment">';
if ( $attributes['displayAvatar'] ) {
$avatar = get_avatar(
$comment,
48,
'',
'',
array(
'class' => 'wp-block-latest-comments__comment-avatar',
)
);
if ( $avatar ) {
$list_items_markup .= $avatar;
}
}
$list_items_markup .= '<article>';
$list_items_markup .= '<footer class="wp-block-latest-comments__comment-meta">';
$author_url = get_comment_author_url( $comment );
if ( empty( $author_url ) && ! empty( $comment->user_id ) ) {
$author_url = get_author_posts_url( $comment->user_id );
}
$author_markup = '';
if ( $author_url ) {
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
} else {
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
}
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `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>';
$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 */
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
if ( $attributes['displayDate'] ) {
$list_items_markup .= sprintf(
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
esc_attr( get_comment_date( 'c', $comment ) ),
date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
);
}
$list_items_markup .= '</footer>';
if ( $attributes['displayExcerpt'] ) {
$list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>';
}
$list_items_markup .= '</article></li>';
}
}
$class = 'wp-block-latest-comments';
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( $attributes['displayAvatar'] ) {
$class .= ' has-avatars';
}
if ( $attributes['displayDate'] ) {
$class .= ' has-dates';
}
if ( $attributes['displayExcerpt'] ) {
$class .= ' has-excerpts';
}
if ( empty( $comments ) ) {
$class .= ' no-comments';
}
$classnames = esc_attr( $class );
$block_content = ! empty( $comments ) ? sprintf(
'<ol class="%1$s">%2$s</ol>',
$classnames,
$list_items_markup
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.' )
);
return $block_content;
}
register_block_type(
'core/latest-comments',
array(
'attributes' => array(
'className' => array(
'type' => 'string',
),
'commentsToShow' => array(
'type' => 'number',
'default' => 5,
'minimum' => 1,
'maximum' => 100,
),
'displayAvatar' => array(
'type' => 'boolean',
'default' => true,
),
'displayDate' => array(
'type' => 'boolean',
'default' => true,
),
'displayExcerpt' => array(
'type' => 'boolean',
'default' => true,
),
'align' => array(
'type' => 'string',
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'gutenberg_render_block_core_latest_comments',
)
);

View File

@ -0,0 +1,184 @@
<?php
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package WordPress
*/
if ( ! function_exists( 'wp_latest_comments_draft_or_post_title' ) ) {
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @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.
*/
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
}
}
/**
* Renders the `core/latest-comments` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest comments added.
*/
function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
'widget_comments_args',
array(
'number' => $attributes['commentsToShow'],
'status' => 'approve',
'post_status' => 'publish',
)
)
);
$list_items_markup = '';
if ( ! empty( $comments ) ) {
// Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget().
$post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
_prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
foreach ( $comments as $comment ) {
$list_items_markup .= '<li class="wp-block-latest-comments__comment">';
if ( $attributes['displayAvatar'] ) {
$avatar = get_avatar(
$comment,
48,
'',
'',
array(
'class' => 'wp-block-latest-comments__comment-avatar',
)
);
if ( $avatar ) {
$list_items_markup .= $avatar;
}
}
$list_items_markup .= '<article>';
$list_items_markup .= '<footer class="wp-block-latest-comments__comment-meta">';
$author_url = get_comment_author_url( $comment );
if ( empty( $author_url ) && ! empty( $comment->user_id ) ) {
$author_url = get_author_posts_url( $comment->user_id );
}
$author_markup = '';
if ( $author_url ) {
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
} else {
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
}
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$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(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
if ( $attributes['displayDate'] ) {
$list_items_markup .= sprintf(
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
esc_attr( get_comment_date( 'c', $comment ) ),
date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
);
}
$list_items_markup .= '</footer>';
if ( $attributes['displayExcerpt'] ) {
$list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>';
}
$list_items_markup .= '</article></li>';
}
}
$class = 'wp-block-latest-comments';
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( $attributes['displayAvatar'] ) {
$class .= ' has-avatars';
}
if ( $attributes['displayDate'] ) {
$class .= ' has-dates';
}
if ( $attributes['displayExcerpt'] ) {
$class .= ' has-excerpts';
}
if ( empty( $comments ) ) {
$class .= ' no-comments';
}
$classnames = esc_attr( $class );
$block_content = ! empty( $comments ) ? sprintf(
'<ol class="%1$s">%2$s</ol>',
$classnames,
$list_items_markup
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.' )
);
return $block_content;
}
register_block_type(
'core/latest-comments',
array(
'attributes' => array(
'className' => array(
'type' => 'string',
),
'commentsToShow' => array(
'type' => 'number',
'default' => 5,
'minimum' => 1,
'maximum' => 100,
),
'displayAvatar' => array(
'type' => 'boolean',
'default' => true,
),
'displayDate' => array(
'type' => 'boolean',
'default' => true,
),
'displayExcerpt' => array(
'type' => 'boolean',
'default' => true,
),
'align' => array(
'type' => 'string',
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'render_block_core_latest_comments',
)
);

View File

@ -0,0 +1,182 @@
<?php
/**
* Server-side rendering of the `core/latest-comments` block.
*
* @package WordPress
*/
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @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.
*/
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
}
/**
* Renders the `core/latest-comments` block on server.
*
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest comments added.
*/
function render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
'widget_comments_args',
array(
'number' => $attributes['commentsToShow'],
'status' => 'approve',
'post_status' => 'publish',
)
)
);
$list_items_markup = '';
if ( ! empty( $comments ) ) {
// Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget().
$post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) );
_prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false );
foreach ( $comments as $comment ) {
$list_items_markup .= '<li class="wp-block-latest-comments__comment">';
if ( $attributes['displayAvatar'] ) {
$avatar = get_avatar(
$comment,
48,
'',
'',
array(
'class' => 'wp-block-latest-comments__comment-avatar',
)
);
if ( $avatar ) {
$list_items_markup .= $avatar;
}
}
$list_items_markup .= '<article>';
$list_items_markup .= '<footer class="wp-block-latest-comments__comment-meta">';
$author_url = get_comment_author_url( $comment );
if ( empty( $author_url ) && ! empty( $comment->user_id ) ) {
$author_url = get_author_posts_url( $comment->user_id );
}
$author_markup = '';
if ( $author_url ) {
$author_markup .= '<a class="wp-block-latest-comments__comment-author" href="' . esc_url( $author_url ) . '">' . get_comment_author( $comment ) . '</a>';
} else {
$author_markup .= '<span class="wp-block-latest-comments__comment-author">' . get_comment_author( $comment ) . '</span>';
}
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$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(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
__( '%1$s on %2$s' ),
$author_markup,
$post_title
);
if ( $attributes['displayDate'] ) {
$list_items_markup .= sprintf(
'<time datetime="%1$s" class="wp-block-latest-comments__comment-date">%2$s</time>',
esc_attr( get_comment_date( 'c', $comment ) ),
date_i18n( get_option( 'date_format' ), get_comment_date( 'U', $comment ) )
);
}
$list_items_markup .= '</footer>';
if ( $attributes['displayExcerpt'] ) {
$list_items_markup .= '<div class="wp-block-latest-comments__comment-excerpt">' . wpautop( get_comment_excerpt( $comment ) ) . '</div>';
}
$list_items_markup .= '</article></li>';
}
}
$class = 'wp-block-latest-comments';
if ( isset( $attributes['align'] ) ) {
$class .= " align{$attributes['align']}";
}
if ( $attributes['displayAvatar'] ) {
$class .= ' has-avatars';
}
if ( $attributes['displayDate'] ) {
$class .= ' has-dates';
}
if ( $attributes['displayExcerpt'] ) {
$class .= ' has-excerpts';
}
if ( empty( $comments ) ) {
$class .= ' no-comments';
}
$classnames = esc_attr( $class );
$block_content = ! empty( $comments ) ? sprintf(
'<ol class="%1$s">%2$s</ol>',
$classnames,
$list_items_markup
) : sprintf(
'<div class="%1$s">%2$s</div>',
$classnames,
__( 'No comments to show.' )
);
return $block_content;
}
register_block_type(
'core/latest-comments',
array(
'attributes' => array(
'className' => array(
'type' => 'string',
),
'commentsToShow' => array(
'type' => 'number',
'default' => 5,
'minimum' => 1,
'maximum' => 100,
),
'displayAvatar' => array(
'type' => 'boolean',
'default' => true,
),
'displayDate' => array(
'type' => 'boolean',
'default' => true,
),
'displayExcerpt' => array(
'type' => 'boolean',
'default' => true,
),
'align' => array(
'type' => 'string',
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'render_block_core_latest_comments',
)
);

View File

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

File diff suppressed because one or more lines are too long

View File

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

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;
left: 20px;
z-index: 5; }
.edit-post-meta-boxes-area .is-hidden {
display: none; }
.edit-post-meta-boxes-area__clear {
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;
right: 20px;
z-index: 5; }
.edit-post-meta-boxes-area .is-hidden {
display: none; }
.edit-post-meta-boxes-area__clear {
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 {
margin: 0;
position: relative;
line-height: 1.8; }
line-height: 1.8;
white-space: pre-wrap; }
.editor-rich-text__tinymce > p:empty {
min-height: 28.8px; }
.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 {
margin: 0;
position: relative;
line-height: 1.8; }
line-height: 1.8;
white-space: pre-wrap; }
.editor-rich-text__tinymce > p:empty {
min-height: 28.8px; }
.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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -718,7 +718,7 @@ function __experimentalGetAnnotations(state) {
}
// 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);
// CONCATENATED MODULE: ./node_modules/@wordpress/annotations/build-module/store/actions.js
@ -1097,7 +1097,7 @@ var block_addAnnotationClassName = function addAnnotationClassName(OriginalCompo
return {
className: annotations.map(function (annotation) {
return 'is-annotated-by-' + annotation.source;
})
}).join(' ')
};
})(OriginalComponent);
};
@ -1115,7 +1115,7 @@ Object(external_this_wp_hooks_["addFilter"])('editor.BlockListBlock', 'core/anno
/***/ }),
/***/ 32:
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -1251,7 +1251,7 @@ module.exports = function memize( fn, options ) {
/***/ }),
/***/ 56:
/***/ 57:
/***/ (function(module, exports, __webpack_require__) {
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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -1989,7 +1989,7 @@ var paragraph_settings = {
};
// 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
var slicedToArray = __webpack_require__(25);
@ -2458,7 +2458,7 @@ var DEFAULT_EMBED_BLOCK = 'core/embed';
var WORDPRESS_EMBED_BLOCK = 'core-embed/wordpress';
// 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);
// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/embed/util.js
@ -2628,6 +2628,22 @@ function getClassNames(html) {
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
@ -3221,7 +3237,7 @@ function (_Component) {
onChange: this.updateAlignment
}), toolbarEditButton);
if (isEditing) {
if (isEditing || !url) {
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"], {
icon: "format-image",
@ -7573,7 +7589,9 @@ var embed_placeholder_EmbedPlaceholder = function EmbedPlaceholder(props) {
value = props.value,
onSubmit = props.onSubmit,
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"], {
icon: Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["BlockIcon"], {
icon: icon,
@ -7595,7 +7613,13 @@ var embed_placeholder_EmbedPlaceholder = function EmbedPlaceholder(props) {
type: "submit"
}, Object(external_this_wp_i18n_["_x"])('Embed', 'button label')), cannotEmbed && Object(external_this_wp_element_["createElement"])("p", {
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);
@ -7839,10 +7863,11 @@ function getEmbedEditComponent(title, icon) {
value: function componentDidUpdate(prevProps) {
var hasPreview = undefined !== this.props.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;
if (hasPreview && !hadPreview || switchedPreview || switchedURL) {
if (switchedPreview || switchedURL) {
if (this.props.cannotEmbed) {
// Can't embed this URL, and we've just received or switched the preview.
return;
@ -7958,7 +7983,8 @@ function getEmbedEditComponent(title, icon) {
className = _this$props2.className,
preview = _this$props2.preview,
cannotEmbed = _this$props2.cannotEmbed,
themeSupportsResponsive = _this$props2.themeSupportsResponsive;
themeSupportsResponsive = _this$props2.themeSupportsResponsive,
tryAgain = _this$props2.tryAgain;
if (fetching) {
return Object(external_this_wp_element_["createElement"])(embed_loading, null);
@ -7978,7 +8004,11 @@ function getEmbedEditComponent(title, icon) {
return _this2.setState({
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'],
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),
save: function save(_ref2) {
var _classnames;
@ -9062,7 +9103,7 @@ function (_Component) {
var edit_ALLOWED_BLOCKS = ['core/button', 'core/paragraph', 'core/heading', 'core/list'];
var TEMPLATE = [['core/paragraph', {
fontSize: 'large',
placeholder: 'Content…'
placeholder: Object(external_this_wp_i18n_["_x"])('Content…', 'content placeholder')
}]];
var edit_MediaTextEdit =
@ -11517,7 +11558,7 @@ var separator_settings = {
};
// 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
@ -13370,6 +13411,8 @@ var video_settings = {
var classic_edit_window = window,
wp = classic_edit_window.wp;
function isTmceEmpty(editor) {
// When tinyMce is empty the content seems to be:
@ -13465,6 +13508,7 @@ function (_Component) {
content = _this$props2.attributes.content,
setAttributes = _this$props2.setAttributes;
var ref = this.ref;
var bookmark;
this.editor = editor;
if (content) {
@ -13474,11 +13518,20 @@ function (_Component) {
}
editor.on('blur', function () {
bookmark = editor.selection.getBookmark(2, true);
setAttributes({
content: editor.getContent()
});
editor.once('focus', function () {
if (bookmark) {
editor.selection.moveToBookmark(bookmark);
}
});
return false;
});
editor.on('mousedown touchstart', function () {
bookmark = null;
});
editor.on('keydown', function (event) {
if ((event.keyCode === external_this_wp_keycodes_["BACKSPACE"] || event.keyCode === external_this_wp_keycodes_["DELETE"]) && isTmceEmpty(editor)) {
// delete the block
@ -13765,6 +13818,13 @@ var build_module_registerCoreBlocks = function registerCoreBlocks() {
/***/ }),
/***/ 32:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -13775,13 +13835,6 @@ function _iterableToArray(iter) {
/***/ }),
/***/ 33:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 35:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -13984,14 +14037,21 @@ module.exports = g;
/***/ }),
/***/ 57:
/***/ 58:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["autop"]; }());
/***/ }),
/***/ 59:
/***/ 6:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["editor"]; }());
/***/ }),
/***/ 60:
/***/ (function(module, exports, __webpack_require__) {
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:

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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
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, "setUnregisteredFallbackBlockName", function() { return setUnregisteredFallbackBlockName; });
__webpack_require__.d(actions_namespaceObject, "setCategories", function() { return setCategories; });
__webpack_require__.d(actions_namespaceObject, "updateCategory", function() { return updateCategory; });
// EXTERNAL MODULE: external {"this":["wp","data"]}
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 action = arguments.length > 1 ? arguments[1] : undefined;
if (action.type === 'SET_CATEGORIES') {
return action.categories || [];
switch (action.type) {
case 'SET_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;
@ -5916,6 +5937,22 @@ function setCategories(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
/**
@ -5936,7 +5973,7 @@ Object(external_this_wp_data_["registerStore"])('core/blocks', {
});
// 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);
// 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
/**
* External dependencies
*/
@ -5963,7 +5999,6 @@ var external_this_wp_element_ = __webpack_require__(0);
*/
/**
* Internal dependencies
*/
@ -5993,12 +6028,18 @@ function isUnmodifiedDefaultBlock(block) {
if (block.name !== defaultBlockName) {
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 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))));
return Object(external_lodash_["every"])(attributeKeys, function (key) {
return Object(external_lodash_["isEqual"])(newDefaultBlock.attributes[key], block.attributes[key]);
var newDefaultBlock = isUnmodifiedDefaultBlock.block;
var blockType = registration_getBlockType(defaultBlockName);
return Object(external_lodash_["every"])(blockType.attributes, function (value, key) {
return newDefaultBlock.attributes[key] === block.attributes[key];
});
}
/**
@ -6972,7 +7013,7 @@ function query(selector, matchers) {
};
}
// 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"]}
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);
// 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
var nonIterableRest = __webpack_require__(36);
@ -9379,7 +9420,8 @@ var utils_window$Node = window.Node,
function getBlockContentSchema(transforms) {
var schemas = transforms.map(function (_ref) {
var blockName = _ref.blockName,
var isMatch = _ref.isMatch,
blockName = _ref.blockName,
schema = _ref.schema;
// If the block supports the "anchor" functionality, it needs to keep its ID attribute.
@ -9391,19 +9433,48 @@ function getBlockContentSchema(transforms) {
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 external_lodash_["mergeWith"].apply(void 0, [{}].concat(Object(toConsumableArray["a" /* default */])(schemas), [function (objValue, srcValue, key) {
if (key === 'children') {
if (objValue === '*' || srcValue === '*') {
return '*';
}
switch (key) {
case 'children':
{
if (objValue === '*' || srcValue === '*') {
return '*';
}
return Object(objectSpread["a" /* default */])({}, objValue, srcValue);
} else if (key === 'attributes' || key === 'require') {
return Object(toConsumableArray["a" /* default */])(objValue || []).concat(Object(toConsumableArray["a" /* default */])(srcValue || []));
return Object(objectSpread["a" /* default */])({}, objValue, srcValue);
}
case 'attributes':
case 'require':
{
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) {
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) {
var _schema$tag = schema[tag],
_schema$tag$attribute = _schema$tag.attributes,
@ -10042,7 +10114,7 @@ function shallowTextContent(element) {
});
// 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
@ -10638,6 +10710,16 @@ function categories_getCategories() {
function categories_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
@ -10792,6 +10874,7 @@ function synchronizeBlocksWithTemplate() {
/* 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 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 unregisterBlockType */__webpack_require__.d(__webpack_exports__, "unregisterBlockType", function() { return unregisterBlockType; });
/* concated harmony reexport setFreeformContentHandlerName */__webpack_require__.d(__webpack_exports__, "setFreeformContentHandlerName", function() { return setFreeformContentHandlerName; });
@ -11118,6 +11201,13 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }),
/***/ 32:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -11128,13 +11218,6 @@ function _iterableToArray(iter) {
/***/ }),
/***/ 33:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["blob"]; }());
/***/ }),
/***/ 35:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
@ -12379,7 +12462,7 @@ else {}
/***/ }),
/***/ 56:
/***/ 57:
/***/ (function(module, exports, __webpack_require__) {
var rng = __webpack_require__(77);
@ -12415,7 +12498,7 @@ module.exports = v4;
/***/ }),
/***/ 57:
/***/ 58:
/***/ (function(module, exports) {
(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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -566,7 +566,8 @@ if (false) { var throwOnDirectAccess, isValidElement, REACT_ELEMENT_TYPE; } else
/***/ }),
/* 31 */,
/* 32 */
/* 32 */,
/* 33 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -576,7 +577,6 @@ function _iterableToArray(iter) {
}
/***/ }),
/* 33 */,
/* 34 */
/***/ (function(module, exports, __webpack_require__) {
@ -2423,7 +2423,8 @@ module.exports = g;
/* 52 */,
/* 53 */,
/* 54 */,
/* 55 */
/* 55 */,
/* 56 */
/***/ (function(module, exports, __webpack_require__) {
var moment = __webpack_require__(27);
@ -2469,7 +2470,7 @@ module.exports = {
/***/ }),
/* 56 */
/* 57 */
/***/ (function(module, exports, __webpack_require__) {
var rng = __webpack_require__(77);
@ -2504,8 +2505,8 @@ module.exports = v4;
/***/ }),
/* 57 */,
/* 58 */
/* 58 */,
/* 59 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@ -2514,7 +2515,6 @@ module.exports = v4;
module.exports = __webpack_require__(118);
/***/ }),
/* 59 */,
/* 60 */,
/* 61 */,
/* 62 */,
@ -3553,7 +3553,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -7601,7 +7601,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -8050,7 +8050,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -8678,7 +8678,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -9057,7 +9057,7 @@ var _moment = __webpack_require__(27);
var _moment2 = _interopRequireDefault(_moment);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -10690,7 +10690,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -12298,7 +12298,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -13334,7 +13334,7 @@ var _propTypes = __webpack_require__(29);
var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -18736,7 +18736,7 @@ var _reactAddonsShallowCompare = __webpack_require__(69);
var _reactAddonsShallowCompare2 = _interopRequireDefault(_reactAddonsShallowCompare);
var _reactMomentProptypes = __webpack_require__(55);
var _reactMomentProptypes = __webpack_require__(56);
var _reactMomentProptypes2 = _interopRequireDefault(_reactMomentProptypes);
@ -23877,6 +23877,13 @@ function (_Component) {
/* 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
@ -23902,6 +23909,7 @@ OR if you're looking to change now SVGs get output, you'll need to edit strings
var dashicon_Dashicon =
/*#__PURE__*/
function (_Component) {
@ -23916,14 +23924,13 @@ function (_Component) {
Object(createClass["a" /* default */])(Dashicon, [{
key: "shouldComponentUpdate",
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",
value: function render() {
var _this$props = this.props,
icon = _this$props.icon,
className = _this$props.className,
_this$props$size = _this$props.size,
size = _this$props$size === void 0 ? 20 : _this$props$size;
var path;
@ -25082,7 +25089,7 @@ function (_Component) {
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, {
"aria-hidden": true,
role: "img",
@ -25156,6 +25163,7 @@ function (_Component) {
labelPosition = _this$props.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 tooltipText = tooltip || label; // Should show the tooltip if...
@ -25170,7 +25178,8 @@ function (_Component) {
}, additionalProps, {
className: classes
}), Object(external_lodash_["isString"])(icon) ? Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, {
icon: icon
icon: icon,
ariaPressed: ariaPressed
}) : icon, children);
if (showTooltip) {
@ -30958,7 +30967,6 @@ function RangeControl(_ref) {
*/
/**
* Internal dependencies
*/
@ -30995,6 +31003,9 @@ function FontSizePicker(_ref) {
var currentFont = fontSizes.find(function (font) {
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, {
label: Object(external_this_wp_i18n_["__"])('Font Size')
}, Object(external_this_wp_element_["createElement"])("div", {
@ -31011,22 +31022,26 @@ function FontSizePicker(_ref) {
isLarge: true,
onClick: onToggle,
"aria-expanded": isOpen,
"aria-label": Object(external_this_wp_i18n_["__"])('Custom font size')
}, currentFont && currentFont.name || !value && Object(external_this_wp_i18n_["_x"])('Normal', 'font size name') || Object(external_this_wp_i18n_["_x"])('Custom', 'font size name'));
"aria-label": Object(external_this_wp_i18n_["sprintf"])(
/* translators: %s: font size name */
Object(external_this_wp_i18n_["__"])('Font size: %s'), currentFontSizeName)
}, currentFontSizeName);
},
renderContent: function renderContent() {
return Object(external_this_wp_element_["createElement"])(menu, null, Object(external_lodash_["map"])(fontSizes, function (_ref3) {
var name = _ref3.name,
size = _ref3.size,
slug = _ref3.slug;
var isSelected = value === size || !value && slug === 'normal';
return Object(external_this_wp_element_["createElement"])(build_module_button, {
key: slug,
onClick: function onClick() {
return onChange(slug === 'normal' ? undefined : size);
},
className: 'is-font-' + slug,
role: "menuitem"
}, (value === size || !value && slug === 'normal') && Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, {
className: "is-font-".concat(slug),
role: "menuitemradio",
"aria-checked": isSelected
}, isSelected && Object(external_this_wp_element_["createElement"])(dashicon_Dashicon, {
icon: "saved"
}), Object(external_this_wp_element_["createElement"])("span", {
className: "components-font-size-picker__dropdown-text-size",
@ -31050,8 +31065,7 @@ function FontSizePicker(_ref) {
return onChange(undefined);
},
isSmall: true,
isDefault: true,
"aria-label": Object(external_this_wp_i18n_["__"])('Reset font size')
isDefault: true
}, Object(external_this_wp_i18n_["__"])('Reset'))), withSlider && Object(external_this_wp_element_["createElement"])(range_control, {
className: "components-font-size-picker__custom-input",
label: Object(external_this_wp_i18n_["__"])('Custom Size'),
@ -31065,7 +31079,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
@ -31384,7 +31398,7 @@ function (_Component) {
/* harmony default export */ var token_input = (token_input_TokenInput);
// 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);
// CONCATENATED MODULE: ./node_modules/@wordpress/components/build-module/form-token-field/suggestions-list.js
@ -35491,7 +35505,7 @@ function withFilters(hookName) {
}
// 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);
// 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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -636,7 +636,7 @@ var getQueriedItems = Object(rememo["a" /* default */])(function (state) {
});
// EXTERNAL MODULE: ./node_modules/redux/es/redux.js
var redux = __webpack_require__(61);
var redux = __webpack_require__(62);
// EXTERNAL MODULE: external {"this":["wp","apiFetch"]}
var external_this_wp_apiFetch_ = __webpack_require__(30);
@ -2309,7 +2309,7 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }),
/***/ 32:
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -2376,7 +2376,7 @@ module.exports = g;
/***/ }),
/***/ 61:
/***/ 62:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -483,7 +483,7 @@ var external_lodash_ = __webpack_require__(2);
var asyncToGenerator = __webpack_require__(38);
// 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
var is_promise = __webpack_require__(86);
@ -1724,7 +1724,7 @@ var with_select_withSelect = function withSelect(mapSelectToProps) {
*/
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 =
@ -1922,7 +1922,7 @@ var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
}
// 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",
@ -1935,11 +1935,16 @@ var with_dispatch_withDispatch = function withDispatch(mapDispatchToProps) {
// called, it is done only to determine the keys for which
// proxy functions should be created. The actual registry
// 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) {
// 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
// creating new function references every render.
if (_this2.proxyProps.hasOwnProperty(propName)) {
return _this2.proxyProps[propName];
}
@ -2021,7 +2026,7 @@ var build_module_use = default_registry.use;
/***/ }),
/***/ 32:
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -2131,7 +2136,7 @@ module.exports = g;
/***/ }),
/***/ 61:
/***/ 62:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
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);
}
/***/ }),
/***/ 323:
/***/ (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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
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, "isPublishSidebarOpened", function() { return selectors_isPublishSidebarOpened; });
__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, "isModalActive", function() { return selectors_isModalActive; });
__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.
*
@ -644,7 +646,7 @@ var getGalleryDetailsMediaFrame = function getGalleryDetailsMediaFrame() {
filterable: 'uploaded',
multiple: 'add',
editable: false,
library: wp.media.query(_.defaults({
library: wp.media.query(Object(external_lodash_["defaults"])({
type: 'image'
}, this.options.library))
}), new wp.media.controller.GalleryEdit({
@ -705,7 +707,7 @@ function (_Component) {
if (gallery) {
var currentState = value ? 'gallery-edit' : 'gallery';
var GalleryDetailsMediaFrame = getGalleryDetailsMediaFrame();
var GalleryDetailsMediaFrame = media_upload_getGalleryDetailsMediaFrame();
var attachments = getAttachmentsCollection(value);
var selection = new wp.media.model.Selection(attachments.models, {
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.
*/
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
// 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.
var blocks = select('core/editor').getBlocks();
var firstOfSameType = Object(external_lodash_["find"])(blocks, function (_ref) {
var name = _ref.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"]}
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
@ -1780,7 +1782,7 @@ function isEditorPanelRemoved(state, panelName) {
* @return {boolean} Whether or not the panel is enabled.
*/
function isEditorPanelEnabled(state, panelName) {
function selectors_isEditorPanelEnabled(state, panelName) {
var panels = getPreference(state, 'panels');
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) {
return isMetaBoxLocationActive(state, location) && Object(external_lodash_["some"])(getMetaBoxesPerLocation(state, location), function (_ref) {
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) {
// Saves the wp_editor fields
if (window.tinyMCE) {
window.tinyMCE.triggerSave();
}
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.
@ -2229,6 +2236,20 @@ store_store.dispatch({
});
/* 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
var classnames = __webpack_require__(16);
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) {
return {
hasActiveMetaboxes: select('core/edit-post').hasMetaBoxes(),
hasBlockSelection: !!select('core/editor').getBlockSelectionStart(),
isEditorSidebarOpened: select('core/edit-post').isEditorSidebarOpened(),
isPublishSidebarOpened: select('core/edit-post').isPublishSidebarOpened(),
isSaving: select('core/edit-post').isSavingMetaBoxes()
};
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch, _ref2) {
var hasBlockSelection = _ref2.hasBlockSelection;
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch, ownProps, _ref2) {
var select = _ref2.select;
var _select = select('core/editor'),
getBlockSelectionStart = _select.getBlockSelectionStart;
var _dispatch = dispatch('core/edit-post'),
_openGeneralSidebar = _dispatch.openGeneralSidebar,
closeGeneralSidebar = _dispatch.closeGeneralSidebar;
var sidebarToOpen = hasBlockSelection ? 'edit-post/block' : 'edit-post/document';
return {
openGeneralSidebar: function openGeneralSidebar() {
return _openGeneralSidebar(sidebarToOpen);
return _openGeneralSidebar(getBlockSelectionStart() ? 'edit-post/block' : 'edit-post/document');
},
closeGeneralSidebar: closeGeneralSidebar,
hasBlockSelection: undefined
closeGeneralSidebar: closeGeneralSidebar
};
}))(Header));
@ -3869,7 +3890,10 @@ function OptionsModal(_ref) {
label: Object(external_this_wp_i18n_["__"])('Enable Tips')
})), Object(external_this_wp_element_["createElement"])(section, {
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) {
return Object(external_this_wp_element_["createElement"])(enable_panel, {
label: Object(external_lodash_["get"])(taxonomy, ['labels', 'menu_name']),
@ -4055,8 +4079,14 @@ function (_Component) {
isVisible = _this$props.isVisible;
var element = document.getElementById(id);
if (element) {
element.style.display = isVisible ? '' : 'none';
if (!element) {
return;
}
if (isVisible) {
element.classList.remove('is-hidden');
} else {
element.classList.add('is-hidden');
}
}
}, {
@ -4840,6 +4870,7 @@ function PostLink(_ref) {
getEditedPostAttribute = _select.getEditedPostAttribute;
var _select2 = select('core/edit-post'),
isEditorPanelEnabled = _select2.isEditorPanelEnabled,
isEditorPanelOpened = _select2.isEditorPanelOpened;
var _select3 = select('core'),
@ -4858,16 +4889,18 @@ function PostLink(_ref) {
isPublished: isCurrentPostPublished(),
isOpened: isEditorPanelOpened(post_link_PANEL_NAME),
permalinkParts: getPermalinkParts(),
isEnabled: isEditorPanelEnabled(post_link_PANEL_NAME),
isViewable: Object(external_lodash_["get"])(postType, ['viewable'], false),
postTitle: getEditedPostAttribute('title'),
postSlug: getEditedPostAttribute('slug'),
postID: id
};
}), Object(external_this_wp_compose_["ifCondition"])(function (_ref2) {
var isNew = _ref2.isNew,
var isEnabled = _ref2.isEnabled,
isNew = _ref2.isNew,
postLink = _ref2.postLink,
isViewable = _ref2.isViewable;
return !isNew && postLink && isViewable;
return isEnabled && !isNew && postLink && isViewable;
}), Object(external_this_wp_data_["withDispatch"])(function (dispatch) {
var _dispatch = dispatch('core/edit-post'),
toggleEditorPanelOpened = _dispatch.toggleEditorPanelOpened;
@ -5326,12 +5359,14 @@ function Layout(_ref) {
/**
* Internal dependencies
*/
function Editor(_ref) {
var settings = _ref.settings,
hasFixedToolbar = _ref.hasFixedToolbar,
@ -5356,7 +5391,9 @@ function Editor(_ref) {
initialEdits: initialEdits
}, props), Object(external_this_wp_element_["createElement"])(external_this_wp_editor_["ErrorBoundary"], {
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) {
@ -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);
// 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
@ -5541,7 +5618,6 @@ function PluginSidebar(props) {
/**
* Internal dependencies
*/
@ -5553,14 +5629,12 @@ var plugin_sidebar_more_menu_item_PluginSidebarMoreMenuItem = function PluginSid
icon = _ref.icon,
isSelected = _ref.isSelected,
onClick = _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"], {
icon: isSelected ? 'yes' : icon,
isSelected: isSelected,
role: "menuitemcheckbox",
onClick: Object(external_this_wp_compose_["compose"])(onClick, fillProps.onClose)
}, children);
});
return Object(external_this_wp_element_["createElement"])(plugin_more_menu_item, {
icon: isSelected ? 'yes' : icon,
isSelected: isSelected,
role: "menuitemcheckbox",
onClick: onClick
}, 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) {
@ -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__, "initializeEditor", function() { return initializeEditor; });
/* 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 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; });
@ -5685,6 +5760,7 @@ function initializeEditor(id, postType, postId, settings, initialEdits) {
/***/ }),
/***/ 31:
@ -5969,7 +6045,7 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }),
/***/ 32:
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -6037,6 +6113,13 @@ function _nonIterableRest() {
/***/ }),
/***/ 54:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["plugins"]; }());
/***/ }),
/***/ 6:
/***/ (function(module, exports) {
@ -6044,13 +6127,6 @@ function _nonIterableRest() {
/***/ }),
/***/ 62:
/***/ (function(module, exports) {
(function() { module.exports = this["wp"]["plugins"]; }());
/***/ }),
/***/ 7:
/***/ (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);
// 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
@ -970,7 +970,7 @@ function renderStyle(style) {
/***/ }),
/***/ 60:
/***/ 61:
/***/ (function(module, exports) {
(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) {
// 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.rel = 'noreferrer noopener';
format.attributes['aria-label'] = label;
@ -1009,10 +1009,11 @@ function (_Component) {
}); // Apply now if URL is not being edited.
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({
url: url,
opensInNewWindow: opensInNewWindow,
text: value.text
text: selectedText
})));
}
}
@ -1036,10 +1037,11 @@ function (_Component) {
inputValue = _this$state.inputValue,
opensInNewWindow = _this$state.opensInNewWindow;
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({
url: url,
opensInNewWindow: opensInNewWindow,
text: value.text
text: selectedText
});
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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
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);
}
/***/ }),
/***/ 325:
/***/ (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=325)}({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})},325: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=325)}({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}()},325: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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
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);
}
/***/ }),
/***/ 320:
@ -867,7 +856,7 @@ function DotTip(_ref) {
focusOnMount: "container",
getAnchorRect: getAnchorRect,
role: "dialog",
"aria-label": Object(external_this_wp_i18n_["__"])('Gutenberg tips'),
"aria-label": Object(external_this_wp_i18n_["__"])('Editor tips'),
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"], {
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:

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
var iterableToArray = __webpack_require__(32);
var iterableToArray = __webpack_require__(33);
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
@ -699,6 +699,10 @@ function isEmptyLine(_ref2) {
/**
* 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 {string} html The HTML to parse.
*
@ -707,11 +711,16 @@ function isEmptyLine(_ref2) {
function createElement(_ref, html) {
var implementation = _ref.implementation;
var _implementation$creat = implementation.createHTMLDocument(''),
body = _implementation$creat.body;
// Because `createHTMLDocument` is an expensive operation, and with this
// 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;
return body;
createElement.body.innerHTML = html;
return createElement.body;
}
// CONCATENATED MODULE: ./node_modules/@wordpress/rich-text/build-module/create.js
@ -1017,12 +1026,12 @@ function createFromElement(_ref3) {
return accumulator;
}
var length = element.childNodes.length; // Remove any line breaks in text nodes. They are not content, but used to
// format the HTML. Line breaks in HTML are stored as BR elements.
// See https://www.w3.org/TR/html5/syntax.html#newlines.
var length = element.childNodes.length;
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) {
string = filterString(string);
@ -2268,6 +2277,7 @@ function toTree(_ref2) {
* Internal dependencies
*/
/**
* Browser dependencies
*/
@ -2324,13 +2334,21 @@ function getNodeByPath(node, path) {
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) {
if (typeof child === 'string') {
@ -2503,17 +2521,17 @@ function apply(_ref7) {
}
function applyValue(future, current) {
var i = 0;
var futureChild;
while (future.firstChild) {
while (futureChild = future.firstChild) {
var currentChild = current.childNodes[i];
var futureNodeType = future.firstChild.nodeType;
if (!currentChild) {
current.appendChild(future.firstChild);
} else if (futureNodeType !== currentChild.nodeType || futureNodeType !== to_dom_TEXT_NODE || future.firstChild.nodeValue !== currentChild.nodeValue) {
current.replaceChild(future.firstChild, currentChild);
current.appendChild(futureChild);
} else if (!currentChild.isEqualNode(futureChild)) {
current.replaceChild(futureChild, currentChild);
} else {
future.removeChild(future.firstChild);
future.removeChild(futureChild);
}
i++;
@ -2523,6 +2541,21 @@ function applyValue(future, current) {
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) {
var _getNodeByPath = getNodeByPath(current, selection.startPath),
startContainer = _getNodeByPath.node,
@ -2549,12 +2582,21 @@ function applySelection(selection, current) {
range.setEnd(endContainer, endOffset);
}
windowSelection.removeAllRanges();
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.addRange(range);
}
// 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
/**
@ -3074,7 +3116,7 @@ function isShallowEqual( a, b, fromIndex ) {
/***/ }),
/***/ 32:
/***/ 33:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@ -3210,7 +3252,7 @@ module.exports = function memize( fn, options ) {
/***/ }),
/***/ 60:
/***/ 61:
/***/ (function(module, exports) {
(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:
/***/ (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
/**
* External dependencies
*/
/**
* 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.
*/
function isViewportMatch(state, query) {
// Pad to _at least_ two elements to take from the right, effectively
// defaulting the left-most value.
var key = Object(external_lodash_["takeRight"])(['>='].concat(Object(toConsumableArray["a" /* default */])(query.split(' '))), 2).join(' ');
return !!state[key];
// Default to `>=` if no operator is present.
if (query.indexOf(' ') === -1) {
query = '>= ' + query;
}
return !!state[query];
}
// 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();
/***/ }),
/***/ 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:

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0.2-alpha-44105';
$wp_version = '5.0.2-alpha-44183';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.