@wordpress/edit-post 7.22.0 → 7.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 +4 -0
- package/build/components/device-preview/index.js +6 -3
- package/build/components/device-preview/index.js.map +1 -1
- package/build/components/header/document-actions/index.js +3 -7
- package/build/components/header/document-actions/index.js.map +1 -1
- package/build/components/header/header-toolbar/index.js +3 -8
- package/build/components/header/header-toolbar/index.js.map +1 -1
- package/build/components/header/index.js +65 -11
- package/build/components/header/index.js.map +1 -1
- package/build/components/header/writing-menu/index.js +1 -1
- package/build/components/header/writing-menu/index.js.map +1 -1
- package/build/components/keyboard-shortcuts/index.js +2 -4
- package/build/components/keyboard-shortcuts/index.js.map +1 -1
- package/build/components/preferences-modal/index.js +1 -1
- package/build/components/preferences-modal/index.js.map +1 -1
- package/build/components/sidebar/post-pending-status/index.js +9 -2
- package/build/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build/components/sidebar/post-status/index.js +1 -4
- package/build/components/sidebar/post-status/index.js.map +1 -1
- package/build/components/sidebar/post-sticky/index.js +9 -2
- package/build/components/sidebar/post-sticky/index.js.map +1 -1
- package/build/components/sidebar/post-template/index.js +7 -4
- package/build/components/sidebar/post-template/index.js.map +1 -1
- package/build/components/sidebar/post-visibility/index.js +12 -4
- package/build/components/sidebar/post-visibility/index.js.map +1 -1
- package/build/components/start-page-options/index.js +11 -13
- package/build/components/start-page-options/index.js.map +1 -1
- package/build/components/text-editor/index.js +21 -1
- package/build/components/text-editor/index.js.map +1 -1
- package/build/components/view-link/index.js +11 -3
- package/build/components/view-link/index.js.map +1 -1
- package/build/components/visual-editor/index.js +5 -1
- package/build/components/visual-editor/index.js.map +1 -1
- package/build/store/actions.js +1 -1
- package/build/store/actions.js.map +1 -1
- package/build-module/components/device-preview/index.js +6 -3
- package/build-module/components/device-preview/index.js.map +1 -1
- package/build-module/components/header/document-actions/index.js +3 -7
- package/build-module/components/header/document-actions/index.js.map +1 -1
- package/build-module/components/header/header-toolbar/index.js +3 -8
- package/build-module/components/header/header-toolbar/index.js.map +1 -1
- package/build-module/components/header/index.js +66 -12
- package/build-module/components/header/index.js.map +1 -1
- package/build-module/components/header/writing-menu/index.js +1 -1
- package/build-module/components/header/writing-menu/index.js.map +1 -1
- package/build-module/components/keyboard-shortcuts/index.js +2 -4
- package/build-module/components/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/components/preferences-modal/index.js +1 -1
- package/build-module/components/preferences-modal/index.js.map +1 -1
- package/build-module/components/sidebar/post-pending-status/index.js +10 -3
- package/build-module/components/sidebar/post-pending-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-status/index.js +2 -5
- package/build-module/components/sidebar/post-status/index.js.map +1 -1
- package/build-module/components/sidebar/post-sticky/index.js +10 -3
- package/build-module/components/sidebar/post-sticky/index.js.map +1 -1
- package/build-module/components/sidebar/post-template/index.js +9 -6
- package/build-module/components/sidebar/post-template/index.js.map +1 -1
- package/build-module/components/sidebar/post-visibility/index.js +14 -6
- package/build-module/components/sidebar/post-visibility/index.js.map +1 -1
- package/build-module/components/start-page-options/index.js +12 -14
- package/build-module/components/start-page-options/index.js.map +1 -1
- package/build-module/components/text-editor/index.js +22 -2
- package/build-module/components/text-editor/index.js.map +1 -1
- package/build-module/components/view-link/index.js +11 -3
- package/build-module/components/view-link/index.js.map +1 -1
- package/build-module/components/visual-editor/index.js +5 -1
- package/build-module/components/visual-editor/index.js.map +1 -1
- package/build-module/store/actions.js +1 -1
- package/build-module/store/actions.js.map +1 -1
- package/build-style/style-rtl.css +31 -185
- package/build-style/style.css +31 -185
- package/package.json +32 -32
- package/src/components/device-preview/index.js +21 -15
- package/src/components/header/document-actions/index.js +4 -7
- package/src/components/header/header-toolbar/index.js +1 -5
- package/src/components/header/index.js +104 -17
- package/src/components/header/style.scss +31 -2
- package/src/components/header/writing-menu/index.js +1 -1
- package/src/components/keyboard-shortcuts/index.js +6 -3
- package/src/components/layout/style.scss +0 -11
- package/src/components/preferences-modal/index.js +1 -1
- package/src/components/sidebar/post-pending-status/index.js +10 -3
- package/src/components/sidebar/post-status/index.js +11 -8
- package/src/components/sidebar/post-sticky/index.js +10 -3
- package/src/components/sidebar/post-template/index.js +10 -6
- package/src/components/sidebar/post-template/style.scss +0 -16
- package/src/components/sidebar/post-visibility/index.js +12 -5
- package/src/components/sidebar/post-visibility/style.scss +0 -12
- package/src/components/start-page-options/index.js +8 -15
- package/src/components/text-editor/index.js +20 -2
- package/src/components/text-editor/style.scss +3 -1
- package/src/components/view-link/index.js +21 -10
- package/src/components/visual-editor/index.js +7 -0
- package/src/components/visual-editor/style.scss +0 -90
- package/src/store/actions.js +1 -1
- package/src/store/test/actions.js +1 -1
- package/src/style.scss +0 -3
- package/build/components/sidebar/post-author/index.js +0 -22
- package/build/components/sidebar/post-author/index.js.map +0 -1
- package/build/components/sidebar/post-schedule/index.js +0 -66
- package/build/components/sidebar/post-schedule/index.js.map +0 -1
- package/build/components/sidebar/post-url/index.js +0 -62
- package/build/components/sidebar/post-url/index.js.map +0 -1
- package/build-module/components/sidebar/post-author/index.js +0 -13
- package/build-module/components/sidebar/post-author/index.js.map +0 -1
- package/build-module/components/sidebar/post-schedule/index.js +0 -59
- package/build-module/components/sidebar/post-schedule/index.js.map +0 -1
- package/build-module/components/sidebar/post-url/index.js +0 -55
- package/build-module/components/sidebar/post-url/index.js.map +0 -1
- package/src/components/sidebar/post-author/index.js +0 -20
- package/src/components/sidebar/post-author/style.scss +0 -5
- package/src/components/sidebar/post-schedule/index.js +0 -66
- package/src/components/sidebar/post-schedule/style.scss +0 -34
- package/src/components/sidebar/post-url/index.js +0 -58
- package/src/components/sidebar/post-url/style.scss +0 -26
package/src/style.scss
CHANGED
|
@@ -10,12 +10,9 @@
|
|
|
10
10
|
@import "./components/secondary-sidebar/style.scss";
|
|
11
11
|
@import "./components/sidebar/style.scss";
|
|
12
12
|
@import "./components/sidebar/last-revision/style.scss";
|
|
13
|
-
@import "./components/sidebar/post-author/style.scss";
|
|
14
13
|
@import "./components/sidebar/post-format/style.scss";
|
|
15
|
-
@import "./components/sidebar/post-schedule/style.scss";
|
|
16
14
|
@import "./components/sidebar/post-slug/style.scss";
|
|
17
15
|
@import "./components/sidebar/post-template/style.scss";
|
|
18
|
-
@import "./components/sidebar/post-url/style.scss";
|
|
19
16
|
@import "./components/sidebar/post-visibility/style.scss";
|
|
20
17
|
@import "./components/sidebar/settings-header/style.scss";
|
|
21
18
|
@import "./components/sidebar/template-summary/style.scss";
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PostAuthor = PostAuthor;
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _editor = require("@wordpress/editor");
|
|
11
|
-
/**
|
|
12
|
-
* WordPress dependencies
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
function PostAuthor() {
|
|
16
|
-
return (0, _react.createElement)(_editor.PostAuthorCheck, null, (0, _react.createElement)(_components.PanelRow, {
|
|
17
|
-
className: "edit-post-post-author"
|
|
18
|
-
}, (0, _react.createElement)(_editor.PostAuthor, null)));
|
|
19
|
-
}
|
|
20
|
-
var _default = PostAuthor;
|
|
21
|
-
exports.default = _default;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","_editor","PostAuthor","_react","createElement","PostAuthorCheck","PanelRow","className","_default","exports","default"],"sources":["@wordpress/edit-post/src/components/sidebar/post-author/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostAuthor as PostAuthorForm,\n\tPostAuthorCheck,\n} from '@wordpress/editor';\n\nexport function PostAuthor() {\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PanelRow className=\"edit-post-post-author\">\n\t\t\t\t<PostAuthorForm />\n\t\t\t</PanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAJA;AACA;AACA;;AAOO,SAASE,UAAUA,CAAA,EAAG;EAC5B,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAI,eAAe,QACf,IAAAF,MAAA,CAAAC,aAAA,EAACL,WAAA,CAAAO,QAAQ;IAACC,SAAS,EAAC;EAAuB,GAC1C,IAAAJ,MAAA,CAAAC,aAAA,EAACH,OAAA,CAAAC,UAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAAC,IAAAM,QAAA,GAEcN,UAAU;AAAAO,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PostSchedule;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _i18n = require("@wordpress/i18n");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _element = require("@wordpress/element");
|
|
11
|
-
var _editor = require("@wordpress/editor");
|
|
12
|
-
/**
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
function PostSchedule() {
|
|
17
|
-
// Use internal state instead of a ref to make sure that the component
|
|
18
|
-
// re-renders when the popover's anchor updates.
|
|
19
|
-
const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null);
|
|
20
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
21
|
-
const popoverProps = (0, _element.useMemo)(() => ({
|
|
22
|
-
anchor: popoverAnchor,
|
|
23
|
-
placement: 'bottom-end'
|
|
24
|
-
}), [popoverAnchor]);
|
|
25
|
-
return (0, _react.createElement)(_editor.PostScheduleCheck, null, (0, _react.createElement)(_components.PanelRow, {
|
|
26
|
-
className: "edit-post-post-schedule",
|
|
27
|
-
ref: setPopoverAnchor
|
|
28
|
-
}, (0, _react.createElement)("span", null, (0, _i18n.__)('Publish')), (0, _react.createElement)(_components.Dropdown, {
|
|
29
|
-
popoverProps: popoverProps,
|
|
30
|
-
contentClassName: "edit-post-post-schedule__dialog",
|
|
31
|
-
focusOnMount: true,
|
|
32
|
-
renderToggle: ({
|
|
33
|
-
isOpen,
|
|
34
|
-
onToggle
|
|
35
|
-
}) => (0, _react.createElement)(PostScheduleToggle, {
|
|
36
|
-
isOpen: isOpen,
|
|
37
|
-
onClick: onToggle
|
|
38
|
-
}),
|
|
39
|
-
renderContent: ({
|
|
40
|
-
onClose
|
|
41
|
-
}) => (0, _react.createElement)(_editor.PostSchedule, {
|
|
42
|
-
onClose: onClose
|
|
43
|
-
})
|
|
44
|
-
})));
|
|
45
|
-
}
|
|
46
|
-
function PostScheduleToggle({
|
|
47
|
-
isOpen,
|
|
48
|
-
onClick
|
|
49
|
-
}) {
|
|
50
|
-
const label = (0, _editor.usePostScheduleLabel)();
|
|
51
|
-
const fullLabel = (0, _editor.usePostScheduleLabel)({
|
|
52
|
-
full: true
|
|
53
|
-
});
|
|
54
|
-
return (0, _react.createElement)(_components.Button, {
|
|
55
|
-
className: "edit-post-post-schedule__toggle",
|
|
56
|
-
variant: "tertiary",
|
|
57
|
-
label: fullLabel,
|
|
58
|
-
showTooltip: true,
|
|
59
|
-
"aria-expanded": isOpen
|
|
60
|
-
// translators: %s: Current post date.
|
|
61
|
-
,
|
|
62
|
-
"aria-label": (0, _i18n.sprintf)((0, _i18n.__)('Change date: %s'), label),
|
|
63
|
-
onClick: onClick
|
|
64
|
-
}, label);
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_i18n","require","_components","_element","_editor","PostSchedule","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","_react","createElement","PostScheduleCheck","PanelRow","className","ref","__","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostScheduleToggle","onClick","renderContent","onClose","label","usePostScheduleLabel","fullLabel","full","Button","variant","showTooltip","sprintf"],"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleCheck,\n\tusePostScheduleLabel,\n} from '@wordpress/editor';\n\nexport default function PostSchedule() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\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() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow\n\t\t\t\tclassName=\"edit-post-post-schedule\"\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostScheduleToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\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</PanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n\nfunction PostScheduleToggle( { isOpen, onClick } ) {\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\tlabel={ fullLabel }\n\t\t\tshowTooltip\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post date.\n\t\t\taria-label={ sprintf( __( 'Change date: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAUe,SAASI,YAAYA,CAAA,EAAG;EACtC;EACA;EACA,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAC5D;EACA,MAAMC,YAAY,GAAG,IAAAC,gBAAO,EAC3B,OAAQ;IAAEC,MAAM,EAAEL,aAAa;IAAEM,SAAS,EAAE;EAAa,CAAC,CAAE,EAC5D,CAAEN,aAAa,CAChB,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAW,iBAAiB,QACjB,IAAAF,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,QAAQ;IACRC,SAAS,EAAC,yBAAyB;IACnCC,GAAG,EAAGX;EAAkB,GAExB,IAAAM,MAAA,CAAAC,aAAA,gBAAQ,IAAAK,QAAE,EAAE,SAAU,CAAS,CAAC,EAChC,IAAAN,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAkB,QAAQ;IACRX,YAAY,EAAGA,YAAc;IAC7BY,gBAAgB,EAAC,iCAAiC;IAClDC,YAAY;IACZC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpC,IAAAZ,MAAA,CAAAC,aAAA,EAACY,kBAAkB;MAClBF,MAAM,EAAGA,MAAQ;MACjBG,OAAO,EAAGF;IAAU,CACpB,CACC;IACHG,aAAa,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KAC5B,IAAAhB,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAC,YAAgB;MAACwB,OAAO,EAAGA;IAAS,CAAE;EACrC,CACH,CACQ,CACQ,CAAC;AAEtB;AAEA,SAASH,kBAAkBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EAClD,MAAMG,KAAK,GAAG,IAAAC,4BAAoB,EAAC,CAAC;EACpC,MAAMC,SAAS,GAAG,IAAAD,4BAAoB,EAAE;IAAEE,IAAI,EAAE;EAAK,CAAE,CAAC;EACxD,OACC,IAAApB,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAgC,MAAM;IACNjB,SAAS,EAAC,iCAAiC;IAC3CkB,OAAO,EAAC,UAAU;IAClBL,KAAK,EAAGE,SAAW;IACnBI,WAAW;IACX,iBAAgBZ;IAChB;IAAA;IACA,cAAa,IAAAa,aAAO,EAAE,IAAAlB,QAAE,EAAE,iBAAkB,CAAC,EAAEW,KAAM,CAAG;IACxDH,OAAO,EAAGA;EAAS,GAEjBG,KACK,CAAC;AAEX"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = PostURL;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _element = require("@wordpress/element");
|
|
9
|
-
var _components = require("@wordpress/components");
|
|
10
|
-
var _i18n = require("@wordpress/i18n");
|
|
11
|
-
var _editor = require("@wordpress/editor");
|
|
12
|
-
/**
|
|
13
|
-
* WordPress dependencies
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
function PostURL() {
|
|
17
|
-
// Use internal state instead of a ref to make sure that the component
|
|
18
|
-
// re-renders when the popover's anchor updates.
|
|
19
|
-
const [popoverAnchor, setPopoverAnchor] = (0, _element.useState)(null);
|
|
20
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
21
|
-
const popoverProps = (0, _element.useMemo)(() => ({
|
|
22
|
-
anchor: popoverAnchor,
|
|
23
|
-
placement: 'bottom-end'
|
|
24
|
-
}), [popoverAnchor]);
|
|
25
|
-
return (0, _react.createElement)(_editor.PostURLCheck, null, (0, _react.createElement)(_components.PanelRow, {
|
|
26
|
-
className: "edit-post-post-url",
|
|
27
|
-
ref: setPopoverAnchor
|
|
28
|
-
}, (0, _react.createElement)("span", null, (0, _i18n.__)('URL')), (0, _react.createElement)(_components.Dropdown, {
|
|
29
|
-
popoverProps: popoverProps,
|
|
30
|
-
className: "edit-post-post-url__dropdown",
|
|
31
|
-
contentClassName: "edit-post-post-url__dialog",
|
|
32
|
-
focusOnMount: true,
|
|
33
|
-
renderToggle: ({
|
|
34
|
-
isOpen,
|
|
35
|
-
onToggle
|
|
36
|
-
}) => (0, _react.createElement)(PostURLToggle, {
|
|
37
|
-
isOpen: isOpen,
|
|
38
|
-
onClick: onToggle
|
|
39
|
-
}),
|
|
40
|
-
renderContent: ({
|
|
41
|
-
onClose
|
|
42
|
-
}) => (0, _react.createElement)(_editor.PostURL, {
|
|
43
|
-
onClose: onClose
|
|
44
|
-
})
|
|
45
|
-
})));
|
|
46
|
-
}
|
|
47
|
-
function PostURLToggle({
|
|
48
|
-
isOpen,
|
|
49
|
-
onClick
|
|
50
|
-
}) {
|
|
51
|
-
const label = (0, _editor.usePostURLLabel)();
|
|
52
|
-
return (0, _react.createElement)(_components.Button, {
|
|
53
|
-
className: "edit-post-post-url__toggle",
|
|
54
|
-
variant: "tertiary",
|
|
55
|
-
"aria-expanded": isOpen
|
|
56
|
-
// translators: %s: Current post URL.
|
|
57
|
-
,
|
|
58
|
-
"aria-label": (0, _i18n.sprintf)((0, _i18n.__)('Change URL: %s'), label),
|
|
59
|
-
onClick: onClick
|
|
60
|
-
}, label);
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_components","_i18n","_editor","PostURL","popoverAnchor","setPopoverAnchor","useState","popoverProps","useMemo","anchor","placement","_react","createElement","PostURLCheck","PanelRow","className","ref","__","Dropdown","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostURLToggle","onClick","renderContent","onClose","label","usePostURLLabel","Button","variant","sprintf"],"sources":["@wordpress/edit-post/src/components/sidebar/post-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tPostURLCheck,\n\tPostURL as PostURLForm,\n\tusePostURLLabel,\n} from '@wordpress/editor';\n\nexport default function PostURL() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\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() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PanelRow className=\"edit-post-post-url\" ref={ setPopoverAnchor }>\n\t\t\t\t<span>{ __( 'URL' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"edit-post-post-url__dropdown\"\n\t\t\t\t\tcontentClassName=\"edit-post-post-url__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostURLToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostURLForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst label = usePostURLLabel();\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-url__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post URL.\n\t\t\taria-label={ sprintf( __( 'Change URL: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AANA;AACA;AACA;;AAUe,SAASI,OAAOA,CAAA,EAAG;EACjC;EACA;EACA,MAAM,CAAEC,aAAa,EAAEC,gBAAgB,CAAE,GAAG,IAAAC,iBAAQ,EAAE,IAAK,CAAC;EAC5D;EACA,MAAMC,YAAY,GAAG,IAAAC,gBAAO,EAC3B,OAAQ;IAAEC,MAAM,EAAEL,aAAa;IAAEM,SAAS,EAAE;EAAa,CAAC,CAAE,EAC5D,CAAEN,aAAa,CAChB,CAAC;EAED,OACC,IAAAO,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAW,YAAY,QACZ,IAAAF,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAc,QAAQ;IAACC,SAAS,EAAC,oBAAoB;IAACC,GAAG,EAAGX;EAAkB,GAChE,IAAAM,MAAA,CAAAC,aAAA,gBAAQ,IAAAK,QAAE,EAAE,KAAM,CAAS,CAAC,EAC5B,IAAAN,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAAkB,QAAQ;IACRX,YAAY,EAAGA,YAAc;IAC7BQ,SAAS,EAAC,8BAA8B;IACxCI,gBAAgB,EAAC,4BAA4B;IAC7CC,YAAY;IACZC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpC,IAAAZ,MAAA,CAAAC,aAAA,EAACY,aAAa;MAACF,MAAM,EAAGA,MAAQ;MAACG,OAAO,EAAGF;IAAU,CAAE,CACrD;IACHG,aAAa,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KAC5B,IAAAhB,MAAA,CAAAC,aAAA,EAACV,OAAA,CAAAC,OAAW;MAACwB,OAAO,EAAGA;IAAS,CAAE;EAChC,CACH,CACQ,CACG,CAAC;AAEjB;AAEA,SAASH,aAAaA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EAC7C,MAAMG,KAAK,GAAG,IAAAC,uBAAe,EAAC,CAAC;EAC/B,OACC,IAAAlB,MAAA,CAAAC,aAAA,EAACZ,WAAA,CAAA8B,MAAM;IACNf,SAAS,EAAC,4BAA4B;IACtCgB,OAAO,EAAC,UAAU;IAClB,iBAAgBT;IAChB;IAAA;IACA,cAAa,IAAAU,aAAO,EAAE,IAAAf,QAAE,EAAE,gBAAiB,CAAC,EAAEW,KAAM,CAAG;IACvDH,OAAO,EAAGA;EAAS,GAEjBG,KACK,CAAC;AAEX"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { PanelRow } from '@wordpress/components';
|
|
6
|
-
import { PostAuthor as PostAuthorForm, PostAuthorCheck } from '@wordpress/editor';
|
|
7
|
-
export function PostAuthor() {
|
|
8
|
-
return createElement(PostAuthorCheck, null, createElement(PanelRow, {
|
|
9
|
-
className: "edit-post-post-author"
|
|
10
|
-
}, createElement(PostAuthorForm, null)));
|
|
11
|
-
}
|
|
12
|
-
export default PostAuthor;
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PanelRow","PostAuthor","PostAuthorForm","PostAuthorCheck","createElement","className"],"sources":["@wordpress/edit-post/src/components/sidebar/post-author/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { PanelRow } from '@wordpress/components';\nimport {\n\tPostAuthor as PostAuthorForm,\n\tPostAuthorCheck,\n} from '@wordpress/editor';\n\nexport function PostAuthor() {\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PanelRow className=\"edit-post-post-author\">\n\t\t\t\t<PostAuthorForm />\n\t\t\t</PanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SACCC,UAAU,IAAIC,cAAc,EAC5BC,eAAe,QACT,mBAAmB;AAE1B,OAAO,SAASF,UAAUA,CAAA,EAAG;EAC5B,OACCG,aAAA,CAACD,eAAe,QACfC,aAAA,CAACJ,QAAQ;IAACK,SAAS,EAAC;EAAuB,GAC1CD,aAAA,CAACF,cAAc,MAAE,CACR,CACM,CAAC;AAEpB;AAEA,eAAeD,UAAU"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
6
|
-
import { PanelRow, Dropdown, Button } from '@wordpress/components';
|
|
7
|
-
import { useState, useMemo } from '@wordpress/element';
|
|
8
|
-
import { PostSchedule as PostScheduleForm, PostScheduleCheck, usePostScheduleLabel } from '@wordpress/editor';
|
|
9
|
-
export default function PostSchedule() {
|
|
10
|
-
// Use internal state instead of a ref to make sure that the component
|
|
11
|
-
// re-renders when the popover's anchor updates.
|
|
12
|
-
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
|
13
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
14
|
-
const popoverProps = useMemo(() => ({
|
|
15
|
-
anchor: popoverAnchor,
|
|
16
|
-
placement: 'bottom-end'
|
|
17
|
-
}), [popoverAnchor]);
|
|
18
|
-
return createElement(PostScheduleCheck, null, createElement(PanelRow, {
|
|
19
|
-
className: "edit-post-post-schedule",
|
|
20
|
-
ref: setPopoverAnchor
|
|
21
|
-
}, createElement("span", null, __('Publish')), createElement(Dropdown, {
|
|
22
|
-
popoverProps: popoverProps,
|
|
23
|
-
contentClassName: "edit-post-post-schedule__dialog",
|
|
24
|
-
focusOnMount: true,
|
|
25
|
-
renderToggle: ({
|
|
26
|
-
isOpen,
|
|
27
|
-
onToggle
|
|
28
|
-
}) => createElement(PostScheduleToggle, {
|
|
29
|
-
isOpen: isOpen,
|
|
30
|
-
onClick: onToggle
|
|
31
|
-
}),
|
|
32
|
-
renderContent: ({
|
|
33
|
-
onClose
|
|
34
|
-
}) => createElement(PostScheduleForm, {
|
|
35
|
-
onClose: onClose
|
|
36
|
-
})
|
|
37
|
-
})));
|
|
38
|
-
}
|
|
39
|
-
function PostScheduleToggle({
|
|
40
|
-
isOpen,
|
|
41
|
-
onClick
|
|
42
|
-
}) {
|
|
43
|
-
const label = usePostScheduleLabel();
|
|
44
|
-
const fullLabel = usePostScheduleLabel({
|
|
45
|
-
full: true
|
|
46
|
-
});
|
|
47
|
-
return createElement(Button, {
|
|
48
|
-
className: "edit-post-post-schedule__toggle",
|
|
49
|
-
variant: "tertiary",
|
|
50
|
-
label: fullLabel,
|
|
51
|
-
showTooltip: true,
|
|
52
|
-
"aria-expanded": isOpen
|
|
53
|
-
// translators: %s: Current post date.
|
|
54
|
-
,
|
|
55
|
-
"aria-label": sprintf(__('Change date: %s'), label),
|
|
56
|
-
onClick: onClick
|
|
57
|
-
}, label);
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__","sprintf","PanelRow","Dropdown","Button","useState","useMemo","PostSchedule","PostScheduleForm","PostScheduleCheck","usePostScheduleLabel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","className","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostScheduleToggle","onClick","renderContent","onClose","label","fullLabel","full","variant","showTooltip"],"sources":["@wordpress/edit-post/src/components/sidebar/post-schedule/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport {\n\tPostSchedule as PostScheduleForm,\n\tPostScheduleCheck,\n\tusePostScheduleLabel,\n} from '@wordpress/editor';\n\nexport default function PostSchedule() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\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() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PanelRow\n\t\t\t\tclassName=\"edit-post-post-schedule\"\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t>\n\t\t\t\t<span>{ __( 'Publish' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"edit-post-post-schedule__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostScheduleToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t/>\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</PanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n\nfunction PostScheduleToggle( { isOpen, onClick } ) {\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-schedule__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\tlabel={ fullLabel }\n\t\t\tshowTooltip\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post date.\n\t\t\taria-label={ sprintf( __( 'Change date: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,QAAQ,EAAEC,OAAO,QAAQ,oBAAoB;AACtD,SACCC,YAAY,IAAIC,gBAAgB,EAChCC,iBAAiB,EACjBC,oBAAoB,QACd,mBAAmB;AAE1B,eAAe,SAASH,YAAYA,CAAA,EAAG;EACtC;EACA;EACA,MAAM,CAAEI,aAAa,EAAEC,gBAAgB,CAAE,GAAGP,QAAQ,CAAE,IAAK,CAAC;EAC5D;EACA,MAAMQ,YAAY,GAAGP,OAAO,CAC3B,OAAQ;IAAEQ,MAAM,EAAEH,aAAa;IAAEI,SAAS,EAAE;EAAa,CAAC,CAAE,EAC5D,CAAEJ,aAAa,CAChB,CAAC;EAED,OACCK,aAAA,CAACP,iBAAiB,QACjBO,aAAA,CAACd,QAAQ;IACRe,SAAS,EAAC,yBAAyB;IACnCC,GAAG,EAAGN;EAAkB,GAExBI,aAAA,eAAQhB,EAAE,CAAE,SAAU,CAAS,CAAC,EAChCgB,aAAA,CAACb,QAAQ;IACRU,YAAY,EAAGA,YAAc;IAC7BM,gBAAgB,EAAC,iCAAiC;IAClDC,YAAY;IACZC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpCP,aAAA,CAACQ,kBAAkB;MAClBF,MAAM,EAAGA,MAAQ;MACjBG,OAAO,EAAGF;IAAU,CACpB,CACC;IACHG,aAAa,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KAC5BX,aAAA,CAACR,gBAAgB;MAACmB,OAAO,EAAGA;IAAS,CAAE;EACrC,CACH,CACQ,CACQ,CAAC;AAEtB;AAEA,SAASH,kBAAkBA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EAClD,MAAMG,KAAK,GAAGlB,oBAAoB,CAAC,CAAC;EACpC,MAAMmB,SAAS,GAAGnB,oBAAoB,CAAE;IAAEoB,IAAI,EAAE;EAAK,CAAE,CAAC;EACxD,OACCd,aAAA,CAACZ,MAAM;IACNa,SAAS,EAAC,iCAAiC;IAC3Cc,OAAO,EAAC,UAAU;IAClBH,KAAK,EAAGC,SAAW;IACnBG,WAAW;IACX,iBAAgBV;IAChB;IAAA;IACA,cAAarB,OAAO,CAAED,EAAE,CAAE,iBAAkB,CAAC,EAAE4B,KAAM,CAAG;IACxDH,OAAO,EAAGA;EAAS,GAEjBG,KACK,CAAC;AAEX"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* WordPress dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { useMemo, useState } from '@wordpress/element';
|
|
6
|
-
import { PanelRow, Dropdown, Button } from '@wordpress/components';
|
|
7
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
8
|
-
import { PostURLCheck, PostURL as PostURLForm, usePostURLLabel } from '@wordpress/editor';
|
|
9
|
-
export default function PostURL() {
|
|
10
|
-
// Use internal state instead of a ref to make sure that the component
|
|
11
|
-
// re-renders when the popover's anchor updates.
|
|
12
|
-
const [popoverAnchor, setPopoverAnchor] = useState(null);
|
|
13
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
14
|
-
const popoverProps = useMemo(() => ({
|
|
15
|
-
anchor: popoverAnchor,
|
|
16
|
-
placement: 'bottom-end'
|
|
17
|
-
}), [popoverAnchor]);
|
|
18
|
-
return createElement(PostURLCheck, null, createElement(PanelRow, {
|
|
19
|
-
className: "edit-post-post-url",
|
|
20
|
-
ref: setPopoverAnchor
|
|
21
|
-
}, createElement("span", null, __('URL')), createElement(Dropdown, {
|
|
22
|
-
popoverProps: popoverProps,
|
|
23
|
-
className: "edit-post-post-url__dropdown",
|
|
24
|
-
contentClassName: "edit-post-post-url__dialog",
|
|
25
|
-
focusOnMount: true,
|
|
26
|
-
renderToggle: ({
|
|
27
|
-
isOpen,
|
|
28
|
-
onToggle
|
|
29
|
-
}) => createElement(PostURLToggle, {
|
|
30
|
-
isOpen: isOpen,
|
|
31
|
-
onClick: onToggle
|
|
32
|
-
}),
|
|
33
|
-
renderContent: ({
|
|
34
|
-
onClose
|
|
35
|
-
}) => createElement(PostURLForm, {
|
|
36
|
-
onClose: onClose
|
|
37
|
-
})
|
|
38
|
-
})));
|
|
39
|
-
}
|
|
40
|
-
function PostURLToggle({
|
|
41
|
-
isOpen,
|
|
42
|
-
onClick
|
|
43
|
-
}) {
|
|
44
|
-
const label = usePostURLLabel();
|
|
45
|
-
return createElement(Button, {
|
|
46
|
-
className: "edit-post-post-url__toggle",
|
|
47
|
-
variant: "tertiary",
|
|
48
|
-
"aria-expanded": isOpen
|
|
49
|
-
// translators: %s: Current post URL.
|
|
50
|
-
,
|
|
51
|
-
"aria-label": sprintf(__('Change URL: %s'), label),
|
|
52
|
-
onClick: onClick
|
|
53
|
-
}, label);
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useState","PanelRow","Dropdown","Button","__","sprintf","PostURLCheck","PostURL","PostURLForm","usePostURLLabel","popoverAnchor","setPopoverAnchor","popoverProps","anchor","placement","createElement","className","ref","contentClassName","focusOnMount","renderToggle","isOpen","onToggle","PostURLToggle","onClick","renderContent","onClose","label","variant"],"sources":["@wordpress/edit-post/src/components/sidebar/post-url/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { PanelRow, Dropdown, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tPostURLCheck,\n\tPostURL as PostURLForm,\n\tusePostURLLabel,\n} from '@wordpress/editor';\n\nexport default function PostURL() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\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() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PanelRow className=\"edit-post-post-url\" ref={ setPopoverAnchor }>\n\t\t\t\t<span>{ __( 'URL' ) }</span>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"edit-post-post-url__dropdown\"\n\t\t\t\t\tcontentClassName=\"edit-post-post-url__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostURLToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostURLForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst label = usePostURLLabel();\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"edit-post-post-url__toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\t// translators: %s: Current post URL.\n\t\t\taria-label={ sprintf( __( 'Change URL: %s' ), label ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,EAAEC,QAAQ,QAAQ,oBAAoB;AACtD,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,uBAAuB;AAClE,SAASC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AAC7C,SACCC,YAAY,EACZC,OAAO,IAAIC,WAAW,EACtBC,eAAe,QACT,mBAAmB;AAE1B,eAAe,SAASF,OAAOA,CAAA,EAAG;EACjC;EACA;EACA,MAAM,CAAEG,aAAa,EAAEC,gBAAgB,CAAE,GAAGX,QAAQ,CAAE,IAAK,CAAC;EAC5D;EACA,MAAMY,YAAY,GAAGb,OAAO,CAC3B,OAAQ;IAAEc,MAAM,EAAEH,aAAa;IAAEI,SAAS,EAAE;EAAa,CAAC,CAAE,EAC5D,CAAEJ,aAAa,CAChB,CAAC;EAED,OACCK,aAAA,CAACT,YAAY,QACZS,aAAA,CAACd,QAAQ;IAACe,SAAS,EAAC,oBAAoB;IAACC,GAAG,EAAGN;EAAkB,GAChEI,aAAA,eAAQX,EAAE,CAAE,KAAM,CAAS,CAAC,EAC5BW,aAAA,CAACb,QAAQ;IACRU,YAAY,EAAGA,YAAc;IAC7BI,SAAS,EAAC,8BAA8B;IACxCE,gBAAgB,EAAC,4BAA4B;IAC7CC,YAAY;IACZC,YAAY,EAAGA,CAAE;MAAEC,MAAM;MAAEC;IAAS,CAAC,KACpCP,aAAA,CAACQ,aAAa;MAACF,MAAM,EAAGA,MAAQ;MAACG,OAAO,EAAGF;IAAU,CAAE,CACrD;IACHG,aAAa,EAAGA,CAAE;MAAEC;IAAQ,CAAC,KAC5BX,aAAA,CAACP,WAAW;MAACkB,OAAO,EAAGA;IAAS,CAAE;EAChC,CACH,CACQ,CACG,CAAC;AAEjB;AAEA,SAASH,aAAaA,CAAE;EAAEF,MAAM;EAAEG;AAAQ,CAAC,EAAG;EAC7C,MAAMG,KAAK,GAAGlB,eAAe,CAAC,CAAC;EAC/B,OACCM,aAAA,CAACZ,MAAM;IACNa,SAAS,EAAC,4BAA4B;IACtCY,OAAO,EAAC,UAAU;IAClB,iBAAgBP;IAChB;IAAA;IACA,cAAahB,OAAO,CAAED,EAAE,CAAE,gBAAiB,CAAC,EAAEuB,KAAM,CAAG;IACvDH,OAAO,EAAGA;EAAS,GAEjBG,KACK,CAAC;AAEX"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { PanelRow } from '@wordpress/components';
|
|
5
|
-
import {
|
|
6
|
-
PostAuthor as PostAuthorForm,
|
|
7
|
-
PostAuthorCheck,
|
|
8
|
-
} from '@wordpress/editor';
|
|
9
|
-
|
|
10
|
-
export function PostAuthor() {
|
|
11
|
-
return (
|
|
12
|
-
<PostAuthorCheck>
|
|
13
|
-
<PanelRow className="edit-post-post-author">
|
|
14
|
-
<PostAuthorForm />
|
|
15
|
-
</PanelRow>
|
|
16
|
-
</PostAuthorCheck>
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default PostAuthor;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
5
|
-
import { PanelRow, Dropdown, Button } from '@wordpress/components';
|
|
6
|
-
import { useState, useMemo } from '@wordpress/element';
|
|
7
|
-
import {
|
|
8
|
-
PostSchedule as PostScheduleForm,
|
|
9
|
-
PostScheduleCheck,
|
|
10
|
-
usePostScheduleLabel,
|
|
11
|
-
} from '@wordpress/editor';
|
|
12
|
-
|
|
13
|
-
export default function PostSchedule() {
|
|
14
|
-
// Use internal state instead of a ref to make sure that the component
|
|
15
|
-
// re-renders when the popover's anchor updates.
|
|
16
|
-
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
17
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
18
|
-
const popoverProps = useMemo(
|
|
19
|
-
() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),
|
|
20
|
-
[ popoverAnchor ]
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<PostScheduleCheck>
|
|
25
|
-
<PanelRow
|
|
26
|
-
className="edit-post-post-schedule"
|
|
27
|
-
ref={ setPopoverAnchor }
|
|
28
|
-
>
|
|
29
|
-
<span>{ __( 'Publish' ) }</span>
|
|
30
|
-
<Dropdown
|
|
31
|
-
popoverProps={ popoverProps }
|
|
32
|
-
contentClassName="edit-post-post-schedule__dialog"
|
|
33
|
-
focusOnMount
|
|
34
|
-
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
35
|
-
<PostScheduleToggle
|
|
36
|
-
isOpen={ isOpen }
|
|
37
|
-
onClick={ onToggle }
|
|
38
|
-
/>
|
|
39
|
-
) }
|
|
40
|
-
renderContent={ ( { onClose } ) => (
|
|
41
|
-
<PostScheduleForm onClose={ onClose } />
|
|
42
|
-
) }
|
|
43
|
-
/>
|
|
44
|
-
</PanelRow>
|
|
45
|
-
</PostScheduleCheck>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function PostScheduleToggle( { isOpen, onClick } ) {
|
|
50
|
-
const label = usePostScheduleLabel();
|
|
51
|
-
const fullLabel = usePostScheduleLabel( { full: true } );
|
|
52
|
-
return (
|
|
53
|
-
<Button
|
|
54
|
-
className="edit-post-post-schedule__toggle"
|
|
55
|
-
variant="tertiary"
|
|
56
|
-
label={ fullLabel }
|
|
57
|
-
showTooltip
|
|
58
|
-
aria-expanded={ isOpen }
|
|
59
|
-
// translators: %s: Current post date.
|
|
60
|
-
aria-label={ sprintf( __( 'Change date: %s' ), label ) }
|
|
61
|
-
onClick={ onClick }
|
|
62
|
-
>
|
|
63
|
-
{ label }
|
|
64
|
-
</Button>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
.edit-post-post-schedule {
|
|
2
|
-
width: 100%;
|
|
3
|
-
position: relative;
|
|
4
|
-
justify-content: flex-start;
|
|
5
|
-
align-items: flex-start;
|
|
6
|
-
|
|
7
|
-
span {
|
|
8
|
-
display: block;
|
|
9
|
-
width: 45%;
|
|
10
|
-
flex-shrink: 0;
|
|
11
|
-
// Match padding on tertiary buttons for alignment.
|
|
12
|
-
padding: $grid-unit-15 * 0.5 0;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.components-button.edit-post-post-schedule__toggle {
|
|
17
|
-
text-align: left;
|
|
18
|
-
white-space: normal;
|
|
19
|
-
height: auto;
|
|
20
|
-
|
|
21
|
-
// This span is added by the Popover in Tooltip when no anchor is
|
|
22
|
-
// provided. We set its width to 0 so that it does not cause the button text
|
|
23
|
-
// to wrap to a new line when displaying the tooltip. A better fix would be
|
|
24
|
-
// to pass anchorRef and avoid the need for a span alltogether, which is
|
|
25
|
-
// what this PR allows us to do:
|
|
26
|
-
// https://github.com/WordPress/gutenberg/pull/41268.
|
|
27
|
-
span {
|
|
28
|
-
width: 0;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.edit-post-post-schedule__dialog .block-editor-publish-date-time-picker {
|
|
33
|
-
margin: $grid-unit-10;
|
|
34
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useMemo, useState } from '@wordpress/element';
|
|
5
|
-
import { PanelRow, Dropdown, Button } from '@wordpress/components';
|
|
6
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
7
|
-
import {
|
|
8
|
-
PostURLCheck,
|
|
9
|
-
PostURL as PostURLForm,
|
|
10
|
-
usePostURLLabel,
|
|
11
|
-
} from '@wordpress/editor';
|
|
12
|
-
|
|
13
|
-
export default function PostURL() {
|
|
14
|
-
// Use internal state instead of a ref to make sure that the component
|
|
15
|
-
// re-renders when the popover's anchor updates.
|
|
16
|
-
const [ popoverAnchor, setPopoverAnchor ] = useState( null );
|
|
17
|
-
// Memoize popoverProps to avoid returning a new object every time.
|
|
18
|
-
const popoverProps = useMemo(
|
|
19
|
-
() => ( { anchor: popoverAnchor, placement: 'bottom-end' } ),
|
|
20
|
-
[ popoverAnchor ]
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<PostURLCheck>
|
|
25
|
-
<PanelRow className="edit-post-post-url" ref={ setPopoverAnchor }>
|
|
26
|
-
<span>{ __( 'URL' ) }</span>
|
|
27
|
-
<Dropdown
|
|
28
|
-
popoverProps={ popoverProps }
|
|
29
|
-
className="edit-post-post-url__dropdown"
|
|
30
|
-
contentClassName="edit-post-post-url__dialog"
|
|
31
|
-
focusOnMount
|
|
32
|
-
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
33
|
-
<PostURLToggle isOpen={ isOpen } onClick={ onToggle } />
|
|
34
|
-
) }
|
|
35
|
-
renderContent={ ( { onClose } ) => (
|
|
36
|
-
<PostURLForm onClose={ onClose } />
|
|
37
|
-
) }
|
|
38
|
-
/>
|
|
39
|
-
</PanelRow>
|
|
40
|
-
</PostURLCheck>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function PostURLToggle( { isOpen, onClick } ) {
|
|
45
|
-
const label = usePostURLLabel();
|
|
46
|
-
return (
|
|
47
|
-
<Button
|
|
48
|
-
className="edit-post-post-url__toggle"
|
|
49
|
-
variant="tertiary"
|
|
50
|
-
aria-expanded={ isOpen }
|
|
51
|
-
// translators: %s: Current post URL.
|
|
52
|
-
aria-label={ sprintf( __( 'Change URL: %s' ), label ) }
|
|
53
|
-
onClick={ onClick }
|
|
54
|
-
>
|
|
55
|
-
{ label }
|
|
56
|
-
</Button>
|
|
57
|
-
);
|
|
58
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.edit-post-post-url {
|
|
2
|
-
width: 100%;
|
|
3
|
-
justify-content: flex-start;
|
|
4
|
-
align-items: flex-start;
|
|
5
|
-
|
|
6
|
-
span {
|
|
7
|
-
display: block;
|
|
8
|
-
width: 45%;
|
|
9
|
-
flex-shrink: 0;
|
|
10
|
-
// Match padding on tertiary buttons for alignment.
|
|
11
|
-
padding: $grid-unit-15 * 0.5 0;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.components-button.edit-post-post-url__toggle {
|
|
16
|
-
text-align: left;
|
|
17
|
-
white-space: normal;
|
|
18
|
-
height: auto;
|
|
19
|
-
word-break: break-word;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.edit-post-post-url__dialog .editor-post-url {
|
|
23
|
-
// sidebar width - popover padding - form margin
|
|
24
|
-
min-width: $sidebar-width - $grid-unit-20 - $grid-unit-20;
|
|
25
|
-
margin: $grid-unit-10;
|
|
26
|
-
}
|