@wordpress/block-library 7.10.0 → 7.11.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.
- package/CHANGELOG.md +2 -0
- package/build/button/edit.js +2 -1
- package/build/button/edit.js.map +1 -1
- package/build/buttons/edit.js +1 -1
- package/build/buttons/edit.js.map +1 -1
- package/build/columns/edit.native.js +1 -1
- package/build/columns/edit.native.js.map +1 -1
- package/build/comments/edit/comments-legacy.js +73 -0
- package/build/comments/edit/comments-legacy.js.map +1 -0
- package/build/comments/{edit.js → edit/index.js} +17 -38
- package/build/comments/edit/index.js.map +1 -0
- package/build/comments/edit/placeholder.js +117 -0
- package/build/comments/edit/placeholder.js.map +1 -0
- package/build/comments/edit/template.js +39 -0
- package/build/comments/edit/template.js.map +1 -0
- package/build/comments/index.js +6 -1
- package/build/comments/index.js.map +1 -1
- package/build/comments/save.js +12 -4
- package/build/comments/save.js.map +1 -1
- package/build/cover/transforms.js +3 -2
- package/build/cover/transforms.js.map +1 -1
- package/build/embed/embed-placeholder.native.js +1 -3
- package/build/embed/embed-placeholder.native.js.map +1 -1
- package/build/gallery/edit.js +2 -2
- package/build/gallery/edit.js.map +1 -1
- package/build/gallery/use-get-media.native.js +59 -0
- package/build/gallery/use-get-media.native.js.map +1 -0
- package/build/group/index.js +1 -0
- package/build/group/index.js.map +1 -1
- package/build/group/variations.js +1 -1
- package/build/group/variations.js.map +1 -1
- package/build/image/deprecated.js +77 -9
- package/build/image/deprecated.js.map +1 -1
- package/build/image/edit.js +3 -1
- package/build/image/edit.js.map +1 -1
- package/build/image/edit.native.js +18 -8
- package/build/image/edit.native.js.map +1 -1
- package/build/image/image.js +27 -20
- package/build/image/image.js.map +1 -1
- package/build/image/index.js +7 -1
- package/build/image/index.js.map +1 -1
- package/build/image/save.js +8 -2
- package/build/image/save.js.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/index.native.js +3 -13
- package/build/index.native.js.map +1 -1
- package/build/list/transforms.js +4 -63
- package/build/list/transforms.js.map +1 -1
- package/build/list/v2/transforms.js +0 -27
- package/build/list/v2/transforms.js.map +1 -1
- package/build/list-item/edit.js +14 -9
- package/build/list-item/edit.js.map +1 -1
- package/build/list-item/hooks/index.js +8 -8
- package/build/list-item/hooks/index.js.map +1 -1
- package/build/list-item/hooks/use-merge.js +174 -0
- package/build/list-item/hooks/use-merge.js.map +1 -0
- package/build/list-item/hooks/use-outdent-list-item.js +86 -50
- package/build/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build/list-item/utils.js +125 -1
- package/build/list-item/utils.js.map +1 -1
- package/build/media-text/deprecated.js +134 -7
- package/build/media-text/deprecated.js.map +1 -1
- package/build/media-text/edit.js +2 -2
- package/build/media-text/edit.js.map +1 -1
- package/build/media-text/save.js +13 -0
- package/build/media-text/save.js.map +1 -1
- package/build/more/save.js +1 -7
- package/build/more/save.js.map +1 -1
- package/build/navigation-link/edit.js +5 -4
- package/build/navigation-link/edit.js.map +1 -1
- package/build/navigation-submenu/edit.js +2 -1
- package/build/navigation-submenu/edit.js.map +1 -1
- package/build/page-list/edit.js +8 -1
- package/build/page-list/edit.js.map +1 -1
- package/build/paragraph/edit.js +7 -11
- package/build/paragraph/edit.js.map +1 -1
- package/build/post-comments-form/edit.js +4 -45
- package/build/post-comments-form/edit.js.map +1 -1
- package/build/post-comments-form/form.js +47 -3
- package/build/post-comments-form/form.js.map +1 -1
- package/build/post-terms/edit.js +3 -2
- package/build/post-terms/edit.js.map +1 -1
- package/build/query-no-results/edit.js +1 -1
- package/build/query-no-results/edit.js.map +1 -1
- package/build/query-pagination-next/edit.js +2 -1
- package/build/query-pagination-next/edit.js.map +1 -1
- package/build/query-pagination-previous/edit.js +2 -1
- package/build/query-pagination-previous/edit.js.map +1 -1
- package/build/quote/deprecated.js +168 -36
- package/build/quote/deprecated.js.map +1 -1
- package/build/quote/edit.js +76 -39
- package/build/quote/edit.js.map +1 -1
- package/build/quote/index.js +9 -45
- package/build/quote/index.js.map +1 -1
- package/build/quote/save.js +1 -5
- package/build/quote/save.js.map +1 -1
- package/build/quote/transforms.js +110 -158
- package/build/quote/transforms.js.map +1 -1
- package/build/social-link/icons/index.js +13 -0
- package/build/social-link/icons/index.js.map +1 -1
- package/build/social-link/icons/whatsapp.js +25 -0
- package/build/social-link/icons/whatsapp.js.map +1 -0
- package/build/social-link/variations.js +7 -0
- package/build/social-link/variations.js.map +1 -1
- package/build/template-part/edit/index.js +17 -8
- package/build/template-part/edit/index.js.map +1 -1
- package/build/template-part/edit/selection-modal.js +33 -13
- package/build/template-part/edit/selection-modal.js.map +1 -1
- package/build/template-part/edit/utils/search.js +94 -0
- package/build/template-part/edit/utils/search.js.map +1 -0
- package/build-module/button/edit.js +2 -1
- package/build-module/button/edit.js.map +1 -1
- package/build-module/buttons/edit.js +2 -2
- package/build-module/buttons/edit.js.map +1 -1
- package/build-module/columns/edit.native.js +2 -2
- package/build-module/columns/edit.native.js.map +1 -1
- package/build-module/comments/edit/comments-legacy.js +59 -0
- package/build-module/comments/edit/comments-legacy.js.map +1 -0
- package/build-module/comments/edit/index.js +37 -0
- package/build-module/comments/edit/index.js.map +1 -0
- package/build-module/comments/edit/placeholder.js +102 -0
- package/build-module/comments/edit/placeholder.js.map +1 -0
- package/build-module/comments/edit/template.js +32 -0
- package/build-module/comments/edit/template.js.map +1 -0
- package/build-module/comments/index.js +6 -1
- package/build-module/comments/index.js.map +1 -1
- package/build-module/comments/save.js +9 -4
- package/build-module/comments/save.js.map +1 -1
- package/build-module/cover/transforms.js +3 -2
- package/build-module/cover/transforms.js.map +1 -1
- package/build-module/embed/embed-placeholder.native.js +1 -2
- package/build-module/embed/embed-placeholder.native.js.map +1 -1
- package/build-module/gallery/edit.js +2 -2
- package/build-module/gallery/edit.js.map +1 -1
- package/build-module/gallery/use-get-media.native.js +50 -0
- package/build-module/gallery/use-get-media.native.js.map +1 -0
- package/build-module/group/index.js +1 -0
- package/build-module/group/index.js.map +1 -1
- package/build-module/group/variations.js +2 -2
- package/build-module/group/variations.js.map +1 -1
- package/build-module/image/deprecated.js +77 -9
- package/build-module/image/deprecated.js.map +1 -1
- package/build-module/image/edit.js +5 -3
- package/build-module/image/edit.js.map +1 -1
- package/build-module/image/edit.native.js +18 -8
- package/build-module/image/edit.native.js.map +1 -1
- package/build-module/image/image.js +29 -22
- package/build-module/image/image.js.map +1 -1
- package/build-module/image/index.js +7 -1
- package/build-module/image/index.js.map +1 -1
- package/build-module/image/save.js +9 -3
- package/build-module/image/save.js.map +1 -1
- package/build-module/index.js +1 -2
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +3 -13
- package/build-module/index.native.js.map +1 -1
- package/build-module/list/transforms.js +4 -63
- package/build-module/list/transforms.js.map +1 -1
- package/build-module/list/v2/transforms.js +2 -29
- package/build-module/list/v2/transforms.js.map +1 -1
- package/build-module/list-item/edit.js +14 -10
- package/build-module/list-item/edit.js.map +1 -1
- package/build-module/list-item/hooks/index.js +1 -1
- package/build-module/list-item/hooks/index.js.map +1 -1
- package/build-module/list-item/hooks/use-merge.js +160 -0
- package/build-module/list-item/hooks/use-merge.js.map +1 -0
- package/build-module/list-item/hooks/use-outdent-list-item.js +82 -46
- package/build-module/list-item/hooks/use-outdent-list-item.js.map +1 -1
- package/build-module/list-item/utils.js +123 -2
- package/build-module/list-item/utils.js.map +1 -1
- package/build-module/media-text/deprecated.js +134 -8
- package/build-module/media-text/deprecated.js.map +1 -1
- package/build-module/media-text/edit.js +2 -2
- package/build-module/media-text/edit.js.map +1 -1
- package/build-module/media-text/save.js +13 -0
- package/build-module/media-text/save.js.map +1 -1
- package/build-module/more/save.js +1 -6
- package/build-module/more/save.js.map +1 -1
- package/build-module/navigation-link/edit.js +5 -4
- package/build-module/navigation-link/edit.js.map +1 -1
- package/build-module/navigation-submenu/edit.js +2 -1
- package/build-module/navigation-submenu/edit.js.map +1 -1
- package/build-module/page-list/edit.js +8 -1
- package/build-module/page-list/edit.js.map +1 -1
- package/build-module/paragraph/edit.js +8 -12
- package/build-module/paragraph/edit.js.map +1 -1
- package/build-module/post-comments-form/edit.js +5 -42
- package/build-module/post-comments-form/edit.js.map +1 -1
- package/build-module/post-comments-form/form.js +46 -5
- package/build-module/post-comments-form/form.js.map +1 -1
- package/build-module/post-terms/edit.js +3 -2
- package/build-module/post-terms/edit.js.map +1 -1
- package/build-module/query-no-results/edit.js +2 -2
- package/build-module/query-no-results/edit.js.map +1 -1
- package/build-module/query-pagination-next/edit.js +2 -1
- package/build-module/query-pagination-next/edit.js.map +1 -1
- package/build-module/query-pagination-previous/edit.js +2 -1
- package/build-module/query-pagination-previous/edit.js.map +1 -1
- package/build-module/quote/deprecated.js +162 -36
- package/build-module/quote/deprecated.js.map +1 -1
- package/build-module/quote/edit.js +77 -43
- package/build-module/quote/edit.js.map +1 -1
- package/build-module/quote/index.js +9 -39
- package/build-module/quote/index.js.map +1 -1
- package/build-module/quote/save.js +4 -8
- package/build-module/quote/save.js.map +1 -1
- package/build-module/quote/transforms.js +111 -158
- package/build-module/quote/transforms.js.map +1 -1
- package/build-module/social-link/icons/index.js +1 -0
- package/build-module/social-link/icons/index.js.map +1 -1
- package/build-module/social-link/icons/whatsapp.js +15 -0
- package/build-module/social-link/icons/whatsapp.js.map +1 -0
- package/build-module/social-link/variations.js +8 -1
- package/build-module/social-link/variations.js.map +1 -1
- package/build-module/template-part/edit/index.js +20 -11
- package/build-module/template-part/edit/index.js.map +1 -1
- package/build-module/template-part/edit/selection-modal.js +33 -15
- package/build-module/template-part/edit/selection-modal.js.map +1 -1
- package/build-module/template-part/edit/utils/search.js +84 -0
- package/build-module/template-part/edit/utils/search.js.map +1 -0
- package/build-style/button/style-rtl.css +1 -1
- package/build-style/button/style.css +1 -1
- package/build-style/comments/editor-rtl.css +122 -0
- package/build-style/comments/editor.css +122 -0
- package/build-style/{post-comments → comments}/style-rtl.css +1 -0
- package/build-style/{post-comments → comments}/style.css +1 -0
- package/build-style/common-rtl.css +7 -0
- package/build-style/common.css +7 -0
- package/build-style/cover/style-rtl.css +2 -2
- package/build-style/cover/style.css +2 -2
- package/build-style/{post-comments/editor.css → editor-elements-rtl.css} +8 -2
- package/build-style/{post-comments/editor-rtl.css → editor-elements.css} +8 -2
- package/build-style/editor-rtl.css +151 -10
- package/build-style/editor.css +151 -10
- package/build-style/gallery/style-rtl.css +7 -2
- package/build-style/gallery/style.css +7 -2
- package/build-style/image/editor-rtl.css +4 -3
- package/build-style/image/editor.css +4 -3
- package/build-style/image/style-rtl.css +33 -3
- package/build-style/image/style.css +33 -3
- package/build-style/post-comments-form/style-rtl.css +0 -1
- package/build-style/post-comments-form/style.css +0 -1
- package/build-style/social-link/editor-rtl.css +1 -0
- package/build-style/social-link/editor.css +1 -0
- package/build-style/social-links/style-rtl.css +8 -0
- package/build-style/social-links/style.css +8 -0
- package/build-style/style-rtl.css +170 -127
- package/build-style/style.css +170 -127
- package/build-style/template-part/editor-rtl.css +14 -3
- package/build-style/template-part/editor.css +14 -3
- package/package.json +28 -28
- package/src/button/edit.js +1 -0
- package/src/button/style.scss +3 -1
- package/src/buttons/edit.js +1 -5
- package/src/columns/edit.native.js +2 -2
- package/src/comments/block.json +6 -1
- package/src/comments/edit/comments-legacy.js +71 -0
- package/src/comments/edit/index.js +35 -0
- package/src/comments/edit/placeholder.js +124 -0
- package/src/comments/{edit.js → edit/template.js} +1 -28
- package/src/comments/editor.scss +9 -0
- package/src/comments/index.php +219 -0
- package/src/comments/save.js +8 -7
- package/src/{post-comments → comments}/style.scss +7 -0
- package/src/common.scss +2 -0
- package/src/cover/style.scss +2 -2
- package/src/cover/transforms.js +2 -2
- package/src/editor-elements.scss +10 -0
- package/src/editor.scss +2 -1
- package/src/embed/embed-placeholder.native.js +2 -3
- package/src/gallery/edit.js +4 -2
- package/src/gallery/style.scss +10 -1
- package/src/gallery/use-get-media.native.js +44 -0
- package/src/group/block.json +1 -0
- package/src/group/variations.js +2 -2
- package/src/image/block.json +7 -1
- package/src/image/deprecated.js +86 -0
- package/src/image/edit.js +6 -1
- package/src/image/edit.native.js +18 -7
- package/src/image/editor.scss +9 -4
- package/src/image/image.js +26 -16
- package/src/image/save.js +10 -1
- package/src/image/style.scss +39 -3
- package/src/index.js +0 -2
- package/src/index.native.js +2 -11
- package/src/list/transforms.js +0 -47
- package/src/list/v2/transforms.js +2 -40
- package/src/list-item/edit.js +10 -12
- package/src/list-item/hooks/index.js +1 -1
- package/src/list-item/hooks/use-merge.js +141 -0
- package/src/list-item/hooks/use-outdent-list-item.js +72 -74
- package/src/list-item/utils.js +27 -3
- package/src/media-text/deprecated.js +148 -1
- package/src/media-text/edit.js +2 -1
- package/src/media-text/save.js +18 -0
- package/src/more/save.js +3 -6
- package/src/navigation-link/edit.js +4 -3
- package/src/navigation-submenu/edit.js +1 -0
- package/src/page-list/edit.js +9 -0
- package/src/paragraph/edit.js +8 -14
- package/src/post-comments-form/edit.js +2 -71
- package/src/post-comments-form/form.js +80 -5
- package/src/post-comments-form/index.php +1 -1
- package/src/post-comments-form/style.scss +0 -1
- package/src/post-terms/edit.js +3 -2
- package/src/query-no-results/edit.js +2 -5
- package/src/query-pagination-next/edit.js +1 -0
- package/src/query-pagination-previous/edit.js +1 -0
- package/src/quote/deprecated.js +213 -99
- package/src/quote/edit.js +77 -52
- package/src/quote/index.js +10 -33
- package/src/quote/save.js +5 -5
- package/src/quote/{v2/test → test}/migrate.js +2 -7
- package/src/quote/transforms.js +117 -147
- package/src/social-link/editor.scss +3 -0
- package/src/social-link/icons/index.js +1 -0
- package/src/social-link/icons/whatsapp.js +10 -0
- package/src/social-link/index.php +4 -0
- package/src/social-link/socials-with-bg.scss +5 -0
- package/src/social-link/socials-without-bg.scss +5 -0
- package/src/social-link/variations.js +7 -0
- package/src/style.scss +1 -2
- package/src/template-part/edit/index.js +37 -24
- package/src/template-part/edit/selection-modal.js +68 -40
- package/src/template-part/edit/utils/search.js +76 -0
- package/src/template-part/editor.scss +21 -9
- package/src/template-part/index.php +56 -2
- package/build/comments/edit.js.map +0 -1
- package/build/list-item/hooks/use-backspace.js +0 -59
- package/build/list-item/hooks/use-backspace.js.map +0 -1
- package/build/post-comments/edit.js +0 -184
- package/build/post-comments/edit.js.map +0 -1
- package/build/post-comments/index.js +0 -72
- package/build/post-comments/index.js.map +0 -1
- package/build/quote/v2/deprecated.js +0 -133
- package/build/quote/v2/deprecated.js.map +0 -1
- package/build/quote/v2/edit.js +0 -139
- package/build/quote/v2/edit.js.map +0 -1
- package/build/quote/v2/index.js +0 -49
- package/build/quote/v2/index.js.map +0 -1
- package/build/quote/v2/save.js +0 -43
- package/build/quote/v2/save.js.map +0 -1
- package/build/quote/v2/transforms.js +0 -156
- package/build/quote/v2/transforms.js.map +0 -1
- package/build-module/comments/edit.js +0 -59
- package/build-module/comments/edit.js.map +0 -1
- package/build-module/list-item/hooks/use-backspace.js +0 -44
- package/build-module/list-item/hooks/use-backspace.js.map +0 -1
- package/build-module/post-comments/edit.js +0 -171
- package/build-module/post-comments/edit.js.map +0 -1
- package/build-module/post-comments/index.js +0 -59
- package/build-module/post-comments/index.js.map +0 -1
- package/build-module/quote/v2/deprecated.js +0 -116
- package/build-module/quote/v2/deprecated.js.map +0 -1
- package/build-module/quote/v2/edit.js +0 -122
- package/build-module/quote/v2/edit.js.map +0 -1
- package/build-module/quote/v2/index.js +0 -33
- package/build-module/quote/v2/index.js.map +0 -1
- package/build-module/quote/v2/save.js +0 -30
- package/build-module/quote/v2/save.js.map +0 -1
- package/build-module/quote/v2/transforms.js +0 -147
- package/build-module/quote/v2/transforms.js.map +0 -1
- package/src/list-item/hooks/use-backspace.js +0 -51
- package/src/post-comments/block.json +0 -45
- package/src/post-comments/edit.js +0 -247
- package/src/post-comments/editor.scss +0 -3
- package/src/post-comments/index.js +0 -18
- package/src/post-comments/index.php +0 -87
- package/src/quote/v2/deprecated.js +0 -107
- package/src/quote/v2/edit.js +0 -139
- package/src/quote/v2/index.js +0 -36
- package/src/quote/v2/save.js +0 -26
- package/src/quote/v2/transforms.js +0 -155
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/v2/edit.js"],"names":["classNames","__","AlignmentControl","BlockControls","RichText","useBlockProps","useInnerBlocksProps","store","blockEditorStore","BlockQuotation","useDispatch","useSelect","useRegistry","createBlock","getDefaultBlockName","Platform","useEffect","deprecated","migrateToQuoteV2","isWebPlatform","OS","TEMPLATE","useMigrateOnLoad","attributes","clientId","registry","updateBlockAttributes","replaceInnerBlocks","value","newAttributes","newInnerBlocks","since","version","alternative","batch","QuoteEdit","setAttributes","isSelected","insertBlocksAfter","className","style","citation","align","isAncestorOfSelectedBlock","select","hasSelectedInnerBlock","hasSelection","blockProps","innerBlocksProps","template","templateInsertUpdatesSelection","nextAlign","children","isEmpty","undefined","display","nextCitation","textAlign"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,EAAT,QAAmB,iBAAnB;AACA,SACCC,gBADD,EAECC,aAFD,EAGCC,QAHD,EAICC,aAJD,EAKCC,mBALD,EAMCC,KAAK,IAAIC,gBANV,QAOO,yBAPP;AAQA,SAASC,cAAT,QAA+B,uBAA/B;AACA,SAASC,WAAT,EAAsBC,SAAtB,EAAiCC,WAAjC,QAAoD,iBAApD;AACA,SAASC,WAAT,EAAsBC,mBAAtB,QAAiD,mBAAjD;AACA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,oBAApC;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,QAAiC,cAAjC;AAEA,MAAMC,aAAa,GAAGJ,QAAQ,CAACK,EAAT,KAAgB,KAAtC;AACA,MAAMC,QAAQ,GAAG,CAAE,CAAE,gBAAF,EAAoB,EAApB,CAAF,CAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,CAAEC,UAAF,EAAcC,QAAd,KAA4B;AACpD,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AS,EAAC,0BAjBX;AAkBC,IAAA,sBAAsB,EAAG,MACxBqC,iBAAiB,CAChBzB,WAAW,CAAEC,mBAAmB,EAArB,CADK;AAnBnB,KAuBQ,CAAEK,aAAF,GAAkB;AAAEsC,IAAAA,SAAS,EAAEf;AAAb,GAAlB,GAAyC,EAvBjD,EAHF,CATD,CADD;AA0CA","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tRichText,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { BlockQuotation } from '@wordpress/components';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { Platform, useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { migrateToQuoteV2 } from './deprecated';\n\nconst isWebPlatform = Platform.OS === 'web';\nconst TEMPLATE = [ [ 'core/paragraph', {} ] ];\n\n/**\n * At the moment, deprecations don't handle create blocks from attributes\n * (like when using CPT templates). For this reason, this hook is necessary\n * to avoid breaking templates using the old quote block format.\n *\n * @param {Object} attributes Block attributes.\n * @param {string} clientId Block client ID.\n */\nconst useMigrateOnLoad = ( attributes, clientId ) => {\n\tconst registry = useRegistry();\n\tconst { updateBlockAttributes, replaceInnerBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\t// As soon as the block is loaded, migrate it to the new version.\n\n\t\tif ( ! attributes.value ) {\n\t\t\t// No need to migrate if it doesn't have the value attribute.\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ newAttributes, newInnerBlocks ] =\n\t\t\tmigrateToQuoteV2( attributes );\n\n\t\tdeprecated( 'Value attribute on the quote block', {\n\t\t\tsince: '6.0',\n\t\t\tversion: '6.5',\n\t\t\talternative: 'inner blocks',\n\t\t} );\n\n\t\tregistry.batch( () => {\n\t\t\tupdateBlockAttributes( clientId, newAttributes );\n\t\t\treplaceInnerBlocks( clientId, newInnerBlocks );\n\t\t} );\n\t}, [ attributes.value ] );\n};\n\nexport default function QuoteEdit( {\n\tattributes,\n\tsetAttributes,\n\tisSelected,\n\tinsertBlocksAfter,\n\tclientId,\n\tclassName,\n\tstyle,\n} ) {\n\tconst { citation, align } = attributes;\n\n\tuseMigrateOnLoad( attributes, clientId );\n\n\tconst isAncestorOfSelectedBlock = useSelect( ( select ) =>\n\t\tselect( blockEditorStore ).hasSelectedInnerBlock( clientId )\n\t);\n\tconst hasSelection = isSelected || isAncestorOfSelectedBlock;\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classNames( className, {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t\t...( ! isWebPlatform && { style } ),\n\t} );\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\ttemplateInsertUpdatesSelection: true,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockControls group=\"block\">\n\t\t\t\t<AlignmentControl\n\t\t\t\t\tvalue={ align }\n\t\t\t\t\tonChange={ ( nextAlign ) => {\n\t\t\t\t\t\tsetAttributes( { align: nextAlign } );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BlockControls>\n\t\t\t<BlockQuotation { ...innerBlocksProps }>\n\t\t\t\t{ innerBlocksProps.children }\n\t\t\t\t{ ( ! RichText.isEmpty( citation ) || hasSelection ) && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"citation\"\n\t\t\t\t\t\ttagName={ isWebPlatform ? 'cite' : undefined }\n\t\t\t\t\t\tstyle={ { display: 'block' } }\n\t\t\t\t\t\tvalue={ citation }\n\t\t\t\t\t\tonChange={ ( nextCitation ) => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tcitation: nextCitation,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount\n\t\t\t\t\t\taria-label={ __( 'Quote citation' ) }\n\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t// translators: placeholder text used for the\n\t\t\t\t\t\t\t// citation\n\t\t\t\t\t\t\t__( 'Add citation' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclassName=\"wp-block-quote__citation\"\n\t\t\t\t\t\t__unstableOnSplitAtEnd={ () =>\n\t\t\t\t\t\t\tinsertBlocksAfter(\n\t\t\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...( ! isWebPlatform ? { textAlign: align } : {} ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockQuotation>\n\t\t</>\n\t);\n}\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
-
import { quote as icon } from '@wordpress/icons';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import edit from './edit';
|
|
11
|
-
import save from './save';
|
|
12
|
-
import transforms from './transforms';
|
|
13
|
-
import deprecated from './deprecated';
|
|
14
|
-
const settings = {
|
|
15
|
-
icon,
|
|
16
|
-
example: {
|
|
17
|
-
attributes: {
|
|
18
|
-
citation: 'Julio Cortázar'
|
|
19
|
-
},
|
|
20
|
-
innerBlocks: [{
|
|
21
|
-
name: 'core/paragraph',
|
|
22
|
-
attributes: {
|
|
23
|
-
content: __('In quoting others, we cite ourselves.')
|
|
24
|
-
}
|
|
25
|
-
}]
|
|
26
|
-
},
|
|
27
|
-
transforms,
|
|
28
|
-
edit,
|
|
29
|
-
save,
|
|
30
|
-
deprecated
|
|
31
|
-
};
|
|
32
|
-
export default settings;
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/v2/index.js"],"names":["__","quote","icon","edit","save","transforms","deprecated","settings","example","attributes","citation","innerBlocks","name","content"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SAASC,KAAK,IAAIC,IAAlB,QAA8B,kBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,IAAP,MAAiB,QAAjB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,UAAP,MAAuB,cAAvB;AAEA,MAAMC,QAAQ,GAAG;AAChBL,EAAAA,IADgB;AAEhBM,EAAAA,OAAO,EAAE;AACRC,IAAAA,UAAU,EAAE;AACXC,MAAAA,QAAQ,EAAE;AADC,KADJ;AAIRC,IAAAA,WAAW,EAAE,CACZ;AACCC,MAAAA,IAAI,EAAE,gBADP;AAECH,MAAAA,UAAU,EAAE;AACXI,QAAAA,OAAO,EAAEb,EAAE,CAAE,uCAAF;AADA;AAFb,KADY;AAJL,GAFO;AAehBK,EAAAA,UAfgB;AAgBhBF,EAAAA,IAhBgB;AAiBhBC,EAAAA,IAjBgB;AAkBhBE,EAAAA;AAlBgB,CAAjB;AAqBA,eAAeC,QAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { quote as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\nimport save from './save';\nimport transforms from './transforms';\nimport deprecated from './deprecated';\n\nconst settings = {\n\ticon,\n\texample: {\n\t\tattributes: {\n\t\t\tcitation: 'Julio Cortázar',\n\t\t},\n\t\tinnerBlocks: [\n\t\t\t{\n\t\t\t\tname: 'core/paragraph',\n\t\t\t\tattributes: {\n\t\t\t\t\tcontent: __( 'In quoting others, we cite ourselves.' ),\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\ttransforms,\n\tedit,\n\tsave,\n\tdeprecated,\n};\n\nexport default settings;\n"]}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { createElement } from "@wordpress/element";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* External dependencies
|
|
5
|
-
*/
|
|
6
|
-
import classNames from 'classnames';
|
|
7
|
-
/**
|
|
8
|
-
* WordPress dependencies
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';
|
|
12
|
-
export default function save(_ref) {
|
|
13
|
-
let {
|
|
14
|
-
attributes
|
|
15
|
-
} = _ref;
|
|
16
|
-
const {
|
|
17
|
-
align,
|
|
18
|
-
citation
|
|
19
|
-
} = attributes;
|
|
20
|
-
const blockProps = useBlockProps.save({
|
|
21
|
-
className: classNames({
|
|
22
|
-
[`has-text-align-${align}`]: align
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
return createElement("blockquote", blockProps, createElement(InnerBlocks.Content, null), !RichText.isEmpty(citation) && createElement(RichText.Content, {
|
|
26
|
-
tagName: "cite",
|
|
27
|
-
value: citation
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=save.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/v2/save.js"],"names":["classNames","InnerBlocks","RichText","useBlockProps","save","attributes","align","citation","blockProps","className","isEmpty"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,QAAtB,EAAgCC,aAAhC,QAAqD,yBAArD;AAEA,eAAe,SAASC,IAAT,OAAgC;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AAC9C,QAAM;AAAEC,IAAAA,KAAF;AAASC,IAAAA;AAAT,MAAsBF,UAA5B;AACA,QAAMG,UAAU,GAAGL,aAAa,CAACC,IAAd,CAAoB;AACtCK,IAAAA,SAAS,EAAET,UAAU,CAAE;AACtB,OAAG,kBAAkBM,KAAO,EAA5B,GAAiCA;AADX,KAAF;AADiB,GAApB,CAAnB;AAKA,SACC,4BAAiBE,UAAjB,EACC,cAAC,WAAD,CAAa,OAAb,OADD,EAEG,CAAEN,QAAQ,CAACQ,OAAT,CAAkBH,QAAlB,CAAF,IACD,cAAC,QAAD,CAAU,OAAV;AAAkB,IAAA,OAAO,EAAC,MAA1B;AAAiC,IAAA,KAAK,EAAGA;AAAzC,IAHF,CADD;AAQA","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { InnerBlocks, RichText, useBlockProps } from '@wordpress/block-editor';\n\nexport default function save( { attributes } ) {\n\tconst { align, citation } = attributes;\n\tconst blockProps = useBlockProps.save( {\n\t\tclassName: classNames( {\n\t\t\t[ `has-text-align-${ align }` ]: align,\n\t\t} ),\n\t} );\n\treturn (\n\t\t<blockquote { ...blockProps }>\n\t\t\t<InnerBlocks.Content />\n\t\t\t{ ! RichText.isEmpty( citation ) && (\n\t\t\t\t<RichText.Content tagName=\"cite\" value={ citation } />\n\t\t\t) }\n\t\t</blockquote>\n\t);\n}\n"]}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { createBlock, parseWithAttributeSchema, rawHandler, serialize } from '@wordpress/blocks';
|
|
5
|
-
const transforms = {
|
|
6
|
-
from: [{
|
|
7
|
-
type: 'block',
|
|
8
|
-
blocks: ['core/pullquote'],
|
|
9
|
-
transform: _ref => {
|
|
10
|
-
let {
|
|
11
|
-
value,
|
|
12
|
-
citation,
|
|
13
|
-
anchor,
|
|
14
|
-
fontSize,
|
|
15
|
-
style
|
|
16
|
-
} = _ref;
|
|
17
|
-
return createBlock('core/quote', {
|
|
18
|
-
citation,
|
|
19
|
-
anchor,
|
|
20
|
-
fontSize,
|
|
21
|
-
style
|
|
22
|
-
}, parseWithAttributeSchema(value, {
|
|
23
|
-
type: 'array',
|
|
24
|
-
source: 'query',
|
|
25
|
-
selector: 'p',
|
|
26
|
-
query: {
|
|
27
|
-
content: {
|
|
28
|
-
type: 'string',
|
|
29
|
-
source: 'html'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}).map(_ref2 => {
|
|
33
|
-
let {
|
|
34
|
-
content
|
|
35
|
-
} = _ref2;
|
|
36
|
-
return createBlock('core/paragraph', {
|
|
37
|
-
content
|
|
38
|
-
});
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
}, {
|
|
42
|
-
type: 'block',
|
|
43
|
-
blocks: ['core/group'],
|
|
44
|
-
transform: (_ref3, innerBlocks) => {
|
|
45
|
-
let {
|
|
46
|
-
anchor
|
|
47
|
-
} = _ref3;
|
|
48
|
-
return createBlock('core/quote', {
|
|
49
|
-
anchor
|
|
50
|
-
}, innerBlocks);
|
|
51
|
-
}
|
|
52
|
-
}, {
|
|
53
|
-
type: 'prefix',
|
|
54
|
-
prefix: '>',
|
|
55
|
-
transform: content => createBlock('core/quote', {}, [createBlock('core/paragraph', {
|
|
56
|
-
content
|
|
57
|
-
})])
|
|
58
|
-
}, {
|
|
59
|
-
type: 'raw',
|
|
60
|
-
schema: () => ({
|
|
61
|
-
blockquote: {
|
|
62
|
-
children: '*'
|
|
63
|
-
}
|
|
64
|
-
}),
|
|
65
|
-
selector: 'blockquote',
|
|
66
|
-
transform: node => {
|
|
67
|
-
return createBlock('core/quote', // Don't try to parse any `cite` out of this content.
|
|
68
|
-
// * There may be more than one cite.
|
|
69
|
-
// * There may be more attribution text than just the cite.
|
|
70
|
-
// * If the cite is nested in the quoted text, it's wrong to
|
|
71
|
-
// remove it.
|
|
72
|
-
{}, rawHandler({
|
|
73
|
-
HTML: node.innerHTML,
|
|
74
|
-
mode: 'BLOCKS'
|
|
75
|
-
}));
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
type: 'block',
|
|
79
|
-
isMultiBlock: true,
|
|
80
|
-
blocks: ['*'],
|
|
81
|
-
isMatch: (_ref4, blocks) => {
|
|
82
|
-
let {} = _ref4;
|
|
83
|
-
return !blocks.some(_ref5 => {
|
|
84
|
-
let {
|
|
85
|
-
name
|
|
86
|
-
} = _ref5;
|
|
87
|
-
return name === 'core/quote';
|
|
88
|
-
});
|
|
89
|
-
},
|
|
90
|
-
__experimentalConvert: blocks => createBlock('core/quote', {}, blocks.map(block => createBlock(block.name, block.attributes, block.innerBlocks)))
|
|
91
|
-
}],
|
|
92
|
-
to: [{
|
|
93
|
-
type: 'block',
|
|
94
|
-
blocks: ['core/pullquote'],
|
|
95
|
-
isMatch: (_ref6, block) => {
|
|
96
|
-
let {} = _ref6;
|
|
97
|
-
return block.innerBlocks.every(_ref7 => {
|
|
98
|
-
let {
|
|
99
|
-
name
|
|
100
|
-
} = _ref7;
|
|
101
|
-
return name === 'core/paragraph';
|
|
102
|
-
});
|
|
103
|
-
},
|
|
104
|
-
transform: (_ref8, innerBlocks) => {
|
|
105
|
-
let {
|
|
106
|
-
citation,
|
|
107
|
-
anchor,
|
|
108
|
-
fontSize,
|
|
109
|
-
style
|
|
110
|
-
} = _ref8;
|
|
111
|
-
return createBlock('core/pullquote', {
|
|
112
|
-
value: serialize(innerBlocks),
|
|
113
|
-
citation,
|
|
114
|
-
anchor,
|
|
115
|
-
fontSize,
|
|
116
|
-
style
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
type: 'block',
|
|
121
|
-
blocks: ['core/group'],
|
|
122
|
-
transform: (_ref9, innerBlocks) => {
|
|
123
|
-
let {
|
|
124
|
-
citation,
|
|
125
|
-
anchor
|
|
126
|
-
} = _ref9;
|
|
127
|
-
return createBlock('core/group', {
|
|
128
|
-
anchor
|
|
129
|
-
}, citation ? [...innerBlocks, createBlock('core/paragraph', {
|
|
130
|
-
content: citation
|
|
131
|
-
})] : innerBlocks);
|
|
132
|
-
}
|
|
133
|
-
}, {
|
|
134
|
-
type: 'block',
|
|
135
|
-
blocks: ['*'],
|
|
136
|
-
transform: (_ref10, innerBlocks) => {
|
|
137
|
-
let {
|
|
138
|
-
citation
|
|
139
|
-
} = _ref10;
|
|
140
|
-
return citation ? [...innerBlocks, createBlock('core/paragraph', {
|
|
141
|
-
content: citation
|
|
142
|
-
})] : innerBlocks;
|
|
143
|
-
}
|
|
144
|
-
}]
|
|
145
|
-
};
|
|
146
|
-
export default transforms;
|
|
147
|
-
//# sourceMappingURL=transforms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/block-library/src/quote/v2/transforms.js"],"names":["createBlock","parseWithAttributeSchema","rawHandler","serialize","transforms","from","type","blocks","transform","value","citation","anchor","fontSize","style","source","selector","query","content","map","innerBlocks","prefix","schema","blockquote","children","node","HTML","innerHTML","mode","isMultiBlock","isMatch","some","name","__experimentalConvert","block","attributes","to","every"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,WADD,EAECC,wBAFD,EAGCC,UAHD,EAICC,SAJD,QAKO,mBALP;AAOA,MAAMC,UAAU,GAAG;AAClBC,EAAAA,IAAI,EAAE,CACL;AACCC,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,gBAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,QAAoD;AAAA,UAAlD;AAAEC,QAAAA,KAAF;AAASC,QAAAA,QAAT;AAAmBC,QAAAA,MAAnB;AAA2BC,QAAAA,QAA3B;AAAqCC,QAAAA;AAArC,OAAkD;AAC9D,aAAOb,WAAW,CACjB,YADiB,EAEjB;AACCU,QAAAA,QADD;AAECC,QAAAA,MAFD;AAGCC,QAAAA,QAHD;AAICC,QAAAA;AAJD,OAFiB,EAQjBZ,wBAAwB,CAAEQ,KAAF,EAAS;AAChCH,QAAAA,IAAI,EAAE,OAD0B;AAEhCQ,QAAAA,MAAM,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qC;AAIrCC,QAAAA,QAJqC;AAKrCC,QAAAA;AALqC,OAApB,CAAlB;AAOA;AAnBF,GADG,EAsBH;AACCP,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,YAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,QAAwBW,WAAxB;AAAA,UAAE;AAAET,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,OAAF;AAAA,aACVX,WAAW,CACV,YADU,EAEV;AAAEW,QAAAA;AAAF,OAFU,EAGVD,QAAQ,GACL,CACA,GAAGS,WADH,EAEAnB,WAAW,CAAE,gBAAF,EAAoB;AAC9BiB,QAAAA,OAAO,EAAEP;AADqB,OAApB,CAFX,CADK,GAOLS,WAVO,CADD;AAAA;AAHZ,GAtBG,EAuCH;AACCb,IAAAA,IAAI,EAAE,OADP;AAECC,IAAAA,MAAM,EAAE,CAAE,GAAF,CAFT;AAGCC,IAAAA,SAAS,EAAE,SAAgBW,WAAhB;AAAA,UAAE;AAAET,QAAAA;AAAF,OAAF;AAAA,aACVA,QAAQ,GACL,CACA,GAAGS,WADH,EAEAnB,WAAW,CAAE,gBAAF,EAAoB;AAC9BiB,QAAAA,OAAO,EAAEP;AADqB,OAApB,CAFX,CADK,GAOLS,WARO;AAAA;AAHZ,GAvCG;AAzFc,CAAnB;AAgJA,eAAef,UAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tparseWithAttributeSchema,\n\trawHandler,\n\tserialize,\n} from '@wordpress/blocks';\n\nconst transforms = {\n\tfrom: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\ttransform: ( { value, citation, anchor, fontSize, style } ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{\n\t\t\t\t\t\tcitation,\n\t\t\t\t\t\tanchor,\n\t\t\t\t\t\tfontSize,\n\t\t\t\t\t\tstyle,\n\t\t\t\t\t},\n\t\t\t\t\tparseWithAttributeSchema( value, {\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\tsource: 'query',\n\t\t\t\t\t\tselector: 'p',\n\t\t\t\t\t\tquery: {\n\t\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t\t\t\tsource: 'html',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t} ).map( ( { content } ) =>\n\t\t\t\t\t\tcreateBlock( 'core/paragraph', { content } )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( { anchor }, innerBlocks ) =>\n\t\t\t\tcreateBlock( 'core/quote', { anchor }, innerBlocks ),\n\t\t},\n\t\t{\n\t\t\ttype: 'prefix',\n\t\t\tprefix: '>',\n\t\t\ttransform: ( content ) =>\n\t\t\t\tcreateBlock( 'core/quote', {}, [\n\t\t\t\t\tcreateBlock( 'core/paragraph', { content } ),\n\t\t\t\t] ),\n\t\t},\n\t\t{\n\t\t\ttype: 'raw',\n\t\t\tschema: () => ( {\n\t\t\t\tblockquote: {\n\t\t\t\t\tchildren: '*',\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tselector: 'blockquote',\n\t\t\ttransform: ( node ) => {\n\t\t\t\treturn createBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t// Don't try to parse any `cite` out of this content.\n\t\t\t\t\t// * There may be more than one cite.\n\t\t\t\t\t// * There may be more attribution text than just the cite.\n\t\t\t\t\t// * If the cite is nested in the quoted text, it's wrong to\n\t\t\t\t\t// remove it.\n\t\t\t\t\t{},\n\t\t\t\t\trawHandler( {\n\t\t\t\t\t\tHTML: node.innerHTML,\n\t\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\t} )\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tisMultiBlock: true,\n\t\t\tblocks: [ '*' ],\n\t\t\tisMatch: ( {}, blocks ) => {\n\t\t\t\treturn ! blocks.some( ( { name } ) => name === 'core/quote' );\n\t\t\t},\n\t\t\t__experimentalConvert: ( blocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/quote',\n\t\t\t\t\t{},\n\t\t\t\t\tblocks.map( ( block ) =>\n\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\tblock.name,\n\t\t\t\t\t\t\tblock.attributes,\n\t\t\t\t\t\t\tblock.innerBlocks\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t},\n\t],\n\tto: [\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/pullquote' ],\n\t\t\tisMatch: ( {}, block ) => {\n\t\t\t\treturn block.innerBlocks.every(\n\t\t\t\t\t( { name } ) => name === 'core/paragraph'\n\t\t\t\t);\n\t\t\t},\n\t\t\ttransform: (\n\t\t\t\t{ citation, anchor, fontSize, style },\n\t\t\t\tinnerBlocks\n\t\t\t) => {\n\t\t\t\treturn createBlock( 'core/pullquote', {\n\t\t\t\t\tvalue: serialize( innerBlocks ),\n\t\t\t\t\tcitation,\n\t\t\t\t\tanchor,\n\t\t\t\t\tfontSize,\n\t\t\t\t\tstyle,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ 'core/group' ],\n\t\t\ttransform: ( { citation, anchor }, innerBlocks ) =>\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{ anchor },\n\t\t\t\t\tcitation\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t\t} ),\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: innerBlocks\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\ttype: 'block',\n\t\t\tblocks: [ '*' ],\n\t\t\ttransform: ( { citation }, innerBlocks ) =>\n\t\t\t\tcitation\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t...innerBlocks,\n\t\t\t\t\t\t\tcreateBlock( 'core/paragraph', {\n\t\t\t\t\t\t\t\tcontent: citation,\n\t\t\t\t\t\t\t} ),\n\t\t\t\t\t ]\n\t\t\t\t\t: innerBlocks,\n\t\t},\n\t],\n};\n\nexport default transforms;\n"]}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { useRef } from '@wordpress/element';
|
|
5
|
-
import { useRefEffect } from '@wordpress/compose';
|
|
6
|
-
import { BACKSPACE } from '@wordpress/keycodes';
|
|
7
|
-
import { useSelect } from '@wordpress/data';
|
|
8
|
-
import { store as blockEditorStore } from '@wordpress/block-editor';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Internal dependencies
|
|
12
|
-
*/
|
|
13
|
-
import useOutdentListItem from './use-outdent-list-item';
|
|
14
|
-
|
|
15
|
-
export default function useBackspace( props ) {
|
|
16
|
-
const { getSelectionStart, getSelectionEnd } =
|
|
17
|
-
useSelect( blockEditorStore );
|
|
18
|
-
const propsRef = useRef( props );
|
|
19
|
-
propsRef.current = props;
|
|
20
|
-
const [ canOutdent, outdentListItem ] = useOutdentListItem(
|
|
21
|
-
propsRef.current.clientId
|
|
22
|
-
);
|
|
23
|
-
return useRefEffect(
|
|
24
|
-
( element ) => {
|
|
25
|
-
function onKeyDown( event ) {
|
|
26
|
-
if ( event.defaultPrevented || event.keyCode !== BACKSPACE ) {
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
// Handle only if we have a collapsed selection at the
|
|
30
|
-
// start of a list item and we can outdent.
|
|
31
|
-
if (
|
|
32
|
-
! canOutdent ||
|
|
33
|
-
[
|
|
34
|
-
getSelectionStart().offset,
|
|
35
|
-
getSelectionEnd().offset,
|
|
36
|
-
].some( ( offset ) => offset !== 0 )
|
|
37
|
-
) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
outdentListItem();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
element.addEventListener( 'keydown', onKeyDown );
|
|
45
|
-
return () => {
|
|
46
|
-
element.removeEventListener( 'keydown', onKeyDown );
|
|
47
|
-
};
|
|
48
|
-
},
|
|
49
|
-
[ canOutdent ]
|
|
50
|
-
);
|
|
51
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://schemas.wp.org/trunk/block.json",
|
|
3
|
-
"apiVersion": 2,
|
|
4
|
-
"name": "core/post-comments",
|
|
5
|
-
"title": "Post Comments (deprecated)",
|
|
6
|
-
"category": "theme",
|
|
7
|
-
"description": "This block is deprecated. Please use the Comments block instead.",
|
|
8
|
-
"textdomain": "default",
|
|
9
|
-
"attributes": {
|
|
10
|
-
"textAlign": {
|
|
11
|
-
"type": "string"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"usesContext": [ "postId", "postType" ],
|
|
15
|
-
"supports": {
|
|
16
|
-
"html": false,
|
|
17
|
-
"align": [ "wide", "full" ],
|
|
18
|
-
"typography": {
|
|
19
|
-
"fontSize": true,
|
|
20
|
-
"lineHeight": true,
|
|
21
|
-
"__experimentalFontStyle": true,
|
|
22
|
-
"__experimentalFontWeight": true,
|
|
23
|
-
"__experimentalLetterSpacing": true,
|
|
24
|
-
"__experimentalTextTransform": true,
|
|
25
|
-
"__experimentalDefaultControls": {
|
|
26
|
-
"fontSize": true
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"color": {
|
|
30
|
-
"gradients": true,
|
|
31
|
-
"link": true,
|
|
32
|
-
"__experimentalDefaultControls": {
|
|
33
|
-
"background": true,
|
|
34
|
-
"text": true
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"inserter": false
|
|
38
|
-
},
|
|
39
|
-
"style": [
|
|
40
|
-
"wp-block-post-comments",
|
|
41
|
-
"wp-block-buttons",
|
|
42
|
-
"wp-block-button"
|
|
43
|
-
],
|
|
44
|
-
"editorStyle": "wp-block-post-comments-editor"
|
|
45
|
-
}
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import classnames from 'classnames';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* WordPress dependencies
|
|
8
|
-
*/
|
|
9
|
-
import {
|
|
10
|
-
AlignmentControl,
|
|
11
|
-
BlockControls,
|
|
12
|
-
Warning,
|
|
13
|
-
useBlockProps,
|
|
14
|
-
store as blockEditorStore,
|
|
15
|
-
} from '@wordpress/block-editor';
|
|
16
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
17
|
-
import { useSelect } from '@wordpress/data';
|
|
18
|
-
import { useEntityProp, store as coreStore } from '@wordpress/core-data';
|
|
19
|
-
import { useDisabled } from '@wordpress/compose';
|
|
20
|
-
import { createInterpolateElement } from '@wordpress/element';
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Internal dependencies
|
|
24
|
-
*/
|
|
25
|
-
import CommentsForm from '../post-comments-form/form';
|
|
26
|
-
|
|
27
|
-
export default function PostCommentsEdit( {
|
|
28
|
-
attributes: { textAlign },
|
|
29
|
-
setAttributes,
|
|
30
|
-
context: { postType, postId },
|
|
31
|
-
} ) {
|
|
32
|
-
let [ postTitle ] = useEntityProp( 'postType', postType, 'title', postId );
|
|
33
|
-
postTitle = postTitle || __( 'Post Title' );
|
|
34
|
-
|
|
35
|
-
const [ commentStatus ] = useEntityProp(
|
|
36
|
-
'postType',
|
|
37
|
-
postType,
|
|
38
|
-
'comment_status',
|
|
39
|
-
postId
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
const { avatarURL, defaultCommentStatus } = useSelect(
|
|
43
|
-
( select ) =>
|
|
44
|
-
select( blockEditorStore ).getSettings()
|
|
45
|
-
.__experimentalDiscussionSettings
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
const isSiteEditor = postType === undefined || postId === undefined;
|
|
49
|
-
|
|
50
|
-
const postTypeSupportsComments = useSelect( ( select ) =>
|
|
51
|
-
postType
|
|
52
|
-
? !! select( coreStore ).getPostType( postType )?.supports.comments
|
|
53
|
-
: false
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
let warning = __(
|
|
57
|
-
'Post Comments block: This is just a placeholder, not a real comment. The final styling may differ because it also depends on the current theme. For better compatibility with the Block Editor, please consider replacing this block with the "Comments" block.'
|
|
58
|
-
);
|
|
59
|
-
let showPlaceholder = true;
|
|
60
|
-
|
|
61
|
-
if ( ! isSiteEditor && 'open' !== commentStatus ) {
|
|
62
|
-
if ( 'closed' === commentStatus ) {
|
|
63
|
-
warning = sprintf(
|
|
64
|
-
/* translators: 1: Post type (i.e. "post", "page") */
|
|
65
|
-
__(
|
|
66
|
-
'Post Comments block: Comments to this %s are not allowed.'
|
|
67
|
-
),
|
|
68
|
-
postType
|
|
69
|
-
);
|
|
70
|
-
showPlaceholder = false;
|
|
71
|
-
} else if ( ! postTypeSupportsComments ) {
|
|
72
|
-
warning = sprintf(
|
|
73
|
-
/* translators: 1: Post type (i.e. "post", "page") */
|
|
74
|
-
__(
|
|
75
|
-
'Post Comments block: Comments for this post type (%s) are not enabled.'
|
|
76
|
-
),
|
|
77
|
-
postType
|
|
78
|
-
);
|
|
79
|
-
showPlaceholder = false;
|
|
80
|
-
} else if ( 'open' !== defaultCommentStatus ) {
|
|
81
|
-
warning = __( 'Post Comments block: Comments are not enabled.' );
|
|
82
|
-
showPlaceholder = false;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
const blockProps = useBlockProps( {
|
|
87
|
-
className: classnames( {
|
|
88
|
-
[ `has-text-align-${ textAlign }` ]: textAlign,
|
|
89
|
-
} ),
|
|
90
|
-
} );
|
|
91
|
-
|
|
92
|
-
const disabledRef = useDisabled();
|
|
93
|
-
|
|
94
|
-
return (
|
|
95
|
-
<>
|
|
96
|
-
<BlockControls group="block">
|
|
97
|
-
<AlignmentControl
|
|
98
|
-
value={ textAlign }
|
|
99
|
-
onChange={ ( nextAlign ) => {
|
|
100
|
-
setAttributes( { textAlign: nextAlign } );
|
|
101
|
-
} }
|
|
102
|
-
/>
|
|
103
|
-
</BlockControls>
|
|
104
|
-
|
|
105
|
-
<div { ...blockProps }>
|
|
106
|
-
<Warning>{ warning }</Warning>
|
|
107
|
-
|
|
108
|
-
{ showPlaceholder && (
|
|
109
|
-
<div
|
|
110
|
-
className="wp-block-post-comments__placeholder"
|
|
111
|
-
ref={ disabledRef }
|
|
112
|
-
>
|
|
113
|
-
<h3>
|
|
114
|
-
{
|
|
115
|
-
/* translators: %s: Post title. */
|
|
116
|
-
sprintf( __( 'One response to %s' ), postTitle )
|
|
117
|
-
}
|
|
118
|
-
</h3>
|
|
119
|
-
|
|
120
|
-
<div className="navigation">
|
|
121
|
-
<div className="alignleft">
|
|
122
|
-
<a href="#top">« { __( 'Older Comments' ) }</a>
|
|
123
|
-
</div>
|
|
124
|
-
<div className="alignright">
|
|
125
|
-
<a href="#top">{ __( 'Newer Comments' ) } »</a>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<ol className="commentlist">
|
|
130
|
-
<li className="comment even thread-even depth-1">
|
|
131
|
-
<article className="comment-body">
|
|
132
|
-
<footer className="comment-meta">
|
|
133
|
-
<div className="comment-author vcard">
|
|
134
|
-
<img
|
|
135
|
-
alt="Commenter Avatar"
|
|
136
|
-
src={ avatarURL }
|
|
137
|
-
className="avatar avatar-32 photo"
|
|
138
|
-
height="32"
|
|
139
|
-
width="32"
|
|
140
|
-
loading="lazy"
|
|
141
|
-
/>
|
|
142
|
-
{ createInterpolateElement(
|
|
143
|
-
sprintf(
|
|
144
|
-
/* translators: %s: Comment author link. */
|
|
145
|
-
__(
|
|
146
|
-
'%s <span>says:</span>'
|
|
147
|
-
),
|
|
148
|
-
sprintf(
|
|
149
|
-
'<cite><a>%s</a></cite>',
|
|
150
|
-
__(
|
|
151
|
-
'A WordPress Commenter'
|
|
152
|
-
)
|
|
153
|
-
)
|
|
154
|
-
),
|
|
155
|
-
{
|
|
156
|
-
span: (
|
|
157
|
-
<span className="says" />
|
|
158
|
-
),
|
|
159
|
-
a: (
|
|
160
|
-
/* eslint-disable jsx-a11y/anchor-has-content */
|
|
161
|
-
<a
|
|
162
|
-
href="#top"
|
|
163
|
-
className="url"
|
|
164
|
-
/>
|
|
165
|
-
/* eslint-enable jsx-a11y/anchor-has-content */
|
|
166
|
-
),
|
|
167
|
-
cite: (
|
|
168
|
-
<cite className="fn" />
|
|
169
|
-
),
|
|
170
|
-
}
|
|
171
|
-
) }
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
<div className="comment-metadata">
|
|
175
|
-
<a href="#top">
|
|
176
|
-
<time dateTime="2000-01-01T12:00:00+00:00">
|
|
177
|
-
{ __(
|
|
178
|
-
'January 1, 2000 at 12:00 am'
|
|
179
|
-
) }
|
|
180
|
-
</time>
|
|
181
|
-
</a>{ ' ' }
|
|
182
|
-
<span className="edit-link">
|
|
183
|
-
<a
|
|
184
|
-
className="comment-edit-link"
|
|
185
|
-
href="#top"
|
|
186
|
-
>
|
|
187
|
-
{ __( 'Edit' ) }
|
|
188
|
-
</a>
|
|
189
|
-
</span>
|
|
190
|
-
</div>
|
|
191
|
-
</footer>
|
|
192
|
-
|
|
193
|
-
<div className="comment-content">
|
|
194
|
-
<p>
|
|
195
|
-
{ __( 'Hi, this is a comment.' ) }
|
|
196
|
-
<br />
|
|
197
|
-
{ __(
|
|
198
|
-
'To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.'
|
|
199
|
-
) }
|
|
200
|
-
<br />
|
|
201
|
-
{ createInterpolateElement(
|
|
202
|
-
__(
|
|
203
|
-
'Commenter avatars come from <a>Gravatar</a>'
|
|
204
|
-
),
|
|
205
|
-
{
|
|
206
|
-
a: (
|
|
207
|
-
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
|
|
208
|
-
<a href="https://gravatar.com/" />
|
|
209
|
-
),
|
|
210
|
-
}
|
|
211
|
-
) }
|
|
212
|
-
</p>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<div className="reply">
|
|
216
|
-
<a
|
|
217
|
-
className="comment-reply-link"
|
|
218
|
-
href="#top"
|
|
219
|
-
aria-label={ sprintf(
|
|
220
|
-
/* translators: Comment reply button text. %s: Comment author name. */
|
|
221
|
-
__( 'Reply to %s' ),
|
|
222
|
-
__( 'A WordPress Commenter' )
|
|
223
|
-
) }
|
|
224
|
-
>
|
|
225
|
-
{ __( 'Reply' ) }
|
|
226
|
-
</a>
|
|
227
|
-
</div>
|
|
228
|
-
</article>
|
|
229
|
-
</li>
|
|
230
|
-
</ol>
|
|
231
|
-
|
|
232
|
-
<div className="navigation">
|
|
233
|
-
<div className="alignleft">
|
|
234
|
-
<a href="#top">« { __( 'Older Comments' ) }</a>
|
|
235
|
-
</div>
|
|
236
|
-
<div className="alignright">
|
|
237
|
-
<a href="#top">{ __( 'Newer Comments' ) } »</a>
|
|
238
|
-
</div>
|
|
239
|
-
</div>
|
|
240
|
-
|
|
241
|
-
<CommentsForm />
|
|
242
|
-
</div>
|
|
243
|
-
) }
|
|
244
|
-
</div>
|
|
245
|
-
</>
|
|
246
|
-
);
|
|
247
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { postComments as icon } from '@wordpress/icons';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import metadata from './block.json';
|
|
10
|
-
import edit from './edit';
|
|
11
|
-
|
|
12
|
-
const { name } = metadata;
|
|
13
|
-
export { metadata, name };
|
|
14
|
-
|
|
15
|
-
export const settings = {
|
|
16
|
-
icon,
|
|
17
|
-
edit,
|
|
18
|
-
};
|