@wordpress/fields 0.24.0 → 0.24.1-next.ff1cebbba.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 +1 -1
- package/build/actions/delete-post.js +168 -117
- package/build/actions/delete-post.js.map +7 -1
- package/build/actions/duplicate-pattern.js +42 -43
- package/build/actions/duplicate-pattern.js.map +7 -1
- package/build/actions/duplicate-post.js +104 -93
- package/build/actions/duplicate-post.js.map +7 -1
- package/build/actions/duplicate-template-part.js +71 -63
- package/build/actions/duplicate-template-part.js.map +7 -1
- package/build/actions/export-pattern.js +60 -45
- package/build/actions/export-pattern.js.map +7 -1
- package/build/actions/index.js +71 -94
- package/build/actions/index.js.map +7 -1
- package/build/actions/permanently-delete-post.js +161 -132
- package/build/actions/permanently-delete-post.js.map +7 -1
- package/build/actions/rename-post.js +77 -83
- package/build/actions/rename-post.js.map +7 -1
- package/build/actions/reorder-page.js +76 -73
- package/build/actions/reorder-page.js.map +7 -1
- package/build/actions/reset-post.js +214 -165
- package/build/actions/reset-post.js.map +7 -1
- package/build/actions/restore-post.js +91 -75
- package/build/actions/restore-post.js.map +7 -1
- package/build/actions/trash-post.js +167 -127
- package/build/actions/trash-post.js.map +7 -1
- package/build/actions/utils.js +48 -41
- package/build/actions/utils.js.map +7 -1
- package/build/actions/view-post-revisions.js +39 -35
- package/build/actions/view-post-revisions.js.map +7 -1
- package/build/actions/view-post.js +31 -28
- package/build/actions/view-post.js.map +7 -1
- package/build/components/create-template-part-modal/index.js +213 -169
- package/build/components/create-template-part-modal/index.js.map +7 -1
- package/build/components/create-template-part-modal/utils.js +48 -48
- package/build/components/create-template-part-modal/utils.js.map +7 -1
- package/build/fields/author/author-view.js +63 -69
- package/build/fields/author/author-view.js.map +7 -1
- package/build/fields/author/index.js +43 -29
- package/build/fields/author/index.js.map +7 -1
- package/build/fields/comment-status/index.js +42 -32
- package/build/fields/comment-status/index.js.map +7 -1
- package/build/fields/date/date-view.js +84 -58
- package/build/fields/date/date-view.js.map +7 -1
- package/build/fields/date/index.js +39 -25
- package/build/fields/date/index.js.map +7 -1
- package/build/fields/discussion/index.js +36 -32
- package/build/fields/discussion/index.js.map +7 -1
- package/build/fields/featured-image/featured-image-edit.js +115 -97
- package/build/fields/featured-image/featured-image-edit.js.map +7 -1
- package/build/fields/featured-image/featured-image-view.js +41 -34
- package/build/fields/featured-image/featured-image-view.js.map +7 -1
- package/build/fields/featured-image/index.js +31 -26
- package/build/fields/featured-image/index.js.map +7 -1
- package/build/fields/index.js +83 -118
- package/build/fields/index.js.map +7 -1
- package/build/fields/order/index.js +28 -23
- package/build/fields/order/index.js.map +7 -1
- package/build/fields/page-title/index.js +42 -30
- package/build/fields/page-title/index.js.map +7 -1
- package/build/fields/page-title/view.js +38 -41
- package/build/fields/page-title/view.js.map +7 -1
- package/build/fields/parent/index.js +31 -26
- package/build/fields/parent/index.js.map +7 -1
- package/build/fields/parent/parent-edit.js +200 -168
- package/build/fields/parent/parent-edit.js.map +7 -1
- package/build/fields/parent/parent-view.js +40 -31
- package/build/fields/parent/parent-view.js.map +7 -1
- package/build/fields/parent/utils.js +29 -16
- package/build/fields/parent/utils.js.map +7 -1
- package/build/fields/password/edit.js +67 -53
- package/build/fields/password/edit.js.map +7 -1
- package/build/fields/password/index.js +40 -26
- package/build/fields/password/index.js.map +7 -1
- package/build/fields/pattern-title/index.js +42 -30
- package/build/fields/pattern-title/index.js.map +7 -1
- package/build/fields/pattern-title/view.js +43 -41
- package/build/fields/pattern-title/view.js.map +7 -1
- package/build/fields/ping-status/index.js +66 -47
- package/build/fields/ping-status/index.js.map +7 -1
- package/build/fields/slug/index.js +41 -27
- package/build/fields/slug/index.js.map +7 -1
- package/build/fields/slug/slug-edit.js +116 -107
- package/build/fields/slug/slug-edit.js.map +7 -1
- package/build/fields/slug/slug-view.js +30 -23
- package/build/fields/slug/slug-view.js.map +7 -1
- package/build/fields/slug/utils.js +32 -20
- package/build/fields/slug/utils.js.map +7 -1
- package/build/fields/status/index.js +43 -29
- package/build/fields/status/index.js.map +7 -1
- package/build/fields/status/status-elements.js +58 -44
- package/build/fields/status/status-elements.js.map +7 -1
- package/build/fields/status/status-view.js +42 -36
- package/build/fields/status/status-view.js.map +7 -1
- package/build/fields/template/index.js +29 -24
- package/build/fields/template/index.js.map +7 -1
- package/build/fields/template/template-edit.js +167 -142
- package/build/fields/template/template-edit.js.map +7 -1
- package/build/fields/template-title/index.js +42 -30
- package/build/fields/template-title/index.js.map +7 -1
- package/build/fields/title/index.js +42 -32
- package/build/fields/title/index.js.map +7 -1
- package/build/fields/title/view.js +57 -39
- package/build/fields/title/view.js.map +7 -1
- package/build/index.js +39 -36
- package/build/index.js.map +7 -1
- package/build/lock-unlock.js +31 -14
- package/build/lock-unlock.js.map +7 -1
- package/build/mutation/index.js +91 -76
- package/build/mutation/index.js.map +7 -1
- package/build/types.js +16 -5
- package/build/types.js.map +7 -1
- package/build-module/actions/delete-post.js +155 -107
- package/build-module/actions/delete-post.js.map +7 -1
- package/build-module/actions/duplicate-pattern.js +24 -36
- package/build-module/actions/duplicate-pattern.js.map +7 -1
- package/build-module/actions/duplicate-post.js +87 -84
- package/build-module/actions/duplicate-post.js.map +7 -1
- package/build-module/actions/duplicate-template-part.js +51 -58
- package/build-module/actions/duplicate-template-part.js.map +7 -1
- package/build-module/actions/export-pattern.js +40 -39
- package/build-module/actions/export-pattern.js.map +7 -1
- package/build-module/actions/index.js +29 -14
- package/build-module/actions/index.js.map +7 -1
- package/build-module/actions/permanently-delete-post.js +146 -125
- package/build-module/actions/permanently-delete-post.js.map +7 -1
- package/build-module/actions/rename-post.js +63 -77
- package/build-module/actions/rename-post.js.map +7 -1
- package/build-module/actions/reorder-page.js +58 -65
- package/build-module/actions/reorder-page.js.map +7 -1
- package/build-module/actions/reset-post.js +185 -152
- package/build-module/actions/reset-post.js.map +7 -1
- package/build-module/actions/restore-post.js +72 -68
- package/build-module/actions/restore-post.js.map +7 -1
- package/build-module/actions/trash-post.js +152 -119
- package/build-module/actions/trash-post.js.map +7 -1
- package/build-module/actions/utils.js +23 -34
- package/build-module/actions/utils.js.map +7 -1
- package/build-module/actions/view-post-revisions.js +21 -31
- package/build-module/actions/view-post-revisions.js.map +7 -1
- package/build-module/actions/view-post.js +12 -23
- package/build-module/actions/view-post.js.map +7 -1
- package/build-module/components/create-template-part-modal/index.js +201 -154
- package/build-module/components/create-template-part-modal/index.js.map +7 -1
- package/build-module/components/create-template-part-modal/utils.js +26 -43
- package/build-module/components/create-template-part-modal/utils.js.map +7 -1
- package/build-module/fields/author/author-view.js +34 -62
- package/build-module/fields/author/author-view.js.map +7 -1
- package/build-module/fields/author/index.js +14 -24
- package/build-module/fields/author/index.js.map +7 -1
- package/build-module/fields/comment-status/index.js +24 -29
- package/build-module/fields/comment-status/index.js.map +7 -1
- package/build-module/fields/date/date-view.js +66 -53
- package/build-module/fields/date/date-view.js.map +7 -1
- package/build-module/fields/date/index.js +10 -20
- package/build-module/fields/date/index.js.map +7 -1
- package/build-module/fields/discussion/index.js +18 -29
- package/build-module/fields/discussion/index.js.map +7 -1
- package/build-module/fields/featured-image/featured-image-edit.js +93 -90
- package/build-module/fields/featured-image/featured-image-edit.js.map +7 -1
- package/build-module/fields/featured-image/featured-image-view.js +20 -29
- package/build-module/fields/featured-image/featured-image-view.js.map +7 -1
- package/build-module/fields/featured-image/index.js +11 -21
- package/build-module/fields/featured-image/index.js.map +7 -1
- package/build-module/fields/index.js +35 -17
- package/build-module/fields/index.js.map +7 -1
- package/build-module/fields/order/index.js +10 -20
- package/build-module/fields/order/index.js.map +7 -1
- package/build-module/fields/page-title/index.js +13 -25
- package/build-module/fields/page-title/index.js.map +7 -1
- package/build-module/fields/page-title/view.js +20 -37
- package/build-module/fields/page-title/view.js.map +7 -1
- package/build-module/fields/parent/index.js +11 -21
- package/build-module/fields/parent/index.js.map +7 -1
- package/build-module/fields/parent/parent-edit.js +172 -160
- package/build-module/fields/parent/parent-edit.js.map +7 -1
- package/build-module/fields/parent/parent-view.js +19 -27
- package/build-module/fields/parent/parent-view.js.map +7 -1
- package/build-module/fields/parent/utils.js +8 -13
- package/build-module/fields/parent/utils.js.map +7 -1
- package/build-module/fields/password/edit.js +53 -48
- package/build-module/fields/password/edit.js.map +7 -1
- package/build-module/fields/password/index.js +11 -21
- package/build-module/fields/password/index.js.map +7 -1
- package/build-module/fields/pattern-title/index.js +13 -25
- package/build-module/fields/pattern-title/index.js.map +7 -1
- package/build-module/fields/pattern-title/view.js +21 -34
- package/build-module/fields/pattern-title/view.js.map +7 -1
- package/build-module/fields/ping-status/index.js +48 -43
- package/build-module/fields/ping-status/index.js.map +7 -1
- package/build-module/fields/slug/index.js +11 -21
- package/build-module/fields/slug/index.js.map +7 -1
- package/build-module/fields/slug/slug-edit.js +101 -100
- package/build-module/fields/slug/slug-edit.js.map +7 -1
- package/build-module/fields/slug/slug-view.js +9 -16
- package/build-module/fields/slug/slug-view.js.map +7 -1
- package/build-module/fields/slug/utils.js +9 -13
- package/build-module/fields/slug/utils.js.map +7 -1
- package/build-module/fields/status/index.js +13 -23
- package/build-module/fields/status/index.js.map +7 -1
- package/build-module/fields/status/status-elements.js +47 -40
- package/build-module/fields/status/status-elements.js.map +7 -1
- package/build-module/fields/status/status-view.js +14 -31
- package/build-module/fields/status/status-view.js.map +7 -1
- package/build-module/fields/template/index.js +10 -18
- package/build-module/fields/template/index.js.map +7 -1
- package/build-module/fields/template/template-edit.js +147 -130
- package/build-module/fields/template/template-edit.js.map +7 -1
- package/build-module/fields/template-title/index.js +13 -25
- package/build-module/fields/template-title/index.js.map +7 -1
- package/build-module/fields/title/index.js +13 -27
- package/build-module/fields/title/index.js.map +7 -1
- package/build-module/fields/title/view.js +25 -32
- package/build-module/fields/title/view.js.map +7 -1
- package/build-module/index.js +7 -4
- package/build-module/index.js.map +7 -1
- package/build-module/lock-unlock.js +8 -7
- package/build-module/lock-unlock.js.map +7 -1
- package/build-module/mutation/index.js +70 -72
- package/build-module/mutation/index.js.map +7 -1
- package/build-module/types.js +1 -2
- package/build-module/types.js.map +7 -1
- package/build-style/style-rtl.css +4 -139
- package/build-style/style.css +4 -139
- package/build-types/fields/author/author-view.d.ts.map +1 -1
- package/build-types/fields/discussion/index.d.ts.map +1 -1
- package/build-types/fields/featured-image/featured-image-edit.d.ts +2 -2
- package/build-types/fields/featured-image/featured-image-edit.d.ts.map +1 -1
- package/build-types/fields/featured-image/featured-image-view.d.ts +5 -2
- package/build-types/fields/featured-image/featured-image-view.d.ts.map +1 -1
- package/build-types/fields/featured-image/index.d.ts +3 -3
- package/build-types/fields/featured-image/index.d.ts.map +1 -1
- package/build-types/types.d.ts +18 -0
- package/build-types/types.d.ts.map +1 -1
- package/package.json +34 -27
- package/src/components/create-template-part-modal/style.scss +4 -0
- package/src/fields/author/author-view.tsx +3 -17
- package/src/fields/discussion/index.tsx +1 -0
- package/src/fields/featured-image/featured-image-edit.tsx +2 -2
- package/src/fields/featured-image/featured-image-view.tsx +3 -15
- package/src/fields/featured-image/index.ts +3 -3
- package/src/fields/featured-image/style.scss +3 -0
- package/src/fields/template/style.scss +4 -0
- package/src/fields/title/style.scss +1 -1
- package/src/style.scss +9 -8
- package/src/types.ts +18 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/index.native.js +0 -2
- package/build/index.native.js.map +0 -1
- package/build-module/index.native.js +0 -2
- package/build-module/index.native.js.map +0 -1
|
@@ -1,26 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
|
|
1
|
+
import { store as noticesStore } from "@wordpress/notices";
|
|
2
|
+
import { store as coreStore } from "@wordpress/core-data";
|
|
3
|
+
import { dispatch } from "@wordpress/data";
|
|
12
4
|
function getErrorMessagesFromPromises(allSettledResults) {
|
|
13
|
-
const errorMessages = new Set();
|
|
14
|
-
// If there was at lease one failure.
|
|
5
|
+
const errorMessages = /* @__PURE__ */ new Set();
|
|
15
6
|
if (allSettledResults.length === 1) {
|
|
16
7
|
const typedError = allSettledResults[0];
|
|
17
8
|
if (typedError.reason?.message) {
|
|
18
9
|
errorMessages.add(typedError.reason.message);
|
|
19
10
|
}
|
|
20
11
|
} else {
|
|
21
|
-
const failedPromises = allSettledResults.filter(
|
|
22
|
-
status
|
|
23
|
-
|
|
12
|
+
const failedPromises = allSettledResults.filter(
|
|
13
|
+
({ status }) => status === "rejected"
|
|
14
|
+
);
|
|
24
15
|
for (const failedPromise of failedPromises) {
|
|
25
16
|
const typedError = failedPromise;
|
|
26
17
|
if (typedError.reason?.message) {
|
|
@@ -30,26 +21,21 @@ function getErrorMessagesFromPromises(allSettledResults) {
|
|
|
30
21
|
}
|
|
31
22
|
return errorMessages;
|
|
32
23
|
}
|
|
33
|
-
|
|
34
|
-
const {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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;
|
|
24
|
+
const deletePostWithNotices = async (posts, notice, callbacks) => {
|
|
25
|
+
const { createSuccessNotice, createErrorNotice } = dispatch(noticesStore);
|
|
26
|
+
const { deleteEntityRecord } = dispatch(coreStore);
|
|
27
|
+
const allSettledResults = await Promise.allSettled(
|
|
28
|
+
posts.map((post) => {
|
|
29
|
+
return deleteEntityRecord(
|
|
30
|
+
"postType",
|
|
31
|
+
post.type,
|
|
32
|
+
post.id,
|
|
33
|
+
{ force: true },
|
|
34
|
+
{ throwOnError: true }
|
|
35
|
+
);
|
|
36
|
+
})
|
|
37
|
+
);
|
|
38
|
+
if (allSettledResults.every(({ status }) => status === "fulfilled")) {
|
|
53
39
|
let successMessage;
|
|
54
40
|
if (allSettledResults.length === 1) {
|
|
55
41
|
successMessage = notice.success.messages.getMessage(posts[0]);
|
|
@@ -57,75 +43,87 @@ export const deletePostWithNotices = async (posts, notice, callbacks) => {
|
|
|
57
43
|
successMessage = notice.success.messages.getBatchMessage(posts);
|
|
58
44
|
}
|
|
59
45
|
createSuccessNotice(successMessage, {
|
|
60
|
-
type:
|
|
46
|
+
type: notice.success.type ?? "snackbar",
|
|
61
47
|
id: notice.success.id
|
|
62
48
|
});
|
|
63
49
|
callbacks.onActionPerformed?.(posts);
|
|
64
50
|
} else {
|
|
65
|
-
var _notice$error$type;
|
|
66
51
|
const errorMessages = getErrorMessagesFromPromises(allSettledResults);
|
|
67
|
-
let errorMessage =
|
|
52
|
+
let errorMessage = "";
|
|
68
53
|
if (allSettledResults.length === 1) {
|
|
69
54
|
errorMessage = notice.error.messages.getMessage(errorMessages);
|
|
70
55
|
} else {
|
|
71
56
|
errorMessage = notice.error.messages.getBatchMessage(errorMessages);
|
|
72
57
|
}
|
|
73
58
|
createErrorNotice(errorMessage, {
|
|
74
|
-
type:
|
|
59
|
+
type: notice.error.type ?? "snackbar",
|
|
75
60
|
id: notice.error.id
|
|
76
61
|
});
|
|
77
62
|
callbacks.onActionError?.();
|
|
78
63
|
}
|
|
79
64
|
};
|
|
80
|
-
|
|
81
|
-
const {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
65
|
+
const editPostWithNotices = async (postsWithUpdates, notice, callbacks) => {
|
|
66
|
+
const { createSuccessNotice, createErrorNotice } = dispatch(noticesStore);
|
|
67
|
+
const { editEntityRecord, saveEditedEntityRecord } = dispatch(coreStore);
|
|
68
|
+
await Promise.allSettled(
|
|
69
|
+
postsWithUpdates.map((post) => {
|
|
70
|
+
return editEntityRecord(
|
|
71
|
+
"postType",
|
|
72
|
+
post.originalPost.type,
|
|
73
|
+
post.originalPost.id,
|
|
74
|
+
{
|
|
75
|
+
...post.changes
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
})
|
|
79
|
+
);
|
|
80
|
+
const allSettledResults = await Promise.allSettled(
|
|
81
|
+
postsWithUpdates.map((post) => {
|
|
82
|
+
return saveEditedEntityRecord(
|
|
83
|
+
"postType",
|
|
84
|
+
post.originalPost.type,
|
|
85
|
+
post.originalPost.id,
|
|
86
|
+
{
|
|
87
|
+
throwOnError: true
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
})
|
|
91
|
+
);
|
|
92
|
+
if (allSettledResults.every(({ status }) => status === "fulfilled")) {
|
|
104
93
|
let successMessage;
|
|
105
94
|
if (allSettledResults.length === 1) {
|
|
106
|
-
successMessage = notice.success.messages.getMessage(
|
|
95
|
+
successMessage = notice.success.messages.getMessage(
|
|
96
|
+
postsWithUpdates[0].originalPost
|
|
97
|
+
);
|
|
107
98
|
} else {
|
|
108
|
-
successMessage = notice.success.messages.getBatchMessage(
|
|
99
|
+
successMessage = notice.success.messages.getBatchMessage(
|
|
100
|
+
postsWithUpdates.map((post) => post.originalPost)
|
|
101
|
+
);
|
|
109
102
|
}
|
|
110
103
|
createSuccessNotice(successMessage, {
|
|
111
|
-
type:
|
|
104
|
+
type: notice.success.type ?? "snackbar",
|
|
112
105
|
id: notice.success.id
|
|
113
106
|
});
|
|
114
|
-
callbacks.onActionPerformed?.(
|
|
107
|
+
callbacks.onActionPerformed?.(
|
|
108
|
+
postsWithUpdates.map((post) => post.originalPost)
|
|
109
|
+
);
|
|
115
110
|
} else {
|
|
116
|
-
var _notice$error$type2;
|
|
117
111
|
const errorMessages = getErrorMessagesFromPromises(allSettledResults);
|
|
118
|
-
let errorMessage =
|
|
112
|
+
let errorMessage = "";
|
|
119
113
|
if (allSettledResults.length === 1) {
|
|
120
114
|
errorMessage = notice.error.messages.getMessage(errorMessages);
|
|
121
115
|
} else {
|
|
122
116
|
errorMessage = notice.error.messages.getBatchMessage(errorMessages);
|
|
123
117
|
}
|
|
124
118
|
createErrorNotice(errorMessage, {
|
|
125
|
-
type:
|
|
119
|
+
type: notice.error.type ?? "snackbar",
|
|
126
120
|
id: notice.error.id
|
|
127
121
|
});
|
|
128
122
|
callbacks.onActionError?.();
|
|
129
123
|
}
|
|
130
124
|
};
|
|
131
|
-
|
|
125
|
+
export {
|
|
126
|
+
deletePostWithNotices,
|
|
127
|
+
editPostWithNotices
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,7 @@
|
|
|
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\nfunction 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,SAASC,4BAA4BA,CACpCC,iBAA8C,EAC7C;EACD,MAAMC,aAAa,GAAG,IAAIC,GAAG,CAAW,CAAC;EACzC;EACA,IAAKF,iBAAi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rD,CAAC;IACF;IACA3B,mBAAmB,CAAEa,cAAc,EAAE;MACpCN,IAAI,GAAAsB,qBAAA,GAAE/B,MAAM,CAACgB,OAAO,CAACP,IAAI,cAAAsB,qBAAA,cAAAA,qBAAA,GAAI,UAAU;MACvCrB,EAAE,EAAEV,MAAM,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
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/mutation/index.ts"],
|
|
4
|
+
"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\nfunction 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"],
|
|
5
|
+
"mappings": "AAGA,SAAS,SAAS,oBAAoB;AACtC,SAAS,SAAS,iBAAiB;AACnC,SAAS,gBAAgB;AAOzB,SAAS,6BACR,mBACC;AACD,QAAM,gBAAgB,oBAAI,IAAc;AAExC,MAAK,kBAAkB,WAAW,GAAI;AACrC,UAAM,aAAa,kBAAmB,CAAE;AAGxC,QAAK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F,cAAU;AAAA,MACT,iBAAiB,IAAK,CAAE,SAAU,KAAK,YAAa;AAAA,IACrD;AAAA,EACD,OAAO;AACN,UAAM,gBAAgB,6BAA8B,iBAAkB;AACtE,QAAI,eAAe;AACnB,QAAK,kBAAkB,WAAW,GAAI;AACrC,qBAAe,OAAO,MAAM,SAAS,WAAY,aAAc;AAAA,IAChE,OAAO;AACN,qBACC,OAAO,MAAM,SAAS,gBAAiB,aAAc;AAAA,IACvD;AAEA,sBAAmB,cAAc;AAAA,MAChC,MAAM,OAAO,MAAM,QAAQ;AAAA,MAC3B,IAAI,OAAO,MAAM;AAAA,IAClB,CAAE;AACF,cAAU,gBAAgB;AAAA,EAC3B;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/build-module/types.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": [],
|
|
4
|
+
"sourcesContent": [],
|
|
5
|
+
"mappings": "",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,57 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Colors
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Breakpoints & Media Queries
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Colors
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* SCSS Variables.
|
|
12
|
-
*
|
|
13
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
14
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
15
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Fonts & basic variables.
|
|
19
|
-
*/
|
|
20
1
|
/**
|
|
21
2
|
* Typography
|
|
22
3
|
*/
|
|
23
|
-
/**
|
|
24
|
-
* Grid System.
|
|
25
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Radius scale.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Elevation scale.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Dimensions.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Mobile specific styles
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Editor styles.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Block & Editor UI.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Block paddings.
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* React Native specific.
|
|
50
|
-
* These variables do not appear to be used anywhere else.
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Colors
|
|
54
|
-
*/
|
|
55
4
|
/**
|
|
56
5
|
* SCSS Variables.
|
|
57
6
|
*
|
|
@@ -59,91 +8,9 @@
|
|
|
59
8
|
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
60
9
|
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
61
10
|
*/
|
|
62
|
-
/**
|
|
63
|
-
* Fonts & basic variables.
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* Typography
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* Grid System.
|
|
70
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* Radius scale.
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* Elevation scale.
|
|
77
|
-
*/
|
|
78
|
-
/**
|
|
79
|
-
* Dimensions.
|
|
80
|
-
*/
|
|
81
|
-
/**
|
|
82
|
-
* Mobile specific styles
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* Editor styles.
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* Block & Editor UI.
|
|
89
|
-
*/
|
|
90
|
-
/**
|
|
91
|
-
* Block paddings.
|
|
92
|
-
*/
|
|
93
|
-
/**
|
|
94
|
-
* React Native specific.
|
|
95
|
-
* These variables do not appear to be used anywhere else.
|
|
96
|
-
*/
|
|
97
|
-
/**
|
|
98
|
-
* Breakpoints & Media Queries
|
|
99
|
-
*/
|
|
100
|
-
/**
|
|
101
|
-
* Converts a hex value into the rgb equivalent.
|
|
102
|
-
*
|
|
103
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
104
|
-
* @return {string} comma separated rgb values
|
|
105
|
-
*/
|
|
106
|
-
/**
|
|
107
|
-
* Long content fade mixin
|
|
108
|
-
*
|
|
109
|
-
* Creates a fading overlay to signify that the content is longer
|
|
110
|
-
* than the space allows.
|
|
111
|
-
*/
|
|
112
|
-
/**
|
|
113
|
-
* Typography
|
|
114
|
-
*/
|
|
115
|
-
/**
|
|
116
|
-
* Breakpoint mixins
|
|
117
|
-
*/
|
|
118
|
-
/**
|
|
119
|
-
* Focus styles.
|
|
120
|
-
*/
|
|
121
|
-
/**
|
|
122
|
-
* Applies editor left position to the selector passed as argument
|
|
123
|
-
*/
|
|
124
|
-
/**
|
|
125
|
-
* Styles that are reused verbatim in a few places
|
|
126
|
-
*/
|
|
127
|
-
/**
|
|
128
|
-
* Allows users to opt-out of animations via OS-level preferences.
|
|
129
|
-
*/
|
|
130
|
-
/**
|
|
131
|
-
* Reset default styles for JavaScript UI based pages.
|
|
132
|
-
* This is a WP-admin agnostic reset
|
|
133
|
-
*/
|
|
134
|
-
/**
|
|
135
|
-
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
136
|
-
*/
|
|
137
11
|
/**
|
|
138
12
|
* Colors
|
|
139
13
|
*/
|
|
140
|
-
/**
|
|
141
|
-
* SCSS Variables.
|
|
142
|
-
*
|
|
143
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
144
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
145
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
146
|
-
*/
|
|
147
14
|
/**
|
|
148
15
|
* Fonts & basic variables.
|
|
149
16
|
*/
|
|
@@ -194,9 +61,6 @@
|
|
|
194
61
|
* Creates a fading overlay to signify that the content is longer
|
|
195
62
|
* than the space allows.
|
|
196
63
|
*/
|
|
197
|
-
/**
|
|
198
|
-
* Typography
|
|
199
|
-
*/
|
|
200
64
|
/**
|
|
201
65
|
* Breakpoint mixins
|
|
202
66
|
*/
|
|
@@ -223,10 +87,11 @@
|
|
|
223
87
|
--wp-block-synced-color: #7a00df;
|
|
224
88
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
225
89
|
--wp-bound-block-color: var(--wp-block-synced-color);
|
|
90
|
+
--wp-editor-canvas-background: #ddd;
|
|
226
91
|
--wp-admin-theme-color: #007cba;
|
|
227
92
|
--wp-admin-theme-color--rgb: 0, 124, 186;
|
|
228
|
-
--wp-admin-theme-color-darker-10:
|
|
229
|
-
--wp-admin-theme-color-darker-10--rgb: 0, 107,
|
|
93
|
+
--wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);
|
|
94
|
+
--wp-admin-theme-color-darker-10--rgb: 0, 107, 160.5;
|
|
230
95
|
--wp-admin-theme-color-darker-20: #005a87;
|
|
231
96
|
--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
|
|
232
97
|
--wp-admin-border-width-focus: 2px;
|
|
@@ -473,7 +338,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
473
338
|
break-inside: avoid-column;
|
|
474
339
|
}
|
|
475
340
|
|
|
476
|
-
.fields-field__title span:first-child {
|
|
341
|
+
.fields-field__title > span:first-child {
|
|
477
342
|
text-overflow: ellipsis;
|
|
478
343
|
overflow: hidden;
|
|
479
344
|
text-decoration: none;
|
package/build-style/style.css
CHANGED
|
@@ -1,57 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Colors
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Breakpoints & Media Queries
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Colors
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* SCSS Variables.
|
|
12
|
-
*
|
|
13
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
14
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
15
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Fonts & basic variables.
|
|
19
|
-
*/
|
|
20
1
|
/**
|
|
21
2
|
* Typography
|
|
22
3
|
*/
|
|
23
|
-
/**
|
|
24
|
-
* Grid System.
|
|
25
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Radius scale.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Elevation scale.
|
|
32
|
-
*/
|
|
33
|
-
/**
|
|
34
|
-
* Dimensions.
|
|
35
|
-
*/
|
|
36
|
-
/**
|
|
37
|
-
* Mobile specific styles
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Editor styles.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* Block & Editor UI.
|
|
44
|
-
*/
|
|
45
|
-
/**
|
|
46
|
-
* Block paddings.
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* React Native specific.
|
|
50
|
-
* These variables do not appear to be used anywhere else.
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Colors
|
|
54
|
-
*/
|
|
55
4
|
/**
|
|
56
5
|
* SCSS Variables.
|
|
57
6
|
*
|
|
@@ -59,91 +8,9 @@
|
|
|
59
8
|
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
60
9
|
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
61
10
|
*/
|
|
62
|
-
/**
|
|
63
|
-
* Fonts & basic variables.
|
|
64
|
-
*/
|
|
65
|
-
/**
|
|
66
|
-
* Typography
|
|
67
|
-
*/
|
|
68
|
-
/**
|
|
69
|
-
* Grid System.
|
|
70
|
-
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* Radius scale.
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* Elevation scale.
|
|
77
|
-
*/
|
|
78
|
-
/**
|
|
79
|
-
* Dimensions.
|
|
80
|
-
*/
|
|
81
|
-
/**
|
|
82
|
-
* Mobile specific styles
|
|
83
|
-
*/
|
|
84
|
-
/**
|
|
85
|
-
* Editor styles.
|
|
86
|
-
*/
|
|
87
|
-
/**
|
|
88
|
-
* Block & Editor UI.
|
|
89
|
-
*/
|
|
90
|
-
/**
|
|
91
|
-
* Block paddings.
|
|
92
|
-
*/
|
|
93
|
-
/**
|
|
94
|
-
* React Native specific.
|
|
95
|
-
* These variables do not appear to be used anywhere else.
|
|
96
|
-
*/
|
|
97
|
-
/**
|
|
98
|
-
* Breakpoints & Media Queries
|
|
99
|
-
*/
|
|
100
|
-
/**
|
|
101
|
-
* Converts a hex value into the rgb equivalent.
|
|
102
|
-
*
|
|
103
|
-
* @param {string} hex - the hexadecimal value to convert
|
|
104
|
-
* @return {string} comma separated rgb values
|
|
105
|
-
*/
|
|
106
|
-
/**
|
|
107
|
-
* Long content fade mixin
|
|
108
|
-
*
|
|
109
|
-
* Creates a fading overlay to signify that the content is longer
|
|
110
|
-
* than the space allows.
|
|
111
|
-
*/
|
|
112
|
-
/**
|
|
113
|
-
* Typography
|
|
114
|
-
*/
|
|
115
|
-
/**
|
|
116
|
-
* Breakpoint mixins
|
|
117
|
-
*/
|
|
118
|
-
/**
|
|
119
|
-
* Focus styles.
|
|
120
|
-
*/
|
|
121
|
-
/**
|
|
122
|
-
* Applies editor left position to the selector passed as argument
|
|
123
|
-
*/
|
|
124
|
-
/**
|
|
125
|
-
* Styles that are reused verbatim in a few places
|
|
126
|
-
*/
|
|
127
|
-
/**
|
|
128
|
-
* Allows users to opt-out of animations via OS-level preferences.
|
|
129
|
-
*/
|
|
130
|
-
/**
|
|
131
|
-
* Reset default styles for JavaScript UI based pages.
|
|
132
|
-
* This is a WP-admin agnostic reset
|
|
133
|
-
*/
|
|
134
|
-
/**
|
|
135
|
-
* Reset the WP Admin page styles for Gutenberg-like pages.
|
|
136
|
-
*/
|
|
137
11
|
/**
|
|
138
12
|
* Colors
|
|
139
13
|
*/
|
|
140
|
-
/**
|
|
141
|
-
* SCSS Variables.
|
|
142
|
-
*
|
|
143
|
-
* Please use variables from this sheet to ensure consistency across the UI.
|
|
144
|
-
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
|
145
|
-
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
|
146
|
-
*/
|
|
147
14
|
/**
|
|
148
15
|
* Fonts & basic variables.
|
|
149
16
|
*/
|
|
@@ -194,9 +61,6 @@
|
|
|
194
61
|
* Creates a fading overlay to signify that the content is longer
|
|
195
62
|
* than the space allows.
|
|
196
63
|
*/
|
|
197
|
-
/**
|
|
198
|
-
* Typography
|
|
199
|
-
*/
|
|
200
64
|
/**
|
|
201
65
|
* Breakpoint mixins
|
|
202
66
|
*/
|
|
@@ -223,10 +87,11 @@
|
|
|
223
87
|
--wp-block-synced-color: #7a00df;
|
|
224
88
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
225
89
|
--wp-bound-block-color: var(--wp-block-synced-color);
|
|
90
|
+
--wp-editor-canvas-background: #ddd;
|
|
226
91
|
--wp-admin-theme-color: #007cba;
|
|
227
92
|
--wp-admin-theme-color--rgb: 0, 124, 186;
|
|
228
|
-
--wp-admin-theme-color-darker-10:
|
|
229
|
-
--wp-admin-theme-color-darker-10--rgb: 0, 107,
|
|
93
|
+
--wp-admin-theme-color-darker-10: rgb(0, 107, 160.5);
|
|
94
|
+
--wp-admin-theme-color-darker-10--rgb: 0, 107, 160.5;
|
|
230
95
|
--wp-admin-theme-color-darker-20: #005a87;
|
|
231
96
|
--wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
|
|
232
97
|
--wp-admin-border-width-focus: 2px;
|
|
@@ -473,7 +338,7 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
|
|
|
473
338
|
break-inside: avoid-column;
|
|
474
339
|
}
|
|
475
340
|
|
|
476
|
-
.fields-field__title span:first-child {
|
|
341
|
+
.fields-field__title > span:first-child {
|
|
477
342
|
text-overflow: ellipsis;
|
|
478
343
|
overflow: hidden;
|
|
479
344
|
text-decoration: none;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"author-view.d.ts","sourceRoot":"","sources":["../../../src/fields/author/author-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"author-view.d.ts","sourceRoot":"","sources":["../../../src/fields/author/author-view.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,iBAAS,UAAU,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,0BAA0B,CAAA;CAAE,+BA4BlE;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/discussion/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,eAAe,EAAE,KAAK,CAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/discussion/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,eAAe,EAAE,KAAK,CAAE,QAAQ,CAoBrC,CAAC;AAEF;;GAEG;AACH,eAAe,eAAe,CAAC"}
|
|
@@ -2,6 +2,6 @@ import type { DataFormControlProps } from '@wordpress/dataviews';
|
|
|
2
2
|
/**
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
export declare const FeaturedImageEdit: ({ data, field, onChange, }: DataFormControlProps<
|
|
5
|
+
import type { BasePostWithEmbeddedFeaturedMedia } from '../../types';
|
|
6
|
+
export declare const FeaturedImageEdit: ({ data, field, onChange, }: DataFormControlProps<BasePostWithEmbeddedFeaturedMedia>) => import("react").JSX.Element;
|
|
7
7
|
//# sourceMappingURL=featured-image-edit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featured-image-edit.d.ts","sourceRoot":"","sources":["../../../src/fields/featured-image/featured-image-edit.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE;;GAEG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"featured-image-edit.d.ts","sourceRoot":"","sources":["../../../src/fields/featured-image/featured-image-edit.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE;;GAEG;AACH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAErE,eAAO,MAAM,iBAAiB,+BAI3B,oBAAoB,CAAE,iCAAiC,CAAE,gCAoG3D,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
1
4
|
import type { DataViewRenderFieldProps } from '@wordpress/dataviews';
|
|
2
5
|
/**
|
|
3
6
|
* Internal dependencies
|
|
4
7
|
*/
|
|
5
|
-
import type {
|
|
6
|
-
export declare const FeaturedImageView: ({ item, config, }: DataViewRenderFieldProps<
|
|
8
|
+
import type { BasePostWithEmbeddedFeaturedMedia } from '../../types';
|
|
9
|
+
export declare const FeaturedImageView: ({ item, config, }: DataViewRenderFieldProps<BasePostWithEmbeddedFeaturedMedia>) => import("react").JSX.Element;
|
|
7
10
|
//# sourceMappingURL=featured-image-view.d.ts.map
|