@wordpress/fields 0.33.0 → 0.33.1-next.v.202603102151.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/README.md +12 -0
- package/build/fields/author/author-view.cjs +4 -4
- package/build/fields/author/author-view.cjs.map +2 -2
- package/build/fields/date/scheduled/index.cjs +39 -0
- package/build/fields/date/scheduled/index.cjs.map +7 -0
- package/build/fields/featured-image/index.cjs +1 -0
- package/build/fields/featured-image/index.cjs.map +2 -2
- package/build/fields/format/index.cjs +69 -0
- package/build/fields/format/index.cjs.map +7 -0
- package/build/fields/index.cjs +9 -0
- package/build/fields/index.cjs.map +2 -2
- package/build/fields/post-content-info/index.cjs +49 -0
- package/build/fields/post-content-info/index.cjs.map +7 -0
- package/build/fields/post-content-info/post-content-info-view.cjs +76 -0
- package/build/fields/post-content-info/post-content-info-view.cjs.map +7 -0
- package/build/fields/status/status-view.cjs +1 -1
- package/build/fields/status/status-view.cjs.map +2 -2
- package/build/types.cjs.map +1 -1
- package/build-module/fields/author/author-view.mjs +4 -4
- package/build-module/fields/author/author-view.mjs.map +2 -2
- package/build-module/fields/date/scheduled/index.mjs +18 -0
- package/build-module/fields/date/scheduled/index.mjs.map +7 -0
- package/build-module/fields/featured-image/index.mjs +1 -0
- package/build-module/fields/featured-image/index.mjs.map +2 -2
- package/build-module/fields/format/index.mjs +48 -0
- package/build-module/fields/format/index.mjs.map +7 -0
- package/build-module/fields/index.mjs +10 -4
- package/build-module/fields/index.mjs.map +2 -2
- package/build-module/fields/post-content-info/index.mjs +18 -0
- package/build-module/fields/post-content-info/index.mjs.map +7 -0
- package/build-module/fields/post-content-info/post-content-info-view.mjs +58 -0
- package/build-module/fields/post-content-info/post-content-info-view.mjs.map +7 -0
- package/build-module/fields/status/status-view.mjs +1 -1
- package/build-module/fields/status/status-view.mjs.map +2 -2
- package/build-style/style-rtl.css +50 -0
- package/build-style/style.css +50 -0
- package/build-types/fields/date/scheduled/index.d.ts +14 -0
- package/build-types/fields/date/scheduled/index.d.ts.map +1 -0
- package/build-types/fields/featured-image/index.d.ts.map +1 -1
- package/build-types/fields/format/index.d.ts +14 -0
- package/build-types/fields/format/index.d.ts.map +1 -0
- package/build-types/fields/index.d.ts +3 -0
- package/build-types/fields/index.d.ts.map +1 -1
- package/build-types/fields/post-content-info/index.d.ts +14 -0
- package/build-types/fields/post-content-info/index.d.ts.map +1 -0
- package/build-types/fields/post-content-info/post-content-info-view.d.ts +8 -0
- package/build-types/fields/post-content-info/post-content-info-view.d.ts.map +1 -0
- package/build-types/types.d.ts +1 -0
- package/build-types/types.d.ts.map +1 -1
- package/package.json +26 -26
- package/src/fields/author/author-view.tsx +7 -7
- package/src/fields/author/style.scss +46 -0
- package/src/fields/date/scheduled/index.tsx +27 -0
- package/src/fields/featured-image/index.tsx +1 -0
- package/src/fields/format/index.ts +62 -0
- package/src/fields/index.ts +3 -0
- package/src/fields/post-content-info/index.ts +27 -0
- package/src/fields/post-content-info/post-content-info-view.tsx +88 -0
- package/src/fields/status/status-view.tsx +1 -1
- package/src/fields/status/style.scss +10 -0
- package/src/style.scss +2 -0
- package/src/types.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fields/featured-image/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport MediaEdit from '../../components/media-edit';\nimport type { BasePostWithEmbeddedFeaturedMedia } from '../../types';\nimport { FeaturedImageView } from './featured-image-view';\n\nconst featuredImageField: Field< BasePostWithEmbeddedFeaturedMedia > = {\n\tid: 'featured_media',\n\ttype: 'media',\n\tlabel: __( 'Featured Image' ),\n\tEdit: ( props ) => <MediaEdit { ...props } isExpanded />,\n\trender: FeaturedImageView,\n\tsetValue: ( { value } ) => ( {\n\t\tfeatured_media: value ?? 0,\n\t} ),\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * Featured Image field for BasePostWithEmbeddedFeaturedMedia.\n */\nexport default featuredImageField;\n"],
|
|
5
|
-
"mappings": ";AAIA,SAAS,UAAU;AAKnB,OAAO,eAAe;AAEtB,SAAS,yBAAyB;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport MediaEdit from '../../components/media-edit';\nimport type { BasePostWithEmbeddedFeaturedMedia } from '../../types';\nimport { FeaturedImageView } from './featured-image-view';\n\nconst featuredImageField: Field< BasePostWithEmbeddedFeaturedMedia > = {\n\tid: 'featured_media',\n\ttype: 'media',\n\tlabel: __( 'Featured Image' ),\n\tplaceholder: __( 'Set featured image' ),\n\tEdit: ( props ) => <MediaEdit { ...props } isExpanded />,\n\trender: FeaturedImageView,\n\tsetValue: ( { value } ) => ( {\n\t\tfeatured_media: value ?? 0,\n\t} ),\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * Featured Image field for BasePostWithEmbeddedFeaturedMedia.\n */\nexport default featuredImageField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAKnB,OAAO,eAAe;AAEtB,SAAS,yBAAyB;AAOd;AALpB,IAAM,qBAAiE;AAAA,EACtE,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,gBAAiB;AAAA,EAC5B,aAAa,GAAI,oBAAqB;AAAA,EACtC,MAAM,CAAE,UAAW,oBAAC,aAAY,GAAG,OAAQ,YAAU,MAAC;AAAA,EACtD,QAAQ;AAAA,EACR,UAAU,CAAE,EAAE,MAAM,OAAS;AAAA,IAC5B,gBAAgB,SAAS;AAAA,EAC1B;AAAA,EACA,eAAe;AAAA,EACf,UAAU;AACX;AAKA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// packages/fields/src/fields/format/index.ts
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { resolveSelect } from "@wordpress/data";
|
|
4
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
5
|
+
var POST_FORMATS = [
|
|
6
|
+
{ id: "aside", caption: __("Aside") },
|
|
7
|
+
{ id: "audio", caption: __("Audio") },
|
|
8
|
+
{ id: "chat", caption: __("Chat") },
|
|
9
|
+
{ id: "gallery", caption: __("Gallery") },
|
|
10
|
+
{ id: "image", caption: __("Image") },
|
|
11
|
+
{ id: "link", caption: __("Link") },
|
|
12
|
+
{ id: "quote", caption: __("Quote") },
|
|
13
|
+
{ id: "standard", caption: __("Standard") },
|
|
14
|
+
{ id: "status", caption: __("Status") },
|
|
15
|
+
{ id: "video", caption: __("Video") }
|
|
16
|
+
].sort((a, b) => {
|
|
17
|
+
const normalizedA = a.caption.toUpperCase();
|
|
18
|
+
const normalizedB = b.caption.toUpperCase();
|
|
19
|
+
if (normalizedA < normalizedB) {
|
|
20
|
+
return -1;
|
|
21
|
+
}
|
|
22
|
+
if (normalizedA > normalizedB) {
|
|
23
|
+
return 1;
|
|
24
|
+
}
|
|
25
|
+
return 0;
|
|
26
|
+
});
|
|
27
|
+
var formatField = {
|
|
28
|
+
id: "format",
|
|
29
|
+
label: __("Format"),
|
|
30
|
+
type: "text",
|
|
31
|
+
Edit: "radio",
|
|
32
|
+
enableSorting: false,
|
|
33
|
+
enableHiding: false,
|
|
34
|
+
filterBy: false,
|
|
35
|
+
getElements: async () => {
|
|
36
|
+
const themeSupports = await resolveSelect(coreStore).getThemeSupports();
|
|
37
|
+
return POST_FORMATS.filter(
|
|
38
|
+
(f) => themeSupports?.formats?.includes(
|
|
39
|
+
f.id
|
|
40
|
+
)
|
|
41
|
+
).map((f) => ({ value: f.id, label: f.caption }));
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
var format_default = formatField;
|
|
45
|
+
export {
|
|
46
|
+
format_default as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/format/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\n// All WP post formats, sorted alphabetically by translated name.\nconst POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\nconst formatField: Field< BasePost > = {\n\tid: 'format',\n\tlabel: __( 'Format' ),\n\ttype: 'text',\n\tEdit: 'radio',\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n\tgetElements: async () => {\n\t\tconst themeSupports =\n\t\t\tawait resolveSelect( coreStore ).getThemeSupports();\n\t\treturn POST_FORMATS.filter(\n\t\t\t( f ) =>\n\t\t\t\t( themeSupports?.formats as string[] | undefined )?.includes(\n\t\t\t\t\tf.id\n\t\t\t\t)\n\t\t).map( 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,eAAe,SAAmC;AAAA,QACnD,EAAE;AAAA,MACH;AAAA,IACF,EAAE,IAAK,CAAE,OAAS,EAAE,OAAO,EAAE,IAAI,OAAO,EAAE,QAAQ,EAAI;AAAA,EACvD;AACD;AAKA,IAAO,iBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -14,21 +14,27 @@ import { default as default13 } from "./comment-status/index.mjs";
|
|
|
14
14
|
import { default as default14 } from "./ping-status/index.mjs";
|
|
15
15
|
import { default as default15 } from "./discussion/index.mjs";
|
|
16
16
|
import { default as default16 } from "./date/index.mjs";
|
|
17
|
-
import { default as default17 } from "./
|
|
18
|
-
import { default as default18 } from "./
|
|
17
|
+
import { default as default17 } from "./date/scheduled/index.mjs";
|
|
18
|
+
import { default as default18 } from "./author/index.mjs";
|
|
19
|
+
import { default as default19 } from "./notes/index.mjs";
|
|
20
|
+
import { default as default20 } from "./format/index.mjs";
|
|
21
|
+
import { default as default21 } from "./post-content-info/index.mjs";
|
|
19
22
|
export {
|
|
20
|
-
|
|
23
|
+
default18 as authorField,
|
|
21
24
|
default13 as commentStatusField,
|
|
22
25
|
default16 as dateField,
|
|
23
26
|
default15 as discussionField,
|
|
24
27
|
default8 as featuredImageField,
|
|
25
|
-
|
|
28
|
+
default20 as formatField,
|
|
29
|
+
default19 as notesField,
|
|
26
30
|
default7 as orderField,
|
|
27
31
|
default4 as pageTitleField,
|
|
28
32
|
default10 as parentField,
|
|
29
33
|
default11 as passwordField,
|
|
30
34
|
default6 as patternTitleField,
|
|
31
35
|
default14 as pingStatusField,
|
|
36
|
+
default21 as postContentInfoField,
|
|
37
|
+
default17 as scheduledDateField,
|
|
32
38
|
default2 as slugField,
|
|
33
39
|
default12 as statusField,
|
|
34
40
|
default9 as templateField,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/fields/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as slugField } from './slug';\nexport { default as titleField } from './title';\nexport { default as pageTitleField } from './page-title';\nexport { default as templateTitleField } from './template-title';\nexport { default as patternTitleField } from './pattern-title';\nexport { default as orderField } from './order';\nexport { default as featuredImageField } from './featured-image';\nexport { default as templateField } from './template';\nexport { default as parentField } from './parent';\nexport { default as passwordField } from './password';\nexport { default as statusField } from './status';\nexport { default as commentStatusField } from './comment-status';\nexport { default as pingStatusField } from './ping-status';\nexport { default as discussionField } from './discussion';\nexport { default as dateField } from './date';\nexport { default as authorField } from './author';\nexport { default as notesField } from './notes';\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAoB,WAAXA,gBAA4B;AACrC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAA4B;AACrC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAA6B;",
|
|
4
|
+
"sourcesContent": ["export { default as slugField } from './slug';\nexport { default as titleField } from './title';\nexport { default as pageTitleField } from './page-title';\nexport { default as templateTitleField } from './template-title';\nexport { default as patternTitleField } from './pattern-title';\nexport { default as orderField } from './order';\nexport { default as featuredImageField } from './featured-image';\nexport { default as templateField } from './template';\nexport { default as parentField } from './parent';\nexport { default as passwordField } from './password';\nexport { default as statusField } from './status';\nexport { default as commentStatusField } from './comment-status';\nexport { default as pingStatusField } from './ping-status';\nexport { default as discussionField } from './discussion';\nexport { default as dateField } from './date';\nexport { default as scheduledDateField } from './date/scheduled';\nexport { default as authorField } from './author';\nexport { default as notesField } from './notes';\nexport { default as formatField } from './format';\nexport { default as postContentInfoField } from './post-content-info';\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAoB,WAAXA,gBAA4B;AACrC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAAgC;AACzC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAgC;AACzC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAA4B;AACrC,SAAoB,WAAXA,iBAAqC;AAC9C,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAA6B;AACtC,SAAoB,WAAXA,iBAA8B;AACvC,SAAoB,WAAXA,iBAAuC;",
|
|
6
6
|
"names": ["default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// packages/fields/src/fields/post-content-info/index.ts
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import PostContentInfoView from "./post-content-info-view.mjs";
|
|
4
|
+
var postContentInfoField = {
|
|
5
|
+
label: __("Post content information"),
|
|
6
|
+
id: "post-content-info",
|
|
7
|
+
type: "text",
|
|
8
|
+
readOnly: true,
|
|
9
|
+
render: PostContentInfoView,
|
|
10
|
+
enableSorting: false,
|
|
11
|
+
enableHiding: false,
|
|
12
|
+
filterBy: false
|
|
13
|
+
};
|
|
14
|
+
var post_content_info_default = postContentInfoField;
|
|
15
|
+
export {
|
|
16
|
+
post_content_info_default as default
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/post-content-info/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport PostContentInfoView from './post-content-info-view';\n\nconst postContentInfoField: Field< BasePost > = {\n\tlabel: __( 'Post content information' ),\n\tid: 'post-content-info',\n\ttype: 'text',\n\treadOnly: true,\n\trender: PostContentInfoView,\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n};\n\n/**\n * Post content information field for BasePost.\n */\nexport default postContentInfoField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAMnB,OAAO,yBAAyB;AAEhC,IAAM,uBAA0C;AAAA,EAC/C,OAAO,GAAI,0BAA2B;AAAA,EACtC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,cAAc;AAAA,EACd,UAAU;AACX;AAKA,IAAO,4BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// packages/fields/src/fields/post-content-info/post-content-info-view.tsx
|
|
2
|
+
import {
|
|
3
|
+
__experimentalText as Text,
|
|
4
|
+
__experimentalVStack as VStack
|
|
5
|
+
} from "@wordpress/components";
|
|
6
|
+
import { __, _x, _n, sprintf } from "@wordpress/i18n";
|
|
7
|
+
import { count as wordCount } from "@wordpress/wordcount";
|
|
8
|
+
import { humanTimeDiff } from "@wordpress/date";
|
|
9
|
+
import { useMemo } from "@wordpress/element";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var AVERAGE_READING_RATE = 189;
|
|
12
|
+
function PostContentInfoView({ item }) {
|
|
13
|
+
const content = typeof item.content === "string" ? item.content : item.content?.raw || "";
|
|
14
|
+
const wordCountType = _x(
|
|
15
|
+
"words",
|
|
16
|
+
"Word count type. Do not translate!"
|
|
17
|
+
);
|
|
18
|
+
const wordsCounted = useMemo(
|
|
19
|
+
() => content ? wordCount(content, wordCountType) : 0,
|
|
20
|
+
[content, wordCountType]
|
|
21
|
+
);
|
|
22
|
+
const modified = item.modified;
|
|
23
|
+
if (!wordsCounted && !modified) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
let contentInfoText;
|
|
27
|
+
if (wordsCounted) {
|
|
28
|
+
const readingTime = Math.round(wordsCounted / AVERAGE_READING_RATE);
|
|
29
|
+
const wordsCountText = sprintf(
|
|
30
|
+
// translators: %s: the number of words in the post.
|
|
31
|
+
_n("%s word", "%s words", wordsCounted),
|
|
32
|
+
wordsCounted.toLocaleString()
|
|
33
|
+
);
|
|
34
|
+
const minutesText = readingTime <= 1 ? __("1 minute") : sprintf(
|
|
35
|
+
/* translators: %s: the number of minutes to read the post. */
|
|
36
|
+
_n("%s minute", "%s minutes", readingTime),
|
|
37
|
+
readingTime.toLocaleString()
|
|
38
|
+
);
|
|
39
|
+
contentInfoText = sprintf(
|
|
40
|
+
/* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */
|
|
41
|
+
__("%1$s, %2$s read time."),
|
|
42
|
+
wordsCountText,
|
|
43
|
+
minutesText
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsxs(VStack, { spacing: 1, children: [
|
|
47
|
+
contentInfoText && /* @__PURE__ */ jsx(Text, { variant: "muted", children: contentInfoText }),
|
|
48
|
+
modified && /* @__PURE__ */ jsx(Text, { variant: "muted", children: sprintf(
|
|
49
|
+
// translators: %s: Human-readable time difference, e.g. "2 days ago".
|
|
50
|
+
__("Last edited %s."),
|
|
51
|
+
humanTimeDiff(modified)
|
|
52
|
+
) })
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
PostContentInfoView as default
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=post-content-info-view.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/post-content-info/post-content-info-view.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport type { Strategy } from '@wordpress/wordcount';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\nexport default function PostContentInfoView( { item }: { item: BasePost } ) {\n\tconst content =\n\t\ttypeof item.content === 'string'\n\t\t\t? item.content\n\t\t\t: item.content?.raw || '';\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x(\n\t\t'words',\n\t\t'Word count type. Do not translate!'\n\t) as Strategy;\n\tconst wordsCounted = useMemo(\n\t\t() => ( content ? wordCount( content, wordCountType ) : 0 ),\n\t\t[ content, wordCountType ]\n\t);\n\n\tconst modified = item.modified;\n\n\tif ( ! wordsCounted && ! modified ) {\n\t\treturn null;\n\t}\n\n\tlet contentInfoText: string | undefined;\n\tif ( wordsCounted ) {\n\t\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\t\tconst wordsCountText = sprintf(\n\t\t\t// translators: %s: the number of words in the post.\n\t\t\t_n( '%s word', '%s words', wordsCounted ),\n\t\t\twordsCounted.toLocaleString()\n\t\t);\n\t\tconst minutesText =\n\t\t\treadingTime <= 1\n\t\t\t\t? __( '1 minute' )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: %s: the number of minutes to read the post. */\n\t\t\t\t\t\t_n( '%s minute', '%s minutes', readingTime ),\n\t\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t\t );\n\t\tcontentInfoText = sprintf(\n\t\t\t/* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */\n\t\t\t__( '%1$s, %2$s read time.' ),\n\t\t\twordsCountText,\n\t\t\tminutesText\n\t\t);\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 1 }>\n\t\t\t{ contentInfoText && (\n\t\t\t\t<Text variant=\"muted\">{ contentInfoText }</Text>\n\t\t\t) }\n\t\t\t{ modified && (\n\t\t\t\t<Text variant=\"muted\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t// translators: %s: Human-readable time difference, e.g. \"2 days ago\".\n\t\t\t\t\t\t__( 'Last edited %s.' ),\n\t\t\t\t\t\thumanTimeDiff( modified )\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA;AAAA,EACC,sBAAsB;AAAA,EACtB,wBAAwB;AAAA,OAClB;AACP,SAAS,IAAI,IAAI,IAAI,eAAe;AACpC,SAAS,SAAS,iBAAiB;AAEnC,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AA6DtB,SAEE,KAFF;AArDF,IAAM,uBAAuB;AAEd,SAAR,oBAAsC,EAAE,KAAK,GAAwB;AAC3E,QAAM,UACL,OAAO,KAAK,YAAY,WACrB,KAAK,UACL,KAAK,SAAS,OAAO;AAOzB,QAAM,gBAAgB;AAAA,IACrB;AAAA,IACA;AAAA,EACD;AACA,QAAM,eAAe;AAAA,IACpB,MAAQ,UAAU,UAAW,SAAS,aAAc,IAAI;AAAA,IACxD,CAAE,SAAS,aAAc;AAAA,EAC1B;AAEA,QAAM,WAAW,KAAK;AAEtB,MAAK,CAAE,gBAAgB,CAAE,UAAW;AACnC,WAAO;AAAA,EACR;AAEA,MAAI;AACJ,MAAK,cAAe;AACnB,UAAM,cAAc,KAAK,MAAO,eAAe,oBAAqB;AACpE,UAAM,iBAAiB;AAAA;AAAA,MAEtB,GAAI,WAAW,YAAY,YAAa;AAAA,MACxC,aAAa,eAAe;AAAA,IAC7B;AACA,UAAM,cACL,eAAe,IACZ,GAAI,UAAW,IACf;AAAA;AAAA,MAEA,GAAI,aAAa,cAAc,WAAY;AAAA,MAC3C,YAAY,eAAe;AAAA,IAC3B;AACJ,sBAAkB;AAAA;AAAA,MAEjB,GAAI,uBAAwB;AAAA,MAC5B;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,SACC,qBAAC,UAAO,SAAU,GACf;AAAA,uBACD,oBAAC,QAAK,SAAQ,SAAU,2BAAiB;AAAA,IAExC,YACD,oBAAC,QAAK,SAAQ,SACX;AAAA;AAAA,MAED,GAAI,iBAAkB;AAAA,MACtB,cAAe,QAAS;AAAA,IACzB,GACD;AAAA,KAEF;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -7,7 +7,7 @@ function StatusView({ item }) {
|
|
|
7
7
|
const label = status?.label || item.status;
|
|
8
8
|
const icon = status?.icon;
|
|
9
9
|
return /* @__PURE__ */ jsxs(HStack, { alignment: "left", spacing: 0, children: [
|
|
10
|
-
icon && /* @__PURE__ */ jsx("div", { className: "
|
|
10
|
+
icon && /* @__PURE__ */ jsx("div", { className: "fields-controls__status-icon", children: /* @__PURE__ */ jsx(Icon, { icon }) }),
|
|
11
11
|
/* @__PURE__ */ jsx("span", { children: label })
|
|
12
12
|
] });
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fields/status/status-view.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport STATUSES from './status-elements';\n\nfunction StatusView( { item }: { item: BasePost } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"
|
|
5
|
-
"mappings": ";AAGA,SAAS,wBAAwB,QAAQ,YAAY;AAMrD,OAAO,cAAc;AAOnB,SAGG,KAHH;AALF,SAAS,WAAY,EAAE,KAAK,GAAwB;AACnD,QAAM,SAAS,SAAS,KAAM,CAAE,EAAE,MAAM,MAAO,UAAU,KAAK,MAAO;AACrE,QAAM,QAAQ,QAAQ,SAAS,KAAK;AACpC,QAAM,OAAO,QAAQ;AACrB,SACC,qBAAC,UAAO,WAAU,QAAO,SAAU,GAChC;AAAA,YACD,oBAAC,SAAI,WAAU,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport STATUSES from './status-elements';\n\nfunction StatusView( { item }: { item: BasePost } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"fields-controls__status-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>{ label }</span>\n\t\t</HStack>\n\t);\n}\n\nexport default StatusView;\n"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,wBAAwB,QAAQ,YAAY;AAMrD,OAAO,cAAc;AAOnB,SAGG,KAHH;AALF,SAAS,WAAY,EAAE,KAAK,GAAwB;AACnD,QAAM,SAAS,SAAS,KAAM,CAAE,EAAE,MAAM,MAAO,UAAU,KAAK,MAAO;AACrE,QAAM,QAAQ,QAAQ,SAAS,KAAK;AACpC,QAAM,OAAO,QAAQ;AACrB,SACC,qBAAC,UAAO,WAAU,QAAO,SAAU,GAChC;AAAA,YACD,oBAAC,SAAI,WAAU,gCACd,8BAAC,QAAK,MAAc,GACrB;AAAA,IAED,oBAAC,UAAO,iBAAO;AAAA,KAChB;AAEF;AAEA,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -404,6 +404,47 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
404
404
|
aspect-ratio: var(--fields-media-edit-expanded-multiple-aspect-ratio, 3/2);
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
.fields-controls__author-avatar {
|
|
408
|
+
flex-shrink: 0;
|
|
409
|
+
overflow: hidden;
|
|
410
|
+
width: 24px;
|
|
411
|
+
height: 24px;
|
|
412
|
+
align-items: center;
|
|
413
|
+
justify-content: right;
|
|
414
|
+
display: flex;
|
|
415
|
+
}
|
|
416
|
+
.fields-controls__author-avatar img {
|
|
417
|
+
width: 16px;
|
|
418
|
+
height: 16px;
|
|
419
|
+
object-fit: cover;
|
|
420
|
+
opacity: 0;
|
|
421
|
+
border-radius: 100%;
|
|
422
|
+
}
|
|
423
|
+
@media not (prefers-reduced-motion) {
|
|
424
|
+
.fields-controls__author-avatar img {
|
|
425
|
+
transition: opacity 0.1s linear;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
.fields-controls__author-avatar.is-loaded img {
|
|
429
|
+
opacity: 1;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.fields-controls__author-icon {
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-shrink: 0;
|
|
435
|
+
width: 24px;
|
|
436
|
+
height: 24px;
|
|
437
|
+
}
|
|
438
|
+
.fields-controls__author-icon svg {
|
|
439
|
+
margin-right: -4px;
|
|
440
|
+
fill: currentColor;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.fields-controls__author-name {
|
|
444
|
+
text-overflow: ellipsis;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
}
|
|
447
|
+
|
|
407
448
|
.fields-controls__slug {
|
|
408
449
|
border: 0;
|
|
409
450
|
padding: 0;
|
|
@@ -451,6 +492,15 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
451
492
|
margin: 0;
|
|
452
493
|
}
|
|
453
494
|
|
|
495
|
+
.fields-controls__status-icon {
|
|
496
|
+
height: 24px;
|
|
497
|
+
width: 24px;
|
|
498
|
+
}
|
|
499
|
+
.fields-controls__status-icon svg {
|
|
500
|
+
fill: currentColor;
|
|
501
|
+
margin-right: -4px;
|
|
502
|
+
}
|
|
503
|
+
|
|
454
504
|
.fields-field__title > span:first-child {
|
|
455
505
|
text-overflow: ellipsis;
|
|
456
506
|
overflow: hidden;
|
package/build-style/style.css
CHANGED
|
@@ -404,6 +404,47 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
404
404
|
aspect-ratio: var(--fields-media-edit-expanded-multiple-aspect-ratio, 3/2);
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
.fields-controls__author-avatar {
|
|
408
|
+
flex-shrink: 0;
|
|
409
|
+
overflow: hidden;
|
|
410
|
+
width: 24px;
|
|
411
|
+
height: 24px;
|
|
412
|
+
align-items: center;
|
|
413
|
+
justify-content: left;
|
|
414
|
+
display: flex;
|
|
415
|
+
}
|
|
416
|
+
.fields-controls__author-avatar img {
|
|
417
|
+
width: 16px;
|
|
418
|
+
height: 16px;
|
|
419
|
+
object-fit: cover;
|
|
420
|
+
opacity: 0;
|
|
421
|
+
border-radius: 100%;
|
|
422
|
+
}
|
|
423
|
+
@media not (prefers-reduced-motion) {
|
|
424
|
+
.fields-controls__author-avatar img {
|
|
425
|
+
transition: opacity 0.1s linear;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
.fields-controls__author-avatar.is-loaded img {
|
|
429
|
+
opacity: 1;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.fields-controls__author-icon {
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-shrink: 0;
|
|
435
|
+
width: 24px;
|
|
436
|
+
height: 24px;
|
|
437
|
+
}
|
|
438
|
+
.fields-controls__author-icon svg {
|
|
439
|
+
margin-left: -4px;
|
|
440
|
+
fill: currentColor;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.fields-controls__author-name {
|
|
444
|
+
text-overflow: ellipsis;
|
|
445
|
+
overflow: hidden;
|
|
446
|
+
}
|
|
447
|
+
|
|
407
448
|
.fields-controls__slug {
|
|
408
449
|
border: 0;
|
|
409
450
|
padding: 0;
|
|
@@ -451,6 +492,15 @@ fieldset.fields__media-edit .fields__media-edit-expanded:not(.is-empty) .fields_
|
|
|
451
492
|
margin: 0;
|
|
452
493
|
}
|
|
453
494
|
|
|
495
|
+
.fields-controls__status-icon {
|
|
496
|
+
height: 24px;
|
|
497
|
+
width: 24px;
|
|
498
|
+
}
|
|
499
|
+
.fields-controls__status-icon svg {
|
|
500
|
+
fill: currentColor;
|
|
501
|
+
margin-left: -4px;
|
|
502
|
+
}
|
|
503
|
+
|
|
454
504
|
.fields-field__title > span:first-child {
|
|
455
505
|
text-overflow: ellipsis;
|
|
456
506
|
overflow: hidden;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { BasePost } from '../../../types';
|
|
9
|
+
declare const scheduledDateField: Field<BasePost>;
|
|
10
|
+
/**
|
|
11
|
+
* ScheduledDate Field.
|
|
12
|
+
*/
|
|
13
|
+
export default scheduledDateField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/fields/date/scheduled/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAE,QAAQ,CAUxC,CAAC;AAEF;;GAEG;AACH,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/featured-image/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAGrE,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAE,iCAAiC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/featured-image/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAOlD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAGrE,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAE,iCAAiC,CAYjE,CAAC;AAEF;;GAEG;AACH,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { BasePost } from '../../types';
|
|
9
|
+
declare const formatField: Field<BasePost>;
|
|
10
|
+
/**
|
|
11
|
+
* Format field for BasePost.
|
|
12
|
+
*/
|
|
13
|
+
export default formatField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/format/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAKlD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA2B5C,QAAA,MAAM,WAAW,EAAE,KAAK,CAAE,QAAQ,CAkBjC,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
|
|
@@ -13,6 +13,9 @@ export { default as commentStatusField } from './comment-status';
|
|
|
13
13
|
export { default as pingStatusField } from './ping-status';
|
|
14
14
|
export { default as discussionField } from './discussion';
|
|
15
15
|
export { default as dateField } from './date';
|
|
16
|
+
export { default as scheduledDateField } from './date/scheduled';
|
|
16
17
|
export { default as authorField } from './author';
|
|
17
18
|
export { default as notesField } from './notes';
|
|
19
|
+
export { default as formatField } from './format';
|
|
20
|
+
export { default as postContentInfoField } from './post-content-info';
|
|
18
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fields/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,O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AC;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { BasePost } from '../../types';
|
|
9
|
+
declare const postContentInfoField: Field<BasePost>;
|
|
10
|
+
/**
|
|
11
|
+
* Post content information field for BasePost.
|
|
12
|
+
*/
|
|
13
|
+
export default postContentInfoField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/post-content-info/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAG5C,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAE,QAAQ,CAS1C,CAAC;AAEF;;GAEG;AACH,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-content-info-view.d.ts","sourceRoot":"","sources":["../../../src/fields/post-content-info/post-content-info-view.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAK5C,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,sCAkExE"}
|
package/build-types/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,KAAK,UAAU,GACZ,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,OAAO,CAAC;AAEX,MAAM,WAAW,UAAU;IAC1B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,OAAO,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,GAAG,M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AO,GAAG,UAAU,GAAG,qBAAqB,GAAG,UAAU,CAClE;IACD;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/fields",
|
|
3
|
-
"version": "0.33.0",
|
|
3
|
+
"version": "0.33.1-next.v.202603102151.0+59e17f9ec",
|
|
4
4
|
"description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -48,30 +48,30 @@
|
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@react-spring/web": "^9.4.5",
|
|
51
|
-
"@wordpress/api-fetch": "^7.41.0",
|
|
52
|
-
"@wordpress/base-styles": "^6.17.0",
|
|
53
|
-
"@wordpress/blob": "^4.41.0",
|
|
54
|
-
"@wordpress/
|
|
55
|
-
"@wordpress/
|
|
56
|
-
"@wordpress/
|
|
57
|
-
"@wordpress/
|
|
58
|
-
"@wordpress/
|
|
59
|
-
"@wordpress/
|
|
60
|
-
"@wordpress/
|
|
61
|
-
"@wordpress/
|
|
62
|
-
"@wordpress/
|
|
63
|
-
"@wordpress/
|
|
64
|
-
"@wordpress/
|
|
65
|
-
"@wordpress/
|
|
66
|
-
"@wordpress/
|
|
67
|
-
"@wordpress/
|
|
68
|
-
"@wordpress/
|
|
69
|
-
"@wordpress/
|
|
70
|
-
"@wordpress/
|
|
71
|
-
"@wordpress/
|
|
72
|
-
"@wordpress/
|
|
73
|
-
"@wordpress/
|
|
74
|
-
"@wordpress/
|
|
51
|
+
"@wordpress/api-fetch": "^7.41.1-next.v.202603102151.0+59e17f9ec",
|
|
52
|
+
"@wordpress/base-styles": "^6.17.1-next.v.202603102151.0+59e17f9ec",
|
|
53
|
+
"@wordpress/blob": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
54
|
+
"@wordpress/blocks": "^15.14.1-next.v.202603102151.0+59e17f9ec",
|
|
55
|
+
"@wordpress/components": "^32.4.1-next.v.202603102151.0+59e17f9ec",
|
|
56
|
+
"@wordpress/compose": "^7.41.1-next.v.202603102151.0+59e17f9ec",
|
|
57
|
+
"@wordpress/core-data": "^7.41.2-next.v.202603102151.0+59e17f9ec",
|
|
58
|
+
"@wordpress/data": "^10.41.1-next.v.202603102151.0+59e17f9ec",
|
|
59
|
+
"@wordpress/dataviews": "^13.1.1-next.v.202603102151.0+59e17f9ec",
|
|
60
|
+
"@wordpress/date": "^5.41.1-next.v.202603102151.0+59e17f9ec",
|
|
61
|
+
"@wordpress/element": "^6.41.1-next.v.202603102151.0+59e17f9ec",
|
|
62
|
+
"@wordpress/hooks": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
63
|
+
"@wordpress/html-entities": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
64
|
+
"@wordpress/i18n": "^6.14.1-next.v.202603102151.0+59e17f9ec",
|
|
65
|
+
"@wordpress/icons": "^12.0.1-next.v.202603102151.0+59e17f9ec",
|
|
66
|
+
"@wordpress/media-utils": "^5.41.1-next.v.202603102151.0+59e17f9ec",
|
|
67
|
+
"@wordpress/notices": "^5.41.1-next.v.202603102151.0+59e17f9ec",
|
|
68
|
+
"@wordpress/patterns": "^2.41.1-next.v.202603102151.0+59e17f9ec",
|
|
69
|
+
"@wordpress/primitives": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
70
|
+
"@wordpress/private-apis": "^1.41.1-next.v.202603102151.0+59e17f9ec",
|
|
71
|
+
"@wordpress/router": "^1.41.1-next.v.202603102151.0+59e17f9ec",
|
|
72
|
+
"@wordpress/url": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
73
|
+
"@wordpress/warning": "^3.41.1-next.v.202603102151.0+59e17f9ec",
|
|
74
|
+
"@wordpress/wordcount": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
75
75
|
"change-case": "4.1.2",
|
|
76
76
|
"client-zip": "^2.4.5",
|
|
77
77
|
"clsx": "2.1.1",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "86db21e727d89e8f0dbba9300d2f97fd22b08693"
|
|
87
87
|
}
|
|
@@ -19,13 +19,13 @@ import { store as coreStore } from '@wordpress/core-data';
|
|
|
19
19
|
import type { BasePostWithEmbeddedAuthor } from '../../types';
|
|
20
20
|
|
|
21
21
|
function AuthorView( { item }: { item: BasePostWithEmbeddedAuthor } ) {
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
22
|
+
// Fetch the author record from the store when _embedded data is unavailable
|
|
23
|
+
// (e.g. in the post editor inspector) or when the author has been changed
|
|
24
|
+
// during editing (item.author differs from _embedded.author).
|
|
25
25
|
const authorId = item?.author;
|
|
26
26
|
const embeddedAuthorId = item?._embedded?.author?.[ 0 ]?.id;
|
|
27
27
|
const shouldFetch = Boolean(
|
|
28
|
-
authorId && embeddedAuthorId
|
|
28
|
+
authorId && ( ! embeddedAuthorId || authorId !== embeddedAuthorId )
|
|
29
29
|
);
|
|
30
30
|
const author = useSelect(
|
|
31
31
|
( select ) => {
|
|
@@ -51,7 +51,7 @@ function AuthorView( { item }: { item: BasePostWithEmbeddedAuthor } ) {
|
|
|
51
51
|
<HStack alignment="left" spacing={ 0 }>
|
|
52
52
|
{ !! imageUrl && (
|
|
53
53
|
<div
|
|
54
|
-
className={ clsx( '
|
|
54
|
+
className={ clsx( 'fields-controls__author-avatar', {
|
|
55
55
|
'is-loaded': isImageLoaded,
|
|
56
56
|
} ) }
|
|
57
57
|
>
|
|
@@ -63,11 +63,11 @@ function AuthorView( { item }: { item: BasePostWithEmbeddedAuthor } ) {
|
|
|
63
63
|
</div>
|
|
64
64
|
) }
|
|
65
65
|
{ ! imageUrl && (
|
|
66
|
-
<div className="
|
|
66
|
+
<div className="fields-controls__author-icon">
|
|
67
67
|
<Icon icon={ authorIcon } />
|
|
68
68
|
</div>
|
|
69
69
|
) }
|
|
70
|
-
<span className="
|
|
70
|
+
<span className="fields-controls__author-name">{ text }</span>
|
|
71
71
|
</HStack>
|
|
72
72
|
);
|
|
73
73
|
}
|