@wordpress/fields 0.5.0 → 0.5.1-next.a9f418477.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 (299) hide show
  1. package/README.md +52 -27
  2. package/build/actions/delete-post.js +4 -0
  3. package/build/actions/delete-post.js.map +1 -1
  4. package/build/actions/duplicate-pattern.js +4 -0
  5. package/build/actions/duplicate-pattern.js.map +1 -1
  6. package/build/actions/duplicate-post.js +7 -3
  7. package/build/actions/duplicate-post.js.map +1 -1
  8. package/build/actions/duplicate-template-part.js +71 -0
  9. package/build/actions/duplicate-template-part.js.map +1 -0
  10. package/build/actions/export-pattern.js +4 -0
  11. package/build/actions/export-pattern.js.map +1 -1
  12. package/build/actions/index.js +3 -17
  13. package/build/actions/index.js.map +1 -1
  14. package/build/actions/permanently-delete-post.js +4 -1
  15. package/build/actions/permanently-delete-post.js.map +1 -1
  16. package/build/actions/rename-post.js +6 -2
  17. package/build/actions/rename-post.js.map +1 -1
  18. package/build/actions/reorder-page.js +4 -0
  19. package/build/actions/reorder-page.js.map +1 -1
  20. package/build/actions/reset-post.js +7 -3
  21. package/build/actions/reset-post.js.map +1 -1
  22. package/build/actions/restore-post.js +4 -1
  23. package/build/actions/restore-post.js.map +1 -1
  24. package/build/actions/trash-post.js +4 -1
  25. package/build/actions/trash-post.js.map +1 -1
  26. package/build/actions/utils.js +4 -12
  27. package/build/actions/utils.js.map +1 -1
  28. package/build/actions/view-post-revisions.js +4 -0
  29. package/build/actions/view-post-revisions.js.map +1 -1
  30. package/build/actions/view-post.js +4 -0
  31. package/build/actions/view-post.js.map +1 -1
  32. package/build/components/create-template-part-modal/index.js +213 -0
  33. package/build/components/create-template-part-modal/index.js.map +1 -0
  34. package/build/components/create-template-part-modal/utils.js +64 -0
  35. package/build/components/create-template-part-modal/utils.js.map +1 -0
  36. package/build/fields/featured-image/index.js +4 -0
  37. package/build/fields/featured-image/index.js.map +1 -1
  38. package/build/fields/index.js +28 -0
  39. package/build/fields/index.js.map +1 -1
  40. package/build/fields/order/index.js +4 -0
  41. package/build/fields/order/index.js.map +1 -1
  42. package/build/fields/page-title/index.js +36 -0
  43. package/build/fields/page-title/index.js.map +1 -0
  44. package/build/fields/page-title/view.js +45 -0
  45. package/build/fields/page-title/view.js.map +1 -0
  46. package/build/fields/parent/index.js +1 -1
  47. package/build/fields/parent/index.js.map +1 -1
  48. package/build/fields/password/index.js +1 -1
  49. package/build/fields/password/index.js.map +1 -1
  50. package/build/fields/pattern-title/index.js +36 -0
  51. package/build/fields/pattern-title/index.js.map +1 -0
  52. package/build/fields/pattern-title/view.js +45 -0
  53. package/build/fields/pattern-title/view.js.map +1 -0
  54. package/build/fields/slug/index.js +4 -0
  55. package/build/fields/slug/index.js.map +1 -1
  56. package/build/fields/slug/slug-view.js +1 -1
  57. package/build/fields/slug/slug-view.js.map +1 -1
  58. package/build/fields/slug/utils.js +3 -0
  59. package/build/fields/slug/utils.js.map +1 -1
  60. package/build/fields/template/index.js +29 -0
  61. package/build/fields/template/index.js.map +1 -0
  62. package/build/fields/template/template-edit.js +154 -0
  63. package/build/fields/template/template-edit.js.map +1 -0
  64. package/build/fields/template-title/index.js +36 -0
  65. package/build/fields/template-title/index.js.map +1 -0
  66. package/build/fields/title/index.js +10 -3
  67. package/build/fields/title/index.js.map +1 -1
  68. package/build/fields/title/view.js +48 -0
  69. package/build/fields/title/view.js.map +1 -0
  70. package/build/index.js +13 -0
  71. package/build/index.js.map +1 -1
  72. package/build/index.native.js +0 -26
  73. package/build/index.native.js.map +1 -1
  74. package/build/mutation/index.js +0 -1
  75. package/build/mutation/index.js.map +1 -1
  76. package/build/types.js.map +1 -1
  77. package/build-module/actions/delete-post.js +4 -0
  78. package/build-module/actions/delete-post.js.map +1 -1
  79. package/build-module/actions/duplicate-pattern.js +4 -0
  80. package/build-module/actions/duplicate-pattern.js.map +1 -1
  81. package/build-module/actions/duplicate-post.js +7 -3
  82. package/build-module/actions/duplicate-post.js.map +1 -1
  83. package/build-module/actions/duplicate-template-part.js +66 -0
  84. package/build-module/actions/duplicate-template-part.js.map +1 -0
  85. package/build-module/actions/export-pattern.js +4 -0
  86. package/build-module/actions/export-pattern.js.map +1 -1
  87. package/build-module/actions/index.js +1 -3
  88. package/build-module/actions/index.js.map +1 -1
  89. package/build-module/actions/permanently-delete-post.js +4 -1
  90. package/build-module/actions/permanently-delete-post.js.map +1 -1
  91. package/build-module/actions/rename-post.js +7 -3
  92. package/build-module/actions/rename-post.js.map +1 -1
  93. package/build-module/actions/reorder-page.js +4 -0
  94. package/build-module/actions/reorder-page.js.map +1 -1
  95. package/build-module/actions/reset-post.js +8 -4
  96. package/build-module/actions/reset-post.js.map +1 -1
  97. package/build-module/actions/restore-post.js +4 -1
  98. package/build-module/actions/restore-post.js.map +1 -1
  99. package/build-module/actions/trash-post.js +4 -1
  100. package/build-module/actions/trash-post.js.map +1 -1
  101. package/build-module/actions/utils.js +4 -11
  102. package/build-module/actions/utils.js.map +1 -1
  103. package/build-module/actions/view-post-revisions.js +4 -0
  104. package/build-module/actions/view-post-revisions.js.map +1 -1
  105. package/build-module/actions/view-post.js +4 -0
  106. package/build-module/actions/view-post.js.map +1 -1
  107. package/build-module/components/create-template-part-modal/index.js +204 -0
  108. package/build-module/components/create-template-part-modal/index.js.map +1 -0
  109. package/build-module/components/create-template-part-modal/utils.js +55 -0
  110. package/build-module/components/create-template-part-modal/utils.js.map +1 -0
  111. package/build-module/fields/featured-image/index.js +4 -0
  112. package/build-module/fields/featured-image/index.js.map +1 -1
  113. package/build-module/fields/index.js +4 -0
  114. package/build-module/fields/index.js.map +1 -1
  115. package/build-module/fields/order/index.js +4 -0
  116. package/build-module/fields/order/index.js.map +1 -1
  117. package/build-module/fields/page-title/index.js +30 -0
  118. package/build-module/fields/page-title/index.js.map +1 -0
  119. package/build-module/fields/page-title/view.js +39 -0
  120. package/build-module/fields/page-title/view.js.map +1 -0
  121. package/build-module/fields/parent/index.js +1 -1
  122. package/build-module/fields/parent/index.js.map +1 -1
  123. package/build-module/fields/password/index.js +1 -1
  124. package/build-module/fields/password/index.js.map +1 -1
  125. package/build-module/fields/pattern-title/index.js +30 -0
  126. package/build-module/fields/pattern-title/index.js.map +1 -0
  127. package/build-module/fields/pattern-title/view.js +36 -0
  128. package/build-module/fields/pattern-title/view.js.map +1 -0
  129. package/build-module/fields/slug/index.js +4 -0
  130. package/build-module/fields/slug/index.js.map +1 -1
  131. package/build-module/fields/slug/slug-view.js +1 -1
  132. package/build-module/fields/slug/slug-view.js.map +1 -1
  133. package/build-module/fields/slug/utils.js +3 -0
  134. package/build-module/fields/slug/utils.js.map +1 -1
  135. package/build-module/fields/template/index.js +22 -0
  136. package/build-module/fields/template/index.js.map +1 -0
  137. package/build-module/fields/template/template-edit.js +144 -0
  138. package/build-module/fields/template/template-edit.js.map +1 -0
  139. package/build-module/fields/template-title/index.js +30 -0
  140. package/build-module/fields/template-title/index.js.map +1 -0
  141. package/build-module/fields/title/index.js +9 -2
  142. package/build-module/fields/title/index.js.map +1 -1
  143. package/build-module/fields/title/view.js +39 -0
  144. package/build-module/fields/title/view.js.map +1 -0
  145. package/build-module/index.js +1 -0
  146. package/build-module/index.js.map +1 -1
  147. package/build-module/index.native.js +1 -2
  148. package/build-module/index.native.js.map +1 -1
  149. package/build-module/mutation/index.js +0 -1
  150. package/build-module/mutation/index.js.map +1 -1
  151. package/build-module/types.js.map +1 -1
  152. package/build-style/style-rtl.css +98 -0
  153. package/build-style/style.css +98 -0
  154. package/build-types/actions/delete-post.d.ts +3 -0
  155. package/build-types/actions/delete-post.d.ts.map +1 -1
  156. package/build-types/actions/duplicate-pattern.d.ts +3 -0
  157. package/build-types/actions/duplicate-pattern.d.ts.map +1 -1
  158. package/build-types/actions/duplicate-post.d.ts +3 -0
  159. package/build-types/actions/duplicate-post.d.ts.map +1 -1
  160. package/build-types/actions/duplicate-template-part.d.ts +14 -0
  161. package/build-types/actions/duplicate-template-part.d.ts.map +1 -0
  162. package/build-types/actions/export-pattern.d.ts +3 -0
  163. package/build-types/actions/export-pattern.d.ts.map +1 -1
  164. package/build-types/actions/index.d.ts +1 -3
  165. package/build-types/actions/index.d.ts.map +1 -1
  166. package/build-types/actions/permanently-delete-post.d.ts +3 -0
  167. package/build-types/actions/permanently-delete-post.d.ts.map +1 -1
  168. package/build-types/actions/rename-post.d.ts +3 -0
  169. package/build-types/actions/rename-post.d.ts.map +1 -1
  170. package/build-types/actions/reorder-page.d.ts +3 -0
  171. package/build-types/actions/reorder-page.d.ts.map +1 -1
  172. package/build-types/actions/reset-post.d.ts +3 -0
  173. package/build-types/actions/reset-post.d.ts.map +1 -1
  174. package/build-types/actions/restore-post.d.ts +3 -0
  175. package/build-types/actions/restore-post.d.ts.map +1 -1
  176. package/build-types/actions/trash-post.d.ts +3 -0
  177. package/build-types/actions/trash-post.d.ts.map +1 -1
  178. package/build-types/actions/utils.d.ts +7 -8
  179. package/build-types/actions/utils.d.ts.map +1 -1
  180. package/build-types/actions/view-post-revisions.d.ts +3 -0
  181. package/build-types/actions/view-post-revisions.d.ts.map +1 -1
  182. package/build-types/actions/view-post.d.ts +3 -0
  183. package/build-types/actions/view-post.d.ts.map +1 -1
  184. package/build-types/components/create-template-part-modal/index.d.ts +34 -0
  185. package/build-types/components/create-template-part-modal/index.d.ts.map +1 -0
  186. package/build-types/components/create-template-part-modal/utils.d.ts +4 -0
  187. package/build-types/components/create-template-part-modal/utils.d.ts.map +1 -0
  188. package/build-types/fields/featured-image/index.d.ts +3 -0
  189. package/build-types/fields/featured-image/index.d.ts.map +1 -1
  190. package/build-types/fields/index.d.ts +4 -0
  191. package/build-types/fields/index.d.ts.map +1 -1
  192. package/build-types/fields/order/index.d.ts +3 -0
  193. package/build-types/fields/order/index.d.ts.map +1 -1
  194. package/build-types/fields/page-title/index.d.ts +14 -0
  195. package/build-types/fields/page-title/index.d.ts.map +1 -0
  196. package/build-types/fields/page-title/view.d.ts +8 -0
  197. package/build-types/fields/page-title/view.d.ts.map +1 -0
  198. package/build-types/fields/parent/index.d.ts +1 -1
  199. package/build-types/fields/password/index.d.ts +1 -1
  200. package/build-types/fields/pattern-title/index.d.ts +14 -0
  201. package/build-types/fields/pattern-title/index.d.ts.map +1 -0
  202. package/build-types/fields/pattern-title/view.d.ts +9 -0
  203. package/build-types/fields/pattern-title/view.d.ts.map +1 -0
  204. package/build-types/fields/slug/index.d.ts +3 -0
  205. package/build-types/fields/slug/index.d.ts.map +1 -1
  206. package/build-types/fields/slug/utils.d.ts.map +1 -1
  207. package/build-types/fields/template/index.d.ts +11 -0
  208. package/build-types/fields/template/index.d.ts.map +1 -0
  209. package/build-types/fields/template/template-edit.d.ts +4 -0
  210. package/build-types/fields/template/template-edit.d.ts.map +1 -0
  211. package/build-types/fields/template-title/index.d.ts +14 -0
  212. package/build-types/fields/template-title/index.d.ts.map +1 -0
  213. package/build-types/fields/title/index.d.ts +7 -2
  214. package/build-types/fields/title/index.d.ts.map +1 -1
  215. package/build-types/fields/title/view.d.ts +14 -0
  216. package/build-types/fields/title/view.d.ts.map +1 -0
  217. package/build-types/index.d.ts +2 -1
  218. package/build-types/index.d.ts.map +1 -1
  219. package/build-types/index.native.d.ts +0 -2
  220. package/build-types/index.native.d.ts.map +1 -1
  221. package/build-types/lock-unlock.d.ts +1 -1
  222. package/build-types/lock-unlock.d.ts.map +1 -1
  223. package/build-types/types.d.ts +3 -0
  224. package/build-types/types.d.ts.map +1 -1
  225. package/package.json +24 -23
  226. package/src/actions/delete-post.tsx +3 -0
  227. package/src/actions/duplicate-pattern.tsx +3 -0
  228. package/src/actions/duplicate-post.tsx +6 -3
  229. package/src/actions/duplicate-template-part.tsx +74 -0
  230. package/src/actions/export-pattern.tsx +3 -0
  231. package/src/actions/index.ts +1 -3
  232. package/src/actions/permanently-delete-post.tsx +3 -0
  233. package/src/actions/rename-post.tsx +6 -6
  234. package/src/actions/reorder-page.tsx +3 -0
  235. package/src/actions/reset-post.tsx +7 -9
  236. package/src/actions/restore-post.tsx +3 -0
  237. package/src/actions/trash-post.tsx +3 -0
  238. package/src/actions/utils.ts +7 -15
  239. package/src/actions/view-post-revisions.tsx +3 -0
  240. package/src/actions/view-post.tsx +3 -0
  241. package/src/components/create-template-part-modal/index.tsx +274 -0
  242. package/src/components/create-template-part-modal/style.scss +63 -0
  243. package/src/components/create-template-part-modal/test/utils.js +60 -0
  244. package/src/components/create-template-part-modal/utils.js +68 -0
  245. package/src/fields/featured-image/index.ts +3 -0
  246. package/src/fields/index.ts +4 -0
  247. package/src/fields/order/index.ts +3 -0
  248. package/src/fields/page-title/index.ts +28 -0
  249. package/src/fields/page-title/style.scss +10 -0
  250. package/src/fields/page-title/view.tsx +38 -0
  251. package/src/fields/parent/index.ts +1 -1
  252. package/src/fields/password/index.tsx +1 -1
  253. package/src/fields/pattern-title/index.ts +28 -0
  254. package/src/fields/pattern-title/style.scss +3 -0
  255. package/src/fields/pattern-title/view.tsx +32 -0
  256. package/src/fields/slug/index.ts +3 -0
  257. package/src/fields/slug/slug-view.tsx +1 -1
  258. package/src/fields/slug/utils.ts +4 -0
  259. package/src/fields/template/index.ts +24 -0
  260. package/src/fields/template/style.scss +23 -0
  261. package/src/fields/template/template-edit.tsx +210 -0
  262. package/src/fields/template-title/index.ts +28 -0
  263. package/src/fields/title/index.ts +9 -3
  264. package/src/fields/title/style.scss +8 -0
  265. package/src/fields/title/view.tsx +43 -0
  266. package/src/index.native.ts +0 -2
  267. package/src/index.ts +2 -1
  268. package/src/style.scss +5 -0
  269. package/src/types.ts +3 -0
  270. package/tsconfig.json +2 -0
  271. package/tsconfig.tsbuildinfo +1 -1
  272. package/build/actions/duplicate-post.native.js +0 -9
  273. package/build/actions/duplicate-post.native.js.map +0 -1
  274. package/build/actions/export-pattern.native.js +0 -9
  275. package/build/actions/export-pattern.native.js.map +0 -1
  276. package/build/actions/reorder-page.native.js +0 -9
  277. package/build/actions/reorder-page.native.js.map +0 -1
  278. package/build/fields/title/title-view.js +0 -61
  279. package/build/fields/title/title-view.js.map +0 -1
  280. package/build-module/actions/duplicate-post.native.js +0 -3
  281. package/build-module/actions/duplicate-post.native.js.map +0 -1
  282. package/build-module/actions/export-pattern.native.js +0 -3
  283. package/build-module/actions/export-pattern.native.js.map +0 -1
  284. package/build-module/actions/reorder-page.native.js +0 -3
  285. package/build-module/actions/reorder-page.native.js.map +0 -1
  286. package/build-module/fields/title/title-view.js +0 -55
  287. package/build-module/fields/title/title-view.js.map +0 -1
  288. package/build-types/actions/duplicate-post.native.d.ts +0 -3
  289. package/build-types/actions/duplicate-post.native.d.ts.map +0 -1
  290. package/build-types/actions/export-pattern.native.d.ts +0 -3
  291. package/build-types/actions/export-pattern.native.d.ts.map +0 -1
  292. package/build-types/actions/reorder-page.native.d.ts +0 -3
  293. package/build-types/actions/reorder-page.native.d.ts.map +0 -1
  294. package/build-types/fields/title/title-view.d.ts +0 -9
  295. package/build-types/fields/title/title-view.d.ts.map +0 -1
  296. package/src/actions/duplicate-post.native.tsx +0 -3
  297. package/src/actions/export-pattern.native.tsx +0 -3
  298. package/src/actions/reorder-page.native.tsx +0 -3
  299. package/src/fields/title/title-view.tsx +0 -62
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__","getItemTitle","TitleView","templateTitleField","type","label","placeholder","id","getValue","item","render","enableHiding","enableGlobalSearch"],"sources":["@wordpress/fields/src/fields/template-title/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Template } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from '../title/view';\n\nconst templateTitleField: Field< Template > = {\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tplaceholder: __( 'No title' ),\n\tid: 'title',\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the template entity.\n */\nexport default templateTitleField;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAEA,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,SAAS,MAAM,eAAe;AAErC,MAAMC,kBAAqC,GAAG;EAC7CC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAEL,EAAE,CAAE,UAAW,CAAC;EACvBM,WAAW,EAAEN,EAAE,CAAE,UAAW,CAAC;EAC7BO,EAAE,EAAE,OAAO;EACXC,QAAQ,EAAEA,CAAE;IAAEC;EAAK,CAAC,KAAMR,YAAY,CAAEQ,IAAK,CAAC;EAC9CC,MAAM,EAAER,SAAS;EACjBS,YAAY,EAAE,KAAK;EACnBC,kBAAkB,EAAE;AACrB,CAAC;;AAED;AACA;AACA;AACA,eAAeT,kBAAkB","ignoreList":[]}
@@ -9,7 +9,7 @@ import { __ } from '@wordpress/i18n';
9
9
  */
10
10
 
11
11
  import { getItemTitle } from '../../actions/utils';
12
- import TitleView from './title-view';
12
+ import TitleView from './view';
13
13
  const titleField = {
14
14
  type: 'text',
15
15
  id: 'title',
@@ -19,7 +19,14 @@ const titleField = {
19
19
  item
20
20
  }) => getItemTitle(item),
21
21
  render: TitleView,
22
- enableHiding: false
22
+ enableHiding: false,
23
+ enableGlobalSearch: true
23
24
  };
