@wordpress/block-library 9.48.1 → 10.0.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 (638) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/audio/edit.cjs +8 -1
  3. package/build/audio/edit.cjs.map +2 -2
  4. package/build/breadcrumbs/edit.cjs +1 -2
  5. package/build/breadcrumbs/edit.cjs.map +2 -2
  6. package/build/button/edit.cjs +1 -2
  7. package/build/button/edit.cjs.map +2 -2
  8. package/build/categories/edit.cjs +1 -1
  9. package/build/categories/edit.cjs.map +1 -1
  10. package/build/code/edit.cjs +1 -1
  11. package/build/code/edit.cjs.map +2 -2
  12. package/build/code/index.cjs +1 -1
  13. package/build/code/index.cjs.map +1 -1
  14. package/build/columns/utils.cjs.map +1 -1
  15. package/build/comments/edit/comments-legacy.cjs +1 -1
  16. package/build/comments/edit/comments-legacy.cjs.map +1 -1
  17. package/build/comments/edit/placeholder.cjs +4 -4
  18. package/build/comments/edit/placeholder.cjs.map +1 -1
  19. package/build/comments-pagination-next/edit.cjs +2 -2
  20. package/build/comments-pagination-next/edit.cjs.map +1 -1
  21. package/build/comments-pagination-previous/edit.cjs +2 -2
  22. package/build/comments-pagination-previous/edit.cjs.map +1 -1
  23. package/build/cover/deprecated.cjs +3 -3
  24. package/build/cover/deprecated.cjs.map +2 -2
  25. package/build/cover/edit/block-controls.cjs +13 -0
  26. package/build/cover/edit/block-controls.cjs.map +2 -2
  27. package/build/cover/edit/embed-video-url-input.cjs +0 -1
  28. package/build/cover/edit/embed-video-url-input.cjs.map +2 -2
  29. package/build/cover/edit/index.cjs +61 -2
  30. package/build/cover/edit/index.cjs.map +3 -3
  31. package/build/cover/edit/inspector-controls.cjs +93 -35
  32. package/build/cover/edit/inspector-controls.cjs.map +2 -2
  33. package/build/details/edit.cjs +1 -2
  34. package/build/details/edit.cjs.map +2 -2
  35. package/build/embed/embed-placeholder.cjs +1 -1
  36. package/build/embed/embed-placeholder.cjs.map +2 -2
  37. package/build/file/edit.cjs +3 -11
  38. package/build/file/edit.cjs.map +2 -2
  39. package/build/file/index.cjs +3 -1
  40. package/build/file/index.cjs.map +3 -3
  41. package/build/file/transforms.cjs +11 -32
  42. package/build/file/transforms.cjs.map +2 -2
  43. package/build/{freeform/convert-to-blocks-button.cjs → file/variations.cjs} +16 -18
  44. package/build/file/variations.cjs.map +7 -0
  45. package/build/footnotes/edit.cjs +1 -1
  46. package/build/footnotes/edit.cjs.map +2 -2
  47. package/build/form/edit.cjs +0 -2
  48. package/build/form/edit.cjs.map +2 -2
  49. package/build/form-input/edit.cjs +1 -3
  50. package/build/form-input/edit.cjs.map +2 -2
  51. package/build/freeform/edit.cjs +6 -15
  52. package/build/freeform/edit.cjs.map +3 -3
  53. package/build/freeform/migration-notice.cjs.map +2 -2
  54. package/build/gallery/edit.cjs +2 -2
  55. package/build/gallery/edit.cjs.map +2 -2
  56. package/build/home-link/edit.cjs +1 -2
  57. package/build/home-link/edit.cjs.map +2 -2
  58. package/build/html/index.cjs +1 -1
  59. package/build/html/index.cjs.map +2 -2
  60. package/build/html/modal.cjs +9 -6
  61. package/build/html/modal.cjs.map +2 -2
  62. package/build/icon/block.json +12 -0
  63. package/build/icon/edit.cjs +90 -41
  64. package/build/icon/edit.cjs.map +3 -3
  65. package/build/icon/index.cjs +3 -1
  66. package/build/icon/index.cjs.map +3 -3
  67. package/build/{tab/save.cjs → icon/variations.cjs} +14 -15
  68. package/build/icon/variations.cjs.map +7 -0
  69. package/build/image/block.json +1 -0
  70. package/build/image/edit.cjs +4 -3
  71. package/build/image/edit.cjs.map +2 -2
  72. package/build/image/image.cjs +91 -29
  73. package/build/image/image.cjs.map +2 -2
  74. package/build/image/index.cjs +1 -1
  75. package/build/image/index.cjs.map +2 -2
  76. package/build/image/transforms.cjs +9 -3
  77. package/build/image/transforms.cjs.map +2 -2
  78. package/build/image/use-open-image-media-editor-modal.cjs +5 -25
  79. package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
  80. package/build/index.cjs +1 -3
  81. package/build/index.cjs.map +2 -2
  82. package/build/latest-posts/edit.cjs +1 -1
  83. package/build/latest-posts/edit.cjs.map +1 -1
  84. package/build/list/ordered-list-settings.cjs +0 -1
  85. package/build/list/ordered-list-settings.cjs.map +2 -2
  86. package/build/math/edit.cjs +1 -1
  87. package/build/math/index.cjs +1 -1
  88. package/build/math/index.cjs.map +1 -1
  89. package/build/media-text/constants.cjs +1 -1
  90. package/build/media-text/constants.cjs.map +2 -2
  91. package/build/media-text/index.cjs +1 -1
  92. package/build/media-text/index.cjs.map +2 -2
  93. package/build/missing/edit.cjs +2 -2
  94. package/build/missing/edit.cjs.map +1 -1
  95. package/build/navigation/edit/index.cjs +19 -13
  96. package/build/navigation/edit/index.cjs.map +2 -2
  97. package/build/navigation/edit/navigation-menu-name-control.cjs +0 -1
  98. package/build/navigation/edit/navigation-menu-name-control.cjs.map +2 -2
  99. package/build/navigation/edit/navigation-menu-selector.cjs +1 -1
  100. package/build/navigation/edit/navigation-menu-selector.cjs.map +2 -2
  101. package/build/navigation/edit/placeholder/index.cjs +1 -1
  102. package/build/navigation/edit/placeholder/index.cjs.map +2 -2
  103. package/build/navigation-link/block.json +1 -1
  104. package/build/navigation-link/edit.cjs +1 -1
  105. package/build/navigation-link/edit.cjs.map +2 -2
  106. package/build/navigation-link/link-ui/page-creator.cjs +0 -1
  107. package/build/navigation-link/link-ui/page-creator.cjs.map +2 -2
  108. package/build/navigation-link/shared/controls.cjs +0 -2
  109. package/build/navigation-link/shared/controls.cjs.map +2 -2
  110. package/build/navigation-submenu/block.json +7 -0
  111. package/build/navigation-submenu/edit.cjs +1 -1
  112. package/build/navigation-submenu/edit.cjs.map +2 -2
  113. package/build/page-list/block.json +2 -5
  114. package/build/page-list/edit.cjs +1 -11
  115. package/build/page-list/edit.cjs.map +2 -2
  116. package/build/playlist-track/edit.cjs +0 -3
  117. package/build/playlist-track/edit.cjs.map +2 -2
  118. package/build/post-author/edit.cjs +1 -1
  119. package/build/post-author/edit.cjs.map +2 -2
  120. package/build/post-author/utils.cjs +1 -1
  121. package/build/post-author/utils.cjs.map +2 -2
  122. package/build/post-comment/edit.cjs +0 -1
  123. package/build/post-comment/edit.cjs.map +2 -2
  124. package/build/post-date/edit.cjs +2 -2
  125. package/build/post-date/edit.cjs.map +2 -2
  126. package/build/post-excerpt/edit.cjs +2 -2
  127. package/build/post-excerpt/edit.cjs.map +2 -2
  128. package/build/post-featured-image/block.json +1 -0
  129. package/build/post-featured-image/dimension-controls.cjs +90 -178
  130. package/build/post-featured-image/dimension-controls.cjs.map +3 -3
  131. package/build/post-featured-image/edit.cjs +47 -18
  132. package/build/post-featured-image/edit.cjs.map +2 -2
  133. package/build/post-navigation-link/edit.cjs +2 -2
  134. package/build/post-navigation-link/edit.cjs.map +2 -2
  135. package/build/post-terms/edit.cjs +0 -1
  136. package/build/post-terms/edit.cjs.map +2 -2
  137. package/build/post-time-to-read/edit.cjs +1 -1
  138. package/build/post-time-to-read/edit.cjs.map +1 -1
  139. package/build/post-title/edit.cjs +0 -1
  140. package/build/post-title/edit.cjs.map +2 -2
  141. package/build/preformatted/edit.cjs +1 -1
  142. package/build/preformatted/edit.cjs.map +2 -2
  143. package/build/pullquote/block.json +1 -3
  144. package/build/pullquote/deprecated.cjs +114 -9
  145. package/build/pullquote/deprecated.cjs.map +3 -3
  146. package/build/pullquote/edit.cjs +43 -61
  147. package/build/pullquote/edit.cjs.map +3 -3
  148. package/build/pullquote/save.cjs +5 -26
  149. package/build/pullquote/save.cjs.map +3 -3
  150. package/build/query/edit/enhanced-pagination-modal.cjs +10 -1
  151. package/build/query/edit/enhanced-pagination-modal.cjs.map +3 -3
  152. package/build/query/edit/inspector-controls/enhanced-pagination-control.cjs +1 -1
  153. package/build/query/edit/inspector-controls/enhanced-pagination-control.cjs.map +1 -1
  154. package/build/query/edit/inspector-controls/index.cjs +0 -1
  155. package/build/query/edit/inspector-controls/index.cjs.map +2 -2
  156. package/build/query/edit/inspector-controls/order-control.cjs +2 -2
  157. package/build/query/edit/inspector-controls/order-control.cjs.map +2 -2
  158. package/build/query/utils.cjs +2 -2
  159. package/build/query/utils.cjs.map +2 -2
  160. package/build/query-pagination-next/edit.cjs +2 -2
  161. package/build/query-pagination-next/edit.cjs.map +1 -1
  162. package/build/query-pagination-previous/edit.cjs +2 -2
  163. package/build/query-pagination-previous/edit.cjs.map +1 -1
  164. package/build/query-title/edit.cjs +1 -1
  165. package/build/query-title/edit.cjs.map +2 -2
  166. package/build/query-total/edit.cjs +1 -1
  167. package/build/query-total/edit.cjs.map +2 -2
  168. package/build/quote/index.cjs +1 -1
  169. package/build/quote/index.cjs.map +2 -2
  170. package/build/read-more/edit.cjs +1 -1
  171. package/build/read-more/edit.cjs.map +2 -2
  172. package/build/rss/edit.cjs +1 -2
  173. package/build/rss/edit.cjs.map +2 -2
  174. package/build/search/block.json +4 -0
  175. package/build/search/edit.cjs +244 -206
  176. package/build/search/edit.cjs.map +2 -2
  177. package/build/shortcode/edit.cjs +1 -1
  178. package/build/shortcode/edit.cjs.map +2 -2
  179. package/build/site-logo/edit.cjs +2 -1
  180. package/build/site-logo/edit.cjs.map +2 -2
  181. package/build/site-tagline/edit.cjs +1 -1
  182. package/build/site-tagline/edit.cjs.map +2 -2
  183. package/build/site-title/edit.cjs +1 -1
  184. package/build/site-title/edit.cjs.map +2 -2
  185. package/build/social-link/edit.cjs +0 -3
  186. package/build/social-link/edit.cjs.map +2 -2
  187. package/build/tab-list/block.json +33 -20
  188. package/build/tab-list/edit.cjs +122 -12
  189. package/build/tab-list/edit.cjs.map +3 -3
  190. package/build/tab-list/init.cjs +28 -0
  191. package/build/tab-list/init.cjs.map +7 -0
  192. package/build/tab-list/save.cjs +33 -3
  193. package/build/tab-list/save.cjs.map +3 -3
  194. package/build/tab-panel/add-tab-toolbar-control.cjs +19 -8
  195. package/build/tab-panel/add-tab-toolbar-control.cjs.map +2 -2
  196. package/build/tab-panel/block.json +2 -6
  197. package/build/tab-panel/edit.cjs +0 -9
  198. package/build/tab-panel/edit.cjs.map +2 -2
  199. package/build/tab-panel/remove-tab-toolbar-control.cjs +9 -14
  200. package/build/tab-panel/remove-tab-toolbar-control.cjs.map +2 -2
  201. package/build/tab-panel/save.cjs +2 -1
  202. package/build/tab-panel/save.cjs.map +2 -2
  203. package/build/tab-panels/block.json +2 -28
  204. package/build/tab-panels/init.cjs +28 -0
  205. package/build/tab-panels/init.cjs.map +7 -0
  206. package/build/table/edit.cjs +0 -2
  207. package/build/table/edit.cjs.map +2 -2
  208. package/build/table/index.cjs +1 -1
  209. package/build/table/index.cjs.map +2 -2
  210. package/build/tabs/block.json +3 -17
  211. package/build/tabs/edit.cjs +7 -21
  212. package/build/tabs/edit.cjs.map +3 -3
  213. package/build/tabs/index.cjs +6 -10
  214. package/build/tabs/index.cjs.map +2 -2
  215. package/build/tabs/use-tab-list-items-sync.cjs +53 -0
  216. package/build/tabs/use-tab-list-items-sync.cjs.map +7 -0
  217. package/build/tabs/view.cjs +22 -104
  218. package/build/tabs/view.cjs.map +2 -2
  219. package/build/template-part/edit/advanced-controls.cjs +0 -1
  220. package/build/template-part/edit/advanced-controls.cjs.map +2 -2
  221. package/build/template-part/edit/title-modal.cjs +1 -2
  222. package/build/template-part/edit/title-modal.cjs.map +2 -2
  223. package/build/terms-query/edit/inspector-controls/order-control.cjs +2 -2
  224. package/build/terms-query/edit/inspector-controls/order-control.cjs.map +2 -2
  225. package/build/utils/style-state.cjs +164 -0
  226. package/build/utils/style-state.cjs.map +7 -0
  227. package/build/utils/waveform-player.cjs +1 -1
  228. package/build/verse/edit.cjs +1 -1
  229. package/build/verse/edit.cjs.map +2 -2
  230. package/build/video/edit.cjs +3 -2
  231. package/build/video/edit.cjs.map +2 -2
  232. package/build/video/tracks-editor.cjs +0 -2
  233. package/build/video/tracks-editor.cjs.map +2 -2
  234. package/build-module/audio/edit.mjs +8 -2
  235. package/build-module/audio/edit.mjs.map +2 -2
  236. package/build-module/breadcrumbs/edit.mjs +1 -2
  237. package/build-module/breadcrumbs/edit.mjs.map +2 -2
  238. package/build-module/button/edit.mjs +1 -2
  239. package/build-module/button/edit.mjs.map +2 -2
  240. package/build-module/categories/edit.mjs +1 -1
  241. package/build-module/categories/edit.mjs.map +1 -1
  242. package/build-module/code/edit.mjs +1 -1
  243. package/build-module/code/edit.mjs.map +2 -2
  244. package/build-module/code/index.mjs +1 -1
  245. package/build-module/code/index.mjs.map +1 -1
  246. package/build-module/columns/utils.mjs.map +1 -1
  247. package/build-module/comments/edit/comments-legacy.mjs +1 -1
  248. package/build-module/comments/edit/comments-legacy.mjs.map +1 -1
  249. package/build-module/comments/edit/placeholder.mjs +4 -4
  250. package/build-module/comments/edit/placeholder.mjs.map +1 -1
  251. package/build-module/comments-pagination-next/edit.mjs +2 -2
  252. package/build-module/comments-pagination-next/edit.mjs.map +1 -1
  253. package/build-module/comments-pagination-previous/edit.mjs +2 -2
  254. package/build-module/comments-pagination-previous/edit.mjs.map +1 -1
  255. package/build-module/cover/deprecated.mjs +3 -3
  256. package/build-module/cover/deprecated.mjs.map +2 -2
  257. package/build-module/cover/edit/block-controls.mjs +15 -2
  258. package/build-module/cover/edit/block-controls.mjs.map +2 -2
  259. package/build-module/cover/edit/embed-video-url-input.mjs +0 -1
  260. package/build-module/cover/edit/embed-video-url-input.mjs.map +2 -2
  261. package/build-module/cover/edit/index.mjs +64 -3
  262. package/build-module/cover/edit/index.mjs.map +2 -2
  263. package/build-module/cover/edit/inspector-controls.mjs +98 -35
  264. package/build-module/cover/edit/inspector-controls.mjs.map +2 -2
  265. package/build-module/details/edit.mjs +1 -2
  266. package/build-module/details/edit.mjs.map +2 -2
  267. package/build-module/embed/embed-placeholder.mjs +1 -1
  268. package/build-module/embed/embed-placeholder.mjs.map +2 -2
  269. package/build-module/file/edit.mjs +5 -13
  270. package/build-module/file/edit.mjs.map +2 -2
  271. package/build-module/file/index.mjs +3 -1
  272. package/build-module/file/index.mjs.map +2 -2
  273. package/build-module/file/transforms.mjs +11 -32
  274. package/build-module/file/transforms.mjs.map +2 -2
  275. package/build-module/file/variations.mjs +17 -0
  276. package/build-module/file/variations.mjs.map +7 -0
  277. package/build-module/footnotes/edit.mjs +1 -1
  278. package/build-module/footnotes/edit.mjs.map +2 -2
  279. package/build-module/form/edit.mjs +0 -2
  280. package/build-module/form/edit.mjs.map +2 -2
  281. package/build-module/form-input/edit.mjs +1 -3
  282. package/build-module/form-input/edit.mjs.map +2 -2
  283. package/build-module/freeform/edit.mjs +6 -15
  284. package/build-module/freeform/edit.mjs.map +2 -2
  285. package/build-module/freeform/migration-notice.mjs.map +2 -2
  286. package/build-module/gallery/edit.mjs +2 -2
  287. package/build-module/gallery/edit.mjs.map +2 -2
  288. package/build-module/home-link/edit.mjs +1 -2
  289. package/build-module/home-link/edit.mjs.map +2 -2
  290. package/build-module/html/index.mjs +1 -1
  291. package/build-module/html/index.mjs.map +2 -2
  292. package/build-module/html/modal.mjs +9 -6
  293. package/build-module/html/modal.mjs.map +2 -2
  294. package/build-module/icon/block.json +12 -0
  295. package/build-module/icon/edit.mjs +94 -42
  296. package/build-module/icon/edit.mjs.map +2 -2
  297. package/build-module/icon/index.mjs +3 -1
  298. package/build-module/icon/index.mjs.map +2 -2
  299. package/build-module/icon/variations.mjs +13 -0
  300. package/build-module/icon/variations.mjs.map +7 -0
  301. package/build-module/image/block.json +1 -0
  302. package/build-module/image/edit.mjs +4 -3
  303. package/build-module/image/edit.mjs.map +2 -2
  304. package/build-module/image/image.mjs +96 -29
  305. package/build-module/image/image.mjs.map +2 -2
  306. package/build-module/image/index.mjs +1 -1
  307. package/build-module/image/index.mjs.map +2 -2
  308. package/build-module/image/transforms.mjs +9 -3
  309. package/build-module/image/transforms.mjs.map +2 -2
  310. package/build-module/image/use-open-image-media-editor-modal.mjs +5 -25
  311. package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
  312. package/build-module/index.mjs +1 -3
  313. package/build-module/index.mjs.map +2 -2
  314. package/build-module/latest-posts/edit.mjs +1 -1
  315. package/build-module/latest-posts/edit.mjs.map +1 -1
  316. package/build-module/list/ordered-list-settings.mjs +0 -1
  317. package/build-module/list/ordered-list-settings.mjs.map +2 -2
  318. package/build-module/math/edit.mjs +1 -1
  319. package/build-module/math/index.mjs +1 -1
  320. package/build-module/math/index.mjs.map +1 -1
  321. package/build-module/media-text/constants.mjs +1 -1
  322. package/build-module/media-text/constants.mjs.map +2 -2
  323. package/build-module/media-text/index.mjs +1 -1
  324. package/build-module/media-text/index.mjs.map +2 -2
  325. package/build-module/missing/edit.mjs +2 -2
  326. package/build-module/missing/edit.mjs.map +1 -1
  327. package/build-module/navigation/edit/index.mjs +19 -13
  328. package/build-module/navigation/edit/index.mjs.map +2 -2
  329. package/build-module/navigation/edit/navigation-menu-name-control.mjs +0 -1
  330. package/build-module/navigation/edit/navigation-menu-name-control.mjs.map +2 -2
  331. package/build-module/navigation/edit/navigation-menu-selector.mjs +1 -1
  332. package/build-module/navigation/edit/navigation-menu-selector.mjs.map +2 -2
  333. package/build-module/navigation/edit/placeholder/index.mjs +1 -1
  334. package/build-module/navigation/edit/placeholder/index.mjs.map +2 -2
  335. package/build-module/navigation-link/block.json +1 -1
  336. package/build-module/navigation-link/edit.mjs +1 -1
  337. package/build-module/navigation-link/edit.mjs.map +2 -2
  338. package/build-module/navigation-link/link-ui/page-creator.mjs +0 -1
  339. package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
  340. package/build-module/navigation-link/shared/controls.mjs +0 -2
  341. package/build-module/navigation-link/shared/controls.mjs.map +2 -2
  342. package/build-module/navigation-submenu/block.json +7 -0
  343. package/build-module/navigation-submenu/edit.mjs +1 -1
  344. package/build-module/navigation-submenu/edit.mjs.map +2 -2
  345. package/build-module/page-list/block.json +2 -5
  346. package/build-module/page-list/edit.mjs +1 -11
  347. package/build-module/page-list/edit.mjs.map +2 -2
  348. package/build-module/playlist-track/edit.mjs +0 -3
  349. package/build-module/playlist-track/edit.mjs.map +2 -2
  350. package/build-module/post-author/edit.mjs +1 -1
  351. package/build-module/post-author/edit.mjs.map +2 -2
  352. package/build-module/post-author/utils.mjs +1 -1
  353. package/build-module/post-author/utils.mjs.map +2 -2
  354. package/build-module/post-comment/edit.mjs +0 -1
  355. package/build-module/post-comment/edit.mjs.map +2 -2
  356. package/build-module/post-date/edit.mjs +2 -2
  357. package/build-module/post-date/edit.mjs.map +2 -2
  358. package/build-module/post-excerpt/edit.mjs +2 -2
  359. package/build-module/post-excerpt/edit.mjs.map +2 -2
  360. package/build-module/post-featured-image/block.json +1 -0
  361. package/build-module/post-featured-image/dimension-controls.mjs +99 -187
  362. package/build-module/post-featured-image/dimension-controls.mjs.map +2 -2
  363. package/build-module/post-featured-image/edit.mjs +47 -18
  364. package/build-module/post-featured-image/edit.mjs.map +2 -2
  365. package/build-module/post-navigation-link/edit.mjs +2 -2
  366. package/build-module/post-navigation-link/edit.mjs.map +2 -2
  367. package/build-module/post-terms/edit.mjs +0 -1
  368. package/build-module/post-terms/edit.mjs.map +2 -2
  369. package/build-module/post-time-to-read/edit.mjs +1 -1
  370. package/build-module/post-time-to-read/edit.mjs.map +1 -1
  371. package/build-module/post-title/edit.mjs +0 -1
  372. package/build-module/post-title/edit.mjs.map +2 -2
  373. package/build-module/preformatted/edit.mjs +1 -1
  374. package/build-module/preformatted/edit.mjs.map +2 -2
  375. package/build-module/pullquote/block.json +1 -3
  376. package/build-module/pullquote/deprecated.mjs +114 -9
  377. package/build-module/pullquote/deprecated.mjs.map +2 -2
  378. package/build-module/pullquote/edit.mjs +44 -67
  379. package/build-module/pullquote/edit.mjs.map +2 -2
  380. package/build-module/pullquote/save.mjs +5 -16
  381. package/build-module/pullquote/save.mjs.map +2 -2
  382. package/build-module/query/edit/enhanced-pagination-modal.mjs +10 -1
  383. package/build-module/query/edit/enhanced-pagination-modal.mjs.map +2 -2
  384. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs +1 -1
  385. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.mjs.map +1 -1
  386. package/build-module/query/edit/inspector-controls/index.mjs +0 -1
  387. package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
  388. package/build-module/query/edit/inspector-controls/order-control.mjs +2 -2
  389. package/build-module/query/edit/inspector-controls/order-control.mjs.map +2 -2
  390. package/build-module/query/utils.mjs +2 -2
  391. package/build-module/query/utils.mjs.map +2 -2
  392. package/build-module/query-pagination-next/edit.mjs +2 -2
  393. package/build-module/query-pagination-next/edit.mjs.map +1 -1
  394. package/build-module/query-pagination-previous/edit.mjs +2 -2
  395. package/build-module/query-pagination-previous/edit.mjs.map +1 -1
  396. package/build-module/query-title/edit.mjs +1 -1
  397. package/build-module/query-title/edit.mjs.map +2 -2
  398. package/build-module/query-total/edit.mjs +1 -1
  399. package/build-module/query-total/edit.mjs.map +2 -2
  400. package/build-module/quote/index.mjs +1 -1
  401. package/build-module/quote/index.mjs.map +2 -2
  402. package/build-module/read-more/edit.mjs +1 -1
  403. package/build-module/read-more/edit.mjs.map +2 -2
  404. package/build-module/rss/edit.mjs +1 -2
  405. package/build-module/rss/edit.mjs.map +2 -2
  406. package/build-module/search/block.json +4 -0
  407. package/build-module/search/edit.mjs +244 -206
  408. package/build-module/search/edit.mjs.map +2 -2
  409. package/build-module/shortcode/edit.mjs +1 -1
  410. package/build-module/shortcode/edit.mjs.map +2 -2
  411. package/build-module/site-logo/edit.mjs +2 -1
  412. package/build-module/site-logo/edit.mjs.map +2 -2
  413. package/build-module/site-tagline/edit.mjs +1 -1
  414. package/build-module/site-tagline/edit.mjs.map +2 -2
  415. package/build-module/site-title/edit.mjs +1 -1
  416. package/build-module/site-title/edit.mjs.map +2 -2
  417. package/build-module/social-link/edit.mjs +0 -3
  418. package/build-module/social-link/edit.mjs.map +2 -2
  419. package/build-module/tab-list/block.json +33 -20
  420. package/build-module/tab-list/edit.mjs +128 -15
  421. package/build-module/tab-list/edit.mjs.map +2 -2
  422. package/build-module/tab-list/init.mjs +7 -0
  423. package/build-module/tab-list/init.mjs.map +7 -0
  424. package/build-module/tab-list/save.mjs +29 -4
  425. package/build-module/tab-list/save.mjs.map +2 -2
  426. package/build-module/tab-panel/add-tab-toolbar-control.mjs +19 -8
  427. package/build-module/tab-panel/add-tab-toolbar-control.mjs.map +2 -2
  428. package/build-module/tab-panel/block.json +2 -6
  429. package/build-module/tab-panel/edit.mjs +1 -10
  430. package/build-module/tab-panel/edit.mjs.map +2 -2
  431. package/build-module/tab-panel/remove-tab-toolbar-control.mjs +9 -14
  432. package/build-module/tab-panel/remove-tab-toolbar-control.mjs.map +2 -2
  433. package/build-module/tab-panel/save.mjs +2 -1
  434. package/build-module/tab-panel/save.mjs.map +2 -2
  435. package/build-module/tab-panels/block.json +2 -28
  436. package/build-module/tab-panels/init.mjs +7 -0
  437. package/build-module/tab-panels/init.mjs.map +7 -0
  438. package/build-module/table/edit.mjs +0 -2
  439. package/build-module/table/edit.mjs.map +2 -2
  440. package/build-module/table/index.mjs +1 -1
  441. package/build-module/table/index.mjs.map +2 -2
  442. package/build-module/tabs/block.json +3 -17
  443. package/build-module/tabs/edit.mjs +7 -21
  444. package/build-module/tabs/edit.mjs.map +2 -2
  445. package/build-module/tabs/index.mjs +6 -10
  446. package/build-module/tabs/index.mjs.map +2 -2
  447. package/build-module/tabs/use-tab-list-items-sync.mjs +32 -0
  448. package/build-module/tabs/use-tab-list-items-sync.mjs.map +7 -0
  449. package/build-module/tabs/view.mjs +22 -104
  450. package/build-module/tabs/view.mjs.map +2 -2
  451. package/build-module/template-part/edit/advanced-controls.mjs +0 -1
  452. package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
  453. package/build-module/template-part/edit/title-modal.mjs +1 -2
  454. package/build-module/template-part/edit/title-modal.mjs.map +2 -2
  455. package/build-module/terms-query/edit/inspector-controls/order-control.mjs +2 -2
  456. package/build-module/terms-query/edit/inspector-controls/order-control.mjs.map +2 -2
  457. package/build-module/utils/style-state.mjs +132 -0
  458. package/build-module/utils/style-state.mjs.map +7 -0
  459. package/build-module/utils/waveform-player.mjs +1 -1
  460. package/build-module/verse/edit.mjs +1 -1
  461. package/build-module/verse/edit.mjs.map +2 -2
  462. package/build-module/video/edit.mjs +3 -3
  463. package/build-module/video/edit.mjs.map +2 -2
  464. package/build-module/video/tracks-editor.mjs +0 -2
  465. package/build-module/video/tracks-editor.mjs.map +2 -2
  466. package/build-style/editor-rtl.css +0 -19
  467. package/build-style/editor.css +0 -19
  468. package/build-style/icon/style-rtl.css +9 -0
  469. package/build-style/icon/style.css +9 -0
  470. package/build-style/style-rtl.css +11 -24
  471. package/build-style/style.css +11 -24
  472. package/build-style/{tab → tab-list}/style-rtl.css +2 -2
  473. package/build-style/{tab → tab-list}/style.css +2 -2
  474. package/build-style/tab-panel/style-rtl.css +0 -17
  475. package/build-style/tab-panel/style.css +0 -17
  476. package/package.json +48 -45
  477. package/src/audio/edit.js +5 -9
  478. package/src/avatar/index.php +2 -2
  479. package/src/block/index.php +2 -26
  480. package/src/breadcrumbs/edit.js +0 -1
  481. package/src/button/edit.js +0 -1
  482. package/src/comment-author-avatar/index.php +3 -3
  483. package/src/comment-author-name/index.php +1 -1
  484. package/src/comment-date/index.php +1 -1
  485. package/src/cover/edit/block-controls.js +14 -2
  486. package/src/cover/edit/embed-video-url-input.js +0 -1
  487. package/src/cover/edit/index.js +86 -0
  488. package/src/cover/edit/inspector-controls.js +124 -54
  489. package/src/cover/test/edit.js +51 -2
  490. package/src/details/edit.js +0 -1
  491. package/src/editor.scss +0 -2
  492. package/src/file/edit.js +3 -16
  493. package/src/file/index.js +2 -0
  494. package/src/file/transforms.js +12 -31
  495. package/src/file/variations.js +17 -0
  496. package/src/form/edit.js +0 -2
  497. package/src/form-input/edit.js +0 -2
  498. package/src/freeform/edit.js +6 -29
  499. package/src/freeform/migration-notice.js +2 -4
  500. package/src/gallery/edit.js +13 -13
  501. package/src/home-link/edit.js +0 -1
  502. package/src/html/modal.js +3 -0
  503. package/src/icon/README.md +3 -0
  504. package/src/icon/block.json +12 -0
  505. package/src/icon/edit.js +85 -37
  506. package/src/icon/index.js +3 -1
  507. package/src/icon/index.php +23 -0
  508. package/src/icon/style.scss +12 -0
  509. package/src/icon/variations.js +9 -0
  510. package/src/image/README.md +1 -0
  511. package/src/image/block.json +1 -0
  512. package/src/image/edit.js +8 -3
  513. package/src/image/image.js +120 -56
  514. package/src/image/index.php +0 -1
  515. package/src/image/test/use-open-image-media-editor-modal.js +20 -26
  516. package/src/image/transforms.js +34 -8
  517. package/src/image/use-open-image-media-editor-modal.js +24 -42
  518. package/src/index.js +4 -11
  519. package/src/list/ordered-list-settings.js +0 -1
  520. package/src/navigation/edit/index.js +25 -16
  521. package/src/navigation/edit/navigation-menu-name-control.js +0 -1
  522. package/src/navigation/index.php +58 -0
  523. package/src/navigation-link/README.md +1 -1
  524. package/src/navigation-link/block.json +1 -1
  525. package/src/navigation-link/link-ui/page-creator.js +0 -1
  526. package/src/navigation-link/shared/controls.js +0 -2
  527. package/src/navigation-link/test/__snapshots__/hooks.js.snap +5 -0
  528. package/src/navigation-submenu/README.md +5 -0
  529. package/src/navigation-submenu/block.json +7 -0
  530. package/src/page-list/README.md +1 -1
  531. package/src/page-list/block.json +2 -5
  532. package/src/page-list/edit.js +0 -11
  533. package/src/page-list/index.php +1 -1
  534. package/src/playlist-track/edit.js +0 -3
  535. package/src/post-comment/edit.js +0 -1
  536. package/src/post-date/edit.js +2 -2
  537. package/src/post-featured-image/README.md +1 -0
  538. package/src/post-featured-image/block.json +1 -0
  539. package/src/post-featured-image/dimension-controls.js +105 -184
  540. package/src/post-featured-image/edit.js +53 -22
  541. package/src/post-featured-image/index.php +24 -22
  542. package/src/post-terms/edit.js +0 -1
  543. package/src/post-title/edit.js +0 -1
  544. package/src/pullquote/README.md +1 -1
  545. package/src/pullquote/block.json +1 -3
  546. package/src/pullquote/deprecated.js +121 -9
  547. package/src/pullquote/edit.js +7 -31
  548. package/src/pullquote/save.js +2 -13
  549. package/src/query/edit/enhanced-pagination-modal.js +11 -1
  550. package/src/query/edit/inspector-controls/index.js +0 -1
  551. package/src/rss/edit.js +0 -1
  552. package/src/search/README.md +1 -0
  553. package/src/search/block.json +4 -0
  554. package/src/search/edit.js +106 -55
  555. package/src/search/index.php +25 -1
  556. package/src/site-logo/edit.js +3 -1
  557. package/src/social-link/edit.js +0 -3
  558. package/src/style.scss +1 -2
  559. package/src/tab-list/README.md +19 -17
  560. package/src/tab-list/block.json +33 -20
  561. package/src/tab-list/edit.js +153 -15
  562. package/src/tab-list/index.php +24 -33
  563. package/src/tab-list/init.js +6 -0
  564. package/src/tab-list/save.js +39 -4
  565. package/src/{tab → tab-list}/style.scss +2 -3
  566. package/src/tab-panel/README.md +0 -3
  567. package/src/tab-panel/add-tab-toolbar-control.js +24 -11
  568. package/src/tab-panel/block.json +2 -6
  569. package/src/tab-panel/edit.js +1 -14
  570. package/src/tab-panel/index.php +2 -25
  571. package/src/tab-panel/remove-tab-toolbar-control.js +10 -14
  572. package/src/tab-panel/save.js +1 -0
  573. package/src/tab-panel/style.scss +0 -17
  574. package/src/tab-panels/README.md +0 -16
  575. package/src/tab-panels/block.json +2 -28
  576. package/src/tab-panels/init.js +6 -0
  577. package/src/table/edit.js +0 -2
  578. package/src/tabs/README.md +1 -7
  579. package/src/tabs/block.json +3 -17
  580. package/src/tabs/edit.js +8 -19
  581. package/src/tabs/index.js +6 -10
  582. package/src/tabs/index.php +12 -32
  583. package/src/tabs/use-tab-list-items-sync.js +49 -0
  584. package/src/tabs/view.js +22 -110
  585. package/src/template-part/edit/advanced-controls.js +0 -1
  586. package/src/template-part/edit/title-modal.js +0 -1
  587. package/src/utils/style-state.js +151 -0
  588. package/src/utils/test/style-state.js +307 -0
  589. package/src/video/edit.js +9 -16
  590. package/src/video/tracks-editor.js +0 -2
  591. package/babel-plugin.cjs +0 -150
  592. package/build/freeform/convert-to-blocks-button.cjs.map +0 -7
  593. package/build/list-item/utils.cjs +0 -57
  594. package/build/list-item/utils.cjs.map +0 -7
  595. package/build/tab/block.json +0 -56
  596. package/build/tab/controls.cjs +0 -46
  597. package/build/tab/controls.cjs.map +0 -7
  598. package/build/tab/edit.cjs +0 -135
  599. package/build/tab/edit.cjs.map +0 -7
  600. package/build/tab/index.cjs +0 -58
  601. package/build/tab/index.cjs.map +0 -7
  602. package/build/tab/save.cjs.map +0 -7
  603. package/build/tabs/use-tab-list-sync.cjs +0 -190
  604. package/build/tabs/use-tab-list-sync.cjs.map +0 -7
  605. package/build-module/freeform/convert-to-blocks-button.mjs +0 -19
  606. package/build-module/freeform/convert-to-blocks-button.mjs.map +0 -7
  607. package/build-module/list-item/utils.mjs +0 -32
  608. package/build-module/list-item/utils.mjs.map +0 -7
  609. package/build-module/tab/block.json +0 -56
  610. package/build-module/tab/controls.mjs +0 -15
  611. package/build-module/tab/controls.mjs.map +0 -7
  612. package/build-module/tab/edit.mjs +0 -108
  613. package/build-module/tab/edit.mjs.map +0 -7
  614. package/build-module/tab/index.mjs +0 -20
  615. package/build-module/tab/index.mjs.map +0 -7
  616. package/build-module/tab/save.mjs +0 -14
  617. package/build-module/tab/save.mjs.map +0 -7
  618. package/build-module/tabs/use-tab-list-sync.mjs +0 -169
  619. package/build-module/tabs/use-tab-list-sync.mjs.map +0 -7
  620. package/build-style/tab/editor-rtl.css +0 -11
  621. package/build-style/tab/editor.css +0 -11
  622. package/build-style/tab-list/editor-rtl.css +0 -6
  623. package/build-style/tab-list/editor.css +0 -6
  624. package/build-style/tab-panels/style-rtl.css +0 -4
  625. package/build-style/tab-panels/style.css +0 -4
  626. package/src/freeform/convert-to-blocks-button.js +0 -18
  627. package/src/list-item/utils.js +0 -34
  628. package/src/tab/README.md +0 -69
  629. package/src/tab/block.json +0 -56
  630. package/src/tab/controls.js +0 -19
  631. package/src/tab/edit.js +0 -141
  632. package/src/tab/editor.scss +0 -14
  633. package/src/tab/index.js +0 -24
  634. package/src/tab/index.php +0 -70
  635. package/src/tab/save.js +0 -13
  636. package/src/tab-list/editor.scss +0 -10
  637. package/src/tab-panels/style.scss +0 -4
  638. package/src/tabs/use-tab-list-sync.js +0 -237
