@wordpress/editor 13.2.0 → 13.3.0
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/CHANGELOG.md +2 -0
- package/build/components/error-boundary/index.js +24 -30
- package/build/components/error-boundary/index.js.map +1 -1
- package/build/components/media-categories/index.js +237 -0
- package/build/components/media-categories/index.js.map +1 -0
- package/build/components/page-attributes/parent.js +1 -1
- package/build/components/page-attributes/parent.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +1 -0
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/post-slug/index.js +1 -0
- package/build/components/post-slug/index.js.map +1 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +7 -3
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build/components/post-template/index.js +7 -4
- package/build/components/post-template/index.js.map +1 -1
- package/build/components/post-url/index.js +1 -0
- package/build/components/post-url/index.js.map +1 -1
- package/build/components/provider/index.js +26 -8
- package/build/components/provider/index.js.map +1 -1
- package/build/components/provider/index.native.js +21 -14
- package/build/components/provider/index.native.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.js +7 -4
- package/build/components/provider/use-block-editor-settings.js.map +1 -1
- package/build/components/provider/use-block-editor-settings.native.js +1 -2
- package/build/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build/components/table-of-contents/index.js +3 -1
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/unsaved-changes-warning/index.js +1 -1
- package/build/components/unsaved-changes-warning/index.js.map +1 -1
- package/build/experiments.js +20 -0
- package/build/experiments.js.map +1 -0
- package/build/hooks/default-autocompleters.js +2 -7
- package/build/hooks/default-autocompleters.js.map +1 -1
- package/build/index.js +14 -0
- package/build/index.js.map +1 -1
- package/build/index.native.js +14 -0
- package/build/index.native.js.map +1 -1
- package/build/lockUnlock.js +19 -0
- package/build/lockUnlock.js.map +1 -0
- package/build/store/defaults.js +1 -2
- package/build/store/defaults.js.map +1 -1
- package/build/store/selectors.js +1 -1
- package/build/store/selectors.js.map +1 -1
- package/build/utils/terms.js +9 -5
- package/build/utils/terms.js.map +1 -1
- package/build-module/components/error-boundary/index.js +24 -30
- package/build-module/components/error-boundary/index.js.map +1 -1
- package/build-module/components/media-categories/index.js +225 -0
- package/build-module/components/media-categories/index.js.map +1 -0
- package/build-module/components/page-attributes/parent.js +2 -2
- package/build-module/components/page-attributes/parent.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +1 -0
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/post-slug/index.js +1 -0
- package/build-module/components/post-slug/index.js.map +1 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +8 -5
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
- package/build-module/components/post-template/index.js +8 -5
- package/build-module/components/post-template/index.js.map +1 -1
- package/build-module/components/post-url/index.js +1 -0
- package/build-module/components/post-url/index.js.map +1 -1
- package/build-module/components/provider/index.js +21 -9
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/provider/index.native.js +20 -12
- package/build-module/components/provider/index.native.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.js +5 -5
- package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
- package/build-module/components/provider/use-block-editor-settings.native.js +1 -2
- package/build-module/components/provider/use-block-editor-settings.native.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +3 -1
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/unsaved-changes-warning/index.js +1 -1
- package/build-module/components/unsaved-changes-warning/index.js.map +1 -1
- package/build-module/experiments.js +10 -0
- package/build-module/experiments.js.map +1 -0
- package/build-module/hooks/default-autocompleters.js +2 -6
- package/build-module/hooks/default-autocompleters.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -0
- package/build-module/index.native.js.map +1 -1
- package/build-module/lockUnlock.js +9 -0
- package/build-module/lockUnlock.js.map +1 -0
- package/build-module/store/defaults.js +1 -2
- package/build-module/store/defaults.js.map +1 -1
- package/build-module/store/selectors.js +1 -1
- package/build-module/store/selectors.js.map +1 -1
- package/build-module/utils/terms.js +9 -6
- package/build-module/utils/terms.js.map +1 -1
- package/build-style/style-rtl.css +0 -3
- package/build-style/style.css +0 -3
- package/package.json +30 -29
- package/src/components/autosave-monitor/test/index.js +8 -2
- package/src/components/editor-help/test/index.native.js +5 -5
- package/src/components/error-boundary/index.js +24 -37
- package/src/components/media-categories/index.js +247 -0
- package/src/components/page-attributes/parent.js +2 -2
- package/src/components/page-attributes/test/order.js +4 -14
- package/src/components/post-preview-button/test/index.js +5 -17
- package/src/components/post-publish-button/test/index.js +5 -17
- package/src/components/post-publish-panel/postpublish.js +1 -0
- package/src/components/post-publish-panel/style.scss +1 -5
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +2 -18
- package/src/components/post-saved-state/test/index.js +1 -5
- package/src/components/post-slug/index.js +1 -0
- package/src/components/post-taxonomies/hierarchical-term-selector.js +23 -17
- package/src/components/post-template/index.js +3 -4
- package/src/components/post-url/index.js +1 -0
- package/src/components/provider/index.js +120 -91
- package/src/components/provider/index.native.js +26 -17
- package/src/components/provider/use-block-editor-settings.js +60 -49
- package/src/components/provider/use-block-editor-settings.native.js +1 -2
- package/src/components/table-of-contents/index.js +3 -1
- package/src/components/unsaved-changes-warning/index.js +1 -1
- package/src/experiments.js +10 -0
- package/src/hooks/default-autocompleters.js +1 -6
- package/src/index.js +1 -0
- package/src/index.native.js +1 -0
- package/src/lockUnlock.js +9 -0
- package/src/store/defaults.js +0 -1
- package/src/store/selectors.js +1 -1
- package/src/utils/terms.js +8 -5
package/src/store/defaults.js
CHANGED
package/src/store/selectors.js
CHANGED
|
@@ -785,7 +785,7 @@ export function isPreviewingPost( state ) {
|
|
|
785
785
|
*
|
|
786
786
|
* @param {Object} state Global application state.
|
|
787
787
|
*
|
|
788
|
-
* @return {string
|
|
788
|
+
* @return {string | undefined} Preview Link.
|
|
789
789
|
*/
|
|
790
790
|
export function getEditedPostPreviewLink( state ) {
|
|
791
791
|
if ( state.saving.pending || isSavingPost( state ) ) {
|
package/src/utils/terms.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { groupBy
|
|
4
|
+
import { groupBy } from 'lodash';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { decodeEntities } from '@wordpress/html-entities';
|
|
5
10
|
|
|
6
11
|
/**
|
|
7
12
|
* Returns terms in a tree form.
|
|
@@ -39,14 +44,12 @@ export function buildTermsTree( flatTerms ) {
|
|
|
39
44
|
return fillWithChildren( termsByParent[ '0' ] || [] );
|
|
40
45
|
}
|
|
41
46
|
|
|
42
|
-
// Lodash unescape function handles ' but not ' which may be return in some API requests.
|
|
43
47
|
export const unescapeString = ( arg ) => {
|
|
44
|
-
return
|
|
48
|
+
return decodeEntities( arg );
|
|
45
49
|
};
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* Returns a term object with name unescaped.
|
|
49
|
-
* The unescape of the name property is done using lodash unescape function.
|
|
50
53
|
*
|
|
51
54
|
* @param {Object} term The term object to unescape.
|
|
52
55
|
*
|
|
@@ -68,5 +71,5 @@ export const unescapeTerm = ( term ) => {
|
|
|
68
71
|
* @return {Object[]} Array of term objects unescaped.
|
|
69
72
|
*/
|
|
70
73
|
export const unescapeTerms = ( terms ) => {
|
|
71
|
-
return
|
|
74
|
+
return ( terms ?? [] ).map( unescapeTerm );
|
|
72
75
|
};
|