@wordpress/editor 14.0.0 → 14.1.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/README.md +164 -20
- package/build/components/block-settings-menu/content-only-settings-menu.js +14 -5
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build/components/document-tools/index.js +12 -3
- package/build/components/document-tools/index.js.map +1 -1
- package/build/components/editor/index.js +77 -0
- package/build/components/editor/index.js.map +1 -0
- package/build/components/editor-interface/index.js +6 -8
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +9 -0
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build/components/entities-saved-states/index.js +28 -0
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/global-styles-provider/index.js +9 -2
- package/build/components/global-styles-provider/index.js.map +1 -1
- package/build/components/header/back-button.js +4 -1
- package/build/components/header/back-button.js.map +1 -1
- package/build/components/header/index.js +1 -5
- package/build/components/header/index.js.map +1 -1
- package/build/components/index.js +7 -0
- package/build/components/index.js.map +1 -1
- package/build/components/media-categories/index.js +1 -1
- package/build/components/media-categories/index.js.map +1 -1
- package/build/components/post-actions/actions.js +10 -4
- package/build/components/post-actions/actions.js.map +1 -1
- package/build/components/post-last-revision/index.js +35 -9
- package/build/components/post-last-revision/index.js.map +1 -1
- package/build/components/post-preview-button/index.js +1 -0
- package/build/components/post-preview-button/index.js.map +1 -1
- package/build/components/post-publish-button/index.js +4 -0
- package/build/components/post-publish-button/index.js.map +1 -1
- package/build/components/post-publish-button/label.js +5 -0
- package/build/components/post-publish-button/label.js.map +1 -1
- package/build/components/post-publish-panel/index.js +5 -0
- package/build/components/post-publish-panel/index.js.map +1 -1
- package/build/components/post-sticky/check.js +8 -0
- package/build/components/post-sticky/check.js.map +1 -1
- package/build/components/post-sticky/index.js +5 -1
- package/build/components/post-sticky/index.js.map +1 -1
- package/build/components/post-switch-to-draft-button/index.js +11 -2
- package/build/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build/components/post-sync-status/index.js +6 -2
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-taxonomies/check.js +8 -0
- package/build/components/post-taxonomies/check.js.map +1 -1
- package/build/components/post-taxonomies/flat-term-selector.js +14 -2
- package/build/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build/components/post-taxonomies/index.js +9 -0
- package/build/components/post-taxonomies/index.js.map +1 -1
- package/build/components/post-taxonomies/panel.js +10 -0
- package/build/components/post-taxonomies/panel.js.map +1 -1
- package/build/components/post-title/index.js +4 -8
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +3 -7
- package/build/components/post-title/post-title-raw.js.map +1 -1
- package/build/components/post-trash/check.js +8 -0
- package/build/components/post-trash/check.js.map +1 -1
- package/build/components/post-trash/index.js +6 -1
- package/build/components/post-trash/index.js.map +1 -1
- package/build/components/post-url/panel.js +25 -3
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/post-visibility/index.js +1 -0
- package/build/components/post-visibility/index.js.map +1 -1
- package/build/components/provider/disable-non-page-content-blocks.js +5 -3
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build/components/provider/index.js +18 -15
- package/build/components/provider/index.js.map +1 -1
- package/build/components/sidebar/post-summary.js +3 -2
- package/build/components/sidebar/post-summary.js.map +1 -1
- package/build/components/table-of-contents/index.js +11 -0
- package/build/components/table-of-contents/index.js.map +1 -1
- package/build/components/template-part-menu-items/convert-to-regular.js +38 -0
- package/build/components/template-part-menu-items/convert-to-regular.js.map +1 -0
- package/build/components/template-part-menu-items/convert-to-template-part.js +77 -0
- package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -0
- package/build/components/template-part-menu-items/index.js +67 -0
- package/build/components/template-part-menu-items/index.js.map +1 -0
- package/build/components/template-part-menu-items/index.native.js +10 -0
- package/build/components/template-part-menu-items/index.native.js.map +1 -0
- package/build/components/template-validation-notice/index.js +1 -0
- package/build/components/template-validation-notice/index.js.map +1 -1
- package/build/components/theme-support-check/index.js +9 -0
- package/build/components/theme-support-check/index.js.map +1 -1
- package/build/components/time-to-read/index.js +6 -0
- package/build/components/time-to-read/index.js.map +1 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +1 -0
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build/components/word-count/index.js +5 -1
- package/build/components/word-count/index.js.map +1 -1
- package/build/dataviews/api.js +61 -0
- package/build/dataviews/api.js.map +1 -0
- package/build/dataviews/store/private-actions.js +28 -0
- package/build/dataviews/store/private-actions.js.map +1 -0
- package/build/dataviews/store/private-selectors.js +20 -0
- package/build/dataviews/store/private-selectors.js.map +1 -0
- package/build/dataviews/store/reducer.js +36 -0
- package/build/dataviews/store/reducer.js.map +1 -0
- package/build/hooks/pattern-overrides.js +2 -1
- package/build/hooks/pattern-overrides.js.map +1 -1
- package/build/index.js +12 -0
- package/build/index.js.map +1 -1
- package/build/private-apis.js +2 -6
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js +0 -2
- package/build/private-apis.native.js.map +1 -1
- package/build/store/private-actions.js +21 -0
- package/build/store/private-actions.js.map +1 -1
- package/build/store/private-selectors.js +5 -0
- package/build/store/private-selectors.js.map +1 -1
- package/build/store/reducer.js +4 -1
- package/build/store/reducer.js.map +1 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +14 -5
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +1 -1
- package/build-module/components/document-tools/index.js +12 -3
- package/build-module/components/document-tools/index.js.map +1 -1
- package/build-module/components/editor/index.js +71 -0
- package/build-module/components/editor/index.js.map +1 -0
- package/build-module/components/editor-interface/index.js +6 -8
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +10 -0
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +28 -0
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/global-styles-provider/index.js +9 -2
- package/build-module/components/global-styles-provider/index.js.map +1 -1
- package/build-module/components/header/back-button.js +4 -1
- package/build-module/components/header/back-button.js.map +1 -1
- package/build-module/components/header/index.js +1 -5
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/index.js +7 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/media-categories/index.js +1 -1
- package/build-module/components/media-categories/index.js.map +1 -1
- package/build-module/components/post-actions/actions.js +10 -4
- package/build-module/components/post-actions/actions.js.map +1 -1
- package/build-module/components/post-last-revision/index.js +34 -11
- package/build-module/components/post-last-revision/index.js.map +1 -1
- package/build-module/components/post-preview-button/index.js +1 -0
- package/build-module/components/post-preview-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/index.js +4 -0
- package/build-module/components/post-publish-button/index.js.map +1 -1
- package/build-module/components/post-publish-button/label.js +6 -0
- package/build-module/components/post-publish-button/label.js.map +1 -1
- package/build-module/components/post-publish-panel/index.js +5 -0
- package/build-module/components/post-publish-panel/index.js.map +1 -1
- package/build-module/components/post-sticky/check.js +9 -0
- package/build-module/components/post-sticky/check.js.map +1 -1
- package/build-module/components/post-sticky/index.js +6 -0
- package/build-module/components/post-sticky/index.js.map +1 -1
- package/build-module/components/post-switch-to-draft-button/index.js +10 -1
- package/build-module/components/post-switch-to-draft-button/index.js.map +1 -1
- package/build-module/components/post-sync-status/index.js +7 -1
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-taxonomies/check.js +9 -0
- package/build-module/components/post-taxonomies/check.js.map +1 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +14 -2
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +1 -1
- package/build-module/components/post-taxonomies/index.js +9 -0
- package/build-module/components/post-taxonomies/index.js.map +1 -1
- package/build-module/components/post-taxonomies/panel.js +10 -0
- package/build-module/components/post-taxonomies/panel.js.map +1 -1
- package/build-module/components/post-title/index.js +4 -8
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +3 -7
- package/build-module/components/post-title/post-title-raw.js.map +1 -1
- package/build-module/components/post-trash/check.js +9 -0
- package/build-module/components/post-trash/check.js.map +1 -1
- package/build-module/components/post-trash/index.js +7 -0
- package/build-module/components/post-trash/index.js.map +1 -1
- package/build-module/components/post-url/panel.js +26 -3
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/post-visibility/index.js +1 -0
- package/build-module/components/post-visibility/index.js.map +1 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +5 -3
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -1
- package/build-module/components/provider/index.js +18 -15
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/components/sidebar/post-summary.js +3 -2
- package/build-module/components/sidebar/post-summary.js.map +1 -1
- package/build-module/components/table-of-contents/index.js +11 -0
- package/build-module/components/table-of-contents/index.js.map +1 -1
- package/build-module/components/template-part-menu-items/convert-to-regular.js +31 -0
- package/build-module/components/template-part-menu-items/convert-to-regular.js.map +1 -0
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +71 -0
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -0
- package/build-module/components/template-part-menu-items/index.js +59 -0
- package/build-module/components/template-part-menu-items/index.js.map +1 -0
- package/build-module/components/template-part-menu-items/index.native.js +4 -0
- package/build-module/components/template-part-menu-items/index.native.js.map +1 -0
- package/build-module/components/template-validation-notice/index.js +1 -0
- package/build-module/components/template-validation-notice/index.js.map +1 -1
- package/build-module/components/theme-support-check/index.js +10 -0
- package/build-module/components/theme-support-check/index.js.map +1 -1
- package/build-module/components/time-to-read/index.js +6 -0
- package/build-module/components/time-to-read/index.js.map +1 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +1 -0
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +1 -1
- package/build-module/components/word-count/index.js +6 -0
- package/build-module/components/word-count/index.js.map +1 -1
- package/build-module/dataviews/api.js +54 -0
- package/build-module/dataviews/api.js.map +1 -0
- package/build-module/dataviews/store/private-actions.js +21 -0
- package/build-module/dataviews/store/private-actions.js.map +1 -0
- package/build-module/dataviews/store/private-selectors.js +14 -0
- package/build-module/dataviews/store/private-selectors.js.map +1 -0
- package/build-module/dataviews/store/reducer.js +29 -0
- package/build-module/dataviews/store/reducer.js.map +1 -0
- package/build-module/hooks/pattern-overrides.js +2 -1
- package/build-module/hooks/pattern-overrides.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/private-apis.js +2 -6
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js +0 -2
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/store/private-actions.js +1 -0
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/private-selectors.js +4 -0
- package/build-module/store/private-selectors.js.map +1 -1
- package/build-module/store/reducer.js +3 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-style/style-rtl.css +35 -43
- package/build-style/style.css +35 -43
- package/build-types/dataviews/store/private-actions.d.ts +17 -0
- package/build-types/dataviews/store/private-actions.d.ts.map +1 -0
- package/build-types/dataviews/store/private-selectors.d.ts +10 -0
- package/build-types/dataviews/store/private-selectors.d.ts.map +1 -0
- package/build-types/dataviews/store/reducer.d.ts +11 -0
- package/build-types/dataviews/store/reducer.d.ts.map +1 -0
- package/package.json +35 -35
- package/src/components/block-settings-menu/content-only-settings-menu.js +26 -12
- package/src/components/collapsible-block-toolbar/style.scss +3 -1
- package/src/components/document-tools/index.js +13 -4
- package/src/components/editor/index.js +88 -0
- package/src/components/editor-interface/index.js +5 -5
- package/src/components/editor-interface/style.scss +3 -0
- package/src/components/entities-saved-states/hooks/use-is-dirty.js +9 -0
- package/src/components/entities-saved-states/index.js +26 -0
- package/src/components/entities-saved-states/style.scss +0 -7
- package/src/components/global-styles-provider/index.js +12 -2
- package/src/components/header/back-button.js +6 -1
- package/src/components/header/index.js +1 -8
- package/src/components/header/style.scss +1 -1
- package/src/components/index.js +7 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +0 -3
- package/src/components/media-categories/index.js +1 -3
- package/src/components/post-actions/actions.js +9 -3
- package/src/components/post-card-panel/style.scss +4 -0
- package/src/components/post-last-revision/index.js +30 -7
- package/src/components/post-last-revision/style.scss +4 -0
- package/src/components/post-panel-row/style.scss +2 -1
- package/src/components/post-preview-button/index.js +1 -0
- package/src/components/post-preview-button/test/index.js +10 -2
- package/src/components/post-publish-button/index.js +3 -0
- package/src/components/post-publish-button/label.js +5 -0
- package/src/components/post-publish-panel/index.js +4 -0
- package/src/components/post-publish-panel/style.scss +28 -36
- package/src/components/post-status/style.scss +5 -0
- package/src/components/post-sticky/check.js +8 -0
- package/src/components/post-sticky/index.js +5 -0
- package/src/components/post-switch-to-draft-button/index.js +10 -1
- package/src/components/post-sync-status/index.js +7 -8
- package/src/components/post-taxonomies/check.js +8 -0
- package/src/components/post-taxonomies/flat-term-selector.js +13 -2
- package/src/components/post-taxonomies/index.js +8 -0
- package/src/components/post-taxonomies/panel.js +9 -0
- package/src/components/post-title/index.js +2 -5
- package/src/components/post-title/post-title-raw.js +2 -5
- package/src/components/post-trash/check.js +8 -0
- package/src/components/post-trash/index.js +6 -0
- package/src/components/post-url/panel.js +13 -5
- package/src/components/post-visibility/index.js +1 -0
- package/src/components/provider/disable-non-page-content-blocks.js +9 -4
- package/src/components/provider/index.js +17 -17
- package/src/components/save-publish-panels/style.scss +0 -8
- package/src/components/sidebar/post-summary.js +3 -1
- package/src/components/table-of-contents/index.js +10 -0
- package/src/components/template-part-menu-items/convert-to-regular.js +32 -0
- package/src/components/template-part-menu-items/convert-to-template-part.js +75 -0
- package/src/components/template-part-menu-items/index.js +59 -0
- package/src/components/template-part-menu-items/index.native.js +3 -0
- package/src/components/template-validation-notice/index.js +1 -0
- package/src/components/theme-support-check/index.js +9 -0
- package/src/components/time-to-read/index.js +5 -0
- package/src/components/visual-editor/edit-template-blocks-notification.js +1 -0
- package/src/components/word-count/index.js +5 -0
- package/src/dataviews/api.js +55 -0
- package/src/dataviews/store/private-actions.ts +30 -0
- package/src/dataviews/store/private-selectors.ts +15 -0
- package/src/dataviews/store/reducer.ts +44 -0
- package/src/hooks/pattern-overrides.js +2 -0
- package/src/index.js +1 -0
- package/src/private-apis.js +2 -6
- package/src/private-apis.native.js +0 -2
- package/src/store/private-actions.js +1 -0
- package/src/store/private-selectors.js +5 -0
- package/src/store/reducer.js +2 -0
- package/src/style.scss +1 -0
- package/tsconfig.json +36 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.editor-post-panel__row-label {
|
|
9
|
-
width:
|
|
9
|
+
width: 38%;
|
|
10
10
|
flex-shrink: 0;
|
|
11
11
|
min-height: $grid-unit-40;
|
|
12
12
|
display: flex;
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
.components-button {
|
|
26
26
|
max-width: 100%;
|
|
27
27
|
text-align: left;
|
|
28
|
+
text-wrap: balance; // Fallback for Safari.
|
|
28
29
|
text-wrap: pretty;
|
|
29
30
|
height: auto;
|
|
30
31
|
min-height: $button-size-compact;
|
|
@@ -139,12 +139,16 @@ describe( 'PostPreviewButton', () => {
|
|
|
139
139
|
).toBeInTheDocument();
|
|
140
140
|
} );
|
|
141
141
|
|
|
142
|
-
it( 'should be disabled if post is not saveable.', () => {
|
|
142
|
+
it( 'should be accessibly disabled if post is not saveable.', () => {
|
|
143
143
|
mockUseSelect( { isEditedPostSaveable: () => false } );
|
|
144
144
|
|
|
145
145
|
render( <PostPreviewButton /> );
|
|
146
146
|
|
|
147
|
-
expect( screen.getByRole( 'button' ) ).
|
|
147
|
+
expect( screen.getByRole( 'button' ) ).toBeEnabled();
|
|
148
|
+
expect( screen.getByRole( 'button' ) ).toHaveAttribute(
|
|
149
|
+
'aria-disabled',
|
|
150
|
+
'true'
|
|
151
|
+
);
|
|
148
152
|
} );
|
|
149
153
|
|
|
150
154
|
it( 'should not be disabled if post is saveable.', () => {
|
|
@@ -153,6 +157,10 @@ describe( 'PostPreviewButton', () => {
|
|
|
153
157
|
render( <PostPreviewButton /> );
|
|
154
158
|
|
|
155
159
|
expect( screen.getByRole( 'button' ) ).toBeEnabled();
|
|
160
|
+
expect( screen.getByRole( 'button' ) ).not.toHaveAttribute(
|
|
161
|
+
'aria-disabled',
|
|
162
|
+
'true'
|
|
163
|
+
);
|
|
156
164
|
} );
|
|
157
165
|
|
|
158
166
|
it( 'should set `href` to edited post preview link if specified.', () => {
|
|
@@ -10,6 +10,11 @@ import { useViewportMatch } from '@wordpress/compose';
|
|
|
10
10
|
*/
|
|
11
11
|
import { store as editorStore } from '../../store';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Renders the label for the publish button.
|
|
15
|
+
*
|
|
16
|
+
* @return {string} The label for the publish button.
|
|
17
|
+
*/
|
|
13
18
|
export default function PublishButtonLabel() {
|
|
14
19
|
const isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );
|
|
15
20
|
const {
|
|
@@ -93,6 +93,7 @@ export class PostPublishPanel extends Component {
|
|
|
93
93
|
</div>
|
|
94
94
|
<div className="editor-post-publish-panel__header-cancel-button">
|
|
95
95
|
<Button
|
|
96
|
+
__experimentalIsFocusable
|
|
96
97
|
disabled={ isSavingNonPostEntityChanges }
|
|
97
98
|
onClick={ onClose }
|
|
98
99
|
variant="secondary"
|
|
@@ -130,6 +131,9 @@ export class PostPublishPanel extends Component {
|
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Renders a panel for publishing a post.
|
|
136
|
+
*/
|
|
133
137
|
export default compose( [
|
|
134
138
|
withSelect( ( select ) => {
|
|
135
139
|
const { getPostType } = select( coreStore );
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
.editor-post-publish-panel {
|
|
2
|
-
background: $white;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.editor-post-publish-panel__content {
|
|
6
2
|
// Ensure the post-publish panel accounts for the header and footer height.
|
|
7
3
|
min-height: calc(100% - #{$header-height + 84px});
|
|
@@ -71,6 +67,7 @@
|
|
|
71
67
|
|
|
72
68
|
.editor-post-publish-panel__header-publish-button {
|
|
73
69
|
padding-right: $grid-unit-05;
|
|
70
|
+
justify-content: center;
|
|
74
71
|
}
|
|
75
72
|
|
|
76
73
|
.editor-post-publish-panel__header-cancel-button {
|
|
@@ -122,6 +119,7 @@
|
|
|
122
119
|
|
|
123
120
|
.components-panel__body-title .components-button {
|
|
124
121
|
align-items: flex-start;
|
|
122
|
+
text-wrap: balance; // Fallback for Safari.
|
|
125
123
|
text-wrap: pretty;
|
|
126
124
|
}
|
|
127
125
|
}
|
|
@@ -194,40 +192,34 @@
|
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
194
|
|
|
197
|
-
.
|
|
198
|
-
|
|
199
|
-
.editor-post-publish-panel
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
top: 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Keep it open on focus to avoid conflict with navigate-regions animation.
|
|
223
|
-
[role="region"]:focus & {
|
|
224
|
-
transform: translateX(0%);
|
|
225
|
-
}
|
|
195
|
+
.editor-post-publish-panel {
|
|
196
|
+
position: fixed;
|
|
197
|
+
z-index: z-index(".editor-post-publish-panel");
|
|
198
|
+
background: $white;
|
|
199
|
+
top: 0;
|
|
200
|
+
bottom: 0;
|
|
201
|
+
right: 0;
|
|
202
|
+
left: 0;
|
|
203
|
+
overflow: auto;
|
|
204
|
+
|
|
205
|
+
@include break-medium() {
|
|
206
|
+
z-index: z-index(".editor-post-publish-panel {greater than small}");
|
|
207
|
+
top: $admin-bar-height;
|
|
208
|
+
left: auto;
|
|
209
|
+
width: $sidebar-width + $border-width;
|
|
210
|
+
border-left: $border-width solid $gray-300;
|
|
211
|
+
transform: translateX(+100%);
|
|
212
|
+
animation: editor-post-publish-panel__slide-in-animation 0.1s forwards;
|
|
213
|
+
@include reduce-motion("animation");
|
|
214
|
+
|
|
215
|
+
body.is-fullscreen-mode & {
|
|
216
|
+
top: 0;
|
|
226
217
|
}
|
|
227
|
-
}
|
|
228
218
|
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
// Keep it open on focus to avoid conflict with navigate-regions animation.
|
|
220
|
+
[role="region"]:focus & {
|
|
221
|
+
transform: translateX(0%);
|
|
222
|
+
}
|
|
231
223
|
}
|
|
232
224
|
}
|
|
233
225
|
|
|
@@ -8,6 +8,14 @@ import { useSelect } from '@wordpress/data';
|
|
|
8
8
|
*/
|
|
9
9
|
import { store as editorStore } from '../../store';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper component that renders its children only if post has a sticky action.
|
|
13
|
+
*
|
|
14
|
+
* @param {Object} props Props.
|
|
15
|
+
* @param {Element} props.children Children to be rendered.
|
|
16
|
+
*
|
|
17
|
+
* @return {Component} The component to be rendered or null if post type is not 'post' or hasStickyAction is false.
|
|
18
|
+
*/
|
|
11
19
|
export default function PostStickyCheck( { children } ) {
|
|
12
20
|
const { hasStickyAction, postType } = useSelect( ( select ) => {
|
|
13
21
|
const post = select( editorStore ).getCurrentPost();
|
|
@@ -12,6 +12,11 @@ import PostStickyCheck from './check';
|
|
|
12
12
|
import { store as editorStore } from '../../store';
|
|
13
13
|
import PostPanelRow from '../post-panel-row';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Renders the PostSticky component. It provide toggle control for the sticky post feature.
|
|
17
|
+
*
|
|
18
|
+
* @return {Component} The component to be rendered.
|
|
19
|
+
*/
|
|
15
20
|
export default function PostSticky() {
|
|
16
21
|
const postSticky = useSelect( ( select ) => {
|
|
17
22
|
return (
|
|
@@ -8,14 +8,23 @@ import {
|
|
|
8
8
|
import { __ } from '@wordpress/i18n';
|
|
9
9
|
import { useDispatch, useSelect } from '@wordpress/data';
|
|
10
10
|
import { useState } from '@wordpress/element';
|
|
11
|
+
import deprecated from '@wordpress/deprecated';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
14
15
|
*/
|
|
15
16
|
import { store as editorStore } from '../../store';
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Renders a button component that allows the user to switch a post to draft status.
|
|
20
|
+
*
|
|
21
|
+
* @return {JSX.Element} The rendered component.
|
|
22
|
+
*/
|
|
18
23
|
export default function PostSwitchToDraftButton() {
|
|
24
|
+
deprecated( 'wp.editor.PostSwitchToDraftButton', {
|
|
25
|
+
since: '6.7',
|
|
26
|
+
version: '6.9',
|
|
27
|
+
} );
|
|
19
28
|
const [ showConfirmDialog, setShowConfirmDialog ] = useState( false );
|
|
20
29
|
|
|
21
30
|
const { editPost, savePost } = useDispatch( editorStore );
|
|
@@ -10,6 +10,11 @@ import { __, _x } from '@wordpress/i18n';
|
|
|
10
10
|
import PostPanelRow from '../post-panel-row';
|
|
11
11
|
import { store as editorStore } from '../../store';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Renders the sync status of a post.
|
|
15
|
+
*
|
|
16
|
+
* @return {JSX.Element|null} The rendered sync status component.
|
|
17
|
+
*/
|
|
13
18
|
export default function PostSyncStatus() {
|
|
14
19
|
const { syncStatus, postType } = useSelect( ( select ) => {
|
|
15
20
|
const { getEditedPostAttribute } = select( editorStore );
|
|
@@ -35,14 +40,8 @@ export default function PostSyncStatus() {
|
|
|
35
40
|
<PostPanelRow label={ __( 'Sync status' ) }>
|
|
36
41
|
<div className="editor-post-sync-status__value">
|
|
37
42
|
{ syncStatus === 'unsynced'
|
|
38
|
-
? _x(
|
|
39
|
-
|
|
40
|
-
'Text that indicates that the pattern is not synchronized'
|
|
41
|
-
)
|
|
42
|
-
: _x(
|
|
43
|
-
'Synced',
|
|
44
|
-
'Text that indicates that the pattern is synchronized'
|
|
45
|
-
) }
|
|
43
|
+
? _x( 'Not synced', 'pattern (singular)' )
|
|
44
|
+
: _x( 'Synced', 'pattern (singular)' ) }
|
|
46
45
|
</div>
|
|
47
46
|
</PostPanelRow>
|
|
48
47
|
);
|
|
@@ -9,6 +9,14 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Renders the children components only if the current post type has taxonomies.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props The component props.
|
|
16
|
+
* @param {Element} props.children The children components to render.
|
|
17
|
+
*
|
|
18
|
+
* @return {Component|null} The rendered children components or null if the current post type has no taxonomies.
|
|
19
|
+
*/
|
|
12
20
|
export default function PostTaxonomiesCheck( { children } ) {
|
|
13
21
|
const hasTaxonomies = useSelect( ( select ) => {
|
|
14
22
|
const postType = select( editorStore ).getCurrentPostType();
|
|
@@ -26,9 +26,12 @@ import MostUsedTerms from './most-used-terms';
|
|
|
26
26
|
const EMPTY_ARRAY = [];
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* How the max suggestions limit was chosen:
|
|
30
|
+
* - Matches the `per_page` range set by the REST API.
|
|
31
|
+
* - Can't use "unbound" query. The `FormTokenField` needs a fixed number.
|
|
32
|
+
* - Matches default for `FormTokenField`.
|
|
30
33
|
*/
|
|
31
|
-
const MAX_TERMS_SUGGESTIONS =
|
|
34
|
+
const MAX_TERMS_SUGGESTIONS = 100;
|
|
32
35
|
const DEFAULT_QUERY = {
|
|
33
36
|
per_page: MAX_TERMS_SUGGESTIONS,
|
|
34
37
|
_fields: 'id,name',
|
|
@@ -49,6 +52,14 @@ const termNamesToIds = ( names, terms ) => {
|
|
|
49
52
|
.filter( ( id ) => id !== undefined );
|
|
50
53
|
};
|
|
51
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Renders a flat term selector component.
|
|
57
|
+
*
|
|
58
|
+
* @param {Object} props The component props.
|
|
59
|
+
* @param {string} props.slug The slug of the taxonomy.
|
|
60
|
+
*
|
|
61
|
+
* @return {JSX.Element} The rendered flat term selector component.
|
|
62
|
+
*/
|
|
52
63
|
export function FlatTermSelector( { slug } ) {
|
|
53
64
|
const [ values, setValues ] = useState( [] );
|
|
54
65
|
const [ search, setSearch ] = useState( '' );
|
|
@@ -43,4 +43,12 @@ export function PostTaxonomies( { taxonomyWrapper = identity } ) {
|
|
|
43
43
|
} );
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Renders the taxonomies associated with a post.
|
|
48
|
+
*
|
|
49
|
+
* @param {Object} props The component props.
|
|
50
|
+
* @param {Function} props.taxonomyWrapper The wrapper function for each taxonomy component.
|
|
51
|
+
*
|
|
52
|
+
* @return {Array} An array of JSX elements representing the visible taxonomies.
|
|
53
|
+
*/
|
|
46
54
|
export default PostTaxonomies;
|
|
@@ -63,4 +63,13 @@ function PostTaxonomies() {
|
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Renders a panel for a specific taxonomy.
|
|
68
|
+
*
|
|
69
|
+
* @param {Object} props The component props.
|
|
70
|
+
* @param {Object} props.taxonomy The taxonomy object.
|
|
71
|
+
* @param {Element} props.children The child components.
|
|
72
|
+
*
|
|
73
|
+
* @return {Component} The rendered taxonomy panel.
|
|
74
|
+
*/
|
|
66
75
|
export default PostTaxonomies;
|
|
@@ -30,14 +30,12 @@ import usePostTitle from './use-post-title';
|
|
|
30
30
|
import PostTypeSupportCheck from '../post-type-support-check';
|
|
31
31
|
|
|
32
32
|
function PostTitle( _, forwardedRef ) {
|
|
33
|
-
const { placeholder
|
|
33
|
+
const { placeholder } = useSelect( ( select ) => {
|
|
34
34
|
const { getSettings } = select( blockEditorStore );
|
|
35
|
-
const { titlePlaceholder
|
|
36
|
-
getSettings();
|
|
35
|
+
const { titlePlaceholder } = getSettings();
|
|
37
36
|
|
|
38
37
|
return {
|
|
39
38
|
placeholder: titlePlaceholder,
|
|
40
|
-
hasFixedToolbar: _hasFixedToolbar,
|
|
41
39
|
};
|
|
42
40
|
}, [] );
|
|
43
41
|
|
|
@@ -186,7 +184,6 @@ function PostTitle( _, forwardedRef ) {
|
|
|
186
184
|
// This same block is used in both the visual and the code editor.
|
|
187
185
|
const className = clsx( DEFAULT_CLASSNAMES, {
|
|
188
186
|
'is-selected': isSelected,
|
|
189
|
-
'has-fixed-toolbar': hasFixedToolbar,
|
|
190
187
|
} );
|
|
191
188
|
|
|
192
189
|
return (
|
|
@@ -29,14 +29,12 @@ import usePostTitle from './use-post-title';
|
|
|
29
29
|
* @return {Component} The rendered component.
|
|
30
30
|
*/
|
|
31
31
|
function PostTitleRaw( _, forwardedRef ) {
|
|
32
|
-
const { placeholder
|
|
32
|
+
const { placeholder } = useSelect( ( select ) => {
|
|
33
33
|
const { getSettings } = select( blockEditorStore );
|
|
34
|
-
const { titlePlaceholder
|
|
35
|
-
getSettings();
|
|
34
|
+
const { titlePlaceholder } = getSettings();
|
|
36
35
|
|
|
37
36
|
return {
|
|
38
37
|
placeholder: titlePlaceholder,
|
|
39
|
-
hasFixedToolbar: _hasFixedToolbar,
|
|
40
38
|
};
|
|
41
39
|
}, [] );
|
|
42
40
|
|
|
@@ -61,7 +59,6 @@ function PostTitleRaw( _, forwardedRef ) {
|
|
|
61
59
|
// This same block is used in both the visual and the code editor.
|
|
62
60
|
const className = clsx( DEFAULT_CLASSNAMES, {
|
|
63
61
|
'is-selected': isSelected,
|
|
64
|
-
'has-fixed-toolbar': hasFixedToolbar,
|
|
65
62
|
'is-raw-text': true,
|
|
66
63
|
} );
|
|
67
64
|
|
|
@@ -9,6 +9,14 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
9
9
|
*/
|
|
10
10
|
import { store as editorStore } from '../../store';
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Wrapper component that renders its children only if the post can trashed.
|
|
14
|
+
*
|
|
15
|
+
* @param {Object} props - The component props.
|
|
16
|
+
* @param {Element} props.children - The child components to render.
|
|
17
|
+
*
|
|
18
|
+
* @return {Component|null} The rendered child components or null if the post can not trashed.
|
|
19
|
+
*/
|
|
12
20
|
export default function PostTrashCheck( { children } ) {
|
|
13
21
|
const { canTrashPost } = useSelect( ( select ) => {
|
|
14
22
|
const { isEditedPostNew, getCurrentPostId, getCurrentPostType } =
|
|
@@ -14,6 +14,11 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
*/
|
|
15
15
|
import { store as editorStore } from '../../store';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Displays the Post Trash Button and Confirm Dialog in the Editor.
|
|
19
|
+
*
|
|
20
|
+
* @return {JSX.Element|null} The rendered PostTrash component.
|
|
21
|
+
*/
|
|
17
22
|
export default function PostTrash() {
|
|
18
23
|
const { isNew, isDeleting, postId } = useSelect( ( select ) => {
|
|
19
24
|
const store = select( editorStore );
|
|
@@ -55,6 +60,7 @@ export default function PostTrash() {
|
|
|
55
60
|
onConfirm={ handleConfirm }
|
|
56
61
|
onCancel={ () => setShowConfirmDialog( false ) }
|
|
57
62
|
confirmButtonText={ __( 'Move to trash' ) }
|
|
63
|
+
size="medium"
|
|
58
64
|
>
|
|
59
65
|
{ __(
|
|
60
66
|
'Are you sure you want to move this post to the trash?'
|
|
@@ -6,6 +6,7 @@ import { useSelect } from '@wordpress/data';
|
|
|
6
6
|
import { Dropdown, Button } from '@wordpress/components';
|
|
7
7
|
import { __, sprintf } from '@wordpress/i18n';
|
|
8
8
|
import { safeDecodeURIComponent } from '@wordpress/url';
|
|
9
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* Internal dependencies
|
|
@@ -58,10 +59,17 @@ export default function PostURLPanel() {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
function PostURLToggle( { isOpen, onClick } ) {
|
|
61
|
-
const slug = useSelect(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
const { slug, isFrontPage, postLink } = useSelect( ( select ) => {
|
|
63
|
+
const { getCurrentPostId, getCurrentPost } = select( editorStore );
|
|
64
|
+
const { getEditedEntityRecord } = select( coreStore );
|
|
65
|
+
const siteSettings = getEditedEntityRecord( 'root', 'site' );
|
|
66
|
+
const _id = getCurrentPostId();
|
|
67
|
+
return {
|
|
68
|
+
slug: select( editorStore ).getEditedPostSlug(),
|
|
69
|
+
isFrontPage: siteSettings?.page_on_front === _id,
|
|
70
|
+
postLink: getCurrentPost()?.link,
|
|
71
|
+
};
|
|
72
|
+
}, [] );
|
|
65
73
|
const decodedSlug = safeDecodeURIComponent( slug );
|
|
66
74
|
return (
|
|
67
75
|
<Button
|
|
@@ -73,7 +81,7 @@ function PostURLToggle( { isOpen, onClick } ) {
|
|
|
73
81
|
aria-label={ sprintf( __( 'Change link: %s' ), decodedSlug ) }
|
|
74
82
|
onClick={ onClick }
|
|
75
83
|
>
|
|
76
|
-
|
|
84
|
+
{ isFrontPage ? postLink : <>/{ decodedSlug }</> }
|
|
77
85
|
</Button>
|
|
78
86
|
);
|
|
79
87
|
}
|
|
@@ -133,6 +133,7 @@ export default function PostVisibility( { onClose } ) {
|
|
|
133
133
|
onConfirm={ confirmPrivate }
|
|
134
134
|
onCancel={ handleDialogCancel }
|
|
135
135
|
confirmButtonText={ __( 'Publish' ) }
|
|
136
|
+
size="medium"
|
|
136
137
|
>
|
|
137
138
|
{ __( 'Would you like to privately publish this post now?' ) }
|
|
138
139
|
</ConfirmDialog>
|
|
@@ -6,31 +6,36 @@ import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
|
6
6
|
import { useEffect } from '@wordpress/element';
|
|
7
7
|
import { applyFilters } from '@wordpress/hooks';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const DEFAULT_CONTENT_ONLY_BLOCKS = [
|
|
10
10
|
'core/post-title',
|
|
11
11
|
'core/post-featured-image',
|
|
12
12
|
'core/post-content',
|
|
13
13
|
'core/template-part',
|
|
14
|
-
]
|
|
14
|
+
];
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Component that when rendered, makes it so that the site editor allows only
|
|
18
18
|
* page content to be edited.
|
|
19
19
|
*/
|
|
20
20
|
export default function DisableNonPageContentBlocks() {
|
|
21
|
+
const contentOnlyBlocks = applyFilters(
|
|
22
|
+
'editor.postContentBlockTypes',
|
|
23
|
+
DEFAULT_CONTENT_ONLY_BLOCKS
|
|
24
|
+
);
|
|
25
|
+
|
|
21
26
|
// Note that there are two separate subscription because the result for each
|
|
22
27
|
// returns a new array.
|
|
23
28
|
const contentOnlyIds = useSelect( ( select ) => {
|
|
24
29
|
const { getBlocksByName, getBlockParents, getBlockName } =
|
|
25
30
|
select( blockEditorStore );
|
|
26
|
-
return getBlocksByName(
|
|
31
|
+
return getBlocksByName( contentOnlyBlocks ).filter( ( clientId ) =>
|
|
27
32
|
getBlockParents( clientId ).every( ( parentClientId ) => {
|
|
28
33
|
const parentBlockName = getBlockName( parentClientId );
|
|
29
34
|
return (
|
|
30
35
|
// Ignore descendents of the query block.
|
|
31
36
|
parentBlockName !== 'core/query' &&
|
|
32
37
|
// Enable only the top-most block.
|
|
33
|
-
!
|
|
38
|
+
! contentOnlyBlocks.includes( parentBlockName )
|
|
34
39
|
);
|
|
35
40
|
} )
|
|
36
41
|
);
|
|
@@ -33,6 +33,7 @@ import StartTemplateOptions from '../start-template-options';
|
|
|
33
33
|
import EditorKeyboardShortcuts from '../global-keyboard-shortcuts';
|
|
34
34
|
import PatternRenameModal from '../pattern-rename-modal';
|
|
35
35
|
import PatternDuplicateModal from '../pattern-duplicate-modal';
|
|
36
|
+
import TemplatePartMenuItems from '../template-part-menu-items';
|
|
36
37
|
|
|
37
38
|
const { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );
|
|
38
39
|
const { PatternsMenuItems } = unlock( editPatternsPrivateApis );
|
|
@@ -160,8 +161,21 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
160
161
|
BlockEditorProviderComponent = ExperimentalBlockEditorProvider,
|
|
161
162
|
__unstableTemplate: template,
|
|
162
163
|
} ) => {
|
|
163
|
-
const mode = useSelect(
|
|
164
|
-
( select ) =>
|
|
164
|
+
const { editorSettings, selection, isReady, mode } = useSelect(
|
|
165
|
+
( select ) => {
|
|
166
|
+
const {
|
|
167
|
+
getEditorSettings,
|
|
168
|
+
getEditorSelection,
|
|
169
|
+
getRenderingMode,
|
|
170
|
+
__unstableIsEditorReady,
|
|
171
|
+
} = select( editorStore );
|
|
172
|
+
return {
|
|
173
|
+
editorSettings: getEditorSettings(),
|
|
174
|
+
isReady: __unstableIsEditorReady(),
|
|
175
|
+
mode: getRenderingMode(),
|
|
176
|
+
selection: getEditorSelection(),
|
|
177
|
+
};
|
|
178
|
+
},
|
|
165
179
|
[]
|
|
166
180
|
);
|
|
167
181
|
const shouldRenderTemplate = !! template && mode !== 'post-only';
|
|
@@ -187,21 +201,6 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
187
201
|
rootLevelPost.type,
|
|
188
202
|
rootLevelPost.slug,
|
|
189
203
|
] );
|
|
190
|
-
const { editorSettings, selection, isReady } = useSelect(
|
|
191
|
-
( select ) => {
|
|
192
|
-
const {
|
|
193
|
-
getEditorSettings,
|
|
194
|
-
getEditorSelection,
|
|
195
|
-
__unstableIsEditorReady,
|
|
196
|
-
} = select( editorStore );
|
|
197
|
-
return {
|
|
198
|
-
editorSettings: getEditorSettings(),
|
|
199
|
-
isReady: __unstableIsEditorReady(),
|
|
200
|
-
selection: getEditorSelection(),
|
|
201
|
-
};
|
|
202
|
-
},
|
|
203
|
-
[]
|
|
204
|
-
);
|
|
205
204
|
const { id, type } = rootLevelPost;
|
|
206
205
|
const blockEditorSettings = useBlockEditorSettings(
|
|
207
206
|
editorSettings,
|
|
@@ -301,6 +300,7 @@ export const ExperimentalEditorProvider = withRegistryProvider(
|
|
|
301
300
|
{ ! settings.__unstableIsPreviewMode && (
|
|
302
301
|
<>
|
|
303
302
|
<PatternsMenuItems />
|
|
303
|
+
<TemplatePartMenuItems />
|
|
304
304
|
<ContentOnlySettingsMenu />
|
|
305
305
|
{ mode === 'template-locked' && (
|
|
306
306
|
<DisableNonPageContentBlocks />
|
|
@@ -30,6 +30,7 @@ import PostsPerPage from '../posts-per-page';
|
|
|
30
30
|
import SiteDiscussion from '../site-discussion';
|
|
31
31
|
import { store as editorStore } from '../../store';
|
|
32
32
|
import TemplateAreas from '../template-areas';
|
|
33
|
+
import { PrivatePostLastRevision } from '../post-last-revision';
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Module Constants
|
|
@@ -68,7 +69,7 @@ export default function PostSummary( { onActionPerformed } ) {
|
|
|
68
69
|
<PostLastEditedPanel />
|
|
69
70
|
</VStack>
|
|
70
71
|
{ ! isRemovedPostStatusPanel && (
|
|
71
|
-
<VStack spacing={
|
|
72
|
+
<VStack spacing={ 4 }>
|
|
72
73
|
<VStack spacing={ 1 }>
|
|
73
74
|
<PostStatusPanel />
|
|
74
75
|
<PostSchedulePanel />
|
|
@@ -76,6 +77,7 @@ export default function PostSummary( { onActionPerformed } ) {
|
|
|
76
77
|
<PostAuthorPanel />
|
|
77
78
|
<PostTemplatePanel />
|
|
78
79
|
<PostDiscussionPanel />
|
|
80
|
+
<PrivatePostLastRevision />
|
|
79
81
|
<PageAttributesPanel />
|
|
80
82
|
<PostSyncStatus />
|
|
81
83
|
<BlogTitle />
|
|
@@ -52,4 +52,14 @@ function TableOfContents(
|
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Renders a table of contents component.
|
|
57
|
+
*
|
|
58
|
+
* @param {Object} props The component props.
|
|
59
|
+
* @param {boolean} props.hasOutlineItemsDisabled Whether outline items are disabled.
|
|
60
|
+
* @param {boolean} props.repositionDropdown Whether to reposition the dropdown.
|
|
61
|
+
* @param {Element.ref} ref The component's ref.
|
|
62
|
+
*
|
|
63
|
+
* @return {JSX.Element} The rendered table of contents component.
|
|
64
|
+
*/
|
|
55
65
|
export default forwardRef( TableOfContents );
|