@@ -1,79 +1,56 @@
1
1
  // packages/block-library/src/pullquote/edit.js
2
- import clsx from "clsx";
3
2
  import { __ } from "@wordpress/i18n";
4
- import {
5
- AlignmentControl,
6
- BlockControls,
7
- RichText,
8
- useBlockProps
9
- } from "@wordpress/block-editor";
3
+ import { RichText, useBlockProps } from "@wordpress/block-editor";
10
4
  import { createBlock, getDefaultBlockName } from "@wordpress/blocks";
11
5
  import { Figure } from "./figure.mjs";
12
6
  import { BlockQuote } from "./blockquote.mjs";
7
+ import useDeprecatedTextAlign from "../utils/deprecated-text-align-attributes.mjs";
13
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
- function PullQuoteEdit({
15
- attributes,
16
- setAttributes,
17
- isSelected,
18
- insertBlocksAfter
19
- }) {
20
- const { textAlign, citation, value } = attributes;
21
- const blockProps = useBlockProps({
22
- className: clsx({
23
- [`has-text-align-${textAlign}`]: textAlign
24
- })
25
- });
9
+ function PullQuoteEdit(props) {
10
+ const { attributes, setAttributes, isSelected, insertBlocksAfter } = props;
11
+ useDeprecatedTextAlign(props);
12
+ const { citation, value } = attributes;
13
+ const blockProps = useBlockProps();
26
14
  const shouldShowCitation = !RichText.isEmpty(citation) || isSelected;
27
- return /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsx(BlockControls, { group: "block", children: /* @__PURE__ */ jsx(
29
- AlignmentControl,
15
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Figure, { ...blockProps, children: /* @__PURE__ */ jsxs(BlockQuote, { children: [
16
+ /* @__PURE__ */ jsx(
17
+ RichText,
30
18
  {
31
- value: textAlign,
32
- onChange: (nextAlign) => {
33
- setAttributes({ textAlign: nextAlign });
34
- }
19
+ identifier: "value",
20
+ tagName: "p",
21
+ value,
22
+ onChange: (nextValue) => setAttributes({
23
+ value: nextValue
24
+ }),
25
+ "aria-label": __("Pullquote text"),
26
+ placeholder: (
27
+ // translators: placeholder text used for the quote
28
+ __("Add quote")
29
+ )
35
30
  }
36
- ) }),
37
- /* @__PURE__ */ jsx(Figure, { ...blockProps, children: /* @__PURE__ */ jsxs(BlockQuote, { children: [
38
- /* @__PURE__ */ jsx(
39
- RichText,
40
- {
41
- identifier: "value",
42
- tagName: "p",
43
- value,
44
- onChange: (nextValue) => setAttributes({
45
- value: nextValue
46
- }),
47
- "aria-label": __("Pullquote text"),
48
- placeholder: (
49
- // translators: placeholder text used for the quote
50
- __("Add quote")
51
- )
52
- }
53
- ),
54
- shouldShowCitation && /* @__PURE__ */ jsx(
55
- RichText,
56
- {
57
- identifier: "citation",
58
- tagName: "cite",
59
- style: { display: "block" },
60
- value: citation,
61
- "aria-label": __("Pullquote citation text"),
62
- placeholder: (
63
- // translators: placeholder text used for the citation
64
- __("Add citation")
65
- ),
66
- onChange: (nextCitation) => setAttributes({
67
- citation: nextCitation
68
- }),
69
- className: "wp-block-pullquote__citation",
70
- __unstableOnSplitAtEnd: () => insertBlocksAfter(
71
- createBlock(getDefaultBlockName())
72
- )
73
- }
74
- )
75
- ] }) })
76
- ] });
31
+ ),
32
+ shouldShowCitation && /* @__PURE__ */ jsx(
33
+ RichText,
34
+ {
35
+ identifier: "citation",
36
+ tagName: "cite",
37
+ style: { display: "block" },
38
+ value: citation,
39
+ "aria-label": __("Pullquote citation text"),
40
+ placeholder: (
41
+ // translators: placeholder text used for the citation
42
+ __("Add citation")
43
+ ),
44
+ onChange: (nextCitation) => setAttributes({
45
+ citation: nextCitation
46
+ }),
47
+ className: "wp-block-pullquote__citation",
48
+ __unstableOnSplitAtEnd: () => insertBlocksAfter(
49
+ createBlock(getDefaultBlockName())
50
+ )
51
+ }
52
+ )
53
+ ] }) }) });
77
54
  }
