@wordpress/edit-widgets 6.54.0 → 6.55.1-next.v.202609031004.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 +16 -0
- package/build/blocks/widget-area/edit/index.cjs +1 -1
- package/build/blocks/widget-area/edit/index.cjs.map +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.cjs +1 -1
- package/build/blocks/widget-area/edit/inner-blocks.cjs.map +1 -1
- package/build/components/error-boundary/index.cjs +113 -20
- package/build/components/error-boundary/index.cjs.map +3 -3
- package/build/components/header/document-tools/index.cjs +1 -1
- package/build/components/header/document-tools/index.cjs.map +1 -1
- package/build/components/header/index.cjs +1 -1
- package/build/components/header/index.cjs.map +1 -1
- package/build/components/header/undo-redo/redo.cjs +1 -1
- package/build/components/header/undo-redo/redo.cjs.map +1 -1
- package/build/components/header/undo-redo/undo.cjs +1 -1
- package/build/components/header/undo-redo/undo.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs +1 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.cjs +1 -1
- package/build/components/keyboard-shortcut-help-modal/index.cjs.map +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs +1 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.cjs.map +1 -1
- package/build/components/layout/index.cjs +1 -1
- package/build/components/layout/index.cjs.map +1 -1
- package/build/components/layout/interface.cjs +1 -1
- package/build/components/layout/interface.cjs.map +1 -1
- package/build/components/more-menu/index.cjs +1 -1
- package/build/components/more-menu/index.cjs.map +1 -1
- package/build/components/more-menu/tools-more-menu-group.cjs +1 -1
- package/build/components/more-menu/tools-more-menu-group.cjs.map +1 -1
- package/build/components/notices/index.cjs +1 -1
- package/build/components/notices/index.cjs.map +1 -1
- package/build/components/save-button/index.cjs +1 -1
- package/build/components/save-button/index.cjs.map +1 -1
- package/build/components/secondary-sidebar/index.cjs +1 -1
- package/build/components/secondary-sidebar/index.cjs.map +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.cjs +1 -1
- package/build/components/secondary-sidebar/inserter-sidebar.cjs.map +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.cjs +1 -1
- package/build/components/secondary-sidebar/list-view-sidebar.cjs.map +1 -1
- package/build/components/sidebar/index.cjs +1 -1
- package/build/components/sidebar/index.cjs.map +1 -1
- package/build/components/sidebar/widget-areas.cjs +1 -1
- package/build/components/sidebar/widget-areas.cjs.map +1 -1
- package/build/components/welcome-guide/index.cjs +1 -1
- package/build/components/welcome-guide/index.cjs.map +1 -1
- package/build/components/widget-areas-block-editor-content/index.cjs +1 -1
- package/build/components/widget-areas-block-editor-content/index.cjs.map +1 -1
- package/build/components/widget-areas-block-editor-provider/index.cjs +1 -1
- package/build/components/widget-areas-block-editor-provider/index.cjs.map +1 -1
- package/build/filters/move-to-widget-area.cjs +1 -1
- package/build/filters/move-to-widget-area.cjs.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.cjs.map +1 -1
- package/build/store/selectors.cjs +3 -0
- package/build/store/selectors.cjs.map +2 -2
- package/build-module/blocks/widget-area/edit/index.mjs +1 -1
- package/build-module/blocks/widget-area/edit/index.mjs.map +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs +1 -1
- package/build-module/blocks/widget-area/edit/inner-blocks.mjs.map +1 -1
- package/build-module/components/error-boundary/index.mjs +114 -21
- package/build-module/components/error-boundary/index.mjs.map +3 -3
- package/build-module/components/header/document-tools/index.mjs +1 -1
- package/build-module/components/header/document-tools/index.mjs.map +1 -1
- package/build-module/components/header/index.mjs +1 -1
- package/build-module/components/header/index.mjs.map +1 -1
- package/build-module/components/header/undo-redo/redo.mjs +1 -1
- package/build-module/components/header/undo-redo/redo.mjs.map +1 -1
- package/build-module/components/header/undo-redo/undo.mjs +1 -1
- package/build-module/components/header/undo-redo/undo.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.mjs.map +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs +1 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.mjs.map +1 -1
- package/build-module/components/layout/index.mjs +1 -1
- package/build-module/components/layout/index.mjs.map +1 -1
- package/build-module/components/layout/interface.mjs +1 -1
- package/build-module/components/layout/interface.mjs.map +1 -1
- package/build-module/components/more-menu/index.mjs +1 -1
- package/build-module/components/more-menu/index.mjs.map +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.mjs +1 -1
- package/build-module/components/more-menu/tools-more-menu-group.mjs.map +1 -1
- package/build-module/components/notices/index.mjs +1 -1
- package/build-module/components/notices/index.mjs.map +1 -1
- package/build-module/components/save-button/index.mjs +1 -1
- package/build-module/components/save-button/index.mjs.map +1 -1
- package/build-module/components/secondary-sidebar/index.mjs +1 -1
- package/build-module/components/secondary-sidebar/index.mjs.map +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs +1 -1
- package/build-module/components/secondary-sidebar/inserter-sidebar.mjs.map +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs +1 -1
- package/build-module/components/secondary-sidebar/list-view-sidebar.mjs.map +1 -1
- package/build-module/components/sidebar/index.mjs +1 -1
- package/build-module/components/sidebar/index.mjs.map +1 -1
- package/build-module/components/sidebar/widget-areas.mjs +1 -1
- package/build-module/components/sidebar/widget-areas.mjs.map +1 -1
- package/build-module/components/welcome-guide/index.mjs +1 -1
- package/build-module/components/welcome-guide/index.mjs.map +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.mjs +1 -1
- package/build-module/components/widget-areas-block-editor-content/index.mjs.map +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.mjs +1 -1
- package/build-module/components/widget-areas-block-editor-provider/index.mjs.map +1 -1
- package/build-module/filters/move-to-widget-area.mjs +1 -1
- package/build-module/filters/move-to-widget-area.mjs.map +1 -1
- package/build-module/index.mjs +1 -1
- package/build-module/index.mjs.map +1 -1
- package/build-module/store/selectors.mjs +3 -0
- package/build-module/store/selectors.mjs.map +2 -2
- package/build-style/style-rtl.css +18 -6
- package/build-style/style.css +18 -6
- package/package.json +33 -33
- package/src/components/error-boundary/index.jsx +177 -0
- package/src/components/error-boundary/style.scss +16 -3
- package/src/components/error-boundary/test/{error-boundary.js → error-boundary.jsdom.test.jsx} +5 -2
- package/src/components/welcome-guide/style.scss +1 -1
- package/src/store/selectors.js +4 -0
- package/src/store/test/reducer.js +1 -0
- package/src/components/error-boundary/index.js +0 -62
- /package/src/blocks/widget-area/edit/{index.js → index.jsx} +0 -0
- /package/src/blocks/widget-area/edit/{inner-blocks.js → inner-blocks.jsx} +0 -0
- /package/src/components/header/document-tools/{index.js → index.jsx} +0 -0
- /package/src/components/header/{index.js → index.jsx} +0 -0
- /package/src/components/header/undo-redo/{redo.js → redo.jsx} +0 -0
- /package/src/components/header/undo-redo/{undo.js → undo.jsx} +0 -0
- /package/src/components/keyboard-shortcut-help-modal/{dynamic-shortcut.js → dynamic-shortcut.jsx} +0 -0
- /package/src/components/keyboard-shortcut-help-modal/{index.js → index.jsx} +0 -0
- /package/src/components/keyboard-shortcut-help-modal/{shortcut.js → shortcut.jsx} +0 -0
- /package/src/components/layout/{index.js → index.jsx} +0 -0
- /package/src/components/layout/{interface.js → interface.jsx} +0 -0
- /package/src/components/more-menu/{index.js → index.jsx} +0 -0
- /package/src/components/more-menu/{tools-more-menu-group.js → tools-more-menu-group.jsx} +0 -0
- /package/src/components/notices/{index.js → index.jsx} +0 -0
- /package/src/components/save-button/{index.js → index.jsx} +0 -0
- /package/src/components/secondary-sidebar/{index.js → index.jsx} +0 -0
- /package/src/components/secondary-sidebar/{inserter-sidebar.js → inserter-sidebar.jsx} +0 -0
- /package/src/components/secondary-sidebar/{list-view-sidebar.js → list-view-sidebar.jsx} +0 -0
- /package/src/components/sidebar/{index.js → index.jsx} +0 -0
- /package/src/components/sidebar/{widget-areas.js → widget-areas.jsx} +0 -0
- /package/src/components/welcome-guide/{index.js → index.jsx} +0 -0
- /package/src/components/widget-areas-block-editor-content/{index.js → index.jsx} +0 -0
- /package/src/components/widget-areas-block-editor-provider/{index.js → index.jsx} +0 -0
- /package/src/filters/{move-to-widget-area.js → move-to-widget-area.jsx} +0 -0
- /package/src/{index.js → index.jsx} +0 -0
- /package/src/store/test/{selectors.js → selectors.jsdom.test.js} +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Component } from '@wordpress/element';
|
|
2
|
+
import { __ } from '@wordpress/i18n';
|
|
3
|
+
// eslint-disable-next-line @wordpress/use-recommended-components -- The fallback UI renders outside the editor's notice system.
|
|
4
|
+
import { Card, CollapsibleCard, Notice, Stack, Text } from '@wordpress/ui';
|
|
5
|
+
import { useCopyToClipboard } from '@wordpress/compose';
|
|
6
|
+
import { doAction } from '@wordpress/hooks';
|
|
7
|
+
|
|
8
|
+
// A boundary catches whatever was thrown, which is not always an `Error`.
|
|
9
|
+
function getErrorName( error ) {
|
|
10
|
+
return ( error instanceof Error && error.name ) || 'Error';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getErrorMessage( error ) {
|
|
14
|
+
if ( typeof error === 'string' && error ) {
|
|
15
|
+
return error;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
if ( typeof error?.message === 'string' && error.message ) {
|
|
19
|
+
return error.message;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return 'An unknown error occurred.';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// The sections of the report, shared by the copied Markdown and the details
|
|
26
|
+
// panel so that the two cannot drift apart. Deliberately untranslated: both
|
|
27
|
+
// are developer-facing, and the report is pasted into a bug report.
|
|
28
|
+
function getErrorSections( error, componentStack ) {
|
|
29
|
+
const sections = [
|
|
30
|
+
{ label: getErrorName( error ), content: getErrorMessage( error ) },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
if ( error?.stack ) {
|
|
34
|
+
sections.push( {
|
|
35
|
+
label: 'Stack',
|
|
36
|
+
content: error.stack.trim(),
|
|
37
|
+
preformatted: true,
|
|
38
|
+
} );
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if ( componentStack ) {
|
|
42
|
+
sections.push( {
|
|
43
|
+
label: 'Component stack',
|
|
44
|
+
content: componentStack.trim(),
|
|
45
|
+
preformatted: true,
|
|
46
|
+
} );
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
sections.push( {
|
|
50
|
+
label: 'Environment',
|
|
51
|
+
content: `User agent: ${ window.navigator.userAgent }`,
|
|
52
|
+
preformatted: true,
|
|
53
|
+
} );
|
|
54
|
+
|
|
55
|
+
return sections;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Markdown, so the report stays readable as plain text and renders when pasted
|
|
59
|
+
// into a bug report.
|
|
60
|
+
function getErrorReport( error, componentStack ) {
|
|
61
|
+
const sections = getErrorSections( error, componentStack ).map(
|
|
62
|
+
( { label, content, preformatted } ) =>
|
|
63
|
+
`**${ label }**\n\n${
|
|
64
|
+
preformatted ? `\`\`\`\n${ content }\n\`\`\`` : content
|
|
65
|
+
}`
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
return [ '### Error report', ...sections ].join( '\n\n' );
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function CopyButton( { text, children, variant = 'outline' } ) {
|
|
72
|
+
const ref = useCopyToClipboard( text );
|
|
73
|
+
return (
|
|
74
|
+
<Notice.ActionButton variant={ variant } ref={ ref }>
|
|
75
|
+
{ children }
|
|
76
|
+
</Notice.ActionButton>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function ErrorReport( { error, componentStack } ) {
|
|
81
|
+
return (
|
|
82
|
+
<Stack
|
|
83
|
+
className="edit-widgets-error-boundary__report"
|
|
84
|
+
direction="column"
|
|
85
|
+
gap="md"
|
|
86
|
+
>
|
|
87
|
+
{ getErrorSections( error, componentStack ).map(
|
|
88
|
+
( { label, content } ) => (
|
|
89
|
+
<Stack key={ label } direction="column" gap="xs">
|
|
90
|
+
<Text variant="heading-md">{ label }</Text>
|
|
91
|
+
<pre className="edit-widgets-error-boundary__report-section">
|
|
92
|
+
{ content }
|
|
93
|
+
</pre>
|
|
94
|
+
</Stack>
|
|
95
|
+
)
|
|
96
|
+
) }
|
|
97
|
+
</Stack>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function ErrorDetails( { error, componentStack } ) {
|
|
102
|
+
return (
|
|
103
|
+
<CollapsibleCard.Root className="edit-widgets-error-boundary__details">
|
|
104
|
+
<CollapsibleCard.Header>
|
|
105
|
+
<Card.Title>{ __( 'Error details' ) }</Card.Title>
|
|
106
|
+
</CollapsibleCard.Header>
|
|
107
|
+
<CollapsibleCard.Content>
|
|
108
|
+
<ErrorReport
|
|
109
|
+
error={ error }
|
|
110
|
+
componentStack={ componentStack }
|
|
111
|
+
/>
|
|
112
|
+
</CollapsibleCard.Content>
|
|
113
|
+
</CollapsibleCard.Root>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export default class ErrorBoundary extends Component {
|
|
118
|
+
constructor() {
|
|
119
|
+
super( ...arguments );
|
|
120
|
+
|
|
121
|
+
this.state = {
|
|
122
|
+
error: null,
|
|
123
|
+
componentStack: null,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
componentDidCatch( error, errorInfo ) {
|
|
128
|
+
this.setState( { componentStack: errorInfo?.componentStack } );
|
|
129
|
+
doAction( 'editor.ErrorBoundary.errorLogged', error, errorInfo );
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static getDerivedStateFromError( error ) {
|
|
133
|
+
return { error };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
render() {
|
|
137
|
+
const { error, componentStack } = this.state;
|
|
138
|
+
if ( ! error ) {
|
|
139
|
+
return this.props.children;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<Stack
|
|
144
|
+
className="edit-widgets-error-boundary"
|
|
145
|
+
direction="column"
|
|
146
|
+
gap="lg"
|
|
147
|
+
>
|
|
148
|
+
<Notice.Root intent="error">
|
|
149
|
+
<Notice.Title>
|
|
150
|
+
{ __( 'The editor has crashed' ) }
|
|
151
|
+
</Notice.Title>
|
|
152
|
+
<Notice.Description>
|
|
153
|
+
{ __(
|
|
154
|
+
'An unknown error occurred. Reload your browser to try again, or copy the error to report the problem or search.'
|
|
155
|
+
) }
|
|
156
|
+
</Notice.Description>
|
|
157
|
+
<Notice.Actions>
|
|
158
|
+
<CopyButton
|
|
159
|
+
variant="solid"
|
|
160
|
+
text={ () =>
|
|
161
|
+
getErrorReport( error, componentStack )
|
|
162
|
+
}
|
|
163
|
+
>
|
|
164
|
+
{ __( 'Copy error' ) }
|
|
165
|
+
</CopyButton>
|
|
166
|
+
</Notice.Actions>
|
|
167
|
+
</Notice.Root>
|
|
168
|
+
{ globalThis.SCRIPT_DEBUG ? (
|
|
169
|
+
<ErrorDetails
|
|
170
|
+
error={ error }
|
|
171
|
+
componentStack={ componentStack }
|
|
172
|
+
/>
|
|
173
|
+
) : null }
|
|
174
|
+
</Stack>
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
@use "@wordpress/base-styles/variables" as *;
|
|
2
2
|
|
|
3
3
|
.edit-widgets-error-boundary {
|
|
4
|
+
font-family: var(--wpds-typography-font-family-body);
|
|
4
5
|
margin: auto;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
width: 100%;
|
|
7
|
+
max-width: var(--wpds-dimension-surface-width-lg);
|
|
8
|
+
padding: var(--wpds-dimension-padding-xl);
|
|
7
9
|
margin-top: $header-height;
|
|
8
|
-
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.edit-widgets-error-boundary__report {
|
|
13
|
+
max-height: 420px;
|
|
14
|
+
overflow: auto;
|
|
15
|
+
overflow-anchor: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.edit-widgets-error-boundary__report-section {
|
|
19
|
+
margin: 0;
|
|
20
|
+
white-space: pre-wrap;
|
|
21
|
+
overflow-wrap: break-word;
|
|
9
22
|
}
|
package/src/components/error-boundary/test/{error-boundary.js → error-boundary.jsdom.test.jsx}
RENAMED
|
@@ -10,7 +10,7 @@ const ChildComponent = () => {
|
|
|
10
10
|
|
|
11
11
|
describe( 'Error Boundary', () => {
|
|
12
12
|
describe( 'when error is thrown from a Child component', () => {
|
|
13
|
-
it( 'calls the `editor.ErrorBoundary.errorLogged` hook action with the error object', () => {
|
|
13
|
+
it( 'calls the `editor.ErrorBoundary.errorLogged` hook action with the error object and error info', () => {
|
|
14
14
|
const doAction = jest.spyOn( wpHooks, 'doAction' );
|
|
15
15
|
|
|
16
16
|
render(
|
|
@@ -21,7 +21,10 @@ describe( 'Error Boundary', () => {
|
|
|
21
21
|
|
|
22
22
|
expect( doAction ).toHaveBeenCalledWith(
|
|
23
23
|
'editor.ErrorBoundary.errorLogged',
|
|
24
|
-
theError
|
|
24
|
+
theError,
|
|
25
|
+
expect.objectContaining( {
|
|
26
|
+
componentStack: expect.any( String ),
|
|
27
|
+
} )
|
|
25
28
|
);
|
|
26
29
|
expect( console ).toHaveErrored();
|
|
27
30
|
} );
|
package/src/store/selectors.js
CHANGED
|
@@ -287,6 +287,10 @@ export const canInsertBlockInWidgetArea = createRegistrySelector(
|
|
|
287
287
|
// widget area can be inserted into any widget area. Uses the first
|
|
288
288
|
// widget area for testing whether the block can be inserted.
|
|
289
289
|
const [ firstWidgetArea ] = widgetAreas;
|
|
290
|
+
if ( ! firstWidgetArea ) {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
|
|
290
294
|
return select( blockEditorStore ).canInsertBlockType(
|
|
291
295
|
blockName,
|
|
292
296
|
firstWidgetArea.clientId
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { Component } from '@wordpress/element';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
|
-
import { Button } from '@wordpress/components';
|
|
4
|
-
import { Warning } from '@wordpress/block-editor';
|
|
5
|
-
import { useCopyToClipboard } from '@wordpress/compose';
|
|
6
|
-
import { doAction } from '@wordpress/hooks';
|
|
7
|
-
|
|
8
|
-
function CopyButton( { text, children } ) {
|
|
9
|
-
const ref = useCopyToClipboard( text );
|
|
10
|
-
return (
|
|
11
|
-
<Button __next40pxDefaultSize variant="secondary" ref={ ref }>
|
|
12
|
-
{ children }
|
|
13
|
-
</Button>
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function ErrorBoundaryWarning( { message, error } ) {
|
|
18
|
-
const actions = [
|
|
19
|
-
<CopyButton key="copy-error" text={ error.stack }>
|
|
20
|
-
{ __( 'Copy Error' ) }
|
|
21
|
-
</CopyButton>,
|
|
22
|
-
];
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<Warning className="edit-widgets-error-boundary" actions={ actions }>
|
|
26
|
-
{ message }
|
|
27
|
-
</Warning>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default class ErrorBoundary extends Component {
|
|
32
|
-
constructor() {
|
|
33
|
-
super( ...arguments );
|
|
34
|
-
|
|
35
|
-
this.state = {
|
|
36
|
-
error: null,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
componentDidCatch( error ) {
|
|
41
|
-
doAction( 'editor.ErrorBoundary.errorLogged', error );
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
static getDerivedStateFromError( error ) {
|
|
45
|
-
return { error };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
render() {
|
|
49
|
-
if ( ! this.state.error ) {
|
|
50
|
-
return this.props.children;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<ErrorBoundaryWarning
|
|
55
|
-
message={ __(
|
|
56
|
-
'The editor has encountered an unexpected error.'
|
|
57
|
-
) }
|
|
58
|
-
error={ this.state.error }
|
|
59
|
-
/>
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/keyboard-shortcut-help-modal/{dynamic-shortcut.js → dynamic-shortcut.jsx}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|