@wordpress/editor 14.0.4 → 14.0.6

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 (49) hide show
  1. package/build/bindings/post-meta.js +4 -0
  2. package/build/bindings/post-meta.js.map +1 -1
  3. package/build/components/page-attributes/parent.js +2 -1
  4. package/build/components/page-attributes/parent.js.map +1 -1
  5. package/build/components/post-actions/actions.js +13 -35
  6. package/build/components/post-actions/actions.js.map +1 -1
  7. package/build/components/post-actions/export-pattern-action.js +2 -2
  8. package/build/components/post-actions/export-pattern-action.js.map +1 -1
  9. package/build/components/post-publish-button/index.js +4 -11
  10. package/build/components/post-publish-button/index.js.map +1 -1
  11. package/build/components/post-saved-state/index.js +11 -1
  12. package/build/components/post-saved-state/index.js.map +1 -1
  13. package/build/components/post-status/index.js +2 -1
  14. package/build/components/post-status/index.js.map +1 -1
  15. package/build/components/save-publish-panels/index.js +1 -2
  16. package/build/components/save-publish-panels/index.js.map +1 -1
  17. package/build/store/utils/is-template-revertable.js +6 -8
  18. package/build/store/utils/is-template-revertable.js.map +1 -1
  19. package/build-module/bindings/post-meta.js +4 -0
  20. package/build-module/bindings/post-meta.js.map +1 -1
  21. package/build-module/components/page-attributes/parent.js +2 -1
  22. package/build-module/components/page-attributes/parent.js.map +1 -1
  23. package/build-module/components/post-actions/actions.js +13 -35
  24. package/build-module/components/post-actions/actions.js.map +1 -1
  25. package/build-module/components/post-actions/export-pattern-action.js +2 -2
  26. package/build-module/components/post-actions/export-pattern-action.js.map +1 -1
  27. package/build-module/components/post-publish-button/index.js +4 -11
  28. package/build-module/components/post-publish-button/index.js.map +1 -1
  29. package/build-module/components/post-saved-state/index.js +11 -1
  30. package/build-module/components/post-saved-state/index.js.map +1 -1
  31. package/build-module/components/post-status/index.js +1 -1
  32. package/build-module/components/post-status/index.js.map +1 -1
  33. package/build-module/components/save-publish-panels/index.js +1 -2
  34. package/build-module/components/save-publish-panels/index.js.map +1 -1
  35. package/build-module/store/utils/is-template-revertable.js +6 -8
  36. package/build-module/store/utils/is-template-revertable.js.map +1 -1
  37. package/build-style/style-rtl.css +1 -0
  38. package/build-style/style.css +1 -0
  39. package/package.json +6 -6
  40. package/src/bindings/post-meta.js +5 -0
  41. package/src/components/page-attributes/parent.js +6 -3
  42. package/src/components/post-actions/actions.js +28 -57
  43. package/src/components/post-actions/export-pattern-action.js +4 -2
  44. package/src/components/post-panel-row/style.scss +1 -0
  45. package/src/components/post-publish-button/index.js +4 -17
  46. package/src/components/post-saved-state/index.js +11 -1
  47. package/src/components/post-status/index.js +1 -1
  48. package/src/components/save-publish-panels/index.js +1 -4
  49. package/src/store/utils/is-template-revertable.js +8 -8
@@ -14,7 +14,6 @@ import PostPublishPanel from '../post-publish-panel';
14
14
  import PluginPrePublishPanel from '../plugin-pre-publish-panel';
15
15
  import PluginPostPublishPanel from '../plugin-post-publish-panel';
16
16
  import { store as editorStore } from '../../store';
17
- import { unlock } from '../../lock-unlock';
18
17
 
19
18
  const { Fill, Slot } = createSlotFill( 'ActionsPanel' );
20
19
 
@@ -41,9 +40,7 @@ export default function SavePublishPanels( {
41
40
  isEditedPostDirty,
42
41
  hasNonPostEntityChanges,
43
42
  } = select( editorStore );
44
- const _hasOtherEntitiesChanges =
45
- hasNonPostEntityChanges() ||
46
- unlock( select( editorStore ) ).hasPostMetaChanges();
43
+ const _hasOtherEntitiesChanges = hasNonPostEntityChanges();
47
44
  return {
48
45
  publishSidebarOpened: isPublishSidebarOpened(),
49
46
  isPublishable:
@@ -6,18 +6,18 @@ import { TEMPLATE_ORIGINS } from '../constants';
6
6
  // Copy of the function from packages/edit-site/src/utils/is-template-revertable.js
7
7
 
8
8
  /**
9
- * Check if a template is revertable to its original theme-provided template file.
9
+ * Check if a template or template part is revertable to its original theme-provided file.
10
10
  *
11
- * @param {Object} template The template entity to check.
12
- * @return {boolean} Whether the template is revertable.
11
+ * @param {Object} templateOrTemplatePart The entity to check.
12
+ * @return {boolean} Whether the entity is revertable.
13
13
  */
14
- export default function isTemplateRevertable( template ) {
15
- if ( ! template ) {
14
+ export default function isTemplateRevertable( templateOrTemplatePart ) {
15
+ if ( ! templateOrTemplatePart ) {
16
16
  return false;
17
17
  }
18
- /* eslint-disable camelcase */
18
+
19
19
  return (
20
- template?.source === TEMPLATE_ORIGINS.custom && template?.has_theme_file
20
+ templateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&
21
+ templateOrTemplatePart.has_theme_file
21
22
  );
22
- /* eslint-enable camelcase */
23
23
  }