78
55
  var edit_default = PullQuoteEdit;
79
56
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/pullquote/edit.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\n\nfunction PullQuoteEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n} ) {\n\tconst { textAlign, citation, value } = attributes;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: clsx( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ textAlign }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { textAlign: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\ttagName=\"cite\"\n\t\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"wp-block-pullquote__citation\"\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockQuote>\n\t\t\t</Figure>\n\t\t</>\n\t);\n}\n\nexport default PullQuoteEdit;\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,aAAa,2BAA2B;AAKjD,SAAS,cAAc;AACvB,SAAS,kBAAkB;AAiBzB,mBAEE,KAQA,YAVF;AAfF,SAAS,cAAe;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,EAAE,WAAW,UAAU,MAAM,IAAI;AACvC,QAAM,aAAa,cAAe;AAAA,IACjC,WAAW,KAAM;AAAA,MAChB,CAAE,kBAAmB,SAAU,EAAG,GAAG;AAAA,IACtC,CAAE;AAAA,EACH,CAAE;AACF,QAAM,qBAAqB,CAAE,SAAS,QAAS,QAAS,KAAK;AAE7D,SACC,iCACC;AAAA,wBAAC,iBAAc,OAAM,SACpB;AAAA,MAAC;AAAA;AAAA,QACA,OAAQ;AAAA,QACR,UAAW,CAAE,cAAe;AAC3B,wBAAe,EAAE,WAAW,UAAU,CAAE;AAAA,QACzC;AAAA;AAAA,IACD,GACD;AAAA,IACA,oBAAC,UAAS,GAAG,YACZ,+BAAC,cACA;AAAA;AAAA,QAAC;AAAA;AAAA,UACA,YAAW;AAAA,UACX,SAAQ;AAAA,UACR;AAAA,UACA,UAAW,CAAE,cACZ,cAAe;AAAA,YACd,OAAO;AAAA,UACR,CAAE;AAAA,UAEH,cAAa,GAAI,gBAAiB;AAAA,UAClC;AAAA;AAAA,YAEC,GAAI,WAAY;AAAA;AAAA;AAAA,MAElB;AAAA,MACE,sBACD;AAAA,QAAC;AAAA;AAAA,UACA,YAAW;AAAA,UACX,SAAQ;AAAA,UACR,OAAQ,EAAE,SAAS,QAAQ;AAAA,UAC3B,OAAQ;AAAA,UACR,cAAa,GAAI,yBAA0B;AAAA,UAC3C;AAAA;AAAA,YAEC,GAAI,cAAe;AAAA;AAAA,UAEpB,UAAW,CAAE,iBACZ,cAAe;AAAA,YACd,UAAU;AAAA,UACX,CAAE;AAAA,UAEH,WAAU;AAAA,UACV,wBAAyB,MACxB;AAAA,YACC,YAAa,oBAAoB,CAAE;AAAA,UACpC;AAAA;AAAA,MAEF;AAAA,OAEF,GACD;AAAA,KACD;AAEF;AAEA,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { Figure } from './figure';\nimport { BlockQuote } from './blockquote';\nimport useDeprecatedTextAlign from '../utils/deprecated-text-align-attributes';\n\nfunction PullQuoteEdit( props ) {\n\tconst { attributes, setAttributes, isSelected, insertBlocksAfter } = props;\n\tuseDeprecatedTextAlign( props );\n\tconst { citation, value } = attributes;\n\tconst blockProps = useBlockProps();\n\tconst shouldShowCitation = ! RichText.isEmpty( citation ) || isSelected;\n\n\treturn (\n\t\t<>\n\t\t\t<Figure { ...blockProps }>\n\t\t\t\t<BlockQuote>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"value\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ ( nextValue ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tvalue: nextValue,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ __( 'Pullquote text' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the quote\n\t\t\t\t\t\t\t__( 'Add quote' )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\t\ttagName=\"cite\"\n\t\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\t\taria-label={ __( 'Pullquote citation text' ) }\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\t// translators: placeholder text used for the citation\n\t\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChange={ ( nextCitation ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tclassName=\"wp-block-pullquote__citation\"\n\t\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\t\tcreate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IAEF;AAAA,KAEF,GACD,GACD;AAEF;AAEA,IAAO,eAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,24 +1,13 @@
1
1
  // packages/block-library/src/pullquote/save.js
2
- import clsx from "clsx";
3
2
  import { RichText, useBlockProps } from "@wordpress/block-editor";
4
3
  import { jsx, jsxs } from "react/jsx-runtime";
5
4
  function save({ attributes }) {
6
- const { textAlign, citation, value } = attributes;
5
+ const { citation, value } = attributes;
7
6
  const shouldShowCitation = !RichText.isEmpty(citation);
8
- return /* @__PURE__ */ jsx(
9
- "figure",
10
- {
11
- ...useBlockProps.save({
12
- className: clsx({
13
- [`has-text-align-${textAlign}`]: textAlign
14
- })
15
- }),
16
- children: /* @__PURE__ */ jsxs("blockquote", { children: [
17
- /* @__PURE__ */ jsx(RichText.Content, { tagName: "p", value }),
18
- shouldShowCitation && /* @__PURE__ */ jsx(RichText.Content, { tagName: "cite", value: citation })
19
- ] })
20
- }
21
- );
7
+ return /* @__PURE__ */ jsx("figure", { ...useBlockProps.save(), children: /* @__PURE__ */ jsxs("blockquote", { children: [
8
+ /* @__PURE__ */ jsx(RichText.Content, { tagName: "p", value }),
9
+ shouldShowCitation && /* @__PURE__ */ jsx(RichText.Content, { tagName: "cite", value: citation })
10
+ ] }) });
22
11
  }
23
12
  export {
24
13
  save as default
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/pullquote/save.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { textAlign, citation, value } = attributes;\n\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\treturn (\n\t\t<figure\n\t\t\t{ ...useBlockProps.save( {\n\t\t\t\tclassName: clsx( {\n\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t} ),\n\t\t\t} ) }\n\t\t>\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content tagName=\"p\" value={ value } />\n\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t</figure>\n\t);\n}\n"],
5
- "mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,UAAU,qBAAqB;AAcrC,SACC,KADD;AAZY,SAAR,KAAuB,EAAE,WAAW,GAAI;AAC9C,QAAM,EAAE,WAAW,UAAU,MAAM,IAAI;AACvC,QAAM,qBAAqB,CAAE,SAAS,QAAS,QAAS;AAExD,SACC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG,cAAc,KAAM;AAAA,QACxB,WAAW,KAAM;AAAA,UAChB,CAAE,kBAAmB,SAAU,EAAG,GAAG;AAAA,QACtC,CAAE;AAAA,MACH,CAAE;AAAA,MAEF,+BAAC,gBACA;AAAA,4BAAC,SAAS,SAAT,EAAiB,SAAQ,KAAI,OAAgB;AAAA,QAC5C,sBACD,oBAAC,SAAS,SAAT,EAAiB,SAAQ,QAAO,OAAQ,UAAW;AAAA,SAEtD;AAAA;AAAA,EACD;AAEF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { citation, value } = attributes;\n\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\treturn (\n\t\t<figure { ...useBlockProps.save() }>\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content tagName=\"p\" value={ value } />\n\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t</figure>\n\t);\n}\n"],
5
+ "mappings": ";AAGA,SAAS,UAAU,qBAAqB;AAQrC,SACC,KADD;AANY,SAAR,KAAuB,EAAE,WAAW,GAAI;AAC9C,QAAM,EAAE,UAAU,MAAM,IAAI;AAC5B,QAAM,qBAAqB,CAAE,SAAS,QAAS,QAAS;AAExD,SACC,oBAAC,YAAS,GAAG,cAAc,KAAK,GAC/B,+BAAC,gBACA;AAAA,wBAAC,SAAS,SAAT,EAAiB,SAAQ,KAAI,OAAgB;AAAA,IAC5C,sBACD,oBAAC,SAAS,SAAT,EAAiB,SAAQ,QAAO,OAAQ,UAAW;AAAA,KAEtD,GACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -6,6 +6,8 @@ import {
6
6
  } from "@wordpress/components";
7
7
  import { __ } from "@wordpress/i18n";
8
8
  import { useState, useEffect } from "@wordpress/element";
9
+ import { useDispatch } from "@wordpress/data";
10
+ import { store as blockEditorStore } from "@wordpress/block-editor";
9
11
  import { useUnsupportedBlocks } from "../utils.mjs";
10
12
  import { jsx, jsxs } from "react/jsx-runtime";
11
13
  var modalDescriptionId = "wp-block-query-enhanced-pagination-modal__description";
@@ -16,12 +18,19 @@ function EnhancedPaginationModal({
16
18
  }) {
17
19
  const [isOpen, setOpen] = useState(false);
18
20
  const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
21
+ const { __unstableMarkNextChangeAsNotPersistent } = useDispatch(blockEditorStore);
19
22
  useEffect(() => {
20
23
  if (enhancedPagination && hasUnsupportedBlocks) {
24
+ __unstableMarkNextChangeAsNotPersistent();
21
25
  setAttributes({ enhancedPagination: false });
22
26
  setOpen(true);
23
27
  }
24
- }, [enhancedPagination, hasUnsupportedBlocks, setAttributes]);
28
+ }, [
29
+ enhancedPagination,
30
+ hasUnsupportedBlocks,
31
+ setAttributes,
32
+ __unstableMarkNextChangeAsNotPersistent
33
+ ]);
25
34
  const closeModal = () => {
26
35
  setOpen(false);
27
36
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/query/edit/enhanced-pagination-modal.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../utils';\n\nconst modalDescriptionId =\n\t'wp-block-query-enhanced-pagination-modal__description';\n\nexport default function EnhancedPaginationModal( {\n\tclientId,\n\tattributes: { enhancedPagination },\n\tsetAttributes,\n} ) {\n\tconst [ isOpen, setOpen ] = useState( false );\n\tconst hasUnsupportedBlocks = useUnsupportedBlocks( clientId );\n\n\tuseEffect( () => {\n\t\tif ( enhancedPagination && hasUnsupportedBlocks ) {\n\t\t\tsetAttributes( { enhancedPagination: false } );\n\t\t\tsetOpen( true );\n\t\t}\n\t}, [ enhancedPagination, hasUnsupportedBlocks, setAttributes ] );\n\n\tconst closeModal = () => {\n\t\tsetOpen( false );\n\t};\n\n\tconst notice =\n\t\t__(\n\t\t\t'Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.'\n\t\t) +\n\t\t' ' +\n\t\t__(\n\t\t\t'If you still want to prevent full page reloads, remove that block, then disable \"Reload full page\" again in the Query Block settings.'\n\t\t);\n\n\treturn (\n\t\tisOpen && (\n\t\t\t<Modal\n\t\t\t\ttitle={ __( 'Query block: Reload full page enabled' ) }\n\t\t\t\tclassName=\"wp-block-query__enhanced-pagination-modal\"\n\t\t\t\taria={ {\n\t\t\t\t\tdescribedby: modalDescriptionId,\n\t\t\t\t} }\n\t\t\t\trole=\"alertdialog\"\n\t\t\t\tfocusOnMount=\"firstElement\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tonRequestClose={ closeModal }\n\t\t\t>\n\t\t\t\t<VStack alignment=\"right\" spacing={ 5 }>\n\t\t\t\t\t<span id={ modalDescriptionId }>{ notice }</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t>\n\t\t\t\t\t\t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\n\tButton,\n\tModal,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../utils';\n\nconst modalDescriptionId =\n\t'wp-block-query-enhanced-pagination-modal__description';\n\nexport default function EnhancedPaginationModal( {\n\tclientId,\n\tattributes: { enhancedPagination },\n\tsetAttributes,\n} ) {\n\tconst [ isOpen, setOpen ] = useState( false );\n\tconst hasUnsupportedBlocks = useUnsupportedBlocks( clientId );\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( enhancedPagination && hasUnsupportedBlocks ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { enhancedPagination: false } );\n\t\t\tsetOpen( true );\n\t\t}\n\t}, [\n\t\tenhancedPagination,\n\t\thasUnsupportedBlocks,\n\t\tsetAttributes,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t] );\n\n\tconst closeModal = () => {\n\t\tsetOpen( false );\n\t};\n\n\tconst notice =\n\t\t__(\n\t\t\t'Currently, avoiding full page reloads is not possible when non-interactive or non-client Navigation compatible blocks from plugins are present inside the Query block.'\n\t\t) +\n\t\t' ' +\n\t\t__(\n\t\t\t'If you still want to prevent full page reloads, remove that block, then disable \"Reload full page\" again in the Query Block settings.'\n\t\t);\n\n\treturn (\n\t\tisOpen && (\n\t\t\t<Modal\n\t\t\t\ttitle={ __( 'Query block: Reload full page enabled' ) }\n\t\t\t\tclassName=\"wp-block-query__enhanced-pagination-modal\"\n\t\t\t\taria={ {\n\t\t\t\t\tdescribedby: modalDescriptionId,\n\t\t\t\t} }\n\t\t\t\trole=\"alertdialog\"\n\t\t\t\tfocusOnMount=\"firstElement\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tonRequestClose={ closeModal }\n\t\t\t>\n\t\t\t\t<VStack alignment=\"right\" spacing={ 5 }>\n\t\t\t\t\t<span id={ modalDescriptionId }>{ notice }</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'OK' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</VStack>\n\t\t\t</Modal>\n\t\t)\n\t);\n}\n"],
5
+ "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA,wBAAwB;AAAA,OAClB;AACP,SAAS,UAAU;AACnB,SAAS,UAAU,iBAAiB;AACpC,SAAS,mBAAmB;AAC5B,SAAS,SAAS,wBAAwB;AAK1C,SAAS,4BAA4B;AAsDjC,SACC,KADD;AApDJ,IAAM,qBACL;AAEc,SAAR,wBAA0C;AAAA,EAChD;AAAA,EACA,YAAY,EAAE,mBAAmB;AAAA,EACjC;AACD,GAAI;AACH,QAAM,CAAE,QAAQ,OAAQ,IAAI,SAAU,KAAM;AAC5C,QAAM,uBAAuB,qBAAsB,QAAS;AAC5D,QAAM,EAAE,wCAAwC,IAC/C,YAAa,gBAAiB;AAE/B,YAAW,MAAM;AAChB,QAAK,sBAAsB,sBAAuB;AACjD,8CAAwC;AACxC,oBAAe,EAAE,oBAAoB,MAAM,CAAE;AAC7C,cAAS,IAAK;AAAA,IACf;AAAA,EACD,GAAG;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAE;AAEF,QAAM,aAAa,MAAM;AACxB,YAAS,KAAM;AAAA,EAChB;AAEA,QAAM,SACL;AAAA,IACC;AAAA,EACD,IACA,MACA;AAAA,IACC;AAAA,EACD;AAED,SACC,UACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ,GAAI,uCAAwC;AAAA,MACpD,WAAU;AAAA,MACV,MAAO;AAAA,QACN,aAAa;AAAA,MACd;AAAA,MACA,MAAK;AAAA,MACL,cAAa;AAAA,MACb,eAAgB;AAAA,MAChB,gBAAiB;AAAA,MAEjB,+BAAC,UAAO,WAAU,SAAQ,SAAU,GACnC;AAAA,4BAAC,UAAK,IAAK,oBAAuB,kBAAQ;AAAA,QAC1C;AAAA,UAAC;AAAA;AAAA,YACA,uBAAqB;AAAA,YACrB,SAAQ;AAAA,YACR,SAAU;AAAA,YAER,aAAI,IAAK;AAAA;AAAA,QACZ;AAAA,SACD;AAAA;AAAA,EACD;AAGH;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,7 @@ function EnhancedPaginationControl({
10
10
  }) {
11
11
  const hasUnsupportedBlocks = useUnsupportedBlocks(clientId);
12
12
  let help = __(
13
- "Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages."
13
+ "Reload the full page—instead of just the posts list—when visitors navigate between pages."
14
14
  );
15
15
  if (hasUnsupportedBlocks) {
16
16
  help = __(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/query/edit/inspector-controls/enhanced-pagination-control.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst hasUnsupportedBlocks = useUnsupportedBlocks( clientId );\n\n\tlet help = __(\n\t\t'Reload the full page\u2014instead of just the posts list\u2014when visitors navigate between pages.'\n\t);\n\tif ( hasUnsupportedBlocks ) {\n\t\thelp = __(\n\t\t\t'Enhancement disabled because there are non-compatible blocks inside the Query block.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Reload full page' ) }\n\t\t\t\thelp={ help }\n\t\t\t\tchecked={ ! enhancedPagination }\n\t\t\t\tdisabled={ hasUnsupportedBlocks }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tenhancedPagination: ! value,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { ToggleControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useUnsupportedBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst hasUnsupportedBlocks = useUnsupportedBlocks( clientId );\n\n\tlet help = __(\n\t\t'Reload the full page—instead of just the posts list—when visitors navigate between pages.'\n\t);\n\tif ( hasUnsupportedBlocks ) {\n\t\thelp = __(\n\t\t\t'Enhancement disabled because there are non-compatible blocks inside the Query block.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Reload full page' ) }\n\t\t\t\thelp={ help }\n\t\t\t\tchecked={ ! enhancedPagination }\n\t\t\t\tdisabled={ hasUnsupportedBlocks }\n\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\tenhancedPagination: ! value,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</>\n\t);\n}\n"],
5
5
  "mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,UAAU;AAKnB,SAAS,4BAA4B;AAmBnC,mBACC,WADD;AAjBa,SAAR,0BAA4C;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM,uBAAuB,qBAAsB,QAAS;AAE5D,MAAI,OAAO;AAAA,IACV;AAAA,EACD;AACA,MAAK,sBAAuB;AAC3B,WAAO;AAAA,MACN;AAAA,IACD;AAAA,EACD;AAEA,SACC,gCACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAQ,GAAI,kBAAmB;AAAA,MAC/B;AAAA,MACA,SAAU,CAAE;AAAA,MACZ,UAAW;AAAA,MACX,UAAW,CAAE,UAAW;AACvB,sBAAe;AAAA,UACd,oBAAoB,CAAE;AAAA,QACvB,CAAE;AAAA,MACH;AAAA;AAAA,EACD,GACD;AAEF;",
6
6
  "names": []
7
7
  }
@@ -401,7 +401,6 @@ function QueryInspectorControls(props) {
401
401
  children: /* @__PURE__ */ jsx(
402
402
  TextControl,
403
403
  {
404
- __next40pxDefaultSize: true,
405
404
  label: __("Keyword"),
406
405
  value: querySearch,
407
406
  onChange: (newQuerySearch) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/query/edit/inspector-controls/index.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport {\n\tTextControl,\n\tSelectControl,\n\tNotice,\n\t__experimentalVStack as VStack,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport FormatControls from './format-controls';\nimport StickyControl from './sticky-control';\nimport PerPageControl from './per-page-control';\nimport OffsetControl from './offset-controls';\nimport PagesControl from './pages-control';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n\tuseOrderByOptions,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, isSingular } = props;\n\tconst { query } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpages,\n\t\tpostType,\n\t\tperPage,\n\t\toffset,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t\tformat,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst showSticky = postType === 'post';\n\tconst {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t} = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tif ( !! supportedTaxonomies?.length && !! taxQuery ) {\n\t\t\t// Shared utility to build taxQuery based on supported taxonomies.\n\t\t\tconst buildTaxQuery = ( _taxQuery ) => {\n\t\t\t\treturn Object.entries( _taxQuery || {} ).reduce(\n\t\t\t\t\t( accumulator, [ taxonomy, terms ] ) => {\n\t\t\t\t\t\tif ( supportedTaxonomies.includes( taxonomy ) ) {\n\t\t\t\t\t\t\taccumulator[ taxonomy ] = terms;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t};\n\t\t\tconst updatedTaxQuery = {};\n\t\t\tconst builtIncludeTaxQuery = buildTaxQuery( taxQuery.include );\n\t\t\tif ( !! Object.keys( builtIncludeTaxQuery ).length ) {\n\t\t\t\tupdatedTaxQuery.include = builtIncludeTaxQuery;\n\t\t\t}\n\t\t\tconst builtExcludeTaxQuery = buildTaxQuery( taxQuery.exclude );\n\t\t\tif ( !! Object.keys( builtExcludeTaxQuery ).length ) {\n\t\t\t\tupdatedTaxQuery.exclude = builtExcludeTaxQuery;\n\t\t\t}\n\t\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t\t? updatedTaxQuery\n\t\t\t\t: undefined;\n\t\t}\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\t// Post types can register post format support with `add_post_type_support`.\n\t\t// But we need to reset the `format` property when switching to post types\n\t\t// that do not support post formats.\n\t\tconst hasFormatSupport = postTypeFormatSupportMap[ newValue ];\n\t\tif ( ! hasFormatSupport ) {\n\t\t\tupdateQuery.format = [];\n\t\t}\n\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst debouncedQuerySearch = useMemo( () => {\n\t\treturn debounce( ( newQuerySearch ) => {\n\t\t\tsetQuery( { search: newQuerySearch } );\n\t\t}, 250 );\n\t}, [ setQuery ] );\n\n\tconst orderByOptions = useOrderByOptions( postType );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst postTypeControlLabel = __( 'Post type' );\n\tconst postTypeControlHelp = __(\n\t\t'Select the type of content to display: posts, pages, or custom post types.'\n\t);\n\tconst showOrderControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'order' );\n\tconst showStickyControl =\n\t\t! inherit &&\n\t\tshowSticky &&\n\t\tisControlAllowed( allowedControls, 'sticky' );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst postTypeHasFormatSupport = postTypeFormatSupportMap[ postType ];\n\tconst showFormatControl = useSelect(\n\t\t( select ) => {\n\t\t\t// Check if the post type supports post formats and if the control is allowed.\n\t\t\tif (\n\t\t\t\t! postTypeHasFormatSupport ||\n\t\t\t\t! isControlAllowed( allowedControls, 'format' )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\n\t\t\t// If there are no supported formats, getThemeSupports still includes the default 'standard' format,\n\t\t\t// and in this case the control should not be shown since the user has no other formats to choose from.\n\t\t\treturn (\n\t\t\t\tthemeSupports.formats &&\n\t\t\t\tthemeSupports.formats.length > 0 &&\n\t\t\t\tthemeSupports.formats.some( ( type ) => type !== 'standard' )\n\t\t\t);\n\t\t},\n\t\t[ allowedControls, postTypeHasFormatSupport ]\n\t);\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl ||\n\t\tshowFormatControl;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst showPostCountControl = isControlAllowed(\n\t\tallowedControls,\n\t\t'postCount'\n\t);\n\tconst showOffSetControl = isControlAllowed( allowedControls, 'offset' );\n\tconst showPagesControl = isControlAllowed( allowedControls, 'pages' );\n\n\tconst showDisplayPanel =\n\t\tshowPostCountControl || showOffSetControl || showPagesControl;\n\n\t// The block cannot inherit a default WordPress query in singular content (e.g., post, page, 404, blank).\n\t// Warn users but still permit this type of query for exceptional cases in Classic and Hybrid themes.\n\tconst hasInheritanceWarning = isSingular && inherit;\n\n\treturn (\n\t\t<>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tpostType: 'post',\n\t\t\t\t\t\t\torder: 'desc',\n\t\t\t\t\t\t\torderBy: 'date',\n\t\t\t\t\t\t\tsticky: '',\n\t\t\t\t\t\t\tinherit: true,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => ! inherit }\n\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { inherit: true } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\t\t\tinherit: value === 'default',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t\tinherit\n\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on the current template.'\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on specific criteria.'\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvalue={ !! inherit ? 'default' : 'custom' }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tvalue=\"default\"\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tvalue=\"custom\"\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t\t\t{ hasInheritanceWarning && (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => postType !== 'post' }\n\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => onPostTypeChange( 'post' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postTypesSelectOptions.length > 2 ? (\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ postTypesSelectOptions.map(\n\t\t\t\t\t\t\t\t\t\t( option ) => (\n\t\t\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\torder !== 'desc' || orderBy !== 'date'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( { order: 'desc', orderBy: 'date' } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t\t{ ...{ order, orderBy, orderByOptions } }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! sticky }\n\t\t\t\t\t\t\tlabel={ __( 'Sticky posts' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { sticky: '' } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showDisplayPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__display\"\n\t\t\t\t\tlabel={ __( 'Display' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\tpages: 0,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Items per page' ) }\n\t\t\t\t\t\thasValue={ () => perPage > 0 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PerPageControl\n\t\t\t\t\t\t\tperPage={ perPage }\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Offset' ) }\n\t\t\t\t\t\thasValue={ () => offset > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { offset: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<OffsetControl\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Max pages to show' ) }\n\t\t\t\t\t\thasValue={ () => pages > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { pages: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PagesControl pages={ pages } onChange={ setQuery } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\" // unused but kept for backward compatibility\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\tformat: [],\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( value ) =>\n\t\t\t\t\t\t\t\t\t\tObject.values( value || {} ).some(\n\t\t\t\t\t\t\t\t\t\t\t( termIds ) => !! termIds?.length\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetQuery( { search: '' } );\n\t\t\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ ( newQuerySearch ) => {\n\t\t\t\t\t\t\t\t\tdebouncedQuerySearch( newQuerySearch );\n\t\t\t\t\t\t\t\t\tsetQuerySearch( newQuerySearch );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showFormatControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! format?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Formats' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { format: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormatControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
5
- "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,EAChC,oCAAoC;AAAA,EACpC,0CAA0C;AAAA,OACpC;AACP,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,UAAU,eAAe;AAKlC,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1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\n\t__experimentalVStack as VStack,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport OrderControl from './order-control';\nimport AuthorControl from './author-control';\nimport ParentControl from './parent-control';\nimport { TaxonomyControls } from './taxonomy-controls';\nimport FormatControls from './format-controls';\nimport StickyControl from './sticky-control';\nimport PerPageControl from './per-page-control';\nimport OffsetControl from './offset-controls';\nimport PagesControl from './pages-control';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n\tuseOrderByOptions,\n} from '../../utils';\nimport { useToolsPanelDropdownMenuProps } from '../../../utils/hooks';\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, isSingular } = props;\n\tconst { query } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpages,\n\t\tpostType,\n\t\tperPage,\n\t\toffset,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t\tformat,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst showSticky = postType === 'post';\n\tconst {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t} = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tconst onPostTypeChange = ( newValue ) => {\n\t\tconst updateQuery = { postType: newValue };\n\t\t// We need to dynamically update the `taxQuery` property,\n\t\t// by removing any not supported taxonomy from the query.\n\t\tconst supportedTaxonomies = postTypesTaxonomiesMap[ newValue ];\n\t\tif ( !! supportedTaxonomies?.length && !! taxQuery ) {\n\t\t\t// Shared utility to build taxQuery based on supported taxonomies.\n\t\t\tconst buildTaxQuery = ( _taxQuery ) => {\n\t\t\t\treturn Object.entries( _taxQuery || {} ).reduce(\n\t\t\t\t\t( accumulator, [ taxonomy, terms ] ) => {\n\t\t\t\t\t\tif ( supportedTaxonomies.includes( taxonomy ) ) {\n\t\t\t\t\t\t\taccumulator[ taxonomy ] = terms;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t};\n\t\t\tconst updatedTaxQuery = {};\n\t\t\tconst builtIncludeTaxQuery = buildTaxQuery( taxQuery.include );\n\t\t\tif ( !! Object.keys( builtIncludeTaxQuery ).length ) {\n\t\t\t\tupdatedTaxQuery.include = builtIncludeTaxQuery;\n\t\t\t}\n\t\t\tconst builtExcludeTaxQuery = buildTaxQuery( taxQuery.exclude );\n\t\t\tif ( !! Object.keys( builtExcludeTaxQuery ).length ) {\n\t\t\t\tupdatedTaxQuery.exclude = builtExcludeTaxQuery;\n\t\t\t}\n\t\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t\t? updatedTaxQuery\n\t\t\t\t: undefined;\n\t\t}\n\n\t\tif ( newValue !== 'post' ) {\n\t\t\tupdateQuery.sticky = '';\n\t\t}\n\t\t// We need to reset `parents` because they are tied to each post type.\n\t\tupdateQuery.parents = [];\n\t\t// Post types can register post format support with `add_post_type_support`.\n\t\t// But we need to reset the `format` property when switching to post types\n\t\t// that do not support post formats.\n\t\tconst hasFormatSupport = postTypeFormatSupportMap[ newValue ];\n\t\tif ( ! hasFormatSupport ) {\n\t\t\tupdateQuery.format = [];\n\t\t}\n\n\t\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst debouncedQuerySearch = useMemo( () => {\n\t\treturn debounce( ( newQuerySearch ) => {\n\t\t\tsetQuery( { search: newQuerySearch } );\n\t\t}, 250 );\n\t}, [ setQuery ] );\n\n\tconst orderByOptions = useOrderByOptions( postType );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst postTypeControlLabel = __( 'Post type' );\n\tconst postTypeControlHelp = __(\n\t\t'Select the type of content to display: posts, pages, or custom post types.'\n\t);\n\tconst showOrderControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'order' );\n\tconst showStickyControl =\n\t\t! inherit &&\n\t\tshowSticky &&\n\t\tisControlAllowed( allowedControls, 'sticky' );\n\tconst showSettingsPanel =\n\t\tshowInheritControl ||\n\t\tshowPostTypeControl ||\n\t\tshowOrderControl ||\n\t\tshowStickyControl;\n\tconst showTaxControl =\n\t\t!! taxonomies?.length &&\n\t\tisControlAllowed( allowedControls, 'taxQuery' );\n\tconst showAuthorControl = isControlAllowed( allowedControls, 'author' );\n\tconst showSearchControl = isControlAllowed( allowedControls, 'search' );\n\tconst showParentControl =\n\t\tisControlAllowed( allowedControls, 'parents' ) &&\n\t\tisPostTypeHierarchical;\n\n\tconst postTypeHasFormatSupport = postTypeFormatSupportMap[ postType ];\n\tconst showFormatControl = useSelect(\n\t\t( select ) => {\n\t\t\t// Check if the post type supports post formats and if the control is allowed.\n\t\t\tif (\n\t\t\t\t! postTypeHasFormatSupport ||\n\t\t\t\t! isControlAllowed( allowedControls, 'format' )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\n\t\t\t// If there are no supported formats, getThemeSupports still includes the default 'standard' format,\n\t\t\t// and in this case the control should not be shown since the user has no other formats to choose from.\n\t\t\treturn (\n\t\t\t\tthemeSupports.formats &&\n\t\t\t\tthemeSupports.formats.length > 0 &&\n\t\t\t\tthemeSupports.formats.some( ( type ) => type !== 'standard' )\n\t\t\t);\n\t\t},\n\t\t[ allowedControls, postTypeHasFormatSupport ]\n\t);\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl ||\n\t\tshowFormatControl;\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst showPostCountControl = isControlAllowed(\n\t\tallowedControls,\n\t\t'postCount'\n\t);\n\tconst showOffSetControl = isControlAllowed( allowedControls, 'offset' );\n\tconst showPagesControl = isControlAllowed( allowedControls, 'pages' );\n\n\tconst showDisplayPanel =\n\t\tshowPostCountControl || showOffSetControl || showPagesControl;\n\n\t// The block cannot inherit a default WordPress query in singular content (e.g., post, page, 404, blank).\n\t// Warn users but still permit this type of query for exceptional cases in Classic and Hybrid themes.\n\tconst hasInheritanceWarning = isSingular && inherit;\n\n\treturn (\n\t\t<>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tpostType: 'post',\n\t\t\t\t\t\t\torder: 'desc',\n\t\t\t\t\t\t\torderBy: 'date',\n\t\t\t\t\t\t\tsticky: '',\n\t\t\t\t\t\t\tinherit: true,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => ! inherit }\n\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { inherit: true } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Query type' ) }\n\t\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\t\t\t\tinherit: value === 'default',\n\t\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\thelp={\n\t\t\t\t\t\t\t\t\t\tinherit\n\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on the current template.'\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Display a list of posts or custom post types based on specific criteria.'\n\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvalue={ !! inherit ? 'default' : 'custom' }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tvalue=\"default\"\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\tvalue=\"custom\"\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t\t\t{ hasInheritanceWarning && (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Cannot inherit the current template query when placed inside the singular content (e.g., post, page, 404, blank).'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => postType !== 'post' }\n\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\tonDeselect={ () => onPostTypeChange( 'post' ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postTypesSelectOptions.length > 2 ? (\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\t\tlabel={ postTypeControlLabel }\n\t\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\t\thelp={ postTypeControlHelp }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ postTypesSelectOptions.map(\n\t\t\t\t\t\t\t\t\t\t( option ) => (\n\t\t\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ option.value }\n\t\t\t\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\torder !== 'desc' || orderBy !== 'date'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\t\tonDeselect={ () =>\n\t\t\t\t\t\t\t\tsetQuery( { order: 'desc', orderBy: 'date' } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t\t{ ...{ order, orderBy, orderByOptions } }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ showStickyControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! sticky }\n\t\t\t\t\t\t\tlabel={ __( 'Sticky posts' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { sticky: '' } ) }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<StickyControl\n\t\t\t\t\t\t\t\tvalue={ sticky }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { sticky: value } )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showDisplayPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__display\"\n\t\t\t\t\tlabel={ __( 'Display' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\toffset: 0,\n\t\t\t\t\t\t\tpages: 0,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Items per page' ) }\n\t\t\t\t\t\thasValue={ () => perPage > 0 }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PerPageControl\n\t\t\t\t\t\t\tperPage={ perPage }\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Offset' ) }\n\t\t\t\t\t\thasValue={ () => offset > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { offset: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<OffsetControl\n\t\t\t\t\t\t\toffset={ offset }\n\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tlabel={ __( 'Max pages to show' ) }\n\t\t\t\t\t\thasValue={ () => pages > 0 }\n\t\t\t\t\t\tonDeselect={ () => setQuery( { pages: 0 } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PagesControl pages={ pages } onChange={ setQuery } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\" // unused but kept for backward compatibility\n\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\tformat: [],\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t( value ) =>\n\t\t\t\t\t\t\t\t\t\tObject.values( value || {} ).some(\n\t\t\t\t\t\t\t\t\t\t\t( termIds ) => !! termIds?.length\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { taxQuery: null } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TaxonomyControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetQuery( { search: '' } );\n\t\t\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\tonChange={ ( newQuerySearch ) => {\n\t\t\t\t\t\t\t\t\tdebouncedQuerySearch( newQuerySearch );\n\t\t\t\t\t\t\t\t\tsetQuerySearch( newQuerySearch );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showFormatControl && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! format?.length }\n\t\t\t\t\t\t\tlabel={ __( 'Formats' ) }\n\t\t\t\t\t\t\tonDeselect={ () => setQuery( { format: [] } ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FormatControls\n\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t</ToolsPanel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],
5
+ "mappings": ";AAGA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,gCAAgC;AAAA,EAChC,oCAAoC;AAAA,EACpC,0CAA0C;AAAA,OACpC;AACP,SAAS,iBAAiB;AAC1B,SAAS,SAAS,iBAAiB;AACnC,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,UAAU,eAAe;AAKlC,OAAO,kBAAkB;AACzB,OAAO,mBAAmB;AAC1B,OAAO,mBAAmB;AAC1B,SAAS,wBAAwB;AACjC,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,OAAO,oBAAoB;AAC3B,OAAO,mBAAmB;AAC1B,OAAO,kBAAkB;AACzB;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AACP,SAAS,sCAAsC;AA6J7C,mBA2CO,KApBD,YAvBN;AA3Ja,SAAR,uBAAyC,OAAQ;AACvD,QAAM,EAAE,YAAY,UAAU,WAAW,IAAI;AAC7C,QAAM,EAAE,MAAM,IAAI;AAClB,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AACJ,QAAM,kBAAkB,mBAAoB,UAAW;AACvD,QAAM,aAAa,aAAa;AACh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CAAE,SAAS;AAAA,cAC7B,OAAQ,GAAI,SAAU;AAAA,cACtB,YAAa,MAAM,SAAU,EAAE,SAAS,CAAC,EAAE,CAAE;AAAA,cAE7C;AAAA,gBAAC;AAAA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA,UAAW;AAAA;AAAA,cACZ;AAAA;AAAA,UACD;AAAA,UAEC,qBACD;AAAA,YAAC;AAAA;AAAA,cACA,UAAW,MAAM,CAAC,CAAE,QAAQ;AAAA,cAC5B,OAAQ,GAAI,SAAU;AAAA,cACtB,YAAa,MAAM,SAAU,EAAE,QAAQ,CAAC,EAAE,CAAE;AAAA,cAE5C;AAAA,gBAAC;AAAA;AAAA,kBACA,UAAW;AAAA,kBACX;AAAA;AAAA,cACD;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IAEF;AAAA,KAEF;AAEF;",
6
6
  "names": []
7
7
  }
@@ -13,12 +13,12 @@ var defaultOrderByOptions = [
13
13
  },
14
14
  {
15
15
  /* translators: Label for ordering posts by title in ascending order. */
16
- label: __("A \u2192 Z"),
16
+ label: __("A Z"),
17
17
  value: "title/asc"
18
18
  },
19
19
  {
20
20
  /* translators: Label for ordering posts by title in descending order. */
21
- label: __("Z \u2192 A"),
21
+ label: __("Z A"),
22
22
  value: "title/desc"
23
23
  }
24
24
  ];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/query/edit/inspector-controls/order-control.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst defaultOrderByOptions = [\n\t{\n\t\tlabel: __( 'Newest to oldest' ),\n\t\tvalue: 'date/desc',\n\t},\n\t{\n\t\tlabel: __( 'Oldest to newest' ),\n\t\tvalue: 'date/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\tlabel: __( 'A \u2192 Z' ),\n\t\tvalue: 'title/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\tlabel: __( 'Z \u2192 A' ),\n\t\tvalue: 'title/desc',\n\t},\n];\n\nfunction OrderControl( {\n\torder,\n\torderBy,\n\torderByOptions = defaultOrderByOptions,\n\tonChange,\n} ) {\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Order by' ) }\n\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\toptions={ orderByOptions }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\tonChange( { order: newOrder, orderBy: newOrderBy } );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default OrderControl;\n"],
5
- "mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,UAAU;AA8BjB;AA5BF,IAAM,wBAAwB;AAAA,EAC7B;AAAA,IACC,OAAO,GAAI,kBAAmB;AAAA,IAC9B,OAAO;AAAA,EACR;AAAA,EACA;AAAA,IACC,OAAO,GAAI,kBAAmB;AAAA,IAC9B,OAAO;AAAA,EACR;AAAA,EACA;AAAA;AAAA,IAEC,OAAO,GAAI,YAAQ;AAAA,IACnB,OAAO;AAAA,EACR;AAAA,EACA;AAAA;AAAA,IAEC,OAAO,GAAI,YAAQ;AAAA,IACnB,OAAO;AAAA,EACR;AACD;AAEA,SAAS,aAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACD,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,OAAQ,GAAI,UAAW;AAAA,MACvB,OAAQ,GAAI,OAAQ,IAAK,KAAM;AAAA,MAC/B,SAAU;AAAA,MACV,UAAW,CAAE,UAAW;AACvB,cAAM,CAAE,YAAY,QAAS,IAAI,MAAM,MAAO,GAAI;AAClD,iBAAU,EAAE,OAAO,UAAU,SAAS,WAAW,CAAE;AAAA,MACpD;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst defaultOrderByOptions = [\n\t{\n\t\tlabel: __( 'Newest to oldest' ),\n\t\tvalue: 'date/desc',\n\t},\n\t{\n\t\tlabel: __( 'Oldest to newest' ),\n\t\tvalue: 'date/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\tlabel: __( 'A Z' ),\n\t\tvalue: 'title/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\tlabel: __( 'Z A' ),\n\t\tvalue: 'title/desc',\n\t},\n];\n\nfunction OrderControl( {\n\torder,\n\torderBy,\n\torderByOptions = defaultOrderByOptions,\n\tonChange,\n} ) {\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Order by' ) }\n\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\toptions={ orderByOptions }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\tonChange( { order: newOrder, orderBy: newOrderBy } );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default OrderControl;\n"],
5
+ "mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,UAAU;AA8BjB;AA5BF,IAAM,wBAAwB;AAAA,EAC7B;AAAA,IACC,OAAO,GAAI,kBAAmB;AAAA,IAC9B,OAAO;AAAA,EACR;AAAA,EACA;AAAA,IACC,OAAO,GAAI,kBAAmB;AAAA,IAC9B,OAAO;AAAA,EACR;AAAA,EACA;AAAA;AAAA,IAEC,OAAO,GAAI,OAAQ;AAAA,IACnB,OAAO;AAAA,EACR;AAAA,EACA;AAAA;AAAA,IAEC,OAAO,GAAI,OAAQ;AAAA,IACnB,OAAO;AAAA,EACR;AACD;AAEA,SAAS,aAAc;AAAA,EACtB;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACD,GAAI;AACH,SACC;AAAA,IAAC;AAAA;AAAA,MACA,uBAAqB;AAAA,MACrB,OAAQ,GAAI,UAAW;AAAA,MACvB,OAAQ,GAAI,OAAQ,IAAK,KAAM;AAAA,MAC/B,SAAU;AAAA,MACV,UAAW,CAAE,UAAW;AACvB,cAAM,CAAE,YAAY,QAAS,IAAI,MAAM,MAAO,GAAI;AAClD,iBAAU,EAAE,OAAO,UAAU,SAAS,WAAW,CAAE;AAAA,MACpD;AAAA;AAAA,EACD;AAEF;AAEA,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -129,12 +129,12 @@ function useOrderByOptions(postType) {
129
129
  },
130
130
  {
131
131
  /* translators: Label for ordering posts by title in ascending order. */
132
- label: __("A \u2192 Z"),
132
+ label: __("A Z"),
133
133
  value: "title/asc"
134
134
  },
135
135
  {
136
136
  /* translators: Label for ordering posts by title in descending order. */
137
- label: __("Z \u2192 A"),
137
+ label: __("Z A"),
138
138
  value: "title/desc"
139
139
  }
140
140
  ];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/query/utils.js"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tcloneBlock,\n\tgetBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n/** @typedef {import('@wordpress/components/build-types/query-controls/types').OrderByOption} OrderByOption */\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\n/**\n * The object used in Query block that contains info and helper mappings\n * from an array of IHasNameAndId objects.\n *\n * @typedef {Object} QueryEntitiesInfo\n * @property {IHasNameAndId[]} entities The array of entities.\n * @property {Object<string, IHasNameAndId>} mapById Object mapping with the id as key and the entity as value.\n * @property {Object<string, IHasNameAndId>} mapByName Object mapping with the name as key and the entity as value.\n * @property {string[]} names Array with the entities' names.\n */\n\n/**\n * Returns a helper object with mapping from Objects that implement\n * the `IHasNameAndId` interface. The returned object is used for\n * integration with `FormTokenField` component.\n *\n * @param {IHasNameAndId[]} entities The entities to extract of helper object.\n * @return {QueryEntitiesInfo} The object with the entities information.\n */\nexport const getEntitiesInfo = ( entities ) => {\n\tconst mapping = entities?.reduce(\n\t\t( accumulator, entity ) => {\n\t\t\tconst { mapById, mapByName, names } = accumulator;\n\t\t\tmapById[ entity.id ] = entity;\n\t\t\tmapByName[ entity.name ] = entity;\n\t\t\tnames.push( entity.name );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ mapById: {}, mapByName: {}, names: [] }\n\t);\n\treturn {\n\t\tentities,\n\t\t...mapping,\n\t};\n};\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as a string of properties, separated by dots,\n * for example: \"parent.child\".\n *\n * @param {Object} object Input object.\n * @param {string} path Path to the object property.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path ) => {\n\tconst normalizedPath = path.split( '.' );\n\tlet value = object;\n\tnormalizedPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of entities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * Returns a helper object that contains:\n * 1. An `options` object from the available post types, to be passed to a `SelectControl`.\n * 2. A helper map with available taxonomies per post type.\n * 3. A helper map with post format support per post type.\n *\n * @return {Object} The helper object related to post types.\n */\nexport const usePostTypes = () => {\n\tconst postTypes = useSelect( ( select ) => {\n\t\tconst { getPostTypes } = select( coreStore );\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\tconst filteredPostTypes = getPostTypes( { per_page: -1 } )?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t\treturn filteredPostTypes;\n\t}, [] );\n\tconst postTypesTaxonomiesMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn;\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] = type.taxonomies;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\tconst postTypesSelectOptions = useMemo(\n\t\t() =>\n\t\t\t( postTypes || [] ).map( ( { labels, slug } ) => ( {\n\t\t\t\tlabel: labels.singular_name,\n\t\t\t\tvalue: slug,\n\t\t\t} ) ),\n\t\t[ postTypes ]\n\t);\n\tconst postTypeFormatSupportMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] =\n\t\t\t\ttype.supports?.[ 'post-formats' ] || false;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\treturn {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t};\n};\n\n/**\n * Hook that returns the taxonomies associated with a specific post type.\n *\n * @param {string} postType The post type from which to retrieve the associated taxonomies.\n * @return {Object[]} An array of the associated taxonomies.\n */\nexport const useTaxonomies = ( postType ) => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies, getPostType } = select( coreStore );\n\t\t\t// Does the post type have taxonomies?\n\t\t\tif ( getPostType( postType )?.taxonomies?.length > 0 ) {\n\t\t\t\treturn getTaxonomies( {\n\t\t\t\t\ttype: postType,\n\t\t\t\t\tper_page: -1,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn [];\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => !! visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\n/**\n * Hook that returns whether a specific post type is hierarchical.\n *\n * @param {string} postType The post type to check.\n * @return {boolean} Whether a specific post type is hierarchical.\n */\nexport function useIsPostTypeHierarchical( postType ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn type?.viewable && type?.hierarchical;\n\t\t},\n\t\t[ postType ]\n\t);\n}\n\n/**\n * List of avaiable options to order by.\n *\n * @param {string} postType The post type to check.\n * @return {OrderByOption[]} List of order options.\n */\nexport function useOrderByOptions( postType ) {\n\tconst supportsCustomOrder = useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn !! type?.supports?.[ 'page-attributes' ];\n\t\t},\n\t\t[ postType ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst orderByOptions = [\n\t\t\t{\n\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\tvalue: 'date/desc',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\tvalue: 'date/asc',\n\t\t\t},\n\t\t\t{\n\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\tlabel: __( 'A \u2192 Z' ),\n\t\t\t\tvalue: 'title/asc',\n\t\t\t},\n\t\t\t{\n\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\tlabel: __( 'Z \u2192 A' ),\n\t\t\t\tvalue: 'title/desc',\n\t\t\t},\n\t\t];\n\n\t\tif ( supportsCustomOrder ) {\n\t\t\torderByOptions.push(\n\t\t\t\t{\n\t\t\t\t\t/* translators: Label for ordering posts by ascending menu order. */\n\t\t\t\t\tlabel: __( 'Ascending by order' ),\n\t\t\t\t\tvalue: 'menu_order/asc',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t/* translators: Label for ordering posts by descending menu order. */\n\t\t\t\t\tlabel: __( 'Descending by order' ),\n\t\t\t\t\tvalue: 'menu_order/desc',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn orderByOptions;\n\t}, [ supportsCustomOrder ] );\n}\n\n/**\n * Hook that returns the query properties' names defined by the active\n * block variation, to determine which block's filters to show.\n *\n * @param {Object} attributes Block attributes.\n * @return {string[]} An array of the query attributes.\n */\nexport function useAllowedControls( attributes ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.allowedControls,\n\n\t\t[ attributes ]\n\t);\n}\nexport function isControlAllowed( allowedControls, key ) {\n\t// Every controls is allowed if the list is not defined.\n\tif ( ! allowedControls ) {\n\t\treturn true;\n\t}\n\treturn allowedControls.includes( key );\n}\n\n/**\n * Clones a pattern's blocks and then recurses over that list of blocks,\n * transforming them to retain some `query` attribute properties.\n * For now we retain the `postType` and `inherit` properties as they are\n * fundamental for the expected functionality of the block and don't affect\n * its design and presentation.\n *\n * Returns the cloned/transformed blocks and array of existing Query Loop\n * client ids for further manipulation, in order to avoid multiple recursions.\n *\n * @param {WPBlock[]} blocks The list of blocks to look through and transform(mutate).\n * @param {Record<string,*>} queryBlockAttributes The existing Query Loop's attributes.\n * @return {{ newBlocks: WPBlock[], queryClientIds: string[] }} An object with the cloned/transformed blocks and all the Query Loop clients from these blocks.\n */\nexport const getTransformedBlocksFromPattern = (\n\tblocks,\n\tqueryBlockAttributes\n) => {\n\tconst {\n\t\tquery: { postType, inherit },\n\t\tnamespace,\n\t} = queryBlockAttributes;\n\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\tconst queryClientIds = [];\n\tconst blocksQueue = [ ...clonedBlocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\t\tif ( block.name === 'core/query' ) {\n\t\t\tblock.attributes.query = {\n\t\t\t\t...block.attributes.query,\n\t\t\t\tpostType,\n\t\t\t\tinherit,\n\t\t\t};\n\t\t\tif ( namespace ) {\n\t\t\t\tblock.attributes.namespace = namespace;\n\t\t\t}\n\t\t\tqueryClientIds.push( block.clientId );\n\t\t}\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\treturn { newBlocks: clonedBlocks, queryClientIds };\n};\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific patterns for this variation.\n * If there are, these patterns are going to be the only ones suggested to\n * the user in setup and replace flow, without including the default ones\n * for Query Loop.\n *\n * If there are no such patterns, the default ones for Query Loop are going\n * to be suggested.\n *\n * @param {string} clientId The block's client ID.\n * @param {Object} attributes The block's attributes.\n * @return {string} The block name to be used in the patterns suggestions.\n */\nexport function useBlockNameForPatterns( clientId, attributes ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst activeVariationName = select(\n\t\t\t\tblocksStore\n\t\t\t).getActiveBlockVariation( 'core/query', attributes )?.name;\n\n\t\t\tif ( ! activeVariationName ) {\n\t\t\t\treturn 'core/query';\n\t\t\t}\n\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst activePatterns = getPatternsByBlockTypes(\n\t\t\t\t`core/query/${ activeVariationName }`,\n\t\t\t\trootClientId\n\t\t\t);\n\n\t\t\treturn activePatterns.length > 0\n\t\t\t\t? `core/query/${ activeVariationName }`\n\t\t\t\t: 'core/query';\n\t\t},\n\t\t[ clientId, attributes ]\n\t);\n}\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific scoped `block` variations connected with\n * this variation.\n *\n * If there are, these variations are going to be the only ones suggested\n * to the user in setup flow when clicking to `start blank`, without including\n * the default ones for Query Loop.\n *\n * If there are no such scoped `block` variations, the default ones for Query\n * Loop are going to be suggested.\n *\n * The way we determine such variations is with the convention that they have the `namespace`\n * attribute defined as an array. This array should contain the names(`name` property) of any\n * variations they want to be connected to.\n * For example, if we have a `Query Loop` scoped `inserter` variation with the name `products`,\n * we can connect a scoped `block` variation by setting its `namespace` attribute to `['products']`.\n * If the user selects this variation, the `namespace` attribute will be overridden by the\n * main `inserter` variation.\n *\n * @param {Object} attributes The block's attributes.\n * @return {WPBlockVariation[]} The block variations to be suggested in setup flow, when clicking to `start blank`.\n */\nexport function useScopedBlockVariations( attributes ) {\n\tconst { activeVariationName, blockVariations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\treturn {\n\t\t\t\tactiveVariationName: getActiveBlockVariation(\n\t\t\t\t\t'core/query',\n\t\t\t\t\tattributes\n\t\t\t\t)?.name,\n\t\t\t\tblockVariations: getBlockVariations( 'core/query', 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ attributes ]\n\t);\n\tconst variations = useMemo( () => {\n\t\t// Filter out the variations that have defined a `namespace` attribute,\n\t\t// which means they are 'connected' to specific variations of the block.\n\t\tconst isNotConnected = ( variation ) =>\n\t\t\t! variation.attributes?.namespace;\n\t\tif ( ! activeVariationName ) {\n\t\t\treturn blockVariations.filter( isNotConnected );\n\t\t}\n\t\tconst connectedVariations = blockVariations.filter( ( variation ) =>\n\t\t\tvariation.attributes?.namespace?.includes( activeVariationName )\n\t\t);\n\t\tif ( !! connectedVariations.length ) {\n\t\t\treturn connectedVariations;\n\t\t}\n\t\treturn blockVariations.filter( isNotConnected );\n\t}, [ activeVariationName, blockVariations ] );\n\treturn variations;\n}\n\n/**\n * Hook that returns the block patterns for a specific block type.\n *\n * @param {string} clientId The block's client ID.\n * @param {string} name The block type name.\n * @return {Object[]} An array of valid block patterns.\n */\nexport const usePatterns = ( clientId, name ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn getPatternsByBlockTypes( name, rootClientId );\n\t\t},\n\t\t[ name, clientId ]\n\t);\n};\n\n/**\n * Hook that, given a block clientId, determines if it has unsupported blocks or not.\n *\n * @param {string} clientId The block's client ID.\n * @return {boolean} True if there are any unsupported blocks.\n */\nexport const useUnsupportedBlocks = ( clientId ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getClientIdsOfDescendants, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getClientIdsOfDescendants( clientId ).some(\n\t\t\t\t( descendantClientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( descendantClientId );\n\t\t\t\t\t/*\n\t\t\t\t\t * Client side navigation can be true in two states:\n\t\t\t\t\t * - supports.interactivity = true;\n\t\t\t\t\t * - supports.interactivity.clientNavigation = true;\n\t\t\t\t\t */\n\t\t\t\t\tconst blockSupportsInteractivity = Object.is(\n\t\t\t\t\t\tgetBlockSupport( blockName, 'interactivity' ),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\tconst blockSupportsInteractivityClientNavigation =\n\t\t\t\t\t\tgetBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'interactivity.clientNavigation'\n\t\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! blockSupportsInteractivity &&\n\t\t\t\t\t\t! blockSupportsInteractivityClientNavigation\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n};\n\n/**\n * Helper function that returns the query context from the editor based on the\n * available template slug.\n *\n * @param {string} templateSlug Current template slug based on context.\n * @return {Object} An object with isSingular and templateType properties.\n */\nexport function getQueryContextFromTemplate( templateSlug ) {\n\t// In the Post Editor, the template slug is not available.\n\tif ( ! templateSlug ) {\n\t\treturn { isSingular: true };\n\t}\n\tlet isSingular = false;\n\tlet templateType = templateSlug === 'wp' ? 'custom' : templateSlug;\n\tconst singularTemplates = [ '404', 'blank', 'single', 'page', 'custom' ];\n\tconst templateTypeFromSlug = templateSlug.includes( '-' )\n\t\t? templateSlug.split( '-', 1 )[ 0 ]\n\t\t: templateSlug;\n\tconst queryFromTemplateSlug = templateSlug.includes( '-' )\n\t\t? templateSlug.split( '-' ).slice( 1 ).join( '-' )\n\t\t: '';\n\tif ( queryFromTemplateSlug ) {\n\t\ttemplateType = templateTypeFromSlug;\n\t}\n\tisSingular = singularTemplates.includes( templateType );\n\n\treturn { isSingular, templateType };\n}\n"],
