@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.
Files changed (98) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +2 -2
  3. package/build/bindings/api.js.map +3 -3
  4. package/build/bindings/post-data.js +50 -13
  5. package/build/bindings/post-data.js.map +3 -3
  6. package/build/bindings/term-data.js +165 -0
  7. package/build/bindings/term-data.js.map +7 -0
  8. package/build/components/collab-sidebar/add-comment.js +11 -15
  9. package/build/components/collab-sidebar/add-comment.js.map +2 -2
  10. package/build/components/collab-sidebar/comment-menu-item.js +1 -1
  11. package/build/components/collab-sidebar/comment-menu-item.js.map +2 -2
  12. package/build/components/collab-sidebar/comments.js +90 -68
  13. package/build/components/collab-sidebar/comments.js.map +2 -2
  14. package/build/components/collab-sidebar/constants.js +3 -0
  15. package/build/components/collab-sidebar/constants.js.map +2 -2
  16. package/build/components/collab-sidebar/hooks.js +13 -6
  17. package/build/components/collab-sidebar/hooks.js.map +2 -2
  18. package/build/components/collab-sidebar/index.js +28 -15
  19. package/build/components/collab-sidebar/index.js.map +3 -3
  20. package/build/components/post-fields/index.js +3 -25
  21. package/build/components/post-fields/index.js.map +2 -2
  22. package/build/components/post-template/create-new-template-modal.js +2 -1
  23. package/build/components/post-template/create-new-template-modal.js.map +2 -2
  24. package/build/components/provider/index.js +3 -2
  25. package/build/components/provider/index.js.map +2 -2
  26. package/build/components/provider/use-hide-blocks-from-inserter.js +4 -26
  27. package/build/components/provider/use-hide-blocks-from-inserter.js.map +3 -3
  28. package/build/store/actions.js +12 -11
  29. package/build/store/actions.js.map +2 -2
  30. package/build-module/bindings/api.js +2 -2
  31. package/build-module/bindings/api.js.map +2 -2
  32. package/build-module/bindings/post-data.js +50 -13
  33. package/build-module/bindings/post-data.js.map +2 -2
  34. package/build-module/bindings/term-data.js +145 -0
  35. package/build-module/bindings/term-data.js.map +7 -0
  36. package/build-module/components/collab-sidebar/add-comment.js +12 -16
  37. package/build-module/components/collab-sidebar/add-comment.js.map +2 -2
  38. package/build-module/components/collab-sidebar/comment-menu-item.js +1 -1
  39. package/build-module/components/collab-sidebar/comment-menu-item.js.map +2 -2
  40. package/build-module/components/collab-sidebar/comments.js +90 -68
  41. package/build-module/components/collab-sidebar/comments.js.map +2 -2
  42. package/build-module/components/collab-sidebar/constants.js +2 -0
  43. package/build-module/components/collab-sidebar/constants.js.map +2 -2
  44. package/build-module/components/collab-sidebar/hooks.js +13 -6
  45. package/build-module/components/collab-sidebar/hooks.js.map +2 -2
  46. package/build-module/components/collab-sidebar/index.js +33 -16
  47. package/build-module/components/collab-sidebar/index.js.map +2 -2
  48. package/build-module/components/post-fields/index.js +4 -26
  49. package/build-module/components/post-fields/index.js.map +2 -2
  50. package/build-module/components/post-template/create-new-template-modal.js +2 -1
  51. package/build-module/components/post-template/create-new-template-modal.js.map +2 -2
  52. package/build-module/components/provider/index.js +3 -2
  53. package/build-module/components/provider/index.js.map +2 -2
  54. package/build-module/components/provider/use-hide-blocks-from-inserter.js +4 -26
  55. package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +2 -2
  56. package/build-module/store/actions.js +12 -11
  57. package/build-module/store/actions.js.map +2 -2
  58. package/build-style/style-rtl.css +1 -0
  59. package/build-style/style.css +1 -0
  60. package/build-types/bindings/post-data.d.ts +7 -4
  61. package/build-types/bindings/term-data.d.ts +42 -0
  62. package/build-types/bindings/term-data.d.ts.map +1 -0
  63. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  64. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  65. package/build-types/components/collab-sidebar/constants.d.ts +1 -0
  66. package/build-types/components/collab-sidebar/constants.d.ts.map +1 -1
  67. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -1
  68. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  69. package/build-types/components/post-fields/index.d.ts +1 -5
  70. package/build-types/components/post-fields/index.d.ts.map +1 -1
  71. package/build-types/components/post-template/create-new-template-modal.d.ts.map +1 -1
  72. package/build-types/components/provider/index.d.ts.map +1 -1
  73. package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
  74. package/build-types/store/actions.d.ts.map +1 -1
  75. package/package.json +38 -38
  76. package/src/bindings/api.js +2 -2
  77. package/src/bindings/post-data.js +78 -17
  78. package/src/bindings/term-data.js +224 -0
  79. package/src/components/collab-sidebar/add-comment.js +12 -23
  80. package/src/components/collab-sidebar/comment-menu-item.js +1 -1
  81. package/src/components/collab-sidebar/comments.js +112 -64
  82. package/src/components/collab-sidebar/constants.js +1 -0
  83. package/src/components/collab-sidebar/hooks.js +16 -9
  84. package/src/components/collab-sidebar/index.js +66 -49
  85. package/src/components/collab-sidebar/style.scss +1 -0
  86. package/src/components/post-fields/index.ts +5 -42
  87. package/src/components/post-template/create-new-template-modal.js +1 -0
  88. package/src/components/provider/index.js +5 -2
  89. package/src/components/provider/use-hide-blocks-from-inserter.js +6 -37
  90. package/src/store/actions.js +15 -17
  91. package/tsconfig.tsbuildinfo +1 -1
  92. package/build/bindings/entity.js +0 -78
  93. package/build/bindings/entity.js.map +0 -7
  94. package/build-module/bindings/entity.js +0 -58
  95. package/build-module/bindings/entity.js.map +0 -7
  96. package/build-types/bindings/entity.d.ts +0 -16
  97. package/build-types/bindings/entity.d.ts.map +0 -1
  98. package/src/bindings/entity.js +0 -89
@@ -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: template slug
341
- __( 'This is a "%s" template. Do you want to activate it?' ),
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;