@wordpress/editor 14.23.0 → 14.24.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/collab-sidebar/comment-form.js +3 -1
- package/build/components/collab-sidebar/comment-form.js.map +1 -1
- package/build/components/editor-interface/index.js +11 -6
- package/build/components/editor-interface/index.js.map +1 -1
- package/build/components/post-publish-panel/postpublish.js +11 -3
- package/build/components/post-publish-panel/postpublish.js.map +1 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js +4 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
- package/build/store/private-actions.js +2 -1
- package/build/store/private-actions.js.map +1 -1
- package/build/store/utils/notice-builder.js +2 -1
- package/build/store/utils/notice-builder.js.map +1 -1
- package/build-module/components/collab-sidebar/comment-form.js +4 -2
- package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
- package/build-module/components/editor-interface/index.js +11 -6
- package/build-module/components/editor-interface/index.js.map +1 -1
- package/build-module/components/post-publish-panel/postpublish.js +12 -4
- package/build-module/components/post-publish-panel/postpublish.js.map +1 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +4 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +1 -1
- package/build-module/store/private-actions.js +2 -1
- package/build-module/store/private-actions.js.map +1 -1
- package/build-module/store/utils/notice-builder.js +2 -1
- package/build-module/store/utils/notice-builder.js.map +1 -1
- package/build-style/style-rtl.css +133 -10
- package/build-style/style.css +133 -10
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/editor-interface/index.d.ts.map +1 -1
- package/build-types/components/post-publish-panel/postpublish.d.ts.map +1 -1
- package/build-types/components/template-part-menu-items/convert-to-template-part.d.ts.map +1 -1
- package/build-types/store/private-actions.d.ts.map +1 -1
- package/build-types/store/utils/notice-builder.d.ts.map +1 -1
- package/package.json +37 -37
- package/src/components/collab-sidebar/comment-form.js +3 -1
- package/src/components/editor-interface/index.js +17 -15
- package/src/components/post-publish-panel/postpublish.js +19 -3
- package/src/components/post-publish-panel/style.scss +3 -1
- package/src/components/post-publish-panel/test/__snapshots__/index.js.snap +82 -12
- package/src/components/template-part-menu-items/convert-to-template-part.js +5 -2
- package/src/store/private-actions.js +1 -0
- package/src/store/utils/notice-builder.js +1 -0
- package/src/store/utils/test/notice-builder.js +3 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -27,7 +27,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
27
27
|
padding: 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.emotion-
|
|
30
|
+
.emotion-12 {
|
|
31
31
|
display: -webkit-box;
|
|
32
32
|
display: -webkit-flex;
|
|
33
33
|
display: -ms-flexbox;
|
|
@@ -47,7 +47,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
47
47
|
width: 100%;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.emotion-
|
|
50
|
+
.emotion-12>* {
|
|
51
51
|
min-width: 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -87,9 +87,22 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
87
87
|
class="components-panel__body post-publish-panel__postpublish-header is-opened"
|
|
88
88
|
>
|
|
89
89
|
<a
|
|
90
|
+
class="components-external-link"
|
|
90
91
|
href="https://wordpress.local/sample-page/"
|
|
92
|
+
rel="external noreferrer noopener"
|
|
93
|
+
target="_blank"
|
|
91
94
|
>
|
|
92
|
-
|
|
95
|
+
<span
|
|
96
|
+
class="components-external-link__contents"
|
|
97
|
+
>
|
|
98
|
+
(no title)
|
|
99
|
+
</span>
|
|
100
|
+
<span
|
|
101
|
+
aria-label="(opens in a new tab)"
|
|
102
|
+
class="components-external-link__icon"
|
|
103
|
+
>
|
|
104
|
+
↗
|
|
105
|
+
</span>
|
|
93
106
|
</a>
|
|
94
107
|
|
|
95
108
|
is now live.
|
|
@@ -143,9 +156,31 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
143
156
|
class="post-publish-panel__postpublish-buttons"
|
|
144
157
|
>
|
|
145
158
|
<a
|
|
146
|
-
class="components-button is-next-40px-default-size is-primary"
|
|
159
|
+
class="components-button is-next-40px-default-size is-primary has-icon"
|
|
147
160
|
href="https://wordpress.local/sample-page/"
|
|
148
|
-
|
|
161
|
+
target="_blank"
|
|
162
|
+
>
|
|
163
|
+
<span
|
|
164
|
+
class="components-visually-hidden emotion-6 emotion-7"
|
|
165
|
+
data-wp-c16t="true"
|
|
166
|
+
data-wp-component="VisuallyHidden"
|
|
167
|
+
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
|
|
168
|
+
>
|
|
169
|
+
(opens in a new tab)
|
|
170
|
+
</span>
|
|
171
|
+
<svg
|
|
172
|
+
aria-hidden="true"
|
|
173
|
+
focusable="false"
|
|
174
|
+
height="24"
|
|
175
|
+
viewBox="0 0 24 24"
|
|
176
|
+
width="24"
|
|
177
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
178
|
+
>
|
|
179
|
+
<path
|
|
180
|
+
d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
|
|
181
|
+
/>
|
|
182
|
+
</svg>
|
|
183
|
+
</a>
|
|
149
184
|
<a
|
|
150
185
|
class="components-button is-next-40px-default-size is-secondary"
|
|
151
186
|
href="post-new.php?"
|
|
@@ -164,7 +199,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is pu
|
|
|
164
199
|
class="components-base-control__field emotion-2 emotion-3"
|
|
165
200
|
>
|
|
166
201
|
<div
|
|
167
|
-
class="components-flex components-h-stack emotion-
|
|
202
|
+
class="components-flex components-h-stack emotion-12 emotion-7"
|
|
168
203
|
data-wp-c16t="true"
|
|
169
204
|
data-wp-component="HStack"
|
|
170
205
|
>
|
|
@@ -219,7 +254,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
219
254
|
padding: 0;
|
|
220
255
|
}
|
|
221
256
|
|
|
222
|
-
.emotion-
|
|
257
|
+
.emotion-12 {
|
|
223
258
|
display: -webkit-box;
|
|
224
259
|
display: -webkit-flex;
|
|
225
260
|
display: -ms-flexbox;
|
|
@@ -239,7 +274,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
239
274
|
width: 100%;
|
|
240
275
|
}
|
|
241
276
|
|
|
242
|
-
.emotion-
|
|
277
|
+
.emotion-12>* {
|
|
243
278
|
min-width: 0;
|
|
244
279
|
}
|
|
245
280
|
|
|
@@ -279,9 +314,22 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
279
314
|
class="components-panel__body post-publish-panel__postpublish-header is-opened"
|
|
280
315
|
>
|
|
281
316
|
<a
|
|
317
|
+
class="components-external-link"
|
|
282
318
|
href="https://wordpress.local/sample-page/"
|
|
319
|
+
rel="external noreferrer noopener"
|
|
320
|
+
target="_blank"
|
|
283
321
|
>
|
|
284
|
-
|
|
322
|
+
<span
|
|
323
|
+
class="components-external-link__contents"
|
|
324
|
+
>
|
|
325
|
+
(no title)
|
|
326
|
+
</span>
|
|
327
|
+
<span
|
|
328
|
+
aria-label="(opens in a new tab)"
|
|
329
|
+
class="components-external-link__icon"
|
|
330
|
+
>
|
|
331
|
+
↗
|
|
332
|
+
</span>
|
|
285
333
|
</a>
|
|
286
334
|
|
|
287
335
|
is now live.
|
|
@@ -335,9 +383,31 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
335
383
|
class="post-publish-panel__postpublish-buttons"
|
|
336
384
|
>
|
|
337
385
|
<a
|
|
338
|
-
class="components-button is-next-40px-default-size is-primary"
|
|
386
|
+
class="components-button is-next-40px-default-size is-primary has-icon"
|
|
339
387
|
href="https://wordpress.local/sample-page/"
|
|
340
|
-
|
|
388
|
+
target="_blank"
|
|
389
|
+
>
|
|
390
|
+
<span
|
|
391
|
+
class="components-visually-hidden emotion-6 emotion-7"
|
|
392
|
+
data-wp-c16t="true"
|
|
393
|
+
data-wp-component="VisuallyHidden"
|
|
394
|
+
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
|
|
395
|
+
>
|
|
396
|
+
(opens in a new tab)
|
|
397
|
+
</span>
|
|
398
|
+
<svg
|
|
399
|
+
aria-hidden="true"
|
|
400
|
+
focusable="false"
|
|
401
|
+
height="24"
|
|
402
|
+
viewBox="0 0 24 24"
|
|
403
|
+
width="24"
|
|
404
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
405
|
+
>
|
|
406
|
+
<path
|
|
407
|
+
d="M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"
|
|
408
|
+
/>
|
|
409
|
+
</svg>
|
|
410
|
+
</a>
|
|
341
411
|
<a
|
|
342
412
|
class="components-button is-next-40px-default-size is-secondary"
|
|
343
413
|
href="post-new.php?"
|
|
@@ -356,7 +426,7 @@ exports[`PostPublishPanel should render the post-publish panel if the post is sc
|
|
|
356
426
|
class="components-base-control__field emotion-2 emotion-3"
|
|
357
427
|
>
|
|
358
428
|
<div
|
|
359
|
-
class="components-flex components-h-stack emotion-
|
|
429
|
+
class="components-flex components-h-stack emotion-12 emotion-7"
|
|
360
430
|
data-wp-c16t="true"
|
|
361
431
|
data-wp-component="HStack"
|
|
362
432
|
>
|
|
@@ -9,6 +9,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
9
9
|
import { useState } from '@wordpress/element';
|
|
10
10
|
import { store as noticesStore } from '@wordpress/notices';
|
|
11
11
|
import { symbolFilled } from '@wordpress/icons';
|
|
12
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Internal dependencies
|
|
@@ -20,8 +21,10 @@ export default function ConvertToTemplatePart( { clientIds, blocks } ) {
|
|
|
20
21
|
const { replaceBlocks } = useDispatch( blockEditorStore );
|
|
21
22
|
const { createSuccessNotice } = useDispatch( noticesStore );
|
|
22
23
|
|
|
23
|
-
const { canCreate } = useSelect( ( select ) => {
|
|
24
|
+
const { isBlockBasedTheme, canCreate } = useSelect( ( select ) => {
|
|
24
25
|
return {
|
|
26
|
+
isBlockBasedTheme:
|
|
27
|
+
select( coreStore ).getCurrentTheme()?.is_block_theme,
|
|
25
28
|
canCreate:
|
|
26
29
|
select( blockEditorStore ).canInsertBlockType(
|
|
27
30
|
'core/template-part'
|
|
@@ -29,7 +32,7 @@ export default function ConvertToTemplatePart( { clientIds, blocks } ) {
|
|
|
29
32
|
};
|
|
30
33
|
}, [] );
|
|
31
34
|
|
|
32
|
-
if ( ! canCreate ) {
|
|
35
|
+
if ( ! isBlockBasedTheme || ! canCreate ) {
|
|
33
36
|
return null;
|
|
34
37
|
}
|
|
35
38
|
|
|
@@ -70,7 +70,9 @@ describe( 'getNotificationArgumentsForSaveSuccess()', () => {
|
|
|
70
70
|
'updated',
|
|
71
71
|
{
|
|
72
72
|
...defaultExpectedAction,
|
|
73
|
-
actions: [
|
|
73
|
+
actions: [
|
|
74
|
+
{ label: 'view', openInNewTab: true, url: 'some_link' },
|
|
75
|
+
],
|
|
74
76
|
},
|
|
75
77
|
],
|
|
76
78
|
],
|