25
+
26
+ /**
27
+ * Title for the any entity with a `title` property.
28
+ * For patterns, pages or templates you should use the respective field
29
+ * because there are some differences in the rendering, labels, etc.
30
+ */
24
31
  export default titleField;
25
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__","getItemTitle","TitleView","titleField","type","id","label","placeholder","getValue","item","render","enableHiding"],"sources":["@wordpress/fields/src/fields/title/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from './title-view';\n\nconst titleField: Field< BasePost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n};\n\nexport default titleField;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAEA,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,SAAS,MAAM,cAAc;AAEpC,MAAMC,UAA6B,GAAG;EACrCC,IAAI,EAAE,MAAM;EACZC,EAAE,EAAE,OAAO;EACXC,KAAK,EAAEN,EAAE,CAAE,OAAQ,CAAC;EACpBO,WAAW,EAAEP,EAAE,CAAE,UAAW,CAAC;EAC7BQ,QAAQ,EAAEA,CAAE;IAAEC;EAAK,CAAC,KAAMR,YAAY,CAAEQ,IAAK,CAAC;EAC9CC,MAAM,EAAER,SAAS;EACjBS,YAAY,EAAE;AACf,CAAC;AAED,eAAeR,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["__","getItemTitle","TitleView","titleField","type","id","label","placeholder","getValue","item","render","enableHiding","enableGlobalSearch"],"sources":["@wordpress/fields/src/fields/title/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from './view';\n\nconst titleField: Field< CommonPost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the any entity with a `title` property.\n * For patterns, pages or templates you should use the respective field\n * because there are some differences in the rendering, labels, etc.\n */\nexport default titleField;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAEA,SAASC,YAAY,QAAQ,qBAAqB;AAClD,OAAOC,SAAS,MAAM,QAAQ;AAE9B,MAAMC,UAA+B,GAAG;EACvCC,IAAI,EAAE,MAAM;EACZC,EAAE,EAAE,OAAO;EACXC,KAAK,EAAEN,EAAE,CAAE,OAAQ,CAAC;EACpBO,WAAW,EAAEP,EAAE,CAAE,UAAW,CAAC;EAC7BQ,QAAQ,EAAEA,CAAE;IAAEC;EAAK,CAAC,KAAMR,YAAY,CAAEQ,IAAK,CAAC;EAC9CC,MAAM,EAAER,SAAS;EACjBS,YAAY,EAAE,KAAK;EACnBC,kBAAkB,EAAE;AACrB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,eAAeT,UAAU","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import clsx from 'clsx';
5
+ /**
6
+ * WordPress dependencies
7
+ */
8
+ import { __experimentalHStack as HStack } from '@wordpress/components';
9
+ import { __ } from '@wordpress/i18n';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+
15
+ import { getItemTitle } from '../../actions/utils';
16
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
+ export function BaseTitleView({
18
+ item,
19
+ className,
20
+ children
21
+ }) {
22
+ const renderedTitle = getItemTitle(item);
23
+ return /*#__PURE__*/_jsxs(HStack, {
24
+ className: clsx('fields-field__title', className),
25
+ alignment: "center",
26
+ justify: "flex-start",
27
+ children: [/*#__PURE__*/_jsx("span", {
28
+ children: renderedTitle || __('(no title)')
29
+ }), children]
30
+ });
31
+ }
32
+ export default function TitleView({
33
+ item
34
+ }) {
35
+ return /*#__PURE__*/_jsx(BaseTitleView, {
36
+ item: item
37
+ });
38
+ }
39
+ //# sourceMappingURL=view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["clsx","__experimentalHStack","HStack","__","getItemTitle","jsx","_jsx","jsxs","_jsxs","BaseTitleView","item","className","children","renderedTitle","alignment","justify","TitleView"],"sources":["@wordpress/fields/src/fields/title/view.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\n\nexport function BaseTitleView( {\n\titem,\n\tclassName,\n\tchildren,\n}: {\n\titem: CommonPost;\n\tclassName?: string;\n\tchildren?: ReactNode;\n} ) {\n\tconst renderedTitle = getItemTitle( item );\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ clsx( 'fields-field__title', className ) }\n\t\t\talignment=\"center\"\n\t\t\tjustify=\"flex-start\"\n\t\t>\n\t\t\t<span>{ renderedTitle || __( '(no title)' ) }</span>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n\nexport default function TitleView( { item }: { item: CommonPost } ) {\n\treturn <BaseTitleView item={ item } />;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,oBAAoB,IAAIC,MAAM,QAAQ,uBAAuB;AACtE,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAEA,SAASC,YAAY,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnD,OAAO,SAASC,aAAaA,CAAE;EAC9BC,IAAI;EACJC,SAAS;EACTC;AAKD,CAAC,EAAG;EACH,MAAMC,aAAa,GAAGT,YAAY,CAAEM,IAAK,CAAC;EAC1C,oBACCF,KAAA,CAACN,MAAM;IACNS,SAAS,EAAGX,IAAI,CAAE,qBAAqB,EAAEW,SAAU,CAAG;IACtDG,SAAS,EAAC,QAAQ;IAClBC,OAAO,EAAC,YAAY;IAAAH,QAAA,gBAEpBN,IAAA;MAAAM,QAAA,EAAQC,aAAa,IAAIV,EAAE,CAAE,YAAa;IAAC,CAAQ,CAAC,EAClDS,QAAQ;EAAA,CACH,CAAC;AAEX;AAEA,eAAe,SAASI,SAASA,CAAE;EAAEN;AAA2B,CAAC,EAAG;EACnE,oBAAOJ,IAAA,CAACG,aAAa;IAACC,IAAI,EAAGA;EAAM,CAAE,CAAC;AACvC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
1
  export * from './fields';
2
2
  export * from './actions';
3
+ export { default as CreateTemplatePartModal } from './components/create-template-part-modal';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/fields/src/index.ts"],"sourcesContent":["export * from './fields';\nexport * from './actions';\nexport type * from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["default","CreateTemplatePartModal"],"sources":["@wordpress/fields/src/index.ts"],"sourcesContent":["export * from './fields';\nexport * from './actions';\nexport { default as CreateTemplatePartModal } from './components/create-template-part-modal';\nexport type { BasePostWithEmbeddedAuthor, PostType } from './types';\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,WAAW;AACzB,SAASA,OAAO,IAAIC,uBAAuB,QAAQ,yCAAyC","ignoreList":[]}
@@ -1,3 +1,2 @@
1
- export * from './actions/duplicate-post.native';
2
- export * from './actions/reorder-page.native';
1
+
3
2
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/fields/src/index.native.ts"],"sourcesContent":["export * from './actions/duplicate-post.native';\nexport * from './actions/reorder-page.native';\n"],"mappings":"AAAA,cAAc,iCAAiC;AAC/C,cAAc,+BAA+B","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/fields/src/index.native.ts"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * WordPress dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["store","noticesStore","coreStore","dispatch","getErrorMessagesFromPromises","allSettledResults","errorMessages","Set","length","typedError","reason","message","add","failedPromises","filter","status","failedPromise","deletePostWithNotices","posts","notice","callbacks","createSuccessNotice","createErrorNotice","deleteEntityRecord","Promise","allSettled","map","post","type","id","force","throwOnError","every","_notice$success$type","successMessage","success","messages","getMessage","getBatchMessage","onActionPerformed","_notice$error$type","errorMessage","error","onActionError","editPostWithNotices","postsWithUpdates","editEntityRecord","saveEditedEntityRecord","originalPost","changes","_notice$success$type2","_notice$error$type2"],"sources":["@wordpress/fields/src/mutation/index.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, Post } from '../types';\n\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,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAG;IACrC,MAAMC,UAAU,GAAGJ,iBAAiB,CAAE,CAAC,CAEtC;IACD,IAAKI,UAAU,CAACC,MAAM,EAAEC,OAAO,EAAG;MACjCL,aAAa,CAACM,GAAG,CAAEH,UAAU,CAACC,MAAM,CAACC,OAAQ,CAAC;IAC/C;EACD,CAAC,MAAM;IACN,MAAME,cAAc,GAAGR,iBAAiB,CAACS,MAAM,CAC9C,CAAE;MAAEC;IAAO,CAAC,KAAMA,MAAM,KAAK,UAC9B,CAAC;IACD,KAAM,MAAMC,aAAa,IAAIH,cAAc,EAAG;MAC7C,MAAMJ,UAAU,GAAGO,aAElB;MACD,IAAKP,UAAU,CAACC,MAAM,EAAEC,OAAO,EAAG;QACjCL,aAAa,CAACM,GAAG,CAAEH,UAAU,CAACC,MAAM,CAACC,OAAQ,CAAC;MAC/C;IACD;EACD;EACA,OAAOL,aAAa;AACrB;AAqBA,OA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,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
+ {"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,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAG;IACrC,MAAMC,UAAU,GAAGJ,iBAAiB,CAAE,CAAC,CAEtC;IACD,IAAKI,UAAU,CAACC,MAAM,EAAEC,OAAO,EAAG;MACjCL,aAAa,CAACM,GAAG,CAAEH,UAAU,CAACC,MAAM,CAACC,OAAQ,CAAC;IAC/C;EACD,CAAC,MAAM;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SAAS,CAACmB,iBAAiB,GAC1BM,gBAAgB,CAACnB,GAAG,CAAIC,IAAI,IAAMA,IAAI,CAACqB,YAAa,CACrD,CAAC;EACF,CAAC,MAAM;IAAA,IAAAG,mBAAA;IACN,MAAM7C,aAAa,GAAGF,4BAA4B,CAAEC,iBAAkB,CAAC;IACvE,IAAIoC,YAAY,GAAG,EAAE;IACrB,IAAKpC,iBAAiB,CAACG,MAAM,KAAK,CAAC,EAAG;MACrCiC,YAAY,GAAGtB,MAAM,CAACuB,KAAK,CAACN,QAAQ,CAACC,UAAU,CAAE/B,aAAc,CAAC;IACjE,CAAC,MAAM;MACNmC,YAAY,GACXtB,MAAM,CAACuB,KAAK,CAACN,QAAQ,CAACE,eAAe,CAAEhC,aAAc,CAAC;IACxD;IAEAgB,iBAAiB,CAAEmB,YAAY,EAAE;MAChCb,IAAI,GAAAuB,mBAAA,GAAEhC,MAAM,CAACuB,KAAK,CAACd,IAAI,cAAAuB,mBAAA,cAAAA,mBAAA,GAAI,UAAU;MACrCtB,EAAE,EAAEV,MAAM,CAACuB,KAAK,CAACb;IAClB,CAAE,CAAC;IACHT,SAAS,CAACuB,aAAa,GAAG,CAAC;EAC5B;AACD,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/fields/src/types.ts"],"sourcesContent":["type PostStatus =\n\t| '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\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};\n}\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/fields/src/types.ts"],"sourcesContent":["type PostStatus =\n\t| '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\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};\n}\n\n// Will be unnecessary after typescript 5.0 upgrade.\nexport type CoreDataError = { message?: string; code?: string };\n"],"mappings":"","ignoreList":[]}
@@ -116,6 +116,57 @@
116
116
  }
