@wordpress/block-library 8.7.0 → 8.9.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 (416) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/build/column/index.js +2 -1
  3. package/build/column/index.js.map +1 -1
  4. package/build/columns/edit.js +24 -6
  5. package/build/columns/edit.js.map +1 -1
  6. package/build/columns/index.js +2 -1
  7. package/build/columns/index.js.map +1 -1
  8. package/build/columns/utils.js +4 -9
  9. package/build/columns/utils.js.map +1 -1
  10. package/build/cover/edit/index.js +46 -50
  11. package/build/cover/edit/index.js.map +1 -1
  12. package/build/cover/edit/{resizable-cover.js → resizable-cover-popover.js} +32 -6
  13. package/build/cover/edit/resizable-cover-popover.js.map +1 -0
  14. package/build/cover/index.js +12 -0
  15. package/build/cover/index.js.map +1 -1
  16. package/build/cover/transforms.js +10 -7
  17. package/build/cover/transforms.js.map +1 -1
  18. package/build/details/edit.js +67 -0
  19. package/build/details/edit.js.map +1 -0
  20. package/build/details/index.js +110 -0
  21. package/build/details/index.js.map +1 -0
  22. package/build/details/save.js +33 -0
  23. package/build/details/save.js.map +1 -0
  24. package/build/details-content/edit.js +34 -0
  25. package/build/details-content/edit.js.map +1 -0
  26. package/build/details-content/index.js +94 -0
  27. package/build/details-content/index.js.map +1 -0
  28. package/build/details-content/save.js +20 -0
  29. package/build/details-content/save.js.map +1 -0
  30. package/build/details-summary/edit.js +42 -0
  31. package/build/details-summary/edit.js.map +1 -0
  32. package/build/details-summary/index.js +97 -0
  33. package/build/details-summary/index.js.map +1 -0
  34. package/build/details-summary/save.js +24 -0
  35. package/build/details-summary/save.js.map +1 -0
  36. package/build/embed/deprecated.js +4 -1
  37. package/build/embed/deprecated.js.map +1 -1
  38. package/build/embed/embed-link-settings.native.js +1 -1
  39. package/build/embed/embed-link-settings.native.js.map +1 -1
  40. package/build/embed/embed-placeholder.js +1 -1
  41. package/build/embed/embed-placeholder.js.map +1 -1
  42. package/build/embed/index.js +4 -1
  43. package/build/embed/index.js.map +1 -1
  44. package/build/embed/transforms.js +4 -1
  45. package/build/embed/transforms.js.map +1 -1
  46. package/build/embed/util.js +4 -1
  47. package/build/embed/util.js.map +1 -1
  48. package/build/file/edit.native.js +0 -2
  49. package/build/file/edit.native.js.map +1 -1
  50. package/build/gallery/use-get-media.native.js +2 -1
  51. package/build/gallery/use-get-media.native.js.map +1 -1
  52. package/build/group/edit.js +3 -1
  53. package/build/group/edit.js.map +1 -1
  54. package/build/group/index.js +3 -0
  55. package/build/group/index.js.map +1 -1
  56. package/build/image/edit.js +16 -13
  57. package/build/image/edit.js.map +1 -1
  58. package/build/image/index.js +5 -3
  59. package/build/image/index.js.map +1 -1
  60. package/build/index.js +24 -6
  61. package/build/index.js.map +1 -1
  62. package/build/index.native.js +9 -5
  63. package/build/index.native.js.map +1 -1
  64. package/build/media-text/edit.js +4 -2
  65. package/build/media-text/edit.js.map +1 -1
  66. package/build/media-text/index.js +3 -0
  67. package/build/media-text/index.js.map +1 -1
  68. package/build/media-text/media-container.js +2 -6
  69. package/build/media-text/media-container.js.map +1 -1
  70. package/build/media-text/media-container.native.js +3 -3
  71. package/build/media-text/media-container.native.js.map +1 -1
  72. package/build/navigation/deprecated.js +8 -11
  73. package/build/navigation/deprecated.js.map +1 -1
  74. package/build/navigation/edit/index.js +32 -64
  75. package/build/navigation/edit/index.js.map +1 -1
  76. package/build/navigation/edit/unsaved-inner-blocks.js +1 -14
  77. package/build/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  78. package/build/post-author/index.js +0 -1
  79. package/build/post-author/index.js.map +1 -1
  80. package/build/post-date/edit.js +4 -2
  81. package/build/post-date/edit.js.map +1 -1
  82. package/build/post-excerpt/edit.js +2 -2
  83. package/build/post-excerpt/edit.js.map +1 -1
  84. package/build/post-featured-image/dimension-controls.js +2 -1
  85. package/build/post-featured-image/dimension-controls.js.map +1 -1
  86. package/build/post-featured-image/edit.js +16 -27
  87. package/build/post-featured-image/edit.js.map +1 -1
  88. package/build/post-time-to-read/edit.js +1 -1
  89. package/build/post-time-to-read/edit.js.map +1 -1
  90. package/build/post-time-to-read/index.js +7 -0
  91. package/build/post-time-to-read/index.js.map +1 -1
  92. package/build/query/deprecated.js +8 -6
  93. package/build/query/deprecated.js.map +1 -1
  94. package/build/query/edit/inspector-controls/create-new-post-link.js +41 -0
  95. package/build/query/edit/inspector-controls/create-new-post-link.js.map +1 -0
  96. package/build/query/edit/inspector-controls/index.js +14 -6
  97. package/build/query/edit/inspector-controls/index.js.map +1 -1
  98. package/build/query/edit/pattern-selection-modal.js +2 -1
  99. package/build/query/edit/pattern-selection-modal.js.map +1 -1
  100. package/build/query/index.js +5 -12
  101. package/build/query/index.js.map +1 -1
  102. package/build/site-logo/edit.js +114 -16
  103. package/build/site-logo/edit.js.map +1 -1
  104. package/build/site-logo/index.js +1 -1
  105. package/build/social-link/icons/chain.js +1 -1
  106. package/build/social-link/icons/chain.js.map +1 -1
  107. package/build/social-link/icons/mail.js +1 -1
  108. package/build/social-link/icons/mail.js.map +1 -1
  109. package/build/spacer/controls.js +25 -6
  110. package/build/spacer/controls.js.map +1 -1
  111. package/build/spacer/edit.js +129 -13
  112. package/build/spacer/edit.js.map +1 -1
  113. package/build/spacer/save.js +2 -2
  114. package/build/spacer/save.js.map +1 -1
  115. package/build/table/state.js +35 -35
  116. package/build/table/state.js.map +1 -1
  117. package/build/template-part/edit/index.js +2 -1
  118. package/build/template-part/edit/index.js.map +1 -1
  119. package/build/template-part/edit/utils/hooks.js +2 -2
  120. package/build/template-part/edit/utils/hooks.js.map +1 -1
  121. package/build/term-description/index.js +1 -2
  122. package/build/term-description/index.js.map +1 -1
  123. package/build/utils/migrate-font-family.js +12 -5
  124. package/build/utils/migrate-font-family.js.map +1 -1
  125. package/build/video/edit.native.js +4 -3
  126. package/build/video/edit.native.js.map +1 -1
  127. package/build-module/column/index.js +2 -1
  128. package/build-module/column/index.js.map +1 -1
  129. package/build-module/columns/edit.js +24 -6
  130. package/build-module/columns/edit.js.map +1 -1
  131. package/build-module/columns/index.js +2 -1
  132. package/build-module/columns/index.js.map +1 -1
  133. package/build-module/columns/utils.js +4 -8
  134. package/build-module/columns/utils.js.map +1 -1
  135. package/build-module/cover/edit/index.js +48 -52
  136. package/build-module/cover/edit/index.js.map +1 -1
  137. package/build-module/cover/edit/{resizable-cover.js → resizable-cover-popover.js} +31 -6
  138. package/build-module/cover/edit/resizable-cover-popover.js.map +1 -0
  139. package/build-module/cover/index.js +12 -0
  140. package/build-module/cover/index.js.map +1 -1
  141. package/build-module/cover/transforms.js +5 -1
  142. package/build-module/cover/transforms.js.map +1 -1
  143. package/build-module/details/edit.js +52 -0
  144. package/build-module/details/edit.js.map +1 -0
  145. package/build-module/details/index.js +91 -0
  146. package/build-module/details/index.js.map +1 -0
  147. package/build-module/details/save.js +20 -0
  148. package/build-module/details/save.js.map +1 -0
  149. package/build-module/details-content/edit.js +23 -0
  150. package/build-module/details-content/edit.js.map +1 -0
  151. package/build-module/details-content/index.js +76 -0
  152. package/build-module/details-content/index.js.map +1 -0
  153. package/build-module/details-content/save.js +11 -0
  154. package/build-module/details-content/save.js.map +1 -0
  155. package/build-module/details-summary/edit.js +30 -0
  156. package/build-module/details-summary/edit.js.map +1 -0
  157. package/build-module/details-summary/index.js +79 -0
  158. package/build-module/details-summary/index.js.map +1 -0
  159. package/build-module/details-summary/save.js +16 -0
  160. package/build-module/details-summary/save.js.map +1 -0
  161. package/build-module/embed/deprecated.js +4 -1
  162. package/build-module/embed/deprecated.js.map +1 -1
  163. package/build-module/embed/embed-link-settings.native.js +1 -1
  164. package/build-module/embed/embed-link-settings.native.js.map +1 -1
  165. package/build-module/embed/embed-placeholder.js +1 -1
  166. package/build-module/embed/embed-placeholder.js.map +1 -1
  167. package/build-module/embed/index.js +4 -1
  168. package/build-module/embed/index.js.map +1 -1
  169. package/build-module/embed/transforms.js +4 -1
  170. package/build-module/embed/transforms.js.map +1 -1
  171. package/build-module/embed/util.js +4 -1
  172. package/build-module/embed/util.js.map +1 -1
  173. package/build-module/file/edit.native.js +0 -2
  174. package/build-module/file/edit.native.js.map +1 -1
  175. package/build-module/gallery/use-get-media.native.js +2 -1
  176. package/build-module/gallery/use-get-media.native.js.map +1 -1
  177. package/build-module/group/edit.js +3 -1
  178. package/build-module/group/edit.js.map +1 -1
  179. package/build-module/group/index.js +3 -0
  180. package/build-module/group/index.js.map +1 -1
  181. package/build-module/image/edit.js +16 -13
  182. package/build-module/image/edit.js.map +1 -1
  183. package/build-module/image/index.js +5 -3
  184. package/build-module/image/index.js.map +1 -1
  185. package/build-module/index.js +21 -6
  186. package/build-module/index.js.map +1 -1
  187. package/build-module/index.native.js +9 -5
  188. package/build-module/index.native.js.map +1 -1
  189. package/build-module/media-text/edit.js +4 -2
  190. package/build-module/media-text/edit.js.map +1 -1
  191. package/build-module/media-text/index.js +3 -0
  192. package/build-module/media-text/index.js.map +1 -1
  193. package/build-module/media-text/media-container.js +1 -5
  194. package/build-module/media-text/media-container.js.map +1 -1
  195. package/build-module/media-text/media-container.native.js +1 -1
  196. package/build-module/media-text/media-container.native.js.map +1 -1
  197. package/build-module/navigation/deprecated.js +8 -10
  198. package/build-module/navigation/deprecated.js.map +1 -1
  199. package/build-module/navigation/edit/index.js +31 -63
  200. package/build-module/navigation/edit/index.js.map +1 -1
  201. package/build-module/navigation/edit/unsaved-inner-blocks.js +1 -14
  202. package/build-module/navigation/edit/unsaved-inner-blocks.js.map +1 -1
  203. package/build-module/post-author/index.js +0 -1
  204. package/build-module/post-author/index.js.map +1 -1
  205. package/build-module/post-date/edit.js +4 -2
  206. package/build-module/post-date/edit.js.map +1 -1
  207. package/build-module/post-excerpt/edit.js +2 -2
  208. package/build-module/post-excerpt/edit.js.map +1 -1
  209. package/build-module/post-featured-image/dimension-controls.js +2 -1
  210. package/build-module/post-featured-image/dimension-controls.js.map +1 -1
  211. package/build-module/post-featured-image/edit.js +16 -27
  212. package/build-module/post-featured-image/edit.js.map +1 -1
  213. package/build-module/post-time-to-read/edit.js +1 -1
  214. package/build-module/post-time-to-read/edit.js.map +1 -1
  215. package/build-module/post-time-to-read/index.js +7 -0
  216. package/build-module/post-time-to-read/index.js.map +1 -1
  217. package/build-module/query/deprecated.js +5 -2
  218. package/build-module/query/deprecated.js.map +1 -1
  219. package/build-module/query/edit/inspector-controls/create-new-post-link.js +33 -0
  220. package/build-module/query/edit/inspector-controls/create-new-post-link.js.map +1 -0
  221. package/build-module/query/edit/inspector-controls/index.js +12 -7
  222. package/build-module/query/edit/inspector-controls/index.js.map +1 -1
  223. package/build-module/query/edit/pattern-selection-modal.js +2 -1
  224. package/build-module/query/edit/pattern-selection-modal.js.map +1 -1
  225. package/build-module/query/index.js +5 -10
  226. package/build-module/query/index.js.map +1 -1
  227. package/build-module/site-logo/edit.js +115 -18
  228. package/build-module/site-logo/edit.js.map +1 -1
  229. package/build-module/site-logo/index.js +1 -1
  230. package/build-module/social-link/icons/chain.js +1 -1
  231. package/build-module/social-link/icons/chain.js.map +1 -1
  232. package/build-module/social-link/icons/mail.js +1 -1
  233. package/build-module/social-link/icons/mail.js.map +1 -1
  234. package/build-module/spacer/controls.js +27 -9
  235. package/build-module/spacer/controls.js.map +1 -1
  236. package/build-module/spacer/edit.js +129 -14
  237. package/build-module/spacer/edit.js.map +1 -1
  238. package/build-module/spacer/save.js +3 -3
  239. package/build-module/spacer/save.js.map +1 -1
  240. package/build-module/table/state.js +35 -33
  241. package/build-module/table/state.js.map +1 -1
  242. package/build-module/template-part/edit/index.js +2 -1
  243. package/build-module/template-part/edit/index.js.map +1 -1
  244. package/build-module/template-part/edit/utils/hooks.js +2 -2
  245. package/build-module/template-part/edit/utils/hooks.js.map +1 -1
  246. package/build-module/term-description/index.js +1 -2
  247. package/build-module/term-description/index.js.map +1 -1
  248. package/build-module/utils/migrate-font-family.js +9 -1
  249. package/build-module/utils/migrate-font-family.js.map +1 -1
  250. package/build-module/video/edit.native.js +4 -3
  251. package/build-module/video/edit.native.js.map +1 -1
  252. package/build-style/columns/style-rtl.css +4 -1
  253. package/build-style/columns/style.css +4 -1
  254. package/build-style/common-rtl.css +1 -1
  255. package/build-style/common.css +1 -1
  256. package/build-style/cover/editor-rtl.css +9 -10
  257. package/build-style/cover/editor.css +9 -10
  258. package/build-style/cover/style-rtl.css +1 -1
  259. package/build-style/cover/style.css +1 -1
  260. package/build-style/details/style-rtl.css +91 -0
  261. package/build-style/details/style.css +91 -0
  262. package/build-style/details-summary/editor-rtl.css +91 -0
  263. package/build-style/details-summary/editor.css +91 -0
  264. package/build-style/details-summary/style-rtl.css +91 -0
  265. package/build-style/details-summary/style.css +91 -0
  266. package/build-style/editor-rtl.css +97 -74
  267. package/build-style/editor.css +97 -74
  268. package/build-style/file/style-rtl.css +4 -3
  269. package/build-style/file/style.css +4 -3
  270. package/build-style/html/editor-rtl.css +2 -2
  271. package/build-style/html/editor.css +2 -2
  272. package/build-style/image/editor-rtl.css +1 -1
  273. package/build-style/image/editor.css +1 -1
  274. package/build-style/post-excerpt/style-rtl.css +1 -1
  275. package/build-style/post-excerpt/style.css +1 -1
  276. package/build-style/pullquote/style-rtl.css +4 -1
  277. package/build-style/pullquote/style.css +4 -1
  278. package/build-style/query/editor-rtl.css +8 -12
  279. package/build-style/query/editor.css +8 -12
  280. package/build-style/search/style-rtl.css +2 -0
  281. package/build-style/search/style.css +2 -0
  282. package/build-style/shortcode/editor-rtl.css +15 -35
  283. package/build-style/shortcode/editor.css +15 -35
  284. package/build-style/site-logo/editor-rtl.css +46 -0
  285. package/build-style/site-logo/editor.css +46 -0
  286. package/build-style/spacer/editor-rtl.css +4 -2
  287. package/build-style/spacer/editor.css +4 -2
  288. package/build-style/style-rtl.css +25 -8
  289. package/build-style/style.css +25 -8
  290. package/build-style/template-part/editor-rtl.css +8 -12
  291. package/build-style/template-part/editor.css +8 -12
  292. package/package.json +31 -31
  293. package/src/buttons/test/__snapshots__/edit.native.js.snap +18 -0
  294. package/src/buttons/test/edit.native.js +123 -2
  295. package/src/column/block.json +2 -1
  296. package/src/columns/block.json +2 -1
  297. package/src/columns/edit.js +33 -9
  298. package/src/columns/style.scss +5 -1
  299. package/src/columns/utils.js +8 -9
  300. package/src/common.scss +1 -1
  301. package/src/cover/block.json +12 -0
  302. package/src/cover/edit/index.js +44 -37
  303. package/src/cover/edit/resizable-cover-popover.js +82 -0
  304. package/src/cover/editor.scss +20 -13
  305. package/src/cover/index.php +9 -10
  306. package/src/cover/style.scss +1 -1
  307. package/src/cover/test/edit.js +1 -1
  308. package/src/cover/transforms.js +4 -1
  309. package/src/details/block.json +54 -0
  310. package/src/details/edit.js +59 -0
  311. package/src/details/index.js +35 -0
  312. package/src/details/save.js +15 -0
  313. package/src/details/style.scss +3 -0
  314. package/src/details-content/block.json +50 -0
  315. package/src/details-content/edit.js +29 -0
  316. package/src/details-content/index.js +23 -0
  317. package/src/details-content/save.js +12 -0
  318. package/src/details-summary/block.json +53 -0
  319. package/src/details-summary/edit.js +27 -0
  320. package/src/details-summary/editor.scss +3 -0
  321. package/src/details-summary/index.js +23 -0
  322. package/src/details-summary/save.js +13 -0
  323. package/src/details-summary/style.scss +3 -0
  324. package/src/editor.scss +1 -0
  325. package/src/embed/block.json +4 -1
  326. package/src/embed/embed-link-settings.native.js +1 -1
  327. package/src/embed/embed-placeholder.js +1 -1
  328. package/src/file/edit.native.js +0 -2
  329. package/src/file/style.scss +5 -2
  330. package/src/gallery/test/index.native.js +4 -4
  331. package/src/gallery/test/use-get-media.native.js +24 -0
  332. package/src/gallery/use-get-media.native.js +1 -1
  333. package/src/group/block.json +3 -0
  334. package/src/group/edit.js +8 -2
  335. package/src/heading/test/__snapshots__/index.native.js.snap +12 -0
  336. package/src/heading/test/index.native.js +71 -0
  337. package/src/html/editor.scss +2 -21
  338. package/src/image/block.json +5 -3
  339. package/src/image/edit.js +21 -17
  340. package/src/image/editor.scss +1 -1
  341. package/src/index.js +13 -3
  342. package/src/index.native.js +9 -5
  343. package/src/list/test/edit.native.js +7 -7
  344. package/src/media-text/block.json +3 -0
  345. package/src/media-text/edit.js +2 -1
  346. package/src/media-text/media-container.js +1 -5
  347. package/src/media-text/media-container.native.js +1 -1
  348. package/src/navigation/deprecated.js +15 -19
  349. package/src/navigation/edit/index.js +32 -106
  350. package/src/navigation/edit/unsaved-inner-blocks.js +34 -46
  351. package/src/navigation/index.php +15 -12
  352. package/src/paragraph/test/edit.native.js +616 -1
  353. package/src/post-author/block.json +0 -1
  354. package/src/post-date/edit.js +4 -0
  355. package/src/post-date/index.php +17 -8
  356. package/src/post-excerpt/edit.js +1 -1
  357. package/src/post-excerpt/index.php +3 -3
  358. package/src/post-excerpt/style.scss +2 -1
  359. package/src/post-featured-image/dimension-controls.js +5 -1
  360. package/src/post-featured-image/edit.js +14 -34
  361. package/src/post-featured-image/index.php +1 -1
  362. package/src/post-time-to-read/block.json +7 -0
  363. package/src/post-time-to-read/edit.js +1 -1
  364. package/src/post-time-to-read/index.php +3 -3
  365. package/src/preformatted/test/__snapshots__/edit.native.js.snap +2 -2
  366. package/src/preformatted/test/edit.native.js +42 -2
  367. package/src/pullquote/style.scss +5 -1
  368. package/src/pullquote/test/edit.native.js +65 -0
  369. package/src/query/deprecated.js +4 -1
  370. package/src/query/edit/inspector-controls/create-new-post-link.js +26 -0
  371. package/src/query/edit/inspector-controls/index.js +13 -6
  372. package/src/query/edit/pattern-selection-modal.js +1 -0
  373. package/src/query/editor.scss +8 -11
  374. package/src/query/index.js +1 -7
  375. package/src/quote/test/edit.native.js +88 -0
  376. package/src/search/index.php +1 -1
  377. package/src/search/style.scss +3 -0
  378. package/src/shortcode/editor.scss +6 -5
  379. package/src/site-logo/block.json +1 -1
  380. package/src/site-logo/edit.js +123 -9
  381. package/src/site-logo/editor.scss +57 -0
  382. package/src/social-link/icons/chain.js +1 -1
  383. package/src/social-link/icons/mail.js +1 -1
  384. package/src/social-link/index.php +2 -2
  385. package/src/spacer/controls.js +42 -17
  386. package/src/spacer/edit.js +176 -18
  387. package/src/spacer/editor.scss +2 -1
  388. package/src/spacer/save.js +3 -3
  389. package/src/style.scss +2 -0
  390. package/src/table/state.js +83 -66
  391. package/src/template-part/edit/index.js +1 -0
  392. package/src/template-part/edit/utils/hooks.js +2 -2
  393. package/src/template-part/editor.scss +9 -11
  394. package/src/term-description/block.json +1 -2
  395. package/src/utils/migrate-font-family.js +8 -1
  396. package/src/verse/test/edit.native.js +28 -0
  397. package/src/video/edit.native.js +2 -2
  398. package/tsconfig.json +1 -0
  399. package/build/cover/edit/resizable-cover.js.map +0 -1
  400. package/build/media-text/media-container-icon.js +0 -27
  401. package/build/media-text/media-container-icon.js.map +0 -1
  402. package/build/query/hooks.js +0 -72
  403. package/build/query/hooks.js.map +0 -1
  404. package/build/utils/clean-empty-object.js +0 -34
  405. package/build/utils/clean-empty-object.js.map +0 -1
  406. package/build-module/cover/edit/resizable-cover.js.map +0 -1
  407. package/build-module/media-text/media-container-icon.js +0 -17
  408. package/build-module/media-text/media-container-icon.js.map +0 -1
  409. package/build-module/query/hooks.js +0 -59
  410. package/build-module/query/hooks.js.map +0 -1
  411. package/build-module/utils/clean-empty-object.js +0 -25
  412. package/build-module/utils/clean-empty-object.js.map +0 -1
  413. package/src/cover/edit/resizable-cover.js +0 -61
  414. package/src/media-text/media-container-icon.js +0 -12
  415. package/src/query/hooks.js +0 -53
  416. package/src/utils/clean-empty-object.js +0 -28
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { mapValues } from 'lodash';
5
-
6
1
  const INHERITED_COLUMN_ATTRIBUTES = [ 'align' ];
