@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.
Files changed (250) hide show
  1. package/README.md +1 -1
  2. package/build/actions/delete-post.js +168 -117
  3. package/build/actions/delete-post.js.map +7 -1
  4. package/build/actions/duplicate-pattern.js +42 -43
  5. package/build/actions/duplicate-pattern.js.map +7 -1
  6. package/build/actions/duplicate-post.js +104 -93
  7. package/build/actions/duplicate-post.js.map +7 -1
  8. package/build/actions/duplicate-template-part.js +71 -63
  9. package/build/actions/duplicate-template-part.js.map +7 -1
  10. package/build/actions/export-pattern.js +60 -45
  11. package/build/actions/export-pattern.js.map +7 -1
  12. package/build/actions/index.js +71 -94
  13. package/build/actions/index.js.map +7 -1
  14. package/build/actions/permanently-delete-post.js +161 -132
  15. package/build/actions/permanently-delete-post.js.map +7 -1
  16. package/build/actions/rename-post.js +77 -83
  17. package/build/actions/rename-post.js.map +7 -1
  18. package/build/actions/reorder-page.js +76 -73
  19. package/build/actions/reorder-page.js.map +7 -1
  20. package/build/actions/reset-post.js +214 -165
  21. package/build/actions/reset-post.js.map +7 -1
  22. package/build/actions/restore-post.js +91 -75
  23. package/build/actions/restore-post.js.map +7 -1
  24. package/build/actions/trash-post.js +167 -127
  25. package/build/actions/trash-post.js.map +7 -1
  26. package/build/actions/utils.js +48 -41
  27. package/build/actions/utils.js.map +7 -1
  28. package/build/actions/view-post-revisions.js +39 -35
  29. package/build/actions/view-post-revisions.js.map +7 -1
  30. package/build/actions/view-post.js +31 -28
  31. package/build/actions/view-post.js.map +7 -1
  32. package/build/components/create-template-part-modal/index.js +213 -169
  33. package/build/components/create-template-part-modal/index.js.map +7 -1
  34. package/build/components/create-template-part-modal/utils.js +48 -48
  35. package/build/components/create-template-part-modal/utils.js.map +7 -1
  36. package/build/fields/author/author-view.js +63 -69
  37. package/build/fields/author/author-view.js.map +7 -1
  38. package/build/fields/author/index.js +43 -29
  39. package/build/fields/author/index.js.map +7 -1
  40. package/build/fields/comment-status/index.js +42 -32
  41. package/build/fields/comment-status/index.js.map +7 -1
  42. package/build/fields/date/date-view.js +84 -58
  43. package/build/fields/date/date-view.js.map +7 -1
  44. package/build/fields/date/index.js +39 -25
  45. package/build/fields/date/index.js.map +7 -1
  46. package/build/fields/discussion/index.js +36 -32
  47. package/build/fields/discussion/index.js.map +7 -1
  48. package/build/fields/featured-image/featured-image-edit.js +115 -97
  49. package/build/fields/featured-image/featured-image-edit.js.map +7 -1
  50. package/build/fields/featured-image/featured-image-view.js +41 -34
  51. package/build/fields/featured-image/featured-image-view.js.map +7 -1
  52. package/build/fields/featured-image/index.js +31 -26
  53. package/build/fields/featured-image/index.js.map +7 -1
  54. package/build/fields/index.js +83 -118
  55. package/build/fields/index.js.map +7 -1
  56. package/build/fields/order/index.js +28 -23
  57. package/build/fields/order/index.js.map +7 -1
  58. package/build/fields/page-title/index.js +42 -30
  59. package/build/fields/page-title/index.js.map +7 -1
  60. package/build/fields/page-title/view.js +38 -41
  61. package/build/fields/page-title/view.js.map +7 -1
  62. package/build/fields/parent/index.js +31 -26
  63. package/build/fields/parent/index.js.map +7 -1
  64. package/build/fields/parent/parent-edit.js +200 -168
  65. package/build/fields/parent/parent-edit.js.map +7 -1
  66. package/build/fields/parent/parent-view.js +40 -31
  67. package/build/fields/parent/parent-view.js.map +7 -1
  68. package/build/fields/parent/utils.js +29 -16
  69. package/build/fields/parent/utils.js.map +7 -1
  70. package/build/fields/password/edit.js +67 -53
  71. package/build/fields/password/edit.js.map +7 -1
  72. package/build/fields/password/index.js +40 -26
  73. package/build/fields/password/index.js.map +7 -1
  74. package/build/fields/pattern-title/index.js +42 -30
  75. package/build/fields/pattern-title/index.js.map +7 -1
  76. package/build/fields/pattern-title/view.js +43 -41
  77. package/build/fields/pattern-title/view.js.map +7 -1
  78. package/build/fields/ping-status/index.js +66 -47
  79. package/build/fields/ping-status/index.js.map +7 -1
  80. package/build/fields/slug/index.js +41 -27
  81. package/build/fields/slug/index.js.map +7 -1
  82. package/build/fields/slug/slug-edit.js +116 -107
  83. package/build/fields/slug/slug-edit.js.map +7 -1
  84. package/build/fields/slug/slug-view.js +30 -23
  85. package/build/fields/slug/slug-view.js.map +7 -1
  86. package/build/fields/slug/utils.js +32 -20
  87. package/build/fields/slug/utils.js.map +7 -1
  88. package/build/fields/status/index.js +43 -29
  89. package/build/fields/status/index.js.map +7 -1
  90. package/build/fields/status/status-elements.js +58 -44
  91. package/build/fields/status/status-elements.js.map +7 -1
  92. package/build/fields/status/status-view.js +42 -36
  93. package/build/fields/status/status-view.js.map +7 -1
  94. package/build/fields/template/index.js +29 -24
  95. package/build/fields/template/index.js.map +7 -1
  96. package/build/fields/template/template-edit.js +167 -142
  97. package/build/fields/template/template-edit.js.map +7 -1
  98. package/build/fields/template-title/index.js +42 -30
  99. package/build/fields/template-title/index.js.map +7 -1
  100. package/build/fields/title/index.js +42 -32
  101. package/build/fields/title/index.js.map +7 -1
  102. package/build/fields/title/view.js +57 -39
  103. package/build/fields/title/view.js.map +7 -1
  104. package/build/index.js +39 -36
  105. package/build/index.js.map +7 -1
  106. package/build/lock-unlock.js +31 -14
  107. package/build/lock-unlock.js.map +7 -1
  108. package/build/mutation/index.js +91 -76
  109. package/build/mutation/index.js.map +7 -1
  110. package/build/types.js +16 -5
  111. package/build/types.js.map +7 -1
  112. package/build-module/actions/delete-post.js +155 -107
  113. package/build-module/actions/delete-post.js.map +7 -1
  114. package/build-module/actions/duplicate-pattern.js +24 -36
  115. package/build-module/actions/duplicate-pattern.js.map +7 -1
  116. package/build-module/actions/duplicate-post.js +87 -84
  117. package/build-module/actions/duplicate-post.js.map +7 -1
  118. package/build-module/actions/duplicate-template-part.js +51 -58
  119. package/build-module/actions/duplicate-template-part.js.map +7 -1
  120. package/build-module/actions/export-pattern.js +40 -39
  121. package/build-module/actions/export-pattern.js.map +7 -1
  122. package/build-module/actions/index.js +29 -14
  123. package/build-module/actions/index.js.map +7 -1
  124. package/build-module/actions/permanently-delete-post.js +146 -125
  125. package/build-module/actions/permanently-delete-post.js.map +7 -1
  126. package/build-module/actions/rename-post.js +63 -77
  127. package/build-module/actions/rename-post.js.map +7 -1
  128. package/build-module/actions/reorder-page.js +58 -65
  129. package/build-module/actions/reorder-page.js.map +7 -1
  130. package/build-module/actions/reset-post.js +185 -152
  131. package/build-module/actions/reset-post.js.map +7 -1
  132. package/build-module/actions/restore-post.js +72 -68
  133. package/build-module/actions/restore-post.js.map +7 -1
  134. package/build-module/actions/trash-post.js +152 -119
  135. package/build-module/actions/trash-post.js.map +7 -1
  136. package/build-module/actions/utils.js +23 -34
  137. package/build-module/actions/utils.js.map +7 -1
  138. package/build-module/actions/view-post-revisions.js +21 -31
  139. package/build-module/actions/view-post-revisions.js.map +7 -1
  140. package/build-module/actions/view-post.js +12 -23
  141. package/build-module/actions/view-post.js.map +7 -1
  142. package/build-module/components/create-template-part-modal/index.js +201 -154
  143. package/build-module/components/create-template-part-modal/index.js.map +7 -1
  144. package/build-module/components/create-template-part-modal/utils.js +26 -43
  145. package/build-module/components/create-template-part-modal/utils.js.map +7 -1
  146. package/build-module/fields/author/author-view.js +34 -62
  147. package/build-module/fields/author/author-view.js.map +7 -1
  148. package/build-module/fields/author/index.js +14 -24
  149. package/build-module/fields/author/index.js.map +7 -1
  150. package/build-module/fields/comment-status/index.js +24 -29
  151. package/build-module/fields/comment-status/index.js.map +7 -1
  152. package/build-module/fields/date/date-view.js +66 -53
  153. package/build-module/fields/date/date-view.js.map +7 -1
  154. package/build-module/fields/date/index.js +10 -20
  155. package/build-module/fields/date/index.js.map +7 -1
  156. package/build-module/fields/discussion/index.js +18 -29
  157. package/build-module/fields/discussion/index.js.map +7 -1
  158. package/build-module/fields/featured-image/featured-image-edit.js +93 -90
  159. package/build-module/fields/featured-image/featured-image-edit.js.map +7 -1
  160. package/build-module/fields/featured-image/featured-image-view.js +20 -29
  161. package/build-module/fields/featured-image/featured-image-view.js.map +7 -1
  162. package/build-module/fields/featured-image/index.js +11 -21
  163. package/build-module/fields/featured-image/index.js.map +7 -1
  164. package/build-module/fields/index.js +35 -17
  165. package/build-module/fields/index.js.map +7 -1
  166. package/build-module/fields/order/index.js +10 -20
  167. package/build-module/fields/order/index.js.map +7 -1
  168. package/build-module/fields/page-title/index.js +13 -25
  169. package/build-module/fields/page-title/index.js.map +7 -1
  170. package/build-module/fields/page-title/view.js +20 -37
  171. package/build-module/fields/page-title/view.js.map +7 -1
  172. package/build-module/fields/parent/index.js +11 -21
  173. package/build-module/fields/parent/index.js.map +7 -1
  174. package/build-module/fields/parent/parent-edit.js +172 -160
  175. package/build-module/fields/parent/parent-edit.js.map +7 -1
  176. package/build-module/fields/parent/parent-view.js +19 -27
  177. package/build-module/fields/parent/parent-view.js.map +7 -1
  178. package/build-module/fields/parent/utils.js +8 -13
  179. package/build-module/fields/parent/utils.js.map +7 -1
  180. package/build-module/fields/password/edit.js +53 -48
  181. package/build-module/fields/password/edit.js.map +7 -1
  182. package/build-module/fields/password/index.js +11 -21
  183. package/build-module/fields/password/index.js.map +7 -1
  184. package/build-module/fields/pattern-title/index.js +13 -25
  185. package/build-module/fields/pattern-title/index.js.map +7 -1
  186. package/build-module/fields/pattern-title/view.js +21 -34
  187. package/build-module/fields/pattern-title/view.js.map +7 -1
  188. package/build-module/fields/ping-status/index.js +48 -43
  189. package/build-module/fields/ping-status/index.js.map +7 -1
  190. package/build-module/fields/slug/index.js +11 -21
  191. package/build-module/fields/slug/index.js.map +7 -1
  192. package/build-module/fields/slug/slug-edit.js +101 -100
  193. package/build-module/fields/slug/slug-edit.js.map +7 -1
  194. package/build-module/fields/slug/slug-view.js +9 -16
  195. package/build-module/fields/slug/slug-view.js.map +7 -1
  196. package/build-module/fields/slug/utils.js +9 -13
  197. package/build-module/fields/slug/utils.js.map +7 -1
  198. package/build-module/fields/status/index.js +13 -23
  199. package/build-module/fields/status/index.js.map +7 -1
  200. package/build-module/fields/status/status-elements.js +47 -40
  201. package/build-module/fields/status/status-elements.js.map +7 -1
  202. package/build-module/fields/status/status-view.js +14 -31
  203. package/build-module/fields/status/status-view.js.map +7 -1
  204. package/build-module/fields/template/index.js +10 -18
  205. package/build-module/fields/template/index.js.map +7 -1
  206. package/build-module/fields/template/template-edit.js +147 -130
  207. package/build-module/fields/template/template-edit.js.map +7 -1
  208. package/build-module/fields/template-title/index.js +13 -25
  209. package/build-module/fields/template-title/index.js.map +7 -1
  210. package/build-module/fields/title/index.js +13 -27
  211. package/build-module/fields/title/index.js.map +7 -1
  212. package/build-module/fields/title/view.js +25 -32
  213. package/build-module/fields/title/view.js.map +7 -1
  214. package/build-module/index.js +7 -4
  215. package/build-module/index.js.map +7 -1
  216. package/build-module/lock-unlock.js +8 -7
  217. package/build-module/lock-unlock.js.map +7 -1
  218. package/build-module/mutation/index.js +70 -72
  219. package/build-module/mutation/index.js.map +7 -1
  220. package/build-module/types.js +1 -2
  221. package/build-module/types.js.map +7 -1
  222. package/build-style/style-rtl.css +4 -139
  223. package/build-style/style.css +4 -139
  224. package/build-types/fields/author/author-view.d.ts.map +1 -1
  225. package/build-types/fields/discussion/index.d.ts.map +1 -1
  226. package/build-types/fields/featured-image/featured-image-edit.d.ts +2 -2
  227. package/build-types/fields/featured-image/featured-image-edit.d.ts.map +1 -1
  228. package/build-types/fields/featured-image/featured-image-view.d.ts +5 -2
  229. package/build-types/fields/featured-image/featured-image-view.d.ts.map +1 -1
  230. package/build-types/fields/featured-image/index.d.ts +3 -3
  231. package/build-types/fields/featured-image/index.d.ts.map +1 -1
  232. package/build-types/types.d.ts +18 -0
  233. package/build-types/types.d.ts.map +1 -1
  234. package/package.json +34 -27
  235. package/src/components/create-template-part-modal/style.scss +4 -0
  236. package/src/fields/author/author-view.tsx +3 -17
  237. package/src/fields/discussion/index.tsx +1 -0
  238. package/src/fields/featured-image/featured-image-edit.tsx +2 -2
  239. package/src/fields/featured-image/featured-image-view.tsx +3 -15
  240. package/src/fields/featured-image/index.ts +3 -3
  241. package/src/fields/featured-image/style.scss +3 -0
  242. package/src/fields/template/style.scss +4 -0
  243. package/src/fields/title/style.scss +1 -1
  244. package/src/style.scss +9 -8
  245. package/src/types.ts +18 -0
  246. package/tsconfig.tsbuildinfo +1 -1
  247. package/build/index.native.js +0 -2
  248. package/build/index.native.js.map +0 -1
  249. package/build-module/index.native.js +0 -2
  250. package/build-module/index.native.js.map +0 -1
