@wordpress/fields 0.0.4 → 0.1.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 +20 -0
- package/build/actions/delete-post.js +130 -0
- package/build/actions/delete-post.js.map +1 -0
- package/build/actions/{pattern/duplicate-pattern.js → duplicate-pattern.js} +1 -1
- package/build/actions/duplicate-pattern.js.map +1 -0
- package/build/actions/{base-post/duplicate-post.js → duplicate-post.js} +2 -2
- package/build/actions/duplicate-post.js.map +1 -0
- package/build/actions/duplicate-post.native.js.map +1 -0
- package/build/actions/{pattern/export-pattern.js → export-pattern.js} +1 -1
- package/build/actions/export-pattern.js.map +1 -0
- package/build/actions/export-pattern.native.js.map +1 -0
- package/build/actions/index.js +105 -32
- package/build/actions/index.js.map +1 -1
- package/build/actions/{common/permanently-delete-post.js → permanently-delete-post.js} +1 -1
- package/build/actions/permanently-delete-post.js.map +1 -0
- package/build/actions/rename-post.js +124 -0
- package/build/actions/rename-post.js.map +1 -0
- package/build/actions/{base-post/reorder-page.js → reorder-page.js} +1 -1
- package/build/actions/reorder-page.js.map +1 -0
- package/build/actions/reorder-page.native.js.map +1 -0
- package/build/actions/reset-post.js +206 -0
- package/build/actions/reset-post.js.map +1 -0
- package/build/actions/restore-post.js +112 -0
- package/build/actions/restore-post.js.map +1 -0
- package/build/actions/trash-post.js +144 -0
- package/build/actions/trash-post.js.map +1 -0
- package/build/actions/view-post-revisions.js.map +1 -0
- package/build/actions/view-post.js.map +1 -0
- package/build/index.native.js +2 -2
- package/build/index.native.js.map +1 -1
- package/build/mutation/index.js +139 -0
- package/build/mutation/index.js.map +1 -0
- package/build/types.js.map +1 -1
- package/build-module/actions/delete-post.js +123 -0
- package/build-module/actions/delete-post.js.map +1 -0
- package/build-module/actions/{pattern/duplicate-pattern.js → duplicate-pattern.js} +1 -1
- package/build-module/actions/duplicate-pattern.js.map +1 -0
- package/build-module/actions/{base-post/duplicate-post.js → duplicate-post.js} +2 -2
- package/build-module/actions/duplicate-post.js.map +1 -0
- package/build-module/actions/duplicate-post.native.js.map +1 -0
- package/build-module/actions/{pattern/export-pattern.js → export-pattern.js} +1 -1
- package/build-module/actions/export-pattern.js.map +1 -0
- package/build-module/actions/export-pattern.native.js.map +1 -0
- package/build-module/actions/index.js +15 -3
- package/build-module/actions/index.js.map +1 -1
- package/build-module/actions/{common/permanently-delete-post.js → permanently-delete-post.js} +1 -1
- package/build-module/actions/permanently-delete-post.js.map +1 -0
- package/build-module/actions/rename-post.js +118 -0
- package/build-module/actions/rename-post.js.map +1 -0
- package/build-module/actions/{base-post/reorder-page.js → reorder-page.js} +1 -1
- package/build-module/actions/reorder-page.js.map +1 -0
- package/build-module/actions/reorder-page.native.js.map +1 -0
- package/build-module/actions/reset-post.js +198 -0
- package/build-module/actions/reset-post.js.map +1 -0
- package/build-module/actions/restore-post.js +104 -0
- package/build-module/actions/restore-post.js.map +1 -0
- package/build-module/actions/trash-post.js +137 -0
- package/build-module/actions/trash-post.js.map +1 -0
- package/build-module/actions/view-post-revisions.js.map +1 -0
- package/build-module/actions/view-post.js.map +1 -0
- package/build-module/index.native.js +2 -2
- package/build-module/index.native.js.map +1 -1
- package/build-module/mutation/index.js +131 -0
- package/build-module/mutation/index.js.map +1 -0
- package/build-module/types.js.map +1 -1
- package/build-types/actions/delete-post.d.ts +5 -0
- package/build-types/actions/delete-post.d.ts.map +1 -0
- package/build-types/actions/{pattern/duplicate-pattern.d.ts → duplicate-pattern.d.ts} +1 -1
- package/build-types/actions/duplicate-pattern.d.ts.map +1 -0
- package/build-types/actions/{base-post/duplicate-post.d.ts → duplicate-post.d.ts} +1 -1
- package/build-types/actions/duplicate-post.d.ts.map +1 -0
- package/build-types/actions/duplicate-post.native.d.ts.map +1 -0
- package/build-types/actions/{pattern/export-pattern.d.ts → export-pattern.d.ts} +1 -1
- package/build-types/actions/export-pattern.d.ts.map +1 -0
- package/build-types/actions/export-pattern.native.d.ts.map +1 -0
- package/build-types/actions/index.d.ts +15 -3
- package/build-types/actions/index.d.ts.map +1 -1
- package/build-types/actions/{common/permanently-delete-post.d.ts → permanently-delete-post.d.ts} +1 -1
- package/build-types/actions/permanently-delete-post.d.ts.map +1 -0
- package/build-types/actions/rename-post.d.ts +5 -0
- package/build-types/actions/rename-post.d.ts.map +1 -0
- package/build-types/actions/{base-post/reorder-page.d.ts → reorder-page.d.ts} +1 -1
- package/build-types/actions/reorder-page.d.ts.map +1 -0
- package/build-types/actions/reorder-page.native.d.ts.map +1 -0
- package/build-types/actions/reset-post.d.ts +5 -0
- package/build-types/actions/reset-post.d.ts.map +1 -0
- package/build-types/actions/restore-post.d.ts +5 -0
- package/build-types/actions/restore-post.d.ts.map +1 -0
- package/build-types/actions/trash-post.d.ts +5 -0
- package/build-types/actions/trash-post.d.ts.map +1 -0
- package/build-types/actions/{common/view-post-revisions.d.ts → view-post-revisions.d.ts} +1 -1
- package/build-types/actions/view-post-revisions.d.ts.map +1 -0
- package/build-types/actions/{base-post/view-post.d.ts → view-post.d.ts} +1 -1
- package/build-types/actions/view-post.d.ts.map +1 -0
- package/build-types/index.native.d.ts +2 -2
- package/build-types/index.native.d.ts.map +1 -1
- package/build-types/mutation/index.d.ts +34 -0
- package/build-types/mutation/index.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 +21 -20
- package/src/actions/delete-post.tsx +203 -0
- package/src/actions/{pattern/duplicate-pattern.tsx → duplicate-pattern.tsx} +2 -2
- package/src/actions/{base-post/duplicate-post.tsx → duplicate-post.tsx} +3 -3
- package/src/actions/{pattern/export-pattern.tsx → export-pattern.tsx} +2 -2
- package/src/actions/index.ts +15 -3
- package/src/actions/{common/permanently-delete-post.tsx → permanently-delete-post.tsx} +2 -2
- package/src/actions/rename-post.tsx +145 -0
- package/src/actions/{base-post/reorder-page.tsx → reorder-page.tsx} +2 -2
- package/src/actions/reset-post.tsx +300 -0
- package/src/actions/restore-post.tsx +134 -0
- package/src/actions/trash-post.tsx +198 -0
- package/src/actions/{common/view-post-revisions.tsx → view-post-revisions.tsx} +1 -1
- package/src/actions/{base-post/view-post.tsx → view-post.tsx} +1 -1
- package/src/index.native.ts +2 -2
- package/src/mutation/index.ts +184 -0
- package/src/types.ts +1 -0
- package/tsconfig.json +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/actions/base-post/duplicate-post.js.map +0 -1
- package/build/actions/base-post/duplicate-post.native.js.map +0 -1
- package/build/actions/base-post/index.js +0 -42
- package/build/actions/base-post/index.js.map +0 -1
- package/build/actions/base-post/reorder-page.js.map +0 -1
- package/build/actions/base-post/reorder-page.native.js.map +0 -1
- package/build/actions/base-post/view-post.js.map +0 -1
- package/build/actions/common/index.js +0 -21
- package/build/actions/common/index.js.map +0 -1
- package/build/actions/common/permanently-delete-post.js.map +0 -1
- package/build/actions/common/view-post-revisions.js.map +0 -1
- package/build/actions/pattern/duplicate-pattern.js.map +0 -1
- package/build/actions/pattern/export-pattern.js.map +0 -1
- package/build/actions/pattern/export-pattern.native.js.map +0 -1
- package/build/actions/pattern/index.js +0 -28
- package/build/actions/pattern/index.js.map +0 -1
- package/build/wordpress-editor.d.js +0 -2
- package/build/wordpress-editor.d.js.map +0 -1
- package/build-module/actions/base-post/duplicate-post.js.map +0 -1
- package/build-module/actions/base-post/duplicate-post.native.js.map +0 -1
- package/build-module/actions/base-post/index.js +0 -6
- package/build-module/actions/base-post/index.js.map +0 -1
- package/build-module/actions/base-post/reorder-page.js.map +0 -1
- package/build-module/actions/base-post/reorder-page.native.js.map +0 -1
- package/build-module/actions/base-post/view-post.js.map +0 -1
- package/build-module/actions/common/index.js +0 -3
- package/build-module/actions/common/index.js.map +0 -1
- package/build-module/actions/common/permanently-delete-post.js.map +0 -1
- package/build-module/actions/common/view-post-revisions.js.map +0 -1
- package/build-module/actions/pattern/duplicate-pattern.js.map +0 -1
- package/build-module/actions/pattern/export-pattern.js.map +0 -1
- package/build-module/actions/pattern/export-pattern.native.js.map +0 -1
- package/build-module/actions/pattern/index.js +0 -4
- package/build-module/actions/pattern/index.js.map +0 -1
- package/build-module/wordpress-editor.d.js +0 -2
- package/build-module/wordpress-editor.d.js.map +0 -1
- package/build-types/actions/base-post/duplicate-post.d.ts.map +0 -1
- package/build-types/actions/base-post/duplicate-post.native.d.ts.map +0 -1
- package/build-types/actions/base-post/index.d.ts +0 -6
- package/build-types/actions/base-post/index.d.ts.map +0 -1
- package/build-types/actions/base-post/reorder-page.d.ts.map +0 -1
- package/build-types/actions/base-post/reorder-page.native.d.ts.map +0 -1
- package/build-types/actions/base-post/view-post.d.ts.map +0 -1
- package/build-types/actions/common/index.d.ts +0 -3
- package/build-types/actions/common/index.d.ts.map +0 -1
- package/build-types/actions/common/permanently-delete-post.d.ts.map +0 -1
- package/build-types/actions/common/view-post-revisions.d.ts.map +0 -1
- package/build-types/actions/pattern/duplicate-pattern.d.ts.map +0 -1
- package/build-types/actions/pattern/export-pattern.d.ts.map +0 -1
- package/build-types/actions/pattern/export-pattern.native.d.ts.map +0 -1
- package/build-types/actions/pattern/index.d.ts +0 -4
- package/build-types/actions/pattern/index.d.ts.map +0 -1
- package/src/actions/base-post/index.ts +0 -5
- package/src/actions/common/index.ts +0 -2
- package/src/actions/pattern/index.ts +0 -3
- package/src/wordpress-editor.d.ts +0 -1
- /package/build/actions/{base-post/duplicate-post.native.js → duplicate-post.native.js} +0 -0
- /package/build/actions/{pattern/export-pattern.native.js → export-pattern.native.js} +0 -0
- /package/build/actions/{base-post/reorder-page.native.js → reorder-page.native.js} +0 -0
- /package/build/actions/{common/view-post-revisions.js → view-post-revisions.js} +0 -0
- /package/build/actions/{base-post/view-post.js → view-post.js} +0 -0
- /package/build-module/actions/{base-post/duplicate-post.native.js → duplicate-post.native.js} +0 -0
- /package/build-module/actions/{pattern/export-pattern.native.js → export-pattern.native.js} +0 -0
- /package/build-module/actions/{base-post/reorder-page.native.js → reorder-page.native.js} +0 -0
- /package/build-module/actions/{common/view-post-revisions.js → view-post-revisions.js} +0 -0
- /package/build-module/actions/{base-post/view-post.js → view-post.js} +0 -0
- /package/build-types/actions/{base-post/duplicate-post.native.d.ts → duplicate-post.native.d.ts} +0 -0
- /package/build-types/actions/{pattern/export-pattern.native.d.ts → export-pattern.native.d.ts} +0 -0
- /package/build-types/actions/{base-post/reorder-page.native.d.ts → reorder-page.native.d.ts} +0 -0
- /package/src/actions/{base-post/duplicate-post.native.tsx → duplicate-post.native.tsx} +0 -0
- /package/src/actions/{pattern/export-pattern.native.tsx → export-pattern.native.tsx} +0 -0
- /package/src/actions/{base-post/reorder-page.native.tsx → reorder-page.native.tsx} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { store as noticesStore } from '@wordpress/notices';
|
|
5
|
+
import { store as coreStore } from '@wordpress/core-data';
|
|
6
|
+
import { dispatch } from '@wordpress/data';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Internal dependencies
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const getErrorMessagesFromPromises = allSettledResults => {
|
|
13
|
+
const errorMessages = new Set();
|
|
14
|
+
// If there was at lease one failure.
|
|
15
|
+
if (allSettledResults.length === 1) {
|
|
16
|
+
const typedError = allSettledResults[0];
|
|
17
|
+
if (typedError.reason?.message) {
|
|
18
|
+
errorMessages.add(typedError.reason.message);
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
const failedPromises = allSettledResults.filter(({
|
|
22
|
+
status
|
|
23
|
+
}) => status === 'rejected');
|
|
24
|
+
for (const failedPromise of failedPromises) {
|
|
25
|
+
const typedError = failedPromise;
|
|
26
|
+
if (typedError.reason?.message) {
|
|
27
|
+
errorMessages.add(typedError.reason.message);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return errorMessages;
|
|
32
|
+
};
|
|
33
|
+
export const deletePostWithNotices = async (posts, notice, callbacks) => {
|
|
34
|
+
const {
|
|
35
|
+
createSuccessNotice,
|
|
36
|
+
createErrorNotice
|
|
37
|
+
} = dispatch(noticesStore);
|
|
38
|
+
const {
|
|
39
|
+
deleteEntityRecord
|
|
40
|
+
} = dispatch(coreStore);
|
|
41
|
+
const allSettledResults = await Promise.allSettled(posts.map(post => {
|
|
42
|
+
return deleteEntityRecord('postType', post.type, post.id, {
|
|
43
|
+
force: true
|
|
44
|
+
}, {
|
|
45
|
+
throwOnError: true
|
|
46
|
+
});
|
|
47
|
+
}));
|
|
48
|
+
// If all the promises were fulfilled with success.
|
|
49
|
+
if (allSettledResults.every(({
|
|
50
|
+
status
|
|
51
|
+
}) => status === 'fulfilled')) {
|
|
52
|
+
var _notice$success$type;
|
|
53
|
+
let successMessage;
|
|
54
|
+
if (allSettledResults.length === 1) {
|
|
55
|
+
successMessage = notice.success.messages.getMessage(posts[0]);
|
|
56
|
+
} else {
|
|
57
|
+
successMessage = notice.success.messages.getBatchMessage(posts);
|
|
58
|
+
}
|
|
59
|
+
createSuccessNotice(successMessage, {
|
|
60
|
+
type: (_notice$success$type = notice.success.type) !== null && _notice$success$type !== void 0 ? _notice$success$type : 'snackbar',
|
|
61
|
+
id: notice.success.id
|
|
62
|
+
});
|
|
63
|
+
callbacks.onActionPerformed?.(posts);
|
|
64
|
+
} else {
|
|
65
|
+
var _notice$error$type;
|
|
66
|
+
const errorMessages = getErrorMessagesFromPromises(allSettledResults);
|
|
67
|
+
let errorMessage = '';
|
|
68
|
+
if (allSettledResults.length === 1) {
|
|
69
|
+
errorMessage = notice.error.messages.getMessage(errorMessages);
|
|
70
|
+
} else {
|
|
71
|
+
errorMessage = notice.error.messages.getBatchMessage(errorMessages);
|
|
72
|
+
}
|
|
73
|
+
createErrorNotice(errorMessage, {
|
|
74
|
+
type: (_notice$error$type = notice.error.type) !== null && _notice$error$type !== void 0 ? _notice$error$type : 'snackbar',
|
|
75
|
+
id: notice.error.id
|
|
76
|
+
});
|
|
77
|
+
callbacks.onActionError?.();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
export const editPostWithNotices = async (postsWithUpdates, notice, callbacks) => {
|
|
81
|
+
const {
|
|
82
|
+
createSuccessNotice,
|
|
83
|
+
createErrorNotice
|
|
84
|
+
} = dispatch(noticesStore);
|
|
85
|
+
const {
|
|
86
|
+
editEntityRecord,
|
|
87
|
+
saveEditedEntityRecord
|
|
88
|
+
} = dispatch(coreStore);
|
|
89
|
+
await Promise.allSettled(postsWithUpdates.map(post => {
|
|
90
|
+
return editEntityRecord('postType', post.originalPost.type, post.originalPost.id, {
|
|
91
|
+
...post.changes
|
|
92
|
+
});
|
|
93
|
+
}));
|
|
94
|
+
const allSettledResults = await Promise.allSettled(postsWithUpdates.map(post => {
|
|
95
|
+
return saveEditedEntityRecord('postType', post.originalPost.type, post.originalPost.id, {
|
|
96
|
+
throwOnError: true
|
|
97
|
+
});
|
|
98
|
+
}));
|
|
99
|
+
// If all the promises were fulfilled with success.
|
|
100
|
+
if (allSettledResults.every(({
|
|
101
|
+
status
|
|
102
|
+
}) => status === 'fulfilled')) {
|
|
103
|
+
var _notice$success$type2;
|
|
104
|
+
let successMessage;
|
|
105
|
+
if (allSettledResults.length === 1) {
|
|
106
|
+
successMessage = notice.success.messages.getMessage(postsWithUpdates[0].originalPost);
|
|
107
|
+
} else {
|
|
108
|
+
successMessage = notice.success.messages.getBatchMessage(postsWithUpdates.map(post => post.originalPost));
|
|
109
|
+
}
|
|
110
|
+
createSuccessNotice(successMessage, {
|
|
111
|
+
type: (_notice$success$type2 = notice.success.type) !== null && _notice$success$type2 !== void 0 ? _notice$success$type2 : 'snackbar',
|
|
112
|
+
id: notice.success.id
|
|
113
|
+
});
|
|
114
|
+
callbacks.onActionPerformed?.(postsWithUpdates.map(post => post.originalPost));
|
|
115
|
+
} else {
|
|
116
|
+
var _notice$error$type2;
|
|
117
|
+
const errorMessages = getErrorMessagesFromPromises(allSettledResults);
|
|
118
|
+
let errorMessage = '';
|
|
119
|
+
if (allSettledResults.length === 1) {
|
|
120
|
+
errorMessage = notice.error.messages.getMessage(errorMessages);
|
|
121
|
+
} else {
|
|
122
|
+
errorMessage = notice.error.messages.getBatchMessage(errorMessages);
|
|
123
|
+
}
|
|
124
|
+
createErrorNotice(errorMessage, {
|
|
125
|
+
type: (_notice$error$type2 = notice.error.type) !== null && _notice$error$type2 !== void 0 ? _notice$error$type2 : 'snackbar',
|
|
126
|
+
id: notice.error.id
|
|
127
|
+
});
|
|
128
|
+
callbacks.onActionError?.();
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["store","noticesStore","coreStore","dispatch","getErrorMessagesFromPromises","allSettledResults","errorMessages","Set","length","typedError","reason","message","add","failedPromises","filter","status","failedPromise","deletePostWithNotices","posts","notice","callbacks","createSuccessNotice","createErrorNotice","deleteEntityRecord","Promise","allSettled","map","post","type","id","force","throwOnError","every","_notice$success$type","successMessage","success","messages","getMessage","getBatchMessage","onActionPerformed","_notice$error$type","errorMessage","error","onActionError","editPostWithNotices","postsWithUpdates","editEntityRecord","saveEditedEntityRecord","originalPost","changes","_notice$success$type2","_notice$error$type2"],"sources":["@wordpress/fields/src/mutation/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, Post } from '../types';\n\nconst getErrorMessagesFromPromises = < T >(\n\tallSettledResults: PromiseSettledResult< T >[]\n) => {\n\tconst errorMessages = new Set< string >();\n\t// If there was at lease one failure.\n\tif ( allSettledResults.length === 1 ) {\n\t\tconst typedError = allSettledResults[ 0 ] as {\n\t\t\treason?: CoreDataError;\n\t\t};\n\t\tif ( typedError.reason?.message ) {\n\t\t\terrorMessages.add( typedError.reason.message );\n\t\t}\n\t} else {\n\t\tconst failedPromises = allSettledResults.filter(\n\t\t\t( { status } ) => status === 'rejected'\n\t\t);\n\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\tconst typedError = failedPromise as {\n\t\t\t\treason?: CoreDataError;\n\t\t\t};\n\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\terrorMessages.add( typedError.reason.message );\n\t\t\t}\n\t\t}\n\t}\n\treturn errorMessages;\n};\n\nexport type NoticeSettings< T extends Post > = {\n\tsuccess: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( posts: T ) => string;\n\t\t\tgetBatchMessage: ( posts: T[] ) => string;\n\t\t};\n\t};\n\terror: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( errors: Set< string > ) => string;\n\t\t\tgetBatchMessage: ( errors: Set< string > ) => string;\n\t\t};\n\t};\n};\n\nexport const deletePostWithNotices = async < T extends Post >(\n\tposts: T[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { deleteEntityRecord } = dispatch( coreStore );\n\tconst allSettledResults = await Promise.allSettled(\n\t\tposts.map( ( post ) => {\n\t\t\treturn deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.type,\n\t\t\t\tpost.id,\n\t\t\t\t{ force: true },\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage( posts[ 0 ] );\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage( posts );\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.( posts );\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n\nexport const editPostWithNotices = async < T extends Post >(\n\tpostsWithUpdates: {\n\t\toriginalPost: T;\n\t\tchanges: Partial< T >;\n\t}[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { editEntityRecord, saveEditedEntityRecord } = dispatch( coreStore );\n\tawait Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\t...post.changes,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\tconst allSettledResults = await Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn saveEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage(\n\t\t\t\tpostsWithUpdates[ 0 ].originalPost\n\t\t\t);\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage(\n\t\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t\t);\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.(\n\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t);\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,YAAY,QAAQ,oBAAoB;AAC1D,SAASD,KAAK,IAAIE,SAAS,QAAQ,sBAAsB;AACzD,SAASC,QAAQ,QAAQ,iBAAiB;;AAE1C;AACA;AACA;;AAGA,MAAMC,4BAA4B,GACjCC,iBAA8C,IAC1C;EACJ,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAW,CAAC;EACzC;EACA,IAAKF,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAG;IACrC,MAAMC,UAAU,GAAGJ,iBAAiB,CAAE,CAAC,CAEtC;IACD,IAAKI,UAAU,CAACC,MAAM,EAAEC,OAAO,EAAG;MACjCL,aAAa,CAACM,GAAG,CAAEH,UAAU,CAACC,MAAM,CAACC,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CAACgB,OAAO,CAACN;IACpB,CAAE,CAAC;IACHT,SAAS,CAACmB,iBAAiB,GAC1BM,gBAAgB,CAACnB,GAAG,CAAIC,IAAI,IAAMA,IAAI,CAACqB,YAAa,CACrD,CAAC;EACF,CAAC,MAAM;IAAA,IAAAG,mBAAA;IACN,MAAM7C,aAAa,GAAGF,4BAA4B,CAAEC,iBAAkB,CAAC;IACvE,IAAIoC,YAAY,GAAG,EAAE;IACrB,IAAKpC,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAG;MACrCiC,YAAY,GAAGtB,MAAM,CAACuB,KAAK,CAACN,QAAQ,CAACC,UAAU,CAAE/B,aAAc,CAAC;IACjE,CAAC,MAAM;MACNmC,YAAY,GACXtB,MAAM,CAACuB,KAAK,CAACN,QAAQ,CAACE,eAAe,CAAEhC,aAAc,CAAC;IACxD;IAEAgB,iBAAiB,CAAEmB,YAAY,EAAE;MAChCb,IAAI,GAAAuB,mBAAA,GAAEhC,MAAM,CAACuB,KAAK,CAACd,IAAI,cAAAuB,mBAAA,cAAAA,mBAAA,GAAI,UAAU;MACrCtB,EAAE,EAAEV,MAAM,CAACuB,KAAK,CAACb;IAClB,CAAE,CAAC;IACHT,SAAS,CAACuB,aAAa,GAAG,CAAC;EAC5B;AACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/fields/src/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface CommonPost {\n\tstatus?: PostStatus;\n\ttitle: string | { rendered: string } | { raw: string };\n\tcontent: string | { raw: string; rendered: string };\n\ttype: string;\n\tid: string | number;\n\tblocks?: Object[];\n\t_links?: Links;\n}\n\ninterface Links {\n\t'predecessor-version'?: { href: string; id: number }[];\n\t'version-history'?: { href: string; count: number }[];\n\t[ key: string ]: { href: string }[] | undefined;\n}\n\nexport interface BasePost extends CommonPost {\n\tcomment_status?: 'open' | 'closed';\n\texcerpt?: string | { raw: string; rendered: string };\n\tmeta?: Record< string, any >;\n\tparent?: number;\n\tpassword?: string;\n\ttemplate?: string;\n\tformat?: string;\n\tfeatured_media?: number;\n\tmenu_order?: number;\n\tping_status?: 'open' | 'closed';\n\tlink?: string;\n}\n\nexport interface Template extends CommonPost {\n\ttype: 'wp_template';\n\tis_custom: boolean;\n\tsource: string;\n\torigin: string;\n\tplugin?: string;\n\thas_theme_file: boolean;\n\tid: string;\n}\n\nexport interface TemplatePart extends CommonPost {\n\ttype: 'wp_template_part';\n\tsource: string;\n\torigin: string;\n\thas_theme_file: boolean;\n\tid: string;\n\tarea: string;\n}\n\nexport interface Pattern extends CommonPost {\n\tslug: string;\n\ttitle: { raw: string };\n\twp_pattern_sync_status: string;\n}\n\nexport type Post = Template | TemplatePart | Pattern | BasePost;\n\nexport type PostWithPermissions = Post & {\n\tpermissions: {\n\t\tdelete: boolean;\n\t\tupdate: boolean;\n\t};\n};\n\nexport interface PostType {\n\tslug: string;\n\tviewable: boolean;\n\tsupports?: {\n\t\t'page-attributes'?: boolean;\n\t\ttitle?: boolean;\n\t\trevisions?: boolean;\n\t};\n}\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/fields/src/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'published'\n\t| 'draft'\n\t| 'pending'\n\t| 'private'\n\t| 'future'\n\t| 'auto-draft'\n\t| 'trash';\n\nexport interface CommonPost {\n\tstatus?: PostStatus;\n\ttitle: string | { rendered: string } | { raw: string };\n\tcontent: string | { raw: string; rendered: string };\n\ttype: string;\n\tid: string | number;\n\tblocks?: Object[];\n\t_links?: Links;\n}\n\ninterface Links {\n\t'predecessor-version'?: { href: string; id: number }[];\n\t'version-history'?: { href: string; count: number }[];\n\t[ key: string ]: { href: string }[] | undefined;\n}\n\nexport interface BasePost extends CommonPost {\n\tcomment_status?: 'open' | 'closed';\n\texcerpt?: string | { raw: string; rendered: string };\n\tmeta?: Record< string, any >;\n\tparent?: number;\n\tpassword?: string;\n\ttemplate?: string;\n\tformat?: string;\n\tfeatured_media?: number;\n\tmenu_order?: number;\n\tping_status?: 'open' | 'closed';\n\tlink?: string;\n}\n\nexport interface Template extends CommonPost {\n\ttype: 'wp_template';\n\tis_custom: boolean;\n\tsource: string;\n\torigin: string;\n\tplugin?: string;\n\thas_theme_file: boolean;\n\tid: string;\n}\n\nexport interface TemplatePart extends CommonPost {\n\ttype: 'wp_template_part';\n\tsource: string;\n\torigin: string;\n\thas_theme_file: boolean;\n\tid: string;\n\tarea: string;\n\tplugin?: string;\n}\n\nexport interface Pattern extends CommonPost {\n\tslug: string;\n\ttitle: { raw: string };\n\twp_pattern_sync_status: string;\n}\n\nexport type Post = Template | TemplatePart | Pattern | BasePost;\n\nexport type PostWithPermissions = Post & {\n\tpermissions: {\n\t\tdelete: boolean;\n\t\tupdate: boolean;\n\t};\n};\n\nexport interface PostType {\n\tslug: string;\n\tviewable: boolean;\n\tsupports?: {\n\t\t'page-attributes'?: boolean;\n\t\ttitle?: boolean;\n\t\trevisions?: boolean;\n\t};\n}\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Action } from '@wordpress/dataviews';
|
|
2
|
+
import type { Pattern, Template, TemplatePart } from '../types';
|
|
3
|
+
declare const deletePostAction: Action<Template | TemplatePart | Pattern>;
|
|
4
|
+
export default deletePostAction;
|
|
5
|
+
//# sourceMappingURL=delete-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/delete-post.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAWnD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAUhE,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAqKhE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from '@wordpress/dataviews';
|
|
2
|
-
import type { Pattern } from '
|
|
2
|
+
import type { Pattern } from '../types';
|
|
3
3
|
declare const duplicatePattern: Action<Pattern>;
|
|
4
4
|
export default duplicatePattern;
|
|
5
5
|
//# sourceMappingURL=duplicate-pattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-pattern.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMxC,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,OAAO,CAmBtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from '@wordpress/dataviews';
|
|
2
|
-
import type { BasePost } from '
|
|
2
|
+
import type { BasePost } from '../types';
|
|
3
3
|
declare const duplicatePost: Action<BasePost>;
|
|
4
4
|
export default duplicatePost;
|
|
5
5
|
//# sourceMappingURL=duplicate-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-post.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAQxD,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,QAAQ,CA8IpC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duplicate-post.native.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-post.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,WAAY,CAAC;AAEhC,eAAe,aAAa,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { Action } from '@wordpress/dataviews';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
|
-
import type { Pattern } from '
|
|
5
|
+
import type { Pattern } from '../types';
|
|
6
6
|
declare const exportPattern: Action<Pattern>;
|
|
7
7
|
export default exportPattern;
|
|
8
8
|
//# sourceMappingURL=export-pattern.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/export-pattern.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAmBxC,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,OAAO,CAqCnC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-pattern.native.d.ts","sourceRoot":"","sources":["../../src/actions/export-pattern.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa,WAAY,CAAC;AAEhC,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export { default as viewPost } from './view-post';
|
|
2
|
+
export { default as reorderPage } from './reorder-page';
|
|
3
|
+
export { default as reorderPageNative } from './reorder-page.native';
|
|
4
|
+
export { default as duplicatePost } from './duplicate-post';
|
|
5
|
+
export { default as duplicatePostNative } from './duplicate-post.native';
|
|
6
|
+
export { default as renamePost } from './rename-post';
|
|
7
|
+
export { default as resetPost } from './reset-post';
|
|
8
|
+
export { default as duplicatePattern } from './duplicate-pattern';
|
|
9
|
+
export { default as exportPattern } from './export-pattern';
|
|
10
|
+
export { default as exportPatternNative } from './export-pattern.native';
|
|
11
|
+
export { default as viewPostRevisions } from './view-post-revisions';
|
|
12
|
+
export { default as permanentlyDeletePost } from './permanently-delete-post';
|
|
13
|
+
export { default as restorePost } from './restore-post';
|
|
14
|
+
export { default as trashPost } from './trash-post';
|
|
15
|
+
export { default as deletePost } from './delete-post';
|
|
4
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
package/build-types/actions/{common/permanently-delete-post.d.ts → permanently-delete-post.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from '@wordpress/dataviews';
|
|
2
|
-
import type { PostWithPermissions } from '
|
|
2
|
+
import type { PostWithPermissions } from '../types';
|
|
3
3
|
declare const permanentlyDeletePost: Action<PostWithPermissions>;
|
|
4
4
|
export default permanentlyDeletePost;
|
|
5
5
|
//# sourceMappingURL=permanently-delete-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permanently-delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/permanently-delete-post.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,mBAAmB,CAoGvD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +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;AAiBnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAyG5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { Action } from '@wordpress/dataviews';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
|
-
import type { BasePost } from '
|
|
5
|
+
import type { BasePost } from '../types';
|
|
6
6
|
declare const reorderPage: Action<BasePost>;
|
|
7
7
|
export default reorderPage;
|
|
8
8
|
//# sourceMappingURL=reorder-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-page.d.ts","sourceRoot":"","sources":["../../src/actions/reorder-page.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgGxD,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,QAAQ,CAOlC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reorder-page.native.d.ts","sourceRoot":"","sources":["../../src/actions/reorder-page.native.tsx"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW,WAAY,CAAC;AAE9B,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset-post.d.ts","sourceRoot":"","sources":["../../src/actions/reset-post.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAanD,OAAO,KAAK,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAwJtE,QAAA,MAAM,eAAe,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,CAmHrD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restore-post.d.ts","sourceRoot":"","sources":["../../src/actions/restore-post.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,mBAAmB,CAoH7C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trash-post.d.ts","sourceRoot":"","sources":["../../src/actions/trash-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,mBAAmB,CA4K3C,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { Action } from '@wordpress/dataviews';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
|
-
import type { Post } from '
|
|
5
|
+
import type { Post } from '../types';
|
|
6
6
|
declare const viewPostRevisions: Action<Post>;
|
|
7
7
|
export default viewPostRevisions;
|
|
8
8
|
//# sourceMappingURL=view-post-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-post-revisions.d.ts","sourceRoot":"","sources":["../../src/actions/view-post-revisions.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,QAAA,MAAM,iBAAiB,EAAE,MAAM,CAAE,IAAI,CAgCpC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { Action } from '@wordpress/dataviews';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
|
-
import type { BasePost } from '
|
|
5
|
+
import type { BasePost } from '../types';
|
|
6
6
|
declare const viewPost: Action<BasePost>;
|
|
7
7
|
export default viewPost;
|
|
8
8
|
//# sourceMappingURL=view-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-post.d.ts","sourceRoot":"","sources":["../../src/actions/view-post.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,QAAA,MAAM,QAAQ,EAAE,MAAM,CAAE,QAAQ,CAe/B,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './actions/
|
|
2
|
-
export * from './actions/
|
|
1
|
+
export * from './actions/duplicate-post.native';
|
|
2
|
+
export * from './actions/reorder-page.native';
|
|
3
3
|
//# sourceMappingURL=index.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.native.d.ts","sourceRoot":"","sources":["../src/index.native.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Post } from '../types';
|
|
5
|
+
export type NoticeSettings<T extends Post> = {
|
|
6
|
+
success: {
|
|
7
|
+
id?: string;
|
|
8
|
+
type?: string;
|
|
9
|
+
messages: {
|
|
10
|
+
getMessage: (posts: T) => string;
|
|
11
|
+
getBatchMessage: (posts: T[]) => string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
error: {
|
|
15
|
+
id?: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
messages: {
|
|
18
|
+
getMessage: (errors: Set<string>) => string;
|
|
19
|
+
getBatchMessage: (errors: Set<string>) => string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const deletePostWithNotices: <T extends Post>(posts: T[], notice: NoticeSettings<T>, callbacks: {
|
|
24
|
+
onActionPerformed?: (posts: T[]) => void;
|
|
25
|
+
onActionError?: () => void;
|
|
26
|
+
}) => Promise<void>;
|
|
27
|
+
export declare const editPostWithNotices: <T extends Post>(postsWithUpdates: {
|
|
28
|
+
originalPost: T;
|
|
29
|
+
changes: Partial<T>;
|
|
30
|
+
}[], notice: NoticeSettings<T>, callbacks: {
|
|
31
|
+
onActionPerformed?: (posts: T[]) => void;
|
|
32
|
+
onActionError?: () => void;
|
|
33
|
+
}) => Promise<void>;
|
|
34
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mutation/index.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,OAAO,KAAK,EAAiB,IAAI,EAAE,MAAM,UAAU,CAAC;AA8BpD,MAAM,MAAM,cAAc,CAAE,CAAC,SAAS,IAAI,IAAK;IAC9C,OAAO,EAAE;QACR,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE;YACT,UAAU,EAAE,CAAE,KAAK,EAAE,CAAC,KAAM,MAAM,CAAC;YACnC,eAAe,EAAE,CAAE,KAAK,EAAE,CAAC,EAAE,KAAM,MAAM,CAAC;SAC1C,CAAC;KACF,CAAC;IACF,KAAK,EAAE;QACN,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE;YACT,UAAU,EA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BAAsB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,IAAI,GAAG;IACxC,WAAW,EAAE;QACZ,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,OAAO,CAAC;KAChB,CAAC;CACF,CAAC;AAEF,MAAM,WAAW,QAAQ;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE;QACV,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,SAAS,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CACF;AAGD,MAAM,MAAM,aAAa,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/fields",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
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",
|
|
@@ -32,24 +32,25 @@
|
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.16.0",
|
|
35
|
-
"@wordpress/
|
|
36
|
-
"@wordpress/
|
|
37
|
-
"@wordpress/
|
|
38
|
-
"@wordpress/
|
|
39
|
-
"@wordpress/
|
|
40
|
-
"@wordpress/data": "^
|
|
41
|
-
"@wordpress/
|
|
42
|
-
"@wordpress/
|
|
43
|
-
"@wordpress/
|
|
44
|
-
"@wordpress/
|
|
45
|
-
"@wordpress/
|
|
46
|
-
"@wordpress/
|
|
47
|
-
"@wordpress/
|
|
48
|
-
"@wordpress/
|
|
49
|
-
"@wordpress/
|
|
50
|
-
"@wordpress/
|
|
51
|
-
"@wordpress/
|
|
52
|
-
"@wordpress/
|
|
35
|
+
"@wordpress/api-fetch": "^7.9.0",
|
|
36
|
+
"@wordpress/blob": "^4.9.0",
|
|
37
|
+
"@wordpress/blocks": "^13.9.0",
|
|
38
|
+
"@wordpress/components": "^28.9.0",
|
|
39
|
+
"@wordpress/compose": "^7.9.0",
|
|
40
|
+
"@wordpress/core-data": "^7.9.0",
|
|
41
|
+
"@wordpress/data": "^10.9.0",
|
|
42
|
+
"@wordpress/dataviews": "^4.5.0",
|
|
43
|
+
"@wordpress/element": "^6.9.0",
|
|
44
|
+
"@wordpress/hooks": "^4.9.0",
|
|
45
|
+
"@wordpress/html-entities": "^4.9.0",
|
|
46
|
+
"@wordpress/i18n": "^5.9.0",
|
|
47
|
+
"@wordpress/icons": "^10.9.0",
|
|
48
|
+
"@wordpress/notices": "^5.9.0",
|
|
49
|
+
"@wordpress/patterns": "^2.9.0",
|
|
50
|
+
"@wordpress/primitives": "^4.9.0",
|
|
51
|
+
"@wordpress/private-apis": "^1.9.0",
|
|
52
|
+
"@wordpress/url": "^4.9.0",
|
|
53
|
+
"@wordpress/warning": "^3.9.0",
|
|
53
54
|
"change-case": "4.1.2",
|
|
54
55
|
"client-zip": "^2.4.5"
|
|
55
56
|
},
|
|
@@ -59,5 +60,5 @@
|
|
|
59
60
|
"publishConfig": {
|
|
60
61
|
"access": "public"
|
|
61
62
|
},
|
|
62
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
|
|
63
64
|
}
|