7
2
 
8
3
  /**
@@ -82,33 +77,45 @@ export function updateSelectedCell( state, selection, updateCell ) {
82
77
  const { sectionName: selectionSectionName, rowIndex: selectionRowIndex } =
83
78
  selection;
84
79
 
85
- return mapValues( tableSections, ( section, sectionName ) => {
86
- if ( selectionSectionName && selectionSectionName !== sectionName ) {
87
- return section;
88
- }
89
-
90
- return section.map( ( row, rowIndex ) => {
91
- if ( selectionRowIndex && selectionRowIndex !== rowIndex ) {
92
- return row;
80
+ return Object.fromEntries(
81
+ Object.entries( tableSections ).map( ( [ sectionName, section ] ) => {
82
+ if (
83
+ selectionSectionName &&
84
+ selectionSectionName !== sectionName
85
+ ) {
86
+ return [ sectionName, section ];
93
87
  }
94
88
 
95
- return {
96
- cells: row.cells.map( ( cellAttributes, columnIndex ) => {
97
- const cellLocation = {
98
- sectionName,
99
- columnIndex,
100
- rowIndex,
101
- };
102
-
103
- if ( ! isCellSelected( cellLocation, selection ) ) {
104
- return cellAttributes;
89
+ return [
90
+ sectionName,
91
+ section.map( ( row, rowIndex ) => {
92
+ if ( selectionRowIndex && selectionRowIndex !== rowIndex ) {
93
+ return row;
105
94
  }
106
95
 
107
- return updateCell( cellAttributes );
96
+ return {
97
+ cells: row.cells.map(
98
+ ( cellAttributes, columnIndex ) => {
99
+ const cellLocation = {
100
+ sectionName,
101
+ columnIndex,
102
+ rowIndex,
103
+ };
104
+
105
+ if (
106
+ ! isCellSelected( cellLocation, selection )
107
+ ) {
108
+ return cellAttributes;
109
+ }
110
+
111
+ return updateCell( cellAttributes );
112
+ }
113
+ ),
114
+ };
108
115
  } ),
109
- };
110
- } );
111
- } );
116
+ ];
117
+ } )
118
+ );
112
119
  }
113
120
 
114
121
  /**
@@ -224,31 +231,36 @@ export function insertColumn( state, { columnIndex } ) {
224
231
  )
225
232
  );
226
233
 
227
- return mapValues( tableSections, ( section, sectionName ) => {
228
- // Bail early if the table section is empty.
229
- if ( isEmptyTableSection( section ) ) {
230
- return section;
231
- }
232
-
233
- return section.map( ( row ) => {
234
- // Bail early if the row is empty or it's an attempt to insert past
235
- // the last possible index of the array.
236
- if ( isEmptyRow( row ) || row.cells.length < columnIndex ) {
237
- return row;
234
+ return Object.fromEntries(
235
+ Object.entries( tableSections ).map( ( [ sectionName, section ] ) => {
236
+ // Bail early if the table section is empty.
237
+ if ( isEmptyTableSection( section ) ) {
238
+ return [ sectionName, section ];
238
239
  }
239
240
 
240
- return {
241
- cells: [
242
- ...row.cells.slice( 0, columnIndex ),
243
- {
244
- content: '',
245
- tag: sectionName === 'head' ? 'th' : 'td',
246
- },
247
- ...row.cells.slice( columnIndex ),
248
- ],
249
- };
250
- } );
251
- } );
241
+ return [
242
+ sectionName,
243
+ section.map( ( row ) => {
244
+ // Bail early if the row is empty or it's an attempt to insert past
245
+ // the last possible index of the array.
246
+ if ( isEmptyRow( row ) || row.cells.length < columnIndex ) {
247
+ return row;
248
+ }
249
+
250
+ return {
251
+ cells: [
252
+ ...row.cells.slice( 0, columnIndex ),
253
+ {
254
+ content: '',
255
+ tag: sectionName === 'head' ? 'th' : 'td',
256
+ },
257
+ ...row.cells.slice( columnIndex ),
258
+ ],
259
+ };
260
+ } ),
261
+ ];
262
+ } )
263
+ );
252
264
  }
253
265
 
254
266
  /**
@@ -267,23 +279,28 @@ export function deleteColumn( state, { columnIndex } ) {
267
279
  )
268
280
  );
269
281
 
270
- return mapValues( tableSections, ( section ) => {
271
- // Bail early if the table section is empty.
272
- if ( isEmptyTableSection( section ) ) {
273
- return section;
274
- }
282
+ return Object.fromEntries(
283
+ Object.entries( tableSections ).map( ( [ sectionName, section ] ) => {
284
+ // Bail early if the table section is empty.
285
+ if ( isEmptyTableSection( section ) ) {
286
+ return [ sectionName, section ];
287
+ }
275
288
 
276
- return section
277
- .map( ( row ) => ( {
278
- cells:
279
- row.cells.length >= columnIndex
280
- ? row.cells.filter(
281
- ( cell, index ) => index !== columnIndex
282
- )
283
- : row.cells,
284
- } ) )
285
- .filter( ( row ) => row.cells.length );
286
- } );
289
+ return [
290
+ sectionName,
291
+ section
292
+ .map( ( row ) => ( {
293
+ cells:
294
+ row.cells.length >= columnIndex
295
+ ? row.cells.filter(
296
+ ( cell, index ) => index !== columnIndex
297
+ )
298
+ : row.cells,
299
+ } ) )
300
+ .filter( ( row ) => row.cells.length ),
301
+ ];
302
+ } )
303
+ );
287
304
  }
288
305
 
289
306
  /**
@@ -205,6 +205,7 @@ export default function TemplatePartEdit( {
205
205
  onRequestClose={ () =>
206
206
  setIsTemplatePartSelectionOpen( false )
207
207
  }
208
+ isFullScreen={ true }
208
209
  >
209
210
  <TemplatePartSelectionModal
210
211
  templatePartId={ templatePartId }
@@ -37,7 +37,7 @@ export function useAlternativeTemplateParts( area, excludedId ) {
37
37
  'wp_template_part',
38
38
  query
39
39
  ),
40
- isLoading: _isResolving( 'getEntityRecords', [
40
+ isResolving: _isResolving( 'getEntityRecords', [
41
41
  'postType',
42
42
  'wp_template_part',
43
43
  query,
@@ -61,7 +61,7 @@ export function useAlternativeTemplateParts( area, excludedId ) {
61
61
  templatePart.area === area )
62
62
  ) || []
63
63
  );
64
- }, [ templateParts, area ] );
64
+ }, [ templateParts, area, excludedId ] );
65
65
 
66
66
  return {
67
67
  templateParts: filteredTemplateParts,
@@ -1,18 +1,16 @@
1
1
  .block-editor-template-part__selection-modal {
2
2
  z-index: z-index(".block-editor-template-part__selection-modal");
3
3
 
4
- // To keep modal dimensions consistent as subsections are navigated, width
5
- // and height are used instead of max-(width/height).
6
- .components-modal__frame {
7
- @include break-small() {
8
- width: calc(100% - #{$grid-unit-20 * 2});
9
- height: calc(100% - #{$header-height * 2});
10
- }
11
- @include break-medium() {
12
- width: $break-medium - $grid-unit-20 * 2;
4
+ .block-editor-block-patterns-list {
5
+ column-count: 2;
6
+ column-gap: $grid-unit-30;
7
+
8
+ @include break-wide() {
9
+ column-count: 3;
13
10
  }
14
- @include break-large() {
15
- height: 70%;
11
+
12
+ .block-editor-block-patterns-list__list-item {
13
+ break-inside: avoid-column;
16
14
  }
17
15
  }
18
16
  }
@@ -39,6 +39,5 @@
39
39
  "fontSize": true
40
40
  }
41
41
  }
42
- },
43
- "editorStyle": "wp-block-term-description-editor"
42
+ }
44
43
  }
@@ -1,7 +1,14 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
5
+
1
6
  /**
2
7
  * Internal dependencies
3
8
  */