5
- "mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,wBAAwB;AAC1C,SAAS,sBAAsB;AAC/B,SAAS,UAAU;AACnB;AAAA,EACC;AAAA,EACA;AAAA,EACA,SAAS;AAAA,OACH;AA8BA,IAAM,kBAAkB,CAAE,aAAc;AAC9C,QAAM,UAAU,UAAU;AAAA,IACzB,CAAE,aAAa,WAAY;AAC1B,YAAM,EAAE,SAAS,WAAW,MAAM,IAAI;AACtC,cAAS,OAAO,EAAG,IAAI;AACvB,gBAAW,OAAO,IAAK,IAAI;AAC3B,YAAM,KAAM,OAAO,IAAK;AACxB,aAAO;AAAA,IACR;AAAA,IACA,EAAE,SAAS,CAAC,GAAG,WAAW,CAAC,GAAG,OAAO,CAAC,EAAE;AAAA,EACzC;AACA,SAAO;AAAA,IACN;AAAA,IACA,GAAG;A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AAM,GAAI,IAC/C;AACH,MAAK,uBAAwB;AAC5B,mBAAe;AAAA,EAChB;AACA,eAAa,kBAAkB,SAAU,YAAa;AAEtD,SAAO,EAAE,YAAY,aAAa;AACnC;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tcloneBlock,\n\tgetBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n/** @typedef {import('@wordpress/components/build-types/query-controls/types').OrderByOption} OrderByOption */\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\n/**\n * The object used in Query block that contains info and helper mappings\n * from an array of IHasNameAndId objects.\n *\n * @typedef {Object} QueryEntitiesInfo\n * @property {IHasNameAndId[]} entities The array of entities.\n * @property {Object<string, IHasNameAndId>} mapById Object mapping with the id as key and the entity as value.\n * @property {Object<string, IHasNameAndId>} mapByName Object mapping with the name as key and the entity as value.\n * @property {string[]} names Array with the entities' names.\n */\n\n/**\n * Returns a helper object with mapping from Objects that implement\n * the `IHasNameAndId` interface. The returned object is used for\n * integration with `FormTokenField` component.\n *\n * @param {IHasNameAndId[]} entities The entities to extract of helper object.\n * @return {QueryEntitiesInfo} The object with the entities information.\n */\nexport const getEntitiesInfo = ( entities ) => {\n\tconst mapping = entities?.reduce(\n\t\t( accumulator, entity ) => {\n\t\t\tconst { mapById, mapByName, names } = accumulator;\n\t\t\tmapById[ entity.id ] = entity;\n\t\t\tmapByName[ entity.name ] = entity;\n\t\t\tnames.push( entity.name );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ mapById: {}, mapByName: {}, names: [] }\n\t);\n\treturn {\n\t\tentities,\n\t\t...mapping,\n\t};\n};\n\n/**\n * Helper util to return a value from a certain path of the object.\n * Path is specified as a string of properties, separated by dots,\n * for example: \"parent.child\".\n *\n * @param {Object} object Input object.\n * @param {string} path Path to the object property.\n * @return {*} Value of the object property at the specified path.\n */\nexport const getValueFromObjectPath = ( object, path ) => {\n\tconst normalizedPath = path.split( '.' );\n\tlet value = object;\n\tnormalizedPath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of entities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * Returns a helper object that contains:\n * 1. An `options` object from the available post types, to be passed to a `SelectControl`.\n * 2. A helper map with available taxonomies per post type.\n * 3. A helper map with post format support per post type.\n *\n * @return {Object} The helper object related to post types.\n */\nexport const usePostTypes = () => {\n\tconst postTypes = useSelect( ( select ) => {\n\t\tconst { getPostTypes } = select( coreStore );\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\tconst filteredPostTypes = getPostTypes( { per_page: -1 } )?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t\treturn filteredPostTypes;\n\t}, [] );\n\tconst postTypesTaxonomiesMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn;\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] = type.taxonomies;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\tconst postTypesSelectOptions = useMemo(\n\t\t() =>\n\t\t\t( postTypes || [] ).map( ( { labels, slug } ) => ( {\n\t\t\t\tlabel: labels.singular_name,\n\t\t\t\tvalue: slug,\n\t\t\t} ) ),\n\t\t[ postTypes ]\n\t);\n\tconst postTypeFormatSupportMap = useMemo( () => {\n\t\tif ( ! postTypes?.length ) {\n\t\t\treturn {};\n\t\t}\n\t\treturn postTypes.reduce( ( accumulator, type ) => {\n\t\t\taccumulator[ type.slug ] =\n\t\t\t\ttype.supports?.[ 'post-formats' ] || false;\n\t\t\treturn accumulator;\n\t\t}, {} );\n\t}, [ postTypes ] );\n\treturn {\n\t\tpostTypesTaxonomiesMap,\n\t\tpostTypesSelectOptions,\n\t\tpostTypeFormatSupportMap,\n\t};\n};\n\n/**\n * Hook that returns the taxonomies associated with a specific post type.\n *\n * @param {string} postType The post type from which to retrieve the associated taxonomies.\n * @return {Object[]} An array of the associated taxonomies.\n */\nexport const useTaxonomies = ( postType ) => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getTaxonomies, getPostType } = select( coreStore );\n\t\t\t// Does the post type have taxonomies?\n\t\t\tif ( getPostType( postType )?.taxonomies?.length > 0 ) {\n\t\t\t\treturn getTaxonomies( {\n\t\t\t\t\ttype: postType,\n\t\t\t\t\tper_page: -1,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn [];\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => !! visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\n/**\n * Hook that returns whether a specific post type is hierarchical.\n *\n * @param {string} postType The post type to check.\n * @return {boolean} Whether a specific post type is hierarchical.\n */\nexport function useIsPostTypeHierarchical( postType ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn type?.viewable && type?.hierarchical;\n\t\t},\n\t\t[ postType ]\n\t);\n}\n\n/**\n * List of avaiable options to order by.\n *\n * @param {string} postType The post type to check.\n * @return {OrderByOption[]} List of order options.\n */\nexport function useOrderByOptions( postType ) {\n\tconst supportsCustomOrder = useSelect(\n\t\t( select ) => {\n\t\t\tconst type = select( coreStore ).getPostType( postType );\n\t\t\treturn !! type?.supports?.[ 'page-attributes' ];\n\t\t},\n\t\t[ postType ]\n\t);\n\n\treturn useMemo( () => {\n\t\tconst orderByOptions = [\n\t\t\t{\n\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\tvalue: 'date/desc',\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\tvalue: 'date/asc',\n\t\t\t},\n\t\t\t{\n\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\tvalue: 'title/asc',\n\t\t\t},\n\t\t\t{\n\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\tvalue: 'title/desc',\n\t\t\t},\n\t\t];\n\n\t\tif ( supportsCustomOrder ) {\n\t\t\torderByOptions.push(\n\t\t\t\t{\n\t\t\t\t\t/* translators: Label for ordering posts by ascending menu order. */\n\t\t\t\t\tlabel: __( 'Ascending by order' ),\n\t\t\t\t\tvalue: 'menu_order/asc',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t/* translators: Label for ordering posts by descending menu order. */\n\t\t\t\t\tlabel: __( 'Descending by order' ),\n\t\t\t\t\tvalue: 'menu_order/desc',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\treturn orderByOptions;\n\t}, [ supportsCustomOrder ] );\n}\n\n/**\n * Hook that returns the query properties' names defined by the active\n * block variation, to determine which block's filters to show.\n *\n * @param {Object} attributes Block attributes.\n * @return {string[]} An array of the query attributes.\n */\nexport function useAllowedControls( attributes ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( blocksStore ).getActiveBlockVariation(\n\t\t\t\t'core/query',\n\t\t\t\tattributes\n\t\t\t)?.allowedControls,\n\n\t\t[ attributes ]\n\t);\n}\nexport function isControlAllowed( allowedControls, key ) {\n\t// Every controls is allowed if the list is not defined.\n\tif ( ! allowedControls ) {\n\t\treturn true;\n\t}\n\treturn allowedControls.includes( key );\n}\n\n/**\n * Clones a pattern's blocks and then recurses over that list of blocks,\n * transforming them to retain some `query` attribute properties.\n * For now we retain the `postType` and `inherit` properties as they are\n * fundamental for the expected functionality of the block and don't affect\n * its design and presentation.\n *\n * Returns the cloned/transformed blocks and array of existing Query Loop\n * client ids for further manipulation, in order to avoid multiple recursions.\n *\n * @param {WPBlock[]} blocks The list of blocks to look through and transform(mutate).\n * @param {Record<string,*>} queryBlockAttributes The existing Query Loop's attributes.\n * @return {{ newBlocks: WPBlock[], queryClientIds: string[] }} An object with the cloned/transformed blocks and all the Query Loop clients from these blocks.\n */\nexport const getTransformedBlocksFromPattern = (\n\tblocks,\n\tqueryBlockAttributes\n) => {\n\tconst {\n\t\tquery: { postType, inherit },\n\t\tnamespace,\n\t} = queryBlockAttributes;\n\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\tconst queryClientIds = [];\n\tconst blocksQueue = [ ...clonedBlocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\t\tif ( block.name === 'core/query' ) {\n\t\t\tblock.attributes.query = {\n\t\t\t\t...block.attributes.query,\n\t\t\t\tpostType,\n\t\t\t\tinherit,\n\t\t\t};\n\t\t\tif ( namespace ) {\n\t\t\t\tblock.attributes.namespace = namespace;\n\t\t\t}\n\t\t\tqueryClientIds.push( block.clientId );\n\t\t}\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\treturn { newBlocks: clonedBlocks, queryClientIds };\n};\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific patterns for this variation.\n * If there are, these patterns are going to be the only ones suggested to\n * the user in setup and replace flow, without including the default ones\n * for Query Loop.\n *\n * If there are no such patterns, the default ones for Query Loop are going\n * to be suggested.\n *\n * @param {string} clientId The block's client ID.\n * @param {Object} attributes The block's attributes.\n * @return {string} The block name to be used in the patterns suggestions.\n */\nexport function useBlockNameForPatterns( clientId, attributes ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst activeVariationName = select(\n\t\t\t\tblocksStore\n\t\t\t).getActiveBlockVariation( 'core/query', attributes )?.name;\n\n\t\t\tif ( ! activeVariationName ) {\n\t\t\t\treturn 'core/query';\n\t\t\t}\n\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tconst activePatterns = getPatternsByBlockTypes(\n\t\t\t\t`core/query/${ activeVariationName }`,\n\t\t\t\trootClientId\n\t\t\t);\n\n\t\t\treturn activePatterns.length > 0\n\t\t\t\t? `core/query/${ activeVariationName }`\n\t\t\t\t: 'core/query';\n\t\t},\n\t\t[ clientId, attributes ]\n\t);\n}\n\n/**\n * Helper hook that determines if there is an active variation of the block\n * and if there are available specific scoped `block` variations connected with\n * this variation.\n *\n * If there are, these variations are going to be the only ones suggested\n * to the user in setup flow when clicking to `start blank`, without including\n * the default ones for Query Loop.\n *\n * If there are no such scoped `block` variations, the default ones for Query\n * Loop are going to be suggested.\n *\n * The way we determine such variations is with the convention that they have the `namespace`\n * attribute defined as an array. This array should contain the names(`name` property) of any\n * variations they want to be connected to.\n * For example, if we have a `Query Loop` scoped `inserter` variation with the name `products`,\n * we can connect a scoped `block` variation by setting its `namespace` attribute to `['products']`.\n * If the user selects this variation, the `namespace` attribute will be overridden by the\n * main `inserter` variation.\n *\n * @param {Object} attributes The block's attributes.\n * @return {WPBlockVariation[]} The block variations to be suggested in setup flow, when clicking to `start blank`.\n */\nexport function useScopedBlockVariations( attributes ) {\n\tconst { activeVariationName, blockVariations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\treturn {\n\t\t\t\tactiveVariationName: getActiveBlockVariation(\n\t\t\t\t\t'core/query',\n\t\t\t\t\tattributes\n\t\t\t\t)?.name,\n\t\t\t\tblockVariations: getBlockVariations( 'core/query', 'block' ),\n\t\t\t};\n\t\t},\n\t\t[ attributes ]\n\t);\n\tconst variations = useMemo( () => {\n\t\t// Filter out the variations that have defined a `namespace` attribute,\n\t\t// which means they are 'connected' to specific variations of the block.\n\t\tconst isNotConnected = ( variation ) =>\n\t\t\t! variation.attributes?.namespace;\n\t\tif ( ! activeVariationName ) {\n\t\t\treturn blockVariations.filter( isNotConnected );\n\t\t}\n\t\tconst connectedVariations = blockVariations.filter( ( variation ) =>\n\t\t\tvariation.attributes?.namespace?.includes( activeVariationName )\n\t\t);\n\t\tif ( !! connectedVariations.length ) {\n\t\t\treturn connectedVariations;\n\t\t}\n\t\treturn blockVariations.filter( isNotConnected );\n\t}, [ activeVariationName, blockVariations ] );\n\treturn variations;\n}\n\n/**\n * Hook that returns the block patterns for a specific block type.\n *\n * @param {string} clientId The block's client ID.\n * @param {string} name The block type name.\n * @return {Object[]} An array of valid block patterns.\n */\nexport const usePatterns = ( clientId, name ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getPatternsByBlockTypes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\treturn getPatternsByBlockTypes( name, rootClientId );\n\t\t},\n\t\t[ name, clientId ]\n\t);\n};\n\n/**\n * Hook that, given a block clientId, determines if it has unsupported blocks or not.\n *\n * @param {string} clientId The block's client ID.\n * @return {boolean} True if there are any unsupported blocks.\n */\nexport const useUnsupportedBlocks = ( clientId ) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getClientIdsOfDescendants, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getClientIdsOfDescendants( clientId ).some(\n\t\t\t\t( descendantClientId ) => {\n\t\t\t\t\tconst blockName = getBlockName( descendantClientId );\n\t\t\t\t\t/*\n\t\t\t\t\t * Client side navigation can be true in two states:\n\t\t\t\t\t * - supports.interactivity = true;\n\t\t\t\t\t * - supports.interactivity.clientNavigation = true;\n\t\t\t\t\t */\n\t\t\t\t\tconst blockSupportsInteractivity = Object.is(\n\t\t\t\t\t\tgetBlockSupport( blockName, 'interactivity' ),\n\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t\t\tconst blockSupportsInteractivityClientNavigation =\n\t\t\t\t\t\tgetBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'interactivity.clientNavigation'\n\t\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! blockSupportsInteractivity &&\n\t\t\t\t\t\t! blockSupportsInteractivityClientNavigation\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n};\n\n/**\n * Helper function that returns the query context from the editor based on the\n * available template slug.\n *\n * @param {string} templateSlug Current template slug based on context.\n * @return {Object} An object with isSingular and templateType properties.\n */\nexport function getQueryContextFromTemplate( templateSlug ) {\n\t// In the Post Editor, the template slug is not available.\n\tif ( ! templateSlug ) {\n\t\treturn { isSingular: true };\n\t}\n\tlet isSingular = false;\n\tlet templateType = templateSlug === 'wp' ? 'custom' : templateSlug;\n\tconst singularTemplates = [ '404', 'blank', 'single', 'page', 'custom' ];\n\tconst templateTypeFromSlug = templateSlug.includes( '-' )\n\t\t? templateSlug.split( '-', 1 )[ 0 ]\n\t\t: templateSlug;\n\tconst queryFromTemplateSlug = templateSlug.includes( '-' )\n\t\t? templateSlug.split( '-' ).slice( 1 ).join( '-' )\n\t\t: '';\n\tif ( queryFromTemplateSlug ) {\n\t\ttemplateType = templateTypeFromSlug;\n\t}\n\tisSingular = singular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MnD,gBAAM,6BAA6B,OAAO;AAAA,YACzC,gBAAiB,WAAW,eAAgB;AAAA,YAC5C;AAAA,UACD;AACA,gBAAM,6CACL;AAAA,YACC;AAAA,YACA;AAAA,UACD;AAED,iBACC,CAAE,8BACF,CAAE;AAAA,QAEJ;AAAA,MACD;AAAA,IACD;AAAA,IACA,CAAE,QAAS;AAAA,EACZ;AACD;AASO,SAAS,4BAA6B,cAAe;AAE3D,MAAK,CAAE,cAAe;AACrB,WAAO,EAAE,YAAY,KAAK;AAAA,EAC3B;AACA,MAAI,aAAa;AACjB,MAAI,eAAe,iBAAiB,OAAO,WAAW;AACtD,QAAM,oBAAoB,CAAE,OAAO,SAAS,UAAU,QAAQ,QAAS;AACvE,QAAM,uBAAuB,aAAa,SAAU,GAAI,IACrD,aAAa,MAAO,KAAK,CAAE,EAAG,CAAE,IAChC;AACH,QAAM,wBAAwB,aAAa,SAAU,GAAI,IACtD,aAAa,MAAO,GAAI,EAAE,MAAO,CAAE,EAAE,KAAM,GAAI,IAC/C;AACH,MAAK,uBAAwB;AAC5B,mBAAe;AAAA,EAChB;AACA,eAAa,kBAAkB,SAAU,YAAa;AAEtD,SAAO,EAAE,YAAY,aAAa;AACnC;",
6
6
  "names": []
7
7
  }
@@ -4,8 +4,8 @@ import { useBlockProps, PlainText } from "@wordpress/block-editor";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  var arrowMap = {
6
6
  none: "",
7
- arrow: "\u2192",
8
- chevron: "\xBB"
7
+ arrow: "",
8
+ chevron: "»"
9
9
  };
10
10
  function QueryPaginationNextEdit({
11
11
  attributes: { label },