@@ -1,26 +1,17 @@
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
-
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
- }) => status === 'rejected');
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
- 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;
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: (_notice$success$type = notice.success.type) !== null && _notice$success$type !== void 0 ? _notice$success$type : 'snackbar',
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: (_notice$error$type = notice.error.type) !== null && _notice$error$type !== void 0 ? _notice$error$type : 'snackbar',
59
+ type: notice.error.type ?? "snackbar",
75
60
  id: notice.error.id
76
61
  });
77
62
  callbacks.onActionError?.();
78
63
  }
79
64
  };
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;
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(postsWithUpdates[0].originalPost);
95
+ successMessage = notice.success.messages.getMessage(
96
+ postsWithUpdates[0].originalPost
97
+ );
107
98
  } else {
108
- successMessage = notice.success.messages.getBatchMessage(postsWithUpdates.map(post => post.originalPost));
99
+ successMessage = notice.success.messages.getBatchMessage(
100
+ postsWithUpdates.map((post) => post.originalPost)
101
+ );
109
102
  }
110
103
  createSuccessNotice(successMessage, {
111
- type: (_notice$success$type2 = notice.success.type) !== null && _notice$success$type2 !== void 0 ? _notice$success$type2 : 'snackbar',
104
+ type: notice.success.type ?? "snackbar",
112
105
  id: notice.success.id
113
106
  });
