@wordpress/block-library 7.3.2 → 7.3.5

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 (129) hide show
  1. package/build/comment-template/hooks.js +11 -3
  2. package/build/comment-template/hooks.js.map +1 -1
  3. package/build/comments-pagination/edit.js +18 -1
  4. package/build/comments-pagination/edit.js.map +1 -1
  5. package/build/comments-query-loop/edit.js +2 -2
  6. package/build/comments-query-loop/edit.js.map +1 -1
  7. package/build/comments-title/edit.js +151 -0
  8. package/build/comments-title/edit.js.map +1 -0
  9. package/build/comments-title/index.js +101 -0
  10. package/build/comments-title/index.js.map +1 -0
  11. package/build/index.js +4 -2
  12. package/build/index.js.map +1 -1
  13. package/build/navigation/edit/index.js +17 -1
  14. package/build/navigation/edit/index.js.map +1 -1
  15. package/build/navigation/edit/inner-blocks.js +5 -7
  16. package/build/navigation/edit/inner-blocks.js.map +1 -1
  17. package/build/navigation/edit/navigation-menu-selector.js +7 -2
  18. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  19. package/build/navigation-link/edit.js +29 -30
  20. package/build/navigation-link/edit.js.map +1 -1
  21. package/build/navigation-submenu/edit.js +14 -14
  22. package/build/navigation-submenu/edit.js.map +1 -1
  23. package/build/post-comments/edit.js +141 -35
  24. package/build/post-comments/edit.js.map +1 -1
  25. package/build/post-comments/index.js +2 -1
  26. package/build/post-comments/index.js.map +1 -1
  27. package/build/post-comments-form/edit.js +22 -1
  28. package/build/post-comments-form/edit.js.map +1 -1
  29. package/build/post-comments-form/index.js +1 -0
  30. package/build/post-comments-form/index.js.map +1 -1
  31. package/build/post-content/edit.js +1 -1
  32. package/build/post-content/edit.js.map +1 -1
  33. package/build/post-excerpt/edit.js +1 -1
  34. package/build/post-excerpt/edit.js.map +1 -1
  35. package/build/query-no-results/edit.js +1 -1
  36. package/build/query-no-results/edit.js.map +1 -1
  37. package/build-module/comment-template/hooks.js +11 -3
  38. package/build-module/comment-template/hooks.js.map +1 -1
  39. package/build-module/comments-pagination/edit.js +19 -2
  40. package/build-module/comments-pagination/edit.js.map +1 -1
  41. package/build-module/comments-query-loop/edit.js +2 -2
  42. package/build-module/comments-query-loop/edit.js.map +1 -1
  43. package/build-module/comments-title/edit.js +135 -0
  44. package/build-module/comments-title/edit.js.map +1 -0
  45. package/build-module/comments-title/index.js +88 -0
  46. package/build-module/comments-title/index.js.map +1 -0
  47. package/build-module/index.js +3 -2
  48. package/build-module/index.js.map +1 -1
  49. package/build-module/navigation/edit/index.js +17 -1
  50. package/build-module/navigation/edit/index.js.map +1 -1
  51. package/build-module/navigation/edit/inner-blocks.js +5 -7
  52. package/build-module/navigation/edit/inner-blocks.js.map +1 -1
  53. package/build-module/navigation/edit/navigation-menu-selector.js +6 -2
  54. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  55. package/build-module/navigation-link/edit.js +29 -30
  56. package/build-module/navigation-link/edit.js.map +1 -1
  57. package/build-module/navigation-submenu/edit.js +14 -14
  58. package/build-module/navigation-submenu/edit.js.map +1 -1
  59. package/build-module/post-comments/edit.js +143 -38
  60. package/build-module/post-comments/edit.js.map +1 -1
  61. package/build-module/post-comments/index.js +2 -1
  62. package/build-module/post-comments/index.js.map +1 -1
  63. package/build-module/post-comments-form/edit.js +21 -1
  64. package/build-module/post-comments-form/edit.js.map +1 -1
  65. package/build-module/post-comments-form/index.js +1 -0
  66. package/build-module/post-comments-form/index.js.map +1 -1
  67. package/build-module/post-content/edit.js +1 -1
  68. package/build-module/post-content/edit.js.map +1 -1
  69. package/build-module/post-excerpt/edit.js +1 -1
  70. package/build-module/post-excerpt/edit.js.map +1 -1
  71. package/build-module/query-no-results/edit.js +1 -1
  72. package/build-module/query-no-results/edit.js.map +1 -1
  73. package/build-style/comment-content/style-rtl.css +81 -0
  74. package/build-style/comment-content/style.css +81 -0
  75. package/build-style/comments-title/editor-rtl.css +79 -0
  76. package/build-style/comments-title/editor.css +79 -0
  77. package/build-style/cover/style-rtl.css +1 -1
  78. package/build-style/cover/style.css +1 -1
  79. package/build-style/editor-rtl.css +12 -0
  80. package/build-style/editor.css +12 -0
  81. package/build-style/latest-posts/style-rtl.css +2 -0
  82. package/build-style/latest-posts/style.css +4 -0
  83. package/build-style/post-comments/editor-rtl.css +79 -0
  84. package/build-style/post-comments/editor.css +79 -0
  85. package/build-style/post-comments/style-rtl.css +6 -4
  86. package/build-style/post-comments/style.css +6 -4
  87. package/build-style/post-comments-form/editor-rtl.css +79 -0
  88. package/build-style/post-comments-form/editor.css +79 -0
  89. package/build-style/post-comments-form/style-rtl.css +9 -0
  90. package/build-style/post-comments-form/style.css +9 -0
  91. package/build-style/style-rtl.css +18 -5
  92. package/build-style/style.css +20 -5
  93. package/package.json +10 -10
  94. package/src/comment-author-name/index.php +7 -5
  95. package/src/comment-content/index.php +25 -3
  96. package/src/comment-content/style.scss +5 -0
  97. package/src/comment-edit-link/index.php +1 -4
  98. package/src/comment-reply-link/index.php +1 -4
  99. package/src/comment-template/hooks.js +13 -1
  100. package/src/comment-template/index.php +13 -4
  101. package/src/comments-pagination/edit.js +23 -0
  102. package/src/comments-query-loop/edit.js +2 -0
  103. package/src/comments-title/block.json +70 -0
  104. package/src/comments-title/edit.js +213 -0
  105. package/src/comments-title/editor.scss +4 -0
  106. package/src/comments-title/index.js +18 -0
  107. package/src/comments-title/index.php +75 -0
  108. package/src/cover/index.php +1 -1
  109. package/src/cover/style.scss +1 -1
  110. package/src/editor.scss +3 -0
  111. package/src/index.js +4 -1
  112. package/src/latest-posts/style.scss +4 -0
  113. package/src/navigation/edit/index.js +24 -0
  114. package/src/navigation/edit/inner-blocks.js +5 -7
  115. package/src/navigation/edit/navigation-menu-selector.js +15 -9
  116. package/src/navigation-link/edit.js +40 -43
  117. package/src/navigation-submenu/edit.js +13 -17
  118. package/src/post-comments/block.json +2 -1
  119. package/src/post-comments/edit.js +204 -44
  120. package/src/post-comments/editor.scss +3 -0
  121. package/src/post-comments/style.scss +6 -7
  122. package/src/post-comments-form/block.json +1 -0
  123. package/src/post-comments-form/edit.js +39 -2
  124. package/src/post-comments-form/editor.scss +3 -0
  125. package/src/post-comments-form/index.php +4 -1
  126. package/src/post-comments-form/style.scss +11 -0
  127. package/src/post-content/edit.js +15 -1
  128. package/src/post-excerpt/edit.js +14 -1
  129. package/src/query-no-results/edit.js +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["__","InspectorControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","useSelect","getBlockSupport","PanelBody","CommentsPaginationArrowControls","TEMPLATE","getDefaultBlockLayout","blockTypeOrName","layoutBlockSupportConfig","default","QueryPaginationEdit","attributes","paginationArrow","layout","setAttributes","clientId","name","usedLayout","hasNextPreviousBlocks","select","getBlocks","innerBlocks","find","innerBlock","includes","blockProps","innerBlocksProps","template","allowedBlocks","__experimentalLayout","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,iBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,QAKO,yBALP;AAMA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,SAAT,QAA0B,uBAA1B;AAEA;AACA;AACA;;AACA,SAASC,+BAAT,QAAgD,sCAAhD;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,mCAAF,CADgB,EAEhB,CAAE,kCAAF,CAFgB,EAGhB,CAAE,+BAAF,CAHgB,CAAjB;;AAMA,MAAMC,qBAAqB,GAAKC,eAAF,IAAuB;AACpD,QAAMC,wBAAwB,GAAGN,eAAe,CAC/CK,eAD+C,EAE/C,sBAF+C,CAAhD;AAIA,SAAOC,wBAAP,aAAOA,wBAAP,uBAAOA,wBAAwB,CAAEC,OAAjC;AACA,CAND;;AAQA,eAAe,SAASC,mBAAT,OAKX;AAAA,MALyC;AAC5CC,IAAAA,UAAU,EAAE;AAAEC,M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ependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-pagination-previous' ],\n\t[ 'core/comments-pagination-numbers' ],\n\t[ 'core/comments-pagination-next' ],\n];\n\nconst getDefaultBlockLayout = ( blockTypeOrName ) => {\n\tconst layoutBlockSupportConfig = getBlockSupport(\n\t\tblockTypeOrName,\n\t\t'__experimentalLayout'\n\t);\n\treturn layoutBlockSupportConfig?.default;\n};\n\nexport default function QueryPaginationEdit( {\n\tattributes: { paginationArrow, layout },\n\tsetAttributes,\n\tclientId,\n\tname,\n} ) {\n\tconst usedLayout = layout || getDefaultBlockLayout( name );\n\tconst hasNextPreviousBlocks = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst innerBlocks = getBlocks( clientId );\n\t\t/**\n\t\t * Show the `paginationArrow` control only if a\n\t\t * Comments Pagination Next or Comments Pagination Previous\n\t\t * block exists.\n\t\t */\n\t\treturn innerBlocks?.find( ( innerBlock ) => {\n\t\t\treturn [\n\t\t\t\t'core/comments-pagination-previous',\n\t\t\t\t'core/comments-pagination-next',\n\t\t\t].includes( innerBlock.name );\n\t\t} );\n\t}, [] );\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\tallowedBlocks: [\n\t\t\t'core/comments-pagination-previous',\n\t\t\t'core/comments-pagination-numbers',\n\t\t\t'core/comments-pagination-next',\n\t\t],\n\t\t__experimentalLayout: usedLayout,\n\t} );\n\treturn (\n\t\t<>\n\t\t\t{ hasNextPreviousBlocks && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<CommentsPaginationArrowControls\n\t\t\t\t\t\t\tvalue={ paginationArrow }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { paginationArrow: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-pagination/edit.js"],"names":["__","InspectorControls","useBlockProps","useInnerBlocksProps","store","blockEditorStore","Warning","useSelect","getBlockSupport","PanelBody","CommentsPaginationArrowControls","TEMPLATE","getDefaultBlockLayout","blockTypeOrName","layoutBlockSupportConfig","default","QueryPaginationEdit","attributes","paginationArrow","layout","setAttributes","clientId","name","usedLayout","hasNextPreviousBlocks","select","getBlocks","innerBlocks","find","innerBlock","includes","blockProps","innerBlocksProps","template","allowedBlocks","__experimentalLayout","pageComments","getSettings","__experimentalDiscussionSettings","value"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,EAAT,QAAmB,iBAAnB;AACA,SACCC,iBADD,EAECC,aAFD,EAGCC,mBAHD,EAICC,KAAK,IAAIC,gBAJV,EAKCC,OALD,QAMO,yBANP;AAOA,SAASC,SAAT,QAA0B,iBAA1B;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,SAAT,QAA0B,uBAA1B;AAEA;AACA;AACA;;AACA,SAASC,+BAAT,QAAgD,sCAAhD;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,mCAAF,CADgB,EAEhB,CAAE,kCAAF,CAFgB,EAGhB,CAAE,+BAAF,CAHgB,CAAjB;;AAMA,MAAMC,qBAAqB,GAAKC,eAAF,IAAuB;AACpD,QAAMC,wBAAwB,GAAGN,eAAe,CAC/CK,eAD+C,EA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,EAAxD;AACA,WAAOC,gCAAP,aAAOA,gCAAP,uBAAOA,gCAAgC,CAAEF,YAAzC;AACA,GAJ6B,EAI3B,EAJ2B,CAA9B,CA9BG,CAoCH;AACA;AACA;;AACA,MAAK,CAAEA,YAAP,EAAsB;AACrB,WACC,cAAC,OAAD,QACGpC,EAAE,CACH,mFADG,CADL,CADD;AAOA;;AAED,SACC,8BACGwB,qBAAqB,IACtB,cAAC,iBAAD,QACC,cAAC,SAAD;AAAW,IAAA,KAAK,EAAGxB,EAAE,CAAE,UAAF;AAArB,KACC,cAAC,+BAAD;AACC,IAAA,KAAK,EAAGkB,eADT;AAEC,IAAA,QAAQ,EAAKqB,KAAF,IAAa;AACvBnB,MAAAA,aAAa,CAAE;AAAEF,QAAAA,eAAe,EAAEqB;AAAnB,OAAF,CAAb;AACA;AAJF,IADD,CADD,CAFF,EAaC,qBAAUP,gBAAV,CAbD,CADD;AAiBA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tInspectorControls,\n\tuseBlockProps,\n\tuseInnerBlocksProps,\n\tstore as blockEditorStore,\n\tWarning,\n} from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { CommentsPaginationArrowControls } from './comments-pagination-arrow-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-pagination-previous' ],\n\t[ 'core/comments-pagination-numbers' ],\n\t[ 'core/comments-pagination-next' ],\n];\n\nconst getDefaultBlockLayout = ( blockTypeOrName ) => {\n\tconst layoutBlockSupportConfig = getBlockSupport(\n\t\tblockTypeOrName,\n\t\t'__experimentalLayout'\n\t);\n\treturn layoutBlockSupportConfig?.default;\n};\n\nexport default function QueryPaginationEdit( {\n\tattributes: { paginationArrow, layout },\n\tsetAttributes,\n\tclientId,\n\tname,\n} ) {\n\tconst usedLayout = layout || getDefaultBlockLayout( name );\n\tconst hasNextPreviousBlocks = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst innerBlocks = getBlocks( clientId );\n\t\t/**\n\t\t * Show the `paginationArrow` control only if a\n\t\t * Comments Pagination Next or Comments Pagination Previous\n\t\t * block exists.\n\t\t */\n\t\treturn innerBlocks?.find( ( innerBlock ) => {\n\t\t\treturn [\n\t\t\t\t'core/comments-pagination-previous',\n\t\t\t\t'core/comments-pagination-next',\n\t\t\t].includes( innerBlock.name );\n\t\t} );\n\t}, [] );\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t\tallowedBlocks: [\n\t\t\t'core/comments-pagination-previous',\n\t\t\t'core/comments-pagination-numbers',\n\t\t\t'core/comments-pagination-next',\n\t\t],\n\t\t__experimentalLayout: usedLayout,\n\t} );\n\n\t// Get the Discussion settings\n\tconst pageComments = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\treturn __experimentalDiscussionSettings?.pageComments;\n\t}, [] );\n\n\t// If paging comments is not enabled in the Discussion Settings then hide the pagination\n\t// controls. We don't want to remove them from the template so that when the user enables\n\t// paging comments, the controls will be visible.\n\tif ( ! pageComments ) {\n\t\treturn (\n\t\t\t<Warning>\n\t\t\t\t{ __(\n\t\t\t\t\t'Comments Pagination block: paging comments is disabled in the Discussion Settings'\n\t\t\t\t) }\n\t\t\t</Warning>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ hasNextPreviousBlocks && (\n\t\t\t\t<InspectorControls>\n\t\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t\t<CommentsPaginationArrowControls\n\t\t\t\t\t\t\tvalue={ paginationArrow }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( { paginationArrow: value } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</InspectorControls>\n\t\t\t) }\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
