@wordpress/fields 0.40.1 → 0.41.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/README.md +44 -0
- package/build/actions/rename-post.cjs +0 -1
- package/build/actions/rename-post.cjs.map +2 -2
- package/build/components/create-template-part-modal/index.cjs +0 -1
- package/build/components/create-template-part-modal/index.cjs.map +2 -2
- package/build/components/media-edit/index.cjs.map +2 -2
- package/build/fields/description/index.cjs +70 -0
- package/build/fields/description/index.cjs.map +7 -0
- package/build/fields/index.cjs +24 -2
- package/build/fields/index.cjs.map +2 -2
- package/build/fields/last-edited/index.cjs +51 -0
- package/build/fields/last-edited/index.cjs.map +7 -0
- package/build/fields/last-edited/last-edited-date-view.cjs +40 -0
- package/build/fields/last-edited/last-edited-date-view.cjs.map +7 -0
- package/build/fields/parent/parent-edit.cjs +1 -1
- package/build/fields/parent/parent-edit.cjs.map +2 -2
- package/build/fields/password/edit.cjs +0 -1
- package/build/fields/password/edit.cjs.map +2 -2
- package/build/fields/pattern-title/view.cjs.map +2 -2
- package/build/fields/posts-page-title/index.cjs +47 -0
- package/build/fields/posts-page-title/index.cjs.map +7 -0
- package/build/fields/posts-per-page/index.cjs +42 -0
- package/build/fields/posts-per-page/index.cjs.map +7 -0
- package/build/fields/{date/scheduled → scheduled-date}/index.cjs +6 -6
- package/build/fields/scheduled-date/index.cjs.map +7 -0
- package/build/fields/site-discussion/index.cjs +58 -0
- package/build/fields/site-discussion/index.cjs.map +7 -0
- package/build/fields/template-author/index.cjs +81 -0
- package/build/fields/template-author/index.cjs.map +7 -0
- package/build/fields/template-author/view.cjs +101 -0
- package/build/fields/template-author/view.cjs.map +7 -0
- package/build/fields/template-title/index.cjs +1 -1
- package/build/fields/template-title/index.cjs.map +2 -2
- package/build/types.cjs.map +1 -1
- package/build-module/actions/rename-post.mjs +0 -1
- package/build-module/actions/rename-post.mjs.map +2 -2
- package/build-module/components/create-template-part-modal/index.mjs +0 -1
- package/build-module/components/create-template-part-modal/index.mjs.map +2 -2
- package/build-module/components/media-edit/index.mjs.map +2 -2
- package/build-module/fields/description/index.mjs +45 -0
- package/build-module/fields/description/index.mjs.map +7 -0
- package/build-module/fields/index.mjs +33 -13
- package/build-module/fields/index.mjs.map +2 -2
- package/build-module/fields/last-edited/index.mjs +20 -0
- package/build-module/fields/last-edited/index.mjs.map +7 -0
- package/build-module/fields/last-edited/last-edited-date-view.mjs +19 -0
- package/build-module/fields/last-edited/last-edited-date-view.mjs.map +7 -0
- package/build-module/fields/parent/parent-edit.mjs +1 -1
- package/build-module/fields/parent/parent-edit.mjs.map +2 -2
- package/build-module/fields/password/edit.mjs +0 -1
- package/build-module/fields/password/edit.mjs.map +2 -2
- package/build-module/fields/pattern-title/view.mjs.map +2 -2
- package/build-module/fields/posts-page-title/index.mjs +26 -0
- package/build-module/fields/posts-page-title/index.mjs.map +7 -0
- package/build-module/fields/posts-per-page/index.mjs +21 -0
- package/build-module/fields/posts-per-page/index.mjs.map +7 -0
- package/build-module/fields/{date/scheduled → scheduled-date}/index.mjs +3 -3
- package/build-module/fields/scheduled-date/index.mjs.map +7 -0
- package/build-module/fields/site-discussion/index.mjs +37 -0
- package/build-module/fields/site-discussion/index.mjs.map +7 -0
- package/build-module/fields/template-author/index.mjs +45 -0
- package/build-module/fields/template-author/index.mjs.map +7 -0
- package/build-module/fields/template-author/view.mjs +75 -0
- package/build-module/fields/template-author/view.mjs.map +7 -0
- package/build-module/fields/template-title/index.mjs +1 -1
- package/build-module/fields/template-title/index.mjs.map +2 -2
- package/build-types/actions/rename-post.d.ts.map +1 -1
- package/build-types/components/create-template-part-modal/index.d.ts.map +1 -1
- package/build-types/components/media-edit/index.d.ts.map +1 -1
- package/build-types/fields/description/index.d.ts +20 -0
- package/build-types/fields/description/index.d.ts.map +1 -0
- package/build-types/fields/index.d.ts +7 -1
- package/build-types/fields/index.d.ts.map +1 -1
- package/build-types/fields/last-edited/index.d.ts +14 -0
- package/build-types/fields/last-edited/index.d.ts.map +1 -0
- package/build-types/fields/last-edited/last-edited-date-view.d.ts +8 -0
- package/build-types/fields/last-edited/last-edited-date-view.d.ts.map +1 -0
- package/build-types/fields/password/edit.d.ts.map +1 -1
- package/build-types/fields/pattern-title/view.d.ts.map +1 -1
- package/build-types/fields/posts-page-title/index.d.ts +14 -0
- package/build-types/fields/posts-page-title/index.d.ts.map +1 -0
- package/build-types/fields/posts-per-page/index.d.ts +14 -0
- package/build-types/fields/posts-per-page/index.d.ts.map +1 -0
- package/build-types/fields/{date/scheduled → scheduled-date}/index.d.ts +1 -1
- package/build-types/fields/scheduled-date/index.d.ts.map +1 -0
- package/build-types/fields/site-discussion/index.d.ts +14 -0
- package/build-types/fields/site-discussion/index.d.ts.map +1 -0
- package/build-types/fields/template-author/index.d.ts +14 -0
- package/build-types/fields/template-author/index.d.ts.map +1 -0
- package/build-types/fields/template-author/view.d.ts +8 -0
- package/build-types/fields/template-author/view.d.ts.map +1 -0
- package/build-types/types.d.ts +17 -2
- package/build-types/types.d.ts.map +1 -1
- package/package.json +33 -28
- package/src/actions/rename-post.tsx +0 -1
- package/src/components/create-template-part-modal/index.tsx +0 -1
- package/src/components/media-edit/index.tsx +0 -1
- package/src/fields/description/index.tsx +65 -0
- package/src/fields/index.ts +13 -1
- package/src/fields/last-edited/index.tsx +29 -0
- package/src/fields/last-edited/last-edited-date-view.tsx +26 -0
- package/src/fields/password/edit.tsx +0 -1
- package/src/fields/pattern-title/view.tsx +0 -1
- package/src/fields/posts-page-title/index.ts +35 -0
- package/src/fields/posts-per-page/index.ts +30 -0
- package/src/fields/{date/scheduled → scheduled-date}/index.tsx +1 -1
- package/src/fields/site-discussion/index.ts +48 -0
- package/src/fields/template-author/index.tsx +60 -0
- package/src/fields/template-author/view.tsx +95 -0
- package/src/fields/template-title/index.ts +1 -1
- package/src/types.ts +18 -2
- package/build/fields/date/scheduled/index.cjs.map +0 -7
- package/build-module/fields/date/scheduled/index.mjs.map +0 -7
- package/build-types/fields/date/scheduled/index.d.ts.map +0 -1
- package/build-types/index.native.d.ts +0 -1
- package/build-types/index.native.d.ts.map +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// packages/fields/src/fields/posts-page-title/index.ts
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
var postsPageTitleField = {
|
|
4
|
+
id: "posts_page_title",
|
|
5
|
+
type: "text",
|
|
6
|
+
label: __("Blog title"),
|
|
7
|
+
description: __(
|
|
8
|
+
"Set the Posts Page title. Appears in search results, and when the page is shared on social media."
|
|
9
|
+
),
|
|
10
|
+
getValue: ({ item }) => {
|
|
11
|
+
const title = item.title;
|
|
12
|
+
if (typeof title === "string") {
|
|
13
|
+
return title;
|
|
14
|
+
}
|
|
15
|
+
return title?.raw ?? "";
|
|
16
|
+
},
|
|
17
|
+
setValue: ({ value }) => ({ title: value }),
|
|
18
|
+
enableSorting: false,
|
|
19
|
+
enableHiding: false,
|
|
20
|
+
filterBy: false
|
|
21
|
+
};
|
|
22
|
+
var posts_page_title_default = postsPageTitleField;
|
|
23
|
+
export {
|
|
24
|
+
posts_page_title_default as default
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/posts-page-title/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 { PostsPage } from '../../types';\n\nconst postsPageTitleField: Field< PostsPage > = {\n\tid: 'posts_page_title',\n\ttype: 'text',\n\tlabel: __( 'Blog title' ),\n\tdescription: __(\n\t\t'Set the Posts Page title. Appears in search results, and when the page is shared on social media.'\n\t),\n\tgetValue: ( { item } ) => {\n\t\tconst title = item.title;\n\t\tif ( typeof title === 'string' ) {\n\t\t\treturn title;\n\t\t}\n\t\treturn title?.raw ?? '';\n\t},\n\tsetValue: ( { value } ) => ( { title: value } ),\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n};\n\n/**\n * Title field for the posts page (the `page` assigned as `page_for_posts`).\n */\nexport default postsPageTitleField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAOnB,IAAM,sBAA0C;AAAA,EAC/C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,YAAa;AAAA,EACxB,aAAa;AAAA,IACZ;AAAA,EACD;AAAA,EACA,UAAU,CAAE,EAAE,KAAK,MAAO;AACzB,UAAM,QAAQ,KAAK;AACnB,QAAK,OAAO,UAAU,UAAW;AAChC,aAAO;AAAA,IACR;AACA,WAAO,OAAO,OAAO;AAAA,EACtB;AAAA,EACA,UAAU,CAAE,EAAE,MAAM,OAAS,EAAE,OAAO,MAAM;AAAA,EAC5C,eAAe;AAAA,EACf,cAAc;AAAA,EACd,UAAU;AACX;AAKA,IAAO,2BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// packages/fields/src/fields/posts-per-page/index.ts
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
var postsPerPageField = {
|
|
4
|
+
id: "posts_per_page",
|
|
5
|
+
type: "integer",
|
|
6
|
+
label: __("Posts per page"),
|
|
7
|
+
description: __(
|
|
8
|
+
"Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting."
|
|
9
|
+
),
|
|
10
|
+
getValue: ({ item }) => item.posts_per_page ?? 1,
|
|
11
|
+
setValue: ({ value }) => ({ posts_per_page: value }),
|
|
12
|
+
isValid: { min: 1 },
|
|
13
|
+
enableSorting: false,
|
|
14
|
+
enableHiding: false,
|
|
15
|
+
filterBy: false
|
|
16
|
+
};
|
|
17
|
+
var posts_per_page_default = postsPerPageField;
|
|
18
|
+
export {
|
|
19
|
+
posts_per_page_default as default
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/posts-per-page/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 { SiteSettings } from '../../types';\n\nconst postsPerPageField: Field< SiteSettings > = {\n\tid: 'posts_per_page',\n\ttype: 'integer',\n\tlabel: __( 'Posts per page' ),\n\tdescription: __(\n\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t),\n\tgetValue: ( { item } ) => item.posts_per_page ?? 1,\n\tsetValue: ( { value } ) => ( { posts_per_page: value } ),\n\tisValid: { min: 1 },\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n};\n\n/**\n * Posts per page field for the `root/site` entity.\n */\nexport default postsPerPageField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAOnB,IAAM,oBAA2C;AAAA,EAChD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,gBAAiB;AAAA,EAC5B,aAAa;AAAA,IACZ;AAAA,EACD;AAAA,EACA,UAAU,CAAE,EAAE,KAAK,MAAO,KAAK,kBAAkB;AAAA,EACjD,UAAU,CAAE,EAAE,MAAM,OAAS,EAAE,gBAAgB,MAAM;AAAA,EACrD,SAAS,EAAE,KAAK,EAAE;AAAA,EAClB,eAAe;AAAA,EACf,cAAc;AAAA,EACd,UAAU;AACX;AAKA,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// packages/fields/src/fields/date/
|
|
1
|
+
// packages/fields/src/fields/scheduled-date/index.tsx
|
|
2
2
|
import { __ } from "@wordpress/i18n";
|
|
3
3
|
var scheduledDateField = {
|
|
4
4
|
id: "scheduled_date",
|
|
@@ -15,8 +15,8 @@ var scheduledDateField = {
|
|
|
15
15
|
enableSorting: false,
|
|
16
16
|
filterBy: false
|
|
17
17
|
};
|
|
18
|
-
var
|
|
18
|
+
var scheduled_date_default = scheduledDateField;
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
scheduled_date_default as default
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/scheduled-date/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 type { BasePost } from '../../types';\n\nconst scheduledDateField: Field< BasePost > = {\n\tid: 'scheduled_date',\n\ttype: 'datetime',\n\tlabel: __( 'Scheduled Date' ),\n\tgetValue: ( { item } ) => item.date,\n\tsetValue: ( { value } ) => ( { date: value } ),\n\tisVisible: ( item ) => item.status === 'future',\n\tEdit: {\n\t\tcontrol: 'datetime',\n\t\tcompact: true,\n\t},\n\tenableHiding: false,\n\tenableSorting: false,\n\tfilterBy: false,\n};\n\n/**\n * ScheduledDate Field.\n */\nexport default scheduledDateField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAOnB,IAAM,qBAAwC;AAAA,EAC7C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,gBAAiB;AAAA,EAC5B,UAAU,CAAE,EAAE,KAAK,MAAO,KAAK;AAAA,EAC/B,UAAU,CAAE,EAAE,MAAM,OAAS,EAAE,MAAM,MAAM;AAAA,EAC3C,WAAW,CAAE,SAAU,KAAK,WAAW;AAAA,EACvC,MAAM;AAAA,IACL,SAAS;AAAA,IACT,SAAS;AAAA,EACV;AAAA,EACA,cAAc;AAAA,EACd,eAAe;AAAA,EACf,UAAU;AACX;AAKA,IAAO,yBAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// packages/fields/src/fields/site-discussion/index.ts
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
var siteDiscussionField = {
|
|
4
|
+
id: "default_comment_status",
|
|
5
|
+
type: "text",
|
|
6
|
+
label: __("Discussion"),
|
|
7
|
+
Edit: "radio",
|
|
8
|
+
getValue: ({ item }) => item.default_comment_status || "",
|
|
9
|
+
setValue: ({ value }) => ({
|
|
10
|
+
default_comment_status: value || null
|
|
11
|
+
}),
|
|
12
|
+
render: ({ item }) => {
|
|
13
|
+
return item.default_comment_status === "open" ? __("Comments open") : __("Comments closed");
|
|
14
|
+
},
|
|
15
|
+
elements: [
|
|
16
|
+
{
|
|
17
|
+
value: "open",
|
|
18
|
+
label: __("Open"),
|
|
19
|
+
description: __("Visitors can add new comments and replies.")
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
value: "",
|
|
23
|
+
label: __("Closed"),
|
|
24
|
+
description: __(
|
|
25
|
+
"Visitors cannot add new comments or replies. Existing comments remain visible."
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
enableSorting: false,
|
|
30
|
+
enableHiding: false,
|
|
31
|
+
filterBy: false
|
|
32
|
+
};
|
|
33
|
+
var site_discussion_default = siteDiscussionField;
|
|
34
|
+
export {
|
|
35
|
+
site_discussion_default as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/site-discussion/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 { SiteSettings } from '../../types';\n\nconst siteDiscussionField: Field< SiteSettings > = {\n\tid: 'default_comment_status',\n\ttype: 'text',\n\tlabel: __( 'Discussion' ),\n\tEdit: 'radio',\n\tgetValue: ( { item } ) => item.default_comment_status || '',\n\tsetValue: ( { value } ) => ( {\n\t\tdefault_comment_status: value || null,\n\t} ),\n\trender: ( { item } ) => {\n\t\treturn item.default_comment_status === 'open'\n\t\t\t? __( 'Comments open' )\n\t\t\t: __( 'Comments closed' );\n\t},\n\telements: [\n\t\t{\n\t\t\tvalue: 'open',\n\t\t\tlabel: __( 'Open' ),\n\t\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t\t},\n\t\t{\n\t\t\tvalue: '',\n\t\t\tlabel: __( 'Closed' ),\n\t\t\tdescription: __(\n\t\t\t\t'Visitors cannot add new comments or replies. Existing comments remain visible.'\n\t\t\t),\n\t\t},\n\t],\n\tenableSorting: false,\n\tenableHiding: false,\n\tfilterBy: false,\n};\n\n/**\n * Discussion field for the `root/site` entity.\n */\nexport default siteDiscussionField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAOnB,IAAM,sBAA6C;AAAA,EAClD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,YAAa;AAAA,EACxB,MAAM;AAAA,EACN,UAAU,CAAE,EAAE,KAAK,MAAO,KAAK,0BAA0B;AAAA,EACzD,UAAU,CAAE,EAAE,MAAM,OAAS;AAAA,IAC5B,wBAAwB,SAAS;AAAA,EAClC;AAAA,EACA,QAAQ,CAAE,EAAE,KAAK,MAAO;AACvB,WAAO,KAAK,2BAA2B,SACpC,GAAI,eAAgB,IACpB,GAAI,iBAAkB;AAAA,EAC1B;AAAA,EACA,UAAU;AAAA,IACT;AAAA,MACC,OAAO;AAAA,MACP,OAAO,GAAI,MAAO;AAAA,MAClB,aAAa,GAAI,4CAA6C;AAAA,IAC/D;AAAA,IACA;AAAA,MACC,OAAO;AAAA,MACP,OAAO,GAAI,QAAS;AAAA,MACpB,aAAa;AAAA,QACZ;AAAA,MACD;AAAA,IACD;AAAA,EACD;AAAA,EACA,eAAe;AAAA,EACf,cAAc;AAAA,EACd,UAAU;AACX;AAKA,IAAO,0BAAQ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// packages/fields/src/fields/template-author/index.tsx
|
|
2
|
+
import { __ } from "@wordpress/i18n";
|
|
3
|
+
import { resolveSelect } from "@wordpress/data";
|
|
4
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
5
|
+
import TemplateAuthorView from "./view.mjs";
|
|
6
|
+
async function getAuthorElements(postType) {
|
|
7
|
+
const records = await resolveSelect(coreStore).getEntityRecords(
|
|
8
|
+
"postType",
|
|
9
|
+
postType,
|
|
10
|
+
{ per_page: -1, _fields: "id,author_text" }
|
|
11
|
+
);
|
|
12
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13
|
+
const elements = [];
|
|
14
|
+
for (const record of records ?? []) {
|
|
15
|
+
const value = record.author_text;
|
|
16
|
+
if (value && !seen.has(value)) {
|
|
17
|
+
seen.add(value);
|
|
18
|
+
elements.push({ value, label: value });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return elements;
|
|
22
|
+
}
|
|
23
|
+
var templateAuthorField = {
|
|
24
|
+
label: __("Author"),
|
|
25
|
+
id: "author",
|
|
26
|
+
getValue: ({ item }) => item.author_text,
|
|
27
|
+
render: TemplateAuthorView,
|
|
28
|
+
getElements: () => getAuthorElements("wp_template")
|
|
29
|
+
};
|
|
30
|
+
var templatePartAuthorField = {
|
|
31
|
+
label: __("Author"),
|
|
32
|
+
id: "author",
|
|
33
|
+
getValue: ({ item }) => item.author_text,
|
|
34
|
+
render: TemplateAuthorView,
|
|
35
|
+
enableSorting: false,
|
|
36
|
+
filterBy: {
|
|
37
|
+
isPrimary: true
|
|
38
|
+
},
|
|
39
|
+
getElements: () => getAuthorElements("wp_template_part")
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
templateAuthorField,
|
|
43
|
+
templatePartAuthorField
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/template-author/index.tsx"],
|
|
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 TemplateAuthorView from './view';\nimport type { Template, TemplatePart } from '../../types';\n\nasync function getAuthorElements(\n\tpostType: 'wp_template' | 'wp_template_part'\n) {\n\tconst records = ( await resolveSelect( coreStore ).getEntityRecords(\n\t\t'postType',\n\t\tpostType,\n\t\t{ per_page: -1, _fields: 'id,author_text' }\n\t) ) as ( Template | TemplatePart )[] | null;\n\n\tconst seen = new Set< string >();\n\tconst elements: { value: string; label: string }[] = [];\n\tfor ( const record of records ?? [] ) {\n\t\tconst value = record.author_text;\n\t\tif ( value && ! seen.has( value ) ) {\n\t\t\tseen.add( value );\n\t\t\telements.push( { value, label: value } );\n\t\t}\n\t}\n\treturn elements;\n}\n\n/**\n * Author field for templates.\n */\nexport const templateAuthorField: Field< Template > = {\n\tlabel: __( 'Author' ),\n\tid: 'author',\n\tgetValue: ( { item } ) => item.author_text,\n\trender: TemplateAuthorView,\n\tgetElements: () => getAuthorElements( 'wp_template' ),\n};\n\n/**\n * Author field for template parts.\n */\nexport const templatePartAuthorField: Field< TemplatePart > = {\n\tlabel: __( 'Author' ),\n\tid: 'author',\n\tgetValue: ( { item } ) => item.author_text,\n\trender: TemplateAuthorView,\n\tenableSorting: false,\n\tfilterBy: {\n\t\tisPrimary: true,\n\t},\n\tgetElements: () => getAuthorElements( 'wp_template_part' ),\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AACnB,SAAS,qBAAqB;AAC9B,SAAS,SAAS,iBAAiB;AAKnC,OAAO,wBAAwB;AAG/B,eAAe,kBACd,UACC;AACD,QAAM,UAAY,MAAM,cAAe,SAAU,EAAE;AAAA,IAClD;AAAA,IACA;AAAA,IACA,EAAE,UAAU,IAAI,SAAS,iBAAiB;AAAA,EAC3C;AAEA,QAAM,OAAO,oBAAI,IAAc;AAC/B,QAAM,WAA+C,CAAC;AACtD,aAAY,UAAU,WAAW,CAAC,GAAI;AACrC,UAAM,QAAQ,OAAO;AACrB,QAAK,SAAS,CAAE,KAAK,IAAK,KAAM,GAAI;AACnC,WAAK,IAAK,KAAM;AAChB,eAAS,KAAM,EAAE,OAAO,OAAO,MAAM,CAAE;AAAA,IACxC;AAAA,EACD;AACA,SAAO;AACR;AAKO,IAAM,sBAAyC;AAAA,EACrD,OAAO,GAAI,QAAS;AAAA,EACpB,IAAI;AAAA,EACJ,UAAU,CAAE,EAAE,KAAK,MAAO,KAAK;AAAA,EAC/B,QAAQ;AAAA,EACR,aAAa,MAAM,kBAAmB,aAAc;AACrD;AAKO,IAAM,0BAAiD;AAAA,EAC7D,OAAO,GAAI,QAAS;AAAA,EACpB,IAAI;AAAA,EACJ,UAAU,CAAE,EAAE,KAAK,MAAO,KAAK;AAAA,EAC/B,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,UAAU;AAAA,IACT,WAAW;AAAA,EACZ;AAAA,EACA,aAAa,MAAM,kBAAmB,kBAAmB;AAC1D;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// packages/fields/src/fields/template-author/view.tsx
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useState } from "@wordpress/element";
|
|
4
|
+
import { useSelect } from "@wordpress/data";
|
|
5
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
6
|
+
import {
|
|
7
|
+
commentAuthorAvatar as authorIcon,
|
|
8
|
+
layout as themeIcon,
|
|
9
|
+
plugins as pluginIcon,
|
|
10
|
+
globe as globeIcon
|
|
11
|
+
} from "@wordpress/icons";
|
|
12
|
+
import { Icon, Stack } from "@wordpress/ui";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function getIconForSource(originalSource) {
|
|
15
|
+
switch (originalSource) {
|
|
16
|
+
case "theme":
|
|
17
|
+
return themeIcon;
|
|
18
|
+
case "plugin":
|
|
19
|
+
return pluginIcon;
|
|
20
|
+
case "site":
|
|
21
|
+
return globeIcon;
|
|
22
|
+
default:
|
|
23
|
+
return authorIcon;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function TemplateAuthorView({
|
|
27
|
+
item
|
|
28
|
+
}) {
|
|
29
|
+
const [isImageLoaded, setIsImageLoaded] = useState(false);
|
|
30
|
+
const originalSource = item.original_source;
|
|
31
|
+
const icon = getIconForSource(originalSource);
|
|
32
|
+
const text = item.author_text;
|
|
33
|
+
const authorId = item.author;
|
|
34
|
+
const imageUrl = useSelect(
|
|
35
|
+
(select) => {
|
|
36
|
+
if (originalSource === "site") {
|
|
37
|
+
const siteData = select(coreStore).getEntityRecord("root", "__unstableBase");
|
|
38
|
+
const logoId = siteData?.site_logo;
|
|
39
|
+
if (!logoId) {
|
|
40
|
+
return void 0;
|
|
41
|
+
}
|
|
42
|
+
return select(coreStore).getEntityRecord("postType", "attachment", logoId)?.source_url;
|
|
43
|
+
}
|
|
44
|
+
if (originalSource !== "user" || !authorId) {
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
return select(coreStore).getUser(authorId)?.avatar_urls?.[48];
|
|
48
|
+
},
|
|
49
|
+
[originalSource, authorId]
|
|
50
|
+
);
|
|
51
|
+
return /* @__PURE__ */ jsxs(Stack, { direction: "row", align: "center", children: [
|
|
52
|
+
imageUrl && /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: clsx("fields-controls__author-avatar", {
|
|
56
|
+
"is-loaded": isImageLoaded
|
|
57
|
+
}),
|
|
58
|
+
children: /* @__PURE__ */ jsx(
|
|
59
|
+
"img",
|
|
60
|
+
{
|
|
61
|
+
onLoad: () => setIsImageLoaded(true),
|
|
62
|
+
alt: "",
|
|
63
|
+
src: imageUrl
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
!imageUrl && /* @__PURE__ */ jsx("div", { className: "fields-controls__author-icon", children: /* @__PURE__ */ jsx(Icon, { icon }) }),
|
|
69
|
+
/* @__PURE__ */ jsx("span", { className: "fields-controls__author-name", children: text })
|
|
70
|
+
] });
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
TemplateAuthorView as default
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=view.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/fields/template-author/view.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\nimport { Icon, Stack } from '@wordpress/ui';\n\n/**\n * Internal dependencies\n */\nimport type { Template, TemplatePart } from '../../types';\n\nfunction getIconForSource( originalSource: Template[ 'original_source' ] ) {\n\tswitch ( originalSource ) {\n\t\tcase 'theme':\n\t\t\treturn themeIcon;\n\t\tcase 'plugin':\n\t\t\treturn pluginIcon;\n\t\tcase 'site':\n\t\t\treturn globeIcon;\n\t\tdefault:\n\t\t\treturn authorIcon;\n\t}\n}\n\nexport default function TemplateAuthorView( {\n\titem,\n}: {\n\titem: Template | TemplatePart;\n} ) {\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\tconst originalSource = item.original_source;\n\tconst icon = getIconForSource( originalSource );\n\tconst text = item.author_text;\n\tconst authorId = item.author;\n\n\tconst imageUrl = useSelect(\n\t\t( select ) => {\n\t\t\tif ( originalSource === 'site' ) {\n\t\t\t\tconst siteData = select( coreStore ).getEntityRecord< {\n\t\t\t\t\tsite_logo?: number;\n\t\t\t\t} >( 'root', '__unstableBase' );\n\t\t\t\tconst logoId = siteData?.site_logo;\n\t\t\t\tif ( ! logoId ) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\treturn select( coreStore ).getEntityRecord< {\n\t\t\t\t\tsource_url: string;\n\t\t\t\t} >( 'postType', 'attachment', logoId )?.source_url;\n\t\t\t}\n\n\t\t\tif ( originalSource !== 'user' || ! authorId ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn select( coreStore ).getUser( authorId )?.avatar_urls?.[ 48 ];\n\t\t},\n\t\t[ originalSource, authorId ]\n\t);\n\n\treturn (\n\t\t<Stack direction=\"row\" align=\"center\">\n\t\t\t{ imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'fields-controls__author-avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"fields-controls__author-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 className=\"fields-controls__author-name\">{ text }</span>\n\t\t</Stack>\n\t);\n}\n"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAA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A,QACP;AAAA;AAAA,IACD;AAAA,IAEC,CAAE,YACH,oBAAC,SAAI,WAAU,gCACd,8BAAC,QAAK,MAAc,GACrB;AAAA,IAED,oBAAC,UAAK,WAAU,gCAAiC,gBAAM;AAAA,KACxD;AAEF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,10 +3,10 @@ import { __ } from "@wordpress/i18n";
|
|
|
3
3
|
import { getItemTitle } from "../../actions/utils.mjs";
|
|
4
4
|
import TitleView from "../title/view.mjs";
|
|
5
5
|
var templateTitleField = {
|
|
6
|
+
id: "title",
|
|
6
7
|
type: "text",
|
|
7
8
|
label: __("Template"),
|
|
8
9
|
placeholder: __("No title"),
|
|
9
|
-
id: "title",
|
|
10
10
|
getValue: ({ item }) => getItemTitle(item),
|
|
11
11
|
render: TitleView,
|
|
12
12
|
enableHiding: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/fields/template-title/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 { Template } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from '../title/view';\n\nconst templateTitleField: Field< Template > = {\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tplaceholder: __( 'No title' ),\n\
|
|
5
|
-
"mappings": ";AAIA,SAAS,UAAU;AAMnB,SAAS,oBAAoB;AAC7B,OAAO,eAAe;AAEtB,IAAM,qBAAwC;AAAA,EAC7C,MAAM;AAAA,EACN,OAAO,GAAI,UAAW;AAAA,EACtB,aAAa,GAAI,UAAW;AAAA,EAC5B,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Template } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from '../title/view';\n\nconst templateTitleField: Field< Template > = {\n\tid: 'title',\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n\tfilterBy: false,\n};\n\n/**\n * Title for the template entity.\n */\nexport default templateTitleField;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,UAAU;AAMnB,SAAS,oBAAoB;AAC7B,OAAO,eAAe;AAEtB,IAAM,qBAAwC;AAAA,EAC7C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO,GAAI,UAAW;AAAA,EACtB,aAAa,GAAI,UAAW;AAAA,EAC5B,UAAU,CAAE,EAAE,KAAK,MAAO,aAAc,IAAK;AAAA,EAC7C,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,oBAAoB;AAAA,EACpB,UAAU;AACX;AAKA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../src/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAcnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../src/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAcnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAkH5C,CAAC;AAEF;;GAEG;eACY,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/create-template-part-modal/index.tsx"],"names":[],"mappings":"AA6CA,KAAK,oCAAoC,GAAG;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAE,YAAY,EAAE,GAAG,KAAM,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAE,EAChD,UAAU,EACV,GAAG,SAAS,EACZ,EAAE;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,oCAAoC,+BAkBvC;AAsBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAAE,EAChD,WAA6B,EAC7B,MAAW,EACX,YAA0B,EAC1B,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAiB,EACjB,EAAE,oCAAoC,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/create-template-part-modal/index.tsx"],"names":[],"mappings":"AA6CA,KAAK,oCAAoC,GAAG;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAE,YAAY,EAAE,GAAG,KAAM,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAE,EAChD,UAAU,EACV,GAAG,SAAS,EACZ,EAAE;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,oCAAoC,+BAkBvC;AAsBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAAE,EAChD,WAA6B,EAC7B,MAAW,EACX,YAA0B,EAC1B,UAAU,EACV,QAAQ,EACR,OAAO,EACP,YAAiB,EACjB,EAAE,oCAAoC,+BAgKtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-edit/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/media-edit/index.tsx"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAqflD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAE,IAAI,EAAI,EAC1C,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,mBAAmB,EACnB,YAA0B,EAC1B,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,EAAE,cAAc,CAAE,IAAI,CAAE,+BA8XxB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { Template } from '../../types';
|
|
9
|
+
declare const descriptionField: Field<Template>;
|
|
10
|
+
/**
|
|
11
|
+
* Read-only description field for theme-provided templates, which can't be
|
|
12
|
+
* edited. Shares the display config with `descriptionField` but renders as
|
|
13
|
+
* read-only and is only visible when a description exists.
|
|
14
|
+
*/
|
|
15
|
+
export declare const readOnlyDescriptionField: Field<Template>;
|
|
16
|
+
/**
|
|
17
|
+
* Description field for templates.
|
|
18
|
+
*/
|
|
19
|
+
export default descriptionField;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/description/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAKlD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAe5C,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAE,QAAQ,CAetC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAE,QAAQ,CAWrD,CAAC;AAEF;;GAEG;eACY,gBAAgB"}
|
|
@@ -13,11 +13,17 @@ 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
|
|
16
|
+
export { default as scheduledDateField } from './scheduled-date';
|
|
17
|
+
export { default as lastEditedDateField } from './last-edited';
|
|
17
18
|
export { default as authorField } from './author';
|
|
19
|
+
export { templateAuthorField, templatePartAuthorField, } from './template-author';
|
|
18
20
|
export { default as notesField } from './notes';
|
|
19
21
|
export { default as excerptField } from './excerpt';
|
|
22
|
+
export { default as descriptionField, readOnlyDescriptionField, } from './description';
|
|
20
23
|
export { default as formatField } from './format';
|
|
21
24
|
export { default as postContentInfoField } from './post-content-info';
|
|
22
25
|
export { default as stickyField } from './sticky';
|
|
26
|
+
export { default as postsPerPageField } from './posts-per-page';
|
|
27
|
+
export { default as siteDiscussionField } from './site-discussion';
|
|
28
|
+
export { default as postsPageTitleField } from './posts-page-title';
|
|
23
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.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AAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EACN,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EACN,OAAO,IAAI,gBAAgB,EAC3B,wBAAwB,GACxB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,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 lastEditedDateField: Field<BasePost>;
|
|
10
|
+
/**
|
|
11
|
+
* Last edited date field for BasePost.
|
|
12
|
+
*/
|
|
13
|
+
export default lastEditedDateField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/last-edited/index.tsx"],"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,mBAAmB,EAAE,KAAK,CAAE,QAAQ,CAWzC,CAAC;AAEF;;GAEG;eACY,mBAAmB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"last-edited-date-view.d.ts","sourceRoot":"","sources":["../../../src/fields/last-edited/last-edited-date-view.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,sCAavE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/fields/password/edit.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAIjE;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,iBAAS,YAAY,CAAE,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,EAAE,oBAAoB,CAAE,QAAQ,CAAE,+
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/fields/password/edit.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAIjE;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,iBAAS,YAAY,CAAE,EACtB,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,EAAE,oBAAoB,CAAE,QAAQ,CAAE,+BA0ClC;eACc,YAAY"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/fields/pattern-title/view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/fields/pattern-title/view.tsx"],"names":[],"mappings":"AASA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK9C,eAAO,MAAQ,aAAa,KAAiC,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,+BAiBvE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { PostsPage } from '../../types';
|
|
9
|
+
declare const postsPageTitleField: Field<PostsPage>;
|
|
10
|
+
/**
|
|
11
|
+
* Title field for the posts page (the `page` assigned as `page_for_posts`).
|
|
12
|
+
*/
|
|
13
|
+
export default postsPageTitleField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/posts-page-title/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAE,SAAS,CAkB1C,CAAC;AAEF;;GAEG;eACY,mBAAmB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { SiteSettings } from '../../types';
|
|
9
|
+
declare const postsPerPageField: Field<SiteSettings>;
|
|
10
|
+
/**
|
|
11
|
+
* Posts per page field for the `root/site` entity.
|
|
12
|
+
*/
|
|
13
|
+
export default postsPerPageField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/posts-per-page/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAE,YAAY,CAa3C,CAAC;AAEF;;GAEG;eACY,iBAAiB"}
|
|
@@ -5,7 +5,7 @@ import type { Field } from '@wordpress/dataviews';
|
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
|
-
import type { BasePost } from '
|
|
8
|
+
import type { BasePost } from '../../types';
|
|
9
9
|
declare const scheduledDateField: Field<BasePost>;
|
|
10
10
|
/**
|
|
11
11
|
* ScheduledDate Field.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/scheduled-date/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAE,QAAQ,CAcxC,CAAC;AAEF;;GAEG;eACY,kBAAkB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { SiteSettings } from '../../types';
|
|
9
|
+
declare const siteDiscussionField: Field<SiteSettings>;
|
|
10
|
+
/**
|
|
11
|
+
* Discussion field for the `root/site` entity.
|
|
12
|
+
*/
|
|
13
|
+
export default siteDiscussionField;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/site-discussion/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAGlD;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAE,YAAY,CA+B7C,CAAC;AAEF;;GAEG;eACY,mBAAmB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Field } from '@wordpress/dataviews';
|
|
5
|
+
import type { Template, TemplatePart } from '../../types';
|
|
6
|
+
/**
|
|
7
|
+
* Author field for templates.
|
|
8
|
+
*/
|
|
9
|
+
export declare const templateAuthorField: Field<Template>;
|
|
10
|
+
/**
|
|
11
|
+
* Author field for template parts.
|
|
12
|
+
*/
|
|
13
|
+
export declare const templatePartAuthorField: Field<TemplatePart>;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/template-author/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AASlD,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAuB1D;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAE,QAAQ,CAMhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAAK,CAAE,YAAY,CAUxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/fields/template-author/view.tsx"],"names":[],"mappings":"AAmBA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAe1D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,EAC3C,IAAI,EACJ,EAAE;IACF,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;CAC9B,+BAqDA"}
|
package/build-types/types.d.ts
CHANGED
|
@@ -89,7 +89,12 @@ interface EmbeddedFeaturedMedia {
|
|
|
89
89
|
export interface BasePostWithEmbeddedFeaturedMedia extends BasePost {
|
|
90
90
|
_embedded: EmbeddedFeaturedMedia;
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
interface TemplateAuthorFields {
|
|
93
|
+
author?: number;
|
|
94
|
+
author_text: string;
|
|
95
|
+
original_source?: 'theme' | 'plugin' | 'site' | 'user';
|
|
96
|
+
}
|
|
97
|
+
export interface Template extends CommonPost, TemplateAuthorFields {
|
|
93
98
|
type: 'wp_template';
|
|
94
99
|
is_custom: boolean;
|
|
95
100
|
source: string;
|
|
@@ -97,8 +102,9 @@ export interface Template extends CommonPost {
|
|
|
97
102
|
plugin?: string;
|
|
98
103
|
has_theme_file: boolean;
|
|
99
104
|
id: string;
|
|
105
|
+
description?: string;
|
|
100
106
|
}
|
|
101
|
-
export interface TemplatePart extends CommonPost {
|
|
107
|
+
export interface TemplatePart extends CommonPost, TemplateAuthorFields {
|
|
102
108
|
type: 'wp_template_part';
|
|
103
109
|
source: string;
|
|
104
110
|
origin: string;
|
|
@@ -114,6 +120,15 @@ export interface Pattern extends CommonPost {
|
|
|
114
120
|
};
|
|
115
121
|
wp_pattern_sync_status: string;
|
|
116
122
|
}
|
|
123
|
+
export interface SiteSettings {
|
|
124
|
+
posts_per_page?: number;
|
|
125
|
+
default_comment_status?: string | null;
|
|
126
|
+
}
|
|
127
|
+
export interface PostsPage {
|
|
128
|
+
title?: {
|
|
129
|
+
raw?: string;
|
|
130
|
+
} | string;
|
|
131
|
+
}
|
|
117
132
|
export type Post = Template | TemplatePart | Pattern | BasePost;
|
|
118
133
|
export type PostWithPermissions = Post & {
|
|
119
134
|
permissions: {
|
|
@@ -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,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC;CACf;AAED,UAAU,KAAK;IACd,qBAAqB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,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