4
- import cleanEmptyObject from './clean-empty-object';
9
+ import { unlock } from '../private-apis';
10
+
11
+ const { cleanEmptyObject } = unlock( blockEditorPrivateApis );
5
12
 
6
13
  /**
7
14
  * Migrates the current style.typography.fontFamily attribute,
@@ -6,6 +6,8 @@ import {
6
6
  getEditorHtml,
7
7
  initializeEditor,
8
8
  getBlock,
9
+ typeInRichText,
10
+ fireEvent,
9
11
  } from 'test/helpers';
10
12
 
11
13
  /**
@@ -13,6 +15,7 @@ import {
13
15
  */
14
16
  import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks';
15
17
  import { registerCoreBlocks } from '@wordpress/block-library';
18
+ import { ENTER } from '@wordpress/keycodes';
16
19
 
17
20
  beforeAll( () => {
18
21
  // Register all core blocks
@@ -51,4 +54,29 @@ describe( 'Verse block', () => {
51
54
  expect( verseBlock ).toBeVisible();
52
55
  expect( getEditorHtml() ).toMatchSnapshot();
53
56
  } );
57
+
58
+ it( 'should produce expected markup for multiline text', async () => {
59
+ // Arrange
60
+ const screen = await initializeEditor();
61
+ await addBlock( screen, 'Verse' );
62
+
63
+ // Act
64
+ const verseTextInput = await screen.findByPlaceholderText(
65
+ 'Write verse…'
66
+ );
67
+ typeInRichText( verseTextInput, 'A great statement.' );
68
+ fireEvent( verseTextInput, 'onKeyDown', {
69
+ nativeEvent: {},
70
+ preventDefault() {},
71
+ keyCode: ENTER,
72
+ } );
73
+ typeInRichText( verseTextInput, 'Again' );
74
+
75
+ // Assert
76
+ expect( getEditorHtml() ).toMatchInlineSnapshot( `
77
+ "<!-- wp:verse -->
78
+ <pre class="wp-block-verse">A great statement.<br>Again</pre>
79
+ <!-- /wp:verse -->"
80
+ ` );
81
+ } );
54
82
  } );
