@wordpress/editor 12.0.15-next.33ec3857e2.0 → 12.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/editor-help/index.native.js +1 -1
- package/build/components/editor-help/index.native.js.map +1 -1
- package/build/components/entities-saved-states/index.js +1 -7
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +10 -6
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-trash/index.js +1 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +1 -1
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/store/selectors.js +4 -2
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/editor-help/index.native.js +1 -1
- package/build-module/components/editor-help/index.native.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +1 -6
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +10 -6
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-trash/index.js +1 -1
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +1 -1
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/store/selectors.js +4 -2
- package/build-module/store/selectors.js.map +1 -1
- package/package.json +30 -30
- package/src/components/editor-help/index.native.js +1 -1
- package/src/components/entities-saved-states/index.js +1 -7
- package/src/components/post-publish-button/index.js +12 -3
- package/src/components/post-trash/index.js +1 -1
- package/src/components/provider/use-block-editor-settings.js +0 -1
- package/src/store/selectors.js +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/editor",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.18",
|
|
4
4
|
"description": "Enhanced block editor for WordPress posts.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -31,34 +31,34 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.16.0",
|
|
34
|
-
"@wordpress/a11y": "^3.2.
|
|
35
|
-
"@wordpress/api-fetch": "^5.2.
|
|
36
|
-
"@wordpress/autop": "^3.2.
|
|
37
|
-
"@wordpress/blob": "^3.2.
|
|
38
|
-
"@wordpress/block-editor": "^8.0.
|
|
39
|
-
"@wordpress/blocks": "^11.1.5
|
|
40
|
-
"@wordpress/components": "^19.2.
|
|
41
|
-
"@wordpress/compose": "^5.0.7
|
|
42
|
-
"@wordpress/core-data": "^4.0.
|
|
43
|
-
"@wordpress/data": "^6.1.
|
|
44
|
-
"@wordpress/data-controls": "^2.2.8
|
|
45
|
-
"@wordpress/date": "^4.2.
|
|
46
|
-
"@wordpress/deprecated": "^3.2.
|
|
47
|
-
"@wordpress/element": "^4.0.
|
|
48
|
-
"@wordpress/hooks": "^3.2.
|
|
49
|
-
"@wordpress/html-entities": "^3.2.
|
|
50
|
-
"@wordpress/i18n": "^4.2.
|
|
51
|
-
"@wordpress/icons": "^6.1.
|
|
52
|
-
"@wordpress/is-shallow-equal": "^4.2.
|
|
53
|
-
"@wordpress/keyboard-shortcuts": "^3.0.7
|
|
54
|
-
"@wordpress/keycodes": "^3.2.
|
|
55
|
-
"@wordpress/media-utils": "^3.0.
|
|
56
|
-
"@wordpress/notices": "^3.2.8
|
|
57
|
-
"@wordpress/reusable-blocks": "^3.0.
|
|
58
|
-
"@wordpress/rich-text": "^5.0.
|
|
59
|
-
"@wordpress/server-side-render": "^3.0.
|
|
60
|
-
"@wordpress/url": "^3.3.
|
|
61
|
-
"@wordpress/wordcount": "^3.2.
|
|
34
|
+
"@wordpress/a11y": "^3.2.4",
|
|
35
|
+
"@wordpress/api-fetch": "^5.2.6",
|
|
36
|
+
"@wordpress/autop": "^3.2.3",
|
|
37
|
+
"@wordpress/blob": "^3.2.2",
|
|
38
|
+
"@wordpress/block-editor": "^8.0.15",
|
|
39
|
+
"@wordpress/blocks": "^11.1.5",
|
|
40
|
+
"@wordpress/components": "^19.2.2",
|
|
41
|
+
"@wordpress/compose": "^5.0.7",
|
|
42
|
+
"@wordpress/core-data": "^4.0.9",
|
|
43
|
+
"@wordpress/data": "^6.1.5",
|
|
44
|
+
"@wordpress/data-controls": "^2.2.8",
|
|
45
|
+
"@wordpress/date": "^4.2.3",
|
|
46
|
+
"@wordpress/deprecated": "^3.2.3",
|
|
47
|
+
"@wordpress/element": "^4.0.4",
|
|
48
|
+
"@wordpress/hooks": "^3.2.2",
|
|
49
|
+
"@wordpress/html-entities": "^3.2.3",
|
|
50
|
+
"@wordpress/i18n": "^4.2.4",
|
|
51
|
+
"@wordpress/icons": "^6.1.1",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.2.1",
|
|
53
|
+
"@wordpress/keyboard-shortcuts": "^3.0.7",
|
|
54
|
+
"@wordpress/keycodes": "^3.2.4",
|
|
55
|
+
"@wordpress/media-utils": "^3.0.5",
|
|
56
|
+
"@wordpress/notices": "^3.2.8",
|
|
57
|
+
"@wordpress/reusable-blocks": "^3.0.21",
|
|
58
|
+
"@wordpress/rich-text": "^5.0.8",
|
|
59
|
+
"@wordpress/server-side-render": "^3.0.19",
|
|
60
|
+
"@wordpress/url": "^3.3.1",
|
|
61
|
+
"@wordpress/wordcount": "^3.2.3",
|
|
62
62
|
"classnames": "^2.3.1",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"memize": "^1.1.0",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "8c2cd6a5fd8781266da858a2e7d1bdd9a3a279e4"
|
|
72
72
|
}
|
|
@@ -11,7 +11,6 @@ import { __ } from '@wordpress/i18n';
|
|
|
11
11
|
import { useSelect, useDispatch } from '@wordpress/data';
|
|
12
12
|
import { useState, useCallback, useRef } from '@wordpress/element';
|
|
13
13
|
import { store as coreStore } from '@wordpress/core-data';
|
|
14
|
-
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
15
14
|
import { __experimentalUseDialog as useDialog } from '@wordpress/compose';
|
|
16
15
|
import { close as closeIcon } from '@wordpress/icons';
|
|
17
16
|
import { store as noticesStore } from '@wordpress/notices';
|
|
@@ -25,6 +24,7 @@ const TRANSLATED_SITE_PROPERTIES = {
|
|
|
25
24
|
title: __( 'Title' ),
|
|
26
25
|
description: __( 'Tagline' ),
|
|
27
26
|
site_logo: __( 'Logo' ),
|
|
27
|
+
site_icon: __( 'Icon' ),
|
|
28
28
|
show_on_front: __( 'Show on front' ),
|
|
29
29
|
page_on_front: __( 'Page on front' ),
|
|
30
30
|
};
|
|
@@ -77,10 +77,6 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
77
77
|
__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,
|
|
78
78
|
} = useDispatch( coreStore );
|
|
79
79
|
|
|
80
|
-
const { __unstableMarkLastChangeAsPersistent } = useDispatch(
|
|
81
|
-
blockEditorStore
|
|
82
|
-
);
|
|
83
|
-
|
|
84
80
|
const { createSuccessNotice, createErrorNotice } = useDispatch(
|
|
85
81
|
noticesStore
|
|
86
82
|
);
|
|
@@ -175,8 +171,6 @@ export default function EntitiesSavedStates( { close } ) {
|
|
|
175
171
|
);
|
|
176
172
|
}
|
|
177
173
|
|
|
178
|
-
__unstableMarkLastChangeAsPersistent();
|
|
179
|
-
|
|
180
174
|
Promise.all( pendingSavedRecords )
|
|
181
175
|
.then( ( values ) => {
|
|
182
176
|
if (
|
|
@@ -41,19 +41,28 @@ export class PostPublishButton extends Component {
|
|
|
41
41
|
|
|
42
42
|
createOnClick( callback ) {
|
|
43
43
|
return ( ...args ) => {
|
|
44
|
-
const {
|
|
45
|
-
|
|
44
|
+
const {
|
|
45
|
+
hasNonPostEntityChanges,
|
|
46
|
+
setEntitiesSavedStatesCallback,
|
|
47
|
+
} = this.props;
|
|
48
|
+
// If a post with non-post entities is published, but the user
|
|
49
|
+
// elects to not save changes to the non-post entities, those
|
|
50
|
+
// entities will still be dirty when the Publish button is clicked.
|
|
51
|
+
// We also need to check that the `setEntitiesSavedStatesCallback`
|
|
52
|
+
// prop was passed. See https://github.com/WordPress/gutenberg/pull/37383
|
|
53
|
+
if ( hasNonPostEntityChanges && setEntitiesSavedStatesCallback ) {
|
|
46
54
|
// The modal for multiple entity saving will open,
|
|
47
55
|
// hold the callback for saving/publishing the post
|
|
48
56
|
// so that we can call it if the post entity is checked.
|
|
49
57
|
this.setState( {
|
|
50
58
|
entitiesSavedStatesCallback: () => callback( ...args ),
|
|
51
59
|
} );
|
|
60
|
+
|
|
52
61
|
// Open the save panel by setting its callback.
|
|
53
62
|
// To set a function on the useState hook, we must set it
|
|
54
63
|
// with another function (() => myFunction). Passing the
|
|
55
64
|
// function on its own will cause an error when called.
|
|
56
|
-
|
|
65
|
+
setEntitiesSavedStatesCallback(
|
|
57
66
|
() => this.closeEntitiesSavedStates
|
|
58
67
|
);
|
|
59
68
|
return noop;
|
|
@@ -127,7 +127,6 @@ function useBlockEditorSettings( settings, hasTemplate ) {
|
|
|
127
127
|
'titlePlaceholder',
|
|
128
128
|
'supportsLayout',
|
|
129
129
|
'widgetTypesToHideFromLegacyWidgetBlock',
|
|
130
|
-
'__unstableResolvedAssets',
|
|
131
130
|
] ),
|
|
132
131
|
mediaUpload: hasUploadPermissions ? mediaUpload : undefined,
|
|
133
132
|
__experimentalReusableBlocks: reusableBlocks,
|
package/src/store/selectors.js
CHANGED
|
@@ -1166,7 +1166,8 @@ export function getEditorBlocks( state ) {
|
|
|
1166
1166
|
*/
|
|
1167
1167
|
export function getEditorSelectionStart( state ) {
|
|
1168
1168
|
deprecated( "select('core/editor').getEditorSelectionStart", {
|
|
1169
|
-
since: '
|
|
1169
|
+
since: '10.0',
|
|
1170
|
+
plugin: 'Gutenberg',
|
|
1170
1171
|
alternative: "select('core/editor').getEditorSelection",
|
|
1171
1172
|
} );
|
|
1172
1173
|
return getEditedPostAttribute( state, 'selection' )?.selectionStart;
|
|
@@ -1182,7 +1183,8 @@ export function getEditorSelectionStart( state ) {
|
|
|
1182
1183
|
*/
|
|
1183
1184
|
export function getEditorSelectionEnd( state ) {
|
|
1184
1185
|
deprecated( "select('core/editor').getEditorSelectionStart", {
|
|
1185
|
-
since: '
|
|
1186
|
+
since: '10.0',
|
|
1187
|
+
plugin: 'Gutenberg',
|
|
1186
1188
|
alternative: "select('core/editor').getEditorSelection",
|
|
1187
1189
|
} );
|
|
1188
1190
|
return getEditedPostAttribute( state, 'selection' )?.selectionEnd;
|