@wordpress/editor 13.23.0 → 13.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/build/components/entities-saved-states/index.js +15 -1
- package/build/components/entities-saved-states/index.js.map +1 -1
- package/build/components/index.js +26 -2
- package/build/components/index.js.map +1 -1
- package/build/components/post-author/panel.js +24 -0
- package/build/components/post-author/panel.js.map +1 -0
- package/build/components/post-panel-row/index.js +36 -0
- package/build/components/post-panel-row/index.js.map +1 -0
- package/build/components/post-saved-state/index.js +21 -16
- package/build/components/post-saved-state/index.js.map +1 -1
- package/build/components/post-schedule/panel.js +67 -0
- package/build/components/post-schedule/panel.js.map +1 -0
- package/build/components/post-sync-status/index.js +8 -4
- package/build/components/post-sync-status/index.js.map +1 -1
- package/build/components/post-title/constants.js +11 -0
- package/build/components/post-title/constants.js.map +1 -0
- package/build/components/post-title/index.js +61 -89
- package/build/components/post-title/index.js.map +1 -1
- package/build/components/post-title/post-title-raw.js +92 -0
- package/build/components/post-title/post-title-raw.js.map +1 -0
- package/build/components/post-title/use-post-title-focus.js +64 -0
- package/build/components/post-title/use-post-title-focus.js.map +1 -0
- package/build/components/post-title/use-post-title.js +41 -0
- package/build/components/post-title/use-post-title.js.map +1 -0
- package/build/components/post-url/panel.js +4 -3
- package/build/components/post-url/panel.js.map +1 -1
- package/build/components/provider/constants.js +9 -0
- package/build/components/provider/constants.js.map +1 -0
- package/build/components/provider/disable-non-page-content-blocks.js +63 -0
- package/build/components/provider/disable-non-page-content-blocks.js.map +1 -0
- package/build/components/provider/index.js +8 -7
- package/build/components/provider/index.js.map +1 -1
- package/build/private-apis.js +2 -0
- package/build/private-apis.js.map +1 -1
- package/build/store/actions.js +23 -2
- package/build/store/actions.js.map +1 -1
- package/build/store/reducer.js +10 -1
- package/build/store/reducer.js.map +1 -1
- package/build/store/selectors.js +16 -2
- package/build/store/selectors.js.map +1 -1
- package/build-module/components/entities-saved-states/index.js +16 -2
- package/build-module/components/entities-saved-states/index.js.map +1 -1
- package/build-module/components/index.js +3 -0
- package/build-module/components/index.js.map +1 -1
- package/build-module/components/post-author/panel.js +14 -0
- package/build-module/components/post-author/panel.js.map +1 -0
- package/build-module/components/post-panel-row/index.js +27 -0
- package/build-module/components/post-panel-row/index.js.map +1 -0
- package/build-module/components/post-saved-state/index.js +22 -17
- package/build-module/components/post-saved-state/index.js.map +1 -1
- package/build-module/components/post-schedule/panel.js +59 -0
- package/build-module/components/post-schedule/panel.js.map +1 -0
- package/build-module/components/post-sync-status/index.js +8 -5
- package/build-module/components/post-sync-status/index.js.map +1 -1
- package/build-module/components/post-title/constants.js +3 -0
- package/build-module/components/post-title/constants.js.map +1 -0
- package/build-module/components/post-title/index.js +62 -91
- package/build-module/components/post-title/index.js.map +1 -1
- package/build-module/components/post-title/post-title-raw.js +83 -0
- package/build-module/components/post-title/post-title-raw.js.map +1 -0
- package/build-module/components/post-title/use-post-title-focus.js +57 -0
- package/build-module/components/post-title/use-post-title-focus.js.map +1 -0
- package/build-module/components/post-title/use-post-title.js +33 -0
- package/build-module/components/post-title/use-post-title.js.map +1 -0
- package/build-module/components/post-url/panel.js +5 -4
- package/build-module/components/post-url/panel.js.map +1 -1
- package/build-module/components/provider/constants.js +2 -0
- package/build-module/components/provider/constants.js.map +1 -0
- package/build-module/components/provider/disable-non-page-content-blocks.js +56 -0
- package/build-module/components/provider/disable-non-page-content-blocks.js.map +1 -0
- package/build-module/components/provider/index.js +6 -4
- package/build-module/components/provider/index.js.map +1 -1
- package/build-module/private-apis.js +2 -0
- package/build-module/private-apis.js.map +1 -1
- package/build-module/store/actions.js +21 -0
- package/build-module/store/actions.js.map +1 -1
- package/build-module/store/reducer.js +9 -1
- package/build-module/store/reducer.js.map +1 -1
- package/build-module/store/selectors.js +11 -0
- package/build-module/store/selectors.js.map +1 -1
- package/build-style/style-rtl.css +51 -18
- package/build-style/style.css +51 -18
- package/package.json +31 -31
- package/src/components/entities-saved-states/index.js +16 -1
- package/src/components/index.js +3 -0
- package/src/components/post-author/panel.js +18 -0
- package/src/components/post-author/style.scss +7 -0
- package/src/components/post-panel-row/index.js +26 -0
- package/src/components/post-panel-row/style.scss +21 -0
- package/src/components/post-saved-state/index.js +46 -37
- package/src/components/post-schedule/panel.js +65 -0
- package/src/components/post-schedule/style.scss +23 -0
- package/src/components/post-sync-status/index.js +5 -6
- package/src/components/post-sync-status/style.scss +3 -17
- package/src/components/post-title/constants.js +4 -0
- package/src/components/post-title/index.js +56 -87
- package/src/components/post-title/post-title-raw.js +82 -0
- package/src/components/post-title/style.scss +5 -0
- package/src/components/post-title/use-post-title-focus.js +50 -0
- package/src/components/post-title/use-post-title.js +25 -0
- package/src/components/post-url/panel.js +4 -8
- package/src/components/post-url/style.scss +1 -12
- package/src/components/provider/README.md +0 -13
- package/src/components/provider/constants.js +5 -0
- package/src/components/provider/disable-non-page-content-blocks.js +55 -0
- package/src/components/provider/index.js +19 -9
- package/src/private-apis.js +2 -0
- package/src/store/actions.js +21 -0
- package/src/store/reducer.js +10 -0
- package/src/store/selectors.js +11 -0
- package/src/style.scss +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -88,6 +88,16 @@ function EntitiesSavedStatesExtensible({
|
|
|
88
88
|
} = partitionedSavables;
|
|
89
89
|
const sortedPartitionedSavables = [siteSavables, templateSavables, templatePartSavables, ...Object.values(contentSavables)].filter(Array.isArray);
|
|
90
90
|
const saveEnabled = saveEnabledProp !== null && saveEnabledProp !== void 0 ? saveEnabledProp : isDirty;
|
|
91
|
+
const {
|
|
92
|
+
homeUrl
|
|
93
|
+
} = (0, _data.useSelect)(select => {
|
|
94
|
+
const {
|
|
95
|
+
getUnstableBase // Site index.
|
|
96
|
+
} = select(_coreData.store);
|
|
97
|
+
return {
|
|
98
|
+
homeUrl: getUnstableBase()?.home
|
|
99
|
+
};
|
|
100
|
+
}, []);
|
|
91
101
|
const saveCheckedEntities = () => {
|
|
92
102
|
const saveNoticeId = 'site-editor-save-success';
|
|
93
103
|
removeNotice(saveNoticeId);
|
|
@@ -131,7 +141,11 @@ function EntitiesSavedStatesExtensible({
|
|
|
131
141
|
} else {
|
|
132
142
|
createSuccessNotice((0, _i18n.__)('Site updated.'), {
|
|
133
143
|
type: 'snackbar',
|
|
134
|
-
id: saveNoticeId
|
|
144
|
+
id: saveNoticeId,
|
|
145
|
+
actions: [{
|
|
146
|
+
label: (0, _i18n.__)('View site'),
|
|
147
|
+
url: homeUrl
|
|
148
|
+
}]
|
|
135
149
|
});
|
|
136
150
|
}
|
|
137
151
|
}).catch(error => createErrorNotice(`${(0, _i18n.__)('Saving failed.')} ${error}`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_i18n","_data","_element","_coreData","_blockEditor","_compose","_notices","_entityTypeList","_interopRequireDefault","_useIsDirty","PUBLISH_ON_SAVE_ENTITIES","kind","name","identity","values","EntitiesSavedStates","close","isDirtyProps","useIsDirty","_react","createElement","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","editEntityRecord","saveEditedEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","useDispatch","coreStore","__unstableMarkLastChangeAsPersistent","blockEditorStore","createSuccessNotice","createErrorNotice","removeNotice","noticesStore","partitionedSavables","reduce","acc","record","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","saveCheckedEntities","saveNoticeId","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","typeToPublish","status","length","Promise","all","then","value","type","id","catch","error","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","ref","className","Flex","gap","FlexItem","isBlock","as","Button","variant","disabled","onClick","map","list","default"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __experimentalUseDialog as useDialog } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( { close } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible close={ close } { ...isDirtyProps } />\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice, removeNotice } =\n\t\tuseDispatch( noticesStore );\n\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\n\tconst saveCheckedEntities = () => {\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tremoveNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! unselectedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tclose( entitiesToSave );\n\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tsaveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tsaveSpecifiedEntityEdits(\n\t\t\t\t\t'root',\n\t\t\t\t\t'site',\n\t\t\t\t\tundefined,\n\t\t\t\t\tsiteItemsToSave\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave( values );\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tcreateErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` )\n\t\t\t);\n\t};\n\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\tonClick={ saveCheckedEntities }\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<strong>{ __( 'Are you ready to save?' ) }</strong>\n\t\t\t\t{ additionalPrompt }\n\t\t\t\t{ isDirty && (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'The following changes have been made to your site, templates, and content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,eAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAMW,wBAAwB,GAAG,CAChC;EACCC,IAAI,EAAE,UAAU;EAChBC,IAAI,EAAE;AACP,CAAC,CACD;AAED,SAASC,QAAQA,CAAEC,MAAM,EA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,GAAG,EAAGoC,IAAI,CAAE,CAAC,CAAE,CAAC3F,IAAM;MACtB2F,IAAI,EAAGA,IAAM;MACbvE,kBAAkB,EAAGA,kBAAoB;MACzCD,qBAAqB,EAAGA;IAAuB,CAC/C,CAAC;EAEJ,CAAE,CACE,CAAC;AAER"}
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_data","_element","_coreData","_blockEditor","_compose","_notices","_entityTypeList","_interopRequireDefault","_useIsDirty","PUBLISH_ON_SAVE_ENTITIES","kind","name","identity","values","EntitiesSavedStates","close","isDirtyProps","useIsDirty","_react","createElement","EntitiesSavedStatesExtensible","additionalPrompt","undefined","onSave","saveEnabled","saveEnabledProp","saveLabel","__","dirtyEntityRecords","isDirty","setUnselectedEntities","unselectedEntities","saveButtonRef","useRef","editEntityRecord","saveEditedEntityRecord","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","useDispatch","coreStore","__unstableMarkLastChangeAsPersistent","blockEditorStore","createSuccessNotice","createErrorNotice","removeNotice","noticesStore","partitionedSavables","reduce","acc","record","push","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","Object","filter","Array","isArray","homeUrl","useSelect","select","getUnstableBase","home","saveCheckedEntities","saveNoticeId","entitiesToSave","key","property","some","elt","siteItemsToSave","pendingSavedRecords","forEach","typeToPublish","status","length","Promise","all","then","value","type","id","actions","label","url","catch","error","dismissPanel","useCallback","saveDialogRef","saveDialogProps","useDialog","onClose","ref","className","Flex","gap","FlexItem","isBlock","as","Button","variant","disabled","onClick","map","list","default"],"sources":["@wordpress/editor/src/components/entities-saved-states/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { __experimentalUseDialog as useDialog } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\n\nconst PUBLISH_ON_SAVE_ENTITIES = [\n\t{\n\t\tkind: 'postType',\n\t\tname: 'wp_navigation',\n\t},\n];\n\nfunction identity( values ) {\n\treturn values;\n}\n\nexport default function EntitiesSavedStates( { close } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible close={ close } { ...isDirtyProps } />\n\t);\n}\n\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst {\n\t\teditEntityRecord,\n\t\tsaveEditedEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst { createSuccessNotice, createErrorNotice, removeNotice } =\n\t\tuseDispatch( noticesStore );\n\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\n\tconst { homeUrl } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\n\tconst saveCheckedEntities = () => {\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tremoveNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! unselectedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tclose( entitiesToSave );\n\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\teditEntityRecord( kind, name, key, { status: 'publish' } );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tsaveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tsaveSpecifiedEntityEdits(\n\t\t\t\t\t'root',\n\t\t\t\t\t'site',\n\t\t\t\t\tundefined,\n\t\t\t\t\tsiteItemsToSave\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave( values );\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tcreateErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tcreateSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\turl: homeUrl,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tcreateErrorNotice( `${ __( 'Saving failed.' ) } ${ error }` )\n\t\t\t);\n\t};\n\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ saveDialogRef }\n\t\t\t{ ...saveDialogProps }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\tonClick={ saveCheckedEntities }\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<strong>{ __( 'Are you ready to save?' ) }</strong>\n\t\t\t\t{ additionalPrompt }\n\t\t\t\t{ isDirty && (\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'The following changes have been made to your site, templates, and content.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAKA,IAAAQ,eAAA,GAAAC,sBAAA,CAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAhBA;AACA;AACA;;AAUA;AACA;AACA;;AAIA,MAAMW,wBAAwB,GAAG,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AAC,WAAW;IACnBE,OAAO,EAAGhB;EAAc,GAEtB,IAAAjE,QAAE,EAAE,QAAS,CACN,CACL,CAAC,EAEP,IAAAT,MAAA,CAAAC,aAAA;IAAKgF,SAAS,EAAC;EAAoC,GAClD,IAAAjF,MAAA,CAAAC,aAAA,kBAAU,IAAAQ,QAAE,EAAE,wBAAyB,CAAW,CAAC,EACjDN,gBAAgB,EAChBQ,OAAO,IACR,IAAAX,MAAA,CAAAC,aAAA,aACG,IAAAQ,QAAE,EACH,4EACD,CACE,CAEA,CAAC,EAEJ+B,yBAAyB,CAACmD,GAAG,CAAIC,IAAI,IAAM;IAC5C,OACC,IAAA5F,MAAA,CAAAC,aAAA,EAACb,eAAA,CAAAyG,OAAc;MACdxC,GAAG,EAAGuC,IAAI,CAAE,CAAC,CAAE,CAACnG,IAAM;MACtBmG,IAAI,EAAGA,IAAM;MACb/E,kBAAkB,EAAGA,kBAAoB;MACzCD,qBAAqB,EAAGA;IAAuB,CAC/C,CAAC;EAEJ,CAAE,CACE,CAAC;AAER"}
|
|
@@ -26,6 +26,7 @@ var _exportNames = {
|
|
|
26
26
|
PageTemplate: true,
|
|
27
27
|
PostAuthor: true,
|
|
28
28
|
PostAuthorCheck: true,
|
|
29
|
+
PostAuthorPanel: true,
|
|
29
30
|
PostComments: true,
|
|
30
31
|
PostExcerpt: true,
|
|
31
32
|
PostExcerptCheck: true,
|
|
@@ -48,6 +49,7 @@ var _exportNames = {
|
|
|
48
49
|
PostScheduleCheck: true,
|
|
49
50
|
PostScheduleLabel: true,
|
|
50
51
|
usePostScheduleLabel: true,
|
|
52
|
+
PostSchedulePanel: true,
|
|
51
53
|
PostSlug: true,
|
|
52
54
|
PostSlugCheck: true,
|
|
53
55
|
PostSticky: true,
|
|
@@ -61,6 +63,7 @@ var _exportNames = {
|
|
|
61
63
|
PostTaxonomiesCheck: true,
|
|
62
64
|
PostTextEditor: true,
|
|
63
65
|
PostTitle: true,
|
|
66
|
+
PostTitleRaw: true,
|
|
64
67
|
PostTrash: true,
|
|
65
68
|
PostTrashCheck: true,
|
|
66
69
|
PostTypeSupportCheck: true,
|
|
@@ -201,6 +204,12 @@ Object.defineProperty(exports, "PostAuthorCheck", {
|
|
|
201
204
|
return _check3.default;
|
|
202
205
|
}
|
|
203
206
|
});
|
|
207
|
+
Object.defineProperty(exports, "PostAuthorPanel", {
|
|
208
|
+
enumerable: true,
|
|
209
|
+
get: function () {
|
|
210
|
+
return _panel.default;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
204
213
|
Object.defineProperty(exports, "PostComments", {
|
|
205
214
|
enumerable: true,
|
|
206
215
|
get: function () {
|
|
@@ -327,6 +336,12 @@ Object.defineProperty(exports, "PostScheduleLabel", {
|
|
|
327
336
|
return _label2.default;
|
|
328
337
|
}
|
|
329
338
|
});
|
|
339
|
+
Object.defineProperty(exports, "PostSchedulePanel", {
|
|
340
|
+
enumerable: true,
|
|
341
|
+
get: function () {
|
|
342
|
+
return _panel2.default;
|
|
343
|
+
}
|
|
344
|
+
});
|
|
330
345
|
Object.defineProperty(exports, "PostSlug", {
|
|
331
346
|
enumerable: true,
|
|
332
347
|
get: function () {
|
|
@@ -405,6 +420,12 @@ Object.defineProperty(exports, "PostTitle", {
|
|
|
405
420
|
return _postTitle.default;
|
|
406
421
|
}
|
|
407
422
|
});
|
|
423
|
+
Object.defineProperty(exports, "PostTitleRaw", {
|
|
424
|
+
enumerable: true,
|
|
425
|
+
get: function () {
|
|
426
|
+
return _postTitleRaw.default;
|
|
427
|
+
}
|
|
428
|
+
});
|
|
408
429
|
Object.defineProperty(exports, "PostTrash", {
|
|
409
430
|
enumerable: true,
|
|
410
431
|
get: function () {
|
|
@@ -444,7 +465,7 @@ Object.defineProperty(exports, "PostURLLabel", {
|
|
|
444
465
|
Object.defineProperty(exports, "PostURLPanel", {
|
|
445
466
|
enumerable: true,
|
|
446
467
|
get: function () {
|
|
447
|
-
return
|
|
468
|
+
return _panel3.default;
|
|
448
469
|
}
|
|
449
470
|
});
|
|
450
471
|
Object.defineProperty(exports, "PostVisibility", {
|
|
@@ -552,6 +573,7 @@ var _parent = _interopRequireDefault(require("./page-attributes/parent"));
|
|
|
552
573
|
var _postTemplate = _interopRequireDefault(require("./post-template"));
|
|
553
574
|
var _postAuthor = _interopRequireDefault(require("./post-author"));
|
|
554
575
|
var _check3 = _interopRequireDefault(require("./post-author/check"));
|
|
576
|
+
var _panel = _interopRequireDefault(require("./post-author/panel"));
|
|
555
577
|
var _postComments = _interopRequireDefault(require("./post-comments"));
|
|
556
578
|
var _postExcerpt = _interopRequireDefault(require("./post-excerpt"));
|
|
557
579
|
var _check4 = _interopRequireDefault(require("./post-excerpt/check"));
|
|
@@ -573,6 +595,7 @@ var _postSavedState = _interopRequireDefault(require("./post-saved-state"));
|
|
|
573
595
|
var _postSchedule = _interopRequireDefault(require("./post-schedule"));
|
|
574
596
|
var _check9 = _interopRequireDefault(require("./post-schedule/check"));
|
|
575
597
|
var _label2 = _interopRequireWildcard(require("./post-schedule/label"));
|
|
598
|
+
var _panel2 = _interopRequireDefault(require("./post-schedule/panel"));
|
|
576
599
|
var _postSlug = _interopRequireDefault(require("./post-slug"));
|
|
577
600
|
var _check10 = _interopRequireDefault(require("./post-slug/check"));
|
|
578
601
|
var _postSticky = _interopRequireDefault(require("./post-sticky"));
|
|
@@ -585,13 +608,14 @@ var _hierarchicalTermSelector = require("./post-taxonomies/hierarchical-term-sel
|
|
|
585
608
|
var _check12 = _interopRequireDefault(require("./post-taxonomies/check"));
|
|
586
609
|
var _postTextEditor = _interopRequireDefault(require("./post-text-editor"));
|
|
587
610
|
var _postTitle = _interopRequireDefault(require("./post-title"));
|
|
611
|
+
var _postTitleRaw = _interopRequireDefault(require("./post-title/post-title-raw"));
|
|
588
612
|
var _postTrash = _interopRequireDefault(require("./post-trash"));
|
|
589
613
|
var _check13 = _interopRequireDefault(require("./post-trash/check"));
|
|
590
614
|
var _postTypeSupportCheck = _interopRequireDefault(require("./post-type-support-check"));
|
|
591
615
|
var _postUrl = _interopRequireDefault(require("./post-url"));
|
|
592
616
|
var _check14 = _interopRequireDefault(require("./post-url/check"));
|
|
593
617
|
var _label3 = _interopRequireWildcard(require("./post-url/label"));
|
|
594
|
-
var
|
|
618
|
+
var _panel3 = _interopRequireDefault(require("./post-url/panel"));
|
|
595
619
|
var _postVisibility = _interopRequireDefault(require("./post-visibility"));
|
|
596
620
|
var _label4 = _interopRequireWildcard(require("./post-visibility/label"));
|
|
597
621
|
var _check15 = _interopRequireDefault(require("./post-visibility/check"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_globalKeyboardShortcuts","_interopRequireDefault","require","_autocompleters","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_autosaveMonitor","_documentOutline","_check","_registerShortcuts","_redo","_undo","_editorNotices","_editorSnackbars","_entitiesSavedStates","_useIsDirty","_errorBoundary","_localAutosaveMonitor","_check2","_order","_parent","_postTemplate","_postAuthor","_check3","_postComments","_postExcerpt","_check4","_postFeaturedImage","_check5","_postFormat","_check6","_postLastRevision","_check7","_postLockedModal","_postPendingStatus","_check8","_postPingbacks","_postPreviewButton","_postPublishButton","_label","_postPublishPanel","_postSavedState","_postSchedule","_check9","_label2","_interopRequireWildcard","_postSlug","_check10","_postSticky","_check11","_postSwitchToDraftButton","_postSyncStatus","_postTaxonomies","_flatTermSelector","_hierarchicalTermSelector","_check12","_postTextEditor","_postTitle","_postTrash","_check13","_postTypeSupportCheck","_postUrl","_check14","_label3","_panel","_postVisibility","_label4","_check15","_tableOfContents","_themeSupportCheck","_unsavedChangesWarning","_wordCount","_timeToRead","_characterCount","_provider","_deprecated","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","VisualEditorGlobalKeyboardShortcuts","EditorKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"sources":["@wordpress/editor/src/components/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostComments } from './post-comments';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport {\n\tdefault as PostSyncStatus,\n\tPostSyncStatusModal,\n} from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualE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AAA;AACpE,MAAME,iCAAiC,GAAGD,gCAAuB;AAAC1F,OAAA,CAAA2F,iCAAA,GAAAA,iCAAA"}
|
|
1
|
+
{"version":3,"names":["_globalKeyboardShortcuts","_interopRequireDefault","require","_autocompleters","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_autosaveMonitor","_documentOutline","_check","_registerShortcuts","_redo","_undo","_editorNotices","_editorSnackbars","_entitiesSavedStates","_useIsDirty","_errorBoundary","_localAutosaveMonitor","_check2","_order","_parent","_postTemplate","_postAuthor","_check3","_panel","_postComments","_postExcerpt","_check4","_postFeaturedImage","_check5","_postFormat","_check6","_postLastRevision","_check7","_postLockedModal","_postPendingStatus","_check8","_postPingbacks","_postPreviewButton","_postPublishButton","_label","_postPublishPanel","_postSavedState","_postSchedule","_check9","_label2","_interopRequireWildcard","_panel2","_postSlug","_check10","_postSticky","_check11","_postSwitchToDraftButton","_postSyncStatus","_postTaxonomies","_flatTermSelector","_hierarchicalTermSelector","_check12","_postTextEditor","_postTitle","_postTitleRaw","_postTrash","_check13","_postTypeSupportCheck","_postUrl","_check14","_label3","_panel3","_postVisibility","_label4","_check15","_tableOfContents","_themeSupportCheck","_unsavedChangesWarning","_wordCount","_timeToRead","_characterCount","_provider","_deprecated","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set","VisualEditorGlobalKeyboardShortcuts","EditorKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts"],"sources":["@wordpress/editor/src/components/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostAuthorPanel } from './post-author/panel';\nexport { default as PostComments } from './post-comments';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSchedulePanel } from './post-schedule/panel';\nexport { default as PostSlug } from './post-slug';\nexport { default as PostSlugCheck } from './post-slug/check';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport {\n\tdefault as PostSyncStatus,\n\tPostSyncStatusModal,\n} from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTitleRaw } from './post-title/post-title-raw';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC7F,OAAA,CAAA4F,mCAAA,GAAAA,mCAAA;AACpE,MAAME,iCAAiC,GAAGD,gCAAuB;AAAC7F,OAAA,CAAA8F,iCAAA,GAAAA,iCAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.PostAuthor = PostAuthor;
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _check = _interopRequireDefault(require("./check"));
|
|
11
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
12
|
+
var _postPanelRow = _interopRequireDefault(require("../post-panel-row"));
|
|
13
|
+
/**
|
|
14
|
+
* Internal dependencies
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
function PostAuthor() {
|
|
18
|
+
return (0, _react.createElement)(_check.default, null, (0, _react.createElement)(_postPanelRow.default, {
|
|
19
|
+
className: "editor-post-author__panel"
|
|
20
|
+
}, (0, _react.createElement)(_index.default, null)));
|
|
21
|
+
}
|
|
22
|
+
var _default = PostAuthor;
|
|
23
|
+
exports.default = _default;
|
|
24
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_check","_interopRequireDefault","require","_index","_postPanelRow","PostAuthor","_react","createElement","default","className","_default","exports"],"sources":["@wordpress/editor/src/components/post-author/panel.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\n\nexport function PostAuthor() {\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PostPanelRow className=\"editor-post-author__panel\">\n\t\t\t\t<PostAuthorForm />\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],"mappings":";;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AALA;AACA;AACA;;AAKO,SAASG,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACP,MAAA,CAAAQ,OAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACH,aAAA,CAAAI,OAAY;IAACC,SAAS,EAAC;EAA2B,GAClD,IAAAH,MAAA,CAAAC,aAAA,EAACJ,MAAA,CAAAK,OAAc,MAAE,CACJ,CACE,CAAC;AAEpB;AAAC,IAAAE,QAAA,GAEcL,UAAU;AAAAM,OAAA,CAAAH,OAAA,GAAAE,QAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _components = require("@wordpress/components");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
12
|
+
/**
|
|
13
|
+
* External dependencies
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* WordPress dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
const PostPanelRow = (0, _element.forwardRef)(({
|
|
21
|
+
className,
|
|
22
|
+
label,
|
|
23
|
+
children
|
|
24
|
+
}, ref) => {
|
|
25
|
+
return (0, _react.createElement)(_components.__experimentalHStack, {
|
|
26
|
+
className: (0, _classnames.default)('editor-post-panel__row', className),
|
|
27
|
+
ref: ref
|
|
28
|
+
}, label && (0, _react.createElement)("div", {
|
|
29
|
+
className: "editor-post-panel__row-label"
|
|
30
|
+
}, label), (0, _react.createElement)("div", {
|
|
31
|
+
className: "editor-post-panel__row-control"
|
|
32
|
+
}, children));
|
|
33
|
+
});
|
|
34
|
+
var _default = PostPanelRow;
|
|
35
|
+
exports.default = _default;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_element","PostPanelRow","forwardRef","className","label","children","ref","_react","createElement","__experimentalHStack","classnames","_default","exports","default"],"sources":["@wordpress/editor/src/components/post-panel-row/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\n\nconst PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ classnames( 'editor-post-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label && (\n\t\t\t\t<div className=\"editor-post-panel__row-label\">{ label }</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-post-panel__row-control\">{ children }</div>\n\t\t</HStack>\n\t);\n} );\n\nexport default PostPanelRow;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA,MAAMG,YAAY,GAAG,IAAAC,mBAAU,EAAE,CAAE;EAAEC,SAAS;EAAEC,KAAK;EAAEC;AAAS,CAAC,EAAEC,GAAG,KAAM;EAC3E,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACT,WAAA,CAAAU,oBAAM;IACNN,SAAS,EAAG,IAAAO,mBAAU,EAAE,wBAAwB,EAAEP,SAAU,CAAG;IAC/DG,GAAG,EAAGA;EAAK,GAETF,KAAK,IACN,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAA8B,GAAGC,KAAY,CAC5D,EACD,IAAAG,MAAA,CAAAC,aAAA;IAAKL,SAAS,EAAC;EAAgC,GAAGE,QAAe,CAC1D,CAAC;AAEX,CAAE,CAAC;AAAC,IAAAM,QAAA,GAEWV,YAAY;AAAAW,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -120,10 +120,27 @@ function PostSavedState({
|
|
|
120
120
|
} else if (showIconLabels) {
|
|
121
121
|
text = shortLabel;
|
|
122
122
|
}
|
|
123
|
+
const buttonAccessibleLabel = text || label;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The tooltip needs to be enabled only if the button is not disabled. When
|
|
127
|
+
* relying on the internal Button tooltip functionality, this causes the
|
|
128
|
+
* resulting `button` element to be always removed and re-added to the DOM,
|
|
129
|
+
* causing focus loss. An alternative approach to circumvent the issue
|
|
130
|
+
* is not to use the `label` and `shortcut` props on `Button` (which would
|
|
131
|
+
* trigger the tooltip), and instead manually wrap the `Button` in a separate
|
|
132
|
+
* `Tooltip` component.
|
|
133
|
+
*/
|
|
134
|
+
const tooltipProps = isDisabled ? undefined : {
|
|
135
|
+
text: buttonAccessibleLabel,
|
|
136
|
+
shortcut: _keycodes.displayShortcut.primary('s')
|
|
137
|
+
};
|
|
123
138
|
|
|
124
139
|
// Use common Button instance for all saved states so that focus is not
|
|
125
140
|
// lost.
|
|
126
|
-
return (0, _react.createElement)(_components.
|
|
141
|
+
return (0, _react.createElement)(_components.Tooltip, {
|
|
142
|
+
...tooltipProps
|
|
143
|
+
}, (0, _react.createElement)(_components.Button, {
|
|
127
144
|
className: isSaveable || isSaving ? (0, _classnames.default)({
|
|
128
145
|
'editor-post-save-draft': !isSavedState,
|
|
129
146
|
'editor-post-saved-state': isSavedState,
|
|
@@ -134,27 +151,15 @@ function PostSavedState({
|
|
|
134
151
|
type: 'loading'
|
|
135
152
|
})]: isSaving
|
|
136
153
|
}) : undefined,
|
|
137
|
-
onClick: isDisabled ? undefined : () => savePost()
|
|
138
|
-
/*
|
|
139
|
-
* We want the tooltip to show the keyboard shortcut only when the
|
|
140
|
-
* button does something, i.e. when it's not disabled.
|
|
141
|
-
*/,
|
|
142
|
-
shortcut: isDisabled ? undefined : _keycodes.displayShortcut.primary('s')
|
|
143
|
-
/*
|
|
144
|
-
* Displaying the keyboard shortcut conditionally makes the tooltip
|
|
145
|
-
* itself show conditionally. This would trigger a full-rerendering
|
|
146
|
-
* of the button that we want to avoid. By setting `showTooltip`,
|
|
147
|
-
& the tooltip is always rendered even when there's no keyboard shortcut.
|
|
148
|
-
*/,
|
|
149
|
-
showTooltip: true,
|
|
154
|
+
onClick: isDisabled ? undefined : () => savePost(),
|
|
150
155
|
variant: "tertiary",
|
|
151
156
|
icon: isLargeViewport ? undefined : _icons.cloudUpload
|
|
152
157
|
// Make sure the aria-label has always a value, as the default `text` is undefined on small screens.
|
|
153
158
|
,
|
|
154
|
-
label:
|
|
159
|
+
"aria-label": buttonAccessibleLabel,
|
|
155
160
|
"aria-disabled": isDisabled
|
|
156
161
|
}, isSavedState && (0, _react.createElement)(_icons.Icon, {
|
|
157
162
|
icon: isSaved ? _icons.check : _icons.cloud
|
|
158
|
-
}), text);
|
|
163
|
+
}), text));
|
|
159
164
|
}
|
|
160
165
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_compose","_data","_element","_i18n","_icons","_keycodes","_store","PostSavedState","forceIsDirty","showIconLabels","forceSavedMessage","setForceSavedMessage","useState","isLargeViewport","useViewportMatch","isAutosaving","isDirty","isNew","isPending","isPublished","isSaveable","isSaving","isScheduled","hasPublishAction","useSelect","select","_getCurrentPost$_link","isEditedPostNew","isCurrentPostPublished","isCurrentPostScheduled","isEditedPostDirty","isSavingPost","isEditedPostSaveable","getCurrentPost","isAutosavingPost","getEditedPostAttribute","editorStore","_links","savePost","useDispatch","wasSaving","usePrevious","useEffect","timeoutId","setTimeout","clearTimeout","label","__","shortLabel","isSaved","isSavedState","isDisabled","text","_react","createElement","Button","className","classnames","getAnimateClassName","type","undefined","onClick","shortcut","displayShortcut","primary","showTooltip","variant","icon","cloudUpload","Icon","check","cloud"],"sources":["@wordpress/editor/src/components/post-saved-state/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tButton,\n} from '@wordpress/components';\nimport { usePrevious, useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, cloud, cloudUpload } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component showing whether the post is saved or not and providing save\n * buttons.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.forceIsDirty Whether to force the post to be marked\n * as dirty.\n * @param {?boolean} props.showIconLabels Whether interface buttons show labels instead of icons\n * @return {import('react').ComponentType} The component.\n */\nexport default function PostSavedState( {\n\tforceIsDirty,\n\tshowIconLabels = false,\n} ) {\n\tconst [ forceSavedMessage, setForceSavedMessage ] = useState( false );\n\tconst isLargeViewport = useViewportMatch( 'small' );\n\n\tconst {\n\t\tisAutosaving,\n\t\tisDirty,\n\t\tisNew,\n\t\tisPending,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisScheduled,\n\t\thasPublishAction,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisEditedPostNew,\n\t\t\t\tisCurrentPostPublished,\n\t\t\t\tisCurrentPostScheduled,\n\t\t\t\tisEditedPostDirty,\n\t\t\t\tisSavingPost,\n\t\t\t\tisEditedPostSaveable,\n\t\t\t\tgetCurrentPost,\n\t\t\t\tisAutosavingPost,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t} = select( editorStore );\n\n\t\t\treturn {\n\t\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\t\tisNew: isEditedPostNew(),\n\t\t\t\tisPending: 'pending' === getEditedPostAttribute( 'status' ),\n\t\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\t\tisSaving: isSavingPost(),\n\t\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\t\thasPublishAction:\n\t\t\t\t\tgetCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[ forceIsDirty ]\n\t);\n\n\tconst { savePost } = useDispatch( editorStore );\n\n\tconst wasSaving = usePrevious( isSaving );\n\n\tuseEffect( () => {\n\t\tlet timeoutId;\n\n\t\tif ( wasSaving && ! isSaving ) {\n\t\t\tsetForceSavedMessage( true );\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tsetForceSavedMessage( false );\n\t\t\t}, 1000 );\n\t\t}\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [ isSaving ] );\n\n\t// Once the post has been submitted for review this button\n\t// is not needed for the contributor role.\n\tif ( ! hasPublishAction && isPending ) {\n\t\treturn null;\n\t}\n\n\tif ( isPublished || isScheduled ) {\n\t\treturn null;\n\t}\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst label = isPending ? __( 'Save as pending' ) : __( 'Save draft' );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst shortLabel = __( 'Save' );\n\n\tconst isSaved = forceSavedMessage || ( ! isNew && ! isDirty );\n\tconst isSavedState = isSaving || isSaved;\n\tconst isDisabled = isSaving || isSaved || ! isSaveable;\n\n\tlet text;\n\n\tif ( isSaving ) {\n\t\ttext = isAutosaving ? __( 'Autosaving' ) : __( 'Saving' );\n\t} else if ( isSaved ) {\n\t\ttext = __( 'Saved' );\n\t} else if ( isLargeViewport ) {\n\t\ttext = label;\n\t} else if ( showIconLabels ) {\n\t\ttext = shortLabel;\n\t}\n\n\t// Use common Button instance for all saved states so that focus is not\n\t// lost.\n\treturn (\n\t\t<Button\n\t\t\tclassName={\n\t\t\t\tisSaveable || isSaving\n\t\t\t\t\t? classnames( {\n\t\t\t\t\t\t\t'editor-post-save-draft': ! isSavedState,\n\t\t\t\t\t\t\t'editor-post-saved-state': isSavedState,\n\t\t\t\t\t\t\t'is-saving': isSaving,\n\t\t\t\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t\t\t\t\t'is-saved': isSaved,\n\t\t\t\t\t\t\t[ getAnimateClassName( {\n\t\t\t\t\t\t\t\ttype: 'loading',\n\t\t\t\t\t\t\t} ) ]: isSaving,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tonClick={ isDisabled ? undefined : () => savePost() }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ isDisabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\t/*\n\t\t\t * Displaying the keyboard shortcut conditionally makes the tooltip\n\t\t\t * itself show conditionally. This would trigger a full-rerendering\n\t\t\t * of the button that we want to avoid. By setting `showTooltip`,\n\t\t\t & the tooltip is always rendered even when there's no keyboard shortcut.\n\t\t\t */\n\t\t\tshowTooltip\n\t\t\tvariant=\"tertiary\"\n\t\t\ticon={ isLargeViewport ? undefined : cloudUpload }\n\t\t\t// Make sure the aria-label has always a value, as the default `text` is undefined on small screens.\n\t\t\tlabel={ text || label }\n\t\t\taria-disabled={ isDisabled }\n\t\t>\n\t\t\t{ isSavedState && <Icon icon={ isSaved ? check : cloud } /> }\n\t\t\t{ text }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBA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MAAA,CAAAiE,IAAI;IAACF,IAAI,EAAGlB,OAAO,GAAGqB,YAAK,GAAGC;EAAO,CAAE,CAAC,EACzDnB,IACK,CAAC;AAEX"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_components","_compose","_data","_element","_i18n","_icons","_keycodes","_store","PostSavedState","forceIsDirty","showIconLabels","forceSavedMessage","setForceSavedMessage","useState","isLargeViewport","useViewportMatch","isAutosaving","isDirty","isNew","isPending","isPublished","isSaveable","isSaving","isScheduled","hasPublishAction","useSelect","select","_getCurrentPost$_link","isEditedPostNew","isCurrentPostPublished","isCurrentPostScheduled","isEditedPostDirty","isSavingPost","isEditedPostSaveable","getCurrentPost","isAutosavingPost","getEditedPostAttribute","editorStore","_links","savePost","useDispatch","wasSaving","usePrevious","useEffect","timeoutId","setTimeout","clearTimeout","label","__","shortLabel","isSaved","isSavedState","isDisabled","text","buttonAccessibleLabel","tooltipProps","undefined","shortcut","displayShortcut","primary","_react","createElement","Tooltip","Button","className","classnames","getAnimateClassName","type","onClick","variant","icon","cloudUpload","Icon","check","cloud"],"sources":["@wordpress/editor/src/components/post-saved-state/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tButton,\n\tTooltip,\n} from '@wordpress/components';\nimport { usePrevious, useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, cloud, cloudUpload } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component showing whether the post is saved or not and providing save\n * buttons.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.forceIsDirty Whether to force the post to be marked\n * as dirty.\n * @param {?boolean} props.showIconLabels Whether interface buttons show labels instead of icons\n * @return {import('react').ComponentType} The component.\n */\nexport default function PostSavedState( {\n\tforceIsDirty,\n\tshowIconLabels = false,\n} ) {\n\tconst [ forceSavedMessage, setForceSavedMessage ] = useState( false );\n\tconst isLargeViewport = useViewportMatch( 'small' );\n\n\tconst {\n\t\tisAutosaving,\n\t\tisDirty,\n\t\tisNew,\n\t\tisPending,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisScheduled,\n\t\thasPublishAction,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisEditedPostNew,\n\t\t\t\tisCurrentPostPublished,\n\t\t\t\tisCurrentPostScheduled,\n\t\t\t\tisEditedPostDirty,\n\t\t\t\tisSavingPost,\n\t\t\t\tisEditedPostSaveable,\n\t\t\t\tgetCurrentPost,\n\t\t\t\tisAutosavingPost,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t} = select( editorStore );\n\n\t\t\treturn {\n\t\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\t\tisNew: isEditedPostNew(),\n\t\t\t\tisPending: 'pending' === getEditedPostAttribute( 'status' ),\n\t\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\t\tisSaving: isSavingPost(),\n\t\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\t\thasPublishAction:\n\t\t\t\t\tgetCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[ forceIsDirty ]\n\t);\n\n\tconst { savePost } = useDispatch( editorStore );\n\n\tconst wasSaving = usePrevious( isSaving );\n\n\tuseEffect( () => {\n\t\tlet timeoutId;\n\n\t\tif ( wasSaving && ! isSaving ) {\n\t\t\tsetForceSavedMessage( true );\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tsetForceSavedMessage( false );\n\t\t\t}, 1000 );\n\t\t}\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [ isSaving ] );\n\n\t// Once the post has been submitted for review this button\n\t// is not needed for the contributor role.\n\tif ( ! hasPublishAction && isPending ) {\n\t\treturn null;\n\t}\n\n\tif ( isPublished || isScheduled ) {\n\t\treturn null;\n\t}\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst label = isPending ? __( 'Save as pending' ) : __( 'Save draft' );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst shortLabel = __( 'Save' );\n\n\tconst isSaved = forceSavedMessage || ( ! isNew && ! isDirty );\n\tconst isSavedState = isSaving || isSaved;\n\tconst isDisabled = isSaving || isSaved || ! isSaveable;\n\n\tlet text;\n\n\tif ( isSaving ) {\n\t\ttext = isAutosaving ? __( 'Autosaving' ) : __( 'Saving' );\n\t} else if ( isSaved ) {\n\t\ttext = __( 'Saved' );\n\t} else if ( isLargeViewport ) {\n\t\ttext = label;\n\t} else if ( showIconLabels ) {\n\t\ttext = shortLabel;\n\t}\n\n\tconst buttonAccessibleLabel = text || label;\n\n\t/**\n\t * The tooltip needs to be enabled only if the button is not disabled. When\n\t * relying on the internal Button tooltip functionality, this causes the\n\t * resulting `button` element to be always removed and re-added to the DOM,\n\t * causing focus loss. An alternative approach to circumvent the issue\n\t * is not to use the `label` and `shortcut` props on `Button` (which would\n\t * trigger the tooltip), and instead manually wrap the `Button` in a separate\n\t * `Tooltip` component.\n\t */\n\tconst tooltipProps = isDisabled\n\t\t? undefined\n\t\t: {\n\t\t\t\ttext: buttonAccessibleLabel,\n\t\t\t\tshortcut: displayShortcut.primary( 's' ),\n\t\t };\n\n\t// Use common Button instance for all saved states so that focus is not\n\t// lost.\n\treturn (\n\t\t<Tooltip { ...tooltipProps }>\n\t\t\t<Button\n\t\t\t\tclassName={\n\t\t\t\t\tisSaveable || isSaving\n\t\t\t\t\t\t? classnames( {\n\t\t\t\t\t\t\t\t'editor-post-save-draft': ! isSavedState,\n\t\t\t\t\t\t\t\t'editor-post-saved-state': isSavedState,\n\t\t\t\t\t\t\t\t'is-saving': isSaving,\n\t\t\t\t\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t\t\t\t\t\t'is-saved': isSaved,\n\t\t\t\t\t\t\t\t[ getAnimateClassName( {\n\t\t\t\t\t\t\t\t\ttype: 'loading',\n\t\t\t\t\t\t\t\t} ) ]: isSaving,\n\t\t\t\t\t\t } )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={ isDisabled ? undefined : () => savePost() }\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\ticon={ isLargeViewport ? undefined : cloudUpload }\n\t\t\t\t// Make sure the aria-label has always a value, as the default `text` is undefined on small screens.\n\t\t\t\taria-label={ buttonAccessibleLabel }\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t>\n\t\t\t\t{ isSavedState && <Icon icon={ isSaved ? check : cloud } /> }\n\t\t\t\t{ text }\n\t\t\t</Button>\n\t\t</Tooltip>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAKA,IAAAQ,MAAA,GAAAR,OAAA;AAvBA;AACA;AACA;;AAGA;AACA;AACA;;AAaA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASS,cAAcA,CAAE;EACvCC,YAAY;EACZC,cAAc,GAAG;AAClB,CAAC,EAAG;EACH,MAAM,CAAEC,iBAAiB,EAAEC,oBAAoB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EACrE,MAAMC,eAAe,GAAG,IAAAC,yBAAgB,EA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AEC,qBAAqB;IAC3BG,QAAQ,EAAEC,yBAAe,CAACC,OAAO,CAAE,GAAI;EACvC,CAAC;;EAEJ;EACA;EACA,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAA8D,OAAO;IAAA,GAAMP;EAAY,GACzB,IAAAK,MAAA,CAAAC,aAAA,EAAC7D,WAAA,CAAA+D,MAAM;IACNC,SAAS,EACR3C,UAAU,IAAIC,QAAQ,GACnB,IAAA2C,mBAAU,EAAE;MACZ,wBAAwB,EAAE,CAAEd,YAAY;MACxC,yBAAyB,EAAEA,YAAY;MACvC,WAAW,EAAE7B,QAAQ;MACrB,eAAe,EAAEN,YAAY;MAC7B,UAAU,EAAEkC,OAAO;MACnB,CAAE,IAAAgB,yCAAmB,EAAE;QACtBC,IAAI,EAAE;MACP,CAAE,CAAC,GAAI7C;IACP,CAAE,CAAC,GACHkC,SACH;IACDY,OAAO,EAAGhB,UAAU,GAAGI,SAAS,GAAG,MAAMjB,QAAQ,CAAC,CAAG;IACrD8B,OAAO,EAAC,UAAU;IAClBC,IAAI,EAAGxD,eAAe,GAAG0C,SAAS,GAAGe;IACrC;IAAA;IACA,cAAajB,qBAAuB;IACpC,iBAAgBF;EAAY,GAE1BD,YAAY,IAAI,IAAAS,MAAA,CAAAC,aAAA,EAACxD,MAAA,CAAAmE,IAAI;IAACF,IAAI,EAAGpB,OAAO,GAAGuB,YAAK,GAAGC;EAAO,CAAE,CAAC,EACzDrB,IACK,CACA,CAAC;AAEZ"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = PostSchedulePanel;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _components = require("@wordpress/components");
|
|
10
|
+
var _i18n = require("@wordpress/i18n");
|
|
11
|
+
var _element = require("@wordpress/element");
|
|
12
|
+
var _check = _interopRequireDefault(require("./check"));
|
|
13
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
14
|
+
var _label = require("./label");
|
|
15
|
+
var _postPanelRow = _interopRequireDefault(require("../post-panel-row"));
|
|
16
|
+
/**
|
|
17
|
+
* WordPress dependencies
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Internal dependencies
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
function PostSchedulePanel() {
|
|
25
|
+
const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null);
|
|
26
|
+
// Memoize popoverProps to avoid returning a new object every time.
|
|
27
|
+
const popoverProps = (0, _element.useMemo)(() => ({
|
|
28
|
+
// Anchor the popover to the middle of the entire row so that it doesn't
|
|
29
|
+
// move around when the label changes.
|
|
30
|
+
anchor: popoverAnchor,
|
|
31
|
+
'aria-label': (0, _i18n.__)('Change publish date'),
|
|
32
|
+
placement: 'bottom-end'
|
|
33
|
+
}), [popoverAnchor]);
|
|
34
|
+
const label = (0, _label.usePostScheduleLabel)();
|
|
35
|
+
const fullLabel = (0, _label.usePostScheduleLabel)({
|
|
36
|
+
full: true
|
|
37
|
+
});
|
|
38
|
+
return (0, _react.createElement)(_check.default, null, (0, _react.createElement)(_postPanelRow.default, {
|
|
39
|
+
label: (0, _i18n.__)('Publish'),
|
|
40
|
+
ref: setPopoverAnchor
|
|
41
|
+
}, (0, _react.createElement)(_components.Dropdown, {
|
|
42
|
+
popoverProps: popoverProps,
|
|
43
|
+
focusOnMount: true,
|
|
44
|
+
className: "editor-post-schedule__panel-dropdown",
|
|
45
|
+
contentClassName: "editor-post-schedule__dialog",
|
|
46
|
+
renderToggle: ({
|
|
47
|
+
onToggle,
|
|
48
|
+
isOpen
|
|
49
|
+
}) => (0, _react.createElement)(_components.Button, {
|
|
50
|
+
className: "editor-post-schedule__dialog-toggle",
|
|
51
|
+
variant: "tertiary",
|
|
52
|
+
onClick: onToggle,
|
|
53
|
+
"aria-label": (0, _i18n.sprintf)(
|
|
54
|
+
// translators: %s: Current post date.
|
|
55
|
+
(0, _i18n.__)('Change date: %s'), label),
|
|
56
|
+
label: fullLabel,
|
|
57
|
+
showTooltip: true,
|
|
58
|
+
"aria-expanded": isOpen
|
|
59
|
+
}, label),
|
|
60
|
+
renderContent: ({
|
|
61
|
+
onClose
|
|
62
|
+
}) => (0, _react.createElement)(_index.default, {
|
|
63
|
+
onClose: onClose
|
|
64
|
+
})
|
|
65
|
+
})));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_components","require","_i18n","_element","_check","_interopRequireDefault","_index","_label","_postPanelRow","PostSchedulePanel","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","__","placement","label","usePostScheduleLabel","fullLabel","full","_react","createElement","default","ref","Dropdown","focusOnMount","className","contentClassName","renderToggle","onToggle","isOpen","Button","variant","onClick","sprintf","showTooltip","renderContent","onClose"],"sources":["@wordpress/editor/src/components/post-schedule/panel.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleCheck from './check';\nimport PostScheduleForm from './index';\nimport { usePostScheduleLabel } from './label';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostSchedulePanel() {\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Change publish date' ),\n\t\t\tplacement: 'bottom-end',\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PostPanelRow label={ __( 'Publish' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\tclassName=\"editor-post-schedule__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-post-schedule__dialog-toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post date.\n\t\t\t\t\t\t\t\t__( 'Change date: %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlabel={ fullLabel }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostScheduleForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAA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gBL;IAAQ,GAEtBd,KACK,CACN;IACHoB,aAAa,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KAC5B,IAAAjB,MAAA,CAAAC,aAAA,EAACjB,MAAA,CAAAkB,OAAgB;MAACe,OAAO,EAAGA;IAAS,CAAE;EACrC,CACH,CACY,CACI,CAAC;AAEtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -11,6 +12,7 @@ var _i18n = require("@wordpress/i18n");
|
|
|
11
12
|
var _components = require("@wordpress/components");
|
|
12
13
|
var _element = require("@wordpress/element");
|
|
13
14
|
var _blockEditor = require("@wordpress/block-editor");
|
|
15
|
+
var _postPanelRow = _interopRequireDefault(require("../post-panel-row"));
|
|
14
16
|
var _store = require("../../store");
|
|
15
17
|
var _lockUnlock = require("../../lock-unlock");
|
|
16
18
|
/**
|
|
@@ -44,9 +46,11 @@ function PostSyncStatus() {
|
|
|
44
46
|
if (postType !== 'wp_block') {
|
|
45
47
|
return null;
|
|
46
48
|
}
|
|
47
|
-
return (0, _react.createElement)(
|
|
48
|
-
|
|
49
|
-
}, (0, _react.createElement)("
|
|
49
|
+
return (0, _react.createElement)(_postPanelRow.default, {
|
|
50
|
+
label: (0, _i18n.__)('Sync status')
|
|
51
|
+
}, (0, _react.createElement)("div", {
|
|
52
|
+
className: "editor-post-sync-status__value"
|
|
53
|
+
}, syncStatus === 'unsynced' ? (0, _i18n.__)('Not synced') : (0, _i18n.__)('Fully synced')));
|
|
50
54
|
}
|
|
51
55
|
function PostSyncStatusModal() {
|
|
52
56
|
const {
|
|
@@ -100,7 +104,7 @@ function PostSyncStatusModal() {
|
|
|
100
104
|
spacing: "5"
|
|
101
105
|
}, (0, _react.createElement)(ReusableBlocksRenameHint, null), (0, _react.createElement)(_components.ToggleControl, {
|
|
102
106
|
label: (0, _i18n._x)('Synced', 'Option that makes an individual pattern synchronized'),
|
|
103
|
-
help: (0, _i18n.__)('
|
|
107
|
+
help: (0, _i18n.__)('Sync this pattern across multiple locations.'),
|
|
104
108
|
checked: !syncType,
|
|
105
109
|
onChange: () => {
|
|
106
110
|
setSyncType(!syncType ? 'unsynced' : undefined);
|