117
117
  }
118
118
 
119
+ .fields-create-template-part-modal {
120
+ z-index: 1000001;
121
+ }
122
+
123
+ .fields-create-template-part-modal__area-radio-group {
124
+ width: 100%;
125
+ border: 1px solid #757575;
126
+ border-radius: 2px;
127
+ }
128
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio {
129
+ display: block;
130
+ width: 100%;
131
+ height: 100%;
132
+ text-align: right;
133
+ padding: 12px;
134
+ }
135
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover {
136
+ margin: 0;
137
+ background-color: inherit;
138
+ border-bottom: 1px solid #757575;
139
+ border-radius: 0;
140
+ }
141
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:focus), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:not(:focus), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:not(:focus) {
142
+ box-shadow: none;
143
+ }
144
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:focus, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:focus, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:focus {
145
+ border-bottom: 1px solid #fff;
146
+ }
147
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:last-of-type, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:last-of-type, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:last-of-type {
148
+ border-bottom: none;
149
+ }
150
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:hover), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio[aria-checked=true] {
151
+ color: #1e1e1e;
152
+ cursor: auto;
153
+ }
154
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:hover) .fields-create-template-part-modal__option-label div, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio[aria-checked=true] .fields-create-template-part-modal__option-label div {
155
+ color: #949494;
156
+ }
157
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__option-label {
158
+ padding-top: 4px;
159
+ white-space: normal;
160
+ }
161
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__option-label div {
162
+ padding-top: 4px;
163
+ font-size: 12px;
164
+ }
165
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__checkbox {
166
+ margin-right: auto;
167
+ min-width: 24px;
168
+ }
169
+
119
170
  .fields-controls__slug .fields-controls__slug-external-icon {
120
171
  margin-right: 5ch;
121
172
  }