114
- callbacks.onActionPerformed?.(postsWithUpdates.map(post => post.originalPost));
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: (_notice$error$type2 = notice.error.type) !== null && _notice$error$type2 !== void 0 ? _notice$error$type2 : 'snackbar',
119
+ type: notice.error.type ?? "snackbar",
126
120
  id: notice.error.id
127
121
  });
128
122
  callbacks.onActionError?.();
129
123
  }
130
124
  };
131
- //# sourceMappingURL=index.js.map
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,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ACE,eAAe,CACvDO,gBAAgB,CAACnB,GAAG,CAAIC,IAAI,IAAMA,IAAI,CAACqB,YAAa,CACrD,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;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C7B,IAAI,OAAO,QAAQ;AAAA,IACpB,CAAE;AACF,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
+ }
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
1
+ //# sourceMappingURL=types.js.map
@@ -1 +1,7 @@
1
- {"version":3,"names":[],"sources":["@wordpress/fields/src/types.ts"],"sourcesContent":["type PostStatus =\n\t| 'publish'\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\ninterface Author {\n\tname: string;\n\tavatar_urls: Record< string, string >;\n}\n\ninterface EmbeddedAuthor {\n\tauthor: Author[];\n}\n\n/**\n * BasePost interface used for all post types.\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\tslug?: string;\n\tpermalink_template?: string;\n\tdate?: string;\n\tmodified?: string;\n\tauthor?: number;\n}\n\nexport interface BasePostWithEmbeddedAuthor extends BasePost {\n\t_embedded: EmbeddedAuthor;\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\tauthor?: string;\n\t\tthumbnail?: string;\n\t\tcomments?: string;\n\t\teditor?: boolean;\n\t\ttrackbacks?: 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
+ {
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: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
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,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: #006ba1;
229
- --wp-admin-theme-color-darker-10--rgb: 0, 107, 161;
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":"AAgBA;;GAEG;AACH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,iBAAS,UAAU,CAAE,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,0BAA0B,CAAA;CAAE,+BAuClE;AAED,eAAe,UAAU,CAAC"}
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,CAmBrC,CAAC;AAEF;;GAEG;AACH,eAAe,eAAe,CAAC"}
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 { BasePost } from '../../types';
6
- export declare const FeaturedImageEdit: ({ data, field, onChange, }: DataFormControlProps<BasePost>) => import("react").JSX.Element;
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,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,eAAO,MAAM,iBAAiB,+BAI3B,oBAAoB,CAAE,QAAQ,CAAE,gCAoGlC,CAAC"}
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 { BasePost } from '../../types';
6
- export declare const FeaturedImageView: ({ item, config, }: DataViewRenderFieldProps<BasePost>) => import("react").JSX.Element;
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