2024-01-31 13:59:56 +01:00
/******/ ( ( ) => { // webpackBootstrap
2024-05-23 21:39:28 +02:00
/******/ "use strict" ;
/******/ // The require scope
/******/ var _ _webpack _require _ _ = { } ;
2022-04-11 14:04:30 +02:00
/******/
2018-12-14 05:41:57 +01:00
/************************************************************************/
2022-04-11 14:04:30 +02:00
/******/ /* webpack/runtime/compat get default export */
2024-01-31 13:59:56 +01:00
/******/ ( ( ) => {
2022-04-11 14:04:30 +02:00
/******/ // getDefaultExport function for compatibility with non-harmony modules
2024-01-31 13:59:56 +01:00
/******/ _ _webpack _require _ _ . n = ( module ) => {
2022-04-11 14:04:30 +02:00
/******/ var getter = module && module . _ _esModule ?
2024-01-31 13:59:56 +01:00
/******/ ( ) => ( module [ 'default' ] ) :
/******/ ( ) => ( module ) ;
2022-04-11 14:04:30 +02:00
/******/ _ _webpack _require _ _ . d ( getter , { a : getter } ) ;
/******/ return getter ;
/******/ } ;
2024-01-31 13:59:56 +01:00
/******/ } ) ( ) ;
2022-04-11 14:04:30 +02:00
/******/
/******/ /* webpack/runtime/define property getters */
2024-01-31 13:59:56 +01:00
/******/ ( ( ) => {
2022-04-11 14:04:30 +02:00
/******/ // define getter functions for harmony exports
2024-01-31 13:59:56 +01:00
/******/ _ _webpack _require _ _ . d = ( exports , definition ) => {
2022-04-11 14:04:30 +02:00
/******/ for ( var key in definition ) {
/******/ if ( _ _webpack _require _ _ . o ( definition , key ) && ! _ _webpack _require _ _ . o ( exports , key ) ) {
/******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
/******/ }
/******/ }
/******/ } ;
2024-01-31 13:59:56 +01:00
/******/ } ) ( ) ;
2022-04-11 14:04:30 +02:00
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
2024-01-31 13:59:56 +01:00
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
/******/ } ) ( ) ;
2022-04-11 14:04:30 +02:00
/******/
/******/ /* webpack/runtime/make namespace object */
2024-01-31 13:59:56 +01:00
/******/ ( ( ) => {
2022-04-11 14:04:30 +02:00
/******/ // define __esModule on exports
2024-01-31 13:59:56 +01:00
/******/ _ _webpack _require _ _ . r = ( exports ) => {
2022-04-11 14:04:30 +02:00
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
2024-01-31 13:59:56 +01:00
/******/ } ) ( ) ;
2022-04-11 14:04:30 +02:00
/******/
/************************************************************************/
var _ _webpack _exports _ _ = { } ;
// ESM COMPAT FLAG
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-06-26 15:33:47 +02:00
2022-04-11 14:04:30 +02:00
// EXPORTS
_ _webpack _require _ _ . d ( _ _webpack _exports _ _ , {
2024-05-23 21:39:28 +02:00
PluginBlockSettingsMenuItem : ( ) => ( /* reexport */ PluginBlockSettingsMenuItem ) ,
PluginDocumentSettingPanel : ( ) => ( /* reexport */ PluginDocumentSettingPanel ) ,
PluginMoreMenuItem : ( ) => ( /* reexport */ PluginMoreMenuItem ) ,
PluginPostPublishPanel : ( ) => ( /* reexport */ PluginPostPublishPanel ) ,
PluginPostStatusInfo : ( ) => ( /* reexport */ PluginPostStatusInfo ) ,
PluginPrePublishPanel : ( ) => ( /* reexport */ PluginPrePublishPanel ) ,
PluginSidebar : ( ) => ( /* reexport */ PluginSidebar ) ,
2024-01-31 13:59:56 +01:00
PluginSidebarMoreMenuItem : ( ) => ( /* reexport */ PluginSidebarMoreMenuItem ) ,
_ _experimentalFullscreenModeClose : ( ) => ( /* reexport */ fullscreen _mode _close ) ,
_ _experimentalMainDashboardButton : ( ) => ( /* reexport */ main _dashboard _button ) ,
2024-05-23 21:39:28 +02:00
_ _experimentalPluginPostExcerpt : ( ) => ( /* reexport */ _ _experimentalPluginPostExcerpt ) ,
2024-01-31 13:59:56 +01:00
initializeEditor : ( ) => ( /* binding */ initializeEditor ) ,
reinitializeEditor : ( ) => ( /* binding */ reinitializeEditor ) ,
2024-05-23 21:39:28 +02:00
store : ( ) => ( /* reexport */ store )
2022-04-11 14:04:30 +02:00
} ) ;
2020-06-26 15:33:47 +02:00
2024-05-23 21:39:28 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
2022-04-11 14:04:30 +02:00
var actions _namespaceObject = { } ;
_ _webpack _require _ _ . r ( actions _namespaceObject ) ;
_ _webpack _require _ _ . d ( actions _namespaceObject , {
2024-01-31 13:59:56 +01:00
_ _experimentalSetPreviewDeviceType : ( ) => ( _ _experimentalSetPreviewDeviceType ) ,
_ _unstableCreateTemplate : ( ) => ( _ _unstableCreateTemplate ) ,
closeGeneralSidebar : ( ) => ( closeGeneralSidebar ) ,
2024-05-23 21:39:28 +02:00
closeModal : ( ) => ( closeModal ) ,
2024-01-31 13:59:56 +01:00
closePublishSidebar : ( ) => ( closePublishSidebar ) ,
hideBlockTypes : ( ) => ( hideBlockTypes ) ,
initializeMetaBoxes : ( ) => ( initializeMetaBoxes ) ,
metaBoxUpdatesFailure : ( ) => ( metaBoxUpdatesFailure ) ,
metaBoxUpdatesSuccess : ( ) => ( metaBoxUpdatesSuccess ) ,
openGeneralSidebar : ( ) => ( openGeneralSidebar ) ,
2024-05-23 21:39:28 +02:00
openModal : ( ) => ( openModal ) ,
2024-01-31 13:59:56 +01:00
openPublishSidebar : ( ) => ( openPublishSidebar ) ,
removeEditorPanel : ( ) => ( removeEditorPanel ) ,
requestMetaBoxUpdates : ( ) => ( requestMetaBoxUpdates ) ,
setAvailableMetaBoxesPerLocation : ( ) => ( setAvailableMetaBoxesPerLocation ) ,
setIsEditingTemplate : ( ) => ( setIsEditingTemplate ) ,
setIsInserterOpened : ( ) => ( setIsInserterOpened ) ,
setIsListViewOpened : ( ) => ( setIsListViewOpened ) ,
showBlockTypes : ( ) => ( showBlockTypes ) ,
switchEditorMode : ( ) => ( switchEditorMode ) ,
toggleDistractionFree : ( ) => ( toggleDistractionFree ) ,
toggleEditorPanelEnabled : ( ) => ( toggleEditorPanelEnabled ) ,
toggleEditorPanelOpened : ( ) => ( toggleEditorPanelOpened ) ,
2024-05-23 21:39:28 +02:00
toggleFeature : ( ) => ( toggleFeature ) ,
2024-01-31 13:59:56 +01:00
togglePinnedPluginItem : ( ) => ( togglePinnedPluginItem ) ,
togglePublishSidebar : ( ) => ( togglePublishSidebar ) ,
updatePreferredStyleVariations : ( ) => ( updatePreferredStyleVariations )
2022-04-11 14:04:30 +02:00
} ) ;
2021-01-28 03:04:13 +01:00
2022-04-11 14:04:30 +02:00
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
2024-05-23 21:39:28 +02:00
var selectors _namespaceObject = { } ;
_ _webpack _require _ _ . r ( selectors _namespaceObject ) ;
_ _webpack _require _ _ . d ( selectors _namespaceObject , {
2024-01-31 13:59:56 +01:00
_ _experimentalGetInsertionPoint : ( ) => ( _ _experimentalGetInsertionPoint ) ,
_ _experimentalGetPreviewDeviceType : ( ) => ( _ _experimentalGetPreviewDeviceType ) ,
areMetaBoxesInitialized : ( ) => ( areMetaBoxesInitialized ) ,
getActiveGeneralSidebarName : ( ) => ( getActiveGeneralSidebarName ) ,
getActiveMetaBoxLocations : ( ) => ( getActiveMetaBoxLocations ) ,
getAllMetaBoxes : ( ) => ( getAllMetaBoxes ) ,
getEditedPostTemplate : ( ) => ( getEditedPostTemplate ) ,
getEditorMode : ( ) => ( getEditorMode ) ,
getHiddenBlockTypes : ( ) => ( getHiddenBlockTypes ) ,
getMetaBoxesPerLocation : ( ) => ( getMetaBoxesPerLocation ) ,
getPreference : ( ) => ( getPreference ) ,
getPreferences : ( ) => ( getPreferences ) ,
hasMetaBoxes : ( ) => ( hasMetaBoxes ) ,
isEditingTemplate : ( ) => ( isEditingTemplate ) ,
isEditorPanelEnabled : ( ) => ( isEditorPanelEnabled ) ,
isEditorPanelOpened : ( ) => ( isEditorPanelOpened ) ,
isEditorPanelRemoved : ( ) => ( isEditorPanelRemoved ) ,
isEditorSidebarOpened : ( ) => ( isEditorSidebarOpened ) ,
2024-05-23 21:39:28 +02:00
isFeatureActive : ( ) => ( isFeatureActive ) ,
2024-01-31 13:59:56 +01:00
isInserterOpened : ( ) => ( isInserterOpened ) ,
isListViewOpened : ( ) => ( isListViewOpened ) ,
isMetaBoxLocationActive : ( ) => ( isMetaBoxLocationActive ) ,
isMetaBoxLocationVisible : ( ) => ( isMetaBoxLocationVisible ) ,
2024-05-23 21:39:28 +02:00
isModalActive : ( ) => ( isModalActive ) ,
2024-01-31 13:59:56 +01:00
isPluginItemPinned : ( ) => ( isPluginItemPinned ) ,
isPluginSidebarOpened : ( ) => ( isPluginSidebarOpened ) ,
isPublishSidebarOpened : ( ) => ( isPublishSidebarOpened ) ,
isSavingMetaBoxes : ( ) => ( selectors _isSavingMetaBoxes )
2022-04-11 14:04:30 +02:00
} ) ;
2021-05-20 14:20:04 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: external "React"
2024-01-31 13:59:56 +01:00
const external _React _namespaceObject = window [ "React" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","blocks"]
2024-01-31 13:59:56 +01:00
const external _wp _blocks _namespaceObject = window [ "wp" ] [ "blocks" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","blockLibrary"]
2024-01-31 13:59:56 +01:00
const external _wp _blockLibrary _namespaceObject = window [ "wp" ] [ "blockLibrary" ] ;
2023-02-07 08:04:52 +01:00
; // CONCATENATED MODULE: external ["wp","deprecated"]
2024-01-31 13:59:56 +01:00
const external _wp _deprecated _namespaceObject = window [ "wp" ] [ "deprecated" ] ;
2023-02-07 08:04:52 +01:00
var external _wp _deprecated _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _deprecated _namespaceObject ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: external ["wp","element"]
2024-01-31 13:59:56 +01:00
const external _wp _element _namespaceObject = window [ "wp" ] [ "element" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","data"]
2024-01-31 13:59:56 +01:00
const external _wp _data _namespaceObject = window [ "wp" ] [ "data" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","preferences"]
2024-01-31 13:59:56 +01:00
const external _wp _preferences _namespaceObject = window [ "wp" ] [ "preferences" ] ;
2023-02-07 08:04:52 +01:00
; // CONCATENATED MODULE: external ["wp","widgets"]
2024-01-31 13:59:56 +01:00
const external _wp _widgets _namespaceObject = window [ "wp" ] [ "widgets" ] ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: external ["wp","editor"]
2024-01-31 13:59:56 +01:00
const external _wp _editor _namespaceObject = window [ "wp" ] [ "editor" ] ;
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","hooks"]
const external _wp _hooks _namespaceObject = window [ "wp" ] [ "hooks" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","mediaUtils"]
2024-01-31 13:59:56 +01:00
const external _wp _mediaUtils _namespaceObject = window [ "wp" ] [ "mediaUtils" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/components/index.js
/ * *
* WordPress dependencies
* /
const replaceMediaUpload = ( ) => external _wp _mediaUtils _namespaceObject . MediaUpload ;
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.MediaUpload' , 'core/edit-post/replace-media-upload' , replaceMediaUpload ) ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","components"]
2024-01-31 13:59:56 +01:00
const external _wp _components _namespaceObject = window [ "wp" ] [ "components" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","blockEditor"]
2024-01-31 13:59:56 +01:00
const external _wp _blockEditor _namespaceObject = window [ "wp" ] [ "blockEditor" ] ;
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: external ["wp","i18n"]
2024-01-31 13:59:56 +01:00
const external _wp _i18n _namespaceObject = window [ "wp" ] [ "i18n" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","compose"]
2024-01-31 13:59:56 +01:00
const external _wp _compose _namespaceObject = window [ "wp" ] [ "compose" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/validate-multiple-use/index.js
2021-11-08 15:29:21 +01:00
/ * *
* WordPress dependencies
* /
2022-04-12 17:12:47 +02:00
2024-02-09 19:22:22 +01:00
/ * *
* Recursively find very first block of an specific block type .
*
* @ param { Object [ ] } blocks List of blocks .
* @ param { string } name Block name to search .
*
* @ return { Object | undefined } Return block object or undefined .
* /
function findFirstOfSameType ( blocks , name ) {
if ( ! Array . isArray ( blocks ) || ! blocks . length ) {
return ;
}
for ( const block of blocks ) {
if ( block . name === name ) {
return block ;
}
// Search inside innerBlocks.
const firstBlock = findFirstOfSameType ( block . innerBlocks , name ) ;
if ( firstBlock ) {
return firstBlock ;
}
}
}
2022-04-12 17:12:47 +02:00
const enhance = ( 0 , external _wp _compose _namespaceObject . compose ) (
2021-11-08 15:29:21 +01:00
/ * *
2022-04-12 17:12:47 +02:00
* For blocks whose block type doesn ' t support ` multiple ` , provides the
* wrapped component with ` originalBlockClientId ` -- a reference to the
* first block of the same type in the content -- if and only if that
* "original" block is not the current one . Thus , an inexisting
* ` originalBlockClientId ` prop signals that the block is valid .
*
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* @ param { Component } WrappedBlockEdit A filtered BlockEdit instance .
2022-04-12 17:12:47 +02:00
*
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* @ return { Component } Enhanced component with merged state data props .
2021-11-08 15:29:21 +01:00
* /
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . withSelect ) ( ( select , block ) => {
2023-09-26 16:23:26 +02:00
const multiple = ( 0 , external _wp _blocks _namespaceObject . hasBlockSupport ) ( block . name , 'multiple' , true ) ;
2021-05-19 17:09:27 +02:00
2023-09-26 16:23:26 +02:00
// For block types with `multiple` support, there is no "original
// block" to be found in the content, as the block itself is valid.
2022-04-12 17:12:47 +02:00
if ( multiple ) {
return { } ;
2023-09-26 16:23:26 +02:00
}
2022-04-12 17:12:47 +02:00
2023-09-26 16:23:26 +02:00
// Otherwise, only pass `originalBlockClientId` if it refers to a different
// block from the current one.
2022-04-12 17:12:47 +02:00
const blocks = select ( external _wp _blockEditor _namespaceObject . store ) . getBlocks ( ) ;
2024-02-09 19:22:22 +01:00
const firstOfSameType = findFirstOfSameType ( blocks , block . name ) ;
2022-04-12 17:12:47 +02:00
const isInvalid = firstOfSameType && firstOfSameType . clientId !== block . clientId ;
return {
originalBlockClientId : isInvalid && firstOfSameType . clientId
} ;
2023-06-27 16:24:19 +02:00
} ) , ( 0 , external _wp _data _namespaceObject . withDispatch ) ( ( dispatch , {
originalBlockClientId
} ) => ( {
selectFirst : ( ) => dispatch ( external _wp _blockEditor _namespaceObject . store ) . selectBlock ( originalBlockClientId )
} ) ) ) ;
2022-04-12 17:12:47 +02:00
const withMultipleValidation = ( 0 , external _wp _compose _namespaceObject . createHigherOrderComponent ) ( BlockEdit => {
2023-06-27 16:24:19 +02:00
return enhance ( ( {
originalBlockClientId ,
selectFirst ,
... props
} ) => {
2022-04-12 17:12:47 +02:00
if ( ! originalBlockClientId ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( BlockEdit , {
2023-09-26 16:23:26 +02:00
... props
2023-06-27 16:24:19 +02:00
} ) ;
2022-04-12 17:12:47 +02:00
}
const blockType = ( 0 , external _wp _blocks _namespaceObject . getBlockType ) ( props . name ) ;
const outboundType = getOutboundType ( props . name ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return [ ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2022-04-12 17:12:47 +02:00
key : "invalid-preview" ,
style : {
minHeight : '60px'
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _React _namespaceObject . createElement ) ( BlockEdit , {
2023-06-27 16:24:19 +02:00
key : "block-edit" ,
... props
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . Warning , {
2022-04-12 17:12:47 +02:00
key : "multiple-use-warning" ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
actions : [ ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
2022-04-12 17:12:47 +02:00
key : "find-original" ,
variant : "secondary" ,
onClick : selectFirst
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Find original' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
2022-04-12 17:12:47 +02:00
key : "remove" ,
variant : "secondary" ,
onClick : ( ) => props . onReplace ( [ ] )
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Remove' ) ) , outboundType && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
2022-04-12 17:12:47 +02:00
key : "transform" ,
variant : "secondary" ,
onClick : ( ) => props . onReplace ( ( 0 , external _wp _blocks _namespaceObject . createBlock ) ( outboundType . name , props . attributes ) )
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Transform into:' ) , " " , outboundType . title ) ]
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _React _namespaceObject . createElement ) ( "strong" , null , blockType ? . title , ": " ) , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'This block can only be used once.' ) ) ] ;
2022-04-12 17:12:47 +02:00
} ) ;
} , 'withMultipleValidation' ) ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
* Given a base block name , returns the default block type to which to offer
* transforms .
*
* @ param { string } blockName Base block name .
*
* @ return { ? Object } The chosen default block type .
* /
function getOutboundType ( blockName ) {
// Grab the first outbound transform.
2023-06-27 16:24:19 +02:00
const transform = ( 0 , external _wp _blocks _namespaceObject . findTransform ) ( ( 0 , external _wp _blocks _namespaceObject . getBlockTransforms ) ( 'to' , blockName ) , ( {
type ,
blocks
} ) => type === 'block' && blocks . length === 1 // What about when .length > 1?
2022-04-12 17:12:47 +02:00
) ;
if ( ! transform ) {
return null ;
}
return ( 0 , external _wp _blocks _namespaceObject . getBlockType ) ( transform . blocks [ 0 ] ) ;
}
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.BlockEdit' , 'core/edit-post/validate-multiple-use/with-multiple-validation' , withMultipleValidation ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/index.js
/ * *
* Internal dependencies
* /
2021-05-20 14:20:04 +02:00
2022-04-12 17:12:47 +02:00
2023-07-11 08:59:09 +02:00
; // CONCATENATED MODULE: external ["wp","coreData"]
2024-01-31 13:59:56 +01:00
const external _wp _coreData _namespaceObject = window [ "wp" ] [ "coreData" ] ;
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","commands"]
const external _wp _commands _namespaceObject = window [ "wp" ] [ "commands" ] ;
; // CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
function r ( e ) { var t , f , n = "" ; if ( "string" == typeof e || "number" == typeof e ) n += e ; else if ( "object" == typeof e ) if ( Array . isArray ( e ) ) { var o = e . length ; for ( t = 0 ; t < o ; t ++ ) e [ t ] && ( f = r ( e [ t ] ) ) && ( n && ( n += " " ) , n += f ) } else for ( f in e ) e [ f ] && ( n && ( n += " " ) , n += f ) ; return n } function clsx ( ) { for ( var e , t , f = 0 , n = "" , o = arguments . length ; f < o ; f ++ ) ( e = arguments [ f ] ) && ( t = r ( e ) ) && ( n && ( n += " " ) , n += t ) ; return n } /* harmony default export */ const dist _clsx = ( clsx ) ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","plugins"]
2024-01-31 13:59:56 +01:00
const external _wp _plugins _namespaceObject = window [ "wp" ] [ "plugins" ] ;
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
const external _wp _keyboardShortcuts _namespaceObject = window [ "wp" ] [ "keyboardShortcuts" ] ;
2022-04-12 17:12:47 +02:00
; // CONCATENATED MODULE: external ["wp","notices"]
2024-01-31 13:59:56 +01:00
const external _wp _notices _namespaceObject = window [ "wp" ] [ "notices" ] ;
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","coreCommands"]
const external _wp _coreCommands _namespaceObject = window [ "wp" ] [ "coreCommands" ] ;
; // CONCATENATED MODULE: external ["wp","url"]
const external _wp _url _namespaceObject = window [ "wp" ] [ "url" ] ;
; // CONCATENATED MODULE: external ["wp","keycodes"]
const external _wp _keycodes _namespaceObject = window [ "wp" ] [ "keycodes" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/reducer.js
2021-05-20 14:20:04 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
/ * *
* Reducer keeping track of the meta boxes isSaving state .
* A "true" value means the meta boxes saving request is in - flight .
*
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action Object .
*
* @ return { Object } Updated state .
* /
function isSavingMetaBoxes ( state = false , action ) {
switch ( action . type ) {
case 'REQUEST_META_BOX_UPDATES' :
return true ;
case 'META_BOX_UPDATES_SUCCESS' :
case 'META_BOX_UPDATES_FAILURE' :
return false ;
default :
return state ;
2023-09-26 16:23:26 +02:00
}
2024-05-23 21:39:28 +02:00
}
function mergeMetaboxes ( metaboxes = [ ] , newMetaboxes ) {
const mergedMetaboxes = [ ... metaboxes ] ;
for ( const metabox of newMetaboxes ) {
const existing = mergedMetaboxes . findIndex ( box => box . id === metabox . id ) ;
if ( existing !== - 1 ) {
mergedMetaboxes [ existing ] = metabox ;
} else {
mergedMetaboxes . push ( metabox ) ;
}
2022-04-12 17:12:47 +02:00
}
2024-05-23 21:39:28 +02:00
return mergedMetaboxes ;
2022-04-12 17:12:47 +02:00
}
/ * *
2024-05-23 21:39:28 +02:00
* Reducer keeping track of the meta boxes per location .
*
* @ param { boolean } state Previous state .
* @ param { Object } action Action Object .
*
* @ return { Object } Updated state .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
function metaBoxLocations ( state = { } , action ) {
switch ( action . type ) {
case 'SET_META_BOXES_PER_LOCATIONS' :
{
const newState = {
... state
} ;
for ( const [ location , metaboxes ] of Object . entries ( action . metaBoxesPerLocation ) ) {
newState [ location ] = mergeMetaboxes ( newState [ location ] , metaboxes ) ;
}
return newState ;
}
}
return state ;
}
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Reducer tracking whether meta boxes are initialized .
*
* @ param { boolean } state
* @ param { Object } action
*
* @ return { boolean } Updated state .
* /
function metaBoxesInitialized ( state = false , action ) {
switch ( action . type ) {
case 'META_BOXES_INITIALIZED' :
return true ;
}
return state ;
}
const metaBoxes = ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
isSaving : isSavingMetaBoxes ,
locations : metaBoxLocations ,
initialized : metaBoxesInitialized
} ) ;
/* harmony default export */ const reducer = ( ( 0 , external _wp _data _namespaceObject . combineReducers ) ( {
metaBoxes
2022-04-12 17:12:47 +02:00
} ) ) ;
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","apiFetch"]
const external _wp _apiFetch _namespaceObject = window [ "wp" ] [ "apiFetch" ] ;
var external _wp _apiFetch _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( external _wp _apiFetch _namespaceObject ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js
/ * *
* Function returning the current Meta Boxes DOM Node in the editor
* whether the meta box area is opened or not .
* If the MetaBox Area is visible returns it , and returns the original container instead .
*
* @ param { string } location Meta Box location .
*
* @ return { string } HTML content .
* /
const getMetaBoxContainer = location => {
const area = document . querySelector ( ` .edit-post-meta-boxes-area.is- ${ location } .metabox-location- ${ location } ` ) ;
if ( area ) {
return area ;
}
return document . querySelector ( '#metaboxes .metabox-location-' + location ) ;
} ;
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","privateApis"]
const external _wp _privateApis _namespaceObject = window [ "wp" ] [ "privateApis" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/lock-unlock.js
2022-04-12 17:12:47 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
const {
lock ,
unlock
} = ( 0 , external _wp _privateApis _namespaceObject . _ _dangerousOptInToUnstableAPIsOnlyForCoreModules ) ( 'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.' , '@wordpress/edit-post' ) ;
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
2022-04-12 17:12:47 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Internal dependencies
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const {
interfaceStore
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signalling that the user opened an editor sidebar .
*
* @ param { ? string } name Sidebar name to be opened .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const openGeneralSidebar = name => ( {
registry
} ) => {
registry . dispatch ( interfaceStore ) . enableComplementaryArea ( 'core' , name ) ;
} ;
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns an action object signalling that the user closed the sidebar .
* /
const closeGeneralSidebar = ( ) => ( {
registry
} ) => registry . dispatch ( interfaceStore ) . disableComplementaryArea ( 'core' ) ;
2023-09-26 16:23:26 +02:00
2022-09-20 17:43:29 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signalling that the user opened a modal .
*
* @ deprecated since WP 6.3 use ` core/interface ` store ' s action with the same name instead .
*
2022-09-20 17:43:29 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } name A string that uniquely identifies the modal .
2022-09-20 17:43:29 +02:00
*
* @ return { Object } Action object .
* /
2024-05-23 21:39:28 +02:00
const openModal = name => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "select( 'core/edit-post' ).openModal( name )" , {
since : '6.3' ,
alternative : "select( 'core/interface').openModal( name )"
} ) ;
return registry . dispatch ( interfaceStore ) . openModal ( name ) ;
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object signalling that the user closed a modal .
*
* @ deprecated since WP 6.3 use ` core/interface ` store ' s action with the same name instead .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { Object } Action object .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const closeModal = ( ) => ( {
registry
2023-06-27 16:24:19 +02:00
} ) => {
2024-05-23 21:39:28 +02:00
external _wp _deprecated _default ( ) ( "select( 'core/edit-post' ).closeModal()" , {
since : '6.3' ,
alternative : "select( 'core/interface').closeModal()"
2022-09-20 17:43:29 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
return registry . dispatch ( interfaceStore ) . closeModal ( ) ;
2022-04-12 17:12:47 +02:00
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signalling that the user opened the publish
* sidebar .
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { Object } Action object
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const openPublishSidebar = ( ) => ( {
2023-06-27 16:24:19 +02:00
registry
} ) => {
2024-05-23 21:39:28 +02:00
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).openPublishSidebar" , {
since : '6.6' ,
alternative : "dispatch( 'core/editor').openPublishSidebar"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . openPublishSidebar ( ) ;
2022-04-12 17:12:47 +02:00
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signalling that the user closed the
* publish sidebar .
* @ deprecated
2022-04-12 17:12:47 +02:00
*
* @ return { Object } Action object .
* /
2024-05-23 21:39:28 +02:00
const closePublishSidebar = ( ) => ( {
2023-06-27 16:24:19 +02:00
registry
} ) => {
2024-05-23 21:39:28 +02:00
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).closePublishSidebar" , {
since : '6.6' ,
alternative : "dispatch( 'core/editor').closePublishSidebar"
2022-04-12 17:12:47 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
registry . dispatch ( external _wp _editor _namespaceObject . store ) . closePublishSidebar ( ) ;
2022-04-12 17:12:47 +02:00
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signalling that the user toggles the publish sidebar .
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { Object } Action object
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const togglePublishSidebar = ( ) => ( {
2023-06-27 16:24:19 +02:00
registry
} ) => {
2024-05-23 21:39:28 +02:00
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).togglePublishSidebar" , {
since : '6.6' ,
alternative : "dispatch( 'core/editor').togglePublishSidebar"
2022-04-12 17:12:47 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
registry . dispatch ( external _wp _editor _namespaceObject . store ) . togglePublishSidebar ( ) ;
2022-04-12 17:12:47 +02:00
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used to enable or disable a panel in the editor .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } panelName A string that identifies the panel to enable or disable .
2022-04-12 17:12:47 +02:00
*
* @ return { Object } Action object .
* /
2024-05-23 21:39:28 +02:00
const toggleEditorPanelEnabled = panelName => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).toggleEditorPanelEnabled" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').toggleEditorPanelEnabled"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . toggleEditorPanelEnabled ( panelName ) ;
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Opens a closed panel and closes an open panel .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } panelName A string that identifies the panel to open or close .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const toggleEditorPanelOpened = panelName => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).toggleEditorPanelOpened" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').toggleEditorPanelOpened"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . toggleEditorPanelOpened ( panelName ) ;
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used to remove a panel from the editor .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } panelName A string that identifies the panel to remove .
2023-06-28 09:04:13 +02:00
*
* @ return { Object } Action object .
* /
2024-05-23 21:39:28 +02:00
const removeEditorPanel = panelName => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).removeEditorPanel" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').removeEditorPanel"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . removeEditorPanel ( panelName ) ;
} ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Triggers an action used to toggle a feature flag .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } feature Feature name .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const toggleFeature = feature => ( {
registry
} ) => registry . dispatch ( external _wp _preferences _namespaceObject . store ) . toggle ( 'core/edit-post' , feature ) ;
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Triggers an action used to switch editor mode .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ deprecated
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } mode The editor mode .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const switchEditorMode = mode => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).switchEditorMode" , {
since : '6.6' ,
alternative : "dispatch( 'core/editor').switchEditorMode"
2022-04-12 17:12:47 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
registry . dispatch ( external _wp _editor _namespaceObject . store ) . switchEditorMode ( mode ) ;
} ;
2023-09-26 16:23:26 +02:00
2023-06-28 09:04:13 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Triggers an action object used to toggle a plugin name flag .
2023-06-28 09:04:13 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string } pluginName Plugin name .
2023-06-28 09:04:13 +02:00
* /
2024-05-23 21:39:28 +02:00
const togglePinnedPluginItem = pluginName => ( {
registry
} ) => {
const isPinned = registry . select ( interfaceStore ) . isItemPinned ( 'core' , pluginName ) ;
registry . dispatch ( interfaceStore ) [ isPinned ? 'unpinItem' : 'pinItem' ] ( 'core' , pluginName ) ;
} ;
2022-04-12 17:12:47 +02:00
2022-09-20 17:43:29 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used in signaling that a style should be auto - applied when a block is created .
*
* @ deprecated
2022-09-20 17:43:29 +02:00
* /
2024-05-23 21:39:28 +02:00
function updatePreferredStyleVariations ( ) {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).updatePreferredStyleVariations" , {
since : '6.6' ,
hint : 'Preferred Style Variations are not supported anymore.'
} ) ;
return {
type : 'NOTHING'
} ;
2022-09-20 17:43:29 +02:00
}
2023-09-26 16:23:26 +02:00
2023-06-28 09:04:13 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Update the provided block types to be visible .
2023-06-28 09:04:13 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string [ ] } blockNames Names of block types to show .
2023-06-28 09:04:13 +02:00
* /
2024-05-23 21:39:28 +02:00
const showBlockTypes = blockNames => ( {
registry
} ) => {
unlock ( registry . dispatch ( external _wp _editor _namespaceObject . store ) ) . showBlockTypes ( blockNames ) ;
} ;
2022-09-20 17:43:29 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Update the provided block types to be hidden .
2022-04-12 17:12:47 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { string [ ] } blockNames Names of block types to hide .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const hideBlockTypes = blockNames => ( {
registry
} ) => {
unlock ( registry . dispatch ( external _wp _editor _namespaceObject . store ) ) . hideBlockTypes ( blockNames ) ;
} ;
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Stores info about which Meta boxes are available in which location .
*
* @ param { Object } metaBoxesPerLocation Meta boxes per location .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
function setAvailableMetaBoxesPerLocation ( metaBoxesPerLocation ) {
return {
type : 'SET_META_BOXES_PER_LOCATIONS' ,
metaBoxesPerLocation
} ;
}
2023-09-26 16:23:26 +02:00
2022-04-12 17:12:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Update a metabox .
2022-04-12 17:12:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const requestMetaBoxUpdates = ( ) => async ( {
registry ,
select ,
dispatch
} ) => {
dispatch ( {
type : 'REQUEST_META_BOX_UPDATES'
} ) ;
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
// Saves the wp_editor fields.
if ( window . tinyMCE ) {
window . tinyMCE . triggerSave ( ) ;
}
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
// Additional data needed for backward compatibility.
// If we do not provide this data, the post will be overridden with the default values.
const post = registry . select ( external _wp _editor _namespaceObject . store ) . getCurrentPost ( ) ;
const additionalData = [ post . comment _status ? [ 'comment_status' , post . comment _status ] : false , post . ping _status ? [ 'ping_status' , post . ping _status ] : false , post . sticky ? [ 'sticky' , post . sticky ] : false , post . author ? [ 'post_author' , post . author ] : false ] . filter ( Boolean ) ;
2022-04-12 17:12:47 +02:00
2024-05-23 21:39:28 +02:00
// We gather all the metaboxes locations data and the base form data.
const baseFormData = new window . FormData ( document . querySelector ( '.metabox-base-form' ) ) ;
const activeMetaBoxLocations = select . getActiveMetaBoxLocations ( ) ;
const formDataToMerge = [ baseFormData , ... activeMetaBoxLocations . map ( location => new window . FormData ( getMetaBoxContainer ( location ) ) ) ] ;
2022-04-11 14:04:30 +02:00
2024-05-23 21:39:28 +02:00
// Merge all form data objects into a single one.
const formData = formDataToMerge . reduce ( ( memo , currentFormData ) => {
for ( const [ key , value ] of currentFormData ) {
memo . append ( key , value ) ;
}
return memo ;
} , new window . FormData ( ) ) ;
additionalData . forEach ( ( [ key , value ] ) => formData . append ( key , value ) ) ;
try {
// Save the metaboxes.
await external _wp _apiFetch _default ( ) ( {
url : window . _wpMetaBoxUrl ,
method : 'POST' ,
body : formData ,
parse : false
} ) ;
dispatch . metaBoxUpdatesSuccess ( ) ;
} catch {
dispatch . metaBoxUpdatesFailure ( ) ;
}
} ;
2022-09-20 17:43:29 +02:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used to signal a successful meta box update .
2021-05-21 12:14:23 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { Object } Action object .
2021-05-21 12:14:23 +02:00
* /
2024-05-23 21:39:28 +02:00
function metaBoxUpdatesSuccess ( ) {
return {
type : 'META_BOX_UPDATES_SUCCESS'
} ;
}
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used to signal a failed meta box update .
*
* @ return { Object } Action object .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
function metaBoxUpdatesFailure ( ) {
2022-04-11 14:04:30 +02:00
return {
2024-05-23 21:39:28 +02:00
type : 'META_BOX_UPDATES_FAILURE'
2022-04-11 14:04:30 +02:00
} ;
2024-05-23 21:39:28 +02:00
}
2021-11-15 13:50:17 +01:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Action that changes the width of the editing canvas .
*
* @ deprecated
*
* @ param { string } deviceType
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const _ _experimentalSetPreviewDeviceType = deviceType => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType" , {
since : '6.5' ,
version : '6.7' ,
hint : 'registry.dispatch( editorStore ).setDeviceType'
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . setDeviceType ( deviceType ) ;
} ;
2023-09-26 16:23:26 +02:00
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an action object used to open / close the inserter .
*
* @ deprecated
*
* @ param { boolean | Object } value Whether the inserter should be opened ( true ) or closed ( false ) .
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
* /
2024-05-23 21:39:28 +02:00
const setIsInserterOpened = value => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).setIsInserterOpened" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').setIsInserterOpened"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . setIsInserterOpened ( value ) ;
} ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns an action object used to open / close the list view .
*
* @ deprecated
*
* @ param { boolean } isOpen A boolean representing whether the list view should be opened or closed .
* /
const setIsListViewOpened = isOpen => ( {
registry
} ) => {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).setIsListViewOpened" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').setIsListViewOpened"
} ) ;
registry . dispatch ( external _wp _editor _namespaceObject . store ) . setIsListViewOpened ( isOpen ) ;
} ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns an action object used to switch to template editing .
*
* @ deprecated
* /
function setIsEditingTemplate ( ) {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).setIsEditingTemplate" , {
since : '6.5' ,
alternative : "dispatch( 'core/editor').setRenderingMode"
2023-06-27 16:24:19 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
return {
type : 'NOTHING'
} ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
}
2021-02-02 06:17:13 +01:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Create a block based template .
*
* @ deprecated
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
function _ _unstableCreateTemplate ( ) {
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).__unstableCreateTemplate" , {
since : '6.5'
} ) ;
return {
type : 'NOTHING'
} ;
}
let actions _metaBoxesInitialized = false ;
2023-09-26 16:23:26 +02:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Initializes WordPress ` postboxes ` script and the logic for saving meta boxes .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
const initializeMetaBoxes = ( ) => ( {
registry ,
select ,
dispatch
} ) => {
const isEditorReady = registry . select ( external _wp _editor _namespaceObject . store ) . _ _unstableIsEditorReady ( ) ;
if ( ! isEditorReady ) {
return ;
}
// Only initialize once.
if ( actions _metaBoxesInitialized ) {
return ;
}
const postType = registry . select ( external _wp _editor _namespaceObject . store ) . getCurrentPostType ( ) ;
if ( window . postboxes . page !== postType ) {
window . postboxes . add _postbox _toggles ( postType ) ;
}
actions _metaBoxesInitialized = true ;
2021-11-08 15:29:21 +01:00
2024-05-23 21:39:28 +02:00
// Save metaboxes on save completion, except for autosaves.
( 0 , external _wp _hooks _namespaceObject . addFilter ) ( 'editor.__unstableSavePost' , 'core/edit-post/save-metaboxes' , ( previous , options ) => previous . then ( ( ) => {
if ( options . isAutosave ) {
return ;
}
if ( ! select . hasMetaBoxes ( ) ) {
return ;
}
return dispatch . requestMetaBoxUpdates ( ) ;
} ) ) ;
dispatch ( {
type : 'META_BOXES_INITIALIZED'
} ) ;
} ;
2021-11-08 15:29:21 +01:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Action that toggles Distraction free mode .
* Distraction free mode expects there are no sidebars , as due to the
* z - index values set , you can ' t close sidebars .
*
* @ deprecated
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const toggleDistractionFree = ( ) => ( {
registry
2023-06-27 16:24:19 +02:00
} ) => {
2024-05-23 21:39:28 +02:00
external _wp _deprecated _default ( ) ( "dispatch( 'core/edit-post' ).toggleDistractionFree" , {
since : '6.6' ,
alternative : "dispatch( 'core/editor').toggleDistractionFree"
2023-06-27 16:24:19 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
registry . dispatch ( external _wp _editor _namespaceObject . store ) . toggleDistractionFree ( ) ;
2021-05-19 17:09:27 +02:00
} ;
2022-04-11 14:04:30 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2018-12-18 04:14:52 +01:00
2019-03-07 10:09:59 +01:00
2020-06-26 15:33:47 +02:00
2022-04-11 14:04:30 +02:00
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-05-19 17:09:27 +02:00
* /
2020-06-26 15:33:47 +02:00
2024-05-23 21:39:28 +02:00
const {
interfaceStore : selectors _interfaceStore
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
const EMPTY _ARRAY = [ ] ;
const EMPTY _OBJECT = { } ;
2020-06-26 15:33:47 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns the current editing mode .
*
* @ param { Object } state Global application state .
*
* @ return { string } Editing mode .
* /
const getEditorMode = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
var _select$get ;
return ( _select$get = select ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'editorMode' ) ) !== null && _select$get !== void 0 ? _select$get : 'visual' ;
2023-06-27 16:24:19 +02:00
} ) ;
2022-04-11 14:04:30 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the editor sidebar is opened .
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the editor sidebar is opened .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const isEditorSidebarOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
const activeGeneralSidebar = select ( selectors _interfaceStore ) . getActiveComplementaryArea ( 'core' ) ;
return [ 'edit-post/document' , 'edit-post/block' ] . includes ( activeGeneralSidebar ) ;
} ) ;
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the plugin sidebar is opened .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the plugin sidebar is opened .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const isPluginSidebarOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
const activeGeneralSidebar = select ( selectors _interfaceStore ) . getActiveComplementaryArea ( 'core' ) ;
return ! ! activeGeneralSidebar && ! [ 'edit-post/document' , 'edit-post/block' ] . includes ( activeGeneralSidebar ) ;
} ) ;
2020-06-26 15:33:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the current active general sidebar name , or null if there is no
* general sidebar active . The active general sidebar is a unique name to
* identify either an editor or plugin sidebar .
*
* Examples :
*
* - ` edit-post/document `
* - ` my-plugin/insert-image-sidebar `
*
* @ param { Object } state Global application state .
*
* @ return { ? string } Active general sidebar name .
2020-06-26 15:33:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const getActiveGeneralSidebarName = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
return select ( selectors _interfaceStore ) . getActiveComplementaryArea ( 'core' ) ;
} ) ;
2023-09-26 16:23:26 +02:00
2020-06-26 15:33:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Converts panels from the new preferences store format to the old format
* that the post editor previously used .
*
* The resultant converted data should look like this :
* {
* panelName : {
* enabled : false ,
* opened : true ,
* } ,
* anotherPanelName : {
* opened : true
* } ,
* }
*
* @ param { string [ ] | undefined } inactivePanels An array of inactive panel names .
* @ param { string [ ] | undefined } openPanels An array of open panel names .
*
* @ return { Object } The converted panel data .
2020-06-26 15:33:47 +02:00
* /
2024-05-23 21:39:28 +02:00
function convertPanelsToOldFormat ( inactivePanels , openPanels ) {
var _ref ;
// First reduce the inactive panels.
const panelsWithEnabledState = inactivePanels ? . reduce ( ( accumulatedPanels , panelName ) => ( {
... accumulatedPanels ,
[ panelName ] : {
enabled : false
}
} ) , { } ) ;
2020-06-26 15:33:47 +02:00
2024-05-23 21:39:28 +02:00
// Then reduce the open panels, passing in the result of the previous
// reduction as the initial value so that both open and inactive
// panel state is combined.
const panels = openPanels ? . reduce ( ( accumulatedPanels , panelName ) => {
const currentPanelState = accumulatedPanels ? . [ panelName ] ;
return {
... accumulatedPanels ,
[ panelName ] : {
... currentPanelState ,
opened : true
}
} ;
} , panelsWithEnabledState !== null && panelsWithEnabledState !== void 0 ? panelsWithEnabledState : { } ) ;
2020-06-26 15:33:47 +02:00
2024-05-23 21:39:28 +02:00
// The panels variable will only be set if openPanels wasn't `undefined`.
// If it isn't set just return `panelsWithEnabledState`, and if that isn't
// set return an empty object.
return ( _ref = panels !== null && panels !== void 0 ? panels : panelsWithEnabledState ) !== null && _ref !== void 0 ? _ref : EMPTY _OBJECT ;
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2020-06-26 15:33:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the preferences ( these preferences are persisted locally ) .
*
* @ param { Object } state Global application state .
*
* @ return { Object } Preferences Object .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const getPreferences = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).getPreferences ` , {
since : '6.0' ,
alternative : ` select( 'core/preferences' ).get `
2023-06-27 16:24:19 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
const corePreferences = [ 'editorMode' , 'hiddenBlockTypes' ] . reduce ( ( accumulatedPrefs , preferenceKey ) => {
const value = select ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , preferenceKey ) ;
2022-04-11 14:04:30 +02:00
return {
2024-05-23 21:39:28 +02:00
... accumulatedPrefs ,
[ preferenceKey ] : value
2022-04-11 14:04:30 +02:00
} ;
2024-05-23 21:39:28 +02:00
} , { } ) ;
2022-04-11 14:04:30 +02:00
2024-05-23 21:39:28 +02:00
// Panels were a preference, but the data structure changed when the state
// was migrated to the preferences store. They need to be converted from
// the new preferences store format to old format to ensure no breaking
// changes for plugins.
const inactivePanels = select ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'inactivePanels' ) ;
const openPanels = select ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'openPanels' ) ;
const panels = convertPanelsToOldFormat ( inactivePanels , openPanels ) ;
return {
... corePreferences ,
panels
} ;
} ) ;
2023-02-07 08:04:52 +01:00
/ * *
2024-05-23 21:39:28 +02:00
*
* @ param { Object } state Global application state .
* @ param { string } preferenceKey Preference Key .
* @ param { * } defaultValue Default Value .
*
* @ return { * } Preference Value .
2023-02-07 08:04:52 +01:00
* /
2024-05-23 21:39:28 +02:00
function getPreference ( state , preferenceKey , defaultValue ) {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).getPreference ` , {
since : '6.0' ,
alternative : ` select( 'core/preferences' ).get `
} ) ;
2023-02-07 08:04:52 +01:00
2024-05-23 21:39:28 +02:00
// Avoid using the `getPreferences` registry selector where possible.
const preferences = getPreferences ( state ) ;
const value = preferences [ preferenceKey ] ;
return value === undefined ? defaultValue : value ;
2023-02-07 08:04:52 +01:00
}
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an array of blocks that are hidden .
*
* @ return { Array } A list of the hidden block types
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
const getHiddenBlockTypes = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
var _select$get2 ;
return ( _select$get2 = select ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'hiddenBlockTypes' ) ) !== null && _select$get2 !== void 0 ? _select$get2 : EMPTY _ARRAY ;
} ) ;
2023-09-26 16:23:26 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the publish sidebar is opened .
*
* @ deprecated
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether the publish sidebar is open .
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
const isPublishSidebarOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isPublishSidebarOpened ` , {
since : '6.6' ,
alternative : ` select( 'core/editor' ).isPublishSidebarOpened `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . isPublishSidebarOpened ( ) ;
} ) ;
2022-04-11 14:04:30 +02:00
2023-02-07 08:04:52 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the given panel was programmatically removed , or false otherwise .
* All panels are not removed by default .
*
* @ deprecated
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is removed .
2023-02-07 08:04:52 +01:00
* /
2024-05-23 21:39:28 +02:00
const isEditorPanelRemoved = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , panelName ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isEditorPanelRemoved ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).isEditorPanelRemoved `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . isEditorPanelRemoved ( panelName ) ;
} ) ;
2022-04-11 14:04:30 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the given panel is enabled , or false otherwise . Panels are
* enabled by default .
*
* @ deprecated
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is enabled .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const isEditorPanelEnabled = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , panelName ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isEditorPanelEnabled ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).isEditorPanelEnabled `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . isEditorPanelEnabled ( panelName ) ;
} ) ;
2022-04-11 14:04:30 +02:00
2020-06-26 15:33:47 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the given panel is open , or false otherwise . Panels are
* closed by default .
*
* @ deprecated
*
* @ param { Object } state Global application state .
* @ param { string } panelName A string that identifies the panel .
*
* @ return { boolean } Whether or not the panel is open .
2020-06-26 15:33:47 +02:00
* /
2024-05-23 21:39:28 +02:00
const isEditorPanelOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , panelName ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isEditorPanelOpened ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).isEditorPanelOpened `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . isEditorPanelOpened ( panelName ) ;
} ) ;
2023-09-26 16:23:26 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if a modal is active , or false otherwise .
*
* @ deprecated since WP 6.3 use ` core/interface ` store ' s selector with the same name instead .
*
* @ param { Object } state Global application state .
* @ param { string } modalName A string that uniquely identifies the modal .
*
* @ return { boolean } Whether the modal is active .
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
const isModalActive = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , modalName ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isModalActive ` , {
since : '6.3' ,
alternative : ` select( 'core/interface' ).isModalActive `
} ) ;
return ! ! select ( selectors _interfaceStore ) . isModalActive ( modalName ) ;
} ) ;
2020-06-26 15:33:47 +02:00
2021-11-08 15:29:21 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns whether the given feature is enabled or not .
*
* @ param { Object } state Global application state .
* @ param { string } feature Feature slug .
*
* @ return { boolean } Is active .
2021-11-08 15:29:21 +01:00
* /
2024-05-23 21:39:28 +02:00
const isFeatureActive = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , feature ) => {
return ! ! select ( external _wp _preferences _namespaceObject . store ) . get ( 'core/edit-post' , feature ) ;
} ) ;
2021-11-08 15:29:21 +01:00
2021-05-20 14:20:04 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the plugin item is pinned to the header .
* When the value is not set it defaults to true .
*
* @ param { Object } state Global application state .
* @ param { string } pluginName Plugin item name .
*
* @ return { boolean } Whether the plugin item is pinned .
2021-05-20 14:20:04 +02:00
* /
2024-05-23 21:39:28 +02:00
const isPluginItemPinned = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , pluginName ) => {
return select ( selectors _interfaceStore ) . isItemPinned ( 'core' , pluginName ) ;
} ) ;
2021-05-19 17:09:27 +02:00
2023-06-28 09:04:13 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns an array of active meta box locations .
*
* @ param { Object } state Post editor state .
*
* @ return { string [ ] } Active meta box locations .
2023-06-28 09:04:13 +02:00
* /
2024-05-23 21:39:28 +02:00
const getActiveMetaBoxLocations = ( 0 , external _wp _data _namespaceObject . createSelector ) ( state => {
return Object . keys ( state . metaBoxes . locations ) . filter ( location => isMetaBoxLocationActive ( state , location ) ) ;
} , state => [ state . metaBoxes . locations ] ) ;
2023-09-26 16:23:26 +02:00
2021-11-08 15:29:21 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if a metabox location is active and visible
*
* @ param { Object } state Post editor state .
* @ param { string } location Meta box location to test .
*
* @ return { boolean } Whether the meta box location is active and visible .
2021-11-08 15:29:21 +01:00
* /
2024-05-23 21:39:28 +02:00
const isMetaBoxLocationVisible = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( state , location ) => {
return isMetaBoxLocationActive ( state , location ) && getMetaBoxesPerLocation ( state , location ) ? . some ( ( {
id
} ) => {
return select ( external _wp _editor _namespaceObject . store ) . isEditorPanelEnabled ( state , ` meta-box- ${ id } ` ) ;
2023-06-28 09:04:13 +02:00
} ) ;
2024-05-23 21:39:28 +02:00
} ) ;
2023-06-28 09:04:13 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if there is an active meta box in the given location , or false
* otherwise .
*
* @ param { Object } state Post editor state .
* @ param { string } location Meta box location to test .
*
* @ return { boolean } Whether the meta box location is active .
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
function isMetaBoxLocationActive ( state , location ) {
const metaBoxes = getMetaBoxesPerLocation ( state , location ) ;
return ! ! metaBoxes && metaBoxes . length !== 0 ;
}
2023-09-26 16:23:26 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the list of all the available meta boxes for a given location .
*
* @ param { Object } state Global application state .
* @ param { string } location Meta box location to test .
*
* @ return { ? Array } List of meta boxes .
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
function getMetaBoxesPerLocation ( state , location ) {
return state . metaBoxes . locations [ location ] ;
}
2023-06-28 09:04:13 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the list of all the available meta boxes .
*
* @ param { Object } state Global application state .
*
* @ return { Array } List of meta boxes .
2019-09-19 17:19:18 +02:00
* /
2024-05-23 21:39:28 +02:00
const getAllMetaBoxes = ( 0 , external _wp _data _namespaceObject . createSelector ) ( state => {
return Object . values ( state . metaBoxes . locations ) . flat ( ) ;
} , state => [ state . metaBoxes . locations ] ) ;
2021-01-28 03:04:13 +01:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the post is using Meta Boxes
*
* @ param { Object } state Global application state
*
* @ return { boolean } Whether there are metaboxes or not .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
function hasMetaBoxes ( state ) {
return getActiveMetaBoxLocations ( state ) . length > 0 ;
}
2023-09-26 16:23:26 +02:00
2018-12-18 04:14:52 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the Meta Boxes are being saved .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the metaboxes are being saved .
2018-12-18 04:14:52 +01:00
* /
2024-05-23 21:39:28 +02:00
function selectors _isSavingMetaBoxes ( state ) {
return state . metaBoxes . isSaving ;
2023-06-28 09:04:13 +02:00
}
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the current editing canvas device type .
*
* @ deprecated
*
* @ param { Object } state Global application state .
*
* @ return { string } Device type .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
const _ _experimentalGetPreviewDeviceType = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-site' ).__experimentalGetPreviewDeviceType ` , {
since : '6.5' ,
version : '6.7' ,
alternative : ` select( 'core/editor' ).getDeviceType `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . getDeviceType ( ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the inserter is opened .
*
* @ deprecated
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the inserter is opened .
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* /
2024-05-23 21:39:28 +02:00
const isInserterOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isInserterOpened ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).isInserterOpened `
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) ;
2024-05-23 21:39:28 +02:00
return select ( external _wp _editor _namespaceObject . store ) . isInserterOpened ( ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Get the insertion point for the inserter .
*
* @ deprecated
*
* @ param { Object } state Global application state .
*
* @ return { Object } The root client ID , index to insert at and starting filter value .
2023-06-28 09:04:13 +02:00
* /
2024-05-23 21:39:28 +02:00
const _ _experimentalGetInsertionPoint = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).__experimentalGetInsertionPoint ` , {
since : '6.5' ,
version : '6.7'
} ) ;
return unlock ( select ( external _wp _editor _namespaceObject . store ) ) . getInsertionPoint ( ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2023-06-28 09:04:13 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if the list view is opened .
*
* @ param { Object } state Global application state .
*
* @ return { boolean } Whether the list view is opened .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
const isListViewOpened = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isListViewOpened ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).isListViewOpened `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . isListViewOpened ( ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns true if the template editing mode is enabled .
*
* @ deprecated
* /
const isEditingTemplate = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
external _wp _deprecated _default ( ) ( ` select( 'core/edit-post' ).isEditingTemplate ` , {
since : '6.5' ,
alternative : ` select( 'core/editor' ).getRenderingMode `
} ) ;
return select ( external _wp _editor _namespaceObject . store ) . getCurrentPostType ( ) === 'wp_template' ;
} ) ;
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns true if meta boxes are initialized .
2021-05-19 17:09:27 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { Object } state Global application state .
2021-05-19 17:09:27 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { boolean } Whether meta boxes are initialized .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
function areMetaBoxesInitialized ( state ) {
return state . metaBoxes . initialized ;
2021-05-19 17:09:27 +02:00
}
2023-09-26 16:23:26 +02:00
2021-05-07 13:48:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Retrieves the template of the currently edited post .
2021-05-19 17:09:27 +02:00
*
2024-05-23 21:39:28 +02:00
* @ return { Object ? } Post Template .
2021-05-07 13:48:27 +02:00
* /
2024-05-23 21:39:28 +02:00
const getEditedPostTemplate = ( 0 , external _wp _data _namespaceObject . createRegistrySelector ) ( select => ( ) => {
const {
id : postId ,
type : postType ,
slug
} = select ( external _wp _editor _namespaceObject . store ) . getCurrentPost ( ) ;
const {
getSite ,
getEditedEntityRecord ,
getEntityRecords
} = select ( external _wp _coreData _namespaceObject . store ) ;
const siteSettings = getSite ( ) ;
// First check if the current page is set as the posts page.
const isPostsPage = + postId === siteSettings ? . page _for _posts ;
if ( isPostsPage ) {
const defaultTemplateId = select ( external _wp _coreData _namespaceObject . store ) . getDefaultTemplateId ( {
slug : 'home'
} ) ;
return getEditedEntityRecord ( 'postType' , 'wp_template' , defaultTemplateId ) ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
const currentTemplate = select ( external _wp _editor _namespaceObject . store ) . getEditedPostAttribute ( 'template' ) ;
if ( currentTemplate ) {
const templateWithSameSlug = getEntityRecords ( 'postType' , 'wp_template' , {
per _page : - 1
} ) ? . find ( template => template . slug === currentTemplate ) ;
if ( ! templateWithSameSlug ) {
return templateWithSameSlug ;
2021-05-07 13:48:27 +02:00
}
2024-05-23 21:39:28 +02:00
return getEditedEntityRecord ( 'postType' , 'wp_template' , templateWithSameSlug . id ) ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
let slugToCheck ;
// In `draft` status we might not have a slug available, so we use the `single`
// post type templates slug(ex page, single-post, single-product etc..).
// Pages do not need the `single` prefix in the slug to be prioritized
// through template hierarchy.
if ( slug ) {
slugToCheck = postType === 'page' ? ` ${ postType } - ${ slug } ` : ` single- ${ postType } - ${ slug } ` ;
} else {
slugToCheck = postType === 'page' ? 'page' : ` single- ${ postType } ` ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
const defaultTemplateId = select ( external _wp _coreData _namespaceObject . store ) . getDefaultTemplateId ( {
slug : slugToCheck
} ) ;
return select ( external _wp _coreData _namespaceObject . store ) . getEditedEntityRecord ( 'postType' , 'wp_template' , defaultTemplateId ) ;
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* The identifier for the data store .
*
* @ type { string }
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* /
2024-05-23 21:39:28 +02:00
const STORE _NAME = 'core/edit-post' ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* CSS selector string for the admin bar view post link anchor tag .
*
* @ type { string }
* /
const VIEW _AS _LINK _SELECTOR = '#wp-admin-bar-view a' ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* CSS selector string for the admin bar preview post link anchor tag .
*
* @ type { string }
* /
const VIEW _AS _PREVIEW _LINK _SELECTOR = '#wp-admin-bar-preview a' ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
/ * *
* WordPress dependencies
* /
2022-04-11 14:04:30 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Internal dependencies
2022-04-11 14:04:30 +02:00
* /
2021-05-19 17:09:27 +02:00
2024-05-23 21:39:28 +02:00
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Store definition for the edit post namespace .
*
* @ see https : //github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @ type { Object }
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
const store = ( 0 , external _wp _data _namespaceObject . createReduxStore ) ( STORE _NAME , {
reducer : reducer ,
actions : actions _namespaceObject ,
selectors : selectors _namespaceObject
} ) ;
( 0 , external _wp _data _namespaceObject . register ) ( store ) ;
2020-01-08 12:57:23 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js
2023-09-26 16:23:26 +02:00
2021-05-07 13:48:27 +02:00
/ * *
* WordPress dependencies
* /
2020-01-08 12:57:23 +01:00
2021-01-28 03:04:13 +01:00
2021-05-19 17:09:27 +02:00
2021-11-08 15:29:21 +01:00
2021-05-07 13:48:27 +02:00
/ * *
* Internal dependencies
* /
2020-01-08 12:57:23 +01:00
2024-05-23 21:39:28 +02:00
function TextEditor ( ) {
const isRichEditingEnabled = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
return select ( external _wp _editor _namespaceObject . store ) . getEditorSettings ( ) . richEditingEnabled ;
2021-05-19 17:09:27 +02:00
} , [ ] ) ;
2024-05-23 21:39:28 +02:00
const {
switchEditorMode
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _editor _namespaceObject . store ) ;
const {
isWelcomeGuideVisible
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
isFeatureActive
} = select ( store ) ;
return {
isWelcomeGuideVisible : isFeatureActive ( 'welcomeGuide' )
} ;
} , [ ] ) ;
const titleRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isWelcomeGuideVisible ) {
return ;
}
titleRef ? . current ? . focus ( ) ;
} , [ isWelcomeGuideVisible ] ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
className : "edit-post-text-editor"
} , isRichEditingEnabled && ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
className : "edit-post-text-editor__toolbar"
} , ( 0 , external _React _namespaceObject . createElement ) ( "h2" , null , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editing code' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
variant : "tertiary" ,
onClick : ( ) => switchEditorMode ( 'visual' ) ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . secondary ( 'm' )
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Exit code editor' ) ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
className : "edit-post-text-editor__body"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PostTitleRaw , {
ref : titleRef
} ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PostTextEditor , null ) ) ) ;
2021-05-07 13:48:27 +02:00
}
2021-05-21 12:14:23 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/use-padding-appender.js
2021-05-21 12:14:23 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
function usePaddingAppender ( ) {
const registry = ( 0 , external _wp _data _namespaceObject . useRegistry ) ( ) ;
return ( 0 , external _wp _compose _namespaceObject . useRefEffect ) ( node => {
function onMouseDown ( event ) {
if ( event . target !== node ) {
return ;
}
const {
ownerDocument
} = node ;
const {
defaultView
} = ownerDocument ;
const paddingBottom = defaultView . parseInt ( defaultView . getComputedStyle ( node ) . paddingBottom , 10 ) ;
if ( ! paddingBottom ) {
return ;
}
2021-11-08 15:29:21 +01:00
2024-05-23 21:39:28 +02:00
// Only handle clicks under the last child.
const lastChild = node . lastElementChild ;
if ( ! lastChild ) {
return ;
}
const lastChildRect = lastChild . getBoundingClientRect ( ) ;
if ( event . clientY < lastChildRect . bottom ) {
return ;
}
event . preventDefault ( ) ;
const blockOrder = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlockOrder ( '' ) ;
const lastBlockClientId = blockOrder [ blockOrder . length - 1 ] ;
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
// Do nothing when only default block appender is present.
if ( ! lastBlockClientId ) {
return ;
}
const lastBlock = registry . select ( external _wp _blockEditor _namespaceObject . store ) . getBlock ( lastBlockClientId ) ;
const {
selectBlock ,
insertDefaultBlock
} = registry . dispatch ( external _wp _blockEditor _namespaceObject . store ) ;
if ( ( 0 , external _wp _blocks _namespaceObject . isUnmodifiedDefaultBlock ) ( lastBlock ) ) {
selectBlock ( lastBlockClientId ) ;
} else {
insertDefaultBlock ( ) ;
}
}
node . addEventListener ( 'mousedown' , onMouseDown ) ;
return ( ) => {
node . removeEventListener ( 'mousedown' , onMouseDown ) ;
} ;
} , [ registry ] ) ;
}
2021-05-21 12:14:23 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js
2021-05-21 12:14:23 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* External dependencies
2021-05-21 12:14:23 +02:00
* /
2021-06-25 17:52:22 +02:00
/ * *
* WordPress dependencies
2021-06-15 17:30:24 +02:00
* /
2021-06-25 17:52:22 +02:00
2023-06-28 09:04:13 +02:00
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
2021-06-15 17:30:24 +02:00
/ * *
* Internal dependencies
* /
2024-05-23 21:39:28 +02:00
const {
EditorCanvas
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
const isGutenbergPlugin = false ? 0 : false ;
function VisualEditor ( {
styles
} ) {
2021-06-15 17:30:24 +02:00
const {
2024-05-23 21:39:28 +02:00
isWelcomeGuideVisible ,
renderingMode ,
isBlockBasedTheme ,
hasV3BlocksOnly ,
isEditingTemplate ,
isZoomedOutView
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
isFeatureActive
} = select ( store ) ;
const {
getEditorSettings ,
getRenderingMode
} = select ( external _wp _editor _namespaceObject . store ) ;
const {
getBlockTypes
} = select ( external _wp _blocks _namespaceObject . store ) ;
const {
_ _unstableGetEditorMode
} = select ( external _wp _blockEditor _namespaceObject . store ) ;
const editorSettings = getEditorSettings ( ) ;
return {
isWelcomeGuideVisible : isFeatureActive ( 'welcomeGuide' ) ,
renderingMode : getRenderingMode ( ) ,
isBlockBasedTheme : editorSettings . _ _unstableIsBlockBasedTheme ,
hasV3BlocksOnly : getBlockTypes ( ) . every ( type => {
return type . apiVersion >= 3 ;
} ) ,
isEditingTemplate : select ( external _wp _editor _namespaceObject . store ) . getCurrentPostType ( ) === 'wp_template' ,
isZoomedOutView : _ _unstableGetEditorMode ( ) === 'zoom-out'
} ;
} , [ ] ) ;
const hasMetaBoxes = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( store ) . hasMetaBoxes ( ) , [ ] ) ;
const paddingAppenderRef = usePaddingAppender ( ) ;
let paddingBottom ;
2021-06-15 17:30:24 +02:00
2024-05-23 21:39:28 +02:00
// Add a constant padding for the typewritter effect. When typing at the
// bottom, there needs to be room to scroll up.
if ( ! isZoomedOutView && ! hasMetaBoxes && renderingMode === 'post-only' ) {
paddingBottom = '40vh' ;
}
styles = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => [ ... styles , {
// We should move this in to future to the body.
css : paddingBottom ? ` body{padding-bottom: ${ paddingBottom } } ` : ''
} ] , [ styles , paddingBottom ] ) ;
const isToBeIframed = ( hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme ) && ! hasMetaBoxes || isEditingTemplate ;
return ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
className : dist _clsx ( 'edit-post-visual-editor' , {
'has-inline-canvas' : ! isToBeIframed
} )
} , ( 0 , external _React _namespaceObject . createElement ) ( EditorCanvas , {
disableIframe : ! isToBeIframed ,
styles : styles
// We should auto-focus the canvas (title) on load.
// eslint-disable-next-line jsx-a11y/no-autofocus
,
autoFocus : ! isWelcomeGuideVisible ,
contentRef : paddingAppenderRef
} ) ) ;
}
2021-06-15 17:30:24 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
2021-06-25 17:52:22 +02:00
/ * *
* WordPress dependencies
* /
2021-05-19 17:09:27 +02:00
2021-06-25 17:52:22 +02:00
2023-02-07 08:04:52 +01:00
/ * *
* Internal dependencies
* /
2024-05-23 21:39:28 +02:00
function KeyboardShortcuts ( ) {
2023-02-07 08:04:52 +01:00
const {
2024-05-23 21:39:28 +02:00
toggleFeature
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-05-23 21:39:28 +02:00
registerShortcut
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _keyboardShortcuts _namespaceObject . store ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
registerShortcut ( {
name : 'core/edit-post/toggle-fullscreen' ,
category : 'global' ,
description : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Toggle fullscreen mode.' ) ,
keyCombination : {
modifier : 'secondary' ,
character : 'f'
}
} ) ;
} , [ ] ) ;
( 0 , external _wp _keyboardShortcuts _namespaceObject . useShortcut ) ( 'core/edit-post/toggle-fullscreen' , ( ) => {
toggleFeature ( 'fullscreenMode' ) ;
} ) ;
return null ;
2020-01-08 12:57:23 +01:00
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const keyboard _shortcuts = ( KeyboardShortcuts ) ;
2021-05-07 13:48:27 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/init-pattern-modal/index.js
2018-12-14 05:41:57 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2019-03-21 13:48:00 +01:00
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2021-05-19 17:09:27 +02:00
* Internal dependencies
2019-09-19 17:19:18 +02:00
* /
2019-03-21 13:48:00 +01:00
2019-09-19 17:19:18 +02:00
2024-05-23 21:39:28 +02:00
const {
ReusableBlocksRenameHint
} = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
function InitPatternModal ( ) {
const {
editPost
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _editor _namespaceObject . store ) ;
const [ isModalOpen , setIsModalOpen ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const [ syncType , setSyncType ] = ( 0 , external _wp _element _namespaceObject . useState ) ( undefined ) ;
const [ title , setTitle ] = ( 0 , external _wp _element _namespaceObject . useState ) ( '' ) ;
const {
postType ,
isNewPost
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
getEditedPostAttribute ,
isCleanNewPost
} = select ( external _wp _editor _namespaceObject . store ) ;
return {
postType : getEditedPostAttribute ( 'type' ) ,
isNewPost : isCleanNewPost ( )
} ;
} , [ ] ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isNewPost && postType === 'wp_block' ) {
setIsModalOpen ( true ) ;
2021-06-25 17:52:22 +02:00
}
2024-05-23 21:39:28 +02:00
// We only want the modal to open when the page is first loaded.
// eslint-disable-next-line react-hooks/exhaustive-deps
} , [ ] ) ;
if ( postType !== 'wp_block' || ! isNewPost ) {
return null ;
}
return ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , isModalOpen && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Modal , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Create pattern' ) ,
onRequestClose : ( ) => {
setIsModalOpen ( false ) ;
} ,
overlayClassName : "reusable-blocks-menu-items__convert-modal"
} , ( 0 , external _React _namespaceObject . createElement ) ( "form" , {
onSubmit : event => {
event . preventDefault ( ) ;
setIsModalOpen ( false ) ;
editPost ( {
title ,
meta : {
wp _pattern _sync _status : syncType
}
} ) ;
2023-06-27 16:24:19 +02:00
}
2024-05-23 21:39:28 +02:00
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . _ _experimentalVStack , {
spacing : "5"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . TextControl , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Name' ) ,
value : title ,
onChange : setTitle ,
placeholder : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'My pattern' ) ,
className : "patterns-create-modal__name-input" ,
_ _nextHasNoMarginBottom : true ,
_ _next40pxDefaultSize : true
} ) , ( 0 , external _React _namespaceObject . createElement ) ( ReusableBlocksRenameHint , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ToggleControl , {
label : ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Synced' , 'Option that makes an individual pattern synchronized' ) ,
help : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Sync this pattern across multiple locations.' ) ,
checked : ! syncType ,
onChange : ( ) => {
setSyncType ( ! syncType ? 'unsynced' : undefined ) ;
2023-06-27 16:24:19 +02:00
}
2024-05-23 21:39:28 +02:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . _ _experimentalHStack , {
justify : "right"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
variant : "primary" ,
type : "submit" ,
disabled : ! title ,
_ _experimentalIsFocusable : true
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Create' ) ) ) ) ) ) ) ;
}
2019-03-21 13:48:00 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
2021-01-28 03:04:13 +01:00
/ * *
* WordPress dependencies
* /
2019-10-15 17:37:08 +02:00
2019-03-21 13:48:00 +01:00
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* Returns the Post ' s Edit URL .
*
* @ param { number } postId Post ID .
*
* @ return { string } Post edit URL .
* /
function getPostEditURL ( postId ) {
return ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'post.php' , {
post : postId ,
action : 'edit'
} ) ;
}
2021-01-28 03:04:13 +01:00
/ * *
2024-05-23 21:39:28 +02:00
* Returns the Post ' s Trashed URL .
*
* @ param { number } postId Post ID .
* @ param { string } postType Post Type .
*
* @ return { string } Post trashed URL .
2021-01-28 03:04:13 +01:00
* /
2024-05-23 21:39:28 +02:00
function getPostTrashedURL ( postId , postType ) {
return ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'edit.php' , {
trashed : 1 ,
post _type : postType ,
ids : postId
} ) ;
}
class BrowserURL extends external _wp _element _namespaceObject . Component {
constructor ( ) {
super ( ... arguments ) ;
this . state = {
historyId : null
} ;
}
componentDidUpdate ( prevProps ) {
const {
postId ,
postStatus ,
postType ,
isSavingPost ,
hasHistory
} = this . props ;
const {
historyId
} = this . state ;
2021-01-28 03:04:13 +01:00
2024-05-23 21:39:28 +02:00
// Posts are still dirty while saving so wait for saving to finish
// to avoid the unsaved changes warning when trashing posts.
if ( postStatus === 'trash' && ! isSavingPost ) {
this . setTrashURL ( postId , postType ) ;
return ;
}
if ( ( postId !== prevProps . postId || postId !== historyId ) && postStatus !== 'auto-draft' && postId && ! hasHistory ) {
this . setBrowserURL ( postId ) ;
}
}
2023-09-26 16:23:26 +02:00
2021-06-25 17:52:22 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Navigates the browser to the post trashed URL to show a notice about the trashed post .
2021-06-25 17:52:22 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { number } postId Post ID .
* @ param { string } postType Post Type .
* /
setTrashURL ( postId , postType ) {
window . location . href = getPostTrashedURL ( postId , postType ) ;
}
/ * *
* Replaces the browser URL with a post editor link for the given post ID .
2021-06-25 17:52:22 +02:00
*
2024-05-23 21:39:28 +02:00
* Note it is important that , since this function may be called when the
* editor first loads , the result generated ` getPostEditURL ` matches that
* produced by the server . Otherwise , the URL will change unexpectedly .
2021-06-25 17:52:22 +02:00
*
2024-05-23 21:39:28 +02:00
* @ param { number } postId Post ID for which to generate post editor URL .
2021-06-25 17:52:22 +02:00
* /
2024-05-23 21:39:28 +02:00
setBrowserURL ( postId ) {
window . history . replaceState ( {
id : postId
} , 'Post ' + postId , getPostEditURL ( postId ) ) ;
this . setState ( ( ) => ( {
historyId : postId
} ) ) ;
}
render ( ) {
return null ;
2021-06-25 17:52:22 +02:00
}
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const browser _url = ( ( 0 , external _wp _data _namespaceObject . withSelect ) ( select => {
2021-06-25 17:52:22 +02:00
const {
2024-05-23 21:39:28 +02:00
getCurrentPost ,
isSavingPost
} = select ( external _wp _editor _namespaceObject . store ) ;
const post = getCurrentPost ( ) ;
let {
id ,
status ,
type
} = post ;
const isTemplate = [ 'wp_template' , 'wp_template_part' ] . includes ( type ) ;
if ( isTemplate ) {
id = post . wp _id ;
}
2021-06-25 17:52:22 +02:00
return {
2024-05-23 21:39:28 +02:00
postId : id ,
postStatus : status ,
postType : type ,
isSavingPost : isSavingPost ( )
2021-06-25 17:52:22 +02:00
} ;
2024-05-23 21:39:28 +02:00
} ) ( BrowserURL ) ) ;
2021-06-25 17:52:22 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: external ["wp","primitives"]
const external _wp _primitives _namespaceObject = window [ "wp" ] [ "primitives" ] ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
2020-06-26 15:33:47 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
const wordpress = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "-2 -2 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
} ) ) ;
/* harmony default export */ const library _wordpress = ( wordpress ) ;
2019-10-15 17:37:08 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js
2020-02-06 22:03:31 +01:00
2021-05-19 17:09:27 +02:00
/ * *
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* External dependencies
2021-05-19 17:09:27 +02:00
* /
2019-10-15 17:37:08 +02:00
2020-10-13 15:10:30 +02:00
2020-01-08 12:57:23 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-01-08 12:57:23 +01:00
* /
2018-12-14 05:41:57 +01:00
2021-05-07 13:48:27 +02:00
2019-10-15 17:37:08 +02:00
2018-12-14 05:41:57 +01:00
2020-01-08 12:57:23 +01:00
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2021-05-07 13:48:27 +02:00
* Internal dependencies
2021-01-28 03:04:13 +01:00
* /
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
function FullscreenModeClose ( {
showTooltip ,
icon ,
href ,
2024-02-09 19:22:22 +01:00
initialPost
2023-06-27 16:24:19 +02:00
} ) {
2024-05-23 21:39:28 +02:00
var _postType$labels$view ;
2021-05-19 17:09:27 +02:00
const {
2024-05-23 21:39:28 +02:00
isActive ,
isRequestingSiteIcon ,
postType ,
siteIconUrl
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
2024-05-23 21:39:28 +02:00
getCurrentPostType
} = select ( external _wp _editor _namespaceObject . store ) ;
const {
isFeatureActive
} = select ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-05-23 21:39:28 +02:00
getEntityRecord ,
getPostType ,
isResolving
} = select ( external _wp _coreData _namespaceObject . store ) ;
const siteData = getEntityRecord ( 'root' , '__unstableBase' , undefined ) || { } ;
const _postType = initialPost ? . type || getCurrentPostType ( ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return {
2024-05-23 21:39:28 +02:00
isActive : isFeatureActive ( 'fullscreenMode' ) ,
isRequestingSiteIcon : isResolving ( 'getEntityRecord' , [ 'root' , '__unstableBase' , undefined ] ) ,
postType : getPostType ( _postType ) ,
siteIconUrl : siteData . site _icon _url
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ;
} , [ ] ) ;
2024-05-23 21:39:28 +02:00
const disableMotion = ( 0 , external _wp _compose _namespaceObject . useReducedMotion ) ( ) ;
if ( ! isActive || ! postType ) {
return null ;
}
let buttonIcon = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Icon , {
size : "36px" ,
icon : library _wordpress
} ) ;
const effect = {
expand : {
scale : 1.25 ,
transition : {
type : 'tween' ,
duration : '0.3'
}
2023-02-07 08:04:52 +01:00
}
2024-05-23 21:39:28 +02:00
} ;
if ( siteIconUrl ) {
buttonIcon = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . _ _unstableMotion . img , {
variants : ! disableMotion && effect ,
alt : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Site Icon' ) ,
className : "edit-post-fullscreen-mode-close_site-icon" ,
src : siteIconUrl
} ) ;
}
if ( isRequestingSiteIcon ) {
buttonIcon = null ;
}
// Override default icon if custom icon is provided via props.
if ( icon ) {
buttonIcon = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Icon , {
size : "36px" ,
icon : icon
} ) ;
}
const classes = dist _clsx ( {
'edit-post-fullscreen-mode-close' : true ,
'has-icon' : siteIconUrl
} ) ;
const buttonHref = href !== null && href !== void 0 ? href : ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'edit.php' , {
post _type : postType . slug
} ) ;
const buttonLabel = ( _postType$labels$view = postType ? . labels ? . view _items ) !== null && _postType$labels$view !== void 0 ? _postType$labels$view : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Back' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . _ _unstableMotion . div , {
whileHover : "expand"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
className : classes ,
href : buttonHref ,
label : buttonLabel ,
showTooltip : showTooltip
} , buttonIcon ) ) ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const fullscreen _mode _close = ( FullscreenModeClose ) ;
2021-01-28 03:04:13 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/manage-patterns-menu-item.js
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2023-02-07 08:04:52 +01:00
2024-05-23 21:39:28 +02:00
function ManagePatternsMenuItem ( ) {
const url = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
canUser
} = select ( external _wp _coreData _namespaceObject . store ) ;
const defaultUrl = ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'edit.php' , {
post _type : 'wp_block'
} ) ;
const patternsUrl = ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'site-editor.php' , {
path : '/patterns'
} ) ;
// The site editor and templates both check whether the user has
// edit_theme_options capabilities. We can leverage that here and not
// display the manage patterns link if the user can't access it.
return canUser ( 'create' , 'templates' ) ? patternsUrl : defaultUrl ;
} , [ ] ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . MenuItem , {
role : "menuitem" ,
href : url
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Manage patterns' ) ) ;
}
/* harmony default export */ const manage _patterns _menu _item = ( ManagePatternsMenuItem ) ;
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/welcome-guide-menu-item.js
2023-02-07 08:04:52 +01:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
function WelcomeGuideMenuItem ( ) {
const isEditingTemplate = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => select ( external _wp _editor _namespaceObject . store ) . getCurrentPostType ( ) === 'wp_template' , [ ] ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-post" ,
name : isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide' ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome Guide' )
} ) ;
}
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-custom-fields.js
2021-05-19 17:09:27 +02:00
2021-05-07 13:48:27 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* WordPress dependencies
* /
2023-09-26 16:23:26 +02:00
2024-02-09 19:22:22 +01:00
2024-05-23 21:39:28 +02:00
2022-04-11 14:04:30 +02:00
/ * *
* Internal dependencies
2021-05-07 13:48:27 +02:00
* /
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-05-23 21:39:28 +02:00
PreferenceBaseOption
} = unlock ( external _wp _preferences _namespaceObject . privateApis ) ;
function submitCustomFieldsForm ( ) {
const customFieldsForm = document . getElementById ( 'toggle-custom-fields-form' ) ;
2021-05-07 13:48:27 +02:00
2024-05-23 21:39:28 +02:00
// Ensure the referrer values is up to update with any
customFieldsForm . querySelector ( '[name="_wp_http_referer"]' ) . setAttribute ( 'value' , ( 0 , external _wp _url _namespaceObject . getPathAndQueryString ) ( window . location . href ) ) ;
customFieldsForm . submit ( ) ;
}
function CustomFieldsConfirmation ( {
willEnable
} ) {
const [ isReloading , setIsReloading ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
className : "edit-post-preferences-modal__custom-fields-confirmation-message"
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'A page reload is required for this change. Make sure your content is saved before reloading.' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Button , {
className : "edit-post-preferences-modal__custom-fields-confirmation-button" ,
variant : "secondary" ,
isBusy : isReloading ,
disabled : isReloading ,
onClick : ( ) => {
setIsReloading ( true ) ;
submitCustomFieldsForm ( ) ;
}
} , willEnable ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Show & Reload Page' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Hide & Reload Page' ) ) ) ;
}
function EnableCustomFieldsOption ( {
label ,
areCustomFieldsEnabled
} ) {
const [ isChecked , setIsChecked ] = ( 0 , external _wp _element _namespaceObject . useState ) ( areCustomFieldsEnabled ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( PreferenceBaseOption , {
label : label ,
isChecked : isChecked ,
onChange : setIsChecked
} , isChecked !== areCustomFieldsEnabled && ( 0 , external _React _namespaceObject . createElement ) ( CustomFieldsConfirmation , {
willEnable : isChecked
} ) ) ;
}
/* harmony default export */ const enable _custom _fields = ( ( 0 , external _wp _data _namespaceObject . withSelect ) ( select => ( {
areCustomFieldsEnabled : ! ! select ( external _wp _editor _namespaceObject . store ) . getEditorSettings ( ) . enableCustomFields
} ) ) ( EnableCustomFieldsOption ) ) ;
2021-05-07 13:48:27 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-panel.js
2021-05-19 17:09:27 +02:00
/ * *
* WordPress dependencies
* /
2021-05-07 13:48:27 +02:00
2018-12-14 05:41:57 +01:00
2022-09-20 17:43:29 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
/ * *
* Internal dependencies
* /
const {
2024-05-23 21:39:28 +02:00
PreferenceBaseOption : enable _panel _PreferenceBaseOption
} = unlock ( external _wp _preferences _namespaceObject . privateApis ) ;
/* harmony default export */ const enable _panel = ( ( 0 , external _wp _compose _namespaceObject . compose ) ( ( 0 , external _wp _data _namespaceObject . withSelect ) ( ( select , {
panelName
} ) => {
const {
isEditorPanelEnabled ,
isEditorPanelRemoved
} = select ( external _wp _editor _namespaceObject . store ) ;
return {
isRemoved : isEditorPanelRemoved ( panelName ) ,
isChecked : isEditorPanelEnabled ( panelName )
} ;
} ) , ( 0 , external _wp _compose _namespaceObject . ifCondition ) ( ( {
isRemoved
} ) => ! isRemoved ) , ( 0 , external _wp _data _namespaceObject . withDispatch ) ( ( dispatch , {
panelName
} ) => ( {
onChange : ( ) => dispatch ( external _wp _editor _namespaceObject . store ) . toggleEditorPanelEnabled ( panelName )
} ) ) ) ( enable _panel _PreferenceBaseOption ) ) ;
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/meta-boxes-section.js
2018-12-18 04:14:52 +01:00
2021-01-28 03:04:13 +01:00
/ * *
2021-05-07 13:48:27 +02:00
* WordPress dependencies
2021-01-28 03:04:13 +01:00
* /
2018-12-18 04:14:52 +01:00
2021-05-07 13:48:27 +02:00
2020-10-13 15:10:30 +02:00
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2022-09-20 17:43:29 +02:00
/ * *
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* Internal dependencies
2022-09-20 17:43:29 +02:00
* /
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-05-23 21:39:28 +02:00
PreferencesModalSection
} = unlock ( external _wp _preferences _namespaceObject . privateApis ) ;
function MetaBoxesSection ( {
areCustomFieldsRegistered ,
metaBoxes ,
... sectionProps
} ) {
// The 'Custom Fields' meta box is a special case that we handle separately.
const thirdPartyMetaBoxes = metaBoxes . filter ( ( {
id
} ) => id !== 'postcustom' ) ;
if ( ! areCustomFieldsRegistered && thirdPartyMetaBoxes . length === 0 ) {
return null ;
}
return ( 0 , external _React _namespaceObject . createElement ) ( PreferencesModalSection , {
... sectionProps
} , areCustomFieldsRegistered && ( 0 , external _React _namespaceObject . createElement ) ( enable _custom _fields , {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Custom fields' )
} ) , thirdPartyMetaBoxes . map ( ( {
id ,
title
} ) => ( 0 , external _React _namespaceObject . createElement ) ( enable _panel , {
key : id ,
label : title ,
panelName : ` meta-box- ${ id } `
} ) ) ) ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const meta _boxes _section = ( ( 0 , external _wp _data _namespaceObject . withSelect ) ( select => {
const {
getEditorSettings
} = select ( external _wp _editor _namespaceObject . store ) ;
const {
getAllMetaBoxes
} = select ( store ) ;
return {
// This setting should not live in the block editor's store.
areCustomFieldsRegistered : getEditorSettings ( ) . enableCustomFields !== undefined ,
metaBoxes : getAllMetaBoxes ( )
} ;
} ) ( MetaBoxesSection ) ) ;
2021-05-19 17:09:27 +02:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/index.js
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2018-12-18 04:14:52 +01:00
/ * *
2021-05-19 17:09:27 +02:00
* WordPress dependencies
2018-12-18 04:14:52 +01:00
* /
2024-05-23 21:39:28 +02:00
2018-12-18 04:14:52 +01:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Internal dependencies
2021-05-19 17:09:27 +02:00
* /
2018-12-18 04:14:52 +01:00
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
const {
PreferenceToggleControl
} = unlock ( external _wp _preferences _namespaceObject . privateApis ) ;
const {
PreferencesModal
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
function EditPostPreferencesModal ( ) {
const extraSections = {
general : ( 0 , external _React _namespaceObject . createElement ) ( meta _boxes _section , {
title : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Advanced' )
} ) ,
appearance : ( 0 , external _React _namespaceObject . createElement ) ( PreferenceToggleControl , {
scope : "core/edit-post" ,
featureName : "themeStyles" ,
help : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make the editor look like your theme.' ) ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Use theme styles' )
} )
} ;
return ( 0 , external _React _namespaceObject . createElement ) ( PreferencesModal , {
extraSections : extraSections
} ) ;
2021-05-19 17:09:27 +02:00
}
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/index.js
2021-05-07 13:48:27 +02:00
2021-05-19 17:09:27 +02:00
/ * *
* WordPress dependencies
* /
2021-05-07 13:48:27 +02:00
2024-05-23 21:39:28 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
/ * *
* Internal dependencies
* /
2024-05-23 21:39:28 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-05-23 21:39:28 +02:00
ToolsMoreMenuGroup ,
ViewMoreMenuGroup
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
2024-05-23 21:39:28 +02:00
const MoreMenu = ( ) => {
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'large' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , isLargeViewport && ( 0 , external _React _namespaceObject . createElement ) ( ViewMoreMenuGroup , null , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _preferences _namespaceObject . PreferenceToggleMenuItem , {
scope : "core/edit-post" ,
name : "fullscreenMode" ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Fullscreen mode' ) ,
info : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Show and hide the admin user interface' ) ,
messageActivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Fullscreen mode activated' ) ,
messageDeactivated : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Fullscreen mode deactivated' ) ,
shortcut : external _wp _keycodes _namespaceObject . displayShortcut . secondary ( 'f' )
} ) ) , ( 0 , external _React _namespaceObject . createElement ) ( ToolsMoreMenuGroup , null , ( 0 , external _React _namespaceObject . createElement ) ( manage _patterns _menu _item , null ) , ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideMenuItem , null ) ) , ( 0 , external _React _namespaceObject . createElement ) ( EditPostPreferencesModal , null ) ) ;
} ;
/* harmony default export */ const more _menu = ( MoreMenu ) ;
2018-12-18 04:14:52 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/main-dashboard-button/index.js
2021-05-07 13:48:27 +02:00
2021-05-19 17:09:27 +02:00
/ * *
* WordPress dependencies
* /
2021-05-07 13:48:27 +02:00
2024-05-23 21:39:28 +02:00
const slotName = '__experimentalMainDashboardButton' ;
2021-05-19 17:09:27 +02:00
const {
2024-05-23 21:39:28 +02:00
Fill ,
Slot : MainDashboardButtonSlot
} = ( 0 , external _wp _components _namespaceObject . createSlotFill ) ( slotName ) ;
const MainDashboardButton = Fill ;
const Slot = ( {
children
} ) => {
const fills = ( 0 , external _wp _components _namespaceObject . _ _experimentalUseSlotFills ) ( slotName ) ;
const hasFills = Boolean ( fills && fills . length ) ;
if ( ! hasFills ) {
return children ;
}
return ( 0 , external _React _namespaceObject . createElement ) ( MainDashboardButtonSlot , {
bubblesVirtually : true
} ) ;
} ;
MainDashboardButton . Slot = Slot ;
/* harmony default export */ const main _dashboard _button = ( MainDashboardButton ) ;
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js
2022-09-20 17:43:29 +02:00
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-23 21:39:28 +02:00
const {
Header : EditorHeader
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
const slideX = {
hidden : {
x : '-100%'
} ,
distractionFreeInactive : {
x : 0
} ,
hover : {
x : 0 ,
transition : {
type : 'tween' ,
delay : 0.2
}
}
} ;
function Header ( {
setEntitiesSavedStatesCallback ,
initialPost
} ) {
2022-09-20 17:43:29 +02:00
const {
2024-05-23 21:39:28 +02:00
hasActiveMetaboxes
2022-09-20 17:43:29 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
return {
2024-05-23 21:39:28 +02:00
hasActiveMetaboxes : select ( store ) . hasMetaBoxes ( )
2022-09-20 17:43:29 +02:00
} ;
} , [ ] ) ;
2024-05-23 21:39:28 +02:00
return ( 0 , external _React _namespaceObject . createElement ) ( EditorHeader , {
forceIsDirty : hasActiveMetaboxes ,
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback
} , ( 0 , external _React _namespaceObject . createElement ) ( main _dashboard _button . Slot , null , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . _ _unstableMotion . div , {
variants : slideX ,
transition : {
type : 'tween' ,
delay : 0.8
}
} , ( 0 , external _React _namespaceObject . createElement ) ( fullscreen _mode _close , {
showTooltip : true ,
initialPost : initialPost
} ) ) ) , ( 0 , external _React _namespaceObject . createElement ) ( more _menu , null ) ) ;
2021-05-19 17:09:27 +02:00
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const header = ( Header ) ;
2020-01-08 12:57:23 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* External dependencies
* /
2023-09-26 16:23:26 +02:00
2020-01-08 12:57:23 +01:00
/ * *
* WordPress dependencies
* /
2021-01-28 03:04:13 +01:00
/ * *
* Internal dependencies
* /
2020-06-26 15:33:47 +02:00
2020-01-08 12:57:23 +01:00
2021-11-08 15:29:21 +01:00
/ * *
* Render metabox area .
*
* @ param { Object } props Component props .
* @ param { string } props . location metabox location .
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* @ return { Component } The component to be rendered .
2021-11-08 15:29:21 +01:00
* /
2023-06-27 16:24:19 +02:00
function MetaBoxesArea ( {
location
} ) {
2022-04-11 14:04:30 +02:00
const container = ( 0 , external _wp _element _namespaceObject . useRef ) ( null ) ;
const formRef = ( 0 , external _wp _element _namespaceObject . useRef ) ( null ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-11-08 15:29:21 +01:00
formRef . current = document . querySelector ( '.metabox-location-' + location ) ;
if ( formRef . current ) {
container . current . appendChild ( formRef . current ) ;
2021-01-28 03:04:13 +01:00
}
2021-11-08 15:29:21 +01:00
return ( ) => {
if ( formRef . current ) {
document . querySelector ( '#metaboxes' ) . appendChild ( formRef . current ) ;
}
} ;
} , [ location ] ) ;
2022-04-11 14:04:30 +02:00
const isSaving = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
2024-05-23 21:39:28 +02:00
return select ( store ) . isSavingMetaBoxes ( ) ;
2021-11-08 15:29:21 +01:00
} , [ ] ) ;
2024-05-23 21:39:28 +02:00
const classes = dist _clsx ( 'edit-post-meta-boxes-area' , ` is- ${ location } ` , {
2021-11-08 15:29:21 +01:00
'is-loading' : isSaving
} ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2021-11-08 15:29:21 +01:00
className : classes
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , isSaving && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Spinner , null ) , ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2021-11-08 15:29:21 +01:00
className : "edit-post-meta-boxes-area__container" ,
ref : container
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2021-11-08 15:29:21 +01:00
className : "edit-post-meta-boxes-area__clear"
} ) ) ;
2021-05-19 17:09:27 +02:00
}
2024-01-31 13:59:56 +01:00
/* harmony default export */ const meta _boxes _area = ( MetaBoxesArea ) ;
2020-06-26 15:33:47 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
2021-01-28 03:04:13 +01:00
/ * *
2021-05-19 17:09:27 +02:00
* WordPress dependencies
2021-01-28 03:04:13 +01:00
* /
2020-06-26 15:33:47 +02:00
2021-05-19 17:09:27 +02:00
2023-09-26 16:23:26 +02:00
2022-04-11 14:04:30 +02:00
class MetaBoxVisibility extends external _wp _element _namespaceObject . Component {
2021-05-19 17:09:27 +02:00
componentDidMount ( ) {
this . updateDOM ( ) ;
}
componentDidUpdate ( prevProps ) {
if ( this . props . isVisible !== prevProps . isVisible ) {
this . updateDOM ( ) ;
}
}
updateDOM ( ) {
const {
id ,
isVisible
} = this . props ;
const element = document . getElementById ( id ) ;
if ( ! element ) {
return ;
}
if ( isVisible ) {
element . classList . remove ( 'is-hidden' ) ;
} else {
element . classList . add ( 'is-hidden' ) ;
}
}
render ( ) {
return null ;
}
}
2024-01-31 13:59:56 +01:00
/* harmony default export */ const meta _box _visibility = ( ( 0 , external _wp _data _namespaceObject . withSelect ) ( ( select , {
2023-06-27 16:24:19 +02:00
id
} ) => ( {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
isVisible : select ( external _wp _editor _namespaceObject . store ) . isEditorPanelEnabled ( ` meta-box- ${ id } ` )
2023-06-27 16:24:19 +02:00
} ) ) ( MetaBoxVisibility ) ) ;
2020-01-08 12:57:23 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
2020-01-08 12:57:23 +01:00
/ * *
2021-05-19 17:09:27 +02:00
* WordPress dependencies
* /
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
* Internal dependencies
2020-01-08 12:57:23 +01:00
* /
2021-05-19 17:09:27 +02:00
2023-06-27 16:24:19 +02:00
function MetaBoxes ( {
location
} ) {
2022-04-11 14:04:30 +02:00
const registry = ( 0 , external _wp _data _namespaceObject . useRegistry ) ( ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
const {
metaBoxes ,
areMetaBoxesInitialized ,
isEditorReady
2022-04-11 14:04:30 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
const {
_ _unstableIsEditorReady
2022-04-11 14:04:30 +02:00
} = select ( external _wp _editor _namespaceObject . store ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
const {
getMetaBoxesPerLocation ,
areMetaBoxesInitialized : _areMetaBoxesInitialized
2024-05-23 21:39:28 +02:00
} = select ( store ) ;
Editor: Update block editor packages for WordPress 5.8.1.
The following packages were updated:
- @wordpress/a11y to `3.1.2`
- @wordpress/annotations to `2.1.6`
- @wordpress/api-fetch to `5.1.2`
- @wordpress/autop to `3.1.2`
- @wordpress/babel-preset-default to `6.2.1`
- @wordpress/blob to `3.1.2`
- @wordpress/block-directory to `2.1.21`
- @wordpress/block-editor to `6.1.14`
- @wordpress/block-library to `3.2.19`
- @wordpress/block-serialization-default-parser to `4.1.2`
- @wordpress/blocks to `9.1.8`
- @wordpress/components to `14.1.11`
- @wordpress/compose to `4.1.6`
- @wordpress/core-data to `3.1.12`
- @wordpress/customize-widgets to `1.0.20`
- @wordpress/data-controls to `2.1.6`
- @wordpress/data to `5.1.6`
- @wordpress/date to `4.1.2`
- @wordpress/deprecated to `3.1.2`
- @wordpress/dom-ready to `3.1.2`
- @wordpress/dom to `3.1.5`
- @wordpress/e2e-test-utils to `5.3.1`
- @wordpress/edit-post to `4.1.21`
- @wordpress/edit-widgets to `2.1.21`
- @wordpress/editor to `10.1.17`
- @wordpress/element to `3.1.2`
- @wordpress/escape-html to `2.1.2`
- @wordpress/format-library to `2.1.14`
- @wordpress/html-entities to `3.1.2`
- @wordpress/i18n to `4.1.2`
- @wordpress/icons to `4.0.3`
- @wordpress/interface to `3.1.12`
- @wordpress/keyboard-shortcuts to `2.1.7`
- @wordpress/keycodes to `3.1.2`
- @wordpress/list-reusable-blocks to `2.1.11`
- @wordpress/media-utils to `2.1.2`
- @wordpress/notices to `3.1.6`
- @wordpress/nux to `4.1.11`
- @wordpress/plugins to `3.1.6`
- @wordpress/primitives to `2.1.2`
- @wordpress/priority-queue to `2.1.2`
- @wordpress/react-i18n to `2.1.2`
- @wordpress/redux-routine to `4.1.2`
- @wordpress/reusable-blocks to `2.1.17`
- @wordpress/rich-text to `4.1.6`
- @wordpress/scripts to `16.1.5`
- @wordpress/server-side-render to `2.1.12`
- @wordpress/shortcode to `3.1.2`
- @wordpress/url to `3.1.2`
- @wordpress/viewport to `3.1.6`
- @wordpress/warning to `2.1.2`
- @wordpress/widgets to `1.1.19`
- @wordpress/wordcount to `3.1.2`
Props oandregal, juanmaguitar, gziolo, jblz, talldanwp, ribaricplusplus, peterwisoncc, youknowriad, paaljoachim, kreppar, ellatrix, aristath, walbo, ajlende, kevin940726, mamaduka, ntsekouras, toro_unit, mkaz, joen, noisysocks, zieladam, andraganescu, antonvlasenko, terraling, dariak, vladytimy, circlecube, desrosj.
Fixes #54052, #52818.
Built from https://develop.svn.wordpress.org/trunk@51719
git-svn-id: http://core.svn.wordpress.org/trunk@51325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-01 21:08:24 +02:00
return {
metaBoxes : getMetaBoxesPerLocation ( location ) ,
areMetaBoxesInitialized : _areMetaBoxesInitialized ( ) ,
isEditorReady : _ _unstableIsEditorReady ( )
} ;
2023-09-26 16:23:26 +02:00
} , [ location ] ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const hasMetaBoxes = ! ! metaBoxes ? . length ;
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
// When editor is ready, initialize postboxes (wp core script) and metabox
// saving. This initializes all meta box locations, not just this specific
// one.
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
if ( isEditorReady && hasMetaBoxes && ! areMetaBoxesInitialized ) {
registry . dispatch ( store ) . initializeMetaBoxes ( ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
}
2024-05-23 21:39:28 +02:00
} , [ isEditorReady , hasMetaBoxes , areMetaBoxesInitialized ] ) ;
if ( ! areMetaBoxesInitialized ) {
return null ;
}
return ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : [ ] ) . map ( ( {
id
} ) => ( 0 , external _React _namespaceObject . createElement ) ( meta _box _visibility , {
key : id ,
id : id
} ) ) , ( 0 , external _React _namespaceObject . createElement ) ( meta _boxes _area , {
location : location
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) ) ;
2024-05-23 21:39:28 +02:00
}
2021-05-19 17:09:27 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/image.js
2021-01-28 03:04:13 +01:00
2023-06-27 16:24:19 +02:00
function WelcomeGuideImage ( {
nonAnimatedSrc ,
animatedSrc
} ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( "picture" , {
2021-06-01 10:10:04 +02:00
className : "edit-post-welcome-guide__image"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _React _namespaceObject . createElement ) ( "source" , {
2021-06-01 10:10:04 +02:00
srcSet : nonAnimatedSrc ,
media : "(prefers-reduced-motion: reduce)"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( "img" , {
2021-06-01 10:10:04 +02:00
src : animatedSrc ,
width : "312" ,
height : "240" ,
alt : ""
} ) ) ;
}
2019-10-15 17:37:08 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/default.js
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
/ * *
2021-05-19 17:09:27 +02:00
* WordPress dependencies
2021-01-28 03:04:13 +01:00
* /
2019-10-15 17:37:08 +02:00
2021-01-28 03:04:13 +01:00
2023-09-26 16:23:26 +02:00
2021-05-21 12:14:23 +02:00
/ * *
* Internal dependencies
* /
2018-12-18 04:14:52 +01:00
2019-10-15 17:37:08 +02:00
2021-05-21 12:14:23 +02:00
function WelcomeGuideDefault ( ) {
2021-05-19 17:09:27 +02:00
const {
toggleFeature
2024-05-23 21:39:28 +02:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Guide , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide" ,
2022-04-11 14:04:30 +02:00
contentLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to the block editor' ) ,
finishButtonText : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get started' ) ,
2021-05-19 17:09:27 +02:00
onFinish : ( ) => toggleFeature ( 'welcomeGuide' ) ,
pages : [ {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
image : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideImage , {
2021-06-01 10:10:04 +02:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-canvas.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-canvas.gif"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "h1" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__heading"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to the block editor' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__text"
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.' ) ) )
2021-05-19 17:09:27 +02:00
} , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
image : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideImage , {
2021-06-01 10:10:04 +02:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-editor.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-editor.gif"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "h1" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__heading"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Make each block your own' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__text"
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.' ) ) )
2021-05-19 17:09:27 +02:00
} , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
image : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideImage , {
2021-06-01 10:10:04 +02:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-library.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-library.gif"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "h1" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__heading"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get to know the block library' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__text"
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _element _namespaceObject . createInterpolateElement ) ( ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'All of the blocks available to you live in the block library. You’ ll find it wherever you see the <InserterIconImage /> icon.' ) , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
InserterIconImage : ( 0 , external _React _namespaceObject . createElement ) ( "img" , {
2022-04-11 14:04:30 +02:00
alt : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'inserter' ) ,
2021-06-01 10:10:04 +02:00
src : "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
2021-05-19 17:09:27 +02:00
} )
} ) ) )
} , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
image : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideImage , {
2021-06-01 10:10:04 +02:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-documentation.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-documentation.gif"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "h1" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__heading"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Learn how to use the block editor' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-welcome-guide__text"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'New to the block editor? Want to learn more about using it? ' ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ExternalLink , {
2023-06-27 16:24:19 +02:00
href : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'https://wordpress.org/documentation/article/wordpress-block-editor/' )
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( "Here's a detailed guide." ) ) ) )
2021-05-19 17:09:27 +02:00
} ]
} ) ;
2021-01-28 03:04:13 +01:00
}
2019-10-15 17:37:08 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/template.js
2021-05-21 12:14:23 +02:00
/ * *
* WordPress dependencies
* /
2023-09-26 16:23:26 +02:00
2021-05-21 12:14:23 +02:00
/ * *
* Internal dependencies
* /
function WelcomeGuideTemplate ( ) {
const {
toggleFeature
2024-05-23 21:39:28 +02:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . Guide , {
2022-04-12 17:12:47 +02:00
className : "edit-template-welcome-guide" ,
2022-04-11 14:04:30 +02:00
contentLabel : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to the template editor' ) ,
finishButtonText : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Get started' ) ,
2021-05-21 12:14:23 +02:00
onFinish : ( ) => toggleFeature ( 'welcomeGuideTemplate' ) ,
pages : [ {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
image : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideImage , {
2021-06-01 10:10:04 +02:00
nonAnimatedSrc : "https://s.w.org/images/block-editor/welcome-template-editor.svg" ,
animatedSrc : "https://s.w.org/images/block-editor/welcome-template-editor.gif"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( "h1" , {
2021-05-21 12:14:23 +02:00
className : "edit-post-welcome-guide__heading"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Welcome to the template editor' ) ) , ( 0 , external _React _namespaceObject . createElement ) ( "p" , {
2021-05-21 12:14:23 +02:00
className : "edit-post-welcome-guide__text"
2022-04-11 14:04:30 +02:00
} , ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.' ) ) )
2021-05-21 12:14:23 +02:00
} ]
} ) ;
}
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
2021-05-21 12:14:23 +02:00
/ * *
* WordPress dependencies
* /
2023-09-26 16:23:26 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2021-05-21 12:14:23 +02:00
/ * *
* Internal dependencies
* /
function WelcomeGuide ( ) {
const {
isActive ,
2024-01-31 13:59:56 +01:00
isEditingTemplate
2022-04-11 14:04:30 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
2021-05-21 12:14:23 +02:00
const {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
isFeatureActive
2024-05-23 21:39:28 +02:00
} = select ( store ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2024-01-31 13:59:56 +01:00
getCurrentPostType
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = select ( external _wp _editor _namespaceObject . store ) ;
2024-01-31 13:59:56 +01:00
const _isEditingTemplate = getCurrentPostType ( ) === 'wp_template' ;
const feature = _isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide' ;
2021-05-21 12:14:23 +02:00
return {
isActive : isFeatureActive ( feature ) ,
2024-01-31 13:59:56 +01:00
isEditingTemplate : _isEditingTemplate
2021-05-21 12:14:23 +02:00
} ;
} , [ ] ) ;
if ( ! isActive ) {
return null ;
}
2024-01-31 13:59:56 +01:00
return isEditingTemplate ? ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideTemplate , null ) : ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuideDefault , null ) ;
2021-05-21 12:14:23 +02:00
}
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-left.js
2020-06-26 15:33:47 +02:00
2018-12-14 05:41:57 +01:00
/ * *
2018-12-18 04:14:52 +01:00
* WordPress dependencies
2018-12-14 05:41:57 +01:00
* /
2024-05-23 21:39:28 +02:00
const drawerLeft = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
width : "24" ,
height : "24" ,
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
clipRule : "evenodd" ,
d : "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z"
} ) ) ;
/* harmony default export */ const drawer _left = ( drawerLeft ) ;
2018-12-14 05:41:57 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-right.js
2022-04-12 17:12:47 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
const drawerRight = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
width : "24" ,
height : "24" ,
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
fillRule : "evenodd" ,
clipRule : "evenodd" ,
d : "M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z"
} ) ) ;
/* harmony default export */ const drawer _right = ( drawerRight ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/block-default.js
/ * *
* WordPress dependencies
* /
const blockDefault = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"
} ) ) ;
2024-01-31 13:59:56 +01:00
/* harmony default export */ const block _default = ( blockDefault ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
/ * *
* WordPress dependencies
* /
const fullscreen = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"
} ) ) ;
2024-01-31 13:59:56 +01:00
/* harmony default export */ const library _fullscreen = ( fullscreen ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/format-list-bullets.js
/ * *
* WordPress dependencies
* /
const formatListBullets = ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . SVG , {
xmlns : "http://www.w3.org/2000/svg" ,
viewBox : "0 0 24 24"
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _primitives _namespaceObject . Path , {
d : "M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
} ) ) ;
2024-01-31 13:59:56 +01:00
/* harmony default export */ const format _list _bullets = ( formatListBullets ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/commands/use-common-commands.js
/ * *
* WordPress dependencies
* /
/ * *
* Internal dependencies
* /
2024-05-23 21:39:28 +02:00
const {
interfaceStore : use _common _commands _interfaceStore
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
function useCommonCommands ( ) {
const {
openGeneralSidebar ,
2024-05-23 21:39:28 +02:00
closeGeneralSidebar
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
const {
activeSidebar ,
isFullscreen ,
2024-05-23 21:39:28 +02:00
isPublishSidebarEnabled
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
const {
get
} = select ( external _wp _preferences _namespaceObject . store ) ;
return {
2024-05-23 21:39:28 +02:00
activeSidebar : select ( use _common _commands _interfaceStore ) . getActiveComplementaryArea ( 'core' ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
isPublishSidebarEnabled : select ( external _wp _editor _namespaceObject . store ) . isPublishSidebarEnabled ( ) ,
isFullscreen : get ( 'core/edit-post' , 'fullscreenMode' )
} ;
} , [ ] ) ;
const {
toggle
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _preferences _namespaceObject . store ) ;
const {
createInfoNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
( 0 , external _wp _commands _namespaceObject . useCommand ) ( {
name : 'core/open-settings-sidebar' ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Toggle settings sidebar' ) ,
2024-05-23 21:39:28 +02:00
icon : ( 0 , external _wp _i18n _namespaceObject . isRTL ) ( ) ? drawer _left : drawer _right ,
callback : ( {
close
} ) => {
close ( ) ;
if ( activeSidebar === 'edit-post/document' ) {
closeGeneralSidebar ( ) ;
} else {
openGeneralSidebar ( 'edit-post/document' ) ;
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
}
} ) ;
( 0 , external _wp _commands _namespaceObject . useCommand ) ( {
2024-05-23 21:39:28 +02:00
name : 'core/open-block-inspector' ,
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Toggle block inspector' ) ,
icon : block _default ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
callback : ( {
close
} ) => {
close ( ) ;
2024-05-23 21:39:28 +02:00
if ( activeSidebar === 'edit-post/block' ) {
closeGeneralSidebar ( ) ;
} else {
openGeneralSidebar ( 'edit-post/block' ) ;
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
}
} ) ;
( 0 , external _wp _commands _namespaceObject . useCommand ) ( {
2024-05-23 21:39:28 +02:00
name : 'core/toggle-fullscreen-mode' ,
label : isFullscreen ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Exit fullscreen' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Enter fullscreen' ) ,
icon : library _fullscreen ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
callback : ( {
close
} ) => {
2024-05-23 21:39:28 +02:00
toggle ( 'core/edit-post' , 'fullscreenMode' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
close ( ) ;
2024-05-23 21:39:28 +02:00
createInfoNotice ( isFullscreen ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Fullscreen off.' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Fullscreen on.' ) , {
id : 'core/edit-post/toggle-fullscreen-mode/notice' ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
type : 'snackbar' ,
actions : [ {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Undo' ) ,
onClick : ( ) => {
2024-05-23 21:39:28 +02:00
toggle ( 'core/edit-post' , 'fullscreenMode' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
}
} ]
} ) ;
}
} ) ;
( 0 , external _wp _commands _namespaceObject . useCommand ) ( {
name : 'core/toggle-publish-sidebar' ,
label : isPublishSidebarEnabled ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Disable pre-publish checks' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Enable pre-publish checks' ) ,
icon : format _list _bullets ,
callback : ( {
close
} ) => {
close ( ) ;
2024-05-23 21:39:28 +02:00
toggle ( 'core' , 'isPublishSidebarEnabled' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
createInfoNotice ( isPublishSidebarEnabled ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Pre-publish checks disabled.' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Pre-publish checks enabled.' ) , {
2024-05-23 21:39:28 +02:00
id : 'core/editor/publish-sidebar/notice' ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
type : 'snackbar'
} ) ;
}
} ) ;
2023-09-26 16:23:26 +02:00
}
2022-04-12 17:12:47 +02:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
2020-02-10 23:33:27 +01:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* External dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2023-09-26 16:23:26 +02:00
2019-09-19 17:19:18 +02:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2019-09-19 17:19:18 +02:00
* /
2018-12-14 05:41:57 +01:00
2018-12-18 04:14:52 +01:00
2019-03-21 13:48:00 +01:00
2021-01-28 03:04:13 +01:00
2021-04-15 17:19:43 +02:00
2022-04-12 17:12:47 +02:00
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
2024-05-23 21:39:28 +02:00
2021-04-15 17:19:43 +02:00
/ * *
2021-05-19 17:09:27 +02:00
* Internal dependencies
2021-04-15 17:19:43 +02:00
* /
2023-07-25 10:40:23 +02:00
const {
getLayoutStyles
} = unlock ( external _wp _blockEditor _namespaceObject . privateApis ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
useCommands
} = unlock ( external _wp _coreCommands _namespaceObject . privateApis ) ;
const {
useCommandContext
} = unlock ( external _wp _commands _namespaceObject . privateApis ) ;
const {
InserterSidebar ,
2024-05-23 21:39:28 +02:00
ListViewSidebar ,
ComplementaryArea ,
FullscreenMode ,
SavePublishPanels ,
InterfaceSkeleton ,
interfaceStore : layout _interfaceStore ,
Sidebar
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
2024-05-23 21:39:28 +02:00
const {
BlockKeyboardShortcuts
} = unlock ( external _wp _blockLibrary _namespaceObject . privateApis ) ;
2021-05-19 17:09:27 +02:00
const interfaceLabels = {
/* translators: accessibility text for the editor top bar landmark region. */
2022-04-11 14:04:30 +02:00
header : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editor top bar' ) ,
2021-05-19 17:09:27 +02:00
/* translators: accessibility text for the editor content landmark region. */
2022-04-11 14:04:30 +02:00
body : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editor content' ) ,
2021-05-19 17:09:27 +02:00
/* translators: accessibility text for the editor settings landmark region. */
2022-04-11 14:04:30 +02:00
sidebar : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editor settings' ) ,
2021-05-19 17:09:27 +02:00
/* translators: accessibility text for the editor publish landmark region. */
2022-04-11 14:04:30 +02:00
actions : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editor publish' ) ,
2021-05-19 17:09:27 +02:00
/* translators: accessibility text for the editor footer landmark region. */
2022-04-11 14:04:30 +02:00
footer : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Editor footer' )
2021-05-19 17:09:27 +02:00
} ;
2023-08-20 01:22:38 +02:00
function useEditorStyles ( ) {
const {
hasThemeStyleSupport ,
editorSettings
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ( {
2024-05-23 21:39:28 +02:00
hasThemeStyleSupport : select ( store ) . isFeatureActive ( 'themeStyles' ) ,
2023-08-20 01:22:38 +02:00
editorSettings : select ( external _wp _editor _namespaceObject . store ) . getEditorSettings ( )
2023-09-26 16:23:26 +02:00
} ) , [ ] ) ;
2023-08-20 01:22:38 +02:00
2023-09-26 16:23:26 +02:00
// Compute the default styles.
2023-08-20 01:22:38 +02:00
return ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
var _editorSettings$style , _editorSettings$style2 ;
const presetStyles = ( _editorSettings$style = editorSettings . styles ? . filter ( style => style . _ _unstableType && style . _ _unstableType !== 'theme' ) ) !== null && _editorSettings$style !== void 0 ? _editorSettings$style : [ ] ;
2023-09-26 16:23:26 +02:00
const defaultEditorStyles = [ ... editorSettings . defaultEditorStyles , ... presetStyles ] ;
2023-08-20 01:22:38 +02:00
2023-09-26 16:23:26 +02:00
// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).
const hasThemeStyles = hasThemeStyleSupport && presetStyles . length !== ( ( _editorSettings$style2 = editorSettings . styles ? . length ) !== null && _editorSettings$style2 !== void 0 ? _editorSettings$style2 : 0 ) ;
2023-08-20 01:22:38 +02:00
2023-09-26 16:23:26 +02:00
// If theme styles are not present or displayed, ensure that
// base layout styles are still present in the editor.
2023-08-20 01:22:38 +02:00
if ( ! editorSettings . disableLayoutStyles && ! hasThemeStyles ) {
defaultEditorStyles . push ( {
css : getLayoutStyles ( {
style : { } ,
selector : 'body' ,
hasBlockGapSupport : false ,
hasFallbackGapSupport : true ,
fallbackGapValue : '0.5em'
} )
} ) ;
}
return hasThemeStyles ? editorSettings . styles : defaultEditorStyles ;
} , [ editorSettings . defaultEditorStyles , editorSettings . disableLayoutStyles , editorSettings . styles , hasThemeStyleSupport ] ) ;
}
2024-02-09 19:22:22 +01:00
function Layout ( {
initialPost
} ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
useCommands ( ) ;
useCommonCommands ( ) ;
2022-04-11 14:04:30 +02:00
const isMobileViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' , '<' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const isWideViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'large' ) ;
const isLargeViewport = ( 0 , external _wp _compose _namespaceObject . useViewportMatch ) ( 'medium' ) ;
2021-05-19 17:09:27 +02:00
const {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
closeGeneralSidebar
2024-05-23 21:39:28 +02:00
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( store ) ;
2022-04-12 17:12:47 +02:00
const {
createErrorNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
2021-05-19 17:09:27 +02:00
const {
mode ,
isFullscreenActive ,
isRichEditingEnabled ,
sidebarIsOpened ,
hasActiveMetaboxes ,
previousShortcut ,
nextShortcut ,
hasBlockSelected ,
isInserterOpened ,
2021-05-21 12:14:23 +02:00
isListViewOpened ,
2021-05-19 17:09:27 +02:00
showIconLabels ,
2023-03-09 14:55:07 +01:00
isDistractionFree ,
2021-06-01 10:10:04 +02:00
showBlockBreadcrumbs ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
showMetaBoxes ,
documentLabel ,
2024-05-23 21:39:28 +02:00
hasHistory ,
hasBlockBreadcrumbs ,
blockEditorMode ,
isEditingTemplate
2022-04-11 14:04:30 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
get
} = select ( external _wp _preferences _namespaceObject . store ) ;
2021-11-08 15:29:21 +01:00
const {
getEditorSettings ,
getPostTypeLabel
2022-04-11 14:04:30 +02:00
} = select ( external _wp _editor _namespaceObject . store ) ;
2021-11-08 15:29:21 +01:00
const editorSettings = getEditorSettings ( ) ;
const postTypeLabel = getPostTypeLabel ( ) ;
2021-05-19 17:09:27 +02:00
return {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
showMetaBoxes : select ( external _wp _editor _namespaceObject . store ) . getRenderingMode ( ) === 'post-only' ,
2024-05-23 21:39:28 +02:00
sidebarIsOpened : ! ! ( select ( layout _interfaceStore ) . getActiveComplementaryArea ( 'core' ) || select ( external _wp _editor _namespaceObject . store ) . isPublishSidebarOpened ( ) ) ,
isFullscreenActive : select ( store ) . isFeatureActive ( 'fullscreenMode' ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
isInserterOpened : select ( external _wp _editor _namespaceObject . store ) . isInserterOpened ( ) ,
isListViewOpened : select ( external _wp _editor _namespaceObject . store ) . isListViewOpened ( ) ,
2024-05-23 21:39:28 +02:00
mode : select ( external _wp _editor _namespaceObject . store ) . getEditorMode ( ) ,
2021-05-19 17:09:27 +02:00
isRichEditingEnabled : editorSettings . richEditingEnabled ,
2024-05-23 21:39:28 +02:00
hasActiveMetaboxes : select ( store ) . hasMetaBoxes ( ) ,
previousShortcut : select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getAllShortcutKeyCombinations ( 'core/editor/previous-region' ) ,
nextShortcut : select ( external _wp _keyboardShortcuts _namespaceObject . store ) . getAllShortcutKeyCombinations ( 'core/editor/next-region' ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
showIconLabels : get ( 'core' , 'showIconLabels' ) ,
isDistractionFree : get ( 'core' , 'distractionFree' ) ,
showBlockBreadcrumbs : get ( 'core' , 'showBlockBreadcrumbs' ) ,
2021-11-08 15:29:21 +01:00
// translators: Default label for the Document in the Block Breadcrumb.
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
documentLabel : postTypeLabel || ( 0 , external _wp _i18n _namespaceObject . _x ) ( 'Document' , 'noun' ) ,
hasBlockSelected : ! ! select ( external _wp _blockEditor _namespaceObject . store ) . getBlockSelectionStart ( ) ,
2024-05-23 21:39:28 +02:00
hasHistory : ! ! getEditorSettings ( ) . onNavigateToPreviousEntityRecord ,
hasBlockBreadcrumbs : get ( 'core' , 'showBlockBreadcrumbs' ) ,
blockEditorMode : select ( external _wp _blockEditor _namespaceObject . store ) . _ _unstableGetEditorMode ( ) ,
isEditingTemplate : select ( external _wp _editor _namespaceObject . store ) . getCurrentPostType ( ) === 'wp_template'
2021-05-19 17:09:27 +02:00
} ;
} , [ ] ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
// Set the right context for the command palette
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'post-editor-edit' ;
useCommandContext ( commandContext ) ;
2023-08-20 01:22:38 +02:00
const styles = useEditorStyles ( ) ;
2021-04-15 17:19:43 +02:00
2023-09-26 16:23:26 +02:00
// Local state for save panel.
// Note 'truthy' callback implies an open panel.
2022-04-11 14:04:30 +02:00
const [ entitiesSavedStatesCallback , setEntitiesSavedStatesCallback ] = ( 0 , external _wp _element _namespaceObject . useState ) ( false ) ;
const closeEntitiesSavedStates = ( 0 , external _wp _element _namespaceObject . useCallback ) ( arg => {
2021-05-19 17:09:27 +02:00
if ( typeof entitiesSavedStatesCallback === 'function' ) {
entitiesSavedStatesCallback ( arg ) ;
}
setEntitiesSavedStatesCallback ( false ) ;
} , [ entitiesSavedStatesCallback ] ) ;
2023-09-26 16:23:26 +02:00
// We need to add the show-icon-labels class to the body element so it is applied to modals.
if ( showIconLabels ) {
document . body . classList . add ( 'show-icon-labels' ) ;
} else {
document . body . classList . remove ( 'show-icon-labels' ) ;
}
2024-05-23 21:39:28 +02:00
const className = dist _clsx ( 'edit-post-layout' , 'is-mode-' + mode , {
2023-02-21 14:09:42 +01:00
'is-sidebar-opened' : sidebarIsOpened ,
'has-metaboxes' : hasActiveMetaboxes ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
'is-distraction-free' : isDistractionFree && isWideViewport ,
2024-05-23 21:39:28 +02:00
'is-entity-save-view-open' : ! ! entitiesSavedStatesCallback ,
'has-block-breadcrumbs' : hasBlockBreadcrumbs && ! isDistractionFree && isWideViewport
2023-02-21 14:09:42 +01:00
} ) ;
2023-02-07 08:04:52 +01:00
const secondarySidebarLabel = isListViewOpened ? ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Document Overview' ) : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Block Library' ) ;
2021-05-21 12:14:23 +02:00
const secondarySidebar = ( ) => {
if ( mode === 'visual' && isInserterOpened ) {
2024-05-23 21:39:28 +02:00
return ( 0 , external _React _namespaceObject . createElement ) ( InserterSidebar , {
closeGeneralSidebar : closeGeneralSidebar ,
isRightSidebarOpen : sidebarIsOpened
} ) ;
2021-05-21 12:14:23 +02:00
}
if ( mode === 'visual' && isListViewOpened ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( ListViewSidebar , null ) ;
2021-05-21 12:14:23 +02:00
}
return null ;
} ;
2022-04-12 17:12:47 +02:00
function onPluginAreaError ( name ) {
2023-09-26 16:23:26 +02:00
createErrorNotice ( ( 0 , external _wp _i18n _namespaceObject . sprintf ) ( /* translators: %s: plugin name */
2022-04-12 17:12:47 +02:00
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'The "%s" plugin has encountered an error and cannot be rendered.' ) , name ) ) ;
}
2024-05-23 21:39:28 +02:00
const {
createSuccessNotice
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _notices _namespaceObject . store ) ;
const onActionPerformed = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( actionId , items ) => {
switch ( actionId ) {
case 'move-to-trash' :
{
document . location . href = ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'edit.php' , {
trashed : 1 ,
post _type : items [ 0 ] . type ,
ids : items [ 0 ] . id
} ) ;
}
break ;
case 'duplicate-post' :
{
const newItem = items [ 0 ] ;
const title = typeof newItem . title === 'string' ? newItem . title : newItem . title ? . rendered ;
createSuccessNotice ( ( 0 , external _wp _i18n _namespaceObject . sprintf ) (
// translators: %s: Title of the created post e.g: "Post 1".
( 0 , external _wp _i18n _namespaceObject . _ _ ) ( '"%s" successfully created.' ) , title ) , {
type : 'snackbar' ,
id : 'duplicate-post-action' ,
actions : [ {
label : ( 0 , external _wp _i18n _namespaceObject . _ _ ) ( 'Edit' ) ,
onClick : ( ) => {
const postId = newItem . id ;
document . location . href = ( 0 , external _wp _url _namespaceObject . addQueryArgs ) ( 'post.php' , {
post : postId ,
action : 'edit'
} ) ;
}
} ]
} ) ;
}
break ;
}
} , [ createSuccessNotice ] ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ( 0 , external _React _namespaceObject . createElement ) ( FullscreenMode , {
2021-05-19 17:09:27 +02:00
isActive : isFullscreenActive
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( browser _url , {
hasHistory : hasHistory
2024-05-23 21:39:28 +02:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . UnsavedChangesWarning , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . AutosaveMonitor , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . LocalAutosaveMonitor , null ) , ( 0 , external _React _namespaceObject . createElement ) ( keyboard _shortcuts , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . EditorKeyboardShortcutsRegister , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . EditorKeyboardShortcuts , null ) , ( 0 , external _React _namespaceObject . createElement ) ( BlockKeyboardShortcuts , null ) , ( 0 , external _React _namespaceObject . createElement ) ( InterfaceSkeleton , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
isDistractionFree : isDistractionFree && isWideViewport ,
2021-05-19 17:09:27 +02:00
className : className ,
2023-09-26 16:23:26 +02:00
labels : {
... interfaceLabels ,
2022-04-19 17:11:17 +02:00
secondarySidebar : secondarySidebarLabel
} ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
header : ( 0 , external _React _namespaceObject . createElement ) ( header , {
2024-02-09 19:22:22 +01:00
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback ,
initialPost : initialPost
2021-05-19 17:09:27 +02:00
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
editorNotices : ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . EditorNotices , null ) ,
2021-05-21 12:14:23 +02:00
secondarySidebar : secondarySidebar ( ) ,
2024-05-23 21:39:28 +02:00
sidebar : ! isDistractionFree && ( 0 , external _React _namespaceObject . createElement ) ( ComplementaryArea . Slot , {
scope : "core"
} ) ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
notices : ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . EditorSnackbars , null ) ,
content : ( 0 , external _React _namespaceObject . createElement ) ( external _React _namespaceObject . Fragment , null , ! isDistractionFree && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . EditorNotices , null ) , ( mode === 'text' || ! isRichEditingEnabled ) && ( 0 , external _React _namespaceObject . createElement ) ( TextEditor , null ) , ! isLargeViewport && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockToolbar , {
hideDragHandle : true
} ) , isRichEditingEnabled && mode === 'visual' && ( 0 , external _React _namespaceObject . createElement ) ( VisualEditor , {
2021-05-19 17:09:27 +02:00
styles : styles
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) , ! isDistractionFree && showMetaBoxes && ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-layout__metaboxes"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _React _namespaceObject . createElement ) ( MetaBoxes , {
2021-05-19 17:09:27 +02:00
location : "normal"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( MetaBoxes , {
2021-05-19 17:09:27 +02:00
location : "advanced"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) ) , isMobileViewport && sidebarIsOpened && ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . ScrollLock , null ) ) ,
2024-05-23 21:39:28 +02:00
footer : ! isDistractionFree && ! isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && ( 0 , external _React _namespaceObject . createElement ) ( "div" , {
2021-05-19 17:09:27 +02:00
className : "edit-post-layout__footer"
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _blockEditor _namespaceObject . BlockBreadcrumb , {
2021-11-08 15:29:21 +01:00
rootLabelText : documentLabel
} ) ) ,
2024-05-23 21:39:28 +02:00
actions : ( 0 , external _React _namespaceObject . createElement ) ( SavePublishPanels , {
2021-05-19 17:09:27 +02:00
closeEntitiesSavedStates : closeEntitiesSavedStates ,
isEntitiesSavedStatesOpen : entitiesSavedStatesCallback ,
2024-05-23 21:39:28 +02:00
setEntitiesSavedStatesCallback : setEntitiesSavedStatesCallback ,
forceIsDirtyPublishPanel : hasActiveMetaboxes
2021-05-19 17:09:27 +02:00
} ) ,
shortcuts : {
previous : previousShortcut ,
next : nextShortcut
}
2024-05-23 21:39:28 +02:00
} ) , ( 0 , external _React _namespaceObject . createElement ) ( WelcomeGuide , null ) , ( 0 , external _React _namespaceObject . createElement ) ( InitPatternModal , null ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _plugins _namespaceObject . PluginArea , {
2022-04-12 17:12:47 +02:00
onError : onPluginAreaError
2024-05-23 21:39:28 +02:00
} ) , ! isDistractionFree && ( 0 , external _React _namespaceObject . createElement ) ( Sidebar , {
onActionPerformed : onActionPerformed ,
extraPanels : ! isEditingTemplate && ( 0 , external _React _namespaceObject . createElement ) ( MetaBoxes , {
location : "side"
} )
} ) ) ;
2021-04-15 17:19:43 +02:00
}
2024-05-23 21:39:28 +02:00
/* harmony default export */ const layout = ( Layout ) ;
Block Editor: Update `@wordpress` dependencies to match Gutenberg 4.5.1.
- Update the annotations, api-fetch, block-library, blocks, components, compose, core-data, data, date, dom, edit-post, editor, element, format-library, html-entities, i18n, jest-console, jest-preset-default, keycodes, list-reusable-blocks, notices, nux, plugins, rich-text, scripts, token-lists, url, viewport packages.
- Upgrades React from 16.5.2 to 16.6.3.
- Adds a missing `wp-date` dependency to the editor script.
- Updates changed dependencies in `script-loader.php`.
- Fixes undefined notices in some blocks.
- Removes incorrect `gutenberg` textdomain.
Merges [43891], [43903], and [43919] to trunk.
Props atimmer, aduth, youknowriad, danielbachhuber.
See #45145.
Built from https://develop.svn.wordpress.org/trunk@44262
git-svn-id: http://core.svn.wordpress.org/trunk@44092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-17 16:37:00 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
2021-05-19 17:09:27 +02:00
/ * *
* WordPress dependencies
* /
2018-12-14 05:41:57 +01:00
2019-03-21 13:48:00 +01:00
2021-11-08 15:29:21 +01:00
2019-10-15 17:37:08 +02:00
/ * *
2021-05-19 17:09:27 +02:00
* Internal dependencies
2019-10-15 17:37:08 +02:00
* /
2018-12-14 05:41:57 +01:00
2021-05-19 17:09:27 +02:00
/ * *
* This listener hook monitors any change in permalink and updates the view
* post link in the admin bar .
* /
2024-05-23 21:39:28 +02:00
const useUpdatePostLinkListener = ( ) => {
2021-05-19 17:09:27 +02:00
const {
newPermalink
2022-04-11 14:04:30 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => ( {
newPermalink : select ( external _wp _editor _namespaceObject . store ) . getCurrentPost ( ) . link
2024-05-23 21:39:28 +02:00
} ) , [ ] ) ;
2022-04-11 14:04:30 +02:00
const nodeToUpdate = ( 0 , external _wp _element _namespaceObject . useRef ) ( ) ;
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
nodeToUpdate . current = document . querySelector ( VIEW _AS _PREVIEW _LINK _SELECTOR ) || document . querySelector ( VIEW _AS _LINK _SELECTOR ) ;
2024-05-23 21:39:28 +02:00
} , [ ] ) ;
2022-04-11 14:04:30 +02:00
( 0 , external _wp _element _namespaceObject . useEffect ) ( ( ) => {
2021-05-19 17:09:27 +02:00
if ( ! newPermalink || ! nodeToUpdate . current ) {
return ;
}
nodeToUpdate . current . setAttribute ( 'href' , newPermalink ) ;
} , [ newPermalink ] ) ;
} ;
2018-12-14 05:41:57 +01:00
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
2021-05-19 17:09:27 +02:00
/ * *
* Internal dependencies
* /
2018-12-14 05:41:57 +01:00
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* Data component used for initializing the editor and re - initializes
* when postId changes or on unmount .
*
* @ return { null } This is a data component so does not render any ui .
2023-06-28 09:04:13 +02:00
* /
2024-05-23 21:39:28 +02:00
function EditorInitialization ( ) {
useUpdatePostLinkListener ( ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return null ;
}
2023-06-28 09:04:13 +02:00
2024-02-09 19:22:22 +01:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/use-navigate-to-entity-record.js
2023-06-27 16:24:19 +02:00
/ * *
* WordPress dependencies
* /
2024-05-23 21:39:28 +02:00
2023-06-27 16:24:19 +02:00
/ * *
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
* A hook that records the 'entity' history in the post editor as a user
* navigates between editing a post and editing the post template or patterns .
*
* Implemented as a stack , so a little similar to the browser history API .
*
* Used to control displaying UI elements like the back button .
*
2024-05-23 21:39:28 +02:00
* @ param { number } initialPostId The post id of the post when the editor loaded .
* @ param { string } initialPostType The post type of the post when the editor loaded .
* @ param { string } defaultRenderingMode The rendering mode to switch to when navigating .
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
*
* @ return { Object } An object containing the ` currentPost ` variable and
2024-02-09 19:22:22 +01:00
* ` onNavigateToEntityRecord ` and ` onNavigateToPreviousEntityRecord ` functions .
2023-06-27 16:24:19 +02:00
* /
2024-05-23 21:39:28 +02:00
function useNavigateToEntityRecord ( initialPostId , initialPostType , defaultRenderingMode ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const [ postHistory , dispatch ] = ( 0 , external _wp _element _namespaceObject . useReducer ) ( ( historyState , {
type ,
2024-05-23 21:39:28 +02:00
post ,
previousRenderingMode
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ) => {
if ( type === 'push' ) {
2024-05-23 21:39:28 +02:00
return [ ... historyState , {
post ,
previousRenderingMode
} ] ;
2023-06-27 16:24:19 +02:00
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
if ( type === 'pop' ) {
// Try to leave one item in the history.
if ( historyState . length > 1 ) {
return historyState . slice ( 0 , - 1 ) ;
2023-06-27 16:24:19 +02:00
}
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return historyState ;
} , [ {
2024-05-23 21:39:28 +02:00
post : {
postId : initialPostId ,
postType : initialPostType
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ] ) ;
2024-05-23 21:39:28 +02:00
const {
post ,
previousRenderingMode
} = postHistory [ postHistory . length - 1 ] ;
const {
getRenderingMode
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( external _wp _editor _namespaceObject . store ) ;
const {
setRenderingMode
} = ( 0 , external _wp _data _namespaceObject . useDispatch ) ( external _wp _editor _namespaceObject . store ) ;
2024-02-09 19:22:22 +01:00
const onNavigateToEntityRecord = ( 0 , external _wp _element _namespaceObject . useCallback ) ( params => {
dispatch ( {
type : 'push' ,
post : {
postId : params . postId ,
postType : params . postType
2024-05-23 21:39:28 +02:00
} ,
// Save the current rendering mode so we can restore it when navigating back.
previousRenderingMode : getRenderingMode ( )
2024-02-09 19:22:22 +01:00
} ) ;
2024-05-23 21:39:28 +02:00
setRenderingMode ( defaultRenderingMode ) ;
} , [ getRenderingMode , setRenderingMode , defaultRenderingMode ] ) ;
2024-02-09 19:22:22 +01:00
const onNavigateToPreviousEntityRecord = ( 0 , external _wp _element _namespaceObject . useCallback ) ( ( ) => {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
dispatch ( {
type : 'pop'
} ) ;
2024-05-23 21:39:28 +02:00
if ( previousRenderingMode ) {
setRenderingMode ( previousRenderingMode ) ;
}
} , [ setRenderingMode , previousRenderingMode ] ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return {
2024-05-23 21:39:28 +02:00
currentPost : post ,
2024-02-09 19:22:22 +01:00
onNavigateToEntityRecord ,
onNavigateToPreviousEntityRecord : postHistory . length > 1 ? onNavigateToPreviousEntityRecord : undefined
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} ;
2023-06-27 16:24:19 +02:00
}
2020-06-26 15:33:47 +02:00
2023-06-27 16:24:19 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
2020-06-26 15:33:47 +02:00
2019-10-15 17:37:08 +02:00
/ * *
* WordPress dependencies
* /
2019-09-19 17:19:18 +02:00
2018-12-14 05:41:57 +01:00
2018-12-14 05:53:54 +01:00
2018-12-14 05:41:57 +01:00
2021-11-08 15:29:21 +01:00
2018-12-14 05:41:57 +01:00
/ * *
2019-10-15 17:37:08 +02:00
* Internal dependencies
2018-12-14 05:41:57 +01:00
* /
2023-02-07 08:04:52 +01:00
const {
ExperimentalEditorProvider
2023-02-14 16:44:36 +01:00
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
2023-06-27 16:24:19 +02:00
function Editor ( {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
postId : initialPostId ,
postType : initialPostType ,
2023-06-27 16:24:19 +02:00
settings ,
initialEdits ,
... props
} ) {
2021-05-19 17:09:27 +02:00
const {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
currentPost ,
2024-02-09 19:22:22 +01:00
onNavigateToEntityRecord ,
onNavigateToPreviousEntityRecord
2024-05-23 21:39:28 +02:00
} = useNavigateToEntityRecord ( initialPostId , initialPostType , 'post-only' ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const {
2021-05-19 17:09:27 +02:00
post ,
template
2022-04-11 14:04:30 +02:00
} = ( 0 , external _wp _data _namespaceObject . useSelect ) ( select => {
2023-06-27 16:24:19 +02:00
var _getPostType$viewable ;
2021-05-19 17:09:27 +02:00
const {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
getEditedPostTemplate
2024-05-23 21:39:28 +02:00
} = select ( store ) ;
2021-05-19 17:09:27 +02:00
const {
getEntityRecord ,
getPostType ,
2022-09-20 17:43:29 +02:00
canUser
2022-04-11 14:04:30 +02:00
} = select ( external _wp _coreData _namespaceObject . store ) ;
2021-05-19 17:09:27 +02:00
const {
getEditorSettings
2022-04-11 14:04:30 +02:00
} = select ( external _wp _editor _namespaceObject . store ) ;
2024-01-31 13:59:56 +01:00
const postObject = getEntityRecord ( 'postType' , currentPost . postType , currentPost . postId ) ;
2021-05-19 17:09:27 +02:00
const supportsTemplateMode = getEditorSettings ( ) . supportsTemplateMode ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
const isViewable = ( _getPostType$viewable = getPostType ( currentPost . postType ) ? . viewable ) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false ;
2024-05-23 21:39:28 +02:00
const canViewTemplate = canUser ( 'read' , 'templates' ) ;
2021-01-28 03:04:13 +01:00
return {
2024-05-23 21:39:28 +02:00
template : supportsTemplateMode && isViewable && canViewTemplate && currentPost . postType !== 'wp_template' ? getEditedPostTemplate ( ) : null ,
2021-05-19 17:09:27 +02:00
post : postObject
2021-01-28 03:04:13 +01:00
} ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
} , [ currentPost . postType , currentPost . postId ] ) ;
2024-02-09 19:22:22 +01:00
const editorSettings = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => ( {
... settings ,
onNavigateToEntityRecord ,
onNavigateToPreviousEntityRecord ,
2024-05-23 21:39:28 +02:00
defaultRenderingMode : 'post-only'
} ) , [ settings , onNavigateToEntityRecord , onNavigateToPreviousEntityRecord ] ) ;
const initialPost = ( 0 , external _wp _element _namespaceObject . useMemo ) ( ( ) => {
return {
type : initialPostType ,
id : initialPostId
} ;
} , [ initialPostType , initialPostId ] ) ;
2021-05-19 17:09:27 +02:00
if ( ! post ) {
return null ;
2021-01-28 03:04:13 +01:00
}
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _components _namespaceObject . SlotFillProvider , null , ( 0 , external _React _namespaceObject . createElement ) ( ExperimentalEditorProvider , {
2021-05-19 17:09:27 +02:00
settings : editorSettings ,
post : post ,
initialEdits : initialEdits ,
useSubRegistry : false ,
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
_ _unstableTemplate : template ,
2023-06-27 16:24:19 +02:00
... props
2024-05-23 21:39:28 +02:00
} , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . ErrorBoundary , null , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _commands _namespaceObject . CommandMenu , null ) , ( 0 , external _React _namespaceObject . createElement ) ( EditorInitialization , null ) , ( 0 , external _React _namespaceObject . createElement ) ( layout , {
2024-02-09 19:22:22 +01:00
initialPost : initialPost
} ) ) , ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PostLockedModal , null ) ) ) ;
2021-05-19 17:09:27 +02:00
}
2024-01-31 13:59:56 +01:00
/* harmony default export */ const editor = ( Editor ) ;
2018-12-14 05:53:54 +01:00
2024-05-23 21:39:28 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/deprecated.js
2018-12-14 05:53:54 +01:00
2020-01-22 23:06:21 +01:00
/ * *
2021-01-28 03:04:13 +01:00
* WordPress dependencies
2020-01-22 23:06:21 +01:00
* /
2018-12-14 05:53:54 +01:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* Internal dependencies
2021-05-19 17:09:27 +02:00
* /
2023-09-26 16:23:26 +02:00
2024-05-23 21:39:28 +02:00
const {
PluginPostExcerpt
} = unlock ( external _wp _editor _namespaceObject . privateApis ) ;
const deprecateSlot = name => {
external _wp _deprecated _default ( ) ( ` wp.editPost. ${ name } ` , {
since : '6.6' ,
alternative : ` wp.editor. ${ name } `
} ) ;
} ;
/* eslint-disable jsdoc/require-param */
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* @ see PluginBlockSettingsMenuItem in @ wordpress / editor package .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
function PluginBlockSettingsMenuItem ( props ) {
deprecateSlot ( 'PluginBlockSettingsMenuItem' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginBlockSettingsMenuItem , {
... props
} ) ;
}
2020-01-22 23:06:21 +01:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* @ see PluginDocumentSettingPanel in @ wordpress / editor package .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
function PluginDocumentSettingPanel ( props ) {
deprecateSlot ( 'PluginDocumentSettingPanel' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginDocumentSettingPanel , {
... props
} ) ;
}
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* @ see PluginMoreMenuItem in @ wordpress / editor package .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
function PluginMoreMenuItem ( props ) {
deprecateSlot ( 'PluginMoreMenuItem' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginMoreMenuItem , {
... props
} ) ;
}
2020-01-22 23:06:21 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* @ see PluginPrePublishPanel in @ wordpress / editor package .
* /
function PluginPrePublishPanel ( props ) {
deprecateSlot ( 'PluginPrePublishPanel' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginPrePublishPanel , {
... props
} ) ;
}
2021-01-28 03:04:13 +01:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* @ see PluginPostPublishPanel in @ wordpress / editor package .
2021-05-19 17:09:27 +02:00
* /
2024-05-23 21:39:28 +02:00
function PluginPostPublishPanel ( props ) {
deprecateSlot ( 'PluginPostPublishPanel' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginPostPublishPanel , {
... props
} ) ;
}
2021-01-28 03:04:13 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* @ see PluginPostStatusInfo in @ wordpress / editor package .
* /
function PluginPostStatusInfo ( props ) {
deprecateSlot ( 'PluginPostStatusInfo' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginPostStatusInfo , {
... props
} ) ;
}
2023-09-26 16:23:26 +02:00
2021-05-19 17:09:27 +02:00
/ * *
2024-05-23 21:39:28 +02:00
* @ see PluginSidebar in @ wordpress / editor package .
2022-04-11 14:04:30 +02:00
* /
2024-05-23 21:39:28 +02:00
function PluginSidebar ( props ) {
deprecateSlot ( 'PluginSidebar' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginSidebar , {
... props
} ) ;
}
2021-05-20 14:20:04 +02:00
2024-05-23 21:39:28 +02:00
/ * *
* @ see PluginSidebarMoreMenuItem in @ wordpress / editor package .
* /
2022-04-11 14:04:30 +02:00
function PluginSidebarMoreMenuItem ( props ) {
2024-05-23 21:39:28 +02:00
deprecateSlot ( 'PluginSidebarMoreMenuItem' ) ;
return ( 0 , external _React _namespaceObject . createElement ) ( external _wp _editor _namespaceObject . PluginSidebarMoreMenuItem , {
2023-06-27 16:24:19 +02:00
... props
} ) ;
2022-04-11 14:04:30 +02:00
}
2019-03-07 10:09:59 +01:00
2024-05-23 21:39:28 +02:00
/ * *
* @ see PluginPostExcerpt in @ wordpress / editor package .
* /
function _ _experimentalPluginPostExcerpt ( ) {
external _wp _deprecated _default ( ) ( 'wp.editPost.__experimentalPluginPostExcerpt' , {
since : '6.6' ,
hint : 'Core and custom panels can be access programmatically using their panel name.' ,
link : 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically'
} ) ;
return PluginPostExcerpt ;
}
/* eslint-enable jsdoc/require-param */
2022-04-11 14:04:30 +02:00
; // CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/index.js
2019-03-07 10:09:59 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* WordPress dependencies
* /
2019-03-07 10:09:59 +01:00
2023-02-07 08:04:52 +01:00
2023-09-26 16:23:26 +02:00
2021-05-20 14:20:04 +02:00
/ * *
2022-04-11 14:04:30 +02:00
* Internal dependencies
2021-05-20 14:20:04 +02:00
* /
2019-03-07 10:09:59 +01:00
2018-12-14 05:41:57 +01:00
2022-04-11 14:04:30 +02:00
/ * *
* Initializes and returns an instance of Editor .
*
* @ param { string } id Unique identifier for editor instance .
* @ param { string } postType Post type of the post to edit .
* @ param { Object } postId ID of the post to edit .
* @ param { ? Object } settings Editor settings object .
* @ param { Object } initialEdits Programmatic edits to apply initially , to be
* considered as non - user - initiated ( bypass for
* unsaved changes prompt ) .
* /
function initializeEditor ( id , postType , postId , settings , initialEdits ) {
2024-02-20 16:41:18 +01:00
const isMediumOrBigger = window . matchMedia ( '(min-width: 782px)' ) . matches ;
2022-04-11 14:04:30 +02:00
const target = document . getElementById ( id ) ;
2023-02-07 08:04:52 +01:00
const root = ( 0 , external _wp _element _namespaceObject . createRoot ) ( target ) ;
2022-04-12 17:12:47 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( 'core/edit-post' , {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
fullscreenMode : true ,
themeStyles : true ,
welcomeGuide : true ,
welcomeGuideTemplate : true
} ) ;
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _preferences _namespaceObject . store ) . setDefaults ( 'core' , {
allowRightClickOverrides : true ,
2022-04-12 17:12:47 +02:00
editorMode : 'visual' ,
2022-04-11 14:04:30 +02:00
fixedToolbar : false ,
2022-04-12 17:12:47 +02:00
hiddenBlockTypes : [ ] ,
inactivePanels : [ ] ,
openPanels : [ 'post-status' ] ,
showBlockBreadcrumbs : true ,
2022-04-11 14:04:30 +02:00
showIconLabels : false ,
2024-05-23 21:39:28 +02:00
showListViewByDefault : false ,
isPublishSidebarEnabled : true
2022-04-11 14:04:30 +02:00
} ) ;
2023-09-26 16:23:26 +02:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _blocks _namespaceObject . store ) . reapplyBlockTypeFilters ( ) ;
2019-09-19 17:19:18 +02:00
2023-09-26 16:23:26 +02:00
// Check if the block list view should be open by default.
2023-07-25 10:40:23 +02:00
// If `distractionFree` mode is enabled, the block list view should not be open.
2024-02-20 16:41:18 +01:00
// This behavior is disabled for small viewports.
if ( isMediumOrBigger && ( 0 , external _wp _data _namespaceObject . select ) ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'showListViewByDefault' ) && ! ( 0 , external _wp _data _namespaceObject . select ) ( external _wp _preferences _namespaceObject . store ) . get ( 'core' , 'distractionFree' ) ) {
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
( 0 , external _wp _data _namespaceObject . dispatch ) ( external _wp _editor _namespaceObject . store ) . setIsListViewOpened ( true ) ;
2022-09-20 17:43:29 +02:00
}
2022-04-11 14:04:30 +02:00
( 0 , external _wp _blockLibrary _namespaceObject . registerCoreBlocks ) ( ) ;
2023-02-07 08:04:52 +01:00
( 0 , external _wp _widgets _namespaceObject . registerLegacyWidgetBlock ) ( {
inserter : false
} ) ;
2023-03-07 16:31:49 +01:00
( 0 , external _wp _widgets _namespaceObject . registerWidgetGroupBlock ) ( {
inserter : false
} ) ;
2022-10-04 17:06:52 +02:00
if ( false ) { }
2023-09-26 16:23:26 +02:00
// Show a console log warning if the browser is not in Standards rendering mode.
2022-04-11 14:04:30 +02:00
const documentMode = document . compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks' ;
if ( documentMode !== 'Standards' ) {
// eslint-disable-next-line no-console
console . warn ( "Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins." ) ;
2023-09-26 16:23:26 +02:00
}
// This is a temporary fix for a couple of issues specific to Webkit on iOS.
2022-04-11 14:04:30 +02:00
// Without this hack the browser scrolls the mobile toolbar off-screen.
// Once supported in Safari we can replace this in favor of preventScroll.
// For details see issue #18632 and PR #18686
// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.
// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.
2021-05-20 14:20:04 +02:00
2022-04-11 14:04:30 +02:00
const isIphone = window . navigator . userAgent . indexOf ( 'iPhone' ) !== - 1 ;
if ( isIphone ) {
window . addEventListener ( 'scroll' , event => {
const editorScrollContainer = document . getElementsByClassName ( 'interface-interface-skeleton__body' ) [ 0 ] ;
if ( event . target === document ) {
// Scroll element into view by scrolling the editor container by the same amount
// that Mobile Safari tried to scroll the html element upwards.
if ( window . scrollY > 100 ) {
editorScrollContainer . scrollTop = editorScrollContainer . scrollTop + window . scrollY ;
2023-09-26 16:23:26 +02:00
}
// Undo unwanted scroll on html element, but only in the visual editor.
2022-04-11 14:04:30 +02:00
if ( document . getElementsByClassName ( 'is-mode-visual' ) [ 0 ] ) {
window . scrollTo ( 0 , 0 ) ;
}
}
} ) ;
2023-09-26 16:23:26 +02:00
}
2021-05-20 14:20:04 +02:00
2023-09-26 16:23:26 +02:00
// Prevent the default browser action for files dropped outside of dropzones.
2022-09-20 17:43:29 +02:00
window . addEventListener ( 'dragover' , e => e . preventDefault ( ) , false ) ;
window . addEventListener ( 'drop' , e => e . preventDefault ( ) , false ) ;
Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.
This patch, somewhat small brings a lot to WordPress.
This includes features like:
- DataViews.
- Customization tools like box shadow, background size and repeat.
- UI improvements in the site editor.
- Preferences sharing between the post and site editors.
- Unified panels and editors between post and site editors.
- Improved template mode in the post editor.
- Iterations to multiple interactive blocks.
- Preparing the blocks and UI for pattern overrides.
- and a lot more.
Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.
Built from https://develop.svn.wordpress.org/trunk@57377
git-svn-id: http://core.svn.wordpress.org/trunk@56883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-01-29 22:07:12 +01:00
root . render ( ( 0 , external _React _namespaceObject . createElement ) ( editor , {
2022-04-11 14:04:30 +02:00
settings : settings ,
postId : postId ,
postType : postType ,
initialEdits : initialEdits
2023-02-07 08:04:52 +01:00
} ) ) ;
return root ;
}
2023-09-26 16:23:26 +02:00
2023-02-07 08:04:52 +01:00
/ * *
* Used to reinitialize the editor after an error . Now it ' s a deprecated noop function .
* /
function reinitializeEditor ( ) {
external _wp _deprecated _default ( ) ( 'wp.editPost.reinitializeEditor' , {
since : '6.2' ,
version : '6.3'
} ) ;
2022-04-11 14:04:30 +02:00
}
2020-02-06 22:03:31 +01:00
2021-05-20 14:20:04 +02:00
2022-04-11 14:04:30 +02:00
( window . wp = window . wp || { } ) . editPost = _ _webpack _exports _ _ ;
/******/ } ) ( )
;