@@ -208,4 +259,51 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
208
259
  width: 32px;
209
260
  height: 32px;
210
261
  display: block;
262
+ }
263
+
264
+ .fields-controls__template-modal {
265
+ z-index: 1000001;
266
+ }
267
+
268
+ .fields-controls__template-content .block-editor-block-patterns-list {
269
+ column-count: 2;
270
+ column-gap: 24px;
271
+ padding-top: 2px;
272
+ }
273
+ @media (min-width: 782px) {
274
+ .fields-controls__template-content .block-editor-block-patterns-list {
275
+ column-count: 3;
276
+ }
277
+ }
278
+ @media (min-width: 1280px) {
279
+ .fields-controls__template-content .block-editor-block-patterns-list {
280
+ column-count: 4;
281
+ }
282
+ }
283
+ .fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
284
+ break-inside: avoid-column;
285
+ }
286
+
287
+ .fields-field__title span:first-child {
288
+ text-overflow: ellipsis;
289
+ overflow: hidden;
290
+ text-decoration: none;
291
+ white-space: nowrap;
292
+ display: block;
293
+ flex-grow: 0;
294
+ }
295
+
296
+ .fields-field__page-title__badge {
297
+ background: #f0f0f0;
298
+ color: #2f2f2f;
299
+ padding: 0 4px;
300
+ border-radius: 2px;
301
+ font-size: 12px;
302
+ font-weight: 400;
303
+ flex-shrink: 0;
304
+ line-height: 20px;
305
+ }
306
+
307
+ .fields-field__pattern-title span:first-child {
308
+ flex: 1;
211
309
  }