@@ -9,7 +9,7 @@ import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
9
9
  */
10
10
 
11
11
  import CommentsInspectorControls from './edit/comments-inspector-controls';
12
- const TEMPLATE = [['core/comment-template', {}, [['core/columns', {}, [['core/column', {
12
+ const TEMPLATE = [['core/comments-title'], ['core/comment-template', {}, [['core/columns', {}, [['core/column', {
13
13
  width: '40px'
14
14
  }, [['core/avatar', {
15
15
  size: 40,
@@ -30,7 +30,7 @@ const TEMPLATE = [['core/comment-template', {}, [['core/columns', {}, [['core/co
30
30
  }
31
31
  }
32
32
  }
33
- }, [['core/comment-date'], ['core/comment-edit-link']]], ['core/comment-content'], ['core/comment-reply-link']]]]]]], ['core/comments-pagination']];
33
+ }, [['core/comment-date'], ['core/comment-edit-link']]], ['core/comment-content'], ['core/comment-reply-link']]]]]]], ['core/comments-pagination'], ['core/post-comments-form']];
34
34
  export default function CommentsQueryLoopEdit(_ref) {
35
35
  let {
36
36
  attributes,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/comments-query-loop/edit.js"],"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","TEMPLATE","width","size","style","border","radius","layout","type","spacing","margin","top","bottom","CommentsQueryLoopEdit","attributes","setAttributes","tagName","TagName","blockProps","innerBlocksProps","template"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,mBAAxB,QAAmD,yBAAnD;AAEA;AACA;AACA;;AACA,OAAOC,yBAAP,MAAsC,oCAAtC;AAEA,MAAMC,QAAQ,GAAG,CAChB,CACC,uBADD,EAEC,EAFD,EAGC,CACC,CACC,cADD,EAEC,EAFD,EAGC,CACC,CACC,aADD,EAEC;AAAEC,EAAAA,KAAK,EAAE;AAAT,CAFD,EAGC,CACC,CACC,aADD,EAEC;AACCC,EAAAA,IAAI,EAAE,EADP;AAECC,EAAAA,KAAK,EAAE;AACNC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,MAAM,EAAE;AAAV;AADF;AAFR,CAFD,CADD,CAHD,CADD,EAgBC,CACC,aADD,EAEC,EAFD,EAGC,CACC,CAAE,0BAAF,CADD,EAEC,CACC,YADD,EAEC;AACCC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,IAAI,EAAE;AAAR,GADT;AAECJ,EAAAA,KAAK,EAAE;AACNK,IAAAA,OAAO,EAAE;AACRC,MAAAA,MAAM,EAAE;AACPC,QAAAA,GAAG,EAAE,KADE;AAEPC,QAAAA,MAAM,EAAE;AAFD;AADA;AADH;AAFR,CAFD,EAaC,CACC,CAAE,mBAAF,CADD,EAEC,CAAE,wBAAF,CAFD,CAbD,CAFD,EAoBC,CAAE,sBAAF,CApBD,EAqBC,CAAE,yBAAF,CArBD,CAHD,CAhBD,CAHD,CADD,CAHD,CADgB,EAuDhB,CAAE,0BAAF,CAvDgB,CAAjB;AA0DA,eAAe,SAASC,qBAAT,OAAgE;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AAC9E,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAAuBH,UAA7B;AAEA,QAAMI,UAAU,GAAGpB,aAAa,EAAhC;AACA,QAAMqB,gBAAgB,GAAGpB,mBAAmB,CAAEmB,UAAF,EAAc;AACzDE,IAAAA,QAAQ,EAAEnB;AAD+C,GAAd,CAA5C;AAIA,SACC,8BACC,cAAC,yBAAD;AACC,IAAA,UAAU,EAAGa,UADd;AAEC,IAAA,aAAa,EAAGC;AAFjB,IADD,EAKC,cAAC,OAAD,EAAcI,gBAAd,CALD,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './edit/comments-inspector-controls';\n\nconst TEMPLATE = [\n\t[\n\t\t'core/comment-template',\n\t\t{},\n\t\t[\n\t\t\t[\n\t\t\t\t'core/columns',\n\t\t\t\t{},\n\t\t\t\t[\n\t\t\t\t\t[\n\t\t\t\t\t\t'core/column',\n\t\t\t\t\t\t{ width: '40px' },\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'core/avatar',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsize: 40,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tborder: { radius: '20px' },\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'core/column',\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t[ 'core/comment-author-name' ],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlayout: { type: 'flex' },\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\t\t\t\t\tmargin: {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: '0px',\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: '0px',\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t[ 'core/comment-date' ],\n\t\t\t\t\t\t\t\t\t[ 'core/comment-edit-link' ],\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[ 'core/comment-content' ],\n\t\t\t\t\t\t\t[ 'core/comment-reply-link' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t],\n\t],\n\t[ 'core/comments-pagination' ],\n];\n\nexport default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {\n\tconst { tagName: TagName } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-query-loop/edit.js"],"names":["useBlockProps","useInnerBlocksProps","CommentsInspectorControls","TEMPLATE","width","size","style","border","radius","layout","type","spacing","margin","top","bottom","CommentsQueryLoopEdit","attributes","setAttributes","tagName","TagName","blockProps","innerBlocksProps","template"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,mBAAxB,QAAmD,yBAAnD;AAEA;AACA;AACA;;AACA,OAAOC,yBAAP,MAAsC,oCAAtC;AAEA,MAAMC,QAAQ,GAAG,CAChB,CAAE,qBAAF,CADgB,EAEhB,CACC,uBADD,EAEC,EAFD,EAGC,CACC,CACC,cADD,EAEC,EAFD,EAGC,CACC,CACC,aADD,EAEC;AAAEC,EAAAA,KAAK,EAAE;AAAT,CAFD,EAGC,CACC,CACC,aADD,EAEC;AACCC,EAAAA,IAAI,EAAE,EADP;AAECC,EAAAA,KAAK,EAAE;AACNC,IAAAA,MAAM,EAAE;AAAEC,MAAAA,MAAM,EAAE;AAAV;AADF;AAFR,CAFD,CADD,CAHD,CADD,EAgBC,CACC,aADD,EAEC,EAFD,EAGC,CACC,CAAE,0BAAF,CADD,EAEC,CACC,YADD,EAEC;AACCC,EAAAA,MAAM,EAAE;AAAEC,IAAAA,IAAI,EAAE;AAAR,GADT;AAECJ,EAAAA,KAAK,EAAE;AACNK,IAAAA,OAAO,EAAE;AACRC,MAAAA,MAAM,EAAE;AACPC,QAAAA,GAAG,EAAE,KADE;AAEPC,QAAAA,MAAM,EAAE;AAFD;AADA;AADH;AAFR,CAFD,EAaC,CACC,CAAE,mBAAF,CADD,EAEC,CAAE,wBAAF,CAFD,CAbD,CAFD,EAoBC,CAAE,sBAAF,CApBD,EAqBC,CAAE,yBAAF,CArBD,CAHD,CAhBD,CAHD,CADD,CAHD,CAFgB,EAwDhB,CAAE,0BAAF,CAxDgB,EAyDhB,CAAE,yBAAF,CAzDgB,CAAjB;AA4DA,eAAe,SAASC,qBAAT,OAAgE;AAAA,MAAhC;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,GAAgC;AAC9E,QAAM;AAAEC,IAAAA,OAAO,EAAEC;AAAX,MAAuBH,UAA7B;AAEA,QAAMI,UAAU,GAAGpB,aAAa,EAAhC;AACA,QAAMqB,gBAAgB,GAAGpB,mBAAmB,CAAEmB,UAAF,EAAc;AACzDE,IAAAA,QAAQ,EAAEnB;AAD+C,GAAd,CAA5C;AAIA,SACC,8BACC,cAAC,yBAAD;AACC,IAAA,UAAU,EAAGa,UADd;AAEC,IAAA,aAAa,EAAGC;AAFjB,IADD,EAKC,cAAC,OAAD,EAAcI,gBAAd,CALD,CADD;AASA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentsInspectorControls from './edit/comments-inspector-controls';\n\nconst TEMPLATE = [\n\t[ 'core/comments-title' ],\n\t[\n\t\t'core/comment-template',\n\t\t{},\n\t\t[\n\t\t\t[\n\t\t\t\t'core/columns',\n\t\t\t\t{},\n\t\t\t\t[\n\t\t\t\t\t[\n\t\t\t\t\t\t'core/column',\n\t\t\t\t\t\t{ width: '40px' },\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'core/avatar',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tsize: 40,\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tborder: { radius: '20px' },\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'core/column',\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t[ 'core/comment-author-name' ],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlayout: { type: 'flex' },\n\t\t\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\t\t\tspacing: {\n\t\t\t\t\t\t\t\t\t\t\tmargin: {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: '0px',\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: '0px',\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t[ 'core/comment-date' ],\n\t\t\t\t\t\t\t\t\t[ 'core/comment-edit-link' ],\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[ 'core/comment-content' ],\n\t\t\t\t\t\t\t[ 'core/comment-reply-link' ],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t],\n\t],\n\t[ 'core/comments-pagination' ],\n\t[ 'core/post-comments-form' ],\n];\n\nexport default function CommentsQueryLoopEdit( { attributes, setAttributes } ) {\n\tconst { tagName: TagName } = attributes;\n\n\tconst blockProps = useBlockProps();\n\tconst innerBlocksProps = useInnerBlocksProps( blockProps, {\n\t\ttemplate: TEMPLATE,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<CommentsInspectorControls\n\t\t\t\tattributes={ attributes }\n\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t\t<TagName { ...innerBlocksProps } />\n\t\t</>\n\t);\n}\n"]}
@@ -0,0 +1,135 @@
1
+ import { createElement, Fragment } from "@wordpress/element";
2
+
3
+ /**
4
+ * External dependencies
5
+ */
6
+ import classnames from 'classnames';
7
+ /**
8
+ * WordPress dependencies
9
+ */
10
+
11
+ import { AlignmentControl, BlockControls, useBlockProps, PlainText, InspectorControls } from '@wordpress/block-editor';
12
+ import { __ } from '@wordpress/i18n';
13
+ import { useEntityProp } from '@wordpress/core-data';
14
+ import { PanelBody, ToggleControl, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOption as ToggleGroupControlOption } from '@wordpress/components';
15
+ import { useState, useEffect } from '@wordpress/element';
16
+ import apiFetch from '@wordpress/api-fetch';
17
+ import { addQueryArgs } from '@wordpress/url';
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ import HeadingLevelDropdown from '../heading/heading-level-dropdown';
23
+ export default function Edit(_ref) {
24
+ let {
25
+ attributes: {
26
+ textAlign,
27
+ singleCommentLabel,
28
+ multipleCommentsLabel,
29
+ showPostTitle,
30
+ showCommentsCount,
31
+ level
32
+ },
33
+ setAttributes,
34
+ context: {
35
+ postType,
36
+ postId
37
+ }
38
+ } = _ref;
39
+ const TagName = 'h' + level;
40
+ const [commentsCount, setCommentsCount] = useState();
41
+ const [editingMode, setEditingMode] = useState('plural');
42
+ const [rawTitle] = useEntityProp('postType', postType, 'title', postId);
43
+ const isSiteEditor = typeof postId === 'undefined';
44
+ const blockProps = useBlockProps({
45
+ className: classnames({
46
+ [`has-text-align-${textAlign}`]: textAlign
47
+ })
48
+ });
49
+ useEffect(() => {
50
+ if (isSiteEditor) {
51
+ setCommentsCount(3);
52
+ return;
53
+ }
54
+
55
+ const currentPostId = postId;
56
+ apiFetch({
57
+ path: addQueryArgs('/wp/v2/comments', {
58
+ post: postId,
59
+ _fields: 'id'
60
+ }),
61
+ method: 'HEAD',
62
+ parse: false
63
+ }).then(res => {
64
+ // Stale requests will have the `currentPostId` of an older closure.
65
+ if (currentPostId === postId) {
66
+ setCommentsCount(parseInt(res.headers.get('X-WP-Total')));
67
+ }
68
+ }).catch(() => {
69
+ setCommentsCount(0);
70
+ });
71
+ }, [postId]);
72
+ const blockControls = createElement(BlockControls, {
73
+ group: "block"
74
+ }, createElement(AlignmentControl, {
75
+ value: textAlign,
76
+ onChange: newAlign => setAttributes({
77
+ textAlign: newAlign
78
+ })
79
+ }), createElement(HeadingLevelDropdown, {
80
+ selectedLevel: level,
81
+ onChange: newLevel => setAttributes({
82
+ level: newLevel
83
+ })
84
+ }));
85
+ const inspectorControls = createElement(InspectorControls, null, createElement(PanelBody, {
86
+ title: __('Settings')
87
+ }, isSiteEditor && createElement(ToggleGroupControl, {
88
+ label: __('Editing mode'),
89
+ onChange: setEditingMode,
90
+ value: editingMode
91
+ }, createElement(ToggleGroupControlOption, {
92
+ label: __('Singular'),
93
+ value: "singular"
94
+ }), createElement(ToggleGroupControlOption, {
95
+ label: __('Plural'),
96
+ value: "plural"
97
+ })), createElement(ToggleControl, {
98
+ label: __('Show post title'),
99
+ checked: showPostTitle,
100
+ onChange: value => setAttributes({
101
+ showPostTitle: value
102
+ })
103
+ }), createElement(ToggleControl, {
104
+ label: __('Show comments count'),
105
+ checked: showCommentsCount,
106
+ onChange: value => setAttributes({
107
+ showCommentsCount: value
108
+ })
109
+ })));
110
+ const postTitle = isSiteEditor ? __('"Post Title"') : `"${rawTitle}"`;
111
+ const singlePlaceholder = showPostTitle ? __('One response to ') : __('One response');
112
+ const singlePlaceholderNoCount = showPostTitle ? __('Response to ') : __('Response');
113
+ const multiplePlaceholder = showPostTitle ? __('responses to ') : __('responses');
114
+ const multiplePlaceholderNoCount = showPostTitle ? __('Responses to ') : __('Responses');
115
+ return createElement(Fragment, null, blockControls, inspectorControls, createElement(TagName, blockProps, editingMode === 'singular' || commentsCount === 1 ? createElement(Fragment, null, createElement(PlainText, {
116
+ __experimentalVersion: 2,
117
+ tagName: "span",
118
+ "aria-label": showCommentsCount ? singlePlaceholder : singlePlaceholderNoCount,
119
+ placeholder: showCommentsCount ? singlePlaceholder : singlePlaceholderNoCount,
120
+ value: singleCommentLabel,
121
+ onChange: newLabel => setAttributes({
122
+ singleCommentLabel: newLabel
123
+ })
124
+ }), showPostTitle ? postTitle : null) : createElement(Fragment, null, showCommentsCount ? commentsCount : null, createElement(PlainText, {
125
+ __experimentalVersion: 2,
126
+ tagName: "span",
127
+ "aria-label": showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholderNoCount,
128
+ placeholder: showCommentsCount ? ` ${multiplePlaceholder}` : multiplePlaceholderNoCount,
129
+ value: multipleCommentsLabel,
130
+ onChange: newLabel => setAttributes({
131
+ multipleCommentsLabel: newLabel
132
+ })
133
+ }), showPostTitle ? postTitle : null)));
134
+ }
135
+ //# sourceMappingURL=edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-title/edit.js"],"names":["classnames","AlignmentControl","BlockControls","useBlockProps","PlainText","InspectorControls","__","useEntityProp","PanelBody","ToggleControl","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOption","ToggleGroupControlOption","useState","useEffect","apiFetch","addQueryArgs","HeadingLevelDropdown","Edit","attributes","textAlign","singleCommentLabel","multipleCommentsLabel","showPostTitle","showCommentsCount","level","setAttributes","context","postType","postId","TagName","commentsCount","setCommentsCount","editingMode","setEditingMode","rawTitle","isSiteEditor","blockProps","className","currentPostId","path","post","_fields","method","parse","then","res","parseInt","headers","get","catch","blockControls","newAlign","newLevel","inspectorControls","value","postTitle","singlePlaceholder","singlePlaceholderNoCount","multiplePlaceholder","multiplePlaceholderNoCount","newLabel"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;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E,CAAE,WAAF,CAFL;AAIA,SACC,8BACG8C,aADH,EAEGG,iBAFH,EAGC,cAAC,OAAD,EAAcjB,UAAd,EACGJ,WAAW,KAAK,UAAhB,IAA8BF,aAAa,KAAK,CAAhD,GACD,8BACC,cAAC,SAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBACCP,iBAAiB,GACdiC,iBADc,GAEdC,wBANL;AAQC,IAAA,WAAW,EACVlC,iBAAiB,GACdiC,iBADc,GAEdC,wBAXL;AAaC,IAAA,KAAK,EAAGrC,kBAbT;AAcC,IAAA,QAAQ,EAAKwC,QAAF,IACVnC,aAAa,CAAE;AACdL,MAAAA,kBAAkB,EAAEwC;AADN,KAAF;AAff,IADD,EAqBGtC,aAAa,GAAGiC,SAAH,GAAe,IArB/B,CADC,GAyBD,8BACGhC,iBAAiB,GAAGO,aAAH,GAAmB,IADvC,EAEC,cAAC,SAAD;AACC,IAAA,qBAAqB,EAAG,CADzB;AAEC,IAAA,OAAO,EAAC,MAFT;AAGC,kBACCP,iBAAiB,GACb,IAAImC,mBAAqB,EADZ,GAEdC,0BANL;AAQC,IAAA,WAAW,EACVpC,iBAAiB,GACb,IAAImC,mBAAqB,EADZ,GAEdC,0BAXL;AAaC,IAAA,KAAK,EAAGtC,qBAbT;AAcC,IAAA,QAAQ,EAAKuC,QAAF,IACVnC,aAAa,CAAE;AACdJ,MAAAA,qBAAqB,EAAEuC;AADT,KAAF;AAff,IAFD,EAsBGtC,aAAa,GAAGiC,SAAH,GAAe,IAtB/B,CA1BF,CAHD,CADD;AA0DA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAlignmentControl,\n\tBlockControls,\n\tuseBlockProps,\n\tPlainText,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityProp } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\tToggleControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n} from '@wordpress/components';\nimport { useState, useEffect } from '@wordpress/element';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport HeadingLevelDropdown from '../heading/heading-level-dropdown';\n\nexport default function Edit( {\n\tattributes: {\n\t\ttextAlign,\n\t\tsingleCommentLabel,\n\t\tmultipleCommentsLabel,\n\t\tshowPostTitle,\n\t\tshowCommentsCount,\n\t\tlevel,\n\t},\n\tsetAttributes,\n\tcontext: { postType, postId },\n} ) {\n\tconst TagName = 'h' + level;\n\tconst [ commentsCount, setCommentsCount ] = useState();\n\tconst [ editingMode, setEditingMode ] = useState( 'plural' );\n\tconst [ rawTitle ] = useEntityProp( 'postType', postType, 'title', postId );\n\tconst isSiteEditor = typeof postId === 'undefined';\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classnames( {\n\t\t\t[ `has-text-align-${ textAlign }` ]: textAlign,\n\t\t} ),\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( isSiteEditor ) {\n\t\t\tsetCommentsCount( 3 );\n\t\t\treturn;\n\t\t}\n\t\tconst currentPostId = postId;\n\t\tapiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/comments', {\n\t\t\t\tpost: postId,\n\t\t\t\t_fields: 'id',\n\t\t\t} ),\n\t\t\tmethod: 'HEAD',\n\t\t\tparse: false,\n\t\t} )\n\t\t\t.then( ( res ) => {\n\t\t\t\t// Stale requests will have the `currentPostId` of an older closure.\n\t\t\t\tif ( currentPostId === postId ) {\n\t\t\t\t\tsetCommentsCount(\n\t\t\t\t\t\tparseInt( res.headers.get( 'X-WP-Total' ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tsetCommentsCount( 0 );\n\t\t\t} );\n\t}, [ postId ] );\n\n\tconst blockControls = (\n\t\t<BlockControls group=\"block\">\n\t\t\t<AlignmentControl\n\t\t\t\tvalue={ textAlign }\n\t\t\t\tonChange={ ( newAlign ) =>\n\t\t\t\t\tsetAttributes( { textAlign: newAlign } )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<HeadingLevelDropdown\n\t\t\t\tselectedLevel={ level }\n\t\t\t\tonChange={ ( newLevel ) =>\n\t\t\t\t\tsetAttributes( { level: newLevel } )\n\t\t\t\t}\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n\n\tconst inspectorControls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t{ isSiteEditor && (\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\tlabel={ __( 'Editing mode' ) }\n\t\t\t\t\t\tonChange={ setEditingMode }\n\t\t\t\t\t\tvalue={ editingMode }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tlabel={ __( 'Singular' ) }\n\t\t\t\t\t\t\tvalue=\"singular\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tlabel={ __( 'Plural' ) }\n\t\t\t\t\t\t\tvalue=\"plural\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t) }\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Show post title' ) }\n\t\t\t\t\tchecked={ showPostTitle }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showPostTitle: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Show comments count' ) }\n\t\t\t\t\tchecked={ showCommentsCount }\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tsetAttributes( { showCommentsCount: value } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst postTitle = isSiteEditor ? __( '\"Post Title\"' ) : `\"${ rawTitle }\"`;\n\n\tconst singlePlaceholder = showPostTitle\n\t\t? __( 'One response to ' )\n\t\t: __( 'One response' );\n\n\tconst singlePlaceholderNoCount = showPostTitle\n\t\t? __( 'Response to ' )\n\t\t: __( 'Response' );\n\n\tconst multiplePlaceholder = showPostTitle\n\t\t? __( 'responses to ' )\n\t\t: __( 'responses' );\n\n\tconst multiplePlaceholderNoCount = showPostTitle\n\t\t? __( 'Responses to ' )\n\t\t: __( 'Responses' );\n\n\treturn (\n\t\t<>\n\t\t\t{ blockControls }\n\t\t\t{ inspectorControls }\n\t\t\t<TagName { ...blockProps }>\n\t\t\t\t{ editingMode === 'singular' || commentsCount === 1 ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PlainText\n\t\t\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\tshowCommentsCount\n\t\t\t\t\t\t\t\t\t? singlePlaceholder\n\t\t\t\t\t\t\t\t\t: singlePlaceholderNoCount\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\tshowCommentsCount\n\t\t\t\t\t\t\t\t\t? singlePlaceholder\n\t\t\t\t\t\t\t\t\t: singlePlaceholderNoCount\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ singleCommentLabel }\n\t\t\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tsingleCommentLabel: newLabel,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ showPostTitle ? postTitle : null }\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ showCommentsCount ? commentsCount : null }\n\t\t\t\t\t\t<PlainText\n\t\t\t\t\t\t\t__experimentalVersion={ 2 }\n\t\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\tshowCommentsCount\n\t\t\t\t\t\t\t\t\t? ` ${ multiplePlaceholder }`\n\t\t\t\t\t\t\t\t\t: multiplePlaceholderNoCount\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tplaceholder={\n\t\t\t\t\t\t\t\tshowCommentsCount\n\t\t\t\t\t\t\t\t\t? ` ${ multiplePlaceholder }`\n\t\t\t\t\t\t\t\t\t: multiplePlaceholderNoCount\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ multipleCommentsLabel }\n\t\t\t\t\t\t\tonChange={ ( newLabel ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tmultipleCommentsLabel: newLabel,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ showPostTitle ? postTitle : null }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</TagName>\n\t\t</>\n\t);\n}\n"]}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { commentTitle as icon } from '@wordpress/icons';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+
9
+ const metadata = {
10
+ $schema: "https://schemas.wp.org/trunk/block.json",
11
+ apiVersion: 2,
12
+ name: "core/comments-title",
13
+ title: "Comments Title",
14
+ category: "theme",
15
+ ancestor: ["core/comments-query-loop"],
16
+ description: "Displays a title with the number of comments",
17
+ textdomain: "default",
18
+ usesContext: ["postId", "postType"],
19
+ attributes: {
20
+ textAlign: {
21
+ type: "string"
22
+ },
23
+ singleCommentLabel: {
24
+ type: "string"
25
+ },
26
+ multipleCommentsLabel: {
27
+ type: "string"
28
+ },
29
+ showPostTitle: {
30
+ type: "boolean",
31
+ "default": true
32
+ },
33
+ showCommentsCount: {
34
+ type: "boolean",
35
+ "default": true
36
+ },
37
+ level: {
38
+ type: "number",
39
+ "default": 2
40
+ }
41
+ },
42
+ supports: {
43
+ anchor: false,
44
+ align: true,
45
+ html: false,
46
+ __experimentalBorder: {
47
+ radius: true,
48
+ color: true,
49
+ width: true,
50
+ style: true
51
+ },
52
+ color: {
53
+ gradients: true,
54
+ __experimentalDefaultControls: {
55
+ background: true,
56
+ text: true
57
+ }
58
+ },
59
+ spacing: {
60
+ margin: true,
61
+ padding: true
62
+ },
63
+ typography: {
64
+ fontSize: true,
65
+ lineHeight: true,
66
+ __experimentalFontStyle: true,
67
+ __experimentalFontWeight: true,
68
+ __experimentalFontFamily: true,
69
+ __experimentalTextTransform: true,
70
+ __experimentalDefaultControls: {
71
+ fontSize: true,
72
+ __experimentalFontFamily: true,
73
+ __experimentalFontStyle: true,
74
+ __experimentalFontWeight: true
75
+ }
76
+ }
77
+ }
78
+ };
79
+ import edit from './edit';
80
+ const {
81
+ name
82
+ } = metadata;
83
+ export { metadata, name };
84
+ export const settings = {
85
+ icon,
86
+ edit
87
+ };
88
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/block-library/src/comments-title/index.js"],"names":["commentTitle","icon","edit","name","metadata","settings"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,YAAY,IAAIC,IAAzB,QAAqC,kBAArC;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBJ,EAAAA,IADuB;AAEvBC,EAAAA;AAFuB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { commentTitle as icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon,\n\tedit,\n};\n"]}
@@ -29,6 +29,7 @@ import * as commentsQueryLoop from './comments-query-loop';
29
29
  import * as commentsPagination from './comments-pagination';
30
30
  import * as commentsPaginationNext from './comments-pagination-next';
31
31
  import * as commentsPaginationNumbers from './comments-pagination-numbers';
32
+ import * as commentsTitle from './comments-title';
32
33
  import * as cover from './cover';
33
34
  import * as embed from './embed';
34
35
  import * as file from './file';
@@ -139,7 +140,7 @@ paragraph, image, heading, gallery, list, quote, // Register all remaining core
139
140
  archives, audio, button, buttons, calendar, categories, window.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.
140
141
  code, column, columns, cover, embed, file, group, html, latestComments, latestPosts, mediaText, missing, more, nextpage, pageList, pattern, preformatted, pullquote, reusableBlock, rss, search, separator, shortcode, socialLink, socialLinks, spacer, table, // tableOfContents,
141
142
  tagCloud, textColumns, verse, video, // theme blocks
142
- navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
143
+ navigation, navigationLink, navigationSubmenu, siteLogo, siteTitle, siteTagline, query, templatePart, avatar, postTitle, postExcerpt, postFeaturedImage, postContent, postAuthor, postDate, postTerms, postNavigationLink, postTemplate, queryPagination, queryPaginationNext, queryPaginationNumbers, queryPaginationPrevious, queryNoResults, readMore, commentAuthorName, commentContent, commentDate, commentEditLink, commentReplyLink, commentTemplate, commentsTitle, commentsQueryLoop, commentsPagination, commentsPaginationNext, commentsPaginationNumbers, commentsPaginationPrevious, postComments, postCommentsForm, homeLink, logInOut, termDescription, queryTitle, postAuthorBiography];
143
144
  /**
144
145
  * Function to register core blocks provided by the block editor.
145
146
  *
@@ -183,6 +184,6 @@ export const __experimentalRegisterExperimentalCoreBlocks = process.env.IS_GUTEN
183
184
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
184
185
  [// Experimental blocks.
185
186
  postAuthorName, ...(window.__experimentalEnableListBlockV2 ? [listItem] : []), // Full Site Editing blocks.
186
- ...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount, postCommentsForm, postCommentsLink] : [])].forEach(registerBlock);
187
+ ...(enableFSEBlocks ? [commentAuthorAvatar, navigationArea, postComment, postCommentsCount, postCommentsLink] : [])].forEach(registerBlock);
187
188
  } : undefined;
188
189
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlockType","setDefaultBlockName","setFreeformContentHandlerName","setUnregisteredTypeHandlerName","setGroupingBlockName","archives","avatar","audio","button","buttons","calendar","categories","classic","code","column","columns","commentAuthorAvatar","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsPaginationPrevious","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","cover","embed","file","gallery","group","heading","homeLink","html","image","latestComments","latestPosts","list","listItem","logInOut","mediaText","missing","more","navigation","navigationArea","navigationLink","navigationSubmenu","nextpage","pattern","pageList","paragraph","postAuthor","postAuthorName","postAuthorBiography","postComment","postComments","postCommentsCount","postCommentsForm","postCommentsLink","postContent","postDate","postExcerpt","postFeaturedImage","postNavigationLink","postTemplate","postTerms","postTitle","preformatted","pullquote","query","queryNoResults","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryTitle","quote","reusableBlock","readMore","rss","search","separator","shortcode","siteLogo","siteTagline","siteTitle","socialLink","socialLinks","spacer","table","tagCloud","templatePart","termDescription","textColumns","verse","video","registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","window","wp","oldEditor","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__experimentalEnableListBlockV2","undefined"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,iBADD,EAECC,mBAFD,EAGCC,6BAHD,EAICC,8BAJD,EAKCC,oBALD,QAMO,mBANP;AAQA;AACA;AACA;;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,KAAZ,MAAuB,SAAvB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,UAAZ,MAA4B,cAA5B;AACA,OAAO,KAAKC,OAAZ,MAAyB,YAAzB;AACA,OAAO,KAAKC,IAAZ,MAAsB,QAAtB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,mBAAZ,MAAqC,yBAArC;AACA,OAAO,KAAKC,iBAAZ,MAAmC,uBAAnC;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,WAAZ,MAA6B,gBAA7B;AACA,OAAO,KAAKC,eAAZ,MAAiC,qBAAjC;AACA,OAAO,KAAKC,gBAAZ,MAAkC,sBAAlC;AACA,OAAO,KAAKC,eAAZ,MAAiC,oBAAjC;AACA,OAAO,KAAKC,0BAAZ,MAA4C,gCAA5C;AACA,OAAO,KAAKC,iBAAZ,MAAmC,uBAAnC;AACA,OAAO,KAAKC,kBAAZ,MAAoC,uBAApC;AACA,OAAO,KAAKC,sBAAZ,MAAwC,4BAAxC;AACA,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A;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMoD,kBAAkB,GAAG,YAE7B;AAAA,MADJC,MACI,uEADKL,2BAA2B,EAChC;AACJK,EAAAA,MAAM,CAACC,OAAP,CAAgBX,aAAhB;AAEAjG,EAAAA,mBAAmB,CAAEmD,SAAS,CAACkD,IAAZ,CAAnB;;AACA,MAAKE,MAAM,CAACC,EAAP,IAAaD,MAAM,CAACC,EAAP,CAAUC,SAA5B,EAAwC;AACvCxG,IAAAA,6BAA6B,CAAEU,OAAO,CAAC0F,IAAV,CAA7B;AACA;;AACDnG,EAAAA,8BAA8B,CAAEwC,OAAO,CAAC2D,IAAV,CAA9B;AACAlG,EAAAA,oBAAoB,CAAE4B,KAAK,CAACsE,IAAR,CAApB;AACA,CAXM;AAaP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMQ,4CAA4C,GAAGC,OAAO,CAACC,GAAR,CAC1DC,mBAD0D,GAEzD,YAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B,uEAAR,EAAQ;AAChC,GACC;AACA5D,EAAAA,cAFD,EAGC,IAAKkD,MAAM,CAACW,+BAAP,GACF,CAAE3E,QAAF,CADE,GAEF,EAFH,CAHD,EAOC;AACA,MAAK0E,eAAe,GACjB,CACAlG,mBADA,EAEA8B,cAFA,EAGAU,WAHA,EAIAE,iBAJA,EAKAC,gBALA,EAMAC,gBANA,CADiB,GASjB,EATH,CARD,EAkBEiD,OAlBF,CAkBWX,aAlBX;AAmBC,CAtBwD,GAuBzDkB,SAvBI","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\tpostComments,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t...( window.__experimentalEnableListBlockV2\n\t\t\t\t\t? [ listItem ]\n\t\t\t\t\t: [] ),\n\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsForm,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/index.js"],"names":["registerBlockType","setDefaultBlockName","setFreeformContentHandlerName","setUnregisteredTypeHandlerName","setGroupingBlockName","archives","avatar","audio","button","buttons","calendar","categories","classic","code","column","columns","commentAuthorAvatar","commentAuthorName","commentContent","commentDate","commentEditLink","commentReplyLink","commentTemplate","commentsPaginationPrevious","commentsQueryLoop","commentsPagination","commentsPaginationNext","commentsPaginationNumbers","commentsTitle","cover","embed","file","gallery","group","heading","homeLink","html","image","latestComments","latestPosts","list","listItem","logInOut","mediaText","missing","more","navigation","navigationArea","navigationLink","navigationSubmenu","nextpage","pattern","pageList","paragraph","postAuthor","postAuthorName","postAuthorBiography","postComment","postComments","postCommentsCount","postCommentsForm","postCommentsLink","postContent","postDate","postExcerpt","postFeaturedImage","postNavigationLink","postTemplate","postTerms","postTitle","preformatted","pullquote","query","queryNoResults","queryPagination","queryPaginationNext","queryPaginationNumbers","queryPaginationPrevious","queryTitle","quote","reusableBlock","readMore","rss","search","separator","shortcode","siteLogo","siteTagline","siteTitle","socialLink","socialLinks","spacer","table","tagCloud","templatePart","termDescription","textColumns","verse","video","registerBlock","block","metadata","settings","name","__experimentalGetCoreBlocks","window","wp","oldEditor","registerCoreBlocks","blocks","forEach","__experimentalRegisterExperimentalCoreBlocks","process","env","IS_GUTENBERG_PLUGIN","enableFSEBlocks","__experimentalEnableListBlockV2","undefined"],"mappings":"AAAA;AACA;AACA;AACA,SACCA,iBADD,EAECC,mBAFD,EAGCC,6BAHD,EAICC,8BAJD,EAKCC,oBALD,QAMO,mBANP;AAQA;AACA;AACA;;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,KAAZ,MAAuB,SAAvB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,QAAZ,MAA0B,YAA1B;AACA,OAAO,KAAKC,UAAZ,MAA4B,cAA5B;AACA,OAAO,KAAKC,OAAZ,MAAyB,YAAzB;AACA,OAAO,KAAKC,IAAZ,MAAsB,QAAtB;AACA,OAAO,KAAKC,MAAZ,MAAwB,UAAxB;AACA,OAAO,KAAKC,OAAZ,MAAyB,WAAzB;AACA,OAAO,KAAKC,mBAAZ,MAAqC,yBAArC;AACA,OAAO,KAAKC,iBAAZ,MAAmC,uBAAnC;AACA,OAAO,KAAKC,cAAZ,MAAgC,mBAAhC;AACA,OAAO,KAAKC,WAAZ,MAA6B,gBAA7B;AACA,OAAO,KAAKC,eAAZ,MAAiC,qBAAjC;AACA,OAAO,KAAKC,gBAAZ,MAAkC,sBAAlC;AACA,OAAO,KAAKC,eAAZ,MAAiC,oBAAjC;AACA,OAAO,KAAKC,0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port {\n\tregisterBlockType,\n\tsetDefaultBlockName,\n\tsetFreeformContentHandlerName,\n\tsetUnregisteredTypeHandlerName,\n\tsetGroupingBlockName,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport * as archives from './archives';\nimport * as avatar from './avatar';\nimport * as audio from './audio';\nimport * as button from './button';\nimport * as buttons from './buttons';\nimport * as calendar from './calendar';\nimport * as categories from './categories';\nimport * as classic from './freeform';\nimport * as code from './code';\nimport * as column from './column';\nimport * as columns from './columns';\nimport * as commentAuthorAvatar from './comment-author-avatar';\nimport * as commentAuthorName from './comment-author-name';\nimport * as commentContent from './comment-content';\nimport * as commentDate from './comment-date';\nimport * as commentEditLink from './comment-edit-link';\nimport * as commentReplyLink from './comment-reply-link';\nimport * as commentTemplate from './comment-template';\nimport * as commentsPaginationPrevious from './comments-pagination-previous';\nimport * as commentsQueryLoop from './comments-query-loop';\nimport * as commentsPagination from './comments-pagination';\nimport * as commentsPaginationNext from './comments-pagination-next';\nimport * as commentsPaginationNumbers from './comments-pagination-numbers';\nimport * as commentsTitle from './comments-title';\nimport * as cover from './cover';\nimport * as embed from './embed';\nimport * as file from './file';\nimport * as gallery from './gallery';\nimport * as group from './group';\nimport * as heading from './heading';\nimport * as homeLink from './home-link';\nimport * as html from './html';\nimport * as image from './image';\nimport * as latestComments from './latest-comments';\nimport * as latestPosts from './latest-posts';\nimport * as list from './list';\nimport * as listItem from './list-item';\nimport * as logInOut from './loginout';\nimport * as mediaText from './media-text';\nimport * as missing from './missing';\nimport * as more from './more';\nimport * as navigation from './navigation';\nimport * as navigationArea from './navigation-area';\nimport * as navigationLink from './navigation-link';\nimport * as navigationSubmenu from './navigation-submenu';\nimport * as nextpage from './nextpage';\nimport * as pattern from './pattern';\nimport * as pageList from './page-list';\nimport * as paragraph from './paragraph';\nimport * as postAuthor from './post-author';\nimport * as postAuthorName from './post-author-name';\nimport * as postAuthorBiography from './post-author-biography';\nimport * as postComment from './post-comment';\nimport * as postComments from './post-comments';\nimport * as postCommentsCount from './post-comments-count';\nimport * as postCommentsForm from './post-comments-form';\nimport * as postCommentsLink from './post-comments-link';\nimport * as postContent from './post-content';\nimport * as postDate from './post-date';\nimport * as postExcerpt from './post-excerpt';\nimport * as postFeaturedImage from './post-featured-image';\nimport * as postNavigationLink from './post-navigation-link';\nimport * as postTemplate from './post-template';\nimport * as postTerms from './post-terms';\nimport * as postTitle from './post-title';\nimport * as preformatted from './preformatted';\nimport * as pullquote from './pullquote';\nimport * as query from './query';\nimport * as queryNoResults from './query-no-results';\nimport * as queryPagination from './query-pagination';\nimport * as queryPaginationNext from './query-pagination-next';\nimport * as queryPaginationNumbers from './query-pagination-numbers';\nimport * as queryPaginationPrevious from './query-pagination-previous';\nimport * as queryTitle from './query-title';\nimport * as quote from './quote';\nimport * as reusableBlock from './block';\nimport * as readMore from './read-more';\nimport * as rss from './rss';\nimport * as search from './search';\nimport * as separator from './separator';\nimport * as shortcode from './shortcode';\nimport * as siteLogo from './site-logo';\nimport * as siteTagline from './site-tagline';\nimport * as siteTitle from './site-title';\nimport * as socialLink from './social-link';\nimport * as socialLinks from './social-links';\nimport * as spacer from './spacer';\nimport * as table from './table';\nimport * as tagCloud from './tag-cloud';\nimport * as templatePart from './template-part';\nimport * as termDescription from './term-description';\nimport * as textColumns from './text-columns';\nimport * as verse from './verse';\nimport * as video from './video';\n\n/**\n * Function to register an individual block.\n *\n * @param {Object} block The block to be registered.\n *\n */\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\tconst { metadata, settings, name } = block;\n\tregisterBlockType( { name, ...metadata }, settings );\n};\n\n/**\n * Function to get all the core blocks in an array.\n *\n * @example\n * ```js\n * import { __experimentalGetCoreBlocks } from '@wordpress/block-library';\n *\n * const coreBlocks = __experimentalGetCoreBlocks();\n * ```\n */\nexport const __experimentalGetCoreBlocks = () => [\n\t// Common blocks are grouped at the top to prioritize their display\n\t// in various contexts — like the inserter and auto-complete components.\n\tparagraph,\n\timage,\n\theading,\n\tgallery,\n\tlist,\n\tquote,\n\n\t// Register all remaining core blocks.\n\tarchives,\n\taudio,\n\tbutton,\n\tbuttons,\n\tcalendar,\n\tcategories,\n\twindow.wp && window.wp.oldEditor ? classic : null, // Only add the classic block in WP Context.\n\tcode,\n\tcolumn,\n\tcolumns,\n\tcover,\n\tembed,\n\tfile,\n\tgroup,\n\thtml,\n\tlatestComments,\n\tlatestPosts,\n\tmediaText,\n\tmissing,\n\tmore,\n\tnextpage,\n\tpageList,\n\tpattern,\n\tpreformatted,\n\tpullquote,\n\treusableBlock,\n\trss,\n\tsearch,\n\tseparator,\n\tshortcode,\n\tsocialLink,\n\tsocialLinks,\n\tspacer,\n\ttable,\n\t// tableOfContents,\n\ttagCloud,\n\ttextColumns,\n\tverse,\n\tvideo,\n\n\t// theme blocks\n\tnavigation,\n\tnavigationLink,\n\tnavigationSubmenu,\n\tsiteLogo,\n\tsiteTitle,\n\tsiteTagline,\n\tquery,\n\ttemplatePart,\n\tavatar,\n\tpostTitle,\n\tpostExcerpt,\n\tpostFeaturedImage,\n\tpostContent,\n\tpostAuthor,\n\tpostDate,\n\tpostTerms,\n\tpostNavigationLink,\n\tpostTemplate,\n\tqueryPagination,\n\tqueryPaginationNext,\n\tqueryPaginationNumbers,\n\tqueryPaginationPrevious,\n\tqueryNoResults,\n\treadMore,\n\tcommentAuthorName,\n\tcommentContent,\n\tcommentDate,\n\tcommentEditLink,\n\tcommentReplyLink,\n\tcommentTemplate,\n\tcommentsTitle,\n\tcommentsQueryLoop,\n\tcommentsPagination,\n\tcommentsPaginationNext,\n\tcommentsPaginationNumbers,\n\tcommentsPaginationPrevious,\n\n\tpostComments,\n\tpostCommentsForm,\n\thomeLink,\n\tlogInOut,\n\ttermDescription,\n\tqueryTitle,\n\tpostAuthorBiography,\n];\n\n/**\n * Function to register core blocks provided by the block editor.\n *\n * @param {Array} blocks An optional array of the core blocks being registered.\n *\n * @example\n * ```js\n * import { registerCoreBlocks } from '@wordpress/block-library';\n *\n * registerCoreBlocks();\n * ```\n */\nexport const registerCoreBlocks = (\n\tblocks = __experimentalGetCoreBlocks()\n) => {\n\tblocks.forEach( registerBlock );\n\n\tsetDefaultBlockName( paragraph.name );\n\tif ( window.wp && window.wp.oldEditor ) {\n\t\tsetFreeformContentHandlerName( classic.name );\n\t}\n\tsetUnregisteredTypeHandlerName( missing.name );\n\tsetGroupingBlockName( group.name );\n};\n\n/**\n * Function to register experimental core blocks depending on editor settings.\n *\n * @param {boolean} enableFSEBlocks Whether to enable the full site editing blocks.\n * @example\n * ```js\n * import { __experimentalRegisterExperimentalCoreBlocks } from '@wordpress/block-library';\n *\n * __experimentalRegisterExperimentalCoreBlocks( settings );\n * ```\n */\nexport const __experimentalRegisterExperimentalCoreBlocks = process.env\n\t.IS_GUTENBERG_PLUGIN\n\t? ( { enableFSEBlocks } = {} ) => {\n\t\t\t[\n\t\t\t\t// Experimental blocks.\n\t\t\t\tpostAuthorName,\n\t\t\t\t...( window.__experimentalEnableListBlockV2\n\t\t\t\t\t? [ listItem ]\n\t\t\t\t\t: [] ),\n\n\t\t\t\t// Full Site Editing blocks.\n\t\t\t\t...( enableFSEBlocks\n\t\t\t\t\t? [\n\t\t\t\t\t\t\tcommentAuthorAvatar,\n\t\t\t\t\t\t\tnavigationArea,\n\t\t\t\t\t\t\tpostComment,\n\t\t\t\t\t\t\tpostCommentsCount,\n\t\t\t\t\t\t\tpostCommentsLink,\n\t\t\t\t\t ]\n\t\t\t\t\t: [] ),\n\t\t\t].forEach( registerBlock );\n\t }\n\t: undefined;\n"]}
@@ -348,6 +348,8 @@ function Navigation(_ref) {
348
348
  }
349
349
  }
350
350
  }, [isSelected, isInnerBlockSelected, canUserUpdateNavigationMenu, hasResolvedCanUserUpdateNavigationMenu, canUserCreateNavigationMenu, hasResolvedCanUserCreateNavigationMenu, ref]);
351
+ const navigationSelectorRef = useRef();
352
+ const [shouldFocusNavigationSelector, setShouldFocusNavigationSelector] = useState(false);
351
353
  const handleSelectNavigation = useCallback(navPostOrClassicMenu => {
352
354
  if (!navPostOrClassicMenu) {
353
355
  return;
@@ -360,7 +362,20 @@ function Navigation(_ref) {
360
362
  } else {
361
363
  handleUpdateMenu(navPostOrClassicMenu.id);
362
364
  }
363
- }, [convert, handleUpdateMenu]);
365
+
366
+ setShouldFocusNavigationSelector(true);
367
+ }, [convert, handleUpdateMenu]); // Focus support after menu selection.
368
+
369
+ useEffect(() => {
370
+ var _navigationSelectorRe;
371
+
372
+ if (isDraftNavigationMenu || !isEntityAvailable || !shouldFocusNavigationSelector) {
373
+ return;
374
+ }
375
+
376
+ navigationSelectorRef === null || navigationSelectorRef === void 0 ? void 0 : (_navigationSelectorRe = navigationSelectorRef.current) === null || _navigationSelectorRe === void 0 ? void 0 : _navigationSelectorRe.focus();
377
+ setShouldFocusNavigationSelector(false);
378
+ }, [isDraftNavigationMenu, isEntityAvailable, shouldFocusNavigationSelector]);
364
379
  const resetToEmptyBlock = useCallback(() => {
365
380
  registry.batch(() => {
366
381
  if (navigationArea) {
@@ -448,6 +463,7 @@ function Navigation(_ref) {
448
463
  }, createElement(RecursionProvider, null, createElement(BlockControls, null, !isDraftNavigationMenu && isEntityAvailable && createElement(ToolbarGroup, {
449
464
  className: "wp-block-navigation__toolbar-menu-selector"
450
465
  }, createElement(NavigationMenuSelector, {
466
+ ref: navigationSelectorRef,
451
467
  currentMenuId: ref,
452
468
  clientId: clientId,
453
469
  onSelect: handleSelectNavigation,