@wordpress/editor 14.32.0 → 14.32.1-next.ff1cebbba.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/build/bindings/api.js +45 -33
- package/build/bindings/api.js.map +7 -1
- package/build/bindings/entity.js +78 -0
- package/build/bindings/entity.js.map +7 -0
- package/build/bindings/pattern-overrides.js +58 -65
- package/build/bindings/pattern-overrides.js.map +7 -1
- package/build/bindings/post-data.js +71 -91
- package/build/bindings/post-data.js.map +7 -1
- package/build/bindings/post-meta.js +74 -106
- package/build/bindings/post-meta.js.map +7 -1
- package/build/components/autocompleters/index.js +36 -11
- package/build/components/autocompleters/index.js.map +7 -1
- package/build/components/autocompleters/user.js +66 -54
- package/build/components/autocompleters/user.js.map +7 -1
- package/build/components/autosave-monitor/index.js +59 -73
- package/build/components/autosave-monitor/index.js.map +7 -1
- package/build/components/block-removal-warnings/index.js +81 -57
- package/build/components/block-removal-warnings/index.js.map +7 -1
- package/build/components/block-settings-menu/content-only-settings-menu.js +161 -121
- package/build/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js +42 -99
- package/build/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
- package/build/components/block-visibility/index.js +123 -0
- package/build/components/block-visibility/index.js.map +7 -0
- package/build/components/blog-title/index.js +127 -108
- package/build/components/blog-title/index.js.map +7 -1
- package/build/components/character-count/index.js +30 -23
- package/build/components/character-count/index.js.map +7 -1
- package/build/components/collab-sidebar/add-comment.js +89 -70
- package/build/components/collab-sidebar/add-comment.js.map +7 -1
- package/build/components/collab-sidebar/comment-author-info.js +72 -84
- package/build/components/collab-sidebar/comment-author-info.js.map +7 -1
- package/build/components/collab-sidebar/comment-form.js +92 -81
- package/build/components/collab-sidebar/comment-form.js.map +7 -1
- package/build/components/collab-sidebar/comment-indicator-toolbar.js +96 -83
- package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
- package/build/components/collab-sidebar/comment-menu-item.js +46 -0
- package/build/components/collab-sidebar/comment-menu-item.js.map +7 -0
- package/build/components/collab-sidebar/comments.js +544 -317
- package/build/components/collab-sidebar/comments.js.map +7 -1
- package/build/components/collab-sidebar/constants.js +30 -7
- package/build/components/collab-sidebar/constants.js.map +7 -1
- package/build/components/collab-sidebar/hooks.js +312 -58
- package/build/components/collab-sidebar/hooks.js.map +7 -1
- package/build/components/collab-sidebar/index.js +183 -252
- package/build/components/collab-sidebar/index.js.map +7 -1
- package/build/components/collab-sidebar/utils.js +94 -79
- package/build/components/collab-sidebar/utils.js.map +7 -1
- package/build/components/collapsible-block-toolbar/index.js +70 -60
- package/build/components/collapsible-block-toolbar/index.js.map +7 -1
- package/build/components/commands/index.js +218 -268
- package/build/components/commands/index.js.map +7 -1
- package/build/components/deprecated.js +328 -248
- package/build/components/deprecated.js.map +7 -1
- package/build/components/document-bar/index.js +145 -153
- package/build/components/document-bar/index.js.map +7 -1
- package/build/components/document-outline/check.js +28 -27
- package/build/components/document-outline/check.js.map +7 -1
- package/build/components/document-outline/index.js +169 -207
- package/build/components/document-outline/index.js.map +7 -1
- package/build/components/document-outline/item.js +68 -35
- package/build/components/document-outline/item.js.map +7 -1
- package/build/components/document-tools/index.js +145 -133
- package/build/components/document-tools/index.js.map +7 -1
- package/build/components/editor/index.js +99 -63
- package/build/components/editor/index.js.map +7 -1
- package/build/components/editor-history/redo.js +51 -54
- package/build/components/editor-history/redo.js.map +7 -1
- package/build/components/editor-history/undo.js +50 -53
- package/build/components/editor-history/undo.js.map +7 -1
- package/build/components/editor-interface/content-slot-fill.js +27 -12
- package/build/components/editor-interface/content-slot-fill.js.map +7 -1
- package/build/components/editor-interface/index.js +142 -127
- package/build/components/editor-interface/index.js.map +7 -1
- package/build/components/editor-notices/index.js +74 -58
- package/build/components/editor-notices/index.js.map +7 -1
- package/build/components/editor-snackbars/index.js +40 -32
- package/build/components/editor-snackbars/index.js.map +7 -1
- package/build/components/entities-saved-states/entity-record-item.js +70 -70
- package/build/components/entities-saved-states/entity-record-item.js.map +7 -1
- package/build/components/entities-saved-states/entity-type-list.js +108 -78
- package/build/components/entities-saved-states/entity-type-list.js.map +7 -1
- package/build/components/entities-saved-states/hooks/use-is-dirty.js +62 -61
- package/build/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
- package/build/components/entities-saved-states/index.js +177 -161
- package/build/components/entities-saved-states/index.js.map +7 -1
- package/build/components/error-boundary/index.js +59 -85
- package/build/components/error-boundary/index.js.map +7 -1
- package/build/components/global-keyboard-shortcuts/index.js +58 -71
- package/build/components/global-keyboard-shortcuts/index.js.map +7 -1
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js +106 -93
- package/build/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
- package/build/components/global-styles-provider/index.js +173 -146
- package/build/components/global-styles-provider/index.js.map +7 -1
- package/build/components/header/back-button.js +40 -26
- package/build/components/header/back-button.js.map +7 -1
- package/build/components/header/index.js +175 -162
- package/build/components/header/index.js.map +7 -1
- package/build/components/index.js +311 -780
- package/build/components/index.js.map +7 -1
- package/build/components/inserter-sidebar/index.js +62 -71
- package/build/components/inserter-sidebar/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/config.js +74 -70
- package/build/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +61 -43
- package/build/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/index.js +165 -111
- package/build/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build/components/keyboard-shortcut-help-modal/shortcut.js +76 -55
- package/build/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build/components/list-view-sidebar/index.js +117 -121
- package/build/components/list-view-sidebar/index.js.map +7 -1
- package/build/components/list-view-sidebar/list-view-outline.js +56 -41
- package/build/components/list-view-sidebar/list-view-outline.js.map +7 -1
- package/build/components/local-autosave-monitor/index.js +118 -148
- package/build/components/local-autosave-monitor/index.js.map +7 -1
- package/build/components/media-categories/index.js +160 -144
- package/build/components/media-categories/index.js.map +7 -1
- package/build/components/mode-switcher/index.js +68 -63
- package/build/components/mode-switcher/index.js.map +7 -1
- package/build/components/more-menu/copy-content-menu-item.js +46 -43
- package/build/components/more-menu/copy-content-menu-item.js.map +7 -1
- package/build/components/more-menu/index.js +174 -119
- package/build/components/more-menu/index.js.map +7 -1
- package/build/components/more-menu/tools-more-menu-group.js +27 -21
- package/build/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build/components/more-menu/view-more-menu-group.js +30 -22
- package/build/components/more-menu/view-more-menu-group.js.map +7 -1
- package/build/components/page-attributes/check.js +37 -40
- package/build/components/page-attributes/check.js.map +7 -1
- package/build/components/page-attributes/order.js +66 -64
- package/build/components/page-attributes/order.js.map +7 -1
- package/build/components/page-attributes/panel.js +45 -43
- package/build/components/page-attributes/panel.js.map +7 -1
- package/build/components/page-attributes/parent.js +224 -207
- package/build/components/page-attributes/parent.js.map +7 -1
- package/build/components/pattern-duplicate-modal/index.js +58 -48
- package/build/components/pattern-duplicate-modal/index.js.map +7 -1
- package/build/components/pattern-overrides-panel/index.js +33 -23
- package/build/components/pattern-overrides-panel/index.js.map +7 -1
- package/build/components/pattern-rename-modal/index.js +51 -47
- package/build/components/pattern-rename-modal/index.js.map +7 -1
- package/build/components/plugin-document-setting-panel/index.js +74 -114
- package/build/components/plugin-document-setting-panel/index.js.map +7 -1
- package/build/components/plugin-more-menu-item/index.js +37 -78
- package/build/components/plugin-more-menu-item/index.js.map +7 -1
- package/build/components/plugin-post-publish-panel/index.js +37 -59
- package/build/components/plugin-post-publish-panel/index.js.map +7 -1
- package/build/components/plugin-post-status-info/index.js +27 -73
- package/build/components/plugin-post-status-info/index.js.map +7 -1
- package/build/components/plugin-pre-publish-panel/index.js +37 -62
- package/build/components/plugin-pre-publish-panel/index.js.map +7 -1
- package/build/components/plugin-preview-menu-item/index.js +37 -57
- package/build/components/plugin-preview-menu-item/index.js.map +7 -1
- package/build/components/plugin-sidebar/index.js +34 -86
- package/build/components/plugin-sidebar/index.js.map +7 -1
- package/build/components/plugin-sidebar-more-menu-item/index.js +33 -67
- package/build/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
- package/build/components/post-actions/actions.js +111 -103
- package/build/components/post-actions/actions.js.map +7 -1
- package/build/components/post-actions/index.js +126 -131
- package/build/components/post-actions/index.js.map +7 -1
- package/build/components/post-actions/set-as-homepage.js +123 -123
- package/build/components/post-actions/set-as-homepage.js.map +7 -1
- package/build/components/post-actions/set-as-posts-page.js +118 -120
- package/build/components/post-actions/set-as-posts-page.js.map +7 -1
- package/build/components/post-author/check.js +41 -38
- package/build/components/post-author/check.js.map +7 -1
- package/build/components/post-author/combobox.js +50 -52
- package/build/components/post-author/combobox.js.map +7 -1
- package/build/components/post-author/constants.js +34 -10
- package/build/components/post-author/constants.js.map +7 -1
- package/build/components/post-author/hook.js +71 -71
- package/build/components/post-author/hook.js.map +7 -1
- package/build/components/post-author/index.js +43 -31
- package/build/components/post-author/index.js.map +7 -1
- package/build/components/post-author/panel.js +106 -95
- package/build/components/post-author/panel.js.map +7 -1
- package/build/components/post-author/select.js +45 -40
- package/build/components/post-author/select.js.map +7 -1
- package/build/components/post-card-panel/index.js +128 -113
- package/build/components/post-card-panel/index.js.map +7 -1
- package/build/components/post-comments/index.js +60 -55
- package/build/components/post-comments/index.js.map +7 -1
- package/build/components/post-content-information/index.js +64 -65
- package/build/components/post-content-information/index.js.map +7 -1
- package/build/components/post-discussion/panel.js +114 -128
- package/build/components/post-discussion/panel.js.map +7 -1
- package/build/components/post-excerpt/check.js +37 -27
- package/build/components/post-excerpt/check.js.map +7 -1
- package/build/components/post-excerpt/index.js +75 -71
- package/build/components/post-excerpt/index.js.map +7 -1
- package/build/components/post-excerpt/panel.js +152 -141
- package/build/components/post-excerpt/panel.js.map +7 -1
- package/build/components/post-excerpt/plugin.js +28 -70
- package/build/components/post-excerpt/plugin.js.map +7 -1
- package/build/components/post-featured-image/check.js +38 -32
- package/build/components/post-featured-image/check.js.map +7 -1
- package/build/components/post-featured-image/index.js +224 -211
- package/build/components/post-featured-image/index.js.map +7 -1
- package/build/components/post-featured-image/panel.js +55 -59
- package/build/components/post-featured-image/panel.js.map +7 -1
- package/build/components/post-fields/index.js +55 -56
- package/build/components/post-fields/index.js.map +7 -1
- package/build/components/post-format/check.js +42 -33
- package/build/components/post-format/check.js.map +7 -1
- package/build/components/post-format/index.js +100 -113
- package/build/components/post-format/index.js.map +7 -1
- package/build/components/post-format/panel.js +91 -82
- package/build/components/post-format/panel.js.map +7 -1
- package/build/components/post-last-edited-panel/index.js +38 -29
- package/build/components/post-last-edited-panel/index.js.map +7 -1
- package/build/components/post-last-revision/check.js +41 -41
- package/build/components/post-last-revision/check.js.map +7 -1
- package/build/components/post-last-revision/index.js +75 -66
- package/build/components/post-last-revision/index.js.map +7 -1
- package/build/components/post-last-revision/panel.js +39 -30
- package/build/components/post-last-revision/panel.js.map +7 -1
- package/build/components/post-locked-modal/index.js +148 -145
- package/build/components/post-locked-modal/index.js.map +7 -1
- package/build/components/post-panel-row/index.js +49 -35
- package/build/components/post-panel-row/index.js.map +7 -1
- package/build/components/post-panel-section/index.js +38 -26
- package/build/components/post-panel-section/index.js.map +7 -1
- package/build/components/post-pending-status/check.js +34 -40
- package/build/components/post-pending-status/check.js.map +7 -1
- package/build/components/post-pending-status/index.js +58 -41
- package/build/components/post-pending-status/index.js.map +7 -1
- package/build/components/post-pingbacks/index.js +52 -44
- package/build/components/post-pingbacks/index.js.map +7 -1
- package/build/components/post-preview-button/index.js +90 -120
- package/build/components/post-preview-button/index.js.map +7 -1
- package/build/components/post-publish-button/index.js +125 -137
- package/build/components/post-publish-button/index.js.map +7 -1
- package/build/components/post-publish-button/label.js +39 -40
- package/build/components/post-publish-button/label.js.map +7 -1
- package/build/components/post-publish-button/post-publish-button-or-toggle.js +62 -68
- package/build/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
- package/build/components/post-publish-panel/index.js +136 -135
- package/build/components/post-publish-panel/index.js.map +7 -1
- package/build/components/post-publish-panel/maybe-category-panel.js +71 -67
- package/build/components/post-publish-panel/maybe-category-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-post-format-panel.js +72 -63
- package/build/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-tags-panel.js +86 -80
- package/build/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
- package/build/components/post-publish-panel/maybe-upload-media.js +172 -214
- package/build/components/post-publish-panel/maybe-upload-media.js.map +7 -1
- package/build/components/post-publish-panel/media-util.js +63 -72
- package/build/components/post-publish-panel/media-util.js.map +7 -1
- package/build/components/post-publish-panel/postpublish.js +135 -130
- package/build/components/post-publish-panel/postpublish.js.map +7 -1
- package/build/components/post-publish-panel/prepublish.js +137 -103
- package/build/components/post-publish-panel/prepublish.js.map +7 -1
- package/build/components/post-saved-state/index.js +115 -131
- package/build/components/post-saved-state/index.js.map +7 -1
- package/build/components/post-schedule/check.js +27 -29
- package/build/components/post-schedule/check.js.map +7 -1
- package/build/components/post-schedule/index.js +96 -93
- package/build/components/post-schedule/index.js.map +7 -1
- package/build/components/post-schedule/label.js +79 -86
- package/build/components/post-schedule/label.js.map +7 -1
- package/build/components/post-schedule/panel.js +88 -73
- package/build/components/post-schedule/panel.js.map +7 -1
- package/build/components/post-status/index.js +238 -202
- package/build/components/post-status/index.js.map +7 -1
- package/build/components/post-sticky/check.js +30 -35
- package/build/components/post-sticky/check.js.map +7 -1
- package/build/components/post-sticky/index.js +50 -40
- package/build/components/post-sticky/index.js.map +7 -1
- package/build/components/post-sticky/panel.js +43 -21
- package/build/components/post-sticky/panel.js.map +7 -1
- package/build/components/post-switch-to-draft-button/index.js +80 -75
- package/build/components/post-switch-to-draft-button/index.js.map +7 -1
- package/build/components/post-sync-status/index.js +45 -44
- package/build/components/post-sync-status/index.js.map +7 -1
- package/build/components/post-taxonomies/check.js +36 -33
- package/build/components/post-taxonomies/check.js.map +7 -1
- package/build/components/post-taxonomies/flat-term-selector.js +189 -189
- package/build/components/post-taxonomies/flat-term-selector.js.map +7 -1
- package/build/components/post-taxonomies/hierarchical-term-selector.js +244 -280
- package/build/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
- package/build/components/post-taxonomies/index.js +68 -58
- package/build/components/post-taxonomies/index.js.map +7 -1
- package/build/components/post-taxonomies/most-used-terms.js +73 -56
- package/build/components/post-taxonomies/most-used-terms.js.map +7 -1
- package/build/components/post-taxonomies/panel.js +66 -69
- package/build/components/post-taxonomies/panel.js.map +7 -1
- package/build/components/post-template/block-theme.js +165 -123
- package/build/components/post-template/block-theme.js.map +7 -1
- package/build/components/post-template/classic-theme.js +193 -187
- package/build/components/post-template/classic-theme.js.map +7 -1
- package/build/components/post-template/create-new-template-modal.js +139 -110
- package/build/components/post-template/create-new-template-modal.js.map +7 -1
- package/build/components/post-template/create-new-template.js +65 -46
- package/build/components/post-template/create-new-template.js.map +7 -1
- package/build/components/post-template/hooks.js +116 -84
- package/build/components/post-template/hooks.js.map +7 -1
- package/build/components/post-template/panel.js +56 -52
- package/build/components/post-template/panel.js.map +7 -1
- package/build/components/post-template/reset-default-template.js +49 -43
- package/build/components/post-template/reset-default-template.js.map +7 -1
- package/build/components/post-template/swap-template-button.js +109 -91
- package/build/components/post-template/swap-template-button.js.map +7 -1
- package/build/components/post-text-editor/index.js +80 -81
- package/build/components/post-text-editor/index.js.map +7 -1
- package/build/components/post-title/constants.js +30 -7
- package/build/components/post-title/constants.js.map +7 -1
- package/build/components/post-title/index.js +99 -126
- package/build/components/post-title/index.js.map +7 -1
- package/build/components/post-title/post-title-raw.js +74 -78
- package/build/components/post-title/post-title-raw.js.map +7 -1
- package/build/components/post-title/use-post-title-focus.js +35 -52
- package/build/components/post-title/use-post-title-focus.js.map +7 -1
- package/build/components/post-title/use-post-title.js +30 -37
- package/build/components/post-title/use-post-title.js.map +7 -1
- package/build/components/post-transform-panel/hooks.js +70 -67
- package/build/components/post-transform-panel/hooks.js.map +7 -1
- package/build/components/post-transform-panel/index.js +69 -75
- package/build/components/post-transform-panel/index.js.map +7 -1
- package/build/components/post-trash/check.js +33 -42
- package/build/components/post-trash/check.js.map +7 -1
- package/build/components/post-trash/index.js +78 -67
- package/build/components/post-trash/index.js.map +7 -1
- package/build/components/post-type-support-check/index.js +34 -47
- package/build/components/post-type-support-check/index.js.map +7 -1
- package/build/components/post-url/check.js +31 -32
- package/build/components/post-url/check.js.map +7 -1
- package/build/components/post-url/index.js +155 -156
- package/build/components/post-url/index.js.map +7 -1
- package/build/components/post-url/label.js +35 -30
- package/build/components/post-url/label.js.map +7 -1
- package/build/components/post-url/panel.js +111 -112
- package/build/components/post-url/panel.js.map +7 -1
- package/build/components/post-view-link/index.js +48 -47
- package/build/components/post-view-link/index.js.map +7 -1
- package/build/components/post-visibility/check.js +28 -33
- package/build/components/post-visibility/check.js.map +7 -1
- package/build/components/post-visibility/index.js +83 -84
- package/build/components/post-visibility/index.js.map +7 -1
- package/build/components/post-visibility/label.js +35 -30
- package/build/components/post-visibility/label.js.map +7 -1
- package/build/components/post-visibility/utils.js +44 -23
- package/build/components/post-visibility/utils.js.map +7 -1
- package/build/components/posts-per-page/index.js +110 -98
- package/build/components/posts-per-page/index.js.map +7 -1
- package/build/components/preferences-modal/enable-panel.js +47 -42
- package/build/components/preferences-modal/enable-panel.js.map +7 -1
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js +40 -31
- package/build/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
- package/build/components/preferences-modal/enable-publish-sidebar.js +39 -32
- package/build/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
- package/build/components/preferences-modal/index.js +391 -231
- package/build/components/preferences-modal/index.js.map +7 -1
- package/build/components/preview-dropdown/index.js +165 -151
- package/build/components/preview-dropdown/index.js.map +7 -1
- package/build/components/provider/disable-non-page-content-blocks.js +67 -82
- package/build/components/provider/disable-non-page-content-blocks.js.map +7 -1
- package/build/components/provider/index.js +283 -325
- package/build/components/provider/index.js.map +7 -1
- package/build/components/provider/navigation-block-editing-mode.js +32 -29
- package/build/components/provider/navigation-block-editing-mode.js.map +7 -1
- package/build/components/provider/use-auto-switch-editor-sidebars.js +48 -39
- package/build/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
- package/build/components/provider/use-block-editor-settings.js +249 -178
- package/build/components/provider/use-block-editor-settings.js.map +7 -1
- package/build/components/provider/use-hide-blocks-from-inserter.js +87 -46
- package/build/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
- package/build/components/provider/use-post-content-blocks.js +48 -29
- package/build/components/provider/use-post-content-blocks.js.map +7 -1
- package/build/components/provider/with-registry-provider.js +52 -46
- package/build/components/provider/with-registry-provider.js.map +7 -1
- package/build/components/resizable-editor/index.js +99 -86
- package/build/components/resizable-editor/index.js.map +7 -1
- package/build/components/resizable-editor/resize-handle.js +42 -36
- package/build/components/resizable-editor/resize-handle.js.map +7 -1
- package/build/components/save-publish-panels/index.js +88 -69
- package/build/components/save-publish-panels/index.js.map +7 -1
- package/build/components/sidebar/constants.js +29 -8
- package/build/components/sidebar/constants.js.map +7 -1
- package/build/components/sidebar/header.js +56 -50
- package/build/components/sidebar/header.js.map +7 -1
- package/build/components/sidebar/index.js +156 -136
- package/build/components/sidebar/index.js.map +7 -1
- package/build/components/sidebar/post-summary.js +114 -91
- package/build/components/sidebar/post-summary.js.map +7 -1
- package/build/components/site-discussion/index.js +132 -113
- package/build/components/site-discussion/index.js.map +7 -1
- package/build/components/start-page-options/index.js +136 -146
- package/build/components/start-page-options/index.js.map +7 -1
- package/build/components/start-template-options/index.js +168 -157
- package/build/components/start-template-options/index.js.map +7 -1
- package/build/components/table-of-contents/index.js +78 -69
- package/build/components/table-of-contents/index.js.map +7 -1
- package/build/components/table-of-contents/panel.js +101 -94
- package/build/components/table-of-contents/panel.js.map +7 -1
- package/build/components/template-content-panel/index.js +74 -58
- package/build/components/template-content-panel/index.js.map +7 -1
- package/build/components/template-part-content-panel/index.js +51 -54
- package/build/components/template-part-content-panel/index.js.map +7 -1
- package/build/components/template-part-menu-items/convert-to-regular.js +44 -32
- package/build/components/template-part-menu-items/convert-to-regular.js.map +7 -1
- package/build/components/template-part-menu-items/convert-to-template-part.js +76 -68
- package/build/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
- package/build/components/template-part-menu-items/index.js +62 -52
- package/build/components/template-part-menu-items/index.js.map +7 -1
- package/build/components/template-validation-notice/index.js +71 -47
- package/build/components/template-validation-notice/index.js.map +7 -1
- package/build/components/text-editor/index.js +68 -62
- package/build/components/text-editor/index.js.map +7 -1
- package/build/components/theme-support-check/index.js +32 -43
- package/build/components/theme-support-check/index.js.map +7 -1
- package/build/components/time-to-read/index.js +54 -51
- package/build/components/time-to-read/index.js.map +7 -1
- package/build/components/unsaved-changes-warning/index.js +34 -38
- package/build/components/unsaved-changes-warning/index.js.map +7 -1
- package/build/components/visual-editor/edit-template-blocks-notification.js +64 -68
- package/build/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
- package/build/components/visual-editor/index.js +286 -247
- package/build/components/visual-editor/index.js.map +7 -1
- package/build/components/visual-editor/use-select-nearest-editable-block.js +75 -68
- package/build/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
- package/build/components/visual-editor/use-zoom-out-mode-exit.js +52 -46
- package/build/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
- package/build/components/word-count/index.js +34 -35
- package/build/components/word-count/index.js.map +7 -1
- package/build/components/zoom-out-toggle/index.js +88 -72
- package/build/components/zoom-out-toggle/index.js.map +7 -1
- package/build/dataviews/api.js +47 -80
- package/build/dataviews/api.js.map +7 -1
- package/build/dataviews/fields/content-preview/content-preview-view.js +81 -89
- package/build/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
- package/build/dataviews/fields/content-preview/index.js +39 -21
- package/build/dataviews/fields/content-preview/index.js.map +7 -1
- package/build/dataviews/store/private-actions.js +122 -56
- package/build/dataviews/store/private-actions.js.map +7 -1
- package/build/dataviews/store/private-selectors.js +32 -15
- package/build/dataviews/store/private-selectors.js.map +7 -1
- package/build/dataviews/store/reducer.js +50 -31
- package/build/dataviews/store/reducer.js.map +7 -1
- package/build/hooks/custom-sources-backwards-compatibility.js +70 -83
- package/build/hooks/custom-sources-backwards-compatibility.js.map +7 -1
- package/build/hooks/default-autocompleters.js +9 -17
- package/build/hooks/default-autocompleters.js.map +7 -1
- package/build/hooks/index.js +7 -7
- package/build/hooks/index.js.map +7 -1
- package/build/hooks/media-upload.js +8 -9
- package/build/hooks/media-upload.js.map +7 -1
- package/build/hooks/navigation-link-view-button.js +44 -66
- package/build/hooks/navigation-link-view-button.js.map +7 -1
- package/build/hooks/pattern-overrides.js +51 -70
- package/build/hooks/pattern-overrides.js.map +7 -1
- package/build/hooks/template-part-navigation-edit-button.js +91 -0
- package/build/hooks/template-part-navigation-edit-button.js.map +7 -0
- package/build/index.js +41 -77
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/private-apis.js +76 -59
- package/build/private-apis.js.map +7 -1
- package/build/store/actions.js +516 -931
- package/build/store/actions.js.map +7 -1
- package/build/store/constants.js +70 -31
- package/build/store/constants.js.map +7 -1
- package/build/store/defaults.js +31 -33
- package/build/store/defaults.js.map +7 -1
- package/build/store/index.js +52 -41
- package/build/store/index.js.map +7 -1
- package/build/store/local-autosave.js +39 -27
- package/build/store/local-autosave.js.map +7 -1
- package/build/store/private-actions.js +290 -299
- package/build/store/private-actions.js.map +7 -1
- package/build/store/private-selectors.js +189 -188
- package/build/store/private-selectors.js.map +7 -1
- package/build/store/reducer.js +128 -280
- package/build/store/reducer.js.map +7 -1
- package/build/store/selectors.js +819 -1470
- package/build/store/selectors.js.map +7 -1
- package/build/store/utils/is-template-revertable.js +24 -19
- package/build/store/utils/is-template-revertable.js.map +7 -1
- package/build/store/utils/notice-builder.js +73 -94
- package/build/store/utils/notice-builder.js.map +7 -1
- package/build/utils/get-item-title.js +34 -25
- package/build/utils/get-item-title.js.map +7 -1
- package/build/utils/get-template-info.js +37 -46
- package/build/utils/get-template-info.js.map +7 -1
- package/build/utils/get-template-part-icon.js +34 -24
- package/build/utils/get-template-part-icon.js.map +7 -1
- package/build/utils/index.js +41 -24
- package/build/utils/index.js.map +7 -1
- package/build/utils/media-sideload/index.js +26 -19
- package/build/utils/media-sideload/index.js.map +7 -1
- package/build/utils/media-upload/index.js +46 -63
- package/build/utils/media-upload/index.js.map +7 -1
- package/build/utils/pageTypeBadge.js +33 -31
- package/build/utils/pageTypeBadge.js.map +7 -1
- package/build/utils/search-templates.js +45 -47
- package/build/utils/search-templates.js.map +7 -1
- package/build/utils/terms.js +57 -63
- package/build/utils/terms.js.map +7 -1
- package/build/utils/url.js +43 -33
- package/build/utils/url.js.map +7 -1
- package/build-module/bindings/api.js +11 -26
- package/build-module/bindings/api.js.map +7 -1
- package/build-module/bindings/entity.js +58 -0
- package/build-module/bindings/entity.js.map +7 -0
- package/build-module/bindings/pattern-overrides.js +39 -59
- package/build-module/bindings/pattern-overrides.js.map +7 -1
- package/build-module/bindings/post-data.js +53 -87
- package/build-module/bindings/post-data.js.map +7 -1
- package/build-module/bindings/post-meta.js +55 -101
- package/build-module/bindings/post-meta.js.map +7 -1
- package/build-module/components/autocompleters/index.js +5 -2
- package/build-module/components/autocompleters/index.js.map +7 -1
- package/build-module/components/autocompleters/user.js +45 -49
- package/build-module/components/autocompleters/user.js.map +7 -1
- package/build-module/components/autosave-monitor/index.js +37 -67
- package/build-module/components/autosave-monitor/index.js.map +7 -1
- package/build-module/components/block-removal-warnings/index.js +64 -54
- package/build-module/components/block-removal-warnings/index.js.map +7 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.js +136 -113
- package/build-module/components/block-settings-menu/content-only-settings-menu.js.map +7 -1
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js +23 -93
- package/build-module/components/block-settings-menu/plugin-block-settings-menu-item.js.map +7 -1
- package/build-module/components/block-visibility/index.js +103 -0
- package/build-module/components/block-visibility/index.js.map +7 -0
- package/build-module/components/blog-title/index.js +102 -101
- package/build-module/components/blog-title/index.js.map +7 -1
- package/build-module/components/character-count/index.js +13 -20
- package/build-module/components/character-count/index.js.map +7 -1
- package/build-module/components/collab-sidebar/add-comment.js +64 -66
- package/build-module/components/collab-sidebar/add-comment.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-author-info.js +55 -77
- package/build-module/components/collab-sidebar/comment-author-info.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-form.js +68 -75
- package/build-module/components/collab-sidebar/comment-form.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +67 -76
- package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +7 -1
- package/build-module/components/collab-sidebar/comment-menu-item.js +26 -0
- package/build-module/components/collab-sidebar/comment-menu-item.js.map +7 -0
- package/build-module/components/collab-sidebar/comments.js +521 -309
- package/build-module/components/collab-sidebar/comments.js.map +7 -1
- package/build-module/components/collab-sidebar/constants.js +7 -3
- package/build-module/components/collab-sidebar/constants.js.map +7 -1
- package/build-module/components/collab-sidebar/hooks.js +301 -54
- package/build-module/components/collab-sidebar/hooks.js.map +7 -1
- package/build-module/components/collab-sidebar/index.js +158 -245
- package/build-module/components/collab-sidebar/index.js.map +7 -1
- package/build-module/components/collab-sidebar/utils.js +71 -76
- package/build-module/components/collab-sidebar/utils.js.map +7 -1
- package/build-module/components/collapsible-block-toolbar/index.js +44 -52
- package/build-module/components/collapsible-block-toolbar/index.js.map +7 -1
- package/build-module/components/commands/index.js +188 -241
- package/build-module/components/commands/index.js.map +7 -1
- package/build-module/components/deprecated.js +297 -237
- package/build-module/components/deprecated.js.map +7 -1
- package/build-module/components/document-bar/index.js +114 -141
- package/build-module/components/document-bar/index.js.map +7 -1
- package/build-module/components/document-outline/check.js +10 -23
- package/build-module/components/document-outline/check.js.map +7 -1
- package/build-module/components/document-outline/index.js +141 -203
- package/build-module/components/document-outline/index.js.map +7 -1
- package/build-module/components/document-outline/item.js +40 -29
- package/build-module/components/document-outline/item.js.map +7 -1
- package/build-module/components/document-tools/index.js +115 -125
- package/build-module/components/document-tools/index.js.map +7 -1
- package/build-module/components/editor/index.js +71 -57
- package/build-module/components/editor/index.js.map +7 -1
- package/build-module/components/editor-history/redo.js +33 -49
- package/build-module/components/editor-history/redo.js.map +7 -1
- package/build-module/components/editor-history/undo.js +32 -48
- package/build-module/components/editor-history/undo.js.map +7 -1
- package/build-module/components/editor-interface/content-slot-fill.js +9 -7
- package/build-module/components/editor-interface/content-slot-fill.js.map +7 -1
- package/build-module/components/editor-interface/index.js +111 -118
- package/build-module/components/editor-interface/index.js.map +7 -1
- package/build-module/components/editor-notices/index.js +43 -53
- package/build-module/components/editor-notices/index.js.map +7 -1
- package/build-module/components/editor-snackbars/index.js +23 -29
- package/build-module/components/editor-snackbars/index.js.map +7 -1
- package/build-module/components/entities-saved-states/entity-record-item.js +52 -65
- package/build-module/components/entities-saved-states/entity-record-item.js.map +7 -1
- package/build-module/components/entities-saved-states/entity-type-list.js +81 -73
- package/build-module/components/entities-saved-states/entity-type-list.js.map +7 -1
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js +39 -55
- package/build-module/components/entities-saved-states/hooks/use-is-dirty.js.map +7 -1
- package/build-module/components/entities-saved-states/index.js +150 -152
- package/build-module/components/entities-saved-states/index.js.map +7 -1
- package/build-module/components/error-boundary/index.js +42 -77
- package/build-module/components/error-boundary/index.js.map +7 -1
- package/build-module/components/global-keyboard-shortcuts/index.js +39 -66
- package/build-module/components/global-keyboard-shortcuts/index.js.map +7 -1
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js +86 -88
- package/build-module/components/global-keyboard-shortcuts/register-shortcuts.js.map +7 -1
- package/build-module/components/global-styles-provider/index.js +135 -134
- package/build-module/components/global-styles-provider/index.js.map +7 -1
- package/build-module/components/header/back-button.js +20 -20
- package/build-module/components/header/back-button.js.map +7 -1
- package/build-module/components/header/index.js +148 -151
- package/build-module/components/header/index.js.map +7 -1
- package/build-module/components/index.js +192 -118
- package/build-module/components/index.js.map +7 -1
- package/build-module/components/inserter-sidebar/index.js +45 -64
- package/build-module/components/inserter-sidebar/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/config.js +62 -75
- package/build-module/components/keyboard-shortcut-help-modal/config.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js +33 -37
- package/build-module/components/keyboard-shortcut-help-modal/dynamic-shortcut.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/index.js +140 -105
- package/build-module/components/keyboard-shortcut-help-modal/index.js.map +7 -1
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js +58 -50
- package/build-module/components/keyboard-shortcut-help-modal/shortcut.js.map +7 -1
- package/build-module/components/list-view-sidebar/index.js +86 -109
- package/build-module/components/list-view-sidebar/index.js.map +7 -1
- package/build-module/components/list-view-sidebar/list-view-outline.js +29 -36
- package/build-module/components/list-view-sidebar/list-view-outline.js.map +7 -1
- package/build-module/components/local-autosave-monitor/index.js +81 -130
- package/build-module/components/local-autosave-monitor/index.js.map +7 -1
- package/build-module/components/media-categories/index.js +139 -137
- package/build-module/components/media-categories/index.js.map +7 -1
- package/build-module/components/mode-switcher/index.js +50 -60
- package/build-module/components/mode-switcher/index.js.map +7 -1
- package/build-module/components/more-menu/copy-content-menu-item.js +27 -37
- package/build-module/components/more-menu/copy-content-menu-item.js.map +7 -1
- package/build-module/components/more-menu/index.js +154 -113
- package/build-module/components/more-menu/index.js.map +7 -1
- package/build-module/components/more-menu/tools-more-menu-group.js +9 -16
- package/build-module/components/more-menu/tools-more-menu-group.js.map +7 -1
- package/build-module/components/more-menu/view-more-menu-group.js +12 -17
- package/build-module/components/more-menu/view-more-menu-group.js.map +7 -1
- package/build-module/components/page-attributes/check.js +15 -35
- package/build-module/components/page-attributes/check.js.map +7 -1
- package/build-module/components/page-attributes/order.js +42 -58
- package/build-module/components/page-attributes/order.js.map +7 -1
- package/build-module/components/page-attributes/panel.js +18 -37
- package/build-module/components/page-attributes/panel.js.map +7 -1
- package/build-module/components/page-attributes/parent.js +198 -197
- package/build-module/components/page-attributes/parent.js.map +7 -1
- package/build-module/components/pattern-duplicate-modal/index.js +36 -42
- package/build-module/components/pattern-duplicate-modal/index.js.map +7 -1
- package/build-module/components/pattern-overrides-panel/index.js +16 -19
- package/build-module/components/pattern-overrides-panel/index.js.map +7 -1
- package/build-module/components/pattern-rename-modal/index.js +29 -41
- package/build-module/components/pattern-rename-modal/index.js.map +7 -1
- package/build-module/components/plugin-document-setting-panel/index.js +46 -108
- package/build-module/components/plugin-document-setting-panel/index.js.map +7 -1
- package/build-module/components/plugin-more-menu-item/index.js +18 -74
- package/build-module/components/plugin-more-menu-item/index.js.map +7 -1
- package/build-module/components/plugin-post-publish-panel/index.js +19 -54
- package/build-module/components/plugin-post-publish-panel/index.js.map +7 -1
- package/build-module/components/plugin-post-status-info/index.js +9 -68
- package/build-module/components/plugin-post-status-info/index.js.map +7 -1
- package/build-module/components/plugin-pre-publish-panel/index.js +19 -57
- package/build-module/components/plugin-pre-publish-panel/index.js.map +7 -1
- package/build-module/components/plugin-preview-menu-item/index.js +18 -53
- package/build-module/components/plugin-preview-menu-item/index.js.map +7 -1
- package/build-module/components/plugin-sidebar/index.js +16 -83
- package/build-module/components/plugin-sidebar/index.js.map +7 -1
- package/build-module/components/plugin-sidebar-more-menu-item/index.js +15 -64
- package/build-module/components/plugin-sidebar-more-menu-item/index.js.map +7 -1
- package/build-module/components/post-actions/actions.js +85 -94
- package/build-module/components/post-actions/actions.js.map +7 -1
- package/build-module/components/post-actions/index.js +104 -121
- package/build-module/components/post-actions/index.js.map +7 -1
- package/build-module/components/post-actions/set-as-homepage.js +104 -115
- package/build-module/components/post-actions/set-as-homepage.js.map +7 -1
- package/build-module/components/post-actions/set-as-posts-page.js +99 -112
- package/build-module/components/post-actions/set-as-posts-page.js.map +7 -1
- package/build-module/components/post-author/check.js +12 -33
- package/build-module/components/post-author/check.js.map +7 -1
- package/build-module/components/post-author/combobox.js +32 -47
- package/build-module/components/post-author/combobox.js.map +7 -1
- package/build-module/components/post-author/constants.js +11 -6
- package/build-module/components/post-author/constants.js.map +7 -1
- package/build-module/components/post-author/hook.js +48 -65
- package/build-module/components/post-author/hook.js.map +7 -1
- package/build-module/components/post-author/index.js +14 -24
- package/build-module/components/post-author/index.js.map +7 -1
- package/build-module/components/post-author/panel.js +73 -87
- package/build-module/components/post-author/panel.js.map +7 -1
- package/build-module/components/post-author/select.js +28 -36
- package/build-module/components/post-author/select.js.map +7 -1
- package/build-module/components/post-card-panel/index.js +107 -105
- package/build-module/components/post-card-panel/index.js.map +7 -1
- package/build-module/components/post-comments/index.js +45 -50
- package/build-module/components/post-comments/index.js.map +7 -1
- package/build-module/components/post-content-information/index.js +49 -61
- package/build-module/components/post-content-information/index.js.map +7 -1
- package/build-module/components/post-discussion/panel.js +90 -122
- package/build-module/components/post-discussion/panel.js.map +7 -1
- package/build-module/components/post-excerpt/check.js +9 -23
- package/build-module/components/post-excerpt/check.js.map +7 -1
- package/build-module/components/post-excerpt/index.js +57 -68
- package/build-module/components/post-excerpt/index.js.map +7 -1
- package/build-module/components/post-excerpt/panel.js +124 -134
- package/build-module/components/post-excerpt/panel.js.map +7 -1
- package/build-module/components/post-excerpt/plugin.js +10 -65
- package/build-module/components/post-excerpt/plugin.js.map +7 -1
- package/build-module/components/post-featured-image/check.js +10 -28
- package/build-module/components/post-featured-image/check.js.map +7 -1
- package/build-module/components/post-featured-image/index.js +203 -200
- package/build-module/components/post-featured-image/index.js.map +7 -1
- package/build-module/components/post-featured-image/panel.js +26 -52
- package/build-module/components/post-featured-image/panel.js.map +7 -1
- package/build-module/components/post-fields/index.js +36 -49
- package/build-module/components/post-fields/index.js.map +7 -1
- package/build-module/components/post-format/check.js +14 -29
- package/build-module/components/post-format/check.js.map +7 -1
- package/build-module/components/post-format/index.js +68 -107
- package/build-module/components/post-format/index.js.map +7 -1
- package/build-module/components/post-format/panel.js +60 -73
- package/build-module/components/post-format/panel.js.map +7 -1
- package/build-module/components/post-last-edited-panel/index.js +20 -24
- package/build-module/components/post-last-edited-panel/index.js.map +7 -1
- package/build-module/components/post-last-revision/check.js +13 -37
- package/build-module/components/post-last-revision/check.js.map +7 -1
- package/build-module/components/post-last-revision/index.js +43 -59
- package/build-module/components/post-last-revision/index.js.map +7 -1
- package/build-module/components/post-last-revision/panel.js +10 -25
- package/build-module/components/post-last-revision/panel.js.map +7 -1
- package/build-module/components/post-locked-modal/index.js +133 -137
- package/build-module/components/post-locked-modal/index.js.map +7 -1
- package/build-module/components/post-panel-row/index.js +21 -29
- package/build-module/components/post-panel-row/index.js.map +7 -1
- package/build-module/components/post-panel-section/index.js +10 -20
- package/build-module/components/post-panel-section/index.js.map +7 -1
- package/build-module/components/post-pending-status/check.js +12 -35
- package/build-module/components/post-pending-status/check.js.map +7 -1
- package/build-module/components/post-pending-status/index.js +27 -36
- package/build-module/components/post-pending-status/index.js.map +7 -1
- package/build-module/components/post-pingbacks/index.js +34 -39
- package/build-module/components/post-pingbacks/index.js.map +7 -1
- package/build-module/components/post-preview-button/index.js +71 -114
- package/build-module/components/post-preview-button/index.js.map +7 -1
- package/build-module/components/post-publish-button/index.js +93 -130
- package/build-module/components/post-publish-button/index.js.map +7 -1
- package/build-module/components/post-publish-button/label.js +20 -35
- package/build-module/components/post-publish-button/label.js.map +7 -1
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js +28 -56
- package/build-module/components/post-publish-button/post-publish-button-or-toggle.js.map +7 -1
- package/build-module/components/post-publish-panel/index.js +108 -126
- package/build-module/components/post-publish-panel/index.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-category-panel.js +40 -58
- package/build-module/components/post-publish-panel/maybe-category-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js +55 -59
- package/build-module/components/post-publish-panel/maybe-post-format-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-tags-panel.js +57 -73
- package/build-module/components/post-publish-panel/maybe-tags-panel.js.map +7 -1
- package/build-module/components/post-publish-panel/maybe-upload-media.js +158 -207
- package/build-module/components/post-publish-panel/maybe-upload-media.js.map +7 -1
- package/build-module/components/post-publish-panel/media-util.js +42 -69
- package/build-module/components/post-publish-panel/media-util.js.map +7 -1
- package/build-module/components/post-publish-panel/postpublish.js +109 -120
- package/build-module/components/post-publish-panel/postpublish.js.map +7 -1
- package/build-module/components/post-publish-panel/prepublish.js +108 -96
- package/build-module/components/post-publish-panel/prepublish.js.map +7 -1
- package/build-module/components/post-saved-state/index.js +87 -124
- package/build-module/components/post-saved-state/index.js.map +7 -1
- package/build-module/components/post-schedule/check.js +9 -25
- package/build-module/components/post-schedule/check.js.map +7 -1
- package/build-module/components/post-schedule/index.js +75 -88
- package/build-module/components/post-schedule/index.js.map +7 -1
- package/build-module/components/post-schedule/label.js +49 -73
- package/build-module/components/post-schedule/label.js.map +7 -1
- package/build-module/components/post-schedule/panel.js +63 -65
- package/build-module/components/post-schedule/panel.js.map +7 -1
- package/build-module/components/post-status/index.js +223 -194
- package/build-module/components/post-status/index.js.map +7 -1
- package/build-module/components/post-sticky/check.js +10 -29
- package/build-module/components/post-sticky/check.js.map +7 -1
- package/build-module/components/post-sticky/index.js +22 -36
- package/build-module/components/post-sticky/index.js.map +7 -1
- package/build-module/components/post-sticky/panel.js +12 -15
- package/build-module/components/post-sticky/panel.js.map +7 -1
- package/build-module/components/post-switch-to-draft-button/index.js +54 -70
- package/build-module/components/post-switch-to-draft-button/index.js.map +7 -1
- package/build-module/components/post-sync-status/index.js +17 -40
- package/build-module/components/post-sync-status/index.js.map +7 -1
- package/build-module/components/post-taxonomies/check.js +17 -28
- package/build-module/components/post-taxonomies/check.js.map +7 -1
- package/build-module/components/post-taxonomies/flat-term-selector.js +154 -177
- package/build-module/components/post-taxonomies/flat-term-selector.js.map +7 -1
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js +232 -270
- package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +7 -1
- package/build-module/components/post-taxonomies/index.js +34 -49
- package/build-module/components/post-taxonomies/index.js.map +7 -1
- package/build-module/components/post-taxonomies/most-used-terms.js +54 -50
- package/build-module/components/post-taxonomies/most-used-terms.js.map +7 -1
- package/build-module/components/post-taxonomies/panel.js +39 -66
- package/build-module/components/post-taxonomies/panel.js.map +7 -1
- package/build-module/components/post-template/block-theme.js +134 -114
- package/build-module/components/post-template/block-theme.js.map +7 -1
- package/build-module/components/post-template/classic-theme.js +161 -177
- package/build-module/components/post-template/classic-theme.js.map +7 -1
- package/build-module/components/post-template/create-new-template-modal.js +126 -104
- package/build-module/components/post-template/create-new-template-modal.js.map +7 -1
- package/build-module/components/post-template/create-new-template.js +36 -39
- package/build-module/components/post-template/create-new-template.js.map +7 -1
- package/build-module/components/post-template/hooks.js +95 -80
- package/build-module/components/post-template/hooks.js.map +7 -1
- package/build-module/components/post-template/panel.js +25 -45
- package/build-module/components/post-template/panel.js.map +7 -1
- package/build-module/components/post-template/reset-default-template.js +33 -36
- package/build-module/components/post-template/reset-default-template.js.map +7 -1
- package/build-module/components/post-template/swap-template-button.js +86 -81
- package/build-module/components/post-template/swap-template-button.js.map +7 -1
- package/build-module/components/post-text-editor/index.js +49 -74
- package/build-module/components/post-text-editor/index.js.map +7 -1
- package/build-module/components/post-title/constants.js +7 -3
- package/build-module/components/post-title/constants.js.map +7 -1
- package/build-module/components/post-title/index.js +67 -111
- package/build-module/components/post-title/index.js.map +7 -1
- package/build-module/components/post-title/post-title-raw.js +43 -71
- package/build-module/components/post-title/post-title-raw.js.map +7 -1
- package/build-module/components/post-title/use-post-title-focus.js +15 -46
- package/build-module/components/post-title/use-post-title-focus.js.map +7 -1
- package/build-module/components/post-title/use-post-title.js +13 -33
- package/build-module/components/post-title/use-post-title.js.map +7 -1
- package/build-module/components/post-transform-panel/hooks.js +44 -58
- package/build-module/components/post-transform-panel/hooks.js.map +7 -1
- package/build-module/components/post-transform-panel/index.js +53 -69
- package/build-module/components/post-transform-panel/index.js.map +7 -1
- package/build-module/components/post-trash/check.js +14 -37
- package/build-module/components/post-trash/check.js.map +7 -1
- package/build-module/components/post-trash/index.js +49 -59
- package/build-module/components/post-trash/index.js.map +7 -1
- package/build-module/components/post-type-support-check/index.js +16 -42
- package/build-module/components/post-type-support-check/index.js.map +7 -1
- package/build-module/components/post-url/check.js +9 -24
- package/build-module/components/post-url/check.js.map +7 -1
- package/build-module/components/post-url/index.js +137 -146
- package/build-module/components/post-url/index.js.map +7 -1
- package/build-module/components/post-url/label.js +14 -26
- package/build-module/components/post-url/label.js.map +7 -1
- package/build-module/components/post-url/panel.js +80 -105
- package/build-module/components/post-url/panel.js.map +7 -1
- package/build-module/components/post-view-link/index.js +27 -39
- package/build-module/components/post-view-link/index.js.map +7 -1
- package/build-module/components/post-visibility/check.js +10 -29
- package/build-module/components/post-visibility/check.js.map +7 -1
- package/build-module/components/post-visibility/index.js +66 -78
- package/build-module/components/post-visibility/index.js.map +7 -1
- package/build-module/components/post-visibility/label.js +15 -27
- package/build-module/components/post-visibility/label.js.map +7 -1
- package/build-module/components/post-visibility/utils.js +22 -18
- package/build-module/components/post-visibility/utils.js.map +7 -1
- package/build-module/components/posts-per-page/index.js +85 -91
- package/build-module/components/posts-per-page/index.js.map +7 -1
- package/build-module/components/preferences-modal/enable-panel.js +30 -38
- package/build-module/components/preferences-modal/enable-panel.js.map +7 -1
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js +12 -25
- package/build-module/components/preferences-modal/enable-plugin-document-setting-panel.js.map +7 -1
- package/build-module/components/preferences-modal/enable-publish-sidebar.js +21 -27
- package/build-module/components/preferences-modal/enable-publish-sidebar.js.map +7 -1
- package/build-module/components/preferences-modal/index.js +365 -225
- package/build-module/components/preferences-modal/index.js.map +7 -1
- package/build-module/components/preview-dropdown/index.js +140 -141
- package/build-module/components/preview-dropdown/index.js.map +7 -1
- package/build-module/components/provider/disable-non-page-content-blocks.js +34 -72
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +7 -1
- package/build-module/components/provider/index.js +257 -317
- package/build-module/components/provider/index.js.map +7 -1
- package/build-module/components/provider/navigation-block-editing-mode.js +14 -25
- package/build-module/components/provider/navigation-block-editing-mode.js.map +7 -1
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js +28 -33
- package/build-module/components/provider/use-auto-switch-editor-sidebars.js.map +7 -1
- package/build-module/components/provider/use-block-editor-settings.js +223 -166
- package/build-module/components/provider/use-block-editor-settings.js.map +7 -1
- package/build-module/components/provider/use-hide-blocks-from-inserter.js +65 -42
- package/build-module/components/provider/use-hide-blocks-from-inserter.js.map +7 -1
- package/build-module/components/provider/use-post-content-blocks.js +31 -25
- package/build-module/components/provider/use-post-content-blocks.js.map +7 -1
- package/build-module/components/provider/with-registry-provider.js +34 -41
- package/build-module/components/provider/with-registry-provider.js.map +7 -1
- package/build-module/components/resizable-editor/index.js +70 -80
- package/build-module/components/resizable-editor/index.js.map +7 -1
- package/build-module/components/resizable-editor/resize-handle.js +27 -30
- package/build-module/components/resizable-editor/resize-handle.js.map +7 -1
- package/build-module/components/save-publish-panels/index.js +56 -62
- package/build-module/components/save-publish-panels/index.js.map +7 -1
- package/build-module/components/sidebar/constants.js +7 -4
- package/build-module/components/sidebar/constants.js.map +7 -1
- package/build-module/components/sidebar/header.js +38 -45
- package/build-module/components/sidebar/header.js.map +7 -1
- package/build-module/components/sidebar/index.js +136 -125
- package/build-module/components/sidebar/index.js.map +7 -1
- package/build-module/components/sidebar/post-summary.js +86 -87
- package/build-module/components/sidebar/post-summary.js.map +7 -1
- package/build-module/components/site-discussion/index.js +110 -107
- package/build-module/components/site-discussion/index.js.map +7 -1
- package/build-module/components/start-page-options/index.js +114 -137
- package/build-module/components/start-page-options/index.js.map +7 -1
- package/build-module/components/start-template-options/index.js +148 -150
- package/build-module/components/start-template-options/index.js.map +7 -1
- package/build-module/components/table-of-contents/index.js +50 -63
- package/build-module/components/table-of-contents/index.js.map +7 -1
- package/build-module/components/table-of-contents/panel.js +73 -88
- package/build-module/components/table-of-contents/panel.js.map +7 -1
- package/build-module/components/template-content-panel/index.js +57 -54
- package/build-module/components/template-content-panel/index.js.map +7 -1
- package/build-module/components/template-part-content-panel/index.js +35 -48
- package/build-module/components/template-part-content-panel/index.js.map +7 -1
- package/build-module/components/template-part-menu-items/convert-to-regular.js +26 -27
- package/build-module/components/template-part-menu-items/convert-to-regular.js.map +7 -1
- package/build-module/components/template-part-menu-items/convert-to-template-part.js +56 -61
- package/build-module/components/template-part-menu-items/convert-to-template-part.js.map +7 -1
- package/build-module/components/template-part-menu-items/index.js +38 -47
- package/build-module/components/template-part-menu-items/index.js.map +7 -1
- package/build-module/components/template-validation-notice/index.js +55 -41
- package/build-module/components/template-validation-notice/index.js.map +7 -1
- package/build-module/components/text-editor/index.js +38 -54
- package/build-module/components/text-editor/index.js.map +7 -1
- package/build-module/components/theme-support-check/index.js +13 -38
- package/build-module/components/theme-support-check/index.js.map +7 -1
- package/build-module/components/time-to-read/index.js +36 -48
- package/build-module/components/time-to-read/index.js.map +7 -1
- package/build-module/components/unsaved-changes-warning/index.js +16 -34
- package/build-module/components/unsaved-changes-warning/index.js.map +7 -1
- package/build-module/components/visual-editor/edit-template-blocks-notification.js +44 -63
- package/build-module/components/visual-editor/edit-template-blocks-notification.js.map +7 -1
- package/build-module/components/visual-editor/index.js +256 -225
- package/build-module/components/visual-editor/index.js.map +7 -1
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js +58 -64
- package/build-module/components/visual-editor/use-select-nearest-editable-block.js.map +7 -1
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js +31 -43
- package/build-module/components/visual-editor/use-zoom-out-mode-exit.js.map +7 -1
- package/build-module/components/word-count/index.js +16 -32
- package/build-module/components/word-count/index.js.map +7 -1
- package/build-module/components/zoom-out-toggle/index.js +72 -66
- package/build-module/components/zoom-out-toggle/index.js.map +7 -1
- package/build-module/dataviews/api.js +26 -77
- package/build-module/dataviews/api.js.map +7 -1
- package/build-module/dataviews/fields/content-preview/content-preview-view.js +66 -85
- package/build-module/dataviews/fields/content-preview/content-preview-view.js.map +7 -1
- package/build-module/dataviews/fields/content-preview/index.js +10 -15
- package/build-module/dataviews/fields/content-preview/index.js.map +7 -1
- package/build-module/dataviews/store/private-actions.js +113 -43
- package/build-module/dataviews/store/private-actions.js.map +7 -1
- package/build-module/dataviews/store/private-selectors.js +11 -12
- package/build-module/dataviews/store/private-selectors.js.map +7 -1
- package/build-module/dataviews/store/reducer.js +32 -26
- package/build-module/dataviews/store/reducer.js.map +7 -1
- package/build-module/hooks/custom-sources-backwards-compatibility.js +70 -83
- package/build-module/hooks/custom-sources-backwards-compatibility.js.map +7 -1
- package/build-module/hooks/default-autocompleters.js +9 -15
- package/build-module/hooks/default-autocompleters.js.map +7 -1
- package/build-module/hooks/index.js +7 -9
- package/build-module/hooks/index.js.map +7 -1
- package/build-module/hooks/media-upload.js +8 -7
- package/build-module/hooks/media-upload.js.map +7 -1
- package/build-module/hooks/navigation-link-view-button.js +46 -63
- package/build-module/hooks/navigation-link-view-button.js.map +7 -1
- package/build-module/hooks/pattern-overrides.js +48 -67
- package/build-module/hooks/pattern-overrides.js.map +7 -1
- package/build-module/hooks/template-part-navigation-edit-button.js +97 -0
- package/build-module/hooks/template-part-navigation-edit-button.js.map +7 -0
- package/build-module/index.js +13 -15
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/private-apis.js +31 -31
- package/build-module/private-apis.js.map +7 -1
- package/build-module/store/actions.js +424 -872
- package/build-module/store/actions.js.map +7 -1
- package/build-module/store/constants.js +36 -27
- package/build-module/store/constants.js.map +7 -1
- package/build-module/store/defaults.js +8 -28
- package/build-module/store/defaults.js.map +7 -1
- package/build-module/store/index.js +15 -30
- package/build-module/store/index.js.map +7 -1
- package/build-module/store/local-autosave.js +18 -24
- package/build-module/store/local-autosave.js.map +7 -1
- package/build-module/store/private-actions.js +242 -257
- package/build-module/store/private-actions.js.map +7 -1
- package/build-module/store/private-selectors.js +157 -174
- package/build-module/store/private-selectors.js.map +7 -1
- package/build-module/store/reducer.js +89 -267
- package/build-module/store/reducer.js.map +7 -1
- package/build-module/store/selectors.js +712 -1433
- package/build-module/store/selectors.js.map +7 -1
- package/build-module/store/utils/is-template-revertable.js +6 -15
- package/build-module/store/utils/is-template-revertable.js.map +7 -1
- package/build-module/store/utils/notice-builder.js +52 -91
- package/build-module/store/utils/notice-builder.js.map +7 -1
- package/build-module/utils/get-item-title.js +10 -19
- package/build-module/utils/get-item-title.js.map +7 -1
- package/build-module/utils/get-template-info.js +14 -38
- package/build-module/utils/get-template-info.js.map +7 -1
- package/build-module/utils/get-template-part-icon.js +14 -16
- package/build-module/utils/get-template-part-icon.js.map +7 -1
- package/build-module/utils/index.js +9 -8
- package/build-module/utils/index.js.map +7 -1
- package/build-module/utils/media-sideload/index.js +8 -14
- package/build-module/utils/media-sideload/index.js.map +7 -1
- package/build-module/utils/media-upload/index.js +26 -56
- package/build-module/utils/media-upload/index.js.map +7 -1
- package/build-module/utils/pageTypeBadge.js +16 -28
- package/build-module/utils/pageTypeBadge.js.map +7 -1
- package/build-module/utils/search-templates.js +12 -41
- package/build-module/utils/search-templates.js.map +7 -1
- package/build-module/utils/terms.js +32 -55
- package/build-module/utils/terms.js.map +7 -1
- package/build-module/utils/url.js +11 -28
- package/build-module/utils/url.js.map +7 -1
- package/build-style/style-rtl.css +327 -136
- package/build-style/style.css +327 -136
- package/build-types/bindings/entity.d.ts +16 -0
- package/build-types/bindings/entity.d.ts.map +1 -0
- package/build-types/bindings/post-data.d.ts +16 -0
- package/build-types/bindings/post-meta.d.ts +13 -0
- package/build-types/components/{preferences-modal/block-visibility.d.ts → block-visibility/index.d.ts} +1 -1
- package/build-types/components/block-visibility/index.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/add-comment.d.ts +6 -14
- package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-form.d.ts +9 -18
- package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts +5 -0
- package/build-types/components/collab-sidebar/comment-menu-item.d.ts.map +1 -0
- package/build-types/components/collab-sidebar/comments.d.ts +10 -1
- package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
- package/build-types/components/collab-sidebar/hooks.d.ts +33 -0
- 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/collab-sidebar/utils.d.ts +20 -0
- package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
- package/build-types/components/document-tools/index.d.ts.map +1 -1
- package/build-types/components/header/index.d.ts.map +1 -1
- package/build-types/components/post-excerpt/panel.d.ts.map +1 -1
- package/build-types/components/post-template/block-theme.d.ts.map +1 -1
- package/build-types/components/post-template/hooks.d.ts.map +1 -1
- package/build-types/components/provider/disable-non-page-content-blocks.d.ts.map +1 -1
- package/build-types/components/provider/use-hide-blocks-from-inserter.d.ts.map +1 -1
- package/build-types/components/visual-editor/index.d.ts.map +1 -1
- package/build-types/hooks/template-part-navigation-edit-button.d.ts +2 -0
- package/build-types/hooks/template-part-navigation-edit-button.d.ts.map +1 -0
- package/build-types/store/actions.d.ts.map +1 -1
- package/package.json +59 -39
- package/src/bindings/api.js +2 -2
- package/src/bindings/entity.js +89 -0
- package/src/bindings/post-data.js +23 -0
- package/src/bindings/post-meta.js +19 -0
- package/src/components/autocompleters/style.scss +2 -0
- package/src/components/block-settings-menu/style.scss +2 -0
- package/src/components/{preferences-modal/block-visibility.js → block-visibility/index.js} +37 -5
- package/src/components/block-visibility/style.scss +25 -0
- package/src/components/blog-title/style.scss +2 -0
- package/src/components/collab-sidebar/add-comment.js +18 -17
- package/src/components/collab-sidebar/comment-author-info.js +2 -2
- package/src/components/collab-sidebar/comment-form.js +15 -17
- package/src/components/collab-sidebar/comment-indicator-toolbar.js +2 -2
- package/src/components/collab-sidebar/{comment-button.js → comment-menu-item.js} +4 -4
- package/src/components/collab-sidebar/comments.js +413 -183
- package/src/components/collab-sidebar/hooks.js +343 -22
- package/src/components/collab-sidebar/index.js +94 -190
- package/src/components/collab-sidebar/style.scss +44 -26
- package/src/components/collab-sidebar/utils.js +55 -0
- package/src/components/collapsible-block-toolbar/style.scss +5 -1
- package/src/components/commands/index.js +2 -2
- package/src/components/document-bar/style.scss +5 -0
- package/src/components/document-outline/style.scss +3 -0
- package/src/components/document-tools/index.js +1 -20
- package/src/components/document-tools/style.scss +4 -0
- package/src/components/editor-help/style.scss +3 -0
- package/src/components/editor-interface/style.scss +2 -0
- package/src/components/editor-notices/style.scss +3 -0
- package/src/components/entities-saved-states/style.scss +3 -0
- package/src/components/error-boundary/style.scss +3 -0
- package/src/components/header/index.js +3 -8
- package/src/components/header/style.scss +6 -0
- package/src/components/inserter-sidebar/style.scss +2 -0
- package/src/components/keyboard-shortcut-help-modal/style.scss +2 -0
- package/src/components/list-view-sidebar/style.scss +4 -1
- package/src/components/page-attributes/style.scss +2 -0
- package/src/components/post-actions/style.scss +2 -0
- package/src/components/post-author/style.scss +2 -0
- package/src/components/post-card-panel/style.scss +4 -0
- package/src/components/post-content-information/style.scss +2 -0
- package/src/components/post-discussion/style.scss +2 -0
- package/src/components/post-excerpt/panel.js +12 -6
- package/src/components/post-excerpt/style.scss +2 -0
- package/src/components/post-featured-image/style.scss +7 -0
- package/src/components/post-format/style.scss +2 -0
- package/src/components/post-last-edited-panel/style.scss +2 -0
- package/src/components/post-last-revision/style.scss +3 -0
- package/src/components/post-locked-modal/style.scss +2 -0
- package/src/components/post-panel-row/style.scss +2 -0
- package/src/components/post-panel-section/style.scss +2 -0
- package/src/components/post-publish-button/post-publish-button-or-toggle.js +1 -1
- package/src/components/post-publish-panel/style.scss +5 -0
- package/src/components/post-saved-state/style.scss +4 -0
- package/src/components/post-schedule/style.scss +2 -0
- package/src/components/post-status/style.scss +3 -0
- package/src/components/post-sticky/style.scss +3 -0
- package/src/components/post-sync-status/style.scss +2 -0
- package/src/components/post-taxonomies/style.scss +2 -0
- package/src/components/post-template/block-theme.js +45 -3
- package/src/components/post-template/hooks.js +48 -21
- package/src/components/post-template/style.scss +5 -0
- package/src/components/post-text-editor/style.scss +4 -0
- package/src/components/post-title/style.scss +2 -0
- package/src/components/post-url/style.scss +2 -0
- package/src/components/posts-per-page/style.scss +2 -0
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/provider/disable-non-page-content-blocks.js +7 -13
- package/src/components/provider/use-hide-blocks-from-inserter.js +37 -6
- package/src/components/resizable-editor/style.scss +4 -0
- package/src/components/save-publish-panels/style.scss +4 -0
- package/src/components/sidebar/style.scss +3 -0
- package/src/components/site-discussion/style.scss +2 -1
- package/src/components/start-page-options/style.scss +5 -0
- package/src/components/start-template-options/style.scss +5 -0
- package/src/components/table-of-contents/style.scss +5 -0
- package/src/components/text-editor/style.scss +6 -0
- package/src/components/visual-editor/index.js +11 -21
- package/src/components/visual-editor/style.scss +3 -1
- package/src/dataviews/fields/content-preview/style.scss +2 -0
- package/src/hooks/index.js +1 -0
- package/src/hooks/template-part-navigation-edit-button.js +145 -0
- package/src/store/actions.js +6 -1
- package/src/style.scss +57 -56
- package/tsconfig.tsbuildinfo +1 -1
- package/build/bindings/term-data.js +0 -171
- package/build/bindings/term-data.js.map +0 -1
- package/build/components/block-settings-menu/content-only-settings-menu.native.js +0 -11
- package/build/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
- package/build/components/collab-sidebar/comment-button.js +0 -42
- package/build/components/collab-sidebar/comment-button.js.map +0 -1
- package/build/components/commands/index.native.js +0 -9
- package/build/components/commands/index.native.js.map +0 -1
- package/build/components/deprecated.native.js +0 -121
- package/build/components/deprecated.native.js.map +0 -1
- package/build/components/editor-help/add-blocks.native.js +0 -41
- package/build/components/editor-help/add-blocks.native.js.map +0 -1
- package/build/components/editor-help/customize-blocks.native.js +0 -41
- package/build/components/editor-help/customize-blocks.native.js.map +0 -1
- package/build/components/editor-help/help-detail-navigation-screen.native.js +0 -69
- package/build/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
- package/build/components/editor-help/help-get-support-button.native.js +0 -41
- package/build/components/editor-help/help-get-support-button.native.js.map +0 -1
- package/build/components/editor-help/help-section-title.native.js +0 -37
- package/build/components/editor-help/help-section-title.native.js.map +0 -1
- package/build/components/editor-help/help-topic-row.native.js +0 -42
- package/build/components/editor-help/help-topic-row.native.js.map +0 -1
- package/build/components/editor-help/icon-move-blocks.native.js +0 -19
- package/build/components/editor-help/icon-move-blocks.native.js.map +0 -1
- package/build/components/editor-help/index.native.js +0 -173
- package/build/components/editor-help/index.native.js.map +0 -1
- package/build/components/editor-help/intro-to-blocks.native.js +0 -70
- package/build/components/editor-help/intro-to-blocks.native.js.map +0 -1
- package/build/components/editor-help/move-blocks.native.js +0 -52
- package/build/components/editor-help/move-blocks.native.js.map +0 -1
- package/build/components/editor-help/remove-blocks.native.js +0 -39
- package/build/components/editor-help/remove-blocks.native.js.map +0 -1
- package/build/components/editor-help/view-sections.native.js +0 -80
- package/build/components/editor-help/view-sections.native.js.map +0 -1
- package/build/components/error-boundary/index.native.js +0 -143
- package/build/components/error-boundary/index.native.js.map +0 -1
- package/build/components/index.native.js +0 -85
- package/build/components/index.native.js.map +0 -1
- package/build/components/offline-status/index.native.js +0 -83
- package/build/components/offline-status/index.native.js.map +0 -1
- package/build/components/post-title/index.native.js +0 -251
- package/build/components/post-title/index.native.js.map +0 -1
- package/build/components/preferences-modal/block-visibility.js +0 -88
- package/build/components/preferences-modal/block-visibility.js.map +0 -1
- package/build/components/provider/index.native.js +0 -426
- package/build/components/provider/index.native.js.map +0 -1
- package/build/components/provider/use-block-editor-settings.native.js +0 -46
- package/build/components/provider/use-block-editor-settings.native.js.map +0 -1
- package/build/components/template-part-menu-items/index.native.js +0 -10
- package/build/components/template-part-menu-items/index.native.js.map +0 -1
- package/build/hooks/index.native.js +0 -2
- package/build/hooks/index.native.js.map +0 -1
- package/build/index.native.js +0 -56
- package/build/index.native.js.map +0 -1
- package/build/private-apis.native.js +0 -44
- package/build/private-apis.native.js.map +0 -1
- package/build/store/actions.native.js +0 -51
- package/build/store/actions.native.js.map +0 -1
- package/build/store/reducer.native.js +0 -105
- package/build/store/reducer.native.js.map +0 -1
- package/build/store/selectors.native.js +0 -70
- package/build/store/selectors.native.js.map +0 -1
- package/build/utils/index.native.js +0 -14
- package/build/utils/index.native.js.map +0 -1
- package/build/utils/media-sideload/index.native.js +0 -8
- package/build/utils/media-sideload/index.native.js.map +0 -1
- package/build/utils/media-upload/index.native.js +0 -8
- package/build/utils/media-upload/index.native.js.map +0 -1
- package/build-module/bindings/term-data.js +0 -165
- package/build-module/bindings/term-data.js.map +0 -1
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js +0 -5
- package/build-module/components/block-settings-menu/content-only-settings-menu.native.js.map +0 -1
- package/build-module/components/collab-sidebar/comment-button.js +0 -35
- package/build-module/components/collab-sidebar/comment-button.js.map +0 -1
- package/build-module/components/commands/index.native.js +0 -3
- package/build-module/components/commands/index.native.js.map +0 -1
- package/build-module/components/deprecated.native.js +0 -7
- package/build-module/components/deprecated.native.js.map +0 -1
- package/build-module/components/editor-help/add-blocks.native.js +0 -33
- package/build-module/components/editor-help/add-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/customize-blocks.native.js +0 -33
- package/build-module/components/editor-help/customize-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js +0 -61
- package/build-module/components/editor-help/help-detail-navigation-screen.native.js.map +0 -1
- package/build-module/components/editor-help/help-get-support-button.native.js +0 -33
- package/build-module/components/editor-help/help-get-support-button.native.js.map +0 -1
- package/build-module/components/editor-help/help-section-title.native.js +0 -29
- package/build-module/components/editor-help/help-section-title.native.js.map +0 -1
- package/build-module/components/editor-help/help-topic-row.native.js +0 -35
- package/build-module/components/editor-help/help-topic-row.native.js.map +0 -1
- package/build-module/components/editor-help/icon-move-blocks.native.js +0 -13
- package/build-module/components/editor-help/icon-move-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/index.native.js +0 -165
- package/build-module/components/editor-help/index.native.js.map +0 -1
- package/build-module/components/editor-help/intro-to-blocks.native.js +0 -62
- package/build-module/components/editor-help/intro-to-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/move-blocks.native.js +0 -44
- package/build-module/components/editor-help/move-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/remove-blocks.native.js +0 -31
- package/build-module/components/editor-help/remove-blocks.native.js.map +0 -1
- package/build-module/components/editor-help/view-sections.native.js +0 -69
- package/build-module/components/editor-help/view-sections.native.js.map +0 -1
- package/build-module/components/error-boundary/index.native.js +0 -135
- package/build-module/components/error-boundary/index.native.js.map +0 -1
- package/build-module/components/index.native.js +0 -15
- package/build-module/components/index.native.js.map +0 -1
- package/build-module/components/offline-status/index.native.js +0 -77
- package/build-module/components/offline-status/index.native.js.map +0 -1
- package/build-module/components/post-title/index.native.js +0 -243
- package/build-module/components/post-title/index.native.js.map +0 -1
- package/build-module/components/preferences-modal/block-visibility.js +0 -81
- package/build-module/components/preferences-modal/block-visibility.js.map +0 -1
- package/build-module/components/provider/index.native.js +0 -416
- package/build-module/components/provider/index.native.js.map +0 -1
- package/build-module/components/provider/use-block-editor-settings.native.js +0 -38
- package/build-module/components/provider/use-block-editor-settings.native.js.map +0 -1
- package/build-module/components/template-part-menu-items/index.native.js +0 -4
- package/build-module/components/template-part-menu-items/index.native.js.map +0 -1
- package/build-module/hooks/index.native.js +0 -2
- package/build-module/hooks/index.native.js.map +0 -1
- package/build-module/index.native.js +0 -16
- package/build-module/index.native.js.map +0 -1
- package/build-module/private-apis.native.js +0 -34
- package/build-module/private-apis.native.js.map +0 -1
- package/build-module/store/actions.native.js +0 -27
- package/build-module/store/actions.native.js.map +0 -1
- package/build-module/store/reducer.native.js +0 -81
- package/build-module/store/reducer.native.js.map +0 -1
- package/build-module/store/selectors.native.js +0 -49
- package/build-module/store/selectors.native.js.map +0 -1
- package/build-module/utils/index.native.js +0 -6
- package/build-module/utils/index.native.js.map +0 -1
- package/build-module/utils/media-sideload/index.native.js +0 -2
- package/build-module/utils/media-sideload/index.native.js.map +0 -1
- package/build-module/utils/media-upload/index.native.js +0 -2
- package/build-module/utils/media-upload/index.native.js.map +0 -1
- package/build-types/bindings/term-data.d.ts +0 -25
- package/build-types/bindings/term-data.d.ts.map +0 -1
- package/build-types/components/collab-sidebar/comment-button.d.ts +0 -5
- package/build-types/components/collab-sidebar/comment-button.d.ts.map +0 -1
- package/build-types/components/preferences-modal/block-visibility.d.ts.map +0 -1
- package/src/bindings/term-data.js +0 -159
package/build/bindings/api.js
CHANGED
|
@@ -1,37 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.
|
|
5
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var api_exports = {};
|
|
30
|
+
__export(api_exports, {
|
|
31
|
+
registerCoreBlockBindingsSources: () => registerCoreBlockBindingsSources
|
|
6
32
|
});
|
|
7
|
-
exports
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
/**
|
|
14
|
-
* WordPress dependencies
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Internal dependencies
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Function to register core block bindings sources provided by the editor.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```js
|
|
26
|
-
* import { registerCoreBlockBindingsSources } from '@wordpress/editor';
|
|
27
|
-
*
|
|
28
|
-
* registerCoreBlockBindingsSources();
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
33
|
+
module.exports = __toCommonJS(api_exports);
|
|
34
|
+
var import_blocks = require("@wordpress/blocks");
|
|
35
|
+
var import_pattern_overrides = __toESM(require("./pattern-overrides"));
|
|
36
|
+
var import_post_data = __toESM(require("./post-data"));
|
|
37
|
+
var import_post_meta = __toESM(require("./post-meta"));
|
|
38
|
+
var import_entity = __toESM(require("./entity"));
|
|
31
39
|
function registerCoreBlockBindingsSources() {
|
|
32
|
-
(0,
|
|
33
|
-
(0,
|
|
34
|
-
(0,
|
|
35
|
-
(0,
|
|
40
|
+
(0, import_blocks.registerBlockBindingsSource)(import_pattern_overrides.default);
|
|
41
|
+
(0, import_blocks.registerBlockBindingsSource)(import_post_data.default);
|
|
42
|
+
(0, import_blocks.registerBlockBindingsSource)(import_post_meta.default);
|
|
43
|
+
(0, import_blocks.registerBlockBindingsSource)(import_entity.default);
|
|
36
44
|
}
|
|
37
|
-
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
registerCoreBlockBindingsSources
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=api.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/bindings/api.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { registerBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport patternOverrides from './pattern-overrides';\nimport postData from './post-data';\nimport postMeta from './post-meta';\nimport entity from './entity';\n\n/**\n * Function to register core block bindings sources provided by the editor.\n *\n * @example\n * ```js\n * import { registerCoreBlockBindingsSources } from '@wordpress/editor';\n *\n * registerCoreBlockBindingsSources();\n * ```\n */\nexport function registerCoreBlockBindingsSources() {\n\tregisterBlockBindingsSource( patternOverrides );\n\tregisterBlockBindingsSource( postData );\n\tregisterBlockBindingsSource( postMeta );\n\tregisterBlockBindingsSource( entity );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA4C;AAK5C,+BAA6B;AAC7B,uBAAqB;AACrB,uBAAqB;AACrB,oBAAmB;AAYZ,SAAS,mCAAmC;AAClD,iDAA6B,yBAAAA,OAAiB;AAC9C,iDAA6B,iBAAAC,OAAS;AACtC,iDAA6B,iBAAAC,OAAS;AACtC,iDAA6B,cAAAC,OAAO;AACrC;",
|
|
6
|
+
"names": ["patternOverrides", "postData", "postMeta", "entity"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var entity_exports = {};
|
|
20
|
+
__export(entity_exports, {
|
|
21
|
+
default: () => entity_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(entity_exports);
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_core_data = require("@wordpress/core-data");
|
|
26
|
+
var entity_default = {
|
|
27
|
+
name: "core/entity",
|
|
28
|
+
label: (0, import_i18n.__)("Entity"),
|
|
29
|
+
getValues({ select, clientId, bindings }) {
|
|
30
|
+
const { getBlockAttributes } = select("core/block-editor");
|
|
31
|
+
const blockAttributes = getBlockAttributes(clientId);
|
|
32
|
+
const entityId = blockAttributes?.id;
|
|
33
|
+
if (!entityId) {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
const urlBinding = bindings.url;
|
|
37
|
+
if (!urlBinding?.args?.key) {
|
|
38
|
+
return {};
|
|
39
|
+
}
|
|
40
|
+
const key = urlBinding.args.key;
|
|
41
|
+
if (key !== "url") {
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
const { type, kind } = blockAttributes || {};
|
|
45
|
+
if (!type || !kind) {
|
|
46
|
+
return {};
|
|
47
|
+
}
|
|
48
|
+
if (kind !== "post-type" && kind !== "taxonomy") {
|
|
49
|
+
return {};
|
|
50
|
+
}
|
|
51
|
+
const { getEntityRecord } = select(import_core_data.store);
|
|
52
|
+
let value = "";
|
|
53
|
+
if (kind === "post-type") {
|
|
54
|
+
const post = getEntityRecord("postType", type, entityId);
|
|
55
|
+
if (!post) {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
value = post.link || "";
|
|
59
|
+
} else if (kind === "taxonomy") {
|
|
60
|
+
const taxonomySlug = type === "tag" ? "post_tag" : type;
|
|
61
|
+
const term = getEntityRecord("taxonomy", taxonomySlug, entityId);
|
|
62
|
+
if (!term) {
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
65
|
+
value = term.link || "";
|
|
66
|
+
}
|
|
67
|
+
if (!value) {
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
url: value
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
canUserEditValue() {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=entity.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/bindings/entity.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nexport default {\n\tname: 'core/entity',\n\tlabel: __( 'Entity' ),\n\tgetValues( { select, clientId, bindings } ) {\n\t\tconst { getBlockAttributes } = select( 'core/block-editor' );\n\n\t\t// Get the nav link's id attribute\n\t\tconst blockAttributes = getBlockAttributes( clientId );\n\t\tconst entityId = blockAttributes?.id;\n\n\t\tif ( ! entityId ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Get the key from binding args - no key means invalid binding\n\t\tconst urlBinding = bindings.url;\n\t\tif ( ! urlBinding?.args?.key ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst key = urlBinding.args.key;\n\n\t\t// For now, only support 'url' key\n\t\tif ( key !== 'url' ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Get the entity type and kind from block attributes\n\t\tconst { type, kind } = blockAttributes || {};\n\n\t\t// Validate required attributes exist\n\t\tif ( ! type || ! kind ) {\n\t\t\treturn {};\n\t\t}\n\n\t\t// Validate entity kind is supported\n\t\tif ( kind !== 'post-type' && kind !== 'taxonomy' ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tlet value = '';\n\n\t\t// Handle post types\n\t\tif ( kind === 'post-type' ) {\n\t\t\tconst post = getEntityRecord( 'postType', type, entityId );\n\n\t\t\tif ( ! post ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tvalue = post.link || '';\n\t\t}\n\t\t// Handle taxonomies\n\t\telse if ( kind === 'taxonomy' ) {\n\t\t\t// Convert 'tag' back to 'post_tag' for API calls\n\t\t\t// See https://github.com/WordPress/gutenberg/issues/71979.\n\t\t\tconst taxonomySlug = type === 'tag' ? 'post_tag' : type;\n\t\t\tconst term = getEntityRecord( 'taxonomy', taxonomySlug, entityId );\n\n\t\t\tif ( ! term ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tvalue = term.link || '';\n\t\t}\n\n\t\t// If we couldn't get a valid URL, return empty object\n\t\tif ( ! value ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\turl: value,\n\t\t};\n\t},\n\tcanUserEditValue() {\n\t\t// This binding source provides read-only URLs derived from entity data\n\t\t// Users cannot manually edit these values as they are automatically\n\t\t// generated from the linked post/term's permalink\n\t\treturn false;\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,uBAAuC;AAEvC,IAAO,iBAAQ;AAAA,EACd,MAAM;AAAA,EACN,WAAO,gBAAI,QAAS;AAAA,EACpB,UAAW,EAAE,QAAQ,UAAU,SAAS,GAAI;AAC3C,UAAM,EAAE,mBAAmB,IAAI,OAAQ,mBAAoB;AAG3D,UAAM,kBAAkB,mBAAoB,QAAS;AACrD,UAAM,WAAW,iBAAiB;AAElC,QAAK,CAAE,UAAW;AACjB,aAAO,CAAC;AAAA,IACT;AAGA,UAAM,aAAa,SAAS;AAC5B,QAAK,CAAE,YAAY,MAAM,KAAM;AAC9B,aAAO,CAAC;AAAA,IACT;AAEA,UAAM,MAAM,WAAW,KAAK;AAG5B,QAAK,QAAQ,OAAQ;AACpB,aAAO,CAAC;AAAA,IACT;AAGA,UAAM,EAAE,MAAM,KAAK,IAAI,mBAAmB,CAAC;AAG3C,QAAK,CAAE,QAAQ,CAAE,MAAO;AACvB,aAAO,CAAC;AAAA,IACT;AAGA,QAAK,SAAS,eAAe,SAAS,YAAa;AAClD,aAAO,CAAC;AAAA,IACT;AAEA,UAAM,EAAE,gBAAgB,IAAI,OAAQ,iBAAAA,KAAc;AAClD,QAAI,QAAQ;AAGZ,QAAK,SAAS,aAAc;AAC3B,YAAM,OAAO,gBAAiB,YAAY,MAAM,QAAS;AAEzD,UAAK,CAAE,MAAO;AACb,eAAO,CAAC;AAAA,MACT;AAEA,cAAQ,KAAK,QAAQ;AAAA,IACtB,WAEU,SAAS,YAAa;AAG/B,YAAM,eAAe,SAAS,QAAQ,aAAa;AACnD,YAAM,OAAO,gBAAiB,YAAY,cAAc,QAAS;AAEjE,UAAK,CAAE,MAAO;AACb,eAAO,CAAC;AAAA,MACT;AAEA,cAAQ,KAAK,QAAQ;AAAA,IACtB;AAGA,QAAK,CAAE,OAAQ;AACd,aAAO,CAAC;AAAA,IACT;AAEA,WAAO;AAAA,MACN,KAAK;AAAA,IACN;AAAA,EACD;AAAA,EACA,mBAAmB;AAIlB,WAAO;AAAA,EACR;AACD;",
|
|
6
|
+
"names": ["coreDataStore"]
|
|
7
|
+
}
|
|
@@ -1,79 +1,73 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var pattern_overrides_exports = {};
|
|
20
|
+
__export(pattern_overrides_exports, {
|
|
21
|
+
default: () => pattern_overrides_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @type {WPBlockBindingsSource}
|
|
16
|
-
*/
|
|
17
|
-
var _default = exports.default = {
|
|
18
|
-
name: 'core/pattern-overrides',
|
|
19
|
-
getValues({
|
|
20
|
-
select,
|
|
21
|
-
clientId,
|
|
22
|
-
context,
|
|
23
|
-
bindings
|
|
24
|
-
}) {
|
|
25
|
-
const patternOverridesContent = context['pattern/overrides'];
|
|
26
|
-
const {
|
|
27
|
-
getBlockAttributes
|
|
28
|
-
} = select(_blockEditor.store);
|
|
23
|
+
module.exports = __toCommonJS(pattern_overrides_exports);
|
|
24
|
+
var import_block_editor = require("@wordpress/block-editor");
|
|
25
|
+
const CONTENT = "content";
|
|
26
|
+
var pattern_overrides_default = {
|
|
27
|
+
name: "core/pattern-overrides",
|
|
28
|
+
getValues({ select, clientId, context, bindings }) {
|
|
29
|
+
const patternOverridesContent = context["pattern/overrides"];
|
|
30
|
+
const { getBlockAttributes } = select(import_block_editor.store);
|
|
29
31
|
const currentBlockAttributes = getBlockAttributes(clientId);
|
|
30
32
|
const overridesValues = {};
|
|
31
33
|
for (const attributeName of Object.keys(bindings)) {
|
|
32
34
|
const overridableValue = patternOverridesContent?.[currentBlockAttributes?.metadata?.name]?.[attributeName];
|
|
33
|
-
|
|
34
|
-
// If it has not been overridden, return the original value.
|
|
35
|
-
// Check undefined because empty string is a valid value.
|
|
36
|
-
if (overridableValue === undefined) {
|
|
35
|
+
if (overridableValue === void 0) {
|
|
37
36
|
overridesValues[attributeName] = currentBlockAttributes[attributeName];
|
|
38
37
|
continue;
|
|
39
38
|
} else {
|
|
40
|
-
overridesValues[attributeName] = overridableValue ===
|
|
39
|
+
overridesValues[attributeName] = overridableValue === "" ? void 0 : overridableValue;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
return overridesValues;
|
|
44
43
|
},
|
|
45
|
-
setValues({
|
|
46
|
-
select
|
|
47
|
-
dispatch,
|
|
48
|
-
clientId,
|
|
49
|
-
bindings
|
|
50
|
-
}) {
|
|
51
|
-
const {
|
|
52
|
-
getBlockAttributes,
|
|
53
|
-
getBlockParentsByBlockName,
|
|
54
|
-
getBlocks
|
|
55
|
-
} = select(_blockEditor.store);
|
|
44
|
+
setValues({ select, dispatch, clientId, bindings }) {
|
|
45
|
+
const { getBlockAttributes, getBlockParentsByBlockName, getBlocks } = select(import_block_editor.store);
|
|
56
46
|
const currentBlockAttributes = getBlockAttributes(clientId);
|
|
57
47
|
const blockName = currentBlockAttributes?.metadata?.name;
|
|
58
48
|
if (!blockName) {
|
|
59
49
|
return;
|
|
60
50
|
}
|
|
61
|
-
const [patternClientId] = getBlockParentsByBlockName(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
attrs[key]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
51
|
+
const [patternClientId] = getBlockParentsByBlockName(
|
|
52
|
+
clientId,
|
|
53
|
+
"core/block",
|
|
54
|
+
true
|
|
55
|
+
);
|
|
56
|
+
const attributes = Object.entries(bindings).reduce(
|
|
57
|
+
(attrs, [key, { newValue }]) => {
|
|
58
|
+
attrs[key] = newValue;
|
|
59
|
+
return attrs;
|
|
60
|
+
},
|
|
61
|
+
{}
|
|
62
|
+
);
|
|
72
63
|
if (!patternClientId) {
|
|
73
|
-
const syncBlocksWithSameName = blocks => {
|
|
64
|
+
const syncBlocksWithSameName = (blocks) => {
|
|
74
65
|
for (const block of blocks) {
|
|
75
66
|
if (block.attributes?.metadata?.name === blockName) {
|
|
76
|
-
dispatch(
|
|
67
|
+
dispatch(import_block_editor.store).updateBlockAttributes(
|
|
68
|
+
block.clientId,
|
|
69
|
+
attributes
|
|
70
|
+
);
|
|
77
71
|
}
|
|
78
72
|
syncBlocksWithSameName(block.innerBlocks);
|
|
79
73
|
}
|
|
@@ -82,23 +76,22 @@ var _default = exports.default = {
|
|
|
82
76
|
return;
|
|
83
77
|
}
|
|
84
78
|
const currentBindingValue = getBlockAttributes(patternClientId)?.[CONTENT];
|
|
85
|
-
dispatch(
|
|
79
|
+
dispatch(import_block_editor.store).updateBlockAttributes(patternClientId, {
|
|
86
80
|
[CONTENT]: {
|
|
87
81
|
...currentBindingValue,
|
|
88
82
|
[blockName]: {
|
|
89
83
|
...currentBindingValue?.[blockName],
|
|
90
|
-
...Object.entries(attributes).reduce(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}, {})
|
|
84
|
+
...Object.entries(attributes).reduce(
|
|
85
|
+
(acc, [key, value]) => {
|
|
86
|
+
acc[key] = value === void 0 ? "" : value;
|
|
87
|
+
return acc;
|
|
88
|
+
},
|
|
89
|
+
{}
|
|
90
|
+
)
|
|
98
91
|
}
|
|
99
92
|
}
|
|
100
93
|
});
|
|
101
94
|
},
|
|
102
95
|
canUserEditValue: () => true
|
|
103
96
|
};
|
|
104
|
-
//# sourceMappingURL=pattern-overrides.js.map
|
|
97
|
+
//# sourceMappingURL=pattern-overrides.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/bindings/pattern-overrides.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst CONTENT = 'content';\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/pattern-overrides',\n\tgetValues( { select, clientId, context, bindings } ) {\n\t\tconst patternOverridesContent = context[ 'pattern/overrides' ];\n\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\n\t\tconst overridesValues = {};\n\t\tfor ( const attributeName of Object.keys( bindings ) ) {\n\t\t\tconst overridableValue =\n\t\t\t\tpatternOverridesContent?.[\n\t\t\t\t\tcurrentBlockAttributes?.metadata?.name\n\t\t\t\t]?.[ attributeName ];\n\n\t\t\t// If it has not been overridden, return the original value.\n\t\t\t// Check undefined because empty string is a valid value.\n\t\t\tif ( overridableValue === undefined ) {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\tcurrentBlockAttributes[ attributeName ];\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\toverridableValue === '' ? undefined : overridableValue;\n\t\t\t}\n\t\t}\n\t\treturn overridesValues;\n\t},\n\tsetValues( { select, dispatch, clientId, bindings } ) {\n\t\tconst { getBlockAttributes, getBlockParentsByBlockName, getBlocks } =\n\t\t\tselect( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\t\tconst blockName = currentBlockAttributes?.metadata?.name;\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ patternClientId ] = getBlockParentsByBlockName(\n\t\t\tclientId,\n\t\t\t'core/block',\n\t\t\ttrue\n\t\t);\n\n\t\t// Extract the updated attributes from the source bindings.\n\t\tconst attributes = Object.entries( bindings ).reduce(\n\t\t\t( attrs, [ key, { newValue } ] ) => {\n\t\t\t\tattrs[ key ] = newValue;\n\t\t\t\treturn attrs;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\t// If there is no pattern client ID, sync blocks with the same name and same attributes.\n\t\tif ( ! patternClientId ) {\n\t\t\tconst syncBlocksWithSameName = ( blocks ) => {\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\tif ( block.attributes?.metadata?.name === blockName ) {\n\t\t\t\t\t\tdispatch( blockEditorStore ).updateBlockAttributes(\n\t\t\t\t\t\t\tblock.clientId,\n\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tsyncBlocksWithSameName( block.innerBlocks );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsyncBlocksWithSameName( getBlocks() );\n\t\t\treturn;\n\t\t}\n\t\tconst currentBindingValue =\n\t\t\tgetBlockAttributes( patternClientId )?.[ CONTENT ];\n\n\t\tdispatch( blockEditorStore ).updateBlockAttributes( patternClientId, {\n\t\t\t[ CONTENT ]: {\n\t\t\t\t...currentBindingValue,\n\t\t\t\t[ blockName ]: {\n\t\t\t\t\t...currentBindingValue?.[ blockName ],\n\t\t\t\t\t...Object.entries( attributes ).reduce(\n\t\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\t\t// TODO: We need a way to represent `undefined` in the serialized overrides.\n\t\t\t\t\t\t\t// Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871\n\t\t\t\t\t\t\t// We use an empty string to represent undefined for now until\n\t\t\t\t\t\t\t// we support a richer format for overrides and the block bindings API.\n\t\t\t\t\t\t\tacc[ key ] = value === undefined ? '' : value;\n\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{}\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t},\n\t\t} );\n\t},\n\tcanUserEditValue: () => true,\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,0BAA0C;AAE1C,MAAM,UAAU;AAKhB,IAAO,4BAAQ;AAAA,EACd,MAAM;AAAA,EACN,UAAW,EAAE,QAAQ,UAAU,SAAS,SAAS,GAAI;AACpD,UAAM,0BAA0B,QAAS,mBAAoB;AAC7D,UAAM,EAAE,mBAAmB,IAAI,OAAQ,oBAAAA,KAAiB;AACxD,UAAM,yBAAyB,mBAAoB,QAAS;AAE5D,UAAM,kBAAkB,CAAC;AACzB,eAAY,iBAAiB,OAAO,KAAM,QAAS,GAAI;AACtD,YAAM,mBACL,0BACC,wBAAwB,UAAU,IACnC,IAAK,aAAc;AAIpB,UAAK,qBAAqB,QAAY;AACrC,wBAAiB,aAAc,IAC9B,uBAAwB,aAAc;AACvC;AAAA,MACD,OAAO;AACN,wBAAiB,aAAc,IAC9B,qBAAqB,KAAK,SAAY;AAAA,MACxC;AAAA,IACD;AACA,WAAO;AAAA,EACR;AAAA,EACA,UAAW,EAAE,QAAQ,UAAU,UAAU,SAAS,GAAI;AACrD,UAAM,EAAE,oBAAoB,4BAA4B,UAAU,IACjE,OAAQ,oBAAAA,KAAiB;AAC1B,UAAM,yBAAyB,mBAAoB,QAAS;AAC5D,UAAM,YAAY,wBAAwB,UAAU;AACpD,QAAK,CAAE,WAAY;AAClB;AAAA,IACD;AAEA,UAAM,CAAE,eAAgB,IAAI;AAAA,MAC3B;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAGA,UAAM,aAAa,OAAO,QAAS,QAAS,EAAE;AAAA,MAC7C,CAAE,OAAO,CAAE,KAAK,EAAE,SAAS,CAAE,MAAO;AACnC,cAAO,GAAI,IAAI;AACf,eAAO;AAAA,MACR;AAAA,MACA,CAAC;AAAA,IACF;AAGA,QAAK,CAAE,iBAAkB;AACxB,YAAM,yBAAyB,CAAE,WAAY;AAC5C,mBAAY,SAAS,QAAS;AAC7B,cAAK,MAAM,YAAY,UAAU,SAAS,WAAY;AACrD,qBAAU,oBAAAA,KAAiB,EAAE;AAAA,cAC5B,MAAM;AAAA,cACN;AAAA,YACD;AAAA,UACD;AACA,iCAAwB,MAAM,WAAY;AAAA,QAC3C;AAAA,MACD;AAEA,6BAAwB,UAAU,CAAE;AACpC;AAAA,IACD;AACA,UAAM,sBACL,mBAAoB,eAAgB,IAAK,OAAQ;AAElD,aAAU,oBAAAA,KAAiB,EAAE,sBAAuB,iBAAiB;AAAA,MACpE,CAAE,OAAQ,GAAG;AAAA,QACZ,GAAG;AAAA,QACH,CAAE,SAAU,GAAG;AAAA,UACd,GAAG,sBAAuB,SAAU;AAAA,UACpC,GAAG,OAAO,QAAS,UAAW,EAAE;AAAA,YAC/B,CAAE,KAAK,CAAE,KAAK,KAAM,MAAO;AAK1B,kBAAK,GAAI,IAAI,UAAU,SAAY,KAAK;AACxC,qBAAO;AAAA,YACR;AAAA,YACA,CAAC;AAAA,UACF;AAAA,QACD;AAAA,MACD;AAAA,IACD,CAAE;AAAA,EACH;AAAA,EACA,kBAAkB,MAAM;AACzB;",
|
|
6
|
+
"names": ["blockEditorStore"]
|
|
7
|
+
}
|
|
@@ -1,58 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.
|
|
4
|
-
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var post_data_exports = {};
|
|
20
|
+
__export(post_data_exports, {
|
|
21
|
+
default: () => post_data_default
|
|
5
22
|
});
|
|
6
|
-
exports
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
/**
|
|
10
|
-
* WordPress dependencies
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Gets a list of post data fields with their values and labels
|
|
15
|
-
* to be consumed in the needed callbacks.
|
|
16
|
-
* If the value is not available based on context, like in templates,
|
|
17
|
-
* it falls back to the default value, label, or key.
|
|
18
|
-
*
|
|
19
|
-
* @param {Object} select The select function from the data store.
|
|
20
|
-
* @param {Object} context The context provided.
|
|
21
|
-
* @return {Object} List of post data fields with their value and label.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```js
|
|
25
|
-
* {
|
|
26
|
-
* field_1_key: {
|
|
27
|
-
* label: 'Field 1 Label',
|
|
28
|
-
* value: 'Field 1 Value',
|
|
29
|
-
* },
|
|
30
|
-
* field_2_key: {
|
|
31
|
-
* label: 'Field 2 Label',
|
|
32
|
-
* value: 'Field 2 Value',
|
|
33
|
-
* },
|
|
34
|
-
* ...
|
|
35
|
-
* }
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
23
|
+
module.exports = __toCommonJS(post_data_exports);
|
|
24
|
+
var import_i18n = require("@wordpress/i18n");
|
|
25
|
+
var import_core_data = require("@wordpress/core-data");
|
|
38
26
|
function getPostDataFields(select, context) {
|
|
39
|
-
const {
|
|
40
|
-
getEditedEntityRecord
|
|
41
|
-
} = select(_coreData.store);
|
|
27
|
+
const { getEditedEntityRecord } = select(import_core_data.store);
|
|
42
28
|
let entityDataValues, dataFields;
|
|
43
|
-
// Try to get the current entity data values.
|
|
44
29
|
if (context?.postType && context?.postId) {
|
|
45
|
-
entityDataValues = getEditedEntityRecord(
|
|
30
|
+
entityDataValues = getEditedEntityRecord(
|
|
31
|
+
"postType",
|
|
32
|
+
context?.postType,
|
|
33
|
+
context?.postId
|
|
34
|
+
);
|
|
46
35
|
dataFields = {
|
|
47
36
|
date: {
|
|
48
|
-
label: (0,
|
|
37
|
+
label: (0, import_i18n.__)("Post Date"),
|
|
49
38
|
value: entityDataValues?.date,
|
|
50
|
-
type:
|
|
39
|
+
type: "string"
|
|
51
40
|
},
|
|
52
41
|
modified: {
|
|
53
|
-
label: (0,
|
|
42
|
+
label: (0, import_i18n.__)("Post Modified Date"),
|
|
54
43
|
value: entityDataValues?.modified,
|
|
55
|
-
type:
|
|
44
|
+
type: "string"
|
|
56
45
|
}
|
|
57
46
|
};
|
|
58
47
|
}
|
|
@@ -61,68 +50,43 @@ function getPostDataFields(select, context) {
|
|
|
61
50
|
}
|
|
62
51
|
return dataFields;
|
|
63
52
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
var _default = exports.default = {
|
|
69
|
-
name: 'core/post-data',
|
|
70
|
-
getValues({
|
|
71
|
-
select,
|
|
72
|
-
context,
|
|
73
|
-
bindings
|
|
74
|
-
}) {
|
|
53
|
+
var post_data_default = {
|
|
54
|
+
name: "core/post-data",
|
|
55
|
+
getValues({ select, context, bindings }) {
|
|
75
56
|
const dataFields = getPostDataFields(select, context);
|
|
76
57
|
const newValues = {};
|
|
77
58
|
for (const [attributeName, source] of Object.entries(bindings)) {
|
|
78
|
-
var _ref;
|
|
79
|
-
// Use the value, the field label, or the field key.
|
|
80
59
|
const fieldKey = source.args.key;
|
|
81
|
-
const {
|
|
82
|
-
|
|
83
|
-
label: fieldLabel
|
|
84
|
-
} = dataFields?.[fieldKey] || {};
|
|
85
|
-
newValues[attributeName] = (_ref = fieldValue !== null && fieldValue !== void 0 ? fieldValue : fieldLabel) !== null && _ref !== void 0 ? _ref : fieldKey;
|
|
60
|
+
const { value: fieldValue, label: fieldLabel } = dataFields?.[fieldKey] || {};
|
|
61
|
+
newValues[attributeName] = fieldValue ?? fieldLabel ?? fieldKey;
|
|
86
62
|
}
|
|
87
63
|
return newValues;
|
|
88
64
|
},
|
|
89
|
-
setValues({
|
|
90
|
-
dispatch,
|
|
91
|
-
context,
|
|
92
|
-
bindings
|
|
93
|
-
}) {
|
|
65
|
+
setValues({ dispatch, context, bindings }) {
|
|
94
66
|
const newData = {};
|
|
95
|
-
Object.values(bindings).forEach(({
|
|
96
|
-
args,
|
|
97
|
-
newValue
|
|
98
|
-
}) => {
|
|
67
|
+
Object.values(bindings).forEach(({ args, newValue }) => {
|
|
99
68
|
newData[args.key] = newValue;
|
|
100
69
|
});
|
|
101
|
-
dispatch(
|
|
70
|
+
dispatch(import_core_data.store).editEntityRecord(
|
|
71
|
+
"postType",
|
|
72
|
+
context?.postType,
|
|
73
|
+
context?.postId,
|
|
74
|
+
newData
|
|
75
|
+
);
|
|
102
76
|
},
|
|
103
|
-
canUserEditValue({
|
|
104
|
-
select,
|
|
105
|
-
context,
|
|
106
|
-
args
|
|
107
|
-
}) {
|
|
108
|
-
// Lock editing in query loop.
|
|
77
|
+
canUserEditValue({ select, context, args }) {
|
|
109
78
|
if (context?.query || context?.queryId) {
|
|
110
79
|
return false;
|
|
111
80
|
}
|
|
112
|
-
|
|
113
|
-
// Lock editing when `postType` is not defined.
|
|
114
81
|
if (!context?.postType) {
|
|
115
82
|
return false;
|
|
116
83
|
}
|
|
117
84
|
const fieldValue = getPostDataFields(select, context)?.[args.key]?.value;
|
|
118
|
-
|
|
119
|
-
if (fieldValue === undefined) {
|
|
85
|
+
if (fieldValue === void 0) {
|
|
120
86
|
return false;
|
|
121
87
|
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const canUserEdit = select(_coreData.store).canUser('update', {
|
|
125
|
-
kind: 'postType',
|
|
88
|
+
const canUserEdit = select(import_core_data.store).canUser("update", {
|
|
89
|
+
kind: "postType",
|
|
126
90
|
name: context?.postType,
|
|
127
91
|
id: context?.postId
|
|
128
92
|
});
|
|
@@ -131,11 +95,27 @@ var _default = exports.default = {
|
|
|
131
95
|
}
|
|
132
96
|
return true;
|
|
133
97
|
},
|
|
134
|
-
getFieldsList({
|
|
135
|
-
select,
|
|
136
|
-
context
|
|
137
|
-
}) {
|
|
98
|
+
getFieldsList({ select, context }) {
|
|
138
99
|
return getPostDataFields(select, context);
|
|
100
|
+
},
|
|
101
|
+
editorUI({ select, context }) {
|
|
102
|
+
const selectedBlock = select("core/block-editor").getSelectedBlock();
|
|
103
|
+
if (selectedBlock?.name !== "core/post-date") {
|
|
104
|
+
return {};
|
|
105
|
+
}
|
|
106
|
+
const postDataFields = Object.entries(
|
|
107
|
+
getPostDataFields(select, context) || {}
|
|
108
|
+
).map(([key, field]) => ({
|
|
109
|
+
label: field.label,
|
|
110
|
+
args: {
|
|
111
|
+
key
|
|
112
|
+
},
|
|
113
|
+
type: field.type
|
|
114
|
+
}));
|
|
115
|
+
return {
|
|
116
|
+
mode: "dropdown",
|
|
117
|
+
data: postDataFields
|
|
118
|
+
};
|
|
139
119
|
}
|
|
140
120
|
};
|
|
141
|
-
//# sourceMappingURL=post-data.js.map
|
|
121
|
+
//# sourceMappingURL=post-data.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/bindings/post-data.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Gets a list of post data fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @return {Object} List of post data fields with their value and label.\n *\n * @example\n * ```js\n * {\n * field_1_key: {\n * label: 'Field 1 Label',\n * value: 'Field 1 Value',\n * },\n * field_2_key: {\n * label: 'Field 2 Label',\n * value: 'Field 2 Value',\n * },\n * ...\n * }\n * ```\n */\nfunction getPostDataFields( select, context ) {\n\tconst { getEditedEntityRecord } = select( coreDataStore );\n\n\tlet entityDataValues, dataFields;\n\t// Try to get the current entity data values.\n\tif ( context?.postType && context?.postId ) {\n\t\tentityDataValues = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId\n\t\t);\n\t\tdataFields = {\n\t\t\tdate: {\n\t\t\t\tlabel: __( 'Post Date' ),\n\t\t\t\tvalue: entityDataValues?.date,\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t\tmodified: {\n\t\t\t\tlabel: __( 'Post Modified Date' ),\n\t\t\t\tvalue: entityDataValues?.modified,\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t};\n\t}\n\n\tif ( ! Object.keys( dataFields || {} ).length ) {\n\t\treturn null;\n\t}\n\n\treturn dataFields;\n}\n\n/**\n * @type {WPBlockBindingsSource}\n */\nexport default {\n\tname: 'core/post-data',\n\tgetValues( { select, context, bindings } ) {\n\t\tconst dataFields = getPostDataFields( select, context );\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, source ] of Object.entries( bindings ) ) {\n\t\t\t// Use the value, the field label, or the field key.\n\t\t\tconst fieldKey = source.args.key;\n\t\t\tconst { value: fieldValue, label: fieldLabel } =\n\t\t\t\tdataFields?.[ fieldKey ] || {};\n\t\t\tnewValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings } ) {\n\t\tconst newData = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewData[ args.key ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\tnewData\n\t\t);\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst fieldValue = getPostDataFields( select, context )?.[ args.key ]\n\t\t\t?.value;\n\t\t// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.\n\t\tif ( fieldValue === undefined ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post data.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\t// Deprecated, will be removed after 6.9.\n\t\treturn getPostDataFields( select, context );\n\t},\n\teditorUI( { select, context } ) {\n\t\tconst selectedBlock = select( 'core/block-editor' ).getSelectedBlock();\n\t\tif ( selectedBlock?.name !== 'core/post-date' ) {\n\t\t\treturn {};\n\t\t}\n\t\tconst postDataFields = Object.entries(\n\t\t\tgetPostDataFields( select, context ) || {}\n\t\t).map( ( [ key, field ] ) => ( {\n\t\t\tlabel: field.label,\n\t\t\targs: {\n\t\t\t\tkey,\n\t\t\t},\n\t\t\ttype: field.type,\n\t\t} ) );\n\t\t/*\n\t\t * We need to define the data as [{ label: string, value: any, type: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/#type-validation }]\n\t\t */\n\t\treturn {\n\t\t\tmode: 'dropdown',\n\t\t\tdata: postDataFields,\n\t\t};\n\t},\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AACnB,uBAAuC;AA2BvC,SAAS,kBAAmB,QAAQ,SAAU;AAC7C,QAAM,EAAE,sBAAsB,IAAI,OAAQ,iBAAAA,KAAc;AAExD,MAAI,kBAAkB;AAEtB,MAAK,SAAS,YAAY,SAAS,QAAS;AAC3C,uBAAmB;AAAA,MAClB;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,IACV;AACA,iBAAa;AAAA,MACZ,MAAM;AAAA,QACL,WAAO,gBAAI,WAAY;AAAA,QACvB,OAAO,kBAAkB;AAAA,QACzB,MAAM;AAAA,MACP;AAAA,MACA,UAAU;AAAA,QACT,WAAO,gBAAI,oBAAqB;AAAA,QAChC,OAAO,kBAAkB;AAAA,QACzB,MAAM;AAAA,MACP;AAAA,IACD;AAAA,EACD;AAEA,MAAK,CAAE,OAAO,KAAM,cAAc,CAAC,CAAE,EAAE,QAAS;AAC/C,WAAO;AAAA,EACR;AAEA,SAAO;AACR;AAKA,IAAO,oBAAQ;AAAA,EACd,MAAM;AAAA,EACN,UAAW,EAAE,QAAQ,SAAS,SAAS,GAAI;AAC1C,UAAM,aAAa,kBAAmB,QAAQ,OAAQ;AAEtD,UAAM,YAAY,CAAC;AACnB,eAAY,CAAE,eAAe,MAAO,KAAK,OAAO,QAAS,QAAS,GAAI;AAErE,YAAM,WAAW,OAAO,KAAK;AAC7B,YAAM,EAAE,OAAO,YAAY,OAAO,WAAW,IAC5C,aAAc,QAAS,KAAK,CAAC;AAC9B,gBAAW,aAAc,IAAI,cAAc,cAAc;AAAA,IAC1D;AACA,WAAO;AAAA,EACR;AAAA,EACA,UAAW,EAAE,UAAU,SAAS,SAAS,GAAI;AAC5C,UAAM,UAAU,CAAC;AACjB,WAAO,OAAQ,QAAS,EAAE,QAAS,CAAE,EAAE,MAAM,SAAS,MAAO;AAC5D,cAAS,KAAK,GAAI,IAAI;AAAA,IACvB,CAAE;AAEF,aAAU,iBAAAA,KAAc,EAAE;AAAA,MACzB;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,MACT;AAAA,IACD;AAAA,EACD;AAAA,EACA,iBAAkB,EAAE,QAAQ,SAAS,KAAK,GAAI;AAE7C,QAAK,SAAS,SAAS,SAAS,SAAU;AACzC,aAAO;AAAA,IACR;AAGA,QAAK,CAAE,SAAS,UAAW;AAC1B,aAAO;AAAA,IACR;AAEA,UAAM,aAAa,kBAAmB,QAAQ,OAAQ,IAAK,KAAK,GAAI,GACjE;AAEH,QAAK,eAAe,QAAY;AAC/B,aAAO;AAAA,IACR;AAGA,UAAM,cAAc,OAAQ,iBAAAA,KAAc,EAAE,QAAS,UAAU;AAAA,MAC9D,MAAM;AAAA,MACN,MAAM,SAAS;AAAA,MACf,IAAI,SAAS;AAAA,IACd,CAAE;AACF,QAAK,CAAE,aAAc;AACpB,aAAO;AAAA,IACR;AAEA,WAAO;AAAA,EACR;AAAA,EACA,cAAe,EAAE,QAAQ,QAAQ,GAAI;AAEpC,WAAO,kBAAmB,QAAQ,OAAQ;AAAA,EAC3C;AAAA,EACA,SAAU,EAAE,QAAQ,QAAQ,GAAI;AAC/B,UAAM,gBAAgB,OAAQ,mBAAoB,EAAE,iBAAiB;AACrE,QAAK,eAAe,SAAS,kBAAmB;AAC/C,aAAO,CAAC;AAAA,IACT;AACA,UAAM,iBAAiB,OAAO;AAAA,MAC7B,kBAAmB,QAAQ,OAAQ,KAAK,CAAC;AAAA,IAC1C,EAAE,IAAK,CAAE,CAAE,KAAK,KAAM,OAAS;AAAA,MAC9B,OAAO,MAAM;AAAA,MACb,MAAM;AAAA,QACL;AAAA,MACD;AAAA,MACA,MAAM,MAAM;AAAA,IACb,EAAI;AAIJ,WAAO;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,EACD;AACD;",
|
|
6
|
+
"names": ["coreDataStore"]
|
|
7
|
+
}
|