@@ -116,6 +116,57 @@
116
116
  }
117
117
  }
118
118
 
119
+ .fields-create-template-part-modal {
120
+ z-index: 1000001;
121
+ }
122
+
123
+ .fields-create-template-part-modal__area-radio-group {
124
+ width: 100%;
125
+ border: 1px solid #757575;
126
+ border-radius: 2px;
127
+ }
128
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio {
129
+ display: block;
130
+ width: 100%;
131
+ height: 100%;
132
+ text-align: left;
133
+ padding: 12px;
134
+ }
135
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover {
136
+ margin: 0;
137
+ background-color: inherit;
138
+ border-bottom: 1px solid #757575;
139
+ border-radius: 0;
140
+ }
141
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:focus), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:not(:focus), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:not(:focus) {
142
+ box-shadow: none;
143
+ }
144
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:focus, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:focus, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:focus {
145
+ border-bottom: 1px solid #fff;
146
+ }
147
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:last-of-type, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-secondary:hover:last-of-type, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio.is-primary:hover:last-of-type {
148
+ border-bottom: none;
149
+ }
150
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:hover), .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio[aria-checked=true] {
151
+ color: #1e1e1e;
152
+ cursor: auto;
153
+ }
154
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio:not(:hover) .fields-create-template-part-modal__option-label div, .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio[aria-checked=true] .fields-create-template-part-modal__option-label div {
155
+ color: #949494;
156
+ }
157
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__option-label {
158
+ padding-top: 4px;
159
+ white-space: normal;
160
+ }
161
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__option-label div {
162
+ padding-top: 4px;
163
+ font-size: 12px;
164
+ }
165
+ .fields-create-template-part-modal__area-radio-group .components-button.fields-create-template-part-modal__area-radio .fields-create-template-part-modal__checkbox {
166
+ margin-left: auto;
167
+ min-width: 24px;
168
+ }
169
+
119
170
  .fields-controls__slug .fields-controls__slug-external-icon {
120
171
  margin-left: 5ch;
121
172
  }
