@wordpress/editor 14.32.1-next.ff1cebbba.0 → 14.33.1
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/bindings/api.js +2 -2
- package/build/bindings/api.js.map +3 -3
- package/build/bindings/post-data.js +50 -13
- package/build/bindings/post-data.js.map +3 -3
- package/build/bindings/term-data.js +165 -0
- package/build/bindings/term-data.js.map +7 -0
- package/build/components/collab-sidebar/add-comment.js +11 -15
- package/build/components/collab-sidebar/add-comment.js.map +2 -2
- package/build/components/collab-sidebar/comment-menu-item.js +1 -1
- package/build/components/collab-sidebar/comment-menu-item.js.map +2 -2
- package/build/components/collab-sidebar/comments.js +90 -68
- package/build/components/collab-sidebar/comments.js.map +2 -2
- package/build/components/collab-sidebar/constants.js +3 -0
- package/build/components/collab-sidebar/constants.js.map +2 -2
- package/build/components/collab-sidebar/hooks.js +13 -6
- package/build/components/collab-sidebar/hooks.js.map +2 -2
- package/build/components/collab-sidebar/index.js +28 -15
- package/build/components/collab-sidebar/index.js.map +3 -3
- package/build/components/post-fields/index.js +3 -25
- package/build/components/post-fields/index.js.map +2 -2
- package/build/components/post-template/create-new-template-modal.js +2 -1
- package/build/components/post-template/create-new-template-modal.js.map +2 -2
- package/build/components/provider/index.js +3 -2
- package/build/components/provider/index.js.map +2 -2
- package/build/components/provider/use-hide-blocks-from-inserter.js +4 -26
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +3 -3
- package/build/store/actions.js +12 -11
- package/build/store/actions.js.map +2 -2
- package/build-module/bindings/api.js +2 -2
- package/build-module/bindings/api.js.map +2 -2
- package/build-module/bindings/post-data.js +50 -13
- package/build-module/bindings/post-data.js.map +2 -2
- package/build-module/bindings/term-data.js +145 -0
- package/build-module/bindings/term-data.js.map +7 -0
- package/build-module/components/collab-sidebar/add-comment.js +12 -16
- package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
- package/build-module/components/collab-sidebar/comment-menu-item.js +1 -1
- package/build-module/components/collab-sidebar/comment-menu-item.js.map +2 -2
- package/build-module/components/collab-sidebar/comments.js +90 -68
- package/build-module/components/collab-sidebar/comments.js.map +2 -2
- package/build-module/components/collab-sidebar/constants.js +2 -0
- package/build-module/components/collab-sidebar/constants.js.map +2 -2
- package/build-module/components/collab-sidebar/hooks.js +13 -6
- package/build-module/components/collab-sidebar/hooks.js.map +2 -2
- package/build-module/components/collab-sidebar/index.js +33 -16
- package/build-module/components/collab-sidebar/index.js.map +2 -2
- package/build-module/components/post-fields/index.js +4 -26
- package/build-module/components/post-fields/index.js.map +2 -2
- package/build-module/components/post-template/create-new-template-modal.js +2 -1
- package/build-module/components/post-template/create-new-template-modal.js.map +2 -2
- package/build-module/components/provider/index.js +3 -2
- package/build-module/components/provider/index.js.map +2 -2
- package/build-module/components/provider/use-hide-blocks-from-inserter.js +4 -26
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +2 -2
- package/build-module/store/actions.js +12 -11
- package/build-module/store/actions.js.map +2 -2
- package/build-style/style-rtl.css +1 -0
- package/build-style/style.css +1 -0
- package/build-types/bindings/post-data.d.ts +7 -4
- package/build-types/bindings/term-data.d.ts +42 -0
- package/build-types/bindings/term-data.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/constants.d.ts +1 -0
- package/build-types/components/collab-sidebar/constants.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
- package/build-types/components/post-fields/index.d.ts +1 -5
- package/build-types/components/post-fields/index.d.ts.map +1 -1
- package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
- package/build-types/components/provider/index.d.ts.map +1 -1
- package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
- package/build-types/store/actions.d.ts.map +1 -1
- package/package.json +38 -38
- package/src/bindings/api.js +2 -2
- package/src/bindings/post-data.js +78 -17
- package/src/bindings/term-data.js +224 -0
- package/src/components/collab-sidebar/add-comment.js +12 -23
- package/src/components/collab-sidebar/comment-menu-item.js +1 -1
- package/src/components/collab-sidebar/comments.js +112 -64
- package/src/components/collab-sidebar/constants.js +1 -0
- package/src/components/collab-sidebar/hooks.js +16 -9
- package/src/components/collab-sidebar/index.js +66 -49
- package/src/components/collab-sidebar/style.scss +1 -0
- package/src/components/post-fields/index.ts +5 -42
- package/src/components/post-template/create-new-template-modal.js +1 -0
- package/src/components/provider/index.js +5 -2
- package/src/components/provider/use-hide-blocks-from-inserter.js +6 -37
- package/src/store/actions.js +15 -17
- package/tsconfig.tsbuildinfo +1 -1
- package/build/bindings/entity.js +0 -78
- package/build/bindings/entity.js.map +0 -7
- package/build-module/bindings/entity.js +0 -58
- package/build-module/bindings/entity.js.map +0 -7
- package/build-types/bindings/entity.d.ts +0 -16
- package/build-types/bindings/entity.d.ts.map +0 -1
- package/src/bindings/entity.js +0 -89
package/src/store/actions.js
CHANGED
|
@@ -334,12 +334,19 @@ async function templateActivationNotice( { select, registry } ) {
|
|
|
334
334
|
return;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
const currentTheme = await registry
|
|
338
|
+
.resolveSelect( coreStore )
|
|
339
|
+
.getCurrentTheme();
|
|
340
|
+
const templateType = currentTheme?.default_template_types.find(
|
|
341
|
+
( type ) => type.slug === slug
|
|
342
|
+
);
|
|
343
|
+
|
|
337
344
|
await registry.dispatch( noticesStore ).createNotice(
|
|
338
345
|
'info',
|
|
339
346
|
sprintf(
|
|
340
|
-
// translators: %s:
|
|
341
|
-
__( '
|
|
342
|
-
slug
|
|
347
|
+
// translators: %s: The name (or slug) of the type of template.
|
|
348
|
+
__( 'Do you want to activate this "%s" template?' ),
|
|
349
|
+
templateType?.title ?? slug
|
|
343
350
|
),
|
|
344
351
|
{
|
|
345
352
|
id: 'template-activate-notice',
|
|
@@ -347,17 +354,12 @@ async function templateActivationNotice( { select, registry } ) {
|
|
|
347
354
|
{
|
|
348
355
|
label: __( 'Activate' ),
|
|
349
356
|
onClick: async () => {
|
|
350
|
-
await registry
|
|
351
|
-
.dispatch( noticesStore )
|
|
352
|
-
.removeNotice( 'template-activate-notice' );
|
|
353
357
|
await registry
|
|
354
358
|
.dispatch( noticesStore )
|
|
355
359
|
.createNotice(
|
|
356
360
|
'info',
|
|
357
361
|
__( 'Activating template…' ),
|
|
358
|
-
{
|
|
359
|
-
id: 'template-activating-notice',
|
|
360
|
-
}
|
|
362
|
+
{ id: 'template-activate-notice' }
|
|
361
363
|
);
|
|
362
364
|
try {
|
|
363
365
|
const currentSite = await registry
|
|
@@ -376,22 +378,18 @@ async function templateActivationNotice( { select, registry } ) {
|
|
|
376
378
|
},
|
|
377
379
|
{ throwOnError: true }
|
|
378
380
|
);
|
|
379
|
-
await registry
|
|
380
|
-
.dispatch( noticesStore )
|
|
381
|
-
.removeNotice( 'template-activating-notice' );
|
|
382
381
|
await registry
|
|
383
382
|
.dispatch( noticesStore )
|
|
384
383
|
.createSuccessNotice(
|
|
385
|
-
__( 'Template activated.' )
|
|
384
|
+
__( 'Template activated.' ),
|
|
385
|
+
{ id: 'template-activate-notice' }
|
|
386
386
|
);
|
|
387
387
|
} catch ( error ) {
|
|
388
|
-
await registry
|
|
389
|
-
.dispatch( noticesStore )
|
|
390
|
-
.removeNotice( 'template-activating-notice' );
|
|
391
388
|
await registry
|
|
392
389
|
.dispatch( noticesStore )
|
|
393
390
|
.createErrorNotice(
|
|
394
|
-
__( 'Template activation failed.' )
|
|
391
|
+
__( 'Template activation failed.' ),
|
|
392
|
+
{ id: 'template-activate-notice' }
|
|
395
393
|
);
|
|
396
394
|
// Rethrow for debugging.
|
|
397
395
|
throw error;
|