@@ -172,7 +172,7 @@ class VideoEdit extends Component {
172
172
  return;
173
173
  }
174
174
 
175
- setAttributes( { id: url, src: url } );
175
+ setAttributes( { src: url, id: undefined, poster: undefined } );
176
176
  } else {
177
177
  createErrorNotice( __( 'Invalid URL.' ) );
178
178
  }
@@ -235,7 +235,7 @@ class VideoEdit extends Component {
235
235
  ></MediaUpload>
236
236
  );
237
237
 
238
- if ( ! id ) {
238
+ if ( ! src ) {
239
239
  return (
240
240
  <View style={ { flex: 1 } }>
241
241
  <MediaPlaceholder
package/tsconfig.json CHANGED
@@ -26,6 +26,7 @@
26
26
  { "path": "../html-entities" },
27
27
  { "path": "../i18n" },
28
28
  { "path": "../icons" },
29
+ { "path": "../notices" },
29
30
  { "path": "../keycodes" },
30
31
  { "path": "../primitives" },
31
32
  { "path": "../url" },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/cover/edit/resizable-cover.js"],"names":["RESIZABLE_BOX_ENABLE_OPTION","top","right","bottom","left","topRight","bottomRight","bottomLeft","topLeft","ResizableCover","className","onResizeStart","onResize","onResizeStop","props","isResizing","setIsResizing","_event","_direction","elt","clientHeight","axis","position","isVisible"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,2BAA2B,GAAG;AACnCC,EAAAA,GAAG,EAAE,KAD8B;AAEnCC,EAAAA,KAAK,EAAE,KAF4B;AAGnCC,EAAAA,MAAM,EAAE,IAH2B;AAInCC,EAAAA,IAAI,EAAE,KAJ6B;AAKnCC,EAAAA,QAAQ,EAAE,KALyB;AAMnCC,EAAAA,WAAW,EAAE,KANsB;AAOnCC,EAAAA,UAAU,EAAE,KAPuB;AAQnCC,EAAAA,OAAO,EAAE;AAR0B,CAApC;;AAWe,SAASC,cAAT,OAMX;AAAA,MANoC;AACvCC,IAAAA,SADuC;AAEvCC,IAAAA,aAFuC;AAGvCC,IAAAA,QAHuC;AAIvCC,IAAAA,YAJuC;AAKvC,OAAGC;AALoC,GAMpC;AACH,QAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgC,uBAAU,KAAV,CAAtC;AAEA,SACC,4BAAC,wBAAD;AACC,IAAA,SAAS,EAAG,yBAAYN,SAAZ,EAAuB;AAClC,qBAAeK;AADmB,KAAvB,CADb;AAIC,IAAA,MAAM,EAAGf,2BAJV;AAKC,IAAA,aAAa,EAAG,CAAEiB,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AAC9CR,MAAAA,aAAa,CAAEQ,GAAG,CAACC,YAAN,CAAb;AACAR,MAAAA,QAAQ,CAAEO,GAAG,CAACC,YAAN,CAAR;AACA,KARF;AASC,IAAA,QAAQ,EAAG,CAAEH,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AACzCP,MAAAA,QAAQ,CAAEO,GAAG,CAACC,YAAN,CAAR;;AACA,UAAK,CAAEL,UAAP,EAAoB;AACnBC,QAAAA,aAAa,CAAE,IAAF,CAAb;AACA;AACD,KAdF;AAeC,IAAA,YAAY,EAAG,CAAEC,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AAC7CN,MAAAA,YAAY,CAAEM,GAAG,CAACC,YAAN,CAAZ;AACAJ,MAAAA,aAAa,CAAE,KAAF,CAAb;AACA,KAlBF;AAmBC,IAAA,yBAAyB,MAnB1B;AAoBC,IAAA,0BAA0B,EAAG;AAC5BK,MAAAA,IAAI,EAAE,GADsB;AAE5BC,MAAAA,QAAQ,EAAE,QAFkB;AAG5BC,MAAAA,SAAS,EAAER;AAHiB;AApB9B,KAyBMD,KAzBN,EADD;AA6BA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\nconst RESIZABLE_BOX_ENABLE_OPTION = {\n\ttop: false,\n\tright: false,\n\tbottom: true,\n\tleft: false,\n\ttopRight: false,\n\tbottomRight: false,\n\tbottomLeft: false,\n\ttopLeft: false,\n};\n\nexport default function ResizableCover( {\n\tclassName,\n\tonResizeStart,\n\tonResize,\n\tonResizeStop,\n\t...props\n} ) {\n\tconst [ isResizing, setIsResizing ] = useState( false );\n\n\treturn (\n\t\t<ResizableBox\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-resizing': isResizing,\n\t\t\t} ) }\n\t\t\tenable={ RESIZABLE_BOX_ENABLE_OPTION }\n\t\t\tonResizeStart={ ( _event, _direction, elt ) => {\n\t\t\t\tonResizeStart( elt.clientHeight );\n\t\t\t\tonResize( elt.clientHeight );\n\t\t\t} }\n\t\t\tonResize={ ( _event, _direction, elt ) => {\n\t\t\t\tonResize( elt.clientHeight );\n\t\t\t\tif ( ! isResizing ) {\n\t\t\t\t\tsetIsResizing( true );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonResizeStop={ ( _event, _direction, elt ) => {\n\t\t\t\tonResizeStop( elt.clientHeight );\n\t\t\t\tsetIsResizing( false );\n\t\t\t} }\n\t\t\t__experimentalShowTooltip\n\t\t\t__experimentalTooltipProps={ {\n\t\t\t\taxis: 'y',\n\t\t\t\tposition: 'bottom',\n\t\t\t\tisVisible: isResizing,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _element = require("@wordpress/element");
9
-
10
- var _components = require("@wordpress/components");
11
-
12
- /**
13
- * WordPress dependencies
14
- */
15
- var _default = (0, _element.createElement)(_components.SVG, {
16
- xmlns: "http://www.w3.org/2000/svg",
17
- viewBox: "0 0 24 24"
18
- }, (0, _element.createElement)(_components.Path, {
19
- d: "M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"
20
- }), (0, _element.createElement)(_components.Path, {
21
- d: "M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"
22
- }), (0, _element.createElement)(_components.Path, {
23
- d: "M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"
24
- }));
25
-
26
- exports.default = _default;
27
- //# sourceMappingURL=media-container-icon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/media-text/media-container-icon.js"],"names":[],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;eAIC,4BAAC,eAAD;AAAK,EAAA,KAAK,EAAC,4BAAX;AAAwC,EAAA,OAAO,EAAC;AAAhD,GACC,4BAAC,gBAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EADD,EAEC,4BAAC,gBAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EAFD,EAGC,4BAAC,gBAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EAHD,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z\" />\n\t\t<Path d=\"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z\" />\n\t\t<Path d=\"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z\" />\n\t</SVG>\n);\n"]}
@@ -1,72 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports.default = void 0;
9
-
10
- var _element = require("@wordpress/element");
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var _i18n = require("@wordpress/i18n");
15
-
16
- var _url = require("@wordpress/url");
17
-
18
- var _compose = require("@wordpress/compose");
19
-
20
- var _blockEditor = require("@wordpress/block-editor");
21
-
22
- /**
23
- * WordPress dependencies
24
- */
25
- const CreateNewPostLink = _ref => {
26
- let {
27
- attributes: {
28
- query: {
29
- postType
30
- } = {}
31
- } = {}
32
- } = _ref;
33
- if (!postType) return null;
34
- const newPostUrl = (0, _url.addQueryArgs)('post-new.php', {
35
- post_type: postType
36
- });
37
- return (0, _element.createElement)("div", {
38
- className: "wp-block-query__create-new-link"
39
- }, (0, _element.createInterpolateElement)((0, _i18n.__)('<a>Create a new post</a> for this feed.'), // eslint-disable-next-line jsx-a11y/anchor-has-content
40
- {
41
- a: (0, _element.createElement)("a", {
42
- href: newPostUrl
43
- })
44
- }));
45
- };
46
- /**
47
- * Override the default edit UI to include layout controls
48
- *
49
- * @param {Function} BlockEdit Original component
50
- * @return {Function} Wrapped component
51
- */
52
-
53
-
54
- const queryTopInspectorControls = (0, _compose.createHigherOrderComponent)(BlockEdit => props => {
55
- const {
56
- name,
57
- isSelected
58
- } = props;
59
-
60
- if (name !== 'core/query' || !isSelected) {
61
- return (0, _element.createElement)(BlockEdit, (0, _extends2.default)({
62
- key: "edit"
63
- }, props));
64
- }
65
-
66
- return (0, _element.createElement)(_element.Fragment, null, (0, _element.createElement)(_blockEditor.InspectorControls, null, (0, _element.createElement)(CreateNewPostLink, props)), (0, _element.createElement)(BlockEdit, (0, _extends2.default)({
67
- key: "edit"
68
- }, props)));
69
- }, 'withInspectorControls');
70
- var _default = queryTopInspectorControls;
71
- exports.default = _default;
72
- //# sourceMappingURL=hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/query/hooks.js"],"names":["CreateNewPostLink","attributes","query","postType","newPostUrl","post_type","a","queryTopInspectorControls","BlockEdit","props","name","isSelected"],"mappings":";;;;;;;;;AAIA;;;;AADA;;AAEA;;AACA;;AACA;;AAPA;AACA;AACA;AAOA,MAAMA,iBAAiB,GAAG,QAEnB;AAAA,MAFqB;AAC3BC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,KAAK,EAAE;AAAEC,QAAAA;AAAF,UAAe;AAAxB,QAA+B;AADhB,GAErB;AACN,MAAK,CAAEA,QAAP,EAAkB,OAAO,IAAP;AAClB,QAAMC,UAAU,GAAG,uBAAc,cAAd,EAA8B;AAChDC,IAAAA,SAAS,EAAEF;AADqC,GAA9B,CAAnB;AAGA,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACG,uCACD,cAAI,yCAAJ,CADC,EAED;AACA;AAAEG,IAAAA,CAAC,EAAE;AAAG,MAAA,IAAI,EAAGF;AAAV;AAAL,GAHC,CADH,CADD;AASA,CAhBD;AAkBA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,yBAAyB,GAAG,yCAC/BC,SAAF,IAAmBC,KAAF,IAAa;AAC7B,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAuBF,KAA7B;;AACA,MAAKC,IAAI,KAAK,YAAT,IAAyB,CAAEC,UAAhC,EAA6C;AAC5C,WAAO,4BAAC,SAAD;AAAW,MAAA,GAAG,EAAC;AAAf,OAA2BF,KAA3B,EAAP;AACA;;AAED,SACC,qDACC,4BAAC,8BAAD,QACC,4BAAC,iBAAD,EAAwBA,KAAxB,CADD,CADD,EAIC,4BAAC,SAAD;AAAW,IAAA,GAAG,EAAC;AAAf,KAA2BA,KAA3B,EAJD,CADD;AAQA,CAfgC,EAgBjC,uBAhBiC,CAAlC;eAmBeF,yB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { InspectorControls } from '@wordpress/block-editor';\n\nconst CreateNewPostLink = ( {\n\tattributes: { query: { postType } = {} } = {},\n} ) => {\n\tif ( ! postType ) return null;\n\tconst newPostUrl = addQueryArgs( 'post-new.php', {\n\t\tpost_type: postType,\n\t} );\n\treturn (\n\t\t<div className=\"wp-block-query__create-new-link\">\n\t\t\t{ createInterpolateElement(\n\t\t\t\t__( '<a>Create a new post</a> for this feed.' ),\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t{ a: <a href={ newPostUrl } /> }\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\n/**\n * Override the default edit UI to include layout controls\n *\n * @param {Function} BlockEdit Original component\n * @return {Function} Wrapped component\n */\nconst queryTopInspectorControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { name, isSelected } = props;\n\t\tif ( name !== 'core/query' || ! isSelected ) {\n\t\t\treturn <BlockEdit key=\"edit\" { ...props } />;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t\t</InspectorControls>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t</>\n\t\t);\n\t},\n\t'withInspectorControls'\n);\n\nexport default queryTopInspectorControls;\n"]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _lodash = require("lodash");
9
-
10
- /**
11
- * External dependencies
12
- */
13
-
14
- /**
15
- * Removed empty nodes from nested objects.
16
- *
17
- * @param {Object} object
18
- * @return {Object} Object cleaned from empty nodes.
19
- */
20
- const cleanEmptyObject = object => {
21
- if (object === null || typeof object !== 'object' || Array.isArray(object)) {
22
- return object;
23
- }
24
-
25
- const cleanedNestedObjects = Object.fromEntries(Object.entries((0, _lodash.mapValues)(object, cleanEmptyObject)).filter(_ref => {
26
- let [, value] = _ref;
27
- return Boolean(value);
28
- }));
29
- return (0, _lodash.isEmpty)(cleanedNestedObjects) ? undefined : cleanedNestedObjects;
30
- };
31
-
32
- var _default = cleanEmptyObject;
33
- exports.default = _default;
34
- //# sourceMappingURL=clean-empty-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/utils/clean-empty-object.js"],"names":["cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","fromEntries","entries","filter","value","Boolean","undefined"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,gBAAgB,GAAKC,MAAF,IAAc;AACtC,MACCA,MAAM,KAAK,IAAX,IACA,OAAOA,MAAP,KAAkB,QADlB,IAEAC,KAAK,CAACC,OAAN,CAAeF,MAAf,CAHD,EAIE;AACD,WAAOA,MAAP;AACA;;AACD,QAAMG,oBAAoB,GAAGC,MAAM,CAACC,WAAP,CAC5BD,MAAM,CAACE,OAAP,CAAgB,uBAAWN,MAAX,EAAmBD,gBAAnB,CAAhB,EAAwDQ,MAAxD,CACC;AAAA,QAAE,GAAIC,KAAJ,CAAF;AAAA,WAAmBC,OAAO,CAAED,KAAF,CAA1B;AAAA,GADD,CAD4B,CAA7B;AAKA,SAAO,qBAASL,oBAAT,IAAkCO,SAAlC,GAA8CP,oBAArD;AACA,CAdD;;eAgBeJ,gB","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty, mapValues } from 'lodash';\n\n/**\n * Removed empty nodes from nested objects.\n *\n * @param {Object} object\n * @return {Object} Object cleaned from empty nodes.\n */\nconst cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\tconst cleanedNestedObjects = Object.fromEntries(\n\t\tObject.entries( mapValues( object, cleanEmptyObject ) ).filter(\n\t\t\t( [ , value ] ) => Boolean( value )\n\t\t)\n\t);\n\treturn isEmpty( cleanedNestedObjects ) ? undefined : cleanedNestedObjects;\n};\n\nexport default cleanEmptyObject;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/cover/edit/resizable-cover.js"],"names":["classnames","useState","ResizableBox","RESIZABLE_BOX_ENABLE_OPTION","top","right","bottom","left","topRight","bottomRight","bottomLeft","topLeft","ResizableCover","className","onResizeStart","onResize","onResizeStop","props","isResizing","setIsResizing","_event","_direction","elt","clientHeight","axis","position","isVisible"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,QAAT,QAAyB,oBAAzB;AACA,SAASC,YAAT,QAA6B,uBAA7B;AAEA,MAAMC,2BAA2B,GAAG;AACnCC,EAAAA,GAAG,EAAE,KAD8B;AAEnCC,EAAAA,KAAK,EAAE,KAF4B;AAGnCC,EAAAA,MAAM,EAAE,IAH2B;AAInCC,EAAAA,IAAI,EAAE,KAJ6B;AAKnCC,EAAAA,QAAQ,EAAE,KALyB;AAMnCC,EAAAA,WAAW,EAAE,KANsB;AAOnCC,EAAAA,UAAU,EAAE,KAPuB;AAQnCC,EAAAA,OAAO,EAAE;AAR0B,CAApC;AAWA,eAAe,SAASC,cAAT,OAMX;AAAA,MANoC;AACvCC,IAAAA,SADuC;AAEvCC,IAAAA,aAFuC;AAGvCC,IAAAA,QAHuC;AAIvCC,IAAAA,YAJuC;AAKvC,OAAGC;AALoC,GAMpC;AACH,QAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgClB,QAAQ,CAAE,KAAF,CAA9C;AAEA,SACC,cAAC,YAAD;AACC,IAAA,SAAS,EAAGD,UAAU,CAAEa,SAAF,EAAa;AAClC,qBAAeK;AADmB,KAAb,CADvB;AAIC,IAAA,MAAM,EAAGf,2BAJV;AAKC,IAAA,aAAa,EAAG,CAAEiB,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AAC9CR,MAAAA,aAAa,CAAEQ,GAAG,CAACC,YAAN,CAAb;AACAR,MAAAA,QAAQ,CAAEO,GAAG,CAACC,YAAN,CAAR;AACA,KARF;AASC,IAAA,QAAQ,EAAG,CAAEH,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AACzCP,MAAAA,QAAQ,CAAEO,GAAG,CAACC,YAAN,CAAR;;AACA,UAAK,CAAEL,UAAP,EAAoB;AACnBC,QAAAA,aAAa,CAAE,IAAF,CAAb;AACA;AACD,KAdF;AAeC,IAAA,YAAY,EAAG,CAAEC,MAAF,EAAUC,UAAV,EAAsBC,GAAtB,KAA+B;AAC7CN,MAAAA,YAAY,CAAEM,GAAG,CAACC,YAAN,CAAZ;AACAJ,MAAAA,aAAa,CAAE,KAAF,CAAb;AACA,KAlBF;AAmBC,IAAA,yBAAyB,MAnB1B;AAoBC,IAAA,0BAA0B,EAAG;AAC5BK,MAAAA,IAAI,EAAE,GADsB;AAE5BC,MAAAA,QAAQ,EAAE,QAFkB;AAG5BC,MAAAA,SAAS,EAAER;AAHiB;AApB9B,KAyBMD,KAzBN,EADD;AA6BA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\nconst RESIZABLE_BOX_ENABLE_OPTION = {\n\ttop: false,\n\tright: false,\n\tbottom: true,\n\tleft: false,\n\ttopRight: false,\n\tbottomRight: false,\n\tbottomLeft: false,\n\ttopLeft: false,\n};\n\nexport default function ResizableCover( {\n\tclassName,\n\tonResizeStart,\n\tonResize,\n\tonResizeStop,\n\t...props\n} ) {\n\tconst [ isResizing, setIsResizing ] = useState( false );\n\n\treturn (\n\t\t<ResizableBox\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-resizing': isResizing,\n\t\t\t} ) }\n\t\t\tenable={ RESIZABLE_BOX_ENABLE_OPTION }\n\t\t\tonResizeStart={ ( _event, _direction, elt ) => {\n\t\t\t\tonResizeStart( elt.clientHeight );\n\t\t\t\tonResize( elt.clientHeight );\n\t\t\t} }\n\t\t\tonResize={ ( _event, _direction, elt ) => {\n\t\t\t\tonResize( elt.clientHeight );\n\t\t\t\tif ( ! isResizing ) {\n\t\t\t\t\tsetIsResizing( true );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonResizeStop={ ( _event, _direction, elt ) => {\n\t\t\t\tonResizeStop( elt.clientHeight );\n\t\t\t\tsetIsResizing( false );\n\t\t\t} }\n\t\t\t__experimentalShowTooltip\n\t\t\t__experimentalTooltipProps={ {\n\t\t\t\taxis: 'y',\n\t\t\t\tposition: 'bottom',\n\t\t\t\tisVisible: isResizing,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
@@ -1,17 +0,0 @@
1
- import { createElement } from "@wordpress/element";
2
-
3
- /**
4
- * WordPress dependencies
5
- */
6
- import { Path, SVG } from '@wordpress/components';
7
- export default createElement(SVG, {
8
- xmlns: "http://www.w3.org/2000/svg",
9
- viewBox: "0 0 24 24"
10
- }, createElement(Path, {
11
- d: "M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z"
12
- }), createElement(Path, {
13
- d: "M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z"
14
- }), createElement(Path, {
15
- d: "M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z"
16
- }));
17
- //# sourceMappingURL=media-container-icon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/media-text/media-container-icon.js"],"names":["Path","SVG"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,EAAeC,GAAf,QAA0B,uBAA1B;AAEA,eACC,cAAC,GAAD;AAAK,EAAA,KAAK,EAAC,4BAAX;AAAwC,EAAA,OAAO,EAAC;AAAhD,GACC,cAAC,IAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EADD,EAEC,cAAC,IAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EAFD,EAGC,cAAC,IAAD;AAAM,EAAA,CAAC,EAAC;AAAR,EAHD,CADD","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport default (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 2l2 4h-2l-2-4h-3l2 4h-2l-2-4h-1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2zm2 12H10V4.4L11.8 8H20z\" />\n\t\t<Path d=\"M14 20H4V10h3V8H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3h-2z\" />\n\t\t<Path d=\"M5 19h8l-1.59-2H9.24l-.84 1.1L7 16.3 5 19z\" />\n\t</SVG>\n);\n"]}
@@ -1,59 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { createElement, Fragment } from "@wordpress/element";
3
-
4
- /**
5
- * WordPress dependencies
6
- */
7
- import { __ } from '@wordpress/i18n';
8
- import { createInterpolateElement } from '@wordpress/element';
9
- import { addQueryArgs } from '@wordpress/url';
10
- import { createHigherOrderComponent } from '@wordpress/compose';
11
- import { InspectorControls } from '@wordpress/block-editor';
12
-
13
- const CreateNewPostLink = _ref => {
14
- let {
15
- attributes: {
16
- query: {
17
- postType
18
- } = {}
19
- } = {}
20
- } = _ref;
21
- if (!postType) return null;
22
- const newPostUrl = addQueryArgs('post-new.php', {
23
- post_type: postType
24
- });
25
- return createElement("div", {
26
- className: "wp-block-query__create-new-link"
27
- }, createInterpolateElement(__('<a>Create a new post</a> for this feed.'), // eslint-disable-next-line jsx-a11y/anchor-has-content
28
- {
29
- a: createElement("a", {
30
- href: newPostUrl
31
- })
32
- }));
33
- };
34
- /**
35
- * Override the default edit UI to include layout controls
36
- *
37
- * @param {Function} BlockEdit Original component
38
- * @return {Function} Wrapped component
39
- */
40
-
41
-
42
- const queryTopInspectorControls = createHigherOrderComponent(BlockEdit => props => {
43
- const {
44
- name,
45
- isSelected
46
- } = props;
47
-
48
- if (name !== 'core/query' || !isSelected) {
49
- return createElement(BlockEdit, _extends({
50
- key: "edit"
51
- }, props));
52
- }
53
-
54
- return createElement(Fragment, null, createElement(InspectorControls, null, createElement(CreateNewPostLink, props)), createElement(BlockEdit, _extends({
55
- key: "edit"
56
- }, props)));
57
- }, 'withInspectorControls');
58
- export default queryTopInspectorControls;
59
- //# sourceMappingURL=hooks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/query/hooks.js"],"names":["__","createInterpolateElement","addQueryArgs","createHigherOrderComponent","InspectorControls","CreateNewPostLink","attributes","query","postType","newPostUrl","post_type","a","queryTopInspectorControls","BlockEdit","props","name","isSelected"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AACA,SAASC,iBAAT,QAAkC,yBAAlC;;AAEA,MAAMC,iBAAiB,GAAG,QAEnB;AAAA,MAFqB;AAC3BC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,KAAK,EAAE;AAAEC,QAAAA;AAAF,UAAe;AAAxB,QAA+B;AADhB,GAErB;AACN,MAAK,CAAEA,QAAP,EAAkB,OAAO,IAAP;AAClB,QAAMC,UAAU,GAAGP,YAAY,CAAE,cAAF,EAAkB;AAChDQ,IAAAA,SAAS,EAAEF;AADqC,GAAlB,CAA/B;AAGA,SACC;AAAK,IAAA,SAAS,EAAC;AAAf,KACGP,wBAAwB,CACzBD,EAAE,CAAE,yCAAF,CADuB,EAEzB;AACA;AAAEW,IAAAA,CAAC,EAAE;AAAG,MAAA,IAAI,EAAGF;AAAV;AAAL,GAHyB,CAD3B,CADD;AASA,CAhBD;AAkBA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMG,yBAAyB,GAAGT,0BAA0B,CACzDU,SAAF,IAAmBC,KAAF,IAAa;AAC7B,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA;AAAR,MAAuBF,KAA7B;;AACA,MAAKC,IAAI,KAAK,YAAT,IAAyB,CAAEC,UAAhC,EAA6C;AAC5C,WAAO,cAAC,SAAD;AAAW,MAAA,GAAG,EAAC;AAAf,OAA2BF,KAA3B,EAAP;AACA;;AAED,SACC,8BACC,cAAC,iBAAD,QACC,cAAC,iBAAD,EAAwBA,KAAxB,CADD,CADD,EAIC,cAAC,SAAD;AAAW,IAAA,GAAG,EAAC;AAAf,KAA2BA,KAA3B,EAJD,CADD;AAQA,CAf0D,EAgB3D,uBAhB2D,CAA5D;AAmBA,eAAeF,yBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { InspectorControls } from '@wordpress/block-editor';\n\nconst CreateNewPostLink = ( {\n\tattributes: { query: { postType } = {} } = {},\n} ) => {\n\tif ( ! postType ) return null;\n\tconst newPostUrl = addQueryArgs( 'post-new.php', {\n\t\tpost_type: postType,\n\t} );\n\treturn (\n\t\t<div className=\"wp-block-query__create-new-link\">\n\t\t\t{ createInterpolateElement(\n\t\t\t\t__( '<a>Create a new post</a> for this feed.' ),\n\t\t\t\t// eslint-disable-next-line jsx-a11y/anchor-has-content\n\t\t\t\t{ a: <a href={ newPostUrl } /> }\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\n/**\n * Override the default edit UI to include layout controls\n *\n * @param {Function} BlockEdit Original component\n * @return {Function} Wrapped component\n */\nconst queryTopInspectorControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { name, isSelected } = props;\n\t\tif ( name !== 'core/query' || ! isSelected ) {\n\t\t\treturn <BlockEdit key=\"edit\" { ...props } />;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<CreateNewPostLink { ...props } />\n\t\t\t\t</InspectorControls>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t</>\n\t\t);\n\t},\n\t'withInspectorControls'\n);\n\nexport default queryTopInspectorControls;\n"]}
@@ -1,25 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { isEmpty, mapValues } from 'lodash';
5
- /**
6
- * Removed empty nodes from nested objects.
7
- *
8
- * @param {Object} object
9
- * @return {Object} Object cleaned from empty nodes.
10
- */
11
-
12
- const cleanEmptyObject = object => {
13
- if (object === null || typeof object !== 'object' || Array.isArray(object)) {
14
- return object;
15
- }
16
-
17
- const cleanedNestedObjects = Object.fromEntries(Object.entries(mapValues(object, cleanEmptyObject)).filter(_ref => {
18
- let [, value] = _ref;
19
- return Boolean(value);
20
- }));
21
- return isEmpty(cleanedNestedObjects) ? undefined : cleanedNestedObjects;
22
- };
23
-
24
- export default cleanEmptyObject;
25
- //# sourceMappingURL=clean-empty-object.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/utils/clean-empty-object.js"],"names":["isEmpty","mapValues","cleanEmptyObject","object","Array","isArray","cleanedNestedObjects","Object","fromEntries","entries","filter","value","Boolean","undefined"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAT,EAAkBC,SAAlB,QAAmC,QAAnC;AAEA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAKC,MAAF,IAAc;AACtC,MACCA,MAAM,KAAK,IAAX,IACA,OAAOA,MAAP,KAAkB,QADlB,IAEAC,KAAK,CAACC,OAAN,CAAeF,MAAf,CAHD,EAIE;AACD,WAAOA,MAAP;AACA;;AACD,QAAMG,oBAAoB,GAAGC,MAAM,CAACC,WAAP,CAC5BD,MAAM,CAACE,OAAP,CAAgBR,SAAS,CAAEE,MAAF,EAAUD,gBAAV,CAAzB,EAAwDQ,MAAxD,CACC;AAAA,QAAE,GAAIC,KAAJ,CAAF;AAAA,WAAmBC,OAAO,CAAED,KAAF,CAA1B;AAAA,GADD,CAD4B,CAA7B;AAKA,SAAOX,OAAO,CAAEM,oBAAF,CAAP,GAAkCO,SAAlC,GAA8CP,oBAArD;AACA,CAdD;;AAgBA,eAAeJ,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { isEmpty, mapValues } from 'lodash';\n\n/**\n * Removed empty nodes from nested objects.\n *\n * @param {Object} object\n * @return {Object} Object cleaned from empty nodes.\n */\nconst cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\tconst cleanedNestedObjects = Object.fromEntries(\n\t\tObject.entries( mapValues( object, cleanEmptyObject ) ).filter(\n\t\t\t( [ , value ] ) => Boolean( value )\n\t\t)\n\t);\n\treturn isEmpty( cleanedNestedObjects ) ? undefined : cleanedNestedObjects;\n};\n\nexport default cleanEmptyObject;\n"]}