@@ -208,4 +259,51 @@ fieldset.fields-controls__featured-image .fields-controls__featured-image-remove
208
259
  width: 32px;
209
260
  height: 32px;
210
261
  display: block;
262
+ }
263
+
264
+ .fields-controls__template-modal {
265
+ z-index: 1000001;
266
+ }
267
+
268
+ .fields-controls__template-content .block-editor-block-patterns-list {
269
+ column-count: 2;
270
+ column-gap: 24px;
271
+ padding-top: 2px;
272
+ }
273
+ @media (min-width: 782px) {
274
+ .fields-controls__template-content .block-editor-block-patterns-list {
275
+ column-count: 3;
276
+ }
277
+ }
278
+ @media (min-width: 1280px) {
279
+ .fields-controls__template-content .block-editor-block-patterns-list {
280
+ column-count: 4;
281
+ }
282
+ }
283
+ .fields-controls__template-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
284
+ break-inside: avoid-column;
285
+ }
286
+
287
+ .fields-field__title span:first-child {
288
+ text-overflow: ellipsis;
289
+ overflow: hidden;
290
+ text-decoration: none;
291
+ white-space: nowrap;
292
+ display: block;
293
+ flex-grow: 0;
294
+ }
295
+
296
+ .fields-field__page-title__badge {
297
+ background: #f0f0f0;
298
+ color: #2f2f2f;
299
+ padding: 0 4px;
300
+ border-radius: 2px;
301
+ font-size: 12px;
302
+ font-weight: 400;
303
+ flex-shrink: 0;
304
+ line-height: 20px;
305
+ }
306
+
307
+ .fields-field__pattern-title span:first-child {
308
+ flex: 1;
211
309
  }
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { Pattern, Template, TemplatePart } from '../types';
3
3
  declare const deletePostAction: Action<Template | TemplatePart | Pattern>;
