@wordpress/block-library 8.18.0 → 8.19.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 (393) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +1 -1
  3. package/build/block/edit.js +53 -2
  4. package/build/block/edit.js.map +1 -1
  5. package/build/button/edit.js +7 -4
  6. package/build/button/edit.js.map +1 -1
  7. package/build/button/index.js +11 -2
  8. package/build/button/index.js.map +1 -1
  9. package/build/button/save.js +10 -4
  10. package/build/button/save.js.map +1 -1
  11. package/build/buttons/edit.js +12 -3
  12. package/build/buttons/edit.js.map +1 -1
  13. package/build/code/edit.js +8 -2
  14. package/build/code/edit.js.map +1 -1
  15. package/build/code/index.js +7 -1
  16. package/build/code/index.js.map +1 -1
  17. package/build/column/edit.native.js +5 -5
  18. package/build/column/edit.native.js.map +1 -1
  19. package/build/column/index.js +1 -0
  20. package/build/column/index.js.map +1 -1
  21. package/build/columns/index.js +2 -0
  22. package/build/columns/index.js.map +1 -1
  23. package/build/file/edit.native.js +1 -1
  24. package/build/file/edit.native.js.map +1 -1
  25. package/build/file/index.js +2 -1
  26. package/build/file/index.js.map +1 -1
  27. package/build/file/utils/index.js +1 -15
  28. package/build/file/utils/index.js.map +1 -1
  29. package/build/file/view.js +14 -1
  30. package/build/file/view.js.map +1 -1
  31. package/build/footnotes/edit.js +14 -5
  32. package/build/footnotes/edit.js.map +1 -1
  33. package/build/gallery/edit.js +1 -1
  34. package/build/gallery/edit.js.map +1 -1
  35. package/build/group/edit.js +0 -1
  36. package/build/group/edit.js.map +1 -1
  37. package/build/group/index.js +5 -0
  38. package/build/group/index.js.map +1 -1
  39. package/build/heading/edit.js +0 -1
  40. package/build/heading/edit.js.map +1 -1
  41. package/build/heading/index.js +2 -0
  42. package/build/heading/index.js.map +1 -1
  43. package/build/heading/transforms.js +3 -6
  44. package/build/heading/transforms.js.map +1 -1
  45. package/build/image/deprecated.js +191 -7
  46. package/build/image/deprecated.js.map +1 -1
  47. package/build/image/edit.js +27 -12
  48. package/build/image/edit.js.map +1 -1
  49. package/build/image/image.js +75 -40
  50. package/build/image/image.js.map +1 -1
  51. package/build/image/index.js +7 -4
  52. package/build/image/index.js.map +1 -1
  53. package/build/image/{view-interactivity.js → view.js} +1 -1
  54. package/build/image/view.js.map +1 -0
  55. package/build/list/deprecated.js +93 -1
  56. package/build/list/deprecated.js.map +1 -1
  57. package/build/list/edit.js +10 -10
  58. package/build/list/edit.js.map +1 -1
  59. package/build/list/ordered-list-settings.js +10 -10
  60. package/build/list/ordered-list-settings.js.map +1 -1
  61. package/build/list/save.js +4 -2
  62. package/build/list/save.js.map +1 -1
  63. package/build/list/utils.js +21 -2
  64. package/build/list/utils.js.map +1 -1
  65. package/build/navigation/constants.js +1 -1
  66. package/build/navigation/constants.js.map +1 -1
  67. package/build/navigation/index.js +4 -2
  68. package/build/navigation/index.js.map +1 -1
  69. package/build/navigation/view.js +168 -82
  70. package/build/navigation/view.js.map +1 -1
  71. package/build/navigation-link/edit.js +3 -9
  72. package/build/navigation-link/edit.js.map +1 -1
  73. package/build/navigation-link/transforms.js +24 -0
  74. package/build/navigation-link/transforms.js.map +1 -1
  75. package/build/page-list/edit.js +2 -1
  76. package/build/page-list/edit.js.map +1 -1
  77. package/build/post-comments-form/edit.js +10 -2
  78. package/build/post-comments-form/edit.js.map +1 -1
  79. package/build/post-comments-form/form.js +5 -3
  80. package/build/post-comments-form/form.js.map +1 -1
  81. package/build/post-content/edit.js +8 -7
  82. package/build/post-content/edit.js.map +1 -1
  83. package/build/post-content/index.js +3 -0
  84. package/build/post-content/index.js.map +1 -1
  85. package/build/post-featured-image/overlay.js +2 -1
  86. package/build/post-featured-image/overlay.js.map +1 -1
  87. package/build/post-terms/use-post-terms.js +3 -2
  88. package/build/post-terms/use-post-terms.js.map +1 -1
  89. package/build/preformatted/edit.js +4 -1
  90. package/build/preformatted/edit.js.map +1 -1
  91. package/build/preformatted/index.js +1 -1
  92. package/build/preformatted/index.js.map +1 -1
  93. package/build/pullquote/deprecated.js +6 -7
  94. package/build/pullquote/deprecated.js.map +1 -1
  95. package/build/query/edit/enhanced-pagination-modal.js +56 -0
  96. package/build/query/edit/enhanced-pagination-modal.js.map +1 -0
  97. package/build/query/edit/inspector-controls/enhanced-pagination-control.js +42 -0
  98. package/build/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  99. package/build/query/edit/inspector-controls/index.js +8 -25
  100. package/build/query/edit/inspector-controls/index.js.map +1 -1
  101. package/build/query/edit/query-content.js +8 -2
  102. package/build/query/edit/query-content.js.map +1 -1
  103. package/build/query/utils.js +19 -0
  104. package/build/query/utils.js.map +1 -1
  105. package/build/query/view.js +4 -5
  106. package/build/query/view.js.map +1 -1
  107. package/build/search/index.js +1 -0
  108. package/build/search/index.js.map +1 -1
  109. package/build/search/view.js +81 -150
  110. package/build/search/view.js.map +1 -1
  111. package/build/social-link/edit.native.js +3 -1
  112. package/build/social-link/edit.native.js.map +1 -1
  113. package/build/table/edit.js +7 -7
  114. package/build/table/edit.js.map +1 -1
  115. package/build/table-of-contents/edit.js +2 -130
  116. package/build/table-of-contents/edit.js.map +1 -1
  117. package/build/table-of-contents/hooks.js +145 -0
  118. package/build/table-of-contents/hooks.js.map +1 -0
  119. package/build/table-of-contents/index.js +2 -1
  120. package/build/table-of-contents/index.js.map +1 -1
  121. package/build/verse/edit.js +4 -1
  122. package/build/verse/edit.js.map +1 -1
  123. package/build/verse/index.js +1 -1
  124. package/build/verse/index.js.map +1 -1
  125. package/build-module/block/edit.js +54 -3
  126. package/build-module/block/edit.js.map +1 -1
  127. package/build-module/button/edit.js +7 -4
  128. package/build-module/button/edit.js.map +1 -1
  129. package/build-module/button/index.js +11 -2
  130. package/build-module/button/index.js.map +1 -1
  131. package/build-module/button/save.js +10 -4
  132. package/build-module/button/save.js.map +1 -1
  133. package/build-module/buttons/edit.js +12 -3
  134. package/build-module/buttons/edit.js.map +1 -1
  135. package/build-module/code/edit.js +8 -2
  136. package/build-module/code/edit.js.map +1 -1
  137. package/build-module/code/index.js +7 -1
  138. package/build-module/code/index.js.map +1 -1
  139. package/build-module/column/edit.native.js +5 -5
  140. package/build-module/column/edit.native.js.map +1 -1
  141. package/build-module/column/index.js +1 -0
  142. package/build-module/column/index.js.map +1 -1
  143. package/build-module/columns/index.js +2 -0
  144. package/build-module/columns/index.js.map +1 -1
  145. package/build-module/file/edit.native.js +1 -1
  146. package/build-module/file/edit.native.js.map +1 -1
  147. package/build-module/file/index.js +2 -1
  148. package/build-module/file/index.js.map +1 -1
  149. package/build-module/file/utils/index.js +0 -13
  150. package/build-module/file/utils/index.js.map +1 -1
  151. package/build-module/file/view.js +14 -2
  152. package/build-module/file/view.js.map +1 -1
  153. package/build-module/footnotes/edit.js +14 -5
  154. package/build-module/footnotes/edit.js.map +1 -1
  155. package/build-module/gallery/edit.js +1 -1
  156. package/build-module/gallery/edit.js.map +1 -1
  157. package/build-module/group/edit.js +0 -1
  158. package/build-module/group/edit.js.map +1 -1
  159. package/build-module/group/index.js +5 -0
  160. package/build-module/group/index.js.map +1 -1
  161. package/build-module/heading/edit.js +0 -1
  162. package/build-module/heading/edit.js.map +1 -1
  163. package/build-module/heading/index.js +2 -0
  164. package/build-module/heading/index.js.map +1 -1
  165. package/build-module/heading/transforms.js +3 -6
  166. package/build-module/heading/transforms.js.map +1 -1
  167. package/build-module/image/deprecated.js +191 -7
  168. package/build-module/image/deprecated.js.map +1 -1
  169. package/build-module/image/edit.js +27 -12
  170. package/build-module/image/edit.js.map +1 -1
  171. package/build-module/image/image.js +77 -42
  172. package/build-module/image/image.js.map +1 -1
  173. package/build-module/image/index.js +7 -4
  174. package/build-module/image/index.js.map +1 -1
  175. package/build-module/image/{view-interactivity.js → view.js} +1 -1
  176. package/build-module/image/view.js.map +1 -0
  177. package/build-module/list/deprecated.js +95 -3
  178. package/build-module/list/deprecated.js.map +1 -1
  179. package/build-module/list/edit.js +10 -10
  180. package/build-module/list/edit.js.map +1 -1
  181. package/build-module/list/ordered-list-settings.js +10 -10
  182. package/build-module/list/ordered-list-settings.js.map +1 -1
  183. package/build-module/list/save.js +4 -2
  184. package/build-module/list/save.js.map +1 -1
  185. package/build-module/list/utils.js +20 -2
  186. package/build-module/list/utils.js.map +1 -1
  187. package/build-module/navigation/constants.js +1 -1
  188. package/build-module/navigation/constants.js.map +1 -1
  189. package/build-module/navigation/index.js +4 -2
  190. package/build-module/navigation/index.js.map +1 -1
  191. package/build-module/navigation/view.js +168 -83
  192. package/build-module/navigation/view.js.map +1 -1
  193. package/build-module/navigation-link/edit.js +3 -9
  194. package/build-module/navigation-link/edit.js.map +1 -1
  195. package/build-module/navigation-link/transforms.js +24 -0
  196. package/build-module/navigation-link/transforms.js.map +1 -1
  197. package/build-module/page-list/edit.js +2 -1
  198. package/build-module/page-list/edit.js.map +1 -1
  199. package/build-module/post-comments-form/edit.js +10 -2
  200. package/build-module/post-comments-form/edit.js.map +1 -1
  201. package/build-module/post-comments-form/form.js +5 -3
  202. package/build-module/post-comments-form/form.js.map +1 -1
  203. package/build-module/post-content/edit.js +8 -7
  204. package/build-module/post-content/edit.js.map +1 -1
  205. package/build-module/post-content/index.js +3 -0
  206. package/build-module/post-content/index.js.map +1 -1
  207. package/build-module/post-featured-image/overlay.js +2 -1
  208. package/build-module/post-featured-image/overlay.js.map +1 -1
  209. package/build-module/post-terms/use-post-terms.js +3 -2
  210. package/build-module/post-terms/use-post-terms.js.map +1 -1
  211. package/build-module/preformatted/edit.js +4 -1
  212. package/build-module/preformatted/edit.js.map +1 -1
  213. package/build-module/preformatted/index.js +1 -1
  214. package/build-module/preformatted/index.js.map +1 -1
  215. package/build-module/pullquote/deprecated.js +6 -7
  216. package/build-module/pullquote/deprecated.js.map +1 -1
  217. package/build-module/query/edit/enhanced-pagination-modal.js +50 -0
  218. package/build-module/query/edit/enhanced-pagination-modal.js.map +1 -0
  219. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js +35 -0
  220. package/build-module/query/edit/inspector-controls/enhanced-pagination-control.js.map +1 -0
  221. package/build-module/query/edit/inspector-controls/index.js +9 -26
  222. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  223. package/build-module/query/edit/query-content.js +8 -2
  224. package/build-module/query/edit/query-content.js.map +1 -1
  225. package/build-module/query/utils.js +17 -0
  226. package/build-module/query/utils.js.map +1 -1
  227. package/build-module/query/view.js +4 -5
  228. package/build-module/query/view.js.map +1 -1
  229. package/build-module/search/index.js +1 -0
  230. package/build-module/search/index.js.map +1 -1
  231. package/build-module/search/view.js +81 -151
  232. package/build-module/search/view.js.map +1 -1
  233. package/build-module/social-link/edit.native.js +3 -1
  234. package/build-module/social-link/edit.native.js.map +1 -1
  235. package/build-module/table/edit.js +7 -7
  236. package/build-module/table/edit.js.map +1 -1
  237. package/build-module/table-of-contents/edit.js +3 -131
  238. package/build-module/table-of-contents/edit.js.map +1 -1
  239. package/build-module/table-of-contents/hooks.js +137 -0
  240. package/build-module/table-of-contents/hooks.js.map +1 -0
  241. package/build-module/table-of-contents/index.js +2 -1
  242. package/build-module/table-of-contents/index.js.map +1 -1
  243. package/build-module/verse/edit.js +4 -1
  244. package/build-module/verse/edit.js.map +1 -1
  245. package/build-module/verse/index.js +1 -1
  246. package/build-module/verse/index.js.map +1 -1
  247. package/build-style/cover/style-rtl.css +9 -0
  248. package/build-style/cover/style.css +9 -0
  249. package/build-style/editor-rtl.css +15 -9
  250. package/build-style/editor.css +15 -9
  251. package/build-style/file/style-rtl.css +5 -0
  252. package/build-style/file/style.css +5 -0
  253. package/build-style/heading/style-rtl.css +13 -0
  254. package/build-style/heading/style.css +13 -0
  255. package/build-style/navigation-link/editor-rtl.css +0 -9
  256. package/build-style/navigation-link/editor.css +0 -9
  257. package/build-style/paragraph/editor-rtl.css +5 -0
  258. package/build-style/paragraph/editor.css +5 -0
  259. package/build-style/paragraph/style-rtl.css +5 -0
  260. package/build-style/paragraph/style.css +5 -0
  261. package/build-style/post-navigation-link/style-rtl.css +3 -0
  262. package/build-style/post-navigation-link/style.css +3 -0
  263. package/build-style/query/editor-rtl.css +10 -0
  264. package/build-style/query/editor.css +10 -0
  265. package/build-style/query/style-rtl.css +1 -1
  266. package/build-style/query/style.css +1 -1
  267. package/build-style/reset-rtl.css +27 -27
  268. package/build-style/reset.css +27 -27
  269. package/build-style/style-rtl.css +35 -0
  270. package/build-style/style.css +35 -0
  271. package/package.json +32 -33
  272. package/src/audio/test/__snapshots__/edit.native.js.snap +78 -106
  273. package/src/avatar/index.php +2 -2
  274. package/src/block/edit.js +58 -2
  275. package/src/block/test/edit.native.js +2 -3
  276. package/src/button/block.json +11 -2
  277. package/src/button/edit.js +27 -11
  278. package/src/button/save.js +10 -4
  279. package/src/buttons/edit.js +13 -3
  280. package/src/buttons/test/edit.native.js +28 -24
  281. package/src/calendar/index.php +2 -2
  282. package/src/code/block.json +2 -1
  283. package/src/code/edit.js +13 -1
  284. package/src/code/index.js +5 -0
  285. package/src/column/block.json +1 -0
  286. package/src/column/edit.native.js +4 -4
  287. package/src/columns/block.json +2 -0
  288. package/src/columns/test/__snapshots__/edit.native.js.snap +14 -0
  289. package/src/columns/test/edit.native.js +47 -17
  290. package/src/comment-template/index.php +1 -1
  291. package/src/comments-pagination-next/index.php +1 -1
  292. package/src/comments-pagination-previous/index.php +1 -1
  293. package/src/cover/style.scss +12 -1
  294. package/src/cover/test/edit.js +7 -7
  295. package/src/cover/test/edit.native.js +18 -27
  296. package/src/embed/test/index.native.js +30 -45
  297. package/src/file/block.json +2 -1
  298. package/src/file/edit.native.js +1 -1
  299. package/src/file/index.php +19 -21
  300. package/src/file/style.scss +6 -1
  301. package/src/file/test/__snapshots__/edit.native.js.snap +162 -218
  302. package/src/file/utils/index.js +0 -15
  303. package/src/file/view.js +14 -5
  304. package/src/footnotes/edit.js +16 -2
  305. package/src/gallery/edit.js +1 -1
  306. package/src/gallery/index.php +1 -1
  307. package/src/group/block.json +5 -0
  308. package/src/group/edit.js +0 -1
  309. package/src/heading/block.json +2 -0
  310. package/src/heading/edit.js +0 -1
  311. package/src/heading/style.scss +4 -0
  312. package/src/heading/transforms.js +1 -6
  313. package/src/image/block.json +7 -4
  314. package/src/image/deprecated.js +210 -7
  315. package/src/image/edit.js +43 -29
  316. package/src/image/image.js +86 -43
  317. package/src/image/index.php +251 -28
  318. package/src/latest-posts/index.php +1 -1
  319. package/src/list/deprecated.js +84 -3
  320. package/src/list/edit.js +6 -3
  321. package/src/list/ordered-list-settings.js +20 -5
  322. package/src/list/save.js +10 -1
  323. package/src/list/test/edit.native.js +2 -4
  324. package/src/list/utils.js +22 -1
  325. package/src/navigation/block.json +4 -2
  326. package/src/navigation/constants.js +1 -0
  327. package/src/navigation/index.php +85 -123
  328. package/src/navigation/view.js +192 -96
  329. package/src/navigation-link/edit.js +21 -36
  330. package/src/navigation-link/editor.scss +0 -8
  331. package/src/navigation-link/transforms.js +22 -0
  332. package/src/page-list/edit.js +2 -1
  333. package/src/paragraph/editor.scss +5 -0
  334. package/src/paragraph/style.scss +5 -0
  335. package/src/pattern/index.php +2 -2
  336. package/src/post-comments-form/edit.js +10 -0
  337. package/src/post-comments-form/form.js +7 -1
  338. package/src/post-content/block.json +3 -0
  339. package/src/post-content/edit.js +14 -6
  340. package/src/post-excerpt/index.php +2 -2
  341. package/src/post-featured-image/index.php +2 -2
  342. package/src/post-featured-image/overlay.js +1 -0
  343. package/src/post-navigation-link/index.php +5 -1
  344. package/src/post-navigation-link/style.scss +4 -0
  345. package/src/post-template/index.php +1 -1
  346. package/src/post-terms/index.php +5 -2
  347. package/src/post-terms/use-post-terms.js +4 -2
  348. package/src/preformatted/edit.js +5 -0
  349. package/src/preformatted/index.js +1 -1
  350. package/src/pullquote/deprecated.js +8 -13
  351. package/src/query/edit/enhanced-pagination-modal.js +65 -0
  352. package/src/query/edit/inspector-controls/enhanced-pagination-control.js +49 -0
  353. package/src/query/edit/inspector-controls/index.js +9 -45
  354. package/src/query/edit/query-content.js +8 -0
  355. package/src/query/editor.scss +10 -0
  356. package/src/query/index.php +29 -16
  357. package/src/query/style.scss +2 -2
  358. package/src/query/utils.js +22 -0
  359. package/src/query/view.js +5 -5
  360. package/src/query-pagination-next/index.php +1 -1
  361. package/src/query-pagination-previous/index.php +1 -1
  362. package/src/reset.scss +1 -1
  363. package/src/search/block.json +1 -0
  364. package/src/search/index.php +45 -4
  365. package/src/search/test/__snapshots__/edit.native.js.snap +265 -363
  366. package/src/search/view.js +70 -169
  367. package/src/social-link/edit.native.js +1 -1
  368. package/src/social-link/editor.native.scss +4 -0
  369. package/src/table/edit.js +21 -19
  370. package/src/table-of-contents/block.json +2 -1
  371. package/src/table-of-contents/edit.js +5 -162
  372. package/src/table-of-contents/hooks.js +156 -0
  373. package/src/verse/edit.js +5 -0
  374. package/src/verse/index.js +1 -1
  375. package/src/verse/test/edit.native.js +2 -3
  376. package/build/file/view-interactivity.js +0 -22
  377. package/build/file/view-interactivity.js.map +0 -1
  378. package/build/image/view-interactivity.js.map +0 -1
  379. package/build/navigation/view-interactivity.js +0 -172
  380. package/build/navigation/view-interactivity.js.map +0 -1
  381. package/build/navigation/view-modal.js +0 -115
  382. package/build/navigation/view-modal.js.map +0 -1
  383. package/build-module/file/view-interactivity.js +0 -18
  384. package/build-module/file/view-interactivity.js.map +0 -1
  385. package/build-module/image/view-interactivity.js.map +0 -1
  386. package/build-module/navigation/view-interactivity.js +0 -169
  387. package/build-module/navigation/view-interactivity.js.map +0 -1
  388. package/build-module/navigation/view-modal.js +0 -112
  389. package/build-module/navigation/view-modal.js.map +0 -1
  390. package/src/file/view-interactivity.js +0 -18
  391. package/src/navigation/view-interactivity.js +0 -196
  392. package/src/navigation/view-modal.js +0 -127
  393. /package/src/image/{view-interactivity.js → view.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","getColorClassName","getColorObjectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","create","replace","toHTMLString","__UNSTABLE_LINE_SEPARATOR","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","multilineToInline","html","multilineTag","RegExp","v5","attributes","__experimentalRole","textAlign","save","shouldShowCitation","isEmpty","createElement","className","Content","tagName","migrate","v4","isSolidColorStyle","includes","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","border","background","text","v3","figureStyle","attribute","v2","figureClass","_select$getSettings$c","colors","getSettings","colorObject","blockquoteStyle","v1","v0","align"],"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\nimport {\n\tcreate,\n\treplace,\n\ttoHTMLString,\n\t__UNSTABLE_LINE_SEPARATOR,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\nfunction multilineToInline( value ) {\n\treturn toHTMLString( {\n\t\tvalue: replace(\n\t\t\tcreate( { html: value, multilineTag: 'p' } ),\n\t\t\tnew RegExp( __UNSTABLE_LINE_SEPARATOR, 'g' ),\n\t\t\t'\\n'\n\t\t),\n\t} );\n}\n\nconst v5 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { textAlign, citation, value } = attributes;\n\t\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: classnames( {\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t} ),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\n\nconst v4 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\ttextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses = classnames( {\n\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v3 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\t// figureStyle is an attribute that never existed.\n\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\tfigureStyle: {\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure',\n\t\t\tattribute: 'style',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t// directly from the style previously serialized.\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\t( textColor || customTextColor ) &&\n\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tfigureStyle,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\t\t// If is the default style, and a main color is set,\n\t\t// migrate the main color value into a custom border color.\n\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tif ( borderColor ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: multilineToInline( value ),\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName,\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: borderColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClass, figureStyles;\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tfigureClass = getColorClassName( 'background-color', mainColor );\n\t\t\tif ( ! figureClass ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\tconst colors =\n\t\t\t\tselect( blockEditorStore ).getSettings().colors ?? [];\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tmainColor\n\t\t\t);\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: colorObject.color,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\ttextColor || customTextColor\n\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t } )\n\t\t\t\t: undefined;\n\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\t\treturn (\n\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style = {};\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { value, citation } = attributes;\n\t\treturn (\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\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);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { value, citation, align } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v5, v4, v3, v2, v1, v0 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,+BAA+B,EAC/BC,QAAQ,EACRC,KAAK,IAAIC,gBAAgB,EACzBC,aAAa,QACP,yBAAyB;AAChC,SAASC,MAAM,QAAQ,iBAAiB;AACxC,SACCC,MAAM,EACNC,OAAO,EACPC,YAAY,EACZC,yBAAyB,QACnB,sBAAsB;;AAE7B;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,UAAU;AAE5C,MAAMC,eAAe,GAAG;EACvBC,KAAK,EAAE;IACNC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,YAAY;IACtBC,SAAS,EAAE;EACZ,CAAC;EACDC,QAAQ,EAAE;IACTJ,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,MAAM;IAChBG,OAAO,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACVN,IAAI,EAAE;EACP,CAAC;EACDO,eAAe,EAAE;IAChBP,IAAI,EAAE;EACP,CAAC;EACDQ,SAAS,EAAE;IACVR,IAAI,EAAE;EACP,CAAC;EACDS,eAAe,EAAE;IAChBT,IAAI,EAAE;EACP;AACD,CAAC;AAED,SAASU,gBAAgBA,CAAEC,WAAW,EAAG;EACxC,IAAK,CAAEA,WAAW,EAAG;IACpB;EACD;EACA,MAAMC,OAAO,GAAGD,WAAW,CAACE,KAAK,CAAE,0BAA2B,CAAC;EAC/D,IAAKD,OAAO,IAAIA,OAAO,CAAE,CAAC,CAAE,EAAG;IAC9B,OAAOA,OAAO,CAAE,CAAC,CAAE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,EAAEY,EAAE,EAAEiB,EAAE,EAAEG,EAAE,EAAEO,EAAE,EAAEC,EAAE,CAAE"}
1
+ {"version":3,"names":["classnames","getColorClassName","getColorObjectByAttributeValues","RichText","store","blockEditorStore","useBlockProps","select","SOLID_COLOR_CLASS","blockAttributes","value","type","source","selector","multiline","citation","default","mainColor","customMainColor","textColor","customTextColor","parseBorderColor","styleString","matches","match","multilineToInline","padded","values","split","shift","pop","join","v5","attributes","__experimentalRole","textAlign","save","shouldShowCitation","isEmpty","createElement","className","Content","tagName","migrate","v4","isSolidColorStyle","includes","figureClasses","figureStyles","backgroundClass","backgroundColor","undefined","borderColor","blockquoteTextColorClass","blockquoteClasses","blockquoteStyles","color","style","border","background","text","v3","figureStyle","attribute","v2","figureClass","_select$getSettings$c","colors","getSettings","colorObject","blockquoteStyle","v1","v0","align"],"sources":["@wordpress/block-library/src/pullquote/deprecated.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tRichText,\n\tstore as blockEditorStore,\n\tuseBlockProps,\n} from '@wordpress/block-editor';\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { SOLID_COLOR_CLASS } from './shared';\n\nconst blockAttributes = {\n\tvalue: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'blockquote',\n\t\tmultiline: 'p',\n\t},\n\tcitation: {\n\t\ttype: 'string',\n\t\tsource: 'html',\n\t\tselector: 'cite',\n\t\tdefault: '',\n\t},\n\tmainColor: {\n\t\ttype: 'string',\n\t},\n\tcustomMainColor: {\n\t\ttype: 'string',\n\t},\n\ttextColor: {\n\t\ttype: 'string',\n\t},\n\tcustomTextColor: {\n\t\ttype: 'string',\n\t},\n};\n\nfunction parseBorderColor( styleString ) {\n\tif ( ! styleString ) {\n\t\treturn;\n\t}\n\tconst matches = styleString.match( /border-color:([^;]+)[;]?/ );\n\tif ( matches && matches[ 1 ] ) {\n\t\treturn matches[ 1 ];\n\t}\n}\n\nfunction multilineToInline( value ) {\n\tvalue = value || `<p></p>`;\n\tconst padded = `</p>${ value }<p>`;\n\tconst values = padded.split( `</p><p>` );\n\n\tvalues.shift();\n\tvalues.pop();\n\n\treturn values.join( '<br>' );\n}\n\nconst v5 = {\n\tattributes: {\n\t\tvalue: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'blockquote',\n\t\t\tmultiline: 'p',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'cite',\n\t\t\tdefault: '',\n\t\t\t__experimentalRole: 'content',\n\t\t},\n\t\ttextAlign: {\n\t\t\ttype: 'string',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { textAlign, citation, value } = attributes;\n\t\tconst shouldShowCitation = ! RichText.isEmpty( citation );\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: classnames( {\n\t\t\t\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t\t\t\t} ),\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ shouldShowCitation && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n// TODO: this is ripe for a bit of a clean up according to the example in https://developer.wordpress.org/block-editor/reference-guides/block-api/block-deprecation/#example\n\nconst v4 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\tcustomTextColor,\n\t\t\ttextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses = classnames( {\n\t\t\t'has-text-color': textColor || customTextColor,\n\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure\n\t\t\t\t{ ...useBlockProps.save( {\n\t\t\t\t\tclassName: figureClasses,\n\t\t\t\t\tstyle: figureStyles,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v3 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\t// figureStyle is an attribute that never existed.\n\t\t// We are using it as a way to access the styles previously applied to the figure.\n\t\tfigureStyle: {\n\t\t\tsource: 'attribute',\n\t\t\tselector: 'figure',\n\t\t\tattribute: 'style',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t\tfigureStyle,\n\t\t} = attributes;\n\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClasses, figureStyles;\n\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tconst backgroundClass = getColorClassName(\n\t\t\t\t'background-color',\n\t\t\t\tmainColor\n\t\t\t);\n\n\t\t\tfigureClasses = classnames( {\n\t\t\t\t'has-background': backgroundClass || customMainColor,\n\t\t\t\t[ backgroundClass ]: backgroundClass,\n\t\t\t} );\n\n\t\t\tfigureStyles = {\n\t\t\t\tbackgroundColor: backgroundClass ? undefined : customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// If normal style and a named color are being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\t// Previously here we queried the color settings to know the color value\n\t\t\t// of a named color. This made the save function impure and the block was refactored,\n\t\t\t// because meanwhile a change in the editor made it impossible to query color settings in the save function.\n\t\t\t// Here instead of querying the color settings to know the color value, we retrieve the value\n\t\t\t// directly from the style previously serialized.\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\t( textColor || customTextColor ) &&\n\t\t\tclassnames( 'has-text-color', {\n\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t} );\n\n\t\tconst blockquoteStyles = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\n\t\treturn (\n\t\t\t<figure className={ figureClasses } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyles }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tfigureStyle,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style;\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\t\t// If is the default style, and a main color is set,\n\t\t// migrate the main color value into a custom border color.\n\t\t// The custom border color value is retrieved by parsing the figure styles.\n\t\tif ( ! isSolidColorStyle && mainColor && figureStyle ) {\n\t\t\tconst borderColor = parseBorderColor( figureStyle );\n\t\t\tif ( borderColor ) {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: multilineToInline( value ),\n\t\t\t\t\t...attributes,\n\t\t\t\t\tclassName,\n\t\t\t\t\t// Block supports: Set style.border.color if a deprecated block has `mainColor`, inline border CSS and is not a solid color style.\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\tcolor: borderColor,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v2 = {\n\tattributes: blockAttributes,\n\tsave( { attributes } ) {\n\t\tconst {\n\t\t\tmainColor,\n\t\t\tcustomMainColor,\n\t\t\ttextColor,\n\t\t\tcustomTextColor,\n\t\t\tvalue,\n\t\t\tcitation,\n\t\t\tclassName,\n\t\t} = attributes;\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\n\t\tlet figureClass, figureStyles;\n\t\t// Is solid color style\n\t\tif ( isSolidColorStyle ) {\n\t\t\tfigureClass = getColorClassName( 'background-color', mainColor );\n\t\t\tif ( ! figureClass ) {\n\t\t\t\tfigureStyles = {\n\t\t\t\t\tbackgroundColor: customMainColor,\n\t\t\t\t};\n\t\t\t}\n\t\t\t// Is normal style and a custom color is being used ( we can set a style directly with its value)\n\t\t} else if ( customMainColor ) {\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: customMainColor,\n\t\t\t};\n\t\t\t// Is normal style and a named color is being used, we need to retrieve the color value to set the style,\n\t\t\t// as there is no expectation that themes create classes that set border colors.\n\t\t} else if ( mainColor ) {\n\t\t\tconst colors =\n\t\t\t\tselect( blockEditorStore ).getSettings().colors ?? [];\n\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tmainColor\n\t\t\t);\n\t\t\tfigureStyles = {\n\t\t\t\tborderColor: colorObject.color,\n\t\t\t};\n\t\t}\n\n\t\tconst blockquoteTextColorClass = getColorClassName(\n\t\t\t'color',\n\t\t\ttextColor\n\t\t);\n\t\tconst blockquoteClasses =\n\t\t\ttextColor || customTextColor\n\t\t\t\t? classnames( 'has-text-color', {\n\t\t\t\t\t\t[ blockquoteTextColorClass ]: blockquoteTextColorClass,\n\t\t\t\t } )\n\t\t\t\t: undefined;\n\t\tconst blockquoteStyle = blockquoteTextColorClass\n\t\t\t? undefined\n\t\t\t: { color: customTextColor };\n\t\treturn (\n\t\t\t<figure className={ figureClass } style={ figureStyles }>\n\t\t\t\t<blockquote\n\t\t\t\t\tclassName={ blockquoteClasses }\n\t\t\t\t\tstyle={ blockquoteStyle }\n\t\t\t\t>\n\t\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t\t\t) }\n\t\t\t\t</blockquote>\n\t\t\t</figure>\n\t\t);\n\t},\n\tmigrate( {\n\t\tvalue,\n\t\tclassName,\n\t\tmainColor,\n\t\tcustomMainColor,\n\t\tcustomTextColor,\n\t\t...attributes\n\t} ) {\n\t\tconst isSolidColorStyle = className?.includes( SOLID_COLOR_CLASS );\n\t\tlet style = {};\n\n\t\tif ( customMainColor ) {\n\t\t\tif ( ! isSolidColorStyle ) {\n\t\t\t\t// Block supports: Set style.border.color if a deprecated block has a default style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tborder: {\n\t\t\t\t\t\tcolor: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\t// Block supports: Set style.color.background if a deprecated block has a solid style and a `customMainColor` attribute.\n\t\t\t\tstyle = {\n\t\t\t\t\tcolor: {\n\t\t\t\t\t\tbackground: customMainColor,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Block supports: Set style.color.text if a deprecated block has a `customTextColor` attribute.\n\t\tif ( customTextColor && style ) {\n\t\t\tstyle.color = {\n\t\t\t\t...style.color,\n\t\t\t\ttext: customTextColor,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\tclassName,\n\t\t\tbackgroundColor: isSolidColorStyle ? mainColor : undefined,\n\t\t\tborderColor: isSolidColorStyle ? undefined : mainColor,\n\t\t\ttextAlign: isSolidColorStyle ? 'left' : undefined,\n\t\t\tstyle,\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v1 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t},\n\tsave( { attributes } ) {\n\t\tconst { value, citation } = attributes;\n\t\treturn (\n\t\t\t<blockquote>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\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);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\nconst v0 = {\n\tattributes: {\n\t\t...blockAttributes,\n\t\tcitation: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'footer',\n\t\t},\n\t\talign: {\n\t\t\ttype: 'string',\n\t\t\tdefault: 'none',\n\t\t},\n\t},\n\n\tsave( { attributes } ) {\n\t\tconst { value, citation, align } = attributes;\n\n\t\treturn (\n\t\t\t<blockquote className={ `align${ align }` }>\n\t\t\t\t<RichText.Content value={ value } multiline />\n\t\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t\t<RichText.Content tagName=\"footer\" value={ citation } />\n\t\t\t\t) }\n\t\t\t</blockquote>\n\t\t);\n\t},\n\tmigrate( { value, ...attributes } ) {\n\t\treturn {\n\t\t\tvalue: multilineToInline( value ),\n\t\t\t...attributes,\n\t\t};\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v5, v4, v3, v2, v1, v0 ];\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SACCC,iBAAiB,EACjBC,+BAA+B,EAC/BC,QAAQ,EACRC,KAAK,IAAIC,gBAAgB,EACzBC,aAAa,QACP,yBAAyB;AAChC,SAASC,MAAM,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,UAAU;AAE5C,MAAMC,eAAe,GAAG;EACvBC,KAAK,EAAE;IACNC,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,YAAY;IACtBC,SAAS,EAAE;EACZ,CAAC;EACDC,QAAQ,EAAE;IACTJ,IAAI,EAAE,QAAQ;IACdC,MAAM,EAAE,MAAM;IACdC,QAAQ,EAAE,MAAM;IAChBG,OAAO,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IACVN,IAAI,EAAE;EACP,CAAC;EACDO,eAAe,EAAE;IAChBP,IAAI,EAAE;EACP,CAAC;EACDQ,SAAS,EAAE;IACVR,IAAI,EAAE;EACP,CAAC;EACDS,eAAe,EAAE;IAChBT,IAAI,EAAE;EACP;AACD,CAAC;AAED,SAASU,gBAAgBA,CAAEC,WAAW,EAAG;EACxC,IAAK,CAAEA,WAAW,EAAG;IACpB;EACD;EACA,MAAMC,OAAO,GAAGD,WAAW,CAACE,KAAK,CAAE,0BAA2B,CAAC;EAC/D,IAAKD,OAAO,IAAIA,OAAO,CAAE,CAAC,CAAE,EAAG;IAC9B,OAAOA,OAAO,CAAE,CAAC,CAAE;EACp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AACA;AACA;AACA;AACA;AACA;AACA,eAAe,CAAED,EAAE,EAAEY,EAAE,EAAEiB,EAAE,EAAEG,EAAE,EAAEO,EAAE,EAAEC,EAAE,CAAE"}
@@ -0,0 +1,50 @@
1
+ import { createElement } from "@wordpress/element";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { Button, Modal, __experimentalVStack as VStack } from '@wordpress/components';
6
+ import { __ } from '@wordpress/i18n';
7
+ import { useState, useEffect } from '@wordpress/element';
8
+
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ import { useContainsThirdPartyBlocks } from '../utils';
13
+ const disableEnhancedPaginationDescription = __('Plugin blocks are not supported yet. For the enhanced pagination to work, remove the plugin block, then re-enable "Enhanced pagination" in the Query Block settings.');
14
+ const modalDescriptionId = 'wp-block-query-enhanced-pagination-modal__description';
15
+ export default function EnhancedPaginationModal({
16
+ clientId,
17
+ attributes: {
18
+ enhancedPagination
19
+ },
20
+ setAttributes
21
+ }) {
22
+ const [isOpen, setOpen] = useState(false);
23
+ const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
24
+ useEffect(() => {
25
+ setOpen(containsThirdPartyBlocks && enhancedPagination);
26
+ }, [containsThirdPartyBlocks, enhancedPagination, setOpen]);
27
+ return isOpen && createElement(Modal, {
28
+ title: __('Enhanced pagination will be disabled'),
29
+ className: "wp-block-query__enhanced-pagination-modal",
30
+ aria: {
31
+ describedby: modalDescriptionId
32
+ },
33
+ isDismissible: false,
34
+ shouldCloseOnEsc: false,
35
+ shouldCloseOnClickOutside: false
36
+ }, createElement(VStack, {
37
+ alignment: "right",
38
+ spacing: 5
39
+ }, createElement("span", {
40
+ id: modalDescriptionId
41
+ }, disableEnhancedPaginationDescription), createElement(Button, {
42
+ variant: "primary",
43
+ onClick: () => {
44
+ setAttributes({
45
+ enhancedPagination: false
46
+ });
47
+ }
48
+ }, __('OK'))));
49
+ }
50
+ //# sourceMappingURL=enhanced-pagination-modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Button","Modal","__experimentalVStack","VStack","__","useState","useEffect","useContainsThirdPartyBlocks","disableEnhancedPaginationDescription","modalDescriptionId","EnhancedPaginationModal","clientId","attributes","enhancedPagination","setAttributes","isOpen","setOpen","containsThirdPartyBlocks","createElement","title","className","aria","describedby","isDismissible","shouldCloseOnEsc","shouldCloseOnClickOutside","alignment","spacing","id","variant","onClick"],"sources":["@wordpress/block-library/src/query/edit/enhanced-pagination-modal.js"],"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 { useContainsThirdPartyBlocks } from '../utils';\n\nconst disableEnhancedPaginationDescription = __(\n\t'Plugin blocks are not supported yet. For the enhanced pagination to work, remove the plugin block, then re-enable \"Enhanced pagination\" in the Query Block settings.'\n);\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\n\tconst containsThirdPartyBlocks = useContainsThirdPartyBlocks( clientId );\n\n\tuseEffect( () => {\n\t\tsetOpen( containsThirdPartyBlocks && enhancedPagination );\n\t}, [ containsThirdPartyBlocks, enhancedPagination, setOpen ] );\n\n\treturn (\n\t\tisOpen && (\n\t\t\t<Modal\n\t\t\t\ttitle={ __( 'Enhanced pagination will be disabled' ) }\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\tisDismissible={ false }\n\t\t\t\tshouldCloseOnEsc={ false }\n\t\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\t>\n\t\t\t\t<VStack alignment=\"right\" spacing={ 5 }>\n\t\t\t\t\t<span id={ modalDescriptionId }>\n\t\t\t\t\t\t{ disableEnhancedPaginationDescription }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetAttributes( { enhancedPagination: false } );\n\t\t\t\t\t\t} }\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"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,MAAM,EACNC,KAAK,EACLC,oBAAoB,IAAIC,MAAM,QACxB,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,QAAQ,EAAEC,SAAS,QAAQ,oBAAoB;;AAExD;AACA;AACA;AACA,SAASC,2BAA2B,QAAQ,UAAU;AAEtD,MAAMC,oCAAoC,GAAGJ,EAAE,CAC9C,sKACD,CAAC;AAED,MAAMK,kBAAkB,GACvB,uDAAuD;AAExD,eAAe,SAASC,uBAAuBA,CAAE;EAChDC,QAAQ;EACRC,UAAU,EAAE;IAAEC;EAAmB,CAAC;EAClCC;AACD,CAAC,EAAG;EACH,MAAM,CAAEC,MAAM,EAAEC,OAAO,CAAE,GAAGX,QAAQ,CAAE,KAAM,CAAC;EAE7C,MAAMY,wBAAwB,GAAGV,2BAA2B,CAAEI,QAAS,CAAC;EAExEL,SAAS,CAAE,MAAM;IAChBU,OAAO,CAAEC,wBAAwB,IAAIJ,kBAAmB,CAAC;EAC1D,CAAC,EAAE,CAAEI,wBAAwB,EAAEJ,kBAAkB,EAAEG,OAAO,CAAG,CAAC;EAE9D,OACCD,MAAM,IACLG,aAAA,CAACjB,KAAK;IACLkB,KAAK,EAAGf,EAAE,CAAE,sCAAuC,CAAG;IACtDgB,SAAS,EAAC,2CAA2C;IACrDC,IAAI,EAAG;MACNC,WAAW,EAAEb;IACd,CAAG;IACHc,aAAa,EAAG,KAAO;IACvBC,gBAAgB,EAAG,KAAO;IAC1BC,yBAAyB,EAAG;EAAO,GAEnCP,aAAA,CAACf,MAAM;IAACuB,SAAS,EAAC,OAAO;IAACC,OAAO,EAAG;EAAG,GACtCT,aAAA;IAAMU,EAAE,EAAGnB;EAAoB,GAC5BD,oCACG,CAAC,EACPU,aAAA,CAAClB,MAAM;IACN6B,OAAO,EAAC,SAAS;IACjBC,OAAO,EAAGA,CAAA,KAAM;MACfhB,aAAa,CAAE;QAAED,kBAAkB,EAAE;MAAM,CAAE,CAAC;IAC/C;EAAG,GAEDT,EAAE,CAAE,IAAK,CACJ,CACD,CACF,CACP;AAEH"}
@@ -0,0 +1,35 @@
1
+ import { createElement, Fragment } from "@wordpress/element";
2
+ /**
3
+ * WordPress dependencies
4
+ */
5
+ import { ToggleControl, Notice } from '@wordpress/components';
6
+ import { __ } from '@wordpress/i18n';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import { useContainsThirdPartyBlocks } from '../../utils';
12
+ export default function EnhancedPaginationControl({
13
+ enhancedPagination,
14
+ setAttributes,
15
+ clientId
16
+ }) {
17
+ const enhancedPaginationNotice = __("Enhanced pagination doesn't support plugin blocks yet. If you want to enable it, you have to remove all plugin blocks from the Query Loop.");
18
+ const containsThirdPartyBlocks = useContainsThirdPartyBlocks(clientId);
19
+ return createElement(Fragment, null, createElement(ToggleControl, {
20
+ label: __('Enhanced pagination'),
21
+ help: __('Browsing between pages won’t require a full page reload.'),
22
+ checked: !!enhancedPagination,
23
+ disabled: containsThirdPartyBlocks,
24
+ onChange: value => {
25
+ setAttributes({
26
+ enhancedPagination: !!value
27
+ });
28
+ }
29
+ }), containsThirdPartyBlocks && createElement(Notice, {
30
+ status: "warning",
31
+ isDismissible: false,
32
+ className: "wp-block-query__enhanced-pagination-notice"
33
+ }, enhancedPaginationNotice));
34
+ }
35
+ //# sourceMappingURL=enhanced-pagination-control.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ToggleControl","Notice","__","useContainsThirdPartyBlocks","EnhancedPaginationControl","enhancedPagination","setAttributes","clientId","enhancedPaginationNotice","containsThirdPartyBlocks","createElement","Fragment","label","help","checked","disabled","onChange","value","status","isDismissible","className"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/enhanced-pagination-control.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToggleControl, Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContainsThirdPartyBlocks } from '../../utils';\n\nexport default function EnhancedPaginationControl( {\n\tenhancedPagination,\n\tsetAttributes,\n\tclientId,\n} ) {\n\tconst enhancedPaginationNotice = __(\n\t\t\"Enhanced pagination doesn't support plugin blocks yet. If you want to enable it, you have to remove all plugin blocks from the Query Loop.\"\n\t);\n\n\tconst containsThirdPartyBlocks = useContainsThirdPartyBlocks( clientId );\n\n\treturn (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Enhanced pagination' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Browsing between pages won’t require a full page reload.'\n\t\t\t\t) }\n\t\t\t\tchecked={ !! enhancedPagination }\n\t\t\t\tdisabled={ containsThirdPartyBlocks }\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\t{ containsThirdPartyBlocks && (\n\t\t\t\t<Notice\n\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\tclassName=\"wp-block-query__enhanced-pagination-notice\"\n\t\t\t\t>\n\t\t\t\t\t{ enhancedPaginationNotice }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,EAAEC,MAAM,QAAQ,uBAAuB;AAC7D,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,2BAA2B,QAAQ,aAAa;AAEzD,eAAe,SAASC,yBAAyBA,CAAE;EAClDC,kBAAkB;EAClBC,aAAa;EACbC;AACD,CAAC,EAAG;EACH,MAAMC,wBAAwB,GAAGN,EAAE,CAClC,4IACD,CAAC;EAED,MAAMO,wBAAwB,GAAGN,2BAA2B,CAAEI,QAAS,CAAC;EAExE,OACCG,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACV,aAAa;IACbY,KAAK,EAAGV,EAAE,CAAE,qBAAsB,CAAG;IACrCW,IAAI,EAAGX,EAAE,CACR,0DACD,CAAG;IACHY,OAAO,EAAG,CAAC,CAAET,kBAAoB;IACjCU,QAAQ,EAAGN,wBAA0B;IACrCO,QAAQ,EAAKC,KAAK,IAAM;MACvBX,aAAa,CAAE;QACdD,kBAAkB,EAAE,CAAC,CAAEY;MACxB,CAAE,CAAC;IACJ;EAAG,CACH,CAAC,EACAR,wBAAwB,IACzBC,aAAA,CAACT,MAAM;IACNiB,MAAM,EAAC,SAAS;IAChBC,aAAa,EAAG,KAAO;IACvBC,SAAS,EAAC;EAA4C,GAEpDZ,wBACK,CAER,CAAC;AAEL"}
@@ -6,8 +6,7 @@ import { PanelBody, TextControl, SelectControl, RangeControl, ToggleControl, Not
6
6
  import { __ } from '@wordpress/i18n';
7
7
  import { InspectorControls, privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
  import { debounce } from '@wordpress/compose';
9
- import { useEffect, useState, useCallback, useRef } from '@wordpress/element';
10
- import { speak } from '@wordpress/a11y';
9
+ import { useEffect, useState, useCallback } from '@wordpress/element';
11
10
 
12
11
  /**
13
12
  * Internal dependencies
@@ -17,6 +16,7 @@ import AuthorControl from './author-control';
17
16
  import ParentControl from './parent-control';
18
17
  import { TaxonomyControls } from './taxonomy-controls';
19
18
  import StickyControl from './sticky-control';
19
+ import EnhancedPaginationControl from './enhanced-pagination-control';
20
20
  import CreateNewPostLink from './create-new-post-link';
21
21
  import { unlock } from '../../../lock-unlock';
22
22
  import { usePostTypes, useIsPostTypeHierarchical, useAllowedControls, isControlAllowed, useTaxonomies } from '../../utils';
@@ -28,7 +28,8 @@ export default function QueryInspectorControls(props) {
28
28
  attributes,
29
29
  setQuery,
30
30
  setDisplayLayout,
31
- setAttributes
31
+ setAttributes,
32
+ clientId
32
33
  } = props;
33
34
  const {
34
35
  query,
@@ -99,14 +100,6 @@ export default function QueryInspectorControls(props) {
99
100
  const showAuthorControl = isControlAllowed(allowedControls, 'author');
100
101
  const showSearchControl = isControlAllowed(allowedControls, 'search');
101
102
  const showParentControl = isControlAllowed(allowedControls, 'parents') && isPostTypeHierarchical;
102
- const enhancedPaginationNotice = __('Enhanced Pagination might cause interactive blocks within the Post Template to stop working. Disable it if you experience any issues.');
103
- const isFirstRender = useRef(true); // Don't speak on first render.
104
- useEffect(() => {
105
- if (!isFirstRender.current && enhancedPagination) {
106
- speak(enhancedPaginationNotice);
107
- }
108
- isFirstRender.current = false;
109
- }, [enhancedPagination, enhancedPaginationNotice]);
110
103
  const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl;
111
104
  return createElement(Fragment, null, createElement(BlockInfo, null, createElement(CreateNewPostLink, {
112
105
  ...props
@@ -148,6 +141,10 @@ export default function QueryInspectorControls(props) {
148
141
  onChange: value => setQuery({
149
142
  sticky: value
150
143
  })
144
+ }), createElement(EnhancedPaginationControl, {
145
+ enhancedPagination: enhancedPagination,
146
+ setAttributes: setAttributes,
147
+ clientId: clientId
151
148
  }))), !inherit && showFiltersPanel && createElement(InspectorControls, null, createElement(ToolsPanel, {
152
149
  className: "block-library-query-toolspanel__filters",
153
150
  label: __('Filters'),
@@ -197,20 +194,6 @@ export default function QueryInspectorControls(props) {
197
194
  parents: parents,
198
195
  postType: postType,
199
196
  onChange: setQuery
200
- })))), createElement(InspectorControls, null, createElement(PanelBody, {
201
- title: __('User Experience'),
202
- initialOpen: false
203
- }, createElement(ToggleControl, {
204
- label: __('Enhanced pagination'),
205
- help: __("Don't refresh the page when paginating to another page."),
206
- checked: !!enhancedPagination,
207
- onChange: value => setAttributes({
208
- enhancedPagination: !!value
209
- })
210
- }), enhancedPagination && createElement("div", null, createElement(Notice, {
211
- spokenMessage: null,
212
- status: "warning",
213
- isDismissible: false
214
- }, enhancedPaginationNotice)))));
197
+ })))));
215
198
  }
216
199
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","ToggleControl","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","InspectorControls","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","useRef","speak","OrderControl","AuthorControl","ParentControl","TaxonomyControls","StickyControl","CreateNewPostLink","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","setAttributes","query","displayLayout","enhancedPagination","order","orderBy","author","authorIds","postType","sticky","inherit","taxQuery","parents","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","enhancedPaginationNotice","isFirstRender","current","showFiltersPanel","createElement","Fragment","title","__nextHasNoMarginBottom","label","help","checked","onChange","value","options","columns","min","max","Math","status","isDismissible","className","resetAll","hasValue","values","some","onDeselect","initialOpen","spokenMessage"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\tToggleControl,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback, useRef } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\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 StickyControl from './sticky-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, setAttributes } = props;\n\tconst { query, displayLayout, enhancedPagination } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpostType,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ 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\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\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\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst showColumnsControl = false;\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\tshowColumnsControl ||\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 enhancedPaginationNotice = __(\n\t\t'Enhanced Pagination might cause interactive blocks within the Post Template to stop working. Disable it if you experience any issues.'\n\t);\n\n\tconst isFirstRender = useRef( true ); // Don't speak on first render.\n\tuseEffect( () => {\n\t\tif ( ! isFirstRender.current && enhancedPagination ) {\n\t\t\tspeak( enhancedPaginationNotice );\n\t\t}\n\t\tisFirstRender.current = false;\n\t}, [ enhancedPagination, enhancedPaginationNotice ] );\n\n\tconst showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockInfo>\n\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t</BlockInfo>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inherit query from template' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ !! inherit }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { inherit: !! 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) }\n\t\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ __( 'Post type' ) }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.'\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\t{ showColumnsControl && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\t\tcolumns: value,\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\tmin={ 2 }\n\t\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\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'This column count exceeds the recommended amount and may cause visual breakage.'\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</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t\t{ ...{ order, orderBy } }\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) }\n\t\t\t\t\t\t{ showStickyControl && (\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) }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\"\n\t\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\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\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetQuery( { taxQuery: null } )\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<TaxonomyControls\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ __( 'User Experience' ) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Enhanced pagination' ) }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\"Don't refresh the page when paginating to another page.\"\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tchecked={ !! enhancedPagination }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tenhancedPagination: !! value,\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\t{ enhancedPagination && (\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\tspokenMessage={ null }\n\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ enhancedPaginationNotice }\n\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,MAAM,EACNC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,iBAAiB,E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;EAAG,GAEhD0C,aAAA,CAACtE,aAAa;IACb4B,OAAO,EAAGA,OAAS;IACnBJ,QAAQ,EAAGA,QAAU;IACrBqD,QAAQ,EAAG/D;EAAU,CACrB,CACc,CAEN,CACM,CACnB,EACDwD,aAAA,CAACjF,iBAAiB,QACjBiF,aAAA,CAAC5F,SAAS;IACT8F,KAAK,EAAGpF,EAAE,CAAE,iBAAkB,CAAG;IACjCwG,WAAW,EAAG;EAAO,GAErBtB,aAAA,CAACxF,aAAa;IACb4F,KAAK,EAAGtF,EAAE,CAAE,qBAAsB,CAAG;IACrCuF,IAAI,EAAGvF,EAAE,CACR,yDACD,CAAG;IACHwF,OAAO,EAAG,CAAC,CAAEzD,kBAAoB;IACjC0D,QAAQ,EAAKC,KAAK,IACjB9D,aAAa,CAAE;MACdG,kBAAkB,EAAE,CAAC,CAAE2D;IACxB,CAAE;EACF,CACD,CAAC,EACA3D,kBAAkB,IACnBmD,aAAA,cACCA,aAAA,CAACvF,MAAM;IACN8G,aAAa,EAAG,IAAM;IACtBT,MAAM,EAAC,SAAS;IAChBC,aAAa,EAAG;EAAO,GAErBnB,wBACK,CACJ,CAEI,CACO,CAClB,CAAC;AAEL"}
1
+ {"version":3,"names":["PanelBody","TextControl","SelectControl","RangeControl","ToggleControl","Notice","__experimentalToolsPanel","ToolsPanel","__experimentalToolsPanelItem","ToolsPanelItem","__","InspectorControls","privateApis","blockEditorPrivateApis","debounce","useEffect","useState","useCallback","OrderControl","AuthorControl","ParentControl","TaxonomyControls","StickyControl","EnhancedPaginationControl","CreateNewPostLink","unlock","usePostTypes","useIsPostTypeHierarchical","useAllowedControls","isControlAllowed","useTaxonomies","BlockInfo","QueryInspectorControls","props","attributes","setQuery","setDisplayLayout","setAttributes","clientId","query","displayLayout","enhancedPagination","order","orderBy","author","authorIds","postType","sticky","inherit","taxQuery","parents","allowedControls","showSticky","setShowSticky","postTypesTaxonomiesMap","postTypesSelectOptions","taxonomies","isPostTypeHierarchical","onPostTypeChange","newValue","updateQuery","supportedTaxonomies","updatedTaxQuery","Object","entries","reduce","accumulator","taxonomySlug","terms","includes","keys","length","undefined","querySearch","setQuerySearch","search","onChangeDebounced","cancel","showInheritControl","showPostTypeControl","showColumnsControl","showOrderControl","showStickyControl","showSettingsPanel","showTaxControl","showAuthorControl","showSearchControl","showParentControl","showFiltersPanel","createElement","Fragment","title","__nextHasNoMarginBottom","label","help","checked","onChange","value","options","columns","min","max","Math","status","isDismissible","className","resetAll","hasValue","values","some","onDeselect"],"sources":["@wordpress/block-library/src/query/edit/inspector-controls/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tTextControl,\n\tSelectControl,\n\tRangeControl,\n\tToggleControl,\n\tNotice,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { debounce } from '@wordpress/compose';\nimport { useEffect, useState, useCallback } 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 StickyControl from './sticky-control';\nimport EnhancedPaginationControl from './enhanced-pagination-control';\nimport CreateNewPostLink from './create-new-post-link';\nimport { unlock } from '../../../lock-unlock';\nimport {\n\tusePostTypes,\n\tuseIsPostTypeHierarchical,\n\tuseAllowedControls,\n\tisControlAllowed,\n\tuseTaxonomies,\n} from '../../utils';\n\nconst { BlockInfo } = unlock( blockEditorPrivateApis );\n\nexport default function QueryInspectorControls( props ) {\n\tconst { attributes, setQuery, setDisplayLayout, setAttributes, clientId } =\n\t\tprops;\n\tconst { query, displayLayout, enhancedPagination } = attributes;\n\tconst {\n\t\torder,\n\t\torderBy,\n\t\tauthor: authorIds,\n\t\tpostType,\n\t\tsticky,\n\t\tinherit,\n\t\ttaxQuery,\n\t\tparents,\n\t} = query;\n\tconst allowedControls = useAllowedControls( attributes );\n\tconst [ showSticky, setShowSticky ] = useState( postType === 'post' );\n\tconst { postTypesTaxonomiesMap, postTypesSelectOptions } = usePostTypes();\n\tconst taxonomies = useTaxonomies( postType );\n\tconst isPostTypeHierarchical = useIsPostTypeHierarchical( postType );\n\tuseEffect( () => {\n\t\tsetShowSticky( postType === 'post' );\n\t}, [ 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\tconst updatedTaxQuery = Object.entries( taxQuery || {} ).reduce(\n\t\t\t( accumulator, [ taxonomySlug, terms ] ) => {\n\t\t\t\tif ( supportedTaxonomies.includes( taxonomySlug ) ) {\n\t\t\t\t\taccumulator[ taxonomySlug ] = terms;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t\tupdateQuery.taxQuery = !! Object.keys( updatedTaxQuery ).length\n\t\t\t? updatedTaxQuery\n\t\t\t: undefined;\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\tsetQuery( updateQuery );\n\t};\n\tconst [ querySearch, setQuerySearch ] = useState( query.search );\n\tconst onChangeDebounced = useCallback(\n\t\tdebounce( () => {\n\t\t\tif ( query.search !== querySearch ) {\n\t\t\t\tsetQuery( { search: querySearch } );\n\t\t\t}\n\t\t}, 250 ),\n\t\t[ querySearch, query.search ]\n\t);\n\tuseEffect( () => {\n\t\tonChangeDebounced();\n\t\treturn onChangeDebounced.cancel;\n\t}, [ querySearch, onChangeDebounced ] );\n\tconst showInheritControl = isControlAllowed( allowedControls, 'inherit' );\n\tconst showPostTypeControl =\n\t\t! inherit && isControlAllowed( allowedControls, 'postType' );\n\tconst showColumnsControl = false;\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\tshowColumnsControl ||\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 showFiltersPanel =\n\t\tshowTaxControl ||\n\t\tshowAuthorControl ||\n\t\tshowSearchControl ||\n\t\tshowParentControl;\n\n\treturn (\n\t\t<>\n\t\t\t<BlockInfo>\n\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t</BlockInfo>\n\t\t\t{ showSettingsPanel && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t{ showInheritControl && (\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ __( 'Inherit query from template' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Toggle to use the global query context that is set with the current template, such as an archive or search. Disable to customize the settings independently.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ !! inherit }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetQuery( { inherit: !! 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) }\n\t\t\t\t\t\t{ showPostTypeControl && (\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\toptions={ postTypesSelectOptions }\n\t\t\t\t\t\t\t\tvalue={ postType }\n\t\t\t\t\t\t\t\tlabel={ __( 'Post type' ) }\n\t\t\t\t\t\t\t\tonChange={ onPostTypeChange }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.'\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\t{ showColumnsControl && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Columns' ) }\n\t\t\t\t\t\t\t\t\tvalue={ displayLayout.columns }\n\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\tsetDisplayLayout( {\n\t\t\t\t\t\t\t\t\t\t\tcolumns: value,\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\tmin={ 2 }\n\t\t\t\t\t\t\t\t\tmax={ Math.max( 6, displayLayout.columns ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ displayLayout.columns > 6 && (\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'This column count exceeds the recommended amount and may cause visual breakage.'\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</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showOrderControl && (\n\t\t\t\t\t\t\t<OrderControl\n\t\t\t\t\t\t\t\t{ ...{ order, orderBy } }\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) }\n\t\t\t\t\t\t{ showStickyControl && (\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) }\n\t\t\t\t\t\t<EnhancedPaginationControl\n\t\t\t\t\t\t\tenhancedPagination={ enhancedPagination }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t{ ! inherit && showFiltersPanel && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<ToolsPanel\n\t\t\t\t\t\tclassName=\"block-library-query-toolspanel__filters\"\n\t\t\t\t\t\tlabel={ __( 'Filters' ) }\n\t\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\t\tsetQuery( {\n\t\t\t\t\t\t\t\tauthor: '',\n\t\t\t\t\t\t\t\tparents: [],\n\t\t\t\t\t\t\t\tsearch: '',\n\t\t\t\t\t\t\t\ttaxQuery: null,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tsetQuerySearch( '' );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTaxControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\tlabel={ __( 'Taxonomies' ) }\n\t\t\t\t\t\t\t\thasValue={ () =>\n\t\t\t\t\t\t\t\t\tObject.values( taxQuery || {} ).some(\n\t\t\t\t\t\t\t\t\t\t( terms ) => !! terms.length\n\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\tonDeselect={ () =>\n\t\t\t\t\t\t\t\t\tsetQuery( { taxQuery: null } )\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<TaxonomyControls\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t\tquery={ query }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showAuthorControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! authorIds }\n\t\t\t\t\t\t\t\tlabel={ __( 'Authors' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuery( { author: '' } ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<AuthorControl\n\t\t\t\t\t\t\t\t\tvalue={ authorIds }\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showSearchControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! querySearch }\n\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuerySearch( '' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Keyword' ) }\n\t\t\t\t\t\t\t\t\tvalue={ querySearch }\n\t\t\t\t\t\t\t\t\tonChange={ setQuerySearch }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ showParentControl && (\n\t\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\t\thasValue={ () => !! parents?.length }\n\t\t\t\t\t\t\t\tlabel={ __( 'Parents' ) }\n\t\t\t\t\t\t\t\tonDeselect={ () => setQuery( { parents: [] } ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ParentControl\n\t\t\t\t\t\t\t\t\tparents={ parents }\n\t\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\t\tonChange={ setQuery }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolsPanel>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,SAAS,EACTC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,aAAa,EACbC,MAAM,EACNC,wBAAwB,IAAIC,UAAU,EACtCC,4BAA4B,IAAIC,cAAc,QACxC,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SACCC,iBAAiB,EACjBC,WAAW,IAAIC,sBAAsB,QAC/B,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,yBAAyB,MAAM,+BAA+B;AACrE,OAAOC,iBAAiB,MAAM,wBAAwB;AACtD,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,S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,QAAQ,EAAGA,CAAA,KAAM,CAAC,CAAElC,WAAa;IACjCoB,KAAK,EAAGnF,EAAE,CAAE,SAAU,CAAG;IACzBoG,UAAU,EAAGA,CAAA,KAAMpC,cAAc,CAAE,EAAG;EAAG,GAEzCe,aAAA,CAACxF,WAAW;IACX2F,uBAAuB;IACvBC,KAAK,EAAGnF,EAAE,CAAE,SAAU,CAAG;IACzBuF,KAAK,EAAGxB,WAAa;IACrBuB,QAAQ,EAAGtB;EAAgB,CAC3B,CACc,CAChB,EACCa,iBAAiB,IAClBE,aAAA,CAAChF,cAAc;IACdkG,QAAQ,EAAGA,CAAA,KAAM,CAAC,CAAEzD,OAAO,EAAEqB,MAAQ;IACrCsB,KAAK,EAAGnF,EAAE,CAAE,SAAU,CAAG;IACzBoG,UAAU,EAAGA,CAAA,KAAM3E,QAAQ,CAAE;MAAEe,OAAO,EAAE;IAAG,CAAE;EAAG,GAEhDuC,aAAA,CAACrE,aAAa;IACb8B,OAAO,EAAGA,OAAS;IACnBJ,QAAQ,EAAGA,QAAU;IACrBkD,QAAQ,EAAG7D;EAAU,CACrB,CACc,CAEN,CACM,CAEnB,CAAC;AAEL"}
@@ -15,6 +15,7 @@ import { store as coreStore } from '@wordpress/core-data';
15
15
  */
16
16
  import QueryToolbar from './query-toolbar';
17
17
  import QueryInspectorControls from './inspector-controls';
18
+ import EnhancedPaginationModal from './enhanced-pagination-modal';
18
19
  const DEFAULTS_POSTS_PER_PAGE = 3;
19
20
  const TEMPLATE = [['core/post-template']];
20
21
  export default function QueryContent({
@@ -106,11 +107,16 @@ export default function QueryContent({
106
107
  section: __("The <section> element should represent a standalone portion of the document that can't be better represented by another element."),
107
108
  aside: __("The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.")
108
109
  };
109
- return createElement(Fragment, null, createElement(QueryInspectorControls, {
110
+ return createElement(Fragment, null, createElement(EnhancedPaginationModal, {
111
+ attributes: attributes,
112
+ setAttributes: setAttributes,
113
+ clientId: clientId
114
+ }), createElement(QueryInspectorControls, {
110
115
  attributes: attributes,
111
116
  setQuery: updateQuery,
112
117
  setDisplayLayout: updateDisplayLayout,
113
- setAttributes: setAttributes
118
+ setAttributes: setAttributes,
119
+ clientId: clientId
114
120
  }), createElement(BlockControls, null, createElement(QueryToolbar, {
115
121
  name: name,
116
122
  clientId: clientId,
@@ -1 +1 @@
1
- {"version":3,"names":["useSelect","useDispatch","useInstanceId","useEffect","BlockControls","InspectorControls","useBlockProps","store","blockEditorStore","useInnerBlocksProps","SelectControl","__","coreStore","QueryToolbar","QueryInspectorControls","DEFAULTS_POSTS_PER_PAGE","TEMPLATE","QueryContent","attributes","setAttributes","openPatternSelectionModal","name","clientId","queryId","query","displayLayout","tagName","TagName","inherit","__unstableMarkNextChangeAsNotPersistent","instanceId","blockProps","innerBlocksProps","template","postsPerPage","select","getSettings","getEntityRecord","canUser","settingPerPage","posts_per_page","newQuery","perPage","Object","keys","length","updateQuery","Number","isFinite","updateDisplayLayout","newDisplayLayout","htmlElementMessages","main","section","aside","createElement","Fragment","setQuery","setDisplayLayout","group","__nextHasNoMarginBottom","label","options","value","onChange","help"],"sources":["@wordpress/block-library/src/query/edit/query-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport QueryToolbar from './query-toolbar';\nimport QueryInspectorControls from './inspector-controls';\n\nconst DEFAULTS_POSTS_PER_PAGE = 3;\n\nconst TEMPLATE = [ [ 'core/post-template' ] ];\nexport default function QueryContent( {\n\tattributes,\n\tsetAttributes,\n\topenPatternSelectionModal,\n\tname,\n\tclientId,\n} ) {\n\tconst {\n\t\tqueryId,\n\t\tquery,\n\t\tdisplayLayout,\n\t\ttagName: TagName = 'div',\n\t\tquery: { inherit } = {},\n\t} = attributes;\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst instanceId = useInstanceId( QueryContent );\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\tconst { postsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst settingPerPage = canUser( 'read', 'settings' )\n\t\t\t? +getEntityRecord( 'root', 'site' )?.posts_per_page\n\t\t\t: +getSettings().postsPerPage;\n\t\treturn {\n\t\t\tpostsPerPage: settingPerPage || DEFAULTS_POSTS_PER_PAGE,\n\t\t};\n\t}, [] );\n\t// There are some effects running where some initialization logic is\n\t// happening and setting some values to some attributes (ex. queryId).\n\t// These updates can cause an `undo trap` where undoing will result in\n\t// resetting again, so we need to mark these changes as not persistent\n\t// with `__unstableMarkNextChangeAsNotPersistent`.\n\n\t// Changes in query property (which is an object) need to be in the same callback,\n\t// because updates are batched after the render and changes in different query properties\n\t// would cause to override previous wanted changes.\n\tuseEffect( () => {\n\t\tconst newQuery = {};\n\t\t// When we inherit from global query always need to set the `perPage`\n\t\t// based on the reading settings.\n\t\tif ( inherit && query.perPage !== postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t} else if ( ! query.perPage && postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t}\n\t\tif ( !! Object.keys( newQuery ).length ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateQuery( newQuery );\n\t\t}\n\t}, [ query.perPage, postsPerPage, inherit ] );\n\t// We need this for multi-query block pagination.\n\t// Query parameters for each block are scoped to their ID.\n\tuseEffect( () => {\n\t\tif ( ! Number.isFinite( queryId ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { queryId: instanceId } );\n\t\t}\n\t}, [ queryId, instanceId ] );\n\tconst updateQuery = ( newQuery ) =>\n\t\tsetAttributes( { query: { ...query, ...newQuery } } );\n\tconst updateDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tdisplayLayout: { ...displayLayout, ...newDisplayLayout },\n\t\t} );\n\tconst htmlElementMessages = {\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only. '\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\treturn (\n\t\t<>\n\t\t\t<QueryInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\tsetDisplayLayout={ updateDisplayLayout }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<BlockControls>\n\t\t\t\t<QueryToolbar\n\t\t\t\t\tname={ name }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\topenPatternSelectionModal={ openPatternSelectionModal }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ TagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ TagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,KAAK,IAAIC,gBAAgB,EACzBC,mBAAmB,QACb,yBAAyB;AAChC,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASJ,KAAK,IAAIK,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,sBAAsB,MAAM,sBAAsB;AAEzD,MAAMC,uBAAuB,GAAG,CAAC;AAEjC,MAAMC,QAAQ,GAAG,CAAE,CAAE,oBAAoB,CAAE,CAAE;AAC7C,eAAe,SAASC,YAAYA,CAAE;EACrCC,UAAU;EACVC,aAAa;EACbC,yBAAyB;EACzBC,IAAI;EACJC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,OAAO;IACPC,KAAK;IACLC,aAAa;IACbC,OAAO,EAAEC,OAAO,GAAG,KAAK;IACxBH,KAAK,EAAE;MAAEI;IAAQ,CAAC,GAAG,CAAC;EACvB,CAAC,GAAGV,UAAU;EACd,MAAM;IAAEW;EAAwC,CAAC,GAChD5B,WAAW,CAAEO,gBAAiB,CAAC;EAChC,MAAMsB,UAAU,GAAG5B,aAAa,CAAEe,YAAa,CAAC;EAChD,MAAMc,UAAU,GAAGzB,aAAa,CAAC,CAAC;EAClC,MAAM0B,gBAAgB,GAAGvB,mBAAmB,CAAEsB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E,KAAK,EAAE;IAAO,CAAC,EAClC;MAAEF,KAAK,EAAE,WAAW;MAAEE,KAAK,EAAE;IAAU,CAAC,EACxC;MAAEF,KAAK,EAAE,SAAS;MAAEE,KAAK,EAAE;IAAQ,CAAC,CAClC;IACHA,KAAK,EAAGpC,OAAS;IACjBqC,QAAQ,EAAKD,KAAK,IACjB5C,aAAa,CAAE;MAAEO,OAAO,EAAEqC;IAAM,CAAE,CAClC;IACDE,IAAI,EAAGd,mBAAmB,CAAExB,OAAO;EAAI,CACvC,CACiB,CAAC,EACpB4B,aAAA,CAAC5B,OAAO;IAAA,GAAMK;EAAgB,CAAI,CACjC,CAAC;AAEL"}
1
+ {"version":3,"names":["useSelect","useDispatch","useInstanceId","useEffect","BlockControls","InspectorControls","useBlockProps","store","blockEditorStore","useInnerBlocksProps","SelectControl","__","coreStore","QueryToolbar","QueryInspectorControls","EnhancedPaginationModal","DEFAULTS_POSTS_PER_PAGE","TEMPLATE","QueryContent","attributes","setAttributes","openPatternSelectionModal","name","clientId","queryId","query","displayLayout","tagName","TagName","inherit","__unstableMarkNextChangeAsNotPersistent","instanceId","blockProps","innerBlocksProps","template","postsPerPage","select","getSettings","getEntityRecord","canUser","settingPerPage","posts_per_page","newQuery","perPage","Object","keys","length","updateQuery","Number","isFinite","updateDisplayLayout","newDisplayLayout","htmlElementMessages","main","section","aside","createElement","Fragment","setQuery","setDisplayLayout","group","__nextHasNoMarginBottom","label","options","value","onChange","help"],"sources":["@wordpress/block-library/src/query/edit/query-content.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useEffect } from '@wordpress/element';\nimport {\n\tBlockControls,\n\tInspectorControls,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n\tuseInnerBlocksProps,\n} from '@wordpress/block-editor';\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport QueryToolbar from './query-toolbar';\nimport QueryInspectorControls from './inspector-controls';\nimport EnhancedPaginationModal from './enhanced-pagination-modal';\n\nconst DEFAULTS_POSTS_PER_PAGE = 3;\n\nconst TEMPLATE = [ [ 'core/post-template' ] ];\nexport default function QueryContent( {\n\tattributes,\n\tsetAttributes,\n\topenPatternSelectionModal,\n\tname,\n\tclientId,\n} ) {\n\tconst {\n\t\tqueryId,\n\t\tquery,\n\t\tdisplayLayout,\n\t\ttagName: TagName = 'div',\n\t\tquery: { inherit } = {},\n\t} = attributes;\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst instanceId = useInstanceId( QueryContent );\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\tconst { postsPerPage } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst settingPerPage = canUser( 'read', 'settings' )\n\t\t\t? +getEntityRecord( 'root', 'site' )?.posts_per_page\n\t\t\t: +getSettings().postsPerPage;\n\t\treturn {\n\t\t\tpostsPerPage: settingPerPage || DEFAULTS_POSTS_PER_PAGE,\n\t\t};\n\t}, [] );\n\t// There are some effects running where some initialization logic is\n\t// happening and setting some values to some attributes (ex. queryId).\n\t// These updates can cause an `undo trap` where undoing will result in\n\t// resetting again, so we need to mark these changes as not persistent\n\t// with `__unstableMarkNextChangeAsNotPersistent`.\n\n\t// Changes in query property (which is an object) need to be in the same callback,\n\t// because updates are batched after the render and changes in different query properties\n\t// would cause to override previous wanted changes.\n\tuseEffect( () => {\n\t\tconst newQuery = {};\n\t\t// When we inherit from global query always need to set the `perPage`\n\t\t// based on the reading settings.\n\t\tif ( inherit && query.perPage !== postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t} else if ( ! query.perPage && postsPerPage ) {\n\t\t\tnewQuery.perPage = postsPerPage;\n\t\t}\n\t\tif ( !! Object.keys( newQuery ).length ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateQuery( newQuery );\n\t\t}\n\t}, [ query.perPage, postsPerPage, inherit ] );\n\t// We need this for multi-query block pagination.\n\t// Query parameters for each block are scoped to their ID.\n\tuseEffect( () => {\n\t\tif ( ! Number.isFinite( queryId ) ) {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( { queryId: instanceId } );\n\t\t}\n\t}, [ queryId, instanceId ] );\n\tconst updateQuery = ( newQuery ) =>\n\t\tsetAttributes( { query: { ...query, ...newQuery } } );\n\tconst updateDisplayLayout = ( newDisplayLayout ) =>\n\t\tsetAttributes( {\n\t\t\tdisplayLayout: { ...displayLayout, ...newDisplayLayout },\n\t\t} );\n\tconst htmlElementMessages = {\n\t\tmain: __(\n\t\t\t'The <main> element should be used for the primary content of your document only. '\n\t\t),\n\t\tsection: __(\n\t\t\t\"The <section> element should represent a standalone portion of the document that can't be better represented by another element.\"\n\t\t),\n\t\taside: __(\n\t\t\t\"The <aside> element should represent a portion of a document whose content is only indirectly related to the document's main content.\"\n\t\t),\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<EnhancedPaginationModal\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<QueryInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\tsetDisplayLayout={ updateDisplayLayout }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\tclientId={ clientId }\n\t\t\t/>\n\t\t\t<BlockControls>\n\t\t\t\t<QueryToolbar\n\t\t\t\t\tname={ name }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetQuery={ updateQuery }\n\t\t\t\t\topenPatternSelectionModal={ openPatternSelectionModal }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default (<div>)' ), value: 'div' },\n\t\t\t\t\t\t{ label: '<main>', value: 'main' },\n\t\t\t\t\t\t{ label: '<section>', value: 'section' },\n\t\t\t\t\t\t{ label: '<aside>', value: 'aside' },\n\t\t\t\t\t] }\n\t\t\t\t\tvalue={ TagName }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { tagName: value } )\n\t\t\t\t\t}\n\t\t\t\t\thelp={ htmlElementMessages[ TagName ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,iBAAiB;AACxD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SACCC,aAAa,EACbC,iBAAiB,EACjBC,aAAa,EACbC,KAAK,IAAIC,gBAAgB,EACzBC,mBAAmB,QACb,yBAAyB;AAChC,SAASC,aAAa,QAAQ,uBAAuB;AACrD,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASJ,KAAK,IAAIK,SAAS,QAAQ,sBAAsB;;AAEzD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,sBAAsB,MAAM,sBAAsB;AACzD,OAAOC,uBAAuB,MAAM,6BAA6B;AAEjE,MAAMC,uBAAuB,GAAG,CAAC;AAEjC,MAAMC,QAAQ,GAAG,CAAE,CAAE,oBAAoB,CAAE,CAAE;AAC7C,eAAe,SAASC,YAAYA,CAAE;EACrCC,UAAU;EACVC,aAAa;EACbC,yBAA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ACxC9B,aAAa,EAAGA,aAAe;IAC/BG,QAAQ,EAAGA;EAAU,CACrB,CAAC,EACFiC,aAAA,CAACpD,aAAa,QACboD,aAAA,CAAC3C,YAAY;IACZS,IAAI,EAAGA,IAAM;IACbC,QAAQ,EAAGA,QAAU;IACrBJ,UAAU,EAAGA,UAAY;IACzBuC,QAAQ,EAAGX,WAAa;IACxB1B,yBAAyB,EAAGA;EAA2B,CACvD,CACa,CAAC,EAChBmC,aAAA,CAACnD,iBAAiB;IAACuD,KAAK,EAAC;EAAU,GAClCJ,aAAA,CAAC9C,aAAa;IACbmD,uBAAuB;IACvBC,KAAK,EAAGnD,EAAE,CAAE,cAAe,CAAG;IAC9BoD,OAAO,EAAG,CACT;MAAED,KAAK,EAAEnD,EAAE,CAAE,iBAAkB,CAAC;MAAEqD,KAAK,EAAE;IAAM,CAAC,EAChD;MAAEF,KAAK,EAAE,QAAQ;MAAEE,KAAK,EAAE;IAAO,CAAC,EAClC;MAAEF,KAAK,EAAE,WAAW;MAAEE,KAAK,EAAE;IAAU,CAAC,EACxC;MAAEF,KAAK,EAAE,SAAS;MAAEE,KAAK,EAAE;IAAQ,CAAC,CAClC;IACHA,KAAK,EAAGpC,OAAS;IACjBqC,QAAQ,EAAKD,KAAK,IACjB5C,aAAa,CAAE;MAAEO,OAAO,EAAEqC;IAAM,CAAE,CAClC;IACDE,IAAI,EAAGd,mBAAmB,CAAExB,OAAO;EAAI,CACvC,CACiB,CAAC,EACpB4B,aAAA,CAAC5B,OAAO;IAAA,GAAMK;EAAgB,CAAI,CACjC,CAAC;AAEL"}
@@ -330,4 +330,21 @@ export const usePatterns = (clientId, name) => {
330
330
  return getPatternsByBlockTypes(name, rootClientId);
331
331
  }, [name, clientId]);
332
332
  };
333
+
334
+ /**
335
+ * Hook that returns whether the Query Loop with the given `clientId` contains
336
+ * any third-party block.
337
+ *
338
+ * @param {string} clientId The block's client ID.
339
+ * @return {boolean} True if it contains third-party blocks.
340
+ */
341
+ export const useContainsThirdPartyBlocks = clientId => {
342
+ return useSelect(select => {
343
+ const {
344
+ getClientIdsOfDescendants,
345
+ getBlockName
346
+ } = select(blockEditorStore);
347
+ return getClientIdsOfDescendants(clientId).some(descendantClientId => !getBlockName(descendantClientId).startsWith('core/'));
348
+ }, [clientId]);
349
+ };
333
350
  //# sourceMappingURL=utils.js.map