WordPress/wp-includes/js/dist/edit-post.js

3778 lines
130 KiB
JavaScript
Raw Normal View History

/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ 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] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
PluginBlockSettingsMenuItem: () => (/* reexport */ PluginBlockSettingsMenuItem),
PluginDocumentSettingPanel: () => (/* reexport */ PluginDocumentSettingPanel),
PluginMoreMenuItem: () => (/* reexport */ PluginMoreMenuItem),
PluginPostPublishPanel: () => (/* reexport */ PluginPostPublishPanel),
PluginPostStatusInfo: () => (/* reexport */ PluginPostStatusInfo),
PluginPrePublishPanel: () => (/* reexport */ PluginPrePublishPanel),
PluginSidebar: () => (/* reexport */ PluginSidebar),
PluginSidebarMoreMenuItem: () => (/* reexport */ PluginSidebarMoreMenuItem),
__experimentalFullscreenModeClose: () => (/* reexport */ fullscreen_mode_close),
__experimentalMainDashboardButton: () => (/* reexport */ main_dashboard_button),
__experimentalPluginPostExcerpt: () => (/* reexport */ __experimentalPluginPostExcerpt),
initializeEditor: () => (/* binding */ initializeEditor),
reinitializeEditor: () => (/* binding */ reinitializeEditor),
store: () => (/* reexport */ store)
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
var actions_namespaceObject = {};
__webpack_require__.r(actions_namespaceObject);
__webpack_require__.d(actions_namespaceObject, {
__experimentalSetPreviewDeviceType: () => (__experimentalSetPreviewDeviceType),
__unstableCreateTemplate: () => (__unstableCreateTemplate),
closeGeneralSidebar: () => (closeGeneralSidebar),
closeModal: () => (closeModal),
closePublishSidebar: () => (closePublishSidebar),
hideBlockTypes: () => (hideBlockTypes),
initializeMetaBoxes: () => (initializeMetaBoxes),
metaBoxUpdatesFailure: () => (metaBoxUpdatesFailure),
metaBoxUpdatesSuccess: () => (metaBoxUpdatesSuccess),
openGeneralSidebar: () => (openGeneralSidebar),
openModal: () => (openModal),
openPublishSidebar: () => (openPublishSidebar),
removeEditorPanel: () => (removeEditorPanel),
requestMetaBoxUpdates: () => (requestMetaBoxUpdates),
setAvailableMetaBoxesPerLocation: () => (setAvailableMetaBoxesPerLocation),
setIsEditingTemplate: () => (setIsEditingTemplate),
setIsInserterOpened: () => (setIsInserterOpened),
setIsListViewOpened: () => (setIsListViewOpened),
showBlockTypes: () => (showBlockTypes),
switchEditorMode: () => (switchEditorMode),
toggleDistractionFree: () => (toggleDistractionFree),
toggleEditorPanelEnabled: () => (toggleEditorPanelEnabled),
toggleEditorPanelOpened: () => (toggleEditorPanelOpened),
toggleFeature: () => (toggleFeature),
togglePinnedPluginItem: () => (togglePinnedPluginItem),
togglePublishSidebar: () => (togglePublishSidebar),
updatePreferredStyleVariations: () => (updatePreferredStyleVariations)
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
var selectors_namespaceObject = {};
__webpack_require__.r(selectors_namespaceObject);
__webpack_require__.d(selectors_namespaceObject, {
__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),
isFeatureActive: () => (isFeatureActive),
isInserterOpened: () => (isInserterOpened),
isListViewOpened: () => (isListViewOpened),
isMetaBoxLocationActive: () => (isMetaBoxLocationActive),
isMetaBoxLocationVisible: () => (isMetaBoxLocationVisible),
isModalActive: () => (isModalActive),
isPluginItemPinned: () => (isPluginItemPinned),
isPluginSidebarOpened: () => (isPluginSidebarOpened),
isPublishSidebarOpened: () => (isPublishSidebarOpened),
isSavingMetaBoxes: () => (selectors_isSavingMetaBoxes)
});
;// CONCATENATED MODULE: external "React"
const external_React_namespaceObject = window["React"];
;// CONCATENATED MODULE: external ["wp","blocks"]
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
;// CONCATENATED MODULE: external ["wp","blockLibrary"]
const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
;// CONCATENATED MODULE: external ["wp","deprecated"]
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
;// CONCATENATED MODULE: external ["wp","element"]
const external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: external ["wp","data"]
const external_wp_data_namespaceObject = window["wp"]["data"];
;// CONCATENATED MODULE: external ["wp","preferences"]
const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
;// CONCATENATED MODULE: external ["wp","widgets"]
const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
;// CONCATENATED MODULE: external ["wp","editor"]
const external_wp_editor_namespaceObject = window["wp"]["editor"];
;// CONCATENATED MODULE: external ["wp","hooks"]
const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
;// CONCATENATED MODULE: external ["wp","mediaUtils"]
const external_wp_mediaUtils_namespaceObject = window["wp"]["mediaUtils"];
;// 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);
;// CONCATENATED MODULE: external ["wp","components"]
const external_wp_components_namespaceObject = window["wp"]["components"];
;// CONCATENATED MODULE: external ["wp","blockEditor"]
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
;// CONCATENATED MODULE: external ["wp","i18n"]
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
;// CONCATENATED MODULE: external ["wp","compose"]
const external_wp_compose_namespaceObject = window["wp"]["compose"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/validate-multiple-use/index.js
/**
* WordPress dependencies
*/
/**
* 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;
}
}
}
const enhance = (0,external_wp_compose_namespaceObject.compose)(
/**
* 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.
*
* @param {Component} WrappedBlockEdit A filtered BlockEdit instance.
*
* @return {Component} Enhanced component with merged state data props.
*/
(0,external_wp_data_namespaceObject.withSelect)((select, block) => {
const multiple = (0,external_wp_blocks_namespaceObject.hasBlockSupport)(block.name, 'multiple', true);
// For block types with `multiple` support, there is no "original
// block" to be found in the content, as the block itself is valid.
if (multiple) {
return {};
}
// Otherwise, only pass `originalBlockClientId` if it refers to a different
// block from the current one.
const blocks = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
const firstOfSameType = findFirstOfSameType(blocks, block.name);
const isInvalid = firstOfSameType && firstOfSameType.clientId !== block.clientId;
return {
originalBlockClientId: isInvalid && firstOfSameType.clientId
};
}), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, {
originalBlockClientId
}) => ({
selectFirst: () => dispatch(external_wp_blockEditor_namespaceObject.store).selectBlock(originalBlockClientId)
})));
const withMultipleValidation = (0,external_wp_compose_namespaceObject.createHigherOrderComponent)(BlockEdit => {
return enhance(({
originalBlockClientId,
selectFirst,
...props
}) => {
if (!originalBlockClientId) {
return (0,external_React_namespaceObject.createElement)(BlockEdit, {
...props
});
}
const blockType = (0,external_wp_blocks_namespaceObject.getBlockType)(props.name);
const outboundType = getOutboundType(props.name);
return [(0,external_React_namespaceObject.createElement)("div", {
key: "invalid-preview",
style: {
minHeight: '60px'
}
}, (0,external_React_namespaceObject.createElement)(BlockEdit, {
key: "block-edit",
...props
})), (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.Warning, {
key: "multiple-use-warning",
actions: [(0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
key: "find-original",
variant: "secondary",
onClick: selectFirst
}, (0,external_wp_i18n_namespaceObject.__)('Find original')), (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
key: "remove",
variant: "secondary",
onClick: () => props.onReplace([])
}, (0,external_wp_i18n_namespaceObject.__)('Remove')), outboundType && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Button, {
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)]
}, (0,external_React_namespaceObject.createElement)("strong", null, blockType?.title, ": "), (0,external_wp_i18n_namespaceObject.__)('This block can only be used once.'))];
});
}, 'withMultipleValidation');
/**
* 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.
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?
);
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
*/
;// CONCATENATED MODULE: external ["wp","coreData"]
const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
;// 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);
;// CONCATENATED MODULE: external ["wp","plugins"]
const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
;// CONCATENATED MODULE: external ["wp","notices"]
const external_wp_notices_namespaceObject = window["wp"]["notices"];
;// 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
/**
* WordPress dependencies
*/
/**
* 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;
}
}
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);
}
}
return mergedMetaboxes;
}
/**
* Reducer keeping track of the meta boxes per location.
*
* @param {boolean} state Previous state.
* @param {Object} action Action Object.
*
* @return {Object} Updated state.
*/
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;
}
/**
* 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
}));
;// 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);
};
;// 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
/**
* WordPress dependencies
*/
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');
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
interfaceStore
} = unlock(external_wp_editor_namespaceObject.privateApis);
/**
* Returns an action object used in signalling that the user opened an editor sidebar.
*
* @param {?string} name Sidebar name to be opened.
*/
const openGeneralSidebar = name => ({
registry
}) => {
registry.dispatch(interfaceStore).enableComplementaryArea('core', name);
};
/**
* Returns an action object signalling that the user closed the sidebar.
*/
const closeGeneralSidebar = () => ({
registry
}) => registry.dispatch(interfaceStore).disableComplementaryArea('core');
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +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.
*
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
*
* @param {string} name A string that uniquely identifies the modal.
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
*
* @return {Object} Action object.
*/
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);
};
/**
* 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.
*
* @return {Object} Action object.
*/
const closeModal = () => ({
registry
}) => {
external_wp_deprecated_default()("select( 'core/edit-post' ).closeModal()", {
since: '6.3',
alternative: "select( 'core/interface').closeModal()"
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
});
return registry.dispatch(interfaceStore).closeModal();
};
/**
* Returns an action object used in signalling that the user opened the publish
* sidebar.
* @deprecated
*
* @return {Object} Action object
*/
const openPublishSidebar = () => ({
registry
}) => {
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();
};
/**
* Returns an action object used in signalling that the user closed the
* publish sidebar.
* @deprecated
*
* @return {Object} Action object.
*/
const closePublishSidebar = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).closePublishSidebar", {
since: '6.6',
alternative: "dispatch( 'core/editor').closePublishSidebar"
});
registry.dispatch(external_wp_editor_namespaceObject.store).closePublishSidebar();
};
/**
* Returns an action object used in signalling that the user toggles the publish sidebar.
* @deprecated
*
* @return {Object} Action object
*/
const togglePublishSidebar = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).togglePublishSidebar", {
since: '6.6',
alternative: "dispatch( 'core/editor').togglePublishSidebar"
});
registry.dispatch(external_wp_editor_namespaceObject.store).togglePublishSidebar();
};
/**
* Returns an action object used to enable or disable a panel in the editor.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to enable or disable.
*
* @return {Object} Action object.
*/
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);
};
/**
* Opens a closed panel and closes an open panel.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to open or close.
*/
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);
};
/**
* Returns an action object used to remove a panel from the editor.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to remove.
*
* @return {Object} Action object.
*/
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);
};
/**
* Triggers an action used to toggle a feature flag.
*
* @param {string} feature Feature name.
*/
const toggleFeature = feature => ({
registry
}) => registry.dispatch(external_wp_preferences_namespaceObject.store).toggle('core/edit-post', feature);
/**
* Triggers an action used to switch editor mode.
*
* @deprecated
*
* @param {string} mode The editor mode.
*/
const switchEditorMode = mode => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).switchEditorMode", {
since: '6.6',
alternative: "dispatch( 'core/editor').switchEditorMode"
});
registry.dispatch(external_wp_editor_namespaceObject.store).switchEditorMode(mode);
};
/**
* Triggers an action object used to toggle a plugin name flag.
*
* @param {string} pluginName Plugin name.
*/
const togglePinnedPluginItem = pluginName => ({
registry
}) => {
const isPinned = registry.select(interfaceStore).isItemPinned('core', pluginName);
registry.dispatch(interfaceStore)[isPinned ? 'unpinItem' : 'pinItem']('core', pluginName);
};
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* Returns an action object used in signaling that a style should be auto-applied when a block is created.
*
* @deprecated
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +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'
};
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
}
/**
* Update the provided block types to be visible.
*
* @param {string[]} blockNames Names of block types to show.
*/
const showBlockTypes = blockNames => ({
registry
}) => {
unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).showBlockTypes(blockNames);
};
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* Update the provided block types to be hidden.
*
* @param {string[]} blockNames Names of block types to hide.
*/
const hideBlockTypes = blockNames => ({
registry
}) => {
unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).hideBlockTypes(blockNames);
};
/**
* Stores info about which Meta boxes are available in which location.
*
* @param {Object} metaBoxesPerLocation Meta boxes per location.
*/
function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
return {
type: 'SET_META_BOXES_PER_LOCATIONS',
metaBoxesPerLocation
};
}
/**
* Update a metabox.
*/
const requestMetaBoxUpdates = () => async ({
registry,
select,
dispatch
}) => {
dispatch({
type: 'REQUEST_META_BOX_UPDATES'
});
// Saves the wp_editor fields.
if (window.tinyMCE) {
window.tinyMCE.triggerSave();
}
// 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);
// 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)))];
// 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();
}
};
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* Returns an action object used to signal a successful meta box update.
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
*
* @return {Object} Action object.
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
*/
function metaBoxUpdatesSuccess() {
return {
type: 'META_BOX_UPDATES_SUCCESS'
};
}
/**
* Returns an action object used to signal a failed meta box update.
*
* @return {Object} Action object.
*/
function metaBoxUpdatesFailure() {
return {
type: 'META_BOX_UPDATES_FAILURE'
};
}
/**
* Action that changes the width of the editing canvas.
*
* @deprecated
*
* @param {string} deviceType
*/
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);
};
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
/**
* 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
*/
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
/**
* 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
/**
* 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"
});
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
}
/**
* Create a block based template.
*
* @deprecated
*/
function __unstableCreateTemplate() {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).__unstableCreateTemplate", {
since: '6.5'
});
return {
type: 'NOTHING'
};
}
let actions_metaBoxesInitialized = false;
/**
* Initializes WordPress `postboxes` script and the logic for saving meta boxes.
*/
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;
// 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'
});
};
/**
* 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
*/
const toggleDistractionFree = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleDistractionFree", {
since: '6.6',
alternative: "dispatch( 'core/editor').toggleDistractionFree"
});
registry.dispatch(external_wp_editor_namespaceObject.store).toggleDistractionFree();
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
/**
* Internal dependencies
*/
const {
interfaceStore: selectors_interfaceStore
} = unlock(external_wp_editor_namespaceObject.privateApis);
const EMPTY_ARRAY = [];
const EMPTY_OBJECT = {};
/**
* 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';
});
/**
* Returns true if the editor sidebar is opened.
*
* @param {Object} state Global application state
*
* @return {boolean} Whether the editor sidebar is opened.
*/
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);
});
/**
* Returns true if the plugin sidebar is opened.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the plugin sidebar is opened.
*/
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);
});
/**
* 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.
*/
const getActiveGeneralSidebarName = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
return select(selectors_interfaceStore).getActiveComplementaryArea('core');
});
/**
* 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.
*/
function convertPanelsToOldFormat(inactivePanels, openPanels) {
var _ref;
// First reduce the inactive panels.
const panelsWithEnabledState = inactivePanels?.reduce((accumulatedPanels, panelName) => ({
...accumulatedPanels,
[panelName]: {
enabled: false
}
}), {});
// 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 : {});
// 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;
}
/**
* Returns the preferences (these preferences are persisted locally).
*
* @param {Object} state Global application state.
*
* @return {Object} Preferences Object.
*/
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`
});
const corePreferences = ['editorMode', 'hiddenBlockTypes'].reduce((accumulatedPrefs, preferenceKey) => {
const value = select(external_wp_preferences_namespaceObject.store).get('core', preferenceKey);
return {
...accumulatedPrefs,
[preferenceKey]: value
};
}, {});
// 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
};
});
/**
*
* @param {Object} state Global application state.
* @param {string} preferenceKey Preference Key.
* @param {*} defaultValue Default Value.
*
* @return {*} Preference Value.
*/
function getPreference(state, preferenceKey, defaultValue) {
external_wp_deprecated_default()(`select( 'core/edit-post' ).getPreference`, {
since: '6.0',
alternative: `select( 'core/preferences' ).get`
});
// Avoid using the `getPreferences` registry selector where possible.
const preferences = getPreferences(state);
const value = preferences[preferenceKey];
return value === undefined ? defaultValue : value;
}
/**
* Returns an array of blocks that are hidden.
*
* @return {Array} A list of the hidden block types
*/
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;
});
/**
* Returns true if the publish sidebar is opened.
*
* @deprecated
*
* @param {Object} state Global application state
*
* @return {boolean} Whether the publish sidebar is open.
*/
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();
});
/**
* 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.
*/
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);
});
/**
* 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.
*/
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);
});
/**
* 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.
*/
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);
});
/**
* 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.
*/
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);
});
/**
* Returns whether the given feature is enabled or not.
*
* @param {Object} state Global application state.
* @param {string} feature Feature slug.
*
* @return {boolean} Is active.
*/
const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, feature) => {
return !!select(external_wp_preferences_namespaceObject.store).get('core/edit-post', feature);
});
/**
* 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.
*/
const isPluginItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, pluginName) => {
return select(selectors_interfaceStore).isItemPinned('core', pluginName);
});
/**
* Returns an array of active meta box locations.
*
* @param {Object} state Post editor state.
*
* @return {string[]} Active meta box locations.
*/
const getActiveMetaBoxLocations = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.keys(state.metaBoxes.locations).filter(location => isMetaBoxLocationActive(state, location));
}, state => [state.metaBoxes.locations]);
/**
* 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.
*/
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}`);
});
});
/**
* 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.
*/
function isMetaBoxLocationActive(state, location) {
const metaBoxes = getMetaBoxesPerLocation(state, location);
return !!metaBoxes && metaBoxes.length !== 0;
}
/**
* 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.
*/
function getMetaBoxesPerLocation(state, location) {
return state.metaBoxes.locations[location];
}
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
/**
* Returns the list of all the available meta boxes.
*
* @param {Object} state Global application state.
*
* @return {Array} List of meta boxes.
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
*/
const getAllMetaBoxes = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.values(state.metaBoxes.locations).flat();
}, state => [state.metaBoxes.locations]);
/**
* Returns true if the post is using Meta Boxes
*
* @param {Object} state Global application state
*
* @return {boolean} Whether there are metaboxes or not.
*/
function hasMetaBoxes(state) {
return getActiveMetaBoxLocations(state).length > 0;
}
/**
* Returns true if the Meta Boxes are being saved.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the metaboxes are being saved.
*/
function selectors_isSavingMetaBoxes(state) {
return state.metaBoxes.isSaving;
}
/**
* Returns the current editing canvas device type.
*
* @deprecated
*
* @param {Object} state Global application state.
*
* @return {string} Device type.
*/
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();
});
/**
* Returns true if the inserter is opened.
*
* @deprecated
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the inserter is opened.
*/
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`
});
return select(external_wp_editor_namespaceObject.store).isInserterOpened();
});
/**
* 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.
*/
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();
});
/**
* Returns true if the list view is opened.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the list view is opened.
*/
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();
});
/**
* 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';
});
/**
* Returns true if meta boxes are initialized.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether meta boxes are initialized.
*/
function areMetaBoxesInitialized(state) {
return state.metaBoxes.initialized;
}
/**
* Retrieves the template of the currently edited post.
*
* @return {Object?} Post Template.
*/
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);
}
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;
}
return getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id);
}
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}`;
}
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
slug: slugToCheck
});
return select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_template', defaultTemplateId);
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
/**
* The identifier for the data store.
*
* @type {string}
*/
const STORE_NAME = 'core/edit-post';
/**
* CSS selector string for the admin bar view post link anchor tag.
*
* @type {string}
*/
const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a';
/**
* 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';
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
/**
* Store definition for the edit post namespace.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @type {Object}
*/
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
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/text-editor/index.js
/**
* WordPress dependencies
*/
2020-01-08 12:57:23 +01:00
/**
* Internal dependencies
*/
2020-01-08 12:57:23 +01:00
function TextEditor() {
const isRichEditingEnabled = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(external_wp_editor_namespaceObject.store).getEditorSettings().richEditingEnabled;
}, []);
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)));
}
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/use-padding-appender.js
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* WordPress dependencies
*/
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;
}
// 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];
// 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]);
}
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/visual-editor/index.js
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* External dependencies
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
EditorCanvas
} = unlock(external_wp_editor_namespaceObject.privateApis);
const isGutenbergPlugin = false ? 0 : false;
function VisualEditor({
styles
}) {
const {
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;
// 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
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function KeyboardShortcuts() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
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
}
/* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/init-pattern-modal/index.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
/**
* Internal dependencies
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +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);
}
// 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
}
});
}
}, (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);
}
}), (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')))))));
}
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01: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'
});
}
/**
* Returns the Post's Trashed URL.
*
* @param {number} postId Post ID.
* @param {string} postType Post Type.
*
* @return {string} Post trashed URL.
*/
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;
// 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);
}
}
/**
* Navigates the browser to the post trashed URL to show a notice about the trashed post.
*
* @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.
*
* 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.
*
* @param {number} postId Post ID for which to generate post editor URL.
*/
setBrowserURL(postId) {
window.history.replaceState({
id: postId
}, 'Post ' + postId, getPostEditURL(postId));
this.setState(() => ({
historyId: postId
}));
}
render() {
return null;
}
}
/* harmony default export */ const browser_url = ((0,external_wp_data_namespaceObject.withSelect)(select => {
const {
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;
}
return {
postId: id,
postStatus: status,
postType: type,
isSavingPost: isSavingPost()
};
})(BrowserURL));
;// CONCATENATED MODULE: external ["wp","primitives"]
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
/**
* WordPress dependencies
*/
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);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/fullscreen-mode-close/index.js
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.6.0 -> 2.7.0 @wordpress/annotations: 1.10.0 -> 1.11.0 @wordpress/api-fetch: 3.9.0 -> 3.10.0 @wordpress/autop: 2.5.1 -> 2.6.0 @wordpress/blob: 2.6.0 -> 2.7.0 @wordpress/block-directory: 1.3.0 -> 1.4.0 @wordpress/block-editor: 3.5.0 -> 3.6.0 @wordpress/block-library: 2.12.0 -> 2.13.0 @wordpress/block-serialization-default-parser: 3.4.1 -> 3.5.0 @wordpress/blocks: 6.10.0 -> 6.11.0 @wordpress/components: 9.0.0 -> 9.1.0 @wordpress/compose: 3.10.0 -> 3.11.0 @wordpress/core-data: 2.10.0 -> 2.11.0 @wordpress/custom-templated-path-webpack-plugin: 1.5.0 -> 1.6.0 @wordpress/data: 4.12.0 -> 4.13.0 @wordpress/data-controls: 1.6.0 -> 1.7.0 @wordpress/date: 3.7.0 -> 3.8.0 @wordpress/dependency-extraction-webpack-plugin: 2.1.0 -> 2.2.0 @wordpress/deprecated: 2.6.1 -> 2.7.0 @wordpress/dom: 2.7.0 -> 2.8.0 @wordpress/dom-ready: 2.6.0 -> 2.7.0 @wordpress/e2e-test-utils: 4.1.0 -> 4.2.0 @wordpress/edit-post: 3.11.0 -> 3.12.0 @wordpress/editor: 9.10.0 -> 9.11.0 @wordpress/element: 2.10.0 -> 2.11.0 @wordpress/escape-html: 1.6.0 -> 1.7.0 @wordpress/format-library: 1.12.0 -> 1.13.0 @wordpress/hooks: 2.6.0 -> 2.7.0 @wordpress/html-entities: 2.5.0 -> 2.6.0 @wordpress/i18n: 3.8.0 -> 3.9.0 @wordpress/is-shallow-equal: 1.7.0 -> 1.8.0 @wordpress/keyboard-shortcuts: 0.2.0 -> 1.0.0 @wordpress/keycodes: 2.8.0 -> 2.9.0 @wordpress/library-export-default-webpack-plugin: 1.5.0 -> 1.6.0 @wordpress/list-reusable-blocks: 1.11.0 -> 1.12.0 @wordpress/media-utils: 1.5.0 -> 1.6.0 @wordpress/notices: 1.11.0 -> 1.12.0 @wordpress/nux: 3.10.0 -> 3.11.0 @wordpress/plugins: 2.10.0 -> 2.11.0 @wordpress/priority-queue: 1.4.0 -> 1.5.0 @wordpress/redux-routine: 3.6.2 -> 3.7.0 @wordpress/rich-text: 3.10.0 -> 3.11.0 @wordpress/scripts: 6.2.0 -> 7.0.0 @wordpress/server-side-render: 1.6.0 -> 1.7.0 @wordpress/shortcode: 2.5.0 -> 2.6.0 @wordpress/token-list: 1.8.0 -> 1.9.0 @wordpress/url: 2.9.0 -> 2.10.0 @wordpress/viewport: 2.11.0 -> 2.12.0 @wordpress/wordcount: 2.6.2 -> 2.7.0 Added these new packages: @wordpress/warning @wordpress/primitives @wordpress/icons Re-added keyboard-shortcuts to script loader removed by mistake on revision 47198. Props gziolo, itsjonq, youknowriad, mcsf, andraganescu. Fixes #49358. Built from https://develop.svn.wordpress.org/trunk@47199 git-svn-id: http://core.svn.wordpress.org/trunk@46999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 22:03:31 +01:00
/**
* External dependencies
*/
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
2020-01-08 12:57:23 +01:00
/**
* WordPress dependencies
2020-01-08 12:57:23 +01:00
*/
2020-01-08 12:57:23 +01:00
/**
* Internal dependencies
*/
function FullscreenModeClose({
showTooltip,
icon,
href,
initialPost
}) {
var _postType$labels$view;
const {
isActive,
isRequestingSiteIcon,
postType,
siteIconUrl
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getCurrentPostType
} = select(external_wp_editor_namespaceObject.store);
const {
isFeatureActive
} = select(store);
const {
getEntityRecord,
getPostType,
isResolving
} = select(external_wp_coreData_namespaceObject.store);
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
const _postType = initialPost?.type || getCurrentPostType();
return {
isActive: isFeatureActive('fullscreenMode'),
isRequestingSiteIcon: isResolving('getEntityRecord', ['root', '__unstableBase', undefined]),
postType: getPostType(_postType),
siteIconUrl: siteData.site_icon_url
};
}, []);
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'
}
}
};
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));
}
/* harmony default export */ const fullscreen_mode_close = (FullscreenModeClose);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/manage-patterns-menu-item.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01: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
/**
* WordPress dependencies
*/
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
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PreferenceBaseOption
} = unlock(external_wp_preferences_namespaceObject.privateApis);
function submitCustomFieldsForm() {
const customFieldsForm = document.getElementById('toggle-custom-fields-form');
// 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));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-panel.js
/**
* WordPress dependencies
*/
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* Internal dependencies
*/
const {
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));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/meta-boxes-section.js
/**
* WordPress dependencies
*/
Editor: update packages; Port block supports to WordPress core. The following package versions were changed: @wordpress/a11y: 2.11.0 -> 2.13.0 @wordpress/annotations: 1.20.4 -> 1.22.0 @wordpress/api-fetch: 3.18.0 -> 3.20.0 @wordpress/autop: 2.9.0 -> 2.10.0 @wordpress/blob: 2.9.0 -> 2.10.0 @wordpress/block-directory: 1.13.7 -> 1.16.0 @wordpress/block-editor: 4.3.7 -> 5.0.0 @wordpress/block-library: 2.22.7 -> 2.25.0 @wordpress/block-serialization-default-parser: 3.7.0 -> 3.8.0 @wordpress/blocks: 6.20.3 -> 6.23.0 @wordpress/components: 10.0.6 -> 11.0.0 @wordpress/compose: 3.19.3 -> 3.21.0 @wordpress/core-data: 2.20.3 -> 2.23.0 @wordpress/data: 4.22.3 -> 4.24.0 @wordpress/data-controls: 1.16.3 -> 1.18.0 @wordpress/date: 3.10.0 -> 3.12.0 @wordpress/deprecated: 2.9.0 -> 2.10.0 @wordpress/dom: 2.13.1 -> 2.15.0 @wordpress/dom-ready: 2.10.0 -> 2.11.0 @wordpress/e2e-test-utils: 4.11.2 -> 4.14.0 @wordpress/edit-post: 3.21.7 -> 3.24.0 @wordpress/editor: 9.20.7 -> 9.23.0 @wordpress/element: 2.16.0 -> 2.18.0 @wordpress/escape-html: 1.9.0 -> 1.10.0 @wordpress/format-library: 1.22.7 -> 1.24.0 @wordpress/hooks: 2.9.0 -> 2.10.0 @wordpress/html-entities: 2.8.0 -> 2.9.0 @wordpress/i18n: 3.14.0 -> 3.16.0 @wordpress/icons: 2.4.0 -> 2.7.0 @wordpress/is-shallow-equal: 2.1.0 -> 2.3.0 @wordpress/keyboard-shortcuts: 1.9.3 -> 1.11.0 @wordpress/keycodes: 2.14.0 -> 2.16.0 @wordpress/library-export-default-webpack-plugin: 1.7.0 -> 1.9.0 @wordpress/list-reusable-blocks: 1.21.6 -> 1.23.0 @wordpress/media-utils: 1.15.0 -> 1.17.0 @wordpress/notices: 2.8.3 -> 2.10.0 @wordpress/nux: 3.20.6 -> 3.22.0 @wordpress/plugins: 2.20.3 -> 2.22.0 @wordpress/primitives: 1.7.0 -> 1.9.0 @wordpress/priority-queue: 1.7.0 -> 1.9.0 @wordpress/redux-routine: 3.10.0 -> 3.12.0 @wordpress/rich-text: 3.20.4 -> 3.22.0 @wordpress/scripts: 12.1.1 -> 12.3.0 @wordpress/server-side-render: 1.16.6 -> 1.18.0 @wordpress/shortcode: 2.9.0 -> 2.11.0 @wordpress/token-list: 1.11.0 -> 1.13.0 @wordpress/url: 2.17.0 -> 2.19.0 @wordpress/viewport: 2.21.3 -> 2.23.0 @wordpress/warning: 1.2.0 -> 1.3.0 @wordpress/wordcount: 2.10.0 -> 2.12.0 Props isabel_brison, youknowriad, mcsf. Fixes #51461. Built from https://develop.svn.wordpress.org/trunk@49135 git-svn-id: http://core.svn.wordpress.org/trunk@48897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-10-13 15:10:30 +02:00
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* Internal dependencies
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
*/
const {
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}`
})));
}
/* 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));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
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
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/more-menu/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
ToolsMoreMenuGroup,
ViewMoreMenuGroup
} = unlock(external_wp_editor_namespaceObject.privateApis);
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);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/main-dashboard-button/index.js
/**
* WordPress dependencies
*/
const slotName = '__experimentalMainDashboardButton';
const {
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);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/header/index.js
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
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
}) {
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
const {
hasActiveMetaboxes
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
return {
hasActiveMetaboxes: select(store).hasMetaBoxes()
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +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));
}
/* harmony default export */ const header = (Header);
2020-01-08 12:57:23 +01:00
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
2020-01-08 12:57:23 +01:00
/**
* External dependencies
*/
2020-01-08 12:57:23 +01:00
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
2020-01-08 12:57:23 +01:00
/**
* Render metabox area.
*
* @param {Object} props Component props.
* @param {string} props.location metabox location.
* @return {Component} The component to be rendered.
*/
function MetaBoxesArea({
location
}) {
const container = (0,external_wp_element_namespaceObject.useRef)(null);
const formRef = (0,external_wp_element_namespaceObject.useRef)(null);
(0,external_wp_element_namespaceObject.useEffect)(() => {
formRef.current = document.querySelector('.metabox-location-' + location);
if (formRef.current) {
container.current.appendChild(formRef.current);
}
return () => {
if (formRef.current) {
document.querySelector('#metaboxes').appendChild(formRef.current);
}
};
}, [location]);
const isSaving = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(store).isSavingMetaBoxes();
}, []);
const classes = dist_clsx('edit-post-meta-boxes-area', `is-${location}`, {
'is-loading': isSaving
});
return (0,external_React_namespaceObject.createElement)("div", {
className: classes
}, isSaving && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Spinner, null), (0,external_React_namespaceObject.createElement)("div", {
className: "edit-post-meta-boxes-area__container",
ref: container
}), (0,external_React_namespaceObject.createElement)("div", {
className: "edit-post-meta-boxes-area__clear"
}));
}
/* harmony default export */ const meta_boxes_area = (MetaBoxesArea);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
/**
* WordPress dependencies
*/
class MetaBoxVisibility extends external_wp_element_namespaceObject.Component {
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;
}
}
/* harmony default export */ const meta_box_visibility = ((0,external_wp_data_namespaceObject.withSelect)((select, {
id
}) => ({
isVisible: select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(`meta-box-${id}`)
}))(MetaBoxVisibility));
2020-01-08 12:57:23 +01:00
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
2020-01-08 12:57:23 +01: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
/**
* Internal dependencies
2020-01-08 12:57:23 +01:00
*/
function MetaBoxes({
location
}) {
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
} = (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
} = 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
} = 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()
};
}, [location]);
const hasMetaBoxes = !!metaBoxes?.length;
// 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();
}
}, [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
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/image.js
function WelcomeGuideImage({
nonAnimatedSrc,
animatedSrc
}) {
return (0,external_React_namespaceObject.createElement)("picture", {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 10:10:04 +02:00
className: "edit-post-welcome-guide__image"
}, (0,external_React_namespaceObject.createElement)("source", {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 10:10:04 +02:00
srcSet: nonAnimatedSrc,
media: "(prefers-reduced-motion: reduce)"
}), (0,external_React_namespaceObject.createElement)("img", {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 10:10:04 +02:00
src: animatedSrc,
width: "312",
height: "240",
alt: ""
}));
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/default.js
/**
* WordPress dependencies
*/
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* Internal dependencies
*/
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
function WelcomeGuideDefault() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
className: "edit-post-welcome-guide",
contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the block editor'),
finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
onFinish: () => toggleFeature('welcomeGuide'),
pages: [{
image: (0,external_React_namespaceObject.createElement)(WelcomeGuideImage, {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
}),
content: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h1", {
className: "edit-post-welcome-guide__heading"
}, (0,external_wp_i18n_namespaceObject.__)('Welcome to the block editor')), (0,external_React_namespaceObject.createElement)("p", {
className: "edit-post-welcome-guide__text"
}, (0,external_wp_i18n_namespaceObject.__)('In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.')))
}, {
image: (0,external_React_namespaceObject.createElement)(WelcomeGuideImage, {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
}),
content: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h1", {
className: "edit-post-welcome-guide__heading"
}, (0,external_wp_i18n_namespaceObject.__)('Make each block your own')), (0,external_React_namespaceObject.createElement)("p", {
className: "edit-post-welcome-guide__text"
}, (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.')))
}, {
image: (0,external_React_namespaceObject.createElement)(WelcomeGuideImage, {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
}),
content: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h1", {
className: "edit-post-welcome-guide__heading"
}, (0,external_wp_i18n_namespaceObject.__)('Get to know the block library')), (0,external_React_namespaceObject.createElement)("p", {
className: "edit-post-welcome-guide__text"
}, (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. Youll find it wherever you see the <InserterIconImage /> icon.'), {
InserterIconImage: (0,external_React_namespaceObject.createElement)("img", {
alt: (0,external_wp_i18n_namespaceObject.__)('inserter'),
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
})
})))
}, {
image: (0,external_React_namespaceObject.createElement)(WelcomeGuideImage, {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
}),
content: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h1", {
className: "edit-post-welcome-guide__heading"
}, (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor')), (0,external_React_namespaceObject.createElement)("p", {
className: "edit-post-welcome-guide__text"
}, (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, {
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/')
}, (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide."))))
}]
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/template.js
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* WordPress dependencies
*/
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* Internal dependencies
*/
function WelcomeGuideTemplate() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.Guide, {
className: "edit-template-welcome-guide",
contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the template editor'),
finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
onFinish: () => toggleFeature('welcomeGuideTemplate'),
pages: [{
image: (0,external_React_namespaceObject.createElement)(WelcomeGuideImage, {
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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"
}),
content: (0,external_React_namespaceObject.createElement)(external_React_namespaceObject.Fragment, null, (0,external_React_namespaceObject.createElement)("h1", {
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
className: "edit-post-welcome-guide__heading"
}, (0,external_wp_i18n_namespaceObject.__)('Welcome to the template editor')), (0,external_React_namespaceObject.createElement)("p", {
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
className: "edit-post-welcome-guide__text"
}, (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.')))
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
}]
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* WordPress dependencies
*/
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
/**
* Internal dependencies
*/
function WelcomeGuide() {
const {
isActive,
isEditingTemplate
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
const {
isFeatureActive
} = select(store);
const {
getCurrentPostType
} = select(external_wp_editor_namespaceObject.store);
const _isEditingTemplate = getCurrentPostType() === 'wp_template';
const feature = _isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide';
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
return {
isActive: isFeatureActive(feature),
isEditingTemplate: _isEditingTemplate
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
};
}, []);
if (!isActive) {
return null;
}
return isEditingTemplate ? (0,external_React_namespaceObject.createElement)(WelcomeGuideTemplate, null) : (0,external_React_namespaceObject.createElement)(WelcomeGuideDefault, null);
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-left.js
/**
* WordPress dependencies
*/
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);
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/drawer-right.js
/**
* WordPress dependencies
*/
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);
;// 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"
}));
/* harmony default export */ const block_default = (blockDefault);
;// 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"
}));
/* harmony default export */ const library_fullscreen = (fullscreen);
;// 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"
}));
/* harmony default export */ const format_list_bullets = (formatListBullets);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/commands/use-common-commands.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
interfaceStore: use_common_commands_interfaceStore
} = unlock(external_wp_editor_namespaceObject.privateApis);
function useCommonCommands() {
const {
openGeneralSidebar,
closeGeneralSidebar
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
activeSidebar,
isFullscreen,
isPublishSidebarEnabled
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
get
} = select(external_wp_preferences_namespaceObject.store);
return {
activeSidebar: select(use_common_commands_interfaceStore).getActiveComplementaryArea('core'),
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'),
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');
}
}
});
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/open-block-inspector',
label: (0,external_wp_i18n_namespaceObject.__)('Toggle block inspector'),
icon: block_default,
callback: ({
close
}) => {
close();
if (activeSidebar === 'edit-post/block') {
closeGeneralSidebar();
} else {
openGeneralSidebar('edit-post/block');
}
}
});
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/toggle-fullscreen-mode',
label: isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Exit fullscreen') : (0,external_wp_i18n_namespaceObject.__)('Enter fullscreen'),
icon: library_fullscreen,
callback: ({
close
}) => {
toggle('core/edit-post', 'fullscreenMode');
close();
createInfoNotice(isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Fullscreen off.') : (0,external_wp_i18n_namespaceObject.__)('Fullscreen on.'), {
id: 'core/edit-post/toggle-fullscreen-mode/notice',
type: 'snackbar',
actions: [{
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
onClick: () => {
toggle('core/edit-post', 'fullscreenMode');
}
}]
});
}
});
(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();
toggle('core', 'isPublishSidebarEnabled');
createInfoNotice(isPublishSidebarEnabled ? (0,external_wp_i18n_namespaceObject.__)('Pre-publish checks disabled.') : (0,external_wp_i18n_namespaceObject.__)('Pre-publish checks enabled.'), {
id: 'core/editor/publish-sidebar/notice',
type: 'snackbar'
});
}
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
/**
* External dependencies
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
*/
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
/**
* WordPress dependencies
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
/**
* Internal dependencies
*/
const {
getLayoutStyles
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const {
useCommands
} = unlock(external_wp_coreCommands_namespaceObject.privateApis);
const {
useCommandContext
} = unlock(external_wp_commands_namespaceObject.privateApis);
const {
InserterSidebar,
ListViewSidebar,
ComplementaryArea,
FullscreenMode,
SavePublishPanels,
InterfaceSkeleton,
interfaceStore: layout_interfaceStore,
Sidebar
} = unlock(external_wp_editor_namespaceObject.privateApis);
const {
BlockKeyboardShortcuts
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
const interfaceLabels = {
/* translators: accessibility text for the editor top bar landmark region. */
header: (0,external_wp_i18n_namespaceObject.__)('Editor top bar'),
/* translators: accessibility text for the editor content landmark region. */
body: (0,external_wp_i18n_namespaceObject.__)('Editor content'),
/* translators: accessibility text for the editor settings landmark region. */
sidebar: (0,external_wp_i18n_namespaceObject.__)('Editor settings'),
/* translators: accessibility text for the editor publish landmark region. */
actions: (0,external_wp_i18n_namespaceObject.__)('Editor publish'),
/* translators: accessibility text for the editor footer landmark region. */
footer: (0,external_wp_i18n_namespaceObject.__)('Editor footer')
};
function useEditorStyles() {
const {
hasThemeStyleSupport,
editorSettings
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'),
editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings()
}), []);
// Compute the default styles.
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 : [];
const defaultEditorStyles = [...editorSettings.defaultEditorStyles, ...presetStyles];
// 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);
// If theme styles are not present or displayed, ensure that
// base layout styles are still present in the editor.
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]);
}
function Layout({
initialPost
}) {
useCommands();
useCommonCommands();
const isMobileViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium', '<');
const isWideViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('large');
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('medium');
const {
closeGeneralSidebar
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
createErrorNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const {
mode,
isFullscreenActive,
isRichEditingEnabled,
sidebarIsOpened,
hasActiveMetaboxes,
previousShortcut,
nextShortcut,
hasBlockSelected,
isInserterOpened,
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
isListViewOpened,
showIconLabels,
isDistractionFree,
Block Editor: Update packages and backport the latest Gutenberg fixes. This includes the following fixes: - Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279 - Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063 - Template mode: - Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057 - Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026 - Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076 - Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315 - Update the title area https://github.com/WordPress/gutenberg/pull/32037 - Widgets Screen: - Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757 - Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991 - Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212 - Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262 - Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140 - Fix styling issues https://github.com/WordPress/gutenberg/pull/32072 - Fix escape key events https://github.com/WordPress/gutenberg/pull/32175 - Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259 - Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005 - Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302 - Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006 - Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046 - Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070 - Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102 - Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152 - Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159 - Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160 - Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190 - Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200 - Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229 - Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245 - Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266 - Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305 - Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343 - Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-06-01 10:10:04 +02:00
showBlockBreadcrumbs,
showMetaBoxes,
documentLabel,
hasHistory,
hasBlockBreadcrumbs,
blockEditorMode,
isEditingTemplate
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
get
} = select(external_wp_preferences_namespaceObject.store);
const {
getEditorSettings,
getPostTypeLabel
} = select(external_wp_editor_namespaceObject.store);
const editorSettings = getEditorSettings();
const postTypeLabel = getPostTypeLabel();
return {
showMetaBoxes: select(external_wp_editor_namespaceObject.store).getRenderingMode() === 'post-only',
sidebarIsOpened: !!(select(layout_interfaceStore).getActiveComplementaryArea('core') || select(external_wp_editor_namespaceObject.store).isPublishSidebarOpened()),
isFullscreenActive: select(store).isFeatureActive('fullscreenMode'),
isInserterOpened: select(external_wp_editor_namespaceObject.store).isInserterOpened(),
isListViewOpened: select(external_wp_editor_namespaceObject.store).isListViewOpened(),
mode: select(external_wp_editor_namespaceObject.store).getEditorMode(),
isRichEditingEnabled: editorSettings.richEditingEnabled,
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'),
showIconLabels: get('core', 'showIconLabels'),
isDistractionFree: get('core', 'distractionFree'),
showBlockBreadcrumbs: get('core', 'showBlockBreadcrumbs'),
// translators: Default label for the Document in the Block Breadcrumb.
documentLabel: postTypeLabel || (0,external_wp_i18n_namespaceObject._x)('Document', 'noun'),
hasBlockSelected: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
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'
};
}, []);
// Set the right context for the command palette
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'post-editor-edit';
useCommandContext(commandContext);
const styles = useEditorStyles();
// Local state for save panel.
// Note 'truthy' callback implies an open panel.
const [entitiesSavedStatesCallback, setEntitiesSavedStatesCallback] = (0,external_wp_element_namespaceObject.useState)(false);
const closeEntitiesSavedStates = (0,external_wp_element_namespaceObject.useCallback)(arg => {
if (typeof entitiesSavedStatesCallback === 'function') {
entitiesSavedStatesCallback(arg);
}
setEntitiesSavedStatesCallback(false);
}, [entitiesSavedStatesCallback]);
// 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');
}
const className = dist_clsx('edit-post-layout', 'is-mode-' + mode, {
Update the WP packages with fixes prior to WP 6.2 beta 3 Includes the following changes: - Upgrade Playwright to 1.30.0 - [Block Editor - Inserter]: preload media categories empty check - client side - Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector - Fix: OffCanvasEditor does not inserts submenu on collapsed items. - OffCanvasEditor: Only allow some blocks to be converted to submenus - Navigation: Updates "Add Submenu item" text to "Add Submenu link" - Update: Make OffCanvasEditor use LeafMoreMenu by default. - Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet() - Widget Editor: Fix a problem with 'Move to Widget Area' button not working - Reusable Blocks: Use React 18 rendering for import dropdown - useAsyncList: flush state updates when processing queue - Refactor the site editor URLs for better backward compatibility - Template editor: only disable the save button if no changes rather than hiding it - [Quote]: Fix deprectated large style specificity rule - Style Book: Allow button text labels for style book icon - List View: Scroll selected block into view when single block selection changes - Post editor: revert iframed editor for WP core only - Fix the Publish region position and focus style. - Remove "& Shadow" from the Border ScreenHeader title - Site editor: specify focus state color for template navigation button References: [https://github.com/WordPress/gutenberg/commit/1e2b2f680c6378f789d6660bc04b30e35e3a33a3 Gutenberg's commit for publishing the packages] Props ntsekouras, ellatrix. See #57471. Built from https://develop.svn.wordpress.org/trunk@55392 git-svn-id: http://core.svn.wordpress.org/trunk@54925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 14:09:42 +01:00
'is-sidebar-opened': sidebarIsOpened,
'has-metaboxes': hasActiveMetaboxes,
'is-distraction-free': isDistractionFree && isWideViewport,
'is-entity-save-view-open': !!entitiesSavedStatesCallback,
'has-block-breadcrumbs': hasBlockBreadcrumbs && !isDistractionFree && isWideViewport
Update the WP packages with fixes prior to WP 6.2 beta 3 Includes the following changes: - Upgrade Playwright to 1.30.0 - [Block Editor - Inserter]: preload media categories empty check - client side - Navigation: Fixes undo and redo for nesting operations in the navigation block's inspector - Fix: OffCanvasEditor does not inserts submenu on collapsed items. - OffCanvasEditor: Only allow some blocks to be converted to submenus - Navigation: Updates "Add Submenu item" text to "Add Submenu link" - Update: Make OffCanvasEditor use LeafMoreMenu by default. - Template Part: Performance: Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet() - Widget Editor: Fix a problem with 'Move to Widget Area' button not working - Reusable Blocks: Use React 18 rendering for import dropdown - useAsyncList: flush state updates when processing queue - Refactor the site editor URLs for better backward compatibility - Template editor: only disable the save button if no changes rather than hiding it - [Quote]: Fix deprectated large style specificity rule - Style Book: Allow button text labels for style book icon - List View: Scroll selected block into view when single block selection changes - Post editor: revert iframed editor for WP core only - Fix the Publish region position and focus style. - Remove "& Shadow" from the Border ScreenHeader title - Site editor: specify focus state color for template navigation button References: [https://github.com/WordPress/gutenberg/commit/1e2b2f680c6378f789d6660bc04b30e35e3a33a3 Gutenberg's commit for publishing the packages] Props ntsekouras, ellatrix. See #57471. Built from https://develop.svn.wordpress.org/trunk@55392 git-svn-id: http://core.svn.wordpress.org/trunk@54925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-21 14:09:42 +01:00
});
const secondarySidebarLabel = isListViewOpened ? (0,external_wp_i18n_namespaceObject.__)('Document Overview') : (0,external_wp_i18n_namespaceObject.__)('Block Library');
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
const secondarySidebar = () => {
if (mode === 'visual' && isInserterOpened) {
return (0,external_React_namespaceObject.createElement)(InserterSidebar, {
closeGeneralSidebar: closeGeneralSidebar,
isRightSidebarOpen: sidebarIsOpened
});
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
}
if (mode === 'visual' && isListViewOpened) {
return (0,external_React_namespaceObject.createElement)(ListViewSidebar, null);
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
}
return null;
};
function onPluginAreaError(name) {
createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */
(0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
}
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, {
isActive: isFullscreenActive
}), (0,external_React_namespaceObject.createElement)(browser_url, {
hasHistory: hasHistory
}), (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, {
isDistractionFree: isDistractionFree && isWideViewport,
className: className,
labels: {
...interfaceLabels,
secondarySidebar: secondarySidebarLabel
},
header: (0,external_React_namespaceObject.createElement)(header, {
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
initialPost: initialPost
}),
editorNotices: (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.EditorNotices, null),
Block Editor: Updated the WordPress packages from Gutenberg 10.7.0 RC. This also includes: - The removal of the Post Author block. - Renaming build_query_vars_from_query_block function. - Update the block supports. Props gziolo. See #52991. -This line, and those below, will be ignored-- M package-lock.json M package.json M src/wp-includes/assets/script-loader-packages.php M src/wp-includes/block-supports/colors.php AM src/wp-includes/block-supports/elements.php D src/wp-includes/block-supports/padding.php AM src/wp-includes/block-supports/spacing.php M src/wp-includes/block-supports/typography.php M src/wp-includes/blocks/column/block.json M src/wp-includes/blocks/index.php D src/wp-includes/blocks/post-author D src/wp-includes/blocks/post-author.php M src/wp-includes/blocks/post-content.php M src/wp-includes/blocks/post-featured-image.php M src/wp-includes/blocks/query/block.json M src/wp-includes/blocks/query-loop/block.json M src/wp-includes/blocks/query-loop.php M src/wp-includes/blocks/query-pagination/block.json M src/wp-includes/blocks/query-pagination-next.php M src/wp-includes/blocks/query-pagination-numbers.php M src/wp-includes/blocks/site-tagline/block.json M src/wp-includes/blocks/site-title/block.json M src/wp-includes/blocks.php M src/wp-settings.php M tests/phpunit/tests/blocks/block.php M tools/webpack/packages.js Built from https://develop.svn.wordpress.org/trunk@50945 git-svn-id: http://core.svn.wordpress.org/trunk@50554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-05-21 12:14:23 +02:00
secondarySidebar: secondarySidebar(),
sidebar: !isDistractionFree && (0,external_React_namespaceObject.createElement)(ComplementaryArea.Slot, {
scope: "core"
}),
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, {
styles: styles
}), !isDistractionFree && showMetaBoxes && (0,external_React_namespaceObject.createElement)("div", {
className: "edit-post-layout__metaboxes"
}, (0,external_React_namespaceObject.createElement)(MetaBoxes, {
location: "normal"
}), (0,external_React_namespaceObject.createElement)(MetaBoxes, {
location: "advanced"
})), isMobileViewport && sidebarIsOpened && (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.ScrollLock, null)),
footer: !isDistractionFree && !isMobileViewport && showBlockBreadcrumbs && isRichEditingEnabled && blockEditorMode !== 'zoom-out' && mode === 'visual' && (0,external_React_namespaceObject.createElement)("div", {
className: "edit-post-layout__footer"
}, (0,external_React_namespaceObject.createElement)(external_wp_blockEditor_namespaceObject.BlockBreadcrumb, {
rootLabelText: documentLabel
})),
actions: (0,external_React_namespaceObject.createElement)(SavePublishPanels, {
closeEntitiesSavedStates: closeEntitiesSavedStates,
isEntitiesSavedStatesOpen: entitiesSavedStatesCallback,
setEntitiesSavedStatesCallback: setEntitiesSavedStatesCallback,
forceIsDirtyPublishPanel: hasActiveMetaboxes
}),
shortcuts: {
previous: previousShortcut,
next: nextShortcut
}
}), (0,external_React_namespaceObject.createElement)(WelcomeGuide, null), (0,external_React_namespaceObject.createElement)(InitPatternModal, null), (0,external_React_namespaceObject.createElement)(external_wp_plugins_namespaceObject.PluginArea, {
onError: onPluginAreaError
}), !isDistractionFree && (0,external_React_namespaceObject.createElement)(Sidebar, {
onActionPerformed: onActionPerformed,
extraPanels: !isEditingTemplate && (0,external_React_namespaceObject.createElement)(MetaBoxes, {
location: "side"
})
}));
}
/* harmony default export */ const layout = (Layout);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.3 - @wordpress/a11y@2.2.0 - @wordpress/annotations@1.2.0 - @wordpress/api-fetch@3.1.0 - @wordpress/autop@2.2.0 - @wordpress/babel-plugin-import-jsx-pragma@2.1.0 - @wordpress/babel-preset-default@4.1.0 - @wordpress/blob@2.3.0 - @wordpress/block-editor@1.1.0 - @wordpress/block-library@2.4.0 - @wordpress/block-serialization-default-parser@3.1.0 - @wordpress/blocks@6.2.0 - @wordpress/components@7.2.0 - @wordpress/compose@3.2.0 - @wordpress/core-data@2.2.0 - @wordpress/data@4.4.0 - @wordpress/date@3.2.0 - @wordpress/deprecated@2.2.0 - @wordpress/docgen@1.1.0 - @wordpress/dom-ready@2.2.0 - @wordpress/dom@2.2.0 - @wordpress/e2e-test-utils@1.1.0 - @wordpress/e2e-tests@1.1.0 - @wordpress/edit-post@3.3.0 - @wordpress/edit-widgets@0.2.0 - @wordpress/editor@9.2.0 - @wordpress/element@2.3.0 - @wordpress/escape-html@1.2.0 - @wordpress/eslint-plugin@2.1.0 - @wordpress/format-library@1.4.0 - @wordpress/hooks@2.2.0 - @wordpress/html-entities@2.2.0 - @wordpress/i18n@3.3.0 - @wordpress/keycodes@2.2.0 - @wordpress/list-reusable-blocks@1.3.0 - @wordpress/notices@1.3.0 - @wordpress/nux@3.2.0 - @wordpress/plugins@2.2.0 - @wordpress/priority-queue@1.1.0 - @wordpress/redux-routine@3.2.0 - @wordpress/rich-text@3.2.0 - @wordpress/scripts@3.1.0 - @wordpress/shortcode@2.2.0 - @wordpress/url@2.5.0 - @wordpress/viewport@2.3.0 - @wordpress/wordcount@2.2.0 Built from https://develop.svn.wordpress.org/trunk@44960 git-svn-id: http://core.svn.wordpress.org/trunk@44791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-21 13:48:00 +01:00
/**
* Internal dependencies
*/
/**
* This listener hook monitors any change in permalink and updates the view
* post link in the admin bar.
*/
const useUpdatePostLinkListener = () => {
const {
newPermalink
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
newPermalink: select(external_wp_editor_namespaceObject.store).getCurrentPost().link
}), []);
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);
}, []);
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (!newPermalink || !nodeToUpdate.current) {
return;
}
nodeToUpdate.current.setAttribute('href', newPermalink);
}, [newPermalink]);
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
/**
* Internal dependencies
*/
/**
* 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.
*/
function EditorInitialization() {
useUpdatePostLinkListener();
return null;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/use-navigate-to-entity-record.js
/**
* WordPress dependencies
*/
/**
* 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.
*
* @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.
*
* @return {Object} An object containing the `currentPost` variable and
* `onNavigateToEntityRecord` and `onNavigateToPreviousEntityRecord` functions.
*/
function useNavigateToEntityRecord(initialPostId, initialPostType, defaultRenderingMode) {
const [postHistory, dispatch] = (0,external_wp_element_namespaceObject.useReducer)((historyState, {
type,
post,
previousRenderingMode
}) => {
if (type === 'push') {
return [...historyState, {
post,
previousRenderingMode
}];
}
if (type === 'pop') {
// Try to leave one item in the history.
if (historyState.length > 1) {
return historyState.slice(0, -1);
}
}
return historyState;
}, [{
post: {
postId: initialPostId,
postType: initialPostType
}
}]);
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);
const onNavigateToEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(params => {
dispatch({
type: 'push',
post: {
postId: params.postId,
postType: params.postType
},
// Save the current rendering mode so we can restore it when navigating back.
previousRenderingMode: getRenderingMode()
});
setRenderingMode(defaultRenderingMode);
}, [getRenderingMode, setRenderingMode, defaultRenderingMode]);
const onNavigateToPreviousEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(() => {
dispatch({
type: 'pop'
});
if (previousRenderingMode) {
setRenderingMode(previousRenderingMode);
}
}, [setRenderingMode, previousRenderingMode]);
return {
currentPost: post,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord: postHistory.length > 1 ? onNavigateToPreviousEntityRecord : undefined
};
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
/**
* Internal dependencies
*/
const {
ExperimentalEditorProvider
Editor: Update @wordpress packages for 6.2 Beta 2. Updates the `@wordpress` packages to include the following changes: - Add missing period in keyboard shortcut descriptions - Site Editor: Append template type and name to the site editor page title - Specify active color state for template navigation button - Global Styles: Move more link about custom CSS to part of description - ToolsPanel: Display optional items when values are updated externally - File block: Re-add editor styles for classic themes - Enable undo after creating a new menu - Style Book: Exclude blocks that are not allowed to insert - Add basic tsconfig.json validation - Fix Experiments native variant breakage - Update moment and moment-timezone packages to fix timezone issues - NavigatorButton: Reuse Button types - ToolsPanel: Ensure display of optional items when panel id is null - ColorPalette: Ensure text label contrast checking works with CSS variables - Components: Add support for named arguments in the navigator components - Rename experiments package to private-apis - Cherry-pick CLI: Fix the default label to match the documentation - Handle block metadata attribute and related experimental APIs - Fix: Remove browser default border for iframe in the editor - [Layout]: Fix align controls for hybrid themes - Visual Regression tests: use default playwright utils - SelectControl: Fix multiple prop styling - Fix clicking on the toggle button not closing the block inserter - Update deps for the useEffect that creates navigation menus - Minor updates in Private APIs docs - Site Editor: Fix custom Template Parts rename action - [Block Library - Cover]: Ensure url is not malformed due to sanitization through wp_kses - Revert "Prevent the image from being resized larger than its container" - Lodash: Remove from @wordpress/keycodes package - Distraction free mode: Fix keyboard shortcut not working - Popover: lock the __experimentalPopoverPositionToPlacement function - Rename the "experiments" export to "privateApis" - Add an aria label to the site save dialog - Navigator: add more pattern matching tests, refine existing tests - Add parent navigation support for the navigator component - Add back link to Design heading in site editor navigation to return to Dashboard - Add a nested level when selecting templates or template parts - Move site editor 6.2 specific code to the right file - Fix site editor navigation References: * [https://github.com/WordPress/gutenberg/commit/1bf01c01a8238ce3a681ad1e517f86033818b78d Gutenberg's commit for publishing the packages] Follow-up to [55257]. Props ntsekouras. See #57471. Built from https://develop.svn.wordpress.org/trunk@55333 git-svn-id: http://core.svn.wordpress.org/trunk@54866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-14 16:44:36 +01:00
} = unlock(external_wp_editor_namespaceObject.privateApis);
function Editor({
postId: initialPostId,
postType: initialPostType,
settings,
initialEdits,
...props
}) {
const {
currentPost,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord
} = useNavigateToEntityRecord(initialPostId, initialPostType, 'post-only');
const {
post,
template
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _getPostType$viewable;
const {
getEditedPostTemplate
} = select(store);
const {
getEntityRecord,
getPostType,
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
canUser
} = select(external_wp_coreData_namespaceObject.store);
const {
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const postObject = getEntityRecord('postType', currentPost.postType, currentPost.postId);
const supportsTemplateMode = getEditorSettings().supportsTemplateMode;
const isViewable = (_getPostType$viewable = getPostType(currentPost.postType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
const canViewTemplate = canUser('read', 'templates');
return {
template: supportsTemplateMode && isViewable && canViewTemplate && currentPost.postType !== 'wp_template' ? getEditedPostTemplate() : null,
post: postObject
};
}, [currentPost.postType, currentPost.postId]);
const editorSettings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
...settings,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord,
defaultRenderingMode: 'post-only'
}), [settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord]);
const initialPost = (0,external_wp_element_namespaceObject.useMemo)(() => {
return {
type: initialPostType,
id: initialPostId
};
}, [initialPostType, initialPostId]);
if (!post) {
return null;
}
return (0,external_React_namespaceObject.createElement)(external_wp_components_namespaceObject.SlotFillProvider, null, (0,external_React_namespaceObject.createElement)(ExperimentalEditorProvider, {
settings: editorSettings,
post: post,
initialEdits: initialEdits,
useSubRegistry: false,
__unstableTemplate: template,
...props
}, (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, {
initialPost: initialPost
})), (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PostLockedModal, null)));
}
/* harmony default export */ const editor = (Editor);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/deprecated.js
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.5.1 -> 2.6.0 @wordpress/annotations: 1.9.0 -> 1.10.0 @wordpress/api-fetch: 3.8.0 -> 3.9.0 @wordpress/blob: 2.5.1 -> 2.6.0 @wordpress/block-directory: 1.2.0 -> 1.3.0 @wordpress/block-editor: 3.4.0 -> 3.5.0 @wordpress/block-library: 2.11.0 -> 2.12.0 @wordpress/blocks: 6.9.0 -> 6.10.0 @wordpress/components: 8.5.0 -> 9.0.0 @wordpress/compose: 3.9.0 -> 3.10.0 @wordpress/core-data: 2.9.0 -> 2.10.0 @wordpress/data: 4.11.0 -> 4.12.0 @wordpress/data-controls: 1.5.0 -> 1.6.0 @wordpress/dom: 2.6.0 -> 2.7.0 @wordpress/dom-ready: 2.5.1 -> 2.6.0 @wordpress/e2e-test-utils: 4.0.0 -> 4.1.0 @wordpress/edit-post: 3.10.0 -> 3.11.0 @wordpress/editor: 9.9.0 -> 9.10.0 @wordpress/format-library: 1.11.0 -> 1.12.0 @wordpress/i18n: 3.7.0 -> 3.8.0 @wordpress/is-shallow-equal: 1.6.1 -> 1.7.0 @wordpress/keycodes: 2.7.0 -> 2.8.0 @wordpress/list-reusable-blocks: 1.10.0 -> 1.11.0 @wordpress/media-utils: 1.4.0 -> 1.5.0 @wordpress/notices: 1.10.0 -> 1.11.0 @wordpress/nux: 3.9.0 -> 3.10.0 @wordpress/plugins: 2.9.0 -> 2.10.0 @wordpress/priority-queue: 1.3.1 -> 1.4.0 @wordpress/rich-text: 3.9.0 -> 3.10.0 @wordpress/scripts: 6.1.1 -> 6.2.0 @wordpress/server-side-render: 1.5.0 -> 1.6.0 @wordpress/viewport: 2.10.0 -> 2.11.0 The following package was added: @wordpress/keyboard-shortcuts Props gziolo. Fixes #49204. Built from https://develop.svn.wordpress.org/trunk@47106 git-svn-id: http://core.svn.wordpress.org/trunk@46906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 23:06:21 +01:00
/**
* WordPress dependencies
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.5.1 -> 2.6.0 @wordpress/annotations: 1.9.0 -> 1.10.0 @wordpress/api-fetch: 3.8.0 -> 3.9.0 @wordpress/blob: 2.5.1 -> 2.6.0 @wordpress/block-directory: 1.2.0 -> 1.3.0 @wordpress/block-editor: 3.4.0 -> 3.5.0 @wordpress/block-library: 2.11.0 -> 2.12.0 @wordpress/blocks: 6.9.0 -> 6.10.0 @wordpress/components: 8.5.0 -> 9.0.0 @wordpress/compose: 3.9.0 -> 3.10.0 @wordpress/core-data: 2.9.0 -> 2.10.0 @wordpress/data: 4.11.0 -> 4.12.0 @wordpress/data-controls: 1.5.0 -> 1.6.0 @wordpress/dom: 2.6.0 -> 2.7.0 @wordpress/dom-ready: 2.5.1 -> 2.6.0 @wordpress/e2e-test-utils: 4.0.0 -> 4.1.0 @wordpress/edit-post: 3.10.0 -> 3.11.0 @wordpress/editor: 9.9.0 -> 9.10.0 @wordpress/format-library: 1.11.0 -> 1.12.0 @wordpress/i18n: 3.7.0 -> 3.8.0 @wordpress/is-shallow-equal: 1.6.1 -> 1.7.0 @wordpress/keycodes: 2.7.0 -> 2.8.0 @wordpress/list-reusable-blocks: 1.10.0 -> 1.11.0 @wordpress/media-utils: 1.4.0 -> 1.5.0 @wordpress/notices: 1.10.0 -> 1.11.0 @wordpress/nux: 3.9.0 -> 3.10.0 @wordpress/plugins: 2.9.0 -> 2.10.0 @wordpress/priority-queue: 1.3.1 -> 1.4.0 @wordpress/rich-text: 3.9.0 -> 3.10.0 @wordpress/scripts: 6.1.1 -> 6.2.0 @wordpress/server-side-render: 1.5.0 -> 1.6.0 @wordpress/viewport: 2.10.0 -> 2.11.0 The following package was added: @wordpress/keyboard-shortcuts Props gziolo. Fixes #49204. Built from https://develop.svn.wordpress.org/trunk@47106 git-svn-id: http://core.svn.wordpress.org/trunk@46906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 23:06:21 +01:00
*/
/**
* Internal dependencies
*/
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 */
/**
* @see PluginBlockSettingsMenuItem in @wordpress/editor package.
*/
function PluginBlockSettingsMenuItem(props) {
deprecateSlot('PluginBlockSettingsMenuItem');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginBlockSettingsMenuItem, {
...props
});
}
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.5.1 -> 2.6.0 @wordpress/annotations: 1.9.0 -> 1.10.0 @wordpress/api-fetch: 3.8.0 -> 3.9.0 @wordpress/blob: 2.5.1 -> 2.6.0 @wordpress/block-directory: 1.2.0 -> 1.3.0 @wordpress/block-editor: 3.4.0 -> 3.5.0 @wordpress/block-library: 2.11.0 -> 2.12.0 @wordpress/blocks: 6.9.0 -> 6.10.0 @wordpress/components: 8.5.0 -> 9.0.0 @wordpress/compose: 3.9.0 -> 3.10.0 @wordpress/core-data: 2.9.0 -> 2.10.0 @wordpress/data: 4.11.0 -> 4.12.0 @wordpress/data-controls: 1.5.0 -> 1.6.0 @wordpress/dom: 2.6.0 -> 2.7.0 @wordpress/dom-ready: 2.5.1 -> 2.6.0 @wordpress/e2e-test-utils: 4.0.0 -> 4.1.0 @wordpress/edit-post: 3.10.0 -> 3.11.0 @wordpress/editor: 9.9.0 -> 9.10.0 @wordpress/format-library: 1.11.0 -> 1.12.0 @wordpress/i18n: 3.7.0 -> 3.8.0 @wordpress/is-shallow-equal: 1.6.1 -> 1.7.0 @wordpress/keycodes: 2.7.0 -> 2.8.0 @wordpress/list-reusable-blocks: 1.10.0 -> 1.11.0 @wordpress/media-utils: 1.4.0 -> 1.5.0 @wordpress/notices: 1.10.0 -> 1.11.0 @wordpress/nux: 3.9.0 -> 3.10.0 @wordpress/plugins: 2.9.0 -> 2.10.0 @wordpress/priority-queue: 1.3.1 -> 1.4.0 @wordpress/rich-text: 3.9.0 -> 3.10.0 @wordpress/scripts: 6.1.1 -> 6.2.0 @wordpress/server-side-render: 1.5.0 -> 1.6.0 @wordpress/viewport: 2.10.0 -> 2.11.0 The following package was added: @wordpress/keyboard-shortcuts Props gziolo. Fixes #49204. Built from https://develop.svn.wordpress.org/trunk@47106 git-svn-id: http://core.svn.wordpress.org/trunk@46906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 23:06:21 +01:00
/**
* @see PluginDocumentSettingPanel in @wordpress/editor package.
*/
function PluginDocumentSettingPanel(props) {
deprecateSlot('PluginDocumentSettingPanel');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginDocumentSettingPanel, {
...props
});
}
/**
* @see PluginMoreMenuItem in @wordpress/editor package.
*/
function PluginMoreMenuItem(props) {
deprecateSlot('PluginMoreMenuItem');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginMoreMenuItem, {
...props
});
}
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.5.1 -> 2.6.0 @wordpress/annotations: 1.9.0 -> 1.10.0 @wordpress/api-fetch: 3.8.0 -> 3.9.0 @wordpress/blob: 2.5.1 -> 2.6.0 @wordpress/block-directory: 1.2.0 -> 1.3.0 @wordpress/block-editor: 3.4.0 -> 3.5.0 @wordpress/block-library: 2.11.0 -> 2.12.0 @wordpress/blocks: 6.9.0 -> 6.10.0 @wordpress/components: 8.5.0 -> 9.0.0 @wordpress/compose: 3.9.0 -> 3.10.0 @wordpress/core-data: 2.9.0 -> 2.10.0 @wordpress/data: 4.11.0 -> 4.12.0 @wordpress/data-controls: 1.5.0 -> 1.6.0 @wordpress/dom: 2.6.0 -> 2.7.0 @wordpress/dom-ready: 2.5.1 -> 2.6.0 @wordpress/e2e-test-utils: 4.0.0 -> 4.1.0 @wordpress/edit-post: 3.10.0 -> 3.11.0 @wordpress/editor: 9.9.0 -> 9.10.0 @wordpress/format-library: 1.11.0 -> 1.12.0 @wordpress/i18n: 3.7.0 -> 3.8.0 @wordpress/is-shallow-equal: 1.6.1 -> 1.7.0 @wordpress/keycodes: 2.7.0 -> 2.8.0 @wordpress/list-reusable-blocks: 1.10.0 -> 1.11.0 @wordpress/media-utils: 1.4.0 -> 1.5.0 @wordpress/notices: 1.10.0 -> 1.11.0 @wordpress/nux: 3.9.0 -> 3.10.0 @wordpress/plugins: 2.9.0 -> 2.10.0 @wordpress/priority-queue: 1.3.1 -> 1.4.0 @wordpress/rich-text: 3.9.0 -> 3.10.0 @wordpress/scripts: 6.1.1 -> 6.2.0 @wordpress/server-side-render: 1.5.0 -> 1.6.0 @wordpress/viewport: 2.10.0 -> 2.11.0 The following package was added: @wordpress/keyboard-shortcuts Props gziolo. Fixes #49204. Built from https://develop.svn.wordpress.org/trunk@47106 git-svn-id: http://core.svn.wordpress.org/trunk@46906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 23:06:21 +01:00
/**
* @see PluginPrePublishPanel in @wordpress/editor package.
*/
function PluginPrePublishPanel(props) {
deprecateSlot('PluginPrePublishPanel');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginPrePublishPanel, {
...props
});
}
/**
* @see PluginPostPublishPanel in @wordpress/editor package.
*/
function PluginPostPublishPanel(props) {
deprecateSlot('PluginPostPublishPanel');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginPostPublishPanel, {
...props
});
}
/**
* @see PluginPostStatusInfo in @wordpress/editor package.
*/
function PluginPostStatusInfo(props) {
deprecateSlot('PluginPostStatusInfo');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginPostStatusInfo, {
...props
});
}
/**
* @see PluginSidebar in @wordpress/editor package.
*/
function PluginSidebar(props) {
deprecateSlot('PluginSidebar');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginSidebar, {
...props
});
}
/**
* @see PluginSidebarMoreMenuItem in @wordpress/editor package.
*/
function PluginSidebarMoreMenuItem(props) {
deprecateSlot('PluginSidebarMoreMenuItem');
return (0,external_React_namespaceObject.createElement)(external_wp_editor_namespaceObject.PluginSidebarMoreMenuItem, {
...props
});
}
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01: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 */
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/index.js
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
/**
* WordPress dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01:00
/**
* Internal dependencies
*/
Block Editor: Update the WordPress Packages from Gutenberg 5.2. Updated Packages: - @wordpress/a11y@2.1.0 - @wordpress/annotations@1.1.0 - @wordpress/api-fetch@3.0.0 - @wordpress/autop@2.1.0 - @wordpress/babel-plugin-import-jsx-pragma@2.0.0 - @wordpress/babel-plugin-makepot@3.0.0 - @wordpress/babel-preset-default@4.0.0 - @wordpress/blob@2.2.0 - @wordpress/block-editor@1.0.0 - @wordpress/block-library@2.3.0 - @wordpress/block-serialization-default-parser@3.0.0 - @wordpress/block-serialization-spec-parser@3.0.0 - @wordpress/blocks@6.1.0 - @wordpress/browserslist-config@2.3.0 - @wordpress/components@7.1.0 - @wordpress/compose@3.1.0 - @wordpress/core-data@2.1.0 - @wordpress/custom-templated-path-webpack-plugin@1.2.0 - @wordpress/data@4.3.0 - @wordpress/date@3.1.0 - @wordpress/deprecated@2.1.0 - @wordpress/docgen@1.0.0 - @wordpress/dom-ready@2.1.0 - @wordpress/dom@2.1.0 - @wordpress/e2e-test-utils@1.0.0 - @wordpress/e2e-tests@1.0.0 - @wordpress/edit-post@3.2.0 - @wordpress/editor@9.1.0 - @wordpress/element@2.2.0 - @wordpress/escape-html@1.1.0 - @wordpress/eslint-plugin@2.0.0 - @wordpress/format-library@1.3.0 - @wordpress/hooks@2.1.0 - @wordpress/html-entities@2.1.0 - @wordpress/i18n@3.2.0 - @wordpress/is-shallow-equal@1.2.0 - @wordpress/jest-console@3.0.0 - @wordpress/jest-preset-default@4.0.0 - @wordpress/jest-puppeteer-axe@1.0.0 - @wordpress/keycodes@2.1.0 - @wordpress/library-export-default-webpack-plugin@1.1.0 - @wordpress/list-reusable-blocks@1.2.0 - @wordpress/notices@1.2.0 - @wordpress/npm-package-json-lint-config@1.2.0 - @wordpress/nux@3.1.0 - @wordpress/plugins@2.1.0 - @wordpress/postcss-themes@2.0.0 - @wordpress/priority-queue@1.0.0 - @wordpress/redux-routine@3.1.0 - @wordpress/rich-text@3.1.0 - @wordpress/scripts@3.0.0 - @wordpress/shortcode@2.1.0 - @wordpress/token-list@1.2.0 - @wordpress/url@2.4.0 - @wordpress/viewport@2.2.0 - @wordpress/wordcount@2.1.0 This also includes the update to the scripts dependencies and the new widgets php files. Props iseulde. Fixes #46429. Built from https://develop.svn.wordpress.org/trunk@44808 git-svn-id: http://core.svn.wordpress.org/trunk@44640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-07 10:09:59 +01: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) {
const isMediumOrBigger = window.matchMedia('(min-width: 782px)').matches;
const target = document.getElementById(id);
const root = (0,external_wp_element_namespaceObject.createRoot)(target);
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-post', {
fullscreenMode: true,
themeStyles: true,
welcomeGuide: true,
welcomeGuideTemplate: true
});
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core', {
allowRightClickOverrides: true,
editorMode: 'visual',
fixedToolbar: false,
hiddenBlockTypes: [],
inactivePanels: [],
openPanels: ['post-status'],
showBlockBreadcrumbs: true,
showIconLabels: false,
showListViewByDefault: false,
isPublishSidebarEnabled: true
});
(0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
Block Editor: Update the WordPress Packages to the ones used in the Gutenberg 6.5 release Updated Packages: In version 6.2: @wordpress/a11y@2.5.0 @wordpress/annotations@1.5.0 @wordpress/api-fetch@3.4.0 @wordpress/autop@2.4.0 @wordpress/babel-plugin-import-jsx-pragma@2.3.0 @wordpress/babel-plugin-makepot@3.2.0 @wordpress/babel-preset-default@4.4.0 @wordpress/blob@2.5.0 @wordpress/block-editor@3.0.0 @wordpress/block-library@2.7.0 @wordpress/block-serialization-default-parser@3.3.0 @wordpress/block-serialization-spec-parser@3.2.0 @wordpress/blocks@6.5.0 @wordpress/browserslist-config@2.6.0 @wordpress/components@8.1.0 @wordpress/compose@3.5.0 @wordpress/core-data@2.5.0 @wordpress/custom-templated-path-webpack-plugin@1.5.0 @wordpress/data-controls@1.1.0 @wordpress/data@4.7.0 @wordpress/date@3.4.0 @wordpress/dependency-extraction-webpack-plugin@1.1.0 @wordpress/deprecated@2.5.0 @wordpress/docgen@1.3.0 @wordpress/dom-ready@2.5.0 @wordpress/dom@2.4.0 @wordpress/e2e-test-utils@2.2.0 @wordpress/e2e-tests@1.4.0 @wordpress/edit-post@3.6.0 @wordpress/editor@9.5.0 @wordpress/element@2.6.0 @wordpress/escape-html@1.5.0 @wordpress/eslint-plugin@2.4.0 @wordpress/format-library@1.7.0 @wordpress/hooks@2.5.0 @wordpress/html-entities@2.5.0 @wordpress/i18n@3.6.0 @wordpress/is-shallow-equal@1.5.0 @wordpress/jest-console@3.2.0 @wordpress/jest-preset-default@4.3.0 @wordpress/jest-puppeteer-axe@1.2.0 @wordpress/keycodes@2.5.0 @wordpress/library-export-default-webpack-plugin@1.4.0 @wordpress/list-reusable-blocks@1.6.0 @wordpress/media-utils@1.0.0 @wordpress/notices@1.6.0 @wordpress/npm-package-json-lint-config@2.1.0 @wordpress/nux@3.5.0 @wordpress/plugins@2.5.0 @wordpress/postcss-themes@2.2.0 @wordpress/priority-queue@1.3.0 @wordpress/redux-routine@3.5.0 @wordpress/rich-text@3.5.0 @wordpress/scripts@3.4.0 @wordpress/server-side-render@1.1.0 @wordpress/shortcode@2.4.0 @wordpress/token-list@1.5.0 @wordpress/url@2.7.0 @wordpress/viewport@2.6.0 @wordpress/wordcount@2.5.0 In version 6.4: @wordpress/annotations@1.6.0 @wordpress/api-fetch@3.5.0 @wordpress/autop@2.5.0 @wordpress/babel-preset-default@4.5.0 @wordpress/block-editor@3.1.0 @wordpress/block-library@2.8.0 @wordpress/block-serialization-default-parser@3.4.0 @wordpress/block-serialization-spec-parser@3.3.0 @wordpress/blocks@6.6.0 @wordpress/components@8.2.0 @wordpress/compose@3.6.0 @wordpress/core-data@2.6.0 @wordpress/data-controls@1.2.0 @wordpress/data@4.8.0 @wordpress/date@3.5.0 @wordpress/dependency-extraction-webpack-plugin@1.2.0 @wordpress/deprecated@2.6.0 @wordpress/docgen@1.4.0 @wordpress/dom@2.5.0 @wordpress/e2e-test-utils@2.3.0 @wordpress/e2e-tests@1.5.0 @wordpress/edit-post@3.7.0 @wordpress/editor@9.6.0 @wordpress/element@2.7.0 @wordpress/eslint-plugin@3.0.0 @wordpress/format-library@1.8.0 @wordpress/hooks@2.6.0 @wordpress/is-shallow-equal@1.6.0 @wordpress/jest-console@3.3.0 @wordpress/jest-preset-default@5.0.0 @wordpress/jest-puppeteer-axe@1.3.0 @wordpress/keycodes@2.6.0 @wordpress/list-reusable-blocks@1.7.0 @wordpress/media-utils@1.1.0 @wordpress/notices@1.7.0 @wordpress/nux@3.6.0 @wordpress/plugins@2.6.0 @wordpress/project-management-automation@1.0.0 @wordpress/redux-routine@3.6.0 @wordpress/rich-text@3.6.0 @wordpress/scripts@4.0.0 @wordpress/server-side-render@1.2.0 @wordpress/token-list@1.6.0 @wordpress/viewport@2.7.0 @wordpress/wordcount@2.6.0 In version 6.5: @wordpress/annotations@1.7.0 @wordpress/api-fetch@3.6.0 @wordpress/babel-preset-default@4.6.0 @wordpress/block-directory@1.0.0 @wordpress/block-editor@3.2.0 @wordpress/block-library@2.9.0 @wordpress/blocks@6.7.0 @wordpress/components@8.3.0 @wordpress/compose@3.7.0 @wordpress/core-data@2.7.0 @wordpress/data-controls@1.3.0 @wordpress/data@4.9.0 @wordpress/dependency-extraction-webpack-plugin@2.0.0 @wordpress/e2e-test-utils@2.4.0 @wordpress/e2e-tests@1.7.0 @wordpress/edit-post@3.8.0 @wordpress/editor@9.7.0 @wordpress/element@2.8.0 @wordpress/eslint-plugin@3.1.0 @wordpress/format-library@1.9.0 @wordpress/list-reusable-blocks@1.8.0 @wordpress/media-utils@1.2.0 @wordpress/notices@1.8.0 @wordpress/nux@3.7.0 @wordpress/plugins@2.7.0 @wordpress/rich-text@3.7.0 @wordpress/scripts@5.0.0 @wordpress/server-side-render@1.3.0 @wordpress/url@2.8.0 @wordpress/viewport@2.8.0 Props youknowriad desrosj noisysocks pento jorgefilipecosta iseulde Fixes: #47843 Built from https://develop.svn.wordpress.org/trunk@46189 git-svn-id: http://core.svn.wordpress.org/trunk@46001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-19 17:19:18 +02:00
// Check if the block list view should be open by default.
// If `distractionFree` mode is enabled, the block list view should not be open.
// 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')) {
(0,external_wp_data_namespaceObject.dispatch)(external_wp_editor_namespaceObject.store).setIsListViewOpened(true);
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
}
(0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)();
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)({
inserter: false
});
Editor: Update @wordpress packages for 6.2 Beta 5. Updates the `@wordpress` packages to include the following changes: - Add border radius to off canvas navigation menu items - Remove border from quick inserter child elements - Show variant patterns even if there are no patterns for the Query Loop block - Order initial block items in Navigation with PrivateInserter - Update: Add descriptions to all panels in the Site Editor's dark side - Fix typo in template parts description - Fix: Browse mode descriptions margin - Fix: Show creation popover on empty page links in the navigation sidebar - Make sure the directly inserted block in the Nav block is a Page link - Fix browser history when synchronising state with urls - Navigation Sidebar: Change the logic about which navigation gets selected for the sidebar - Fixes extra UI in navigation block inspector - Renames parent selection boolean param and improves docs - Widget Importer: Fix Widget Group block imports - Don't add Post Content layout styles to title in the post editor - Site editor: Add hover animation to site editor canvas - Prevent the saving button from showing when renaming templates - Navigation Block: Fix big spinner - Navigation: Don't save the level of the link in an attribute - Focus 1st parent block on block remove, if no previous block is available - Navigation: Performance: improve params in `block_core_navigation_get_most_recently_published_navigation()` - Navigation Block inspector: fix link UI popover opening on links that have a url - Fix for `WP_Theme_JSON_Resolver::get_merged_data()` - Site Editor: Add page details when viewing a specific page. - Fix site editor sidebar scrollbars - Fix: Custom link UI does appears outside canvas on the sidebar navigation - Fix: Make navigation page list load its items on navigation sidebar References: * [https://github.com/WordPress/gutenberg/commit/d14fea64bd9ad9d2d86047936974dbed39a5b5b3 Gutenberg's commit for publishing the packages] * [https://github.com/WordPress/gutenberg/commit/dbe47a5e8f829f4a21b9d7d580098ecefb73447a Gutenberg's commit for `blocks/navigation-link.php` and `blocks/navigation-submenu.php`] * [https://github.com/WordPress/gutenberg/commit/ea74a306e5289a90d29c0b3eb1d9b4ef893f7f19 Gutenberg's commit for `blocks/navigation.php`] Follow-up to [55441], [55440]. Props ntsekouras, mamaduka, gziolo, costdev, hellofromTonya. See #57471. Built from https://develop.svn.wordpress.org/trunk@55475 git-svn-id: http://core.svn.wordpress.org/trunk@55008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-03-07 16:31:49 +01:00
(0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)({
inserter: false
});
Editor: Update packages for 6.1 Beta 3. Package updates for bug and regression fixes: * @wordpress/annotations: 2.17.3 * @wordpress/block-directory: 3.15.4 * @wordpress/block-editor: 10.0.4 * @wordpress/block-library: 7.14.4 * @wordpress/blocks: 11.16.4 * @wordpress/components: 21.0.4 * @wordpress/core-data: 5.0.4 * @wordpress/customize-widgets: 3.14.4 * @wordpress/data: 7.1.3 * @wordpress/data-controls: 2.17.3 * @wordpress/edit-post: 6.14.4 * @wordpress/edit-site: 4.14.5 * @wordpress/edit-widgets: 4.14.4 * @wordpress/editor: 12.16.4 * @wordpress/format-library: 3.15.4 * @wordpress/interface: 4.16.3 * @wordpress/keyboard-shortcuts: 3.15.3 * @wordpress/list-reusable-blocks: 3.15.4 * @wordpress/notices: 3.17.3 * @wordpress/nux: 5.15.4 * @wordpress/preferences: 2.9.4 * @wordpress/reusable-blocks: 3.15.4 * @wordpress/rich-text: 5.15.3 * @wordpress/server-side-render: 3.15.4 * @wordpress/style-engine: 1.0.3 * @wordpress/viewport: 4.15.3 * @wordpress/widgets: 2.15.4 References: * [https://github.com/WordPress/gutenberg/pull/44634 Gutenberg PR 44634] – Quote block: stop slash inserter popup showing in citation * [https://github.com/WordPress/gutenberg/pull/44630 Gutenberg PR 44630] – Query Loop: Fix condition for displaying 'parents' control * [https://github.com/WordPress/gutenberg/pull/44554 Gutenberg PR 44554] – Hide the Classic block in the Site Editor * [https://github.com/WordPress/gutenberg/pull/44594 Gutenberg PR 44594] – Fix navigation block console error * [https://github.com/WordPress/gutenberg/pull/44555 Gutenberg PR 44555] – Theme export: Fix broken spacingScale export * [https://github.com/WordPress/gutenberg/pull/44580 Gutenberg PR 44580] – Code Block: Add box-sizing to fix inconsistent layout * [https://github.com/WordPress/gutenberg/pull/44556 Gutenberg PR 44556] – Remove border from Global Styles previews * [https://github.com/WordPress/gutenberg/pull/44141 Gutenberg PR 44141] – Spacing presets: Modify the styling of the input controls when in unlinked mode in order to better differentiate sides * [https://github.com/WordPress/gutenberg/pull/44453 Gutenberg PR 44453] – Preserve the generic signature of getEntityRecord and getEntityRecords through currying * [https://github.com/WordPress/gutenberg/pull/44504 Gutenberg PR 44504] – Theme.json: fix some outline properties doesn't work properly on the editor * [https://github.com/WordPress/gutenberg/pull/44516 Gutenberg PR 44516] – Add style engine to editor tsconfig references * [https://github.com/WordPress/gutenberg/pull/44523 Gutenberg PR 44523] – Query Loop Block: Rename Query Loop variations allowControls to allowedControls * [https://github.com/WordPress/gutenberg/pull/44520 Gutenberg PR 44520] – Post Featured Image: Fix application of default border style in editor * [https://github.com/WordPress/gutenberg/pull/44286 Gutenberg PR 44286] – Post Featured Image: Fix borders after addition of overlay feature * [https://github.com/WordPress/gutenberg/pull/44482 Gutenberg PR 44482] – Template Editor: Fix crashes due to undefined variables * [https://github.com/WordPress/gutenberg/pull/44480 Gutenberg PR 44480] – Template Parts: Prevent adding block in post editor or inside post template or content blocks * [https://github.com/WordPress/gutenberg/pull/44425 Gutenberg PR 44425] – Fix rotated image crop area aspect ratio * [https://github.com/WordPress/gutenberg/pull/44485 Gutenberg PR 44485] – Fix padding/margin visualizer accuracy * [https://github.com/WordPress/gutenberg/pull/44569 Gutenberg PR 44569] – Theme.json: Fix some shadow properties that do not work properly in the site editor * [https://github.com/WordPress/gutenberg/pull/44575 Gutenberg PR 44575] – ToggleGroupControl: Fix unselected icon color * [https://github.com/WordPress/gutenberg/pull/44526 Gutenberg PR 44526] – TokenInput Field: Try alternative approach to fix screen reader focus issue * [https://github.com/WordPress/gutenberg/pull/44506 Gutenberg PR 44506] – Edit Post: Optimize legacy post content layout * [https://github.com/WordPress/gutenberg/pull/44258 Gutenberg PR 44258] – Add layout styles from Post Content block to post editor Follow-up to [54257] and [54335]. Props czapla, isabel_brison, wildworks, bernhard-reiter, hellofromTonya. See #56467. Built from https://develop.svn.wordpress.org/trunk@54383 git-svn-id: http://core.svn.wordpress.org/trunk@53942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-04 17:06:52 +02:00
if (false) {}
// Show a console log warning if the browser is not in Standards rendering mode.
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.");
}
// This is a temporary fix for a couple of issues specific to Webkit on iOS.
// 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.
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;
}
// Undo unwanted scroll on html element, but only in the visual editor.
if (document.getElementsByClassName('is-mode-visual')[0]) {
window.scrollTo(0, 0);
}
}
});
}
// Prevent the default browser action for files dropped outside of dropzones.
Editor: Sync changes from the Gutenberg plugin 14.1 release Updated WordPress packages necessary for releasing WordPress 6.1 Beta 1: - @wordpress/a11y@3.17.1 - @wordpress/annotations@2.17.2 - @wordpress/api-fetch@6.14.1 - @wordpress/autop@3.17.1 - @wordpress/babel-plugin-import-jsx-pragma@4.0.1 - @wordpress/babel-plugin-makepot@5.1.1 - @wordpress/babel-preset-default@7.1.1 - @wordpress/base-styles@4.8.1 - @wordpress/blob@3.17.1 - @wordpress/block-directory@3.15.2 - @wordpress/block-editor@10.0.2 - @wordpress/block-library@7.14.2 - @wordpress/block-serialization-default-parser@4.17.1 - @wordpress/block-serialization-spec-parser@4.17.1 - @wordpress/blocks@11.16.2 - @wordpress/browserslist-config@5.0.1 - @wordpress/components@21.0.2 - @wordpress/compose@5.15.2 - @wordpress/core-data@5.0.2 - @wordpress/create-block-tutorial-template@2.5.1 - @wordpress/create-block@4.1.1 - @wordpress/custom-templated-path-webpack-plugin@2.1.3 - @wordpress/customize-widgets@3.14.2 - @wordpress/data-controls@2.17.2 - @wordpress/data@7.1.2 - @wordpress/date@4.17.1 - @wordpress/dependency-extraction-webpack-plugin@4.0.2 - @wordpress/deprecated@3.17.1 - @wordpress/docgen@1.26.1 - @wordpress/dom-ready@3.17.1 - @wordpress/dom@3.17.2 - @wordpress/e2e-test-utils@8.1.1 - @wordpress/e2e-tests@5.1.2 - @wordpress/edit-post@6.14.2 - @wordpress/edit-site@4.14.2 - @wordpress/edit-widgets@4.14.2 - @wordpress/editor@12.16.2 - @wordpress/element@4.15.1 - @wordpress/env@5.2.1 - @wordpress/escape-html@2.17.1 - @wordpress/eslint-plugin@13.1.1 - @wordpress/format-library@3.15.2 - @wordpress/hooks@3.17.1 - @wordpress/html-entities@3.17.1 - @wordpress/i18n@4.17.1 - @wordpress/icons@9.8.1 - @wordpress/interface@4.16.2 - @wordpress/is-shallow-equal@4.17.1 - @wordpress/jest-console@6.0.1 - @wordpress/jest-preset-default@9.0.1 - @wordpress/jest-puppeteer-axe@5.0.1 - @wordpress/keyboard-shortcuts@3.15.2 - @wordpress/keycodes@3.17.1 - @wordpress/lazy-import@1.4.3 - @wordpress/library-export-default-webpack-plugin@2.3.3 - @wordpress/list-reusable-blocks@3.15.2 - @wordpress/media-utils@4.8.1 - @wordpress/notices@3.17.2 - @wordpress/npm-package-json-lint-config@4.2.1 - @wordpress/nux@5.15.2 - @wordpress/plugins@4.15.2 - @wordpress/postcss-plugins-preset@4.1.1 - @wordpress/postcss-themes@5.0.1 - @wordpress/preferences-persistence@1.9.1 - @wordpress/preferences@2.9.2 - @wordpress/prettier-config@2.0.1 - @wordpress/primitives@3.15.1 - @wordpress/priority-queue@2.17.2 - @wordpress/project-management-automation@1.16.1 - @wordpress/react-i18n@3.15.1 - @wordpress/readable-js-assets-webpack-plugin@2.0.1 - @wordpress/redux-routine@4.17.1 - @wordpress/reusable-blocks@3.15.2 - @wordpress/rich-text@5.15.2 - @wordpress/scripts@24.1.2 - @wordpress/server-side-render@3.15.2 - @wordpress/shortcode@3.17.1 - @wordpress/style-engine@1.0.1 - @wordpress/stylelint-config@21.0.1 - @wordpress/token-list@2.17.1 - @wordpress/url@3.18.1 - @wordpress/viewport@4.15.2 - @wordpress/warning@2.17.1 - @wordpress/widgets@2.15.2 - @wordpress/wordcount@3.17.1 Props bernhard-reiter, cbravobernal, czapla, oandregal, isabel_brison, andrewserong, mciampini. See #56467. Built from https://develop.svn.wordpress.org/trunk@54257 git-svn-id: http://core.svn.wordpress.org/trunk@53816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-09-20 17:43:29 +02:00
window.addEventListener('dragover', e => e.preventDefault(), false);
window.addEventListener('drop', e => e.preventDefault(), false);
root.render((0,external_React_namespaceObject.createElement)(editor, {
settings: settings,
postId: postId,
postType: postType,
initialEdits: initialEdits
}));
return root;
}
/**
* 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'
});
}
Block Editor: Update WordPress Packages. The following package versions were changed: @wordpress/a11y: 2.6.0 -> 2.7.0 @wordpress/annotations: 1.10.0 -> 1.11.0 @wordpress/api-fetch: 3.9.0 -> 3.10.0 @wordpress/autop: 2.5.1 -> 2.6.0 @wordpress/blob: 2.6.0 -> 2.7.0 @wordpress/block-directory: 1.3.0 -> 1.4.0 @wordpress/block-editor: 3.5.0 -> 3.6.0 @wordpress/block-library: 2.12.0 -> 2.13.0 @wordpress/block-serialization-default-parser: 3.4.1 -> 3.5.0 @wordpress/blocks: 6.10.0 -> 6.11.0 @wordpress/components: 9.0.0 -> 9.1.0 @wordpress/compose: 3.10.0 -> 3.11.0 @wordpress/core-data: 2.10.0 -> 2.11.0 @wordpress/custom-templated-path-webpack-plugin: 1.5.0 -> 1.6.0 @wordpress/data: 4.12.0 -> 4.13.0 @wordpress/data-controls: 1.6.0 -> 1.7.0 @wordpress/date: 3.7.0 -> 3.8.0 @wordpress/dependency-extraction-webpack-plugin: 2.1.0 -> 2.2.0 @wordpress/deprecated: 2.6.1 -> 2.7.0 @wordpress/dom: 2.7.0 -> 2.8.0 @wordpress/dom-ready: 2.6.0 -> 2.7.0 @wordpress/e2e-test-utils: 4.1.0 -> 4.2.0 @wordpress/edit-post: 3.11.0 -> 3.12.0 @wordpress/editor: 9.10.0 -> 9.11.0 @wordpress/element: 2.10.0 -> 2.11.0 @wordpress/escape-html: 1.6.0 -> 1.7.0 @wordpress/format-library: 1.12.0 -> 1.13.0 @wordpress/hooks: 2.6.0 -> 2.7.0 @wordpress/html-entities: 2.5.0 -> 2.6.0 @wordpress/i18n: 3.8.0 -> 3.9.0 @wordpress/is-shallow-equal: 1.7.0 -> 1.8.0 @wordpress/keyboard-shortcuts: 0.2.0 -> 1.0.0 @wordpress/keycodes: 2.8.0 -> 2.9.0 @wordpress/library-export-default-webpack-plugin: 1.5.0 -> 1.6.0 @wordpress/list-reusable-blocks: 1.11.0 -> 1.12.0 @wordpress/media-utils: 1.5.0 -> 1.6.0 @wordpress/notices: 1.11.0 -> 1.12.0 @wordpress/nux: 3.10.0 -> 3.11.0 @wordpress/plugins: 2.10.0 -> 2.11.0 @wordpress/priority-queue: 1.4.0 -> 1.5.0 @wordpress/redux-routine: 3.6.2 -> 3.7.0 @wordpress/rich-text: 3.10.0 -> 3.11.0 @wordpress/scripts: 6.2.0 -> 7.0.0 @wordpress/server-side-render: 1.6.0 -> 1.7.0 @wordpress/shortcode: 2.5.0 -> 2.6.0 @wordpress/token-list: 1.8.0 -> 1.9.0 @wordpress/url: 2.9.0 -> 2.10.0 @wordpress/viewport: 2.11.0 -> 2.12.0 @wordpress/wordcount: 2.6.2 -> 2.7.0 Added these new packages: @wordpress/warning @wordpress/primitives @wordpress/icons Re-added keyboard-shortcuts to script loader removed by mistake on revision 47198. Props gziolo, itsjonq, youknowriad, mcsf, andraganescu. Fixes #49358. Built from https://develop.svn.wordpress.org/trunk@47199 git-svn-id: http://core.svn.wordpress.org/trunk@46999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 22:03:31 +01:00
(window.wp = window.wp || {}).editPost = __webpack_exports__;
/******/ })()
;