4
+ /**
5
+ * Delete action for Templates, Patterns and Template Parts.
6
+ */
4
7
  export default deletePostAction;
5
8
  //# sourceMappingURL=delete-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/delete-post.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAWnD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAUhE,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAwKhE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/delete-post.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAWnD,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAUhE,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAwKhE,CAAC;AAEF;;GAEG;AACH,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { Pattern } from '../types';
3
3
  declare const duplicatePattern: Action<Pattern>;
4
+ /**
5
+ * Duplicate action for Pattern.
6
+ */
4
7
  export default duplicatePattern;
5
8
  //# sourceMappingURL=duplicate-pattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-pattern.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMxC,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,OAAO,CAmBtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"duplicate-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-pattern.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAMxC,QAAA,MAAM,gBAAgB,EAAE,MAAM,CAAE,OAAO,CAmBtC,CAAC;AAEF;;GAEG;AACH,eAAe,gBAAgB,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { BasePost } from '../types';
3
3
  declare const duplicatePost: Action<BasePost>;
4
+ /**
5
+ * Duplicate action for BasePost.
6
+ */
4
7
  export default duplicatePost;
5
8
  //# sourceMappingURL=duplicate-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duplicate-post.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAQxD,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,QAAQ,CA8IpC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"duplicate-post.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAE,QAAQ,EAAiB,MAAM,UAAU,CAAC;AAQxD,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,QAAQ,CA8IpC,CAAC;AAEF;;GAEG;AACH,eAAe,aAAa,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { Action } from '@wordpress/dataviews';
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { TemplatePart } from '../types';
6
+ /**
7
+ * This action is used to duplicate a template part.
8
+ */
9
+ declare const duplicateTemplatePart: Action<TemplatePart>;
10
+ /**
11
+ * Duplicate action for TemplatePart.
12
+ */
13
+ export default duplicateTemplatePart;
14
+ //# sourceMappingURL=duplicate-template-part.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"duplicate-template-part.d.ts","sourceRoot":"","sources":["../../src/actions/duplicate-template-part.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAQ,YAAY,EAAE,MAAM,UAAU,CAAC;AAInD;;GAEG;AACH,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,YAAY,CAgDhD,CAAC;AACF;;GAEG;AACH,eAAe,qBAAqB,CAAC"}
@@ -4,5 +4,8 @@ import type { Action } from '@wordpress/dataviews';
4
4
  */
5
5
  import type { Pattern } from '../types';
6
6
  declare const exportPattern: Action<Pattern>;
7
+ /**
8
+ * Export action as JSON for Pattern.
9
+ */
7
10
  export default exportPattern;
8
11
  //# sourceMappingURL=export-pattern.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/export-pattern.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAmBxC,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,OAAO,CAqCnC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"export-pattern.d.ts","sourceRoot":"","sources":["../../src/actions/export-pattern.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAmBxC,QAAA,MAAM,aAAa,EAAE,MAAM,CAAE,OAAO,CAqCnC,CAAC;AAEF;;GAEG;AACH,eAAe,aAAa,CAAC"}
@@ -1,16 +1,14 @@
1
1
  export { default as viewPost } from './view-post';
2
2
  export { default as reorderPage } from './reorder-page';
3
- export { default as reorderPageNative } from './reorder-page.native';
4
3
  export { default as duplicatePost } from './duplicate-post';
5
- export { default as duplicatePostNative } from './duplicate-post.native';
6
4
  export { default as renamePost } from './rename-post';
7
5
  export { default as resetPost } from './reset-post';
8
6
  export { default as duplicatePattern } from './duplicate-pattern';
9
7
  export { default as exportPattern } from './export-pattern';
10
- export { default as exportPatternNative } from './export-pattern.native';
11
8
  export { default as viewPostRevisions } from './view-post-revisions';
12
9
  export { default as permanentlyDeletePost } from './permanently-delete-post';
13
10
  export { default as restorePost } from './restore-post';
14
11
  export { default as trashPost } from './trash-post';
15
12
  export { default as deletePost } from './delete-post';
13
+ export { default as duplicateTemplatePart } from './duplicate-template-part';
16
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { PostWithPermissions } from '../types';
3
3
  declare const permanentlyDeletePost: Action<PostWithPermissions>;
4
+ /**
5
+ * Delete action for PostWithPermissions.
6
+ */
4
7
  export default permanentlyDeletePost;
5
8
  //# sourceMappingURL=permanently-delete-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permanently-delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/permanently-delete-post.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,mBAAmB,CAoGvD,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"permanently-delete-post.d.ts","sourceRoot":"","sources":["../../src/actions/permanently-delete-post.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAOnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,qBAAqB,EAAE,MAAM,CAAE,mBAAmB,CAoGvD,CAAC;AAEF;;GAEG;AACH,eAAe,qBAAqB,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { PostWithPermissions } from '../types';
3
3
  declare const renamePost: Action<PostWithPermissions>;
4
+ /**
5
+ * Rename action for PostWithPermissions.
6
+ */
4
7
  export default renamePost;
5
8
  //# sourceMappingURL=rename-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../src/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAiBnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAyG5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"rename-post.d.ts","sourceRoot":"","sources":["../../src/actions/rename-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAcnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnE,QAAA,MAAM,UAAU,EAAE,MAAM,CAAE,mBAAmB,CAyG5C,CAAC;AAEF;;GAEG;AACH,eAAe,UAAU,CAAC"}
@@ -4,5 +4,8 @@ import type { Action } from '@wordpress/dataviews';
4
4
  */
5
5
  import type { BasePost } from '../types';
6
6
  declare const reorderPage: Action<BasePost>;
7
+ /**
8
+ * Reorder action for BasePost.
9
+ */
7
10
  export default reorderPage;
8
11
  //# sourceMappingURL=reorder-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reorder-page.d.ts","sourceRoot":"","sources":["../../src/actions/reorder-page.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgGxD,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,QAAQ,CAOlC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"reorder-page.d.ts","sourceRoot":"","sources":["../../src/actions/reorder-page.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAoB,MAAM,sBAAsB,CAAC;AAErE;;GAEG;AACH,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAgGxD,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,QAAQ,CAOlC,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { Template, TemplatePart } from '../types';
3
3
  declare const resetPostAction: Action<Template | TemplatePart>;
4
+ /**
5
+ * Reset action for Template and TemplatePart.
6
+ */
4
7
  export default resetPostAction;
5
8
  //# sourceMappingURL=reset-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reset-post.d.ts","sourceRoot":"","sources":["../../src/actions/reset-post.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAanD,OAAO,KAAK,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAwJtE,QAAA,MAAM,eAAe,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,CAmHrD,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"reset-post.d.ts","sourceRoot":"","sources":["../../src/actions/reset-post.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQnD,OAAO,KAAK,EAAiB,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAwJtE,QAAA,MAAM,eAAe,EAAE,MAAM,CAAE,QAAQ,GAAG,YAAY,CAmHrD,CAAC;AAEF;;GAEG;AACH,eAAe,eAAe,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { PostWithPermissions } from '../types';
3
3
  declare const restorePost: Action<PostWithPermissions>;
4
+ /**
5
+ * Restore action for PostWithPermissions.
6
+ */
4
7
  export default restorePost;
5
8
  //# sourceMappingURL=restore-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"restore-post.d.ts","sourceRoot":"","sources":["../../src/actions/restore-post.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,mBAAmB,CAoH7C,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"restore-post.d.ts","sourceRoot":"","sources":["../../src/actions/restore-post.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,WAAW,EAAE,MAAM,CAAE,mBAAmB,CAoH7C,CAAC;AAEF;;GAEG;AACH,eAAe,WAAW,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import type { Action } from '@wordpress/dataviews';
2
2
  import type { PostWithPermissions } from '../types';
3
3
  declare const trashPost: Action<PostWithPermissions>;
4
+ /**
5
+ * Trash action for PostWithPermissions.
6
+ */
4
7
  export default trashPost;
5
8
  //# sourceMappingURL=trash-post.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trash-post.d.ts","sourceRoot":"","sources":["../../src/actions/trash-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,mBAAmB,CA4K3C,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"trash-post.d.ts","sourceRoot":"","sources":["../../src/actions/trash-post.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMnD,OAAO,KAAK,EAAiB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEnE,QAAA,MAAM,SAAS,EAAE,MAAM,CAAE,mBAAmB,CA4K3C,CAAC;AAEF;;GAEG;AACH,eAAe,SAAS,CAAC"}