@wordpress/editor 14.31.1-next.f56bd8138.0 → 14.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/components/collab-sidebar/add-comment.js +10 -4
  3. package/build/components/collab-sidebar/add-comment.js.map +1 -1
  4. package/build/components/collab-sidebar/comment-author-info.js +39 -11
  5. package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
  6. package/build/components/collab-sidebar/comment-form.js +23 -19
  7. package/build/components/collab-sidebar/comment-form.js.map +1 -1
  8. package/build/components/collab-sidebar/comment-indicator-toolbar.js +7 -4
  9. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  10. package/build/components/collab-sidebar/comments.js +220 -169
  11. package/build/components/collab-sidebar/comments.js.map +1 -1
  12. package/build/components/collab-sidebar/hooks.js +96 -0
  13. package/build/components/collab-sidebar/hooks.js.map +1 -0
  14. package/build/components/collab-sidebar/index.js +79 -169
  15. package/build/components/collab-sidebar/index.js.map +1 -1
  16. package/build/components/collab-sidebar/utils.js +72 -25
  17. package/build/components/collab-sidebar/utils.js.map +1 -1
  18. package/build/components/header/index.js +5 -1
  19. package/build/components/header/index.js.map +1 -1
  20. package/build/components/provider/use-block-editor-settings.js +1 -1
  21. package/build/components/provider/use-block-editor-settings.js.map +1 -1
  22. package/build/dataviews/store/private-actions.js +1 -1
  23. package/build/dataviews/store/private-actions.js.map +1 -1
  24. package/build/store/actions.js +63 -2
  25. package/build/store/actions.js.map +1 -1
  26. package/build-module/components/collab-sidebar/add-comment.js +11 -5
  27. package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
  28. package/build-module/components/collab-sidebar/comment-author-info.js +42 -14
  29. package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
  30. package/build-module/components/collab-sidebar/comment-form.js +26 -22
  31. package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
  32. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +8 -5
  33. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -1
  34. package/build-module/components/collab-sidebar/comments.js +223 -172
  35. package/build-module/components/collab-sidebar/comments.js.map +1 -1
  36. package/build-module/components/collab-sidebar/hooks.js +89 -0
  37. package/build-module/components/collab-sidebar/hooks.js.map +1 -0
  38. package/build-module/components/collab-sidebar/index.js +82 -172
  39. package/build-module/components/collab-sidebar/index.js.map +1 -1
  40. package/build-module/components/collab-sidebar/utils.js +70 -24
  41. package/build-module/components/collab-sidebar/utils.js.map +1 -1
  42. package/build-module/components/header/index.js +5 -1
  43. package/build-module/components/header/index.js.map +1 -1
  44. package/build-module/components/provider/use-block-editor-settings.js +1 -1
  45. package/build-module/components/provider/use-block-editor-settings.js.map +1 -1
  46. package/build-module/dataviews/store/private-actions.js +2 -2
  47. package/build-module/dataviews/store/private-actions.js.map +1 -1
  48. package/build-module/store/actions.js +63 -2
  49. package/build-module/store/actions.js.map +1 -1
  50. package/build-style/style-rtl.css +60 -19
  51. package/build-style/style.css +60 -19
  52. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  53. package/build-types/components/collab-sidebar/comment-author-info.d.ts +3 -1
  54. package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -1
  55. package/build-types/components/collab-sidebar/comment-form.d.ts +3 -5
  56. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  57. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -1
  58. package/build-types/components/collab-sidebar/comments.d.ts +1 -7
  59. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  60. package/build-types/components/collab-sidebar/hooks.d.ts +6 -0
  61. package/build-types/components/collab-sidebar/hooks.d.ts.map +1 -0
  62. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  63. package/build-types/components/collab-sidebar/utils.d.ts +11 -6
  64. package/build-types/components/collab-sidebar/utils.d.ts.map +1 -1
  65. package/build-types/components/header/index.d.ts.map +1 -1
  66. package/build-types/components/provider/use-block-editor-settings.d.ts.map +1 -1
  67. package/build-types/dataviews/store/private-actions.d.ts.map +1 -1
  68. package/build-types/store/actions.d.ts.map +1 -1
  69. package/package.json +37 -37
  70. package/src/components/collab-sidebar/add-comment.js +9 -4
  71. package/src/components/collab-sidebar/comment-author-info.js +51 -28
  72. package/src/components/collab-sidebar/comment-form.js +25 -24
  73. package/src/components/collab-sidebar/comment-indicator-toolbar.js +16 -5
  74. package/src/components/collab-sidebar/comments.js +271 -210
  75. package/src/components/collab-sidebar/hooks.js +95 -0
  76. package/src/components/collab-sidebar/index.js +107 -218
  77. package/src/components/collab-sidebar/style.scss +34 -20
  78. package/src/components/collab-sidebar/utils.js +73 -30
  79. package/src/components/header/index.js +6 -3
  80. package/src/components/provider/use-block-editor-settings.js +1 -0
  81. package/src/dataviews/store/private-actions.ts +6 -0
  82. package/src/store/actions.js +93 -2
  83. package/tsconfig.tsbuildinfo +1 -1
@@ -7,8 +7,8 @@ import TextareaAutosize from 'react-autosize-textarea';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useState } from '@wordpress/element';
10
- import { __experimentalHStack as HStack, Button, VisuallyHidden } from '@wordpress/components';
11
- import { _x, __ } from '@wordpress/i18n';
10
+ import { __experimentalVStack as VStack, __experimentalHStack as HStack, __experimentalTruncate as Truncate, Button, VisuallyHidden } from '@wordpress/components';
11
+ import { __ } from '@wordpress/i18n';
12
12
  import { useInstanceId } from '@wordpress/compose';
13
13
 
14
14
  /**
@@ -24,53 +24,57 @@ import { sanitizeCommentString } from './utils';
24
24
  * @param {Function} props.onCancel - The function to call when canceling the comment update.
25
25
  * @param {Object} props.thread - The comment thread object.
26
26
  * @param {string} props.submitButtonText - The text to display on the submit button.
27
- * @param {string?} props.placeholderText - The placeholder text for the comment input.
28
- * @param {number?} props.rows - The number of rows for the comment input.
27
+ * @param {string?} props.labelText - The label text for the comment input.
29
28
  * @return {React.ReactNode} The CommentForm component.
30
29
  */
31
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
30
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
32
31
  function CommentForm({
33
32
  onSubmit,
34
33
  onCancel,
35
34
  thread,
36
35
  submitButtonText,
37
- placeholderText,
38
- rows = 4
36
+ labelText
39
37
  }) {
40
38
  var _thread$content$raw;
41
39
  const [inputComment, setInputComment] = useState((_thread$content$raw = thread?.content?.raw) !== null && _thread$content$raw !== void 0 ? _thread$content$raw : '');
42
40
  const inputId = useInstanceId(CommentForm, 'comment-input');
43
- return /*#__PURE__*/_jsxs(_Fragment, {
41
+ const isDisabled = inputComment === thread?.content?.raw || !sanitizeCommentString(inputComment).length;
42
+ return /*#__PURE__*/_jsxs(VStack, {
43
+ className: "editor-collab-sidebar-panel__comment-form",
44
+ spacing: "4",
44
45
  children: [/*#__PURE__*/_jsx(VisuallyHidden, {
45
46
  as: "label",
46
47
  htmlFor: inputId,
47
- children: __('Comment')
48
+ children: labelText !== null && labelText !== void 0 ? labelText : __('Comment')
48
49
  }), /*#__PURE__*/_jsx(TextareaAutosize, {
49
50
  id: inputId,
50
51
  value: inputComment !== null && inputComment !== void 0 ? inputComment : '',
51
52
  onChange: comment => setInputComment(comment.target.value),
52
- rows: rows,
53
- maxRows: 20,
54
- placeholder: placeholderText || ''
53
+ rows: 1,
54
+ maxRows: 20
55
55
  }), /*#__PURE__*/_jsxs(HStack, {
56
- spacing: "3",
57
- justify: "flex-start",
56
+ spacing: "2",
57
+ justify: "flex-end",
58
58
  wrap: true,
59
59
  children: [/*#__PURE__*/_jsx(Button, {
60
- __next40pxDefaultSize: true,
60
+ size: "compact",
61
+ variant: "tertiary",
62
+ onClick: onCancel,
63
+ children: /*#__PURE__*/_jsx(Truncate, {
64
+ children: __('Cancel')
65
+ })
66
+ }), /*#__PURE__*/_jsx(Button, {
67
+ size: "compact",
61
68
  accessibleWhenDisabled: true,
62
69
  variant: "primary",
63
70
  onClick: () => {
64
71
  onSubmit(inputComment);
65
72
  setInputComment('');
66
73
  },
67
- disabled: 0 === sanitizeCommentString(inputComment).length,
68
- text: submitButtonText
69
- }), /*#__PURE__*/_jsx(Button, {
70
- __next40pxDefaultSize: true,
71
- variant: "tertiary",
72
- onClick: onCancel,
73
- text: _x('Cancel', 'Cancel comment button')
74
+ disabled: isDisabled,
75
+ children: /*#__PURE__*/_jsx(Truncate, {
76
+ children: submitButtonText
77
+ })
74
78
  })]
75
79
  })]
76
80
  });
@@ -1 +1 @@
1
- {"version":3,"names":["TextareaAutosize","useState","__experimentalHStack","HStack","Button","VisuallyHidden","_x","__","useInstanceId","sanitizeCommentString","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","CommentForm","onSubmit","onCancel","thread","submitButtonText","placeholderText","rows","_thread$content$raw","inputComment","setInputComment","content","raw","inputId","children","as","htmlFor","id","value","onChange","comment","target","maxRows","placeholder","spacing","justify","wrap","__next40pxDefaultSize","accessibleWhenDisabled","variant","onClick","disabled","length","text"],"sources":["@wordpress/editor/src/components/collab-sidebar/comment-form.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\tButton,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { _x, __ } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { sanitizeCommentString } from './utils';\n\n/**\n * EditComment component.\n *\n * @param {Object} props - The component props.\n * @param {Function} props.onSubmit - The function to call when updating the comment.\n * @param {Function} props.onCancel - The function to call when canceling the comment update.\n * @param {Object} props.thread - The comment thread object.\n * @param {string} props.submitButtonText - The text to display on the submit button.\n * @param {string?} props.placeholderText - The placeholder text for the comment input.\n * @param {number?} props.rows - The number of rows for the comment input.\n * @return {React.ReactNode} The CommentForm component.\n */\nfunction CommentForm( {\n\tonSubmit,\n\tonCancel,\n\tthread,\n\tsubmitButtonText,\n\tplaceholderText,\n\trows = 4,\n} ) {\n\tconst [ inputComment, setInputComment ] = useState(\n\t\tthread?.content?.raw ?? ''\n\t);\n\n\tconst inputId = useInstanceId( CommentForm, 'comment-input' );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden as=\"label\" htmlFor={ inputId }>\n\t\t\t\t{ __( 'Comment' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<TextareaAutosize\n\t\t\t\tid={ inputId }\n\t\t\t\tvalue={ inputComment ?? '' }\n\t\t\t\tonChange={ ( comment ) =>\n\t\t\t\t\tsetInputComment( comment.target.value )\n\t\t\t\t}\n\t\t\t\trows={ rows }\n\t\t\t\tmaxRows={ 20 }\n\t\t\t\tplaceholder={ placeholderText || '' }\n\t\t\t></TextareaAutosize>\n\t\t\t<HStack spacing=\"3\" justify=\"flex-start\" wrap>\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonSubmit( inputComment );\n\t\t\t\t\t\tsetInputComment( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={\n\t\t\t\t\t\t0 === sanitizeCommentString( inputComment ).length\n\t\t\t\t\t}\n\t\t\t\t\ttext={ submitButtonText }\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ onCancel }\n\t\t\t\t\ttext={ _x( 'Cancel', 'Cancel comment button' ) }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</>\n\t);\n}\n\nexport default CommentForm;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,yBAAyB;;AAEtD;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACCC,oBAAoB,IAAIC,MAAM,EAC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C,OAAO,EAAC,YAAY;MAACC,IAAI;MAAAZ,QAAA,gBAC5ClB,IAAA,CAACP,MAAM;QACNsC,qBAAqB;QACrBC,sBAAsB;QACtBC,OAAO,EAAC,SAAS;QACjBC,OAAO,EAAGA,CAAA,KAAM;UACf5B,QAAQ,CAAEO,YAAa,CAAC;UACxBC,eAAe,CAAE,EAAG,CAAC;QACtB,CAAG;QACHqB,QAAQ,EACP,CAAC,KAAKrC,qBAAqB,CAAEe,YAAa,CAAC,CAACuB,MAC5C;QACDC,IAAI,EAAG5B;MAAkB,CACzB,CAAC,eACFT,IAAA,CAACP,MAAM;QACNsC,qBAAqB;QACrBE,OAAO,EAAC,UAAU;QAClBC,OAAO,EAAG3B,QAAU;QACpB8B,IAAI,EAAG1C,EAAE,CAAE,QAAQ,EAAE,uBAAwB;MAAG,CAChD,CAAC;IAAA,CACK,CAAC;EAAA,CACR,CAAC;AAEL;AAEA,eAAeU,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["TextareaAutosize","useState","__experimentalVStack","VStack","__experimentalHStack","HStack","__experimentalTruncate","Truncate","Button","VisuallyHidden","__","useInstanceId","sanitizeCommentString","jsx","_jsx","jsxs","_jsxs","CommentForm","onSubmit","onCancel","thread","submitButtonText","labelText","_thread$content$raw","inputComment","setInputComment","content","raw","inputId","isDisabled","length","className","spacing","children","as","htmlFor","id","value","onChange","comment","target","rows","maxRows","justify","wrap","size","variant","onClick","accessibleWhenDisabled","disabled"],"sources":["@wordpress/editor/src/components/collab-sidebar/comment-form.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n\tButton,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { sanitizeCommentString } from './utils';\n\n/**\n * EditComment component.\n *\n * @param {Object} props - The component props.\n * @param {Function} props.onSubmit - The function to call when updating the comment.\n * @param {Function} props.onCancel - The function to call when canceling the comment update.\n * @param {Object} props.thread - The comment thread object.\n * @param {string} props.submitButtonText - The text to display on the submit button.\n * @param {string?} props.labelText - The label text for the comment input.\n * @return {React.ReactNode} The CommentForm component.\n */\nfunction CommentForm( {\n\tonSubmit,\n\tonCancel,\n\tthread,\n\tsubmitButtonText,\n\tlabelText,\n} ) {\n\tconst [ inputComment, setInputComment ] = useState(\n\t\tthread?.content?.raw ?? ''\n\t);\n\n\tconst inputId = useInstanceId( CommentForm, 'comment-input' );\n\tconst isDisabled =\n\t\tinputComment === thread?.content?.raw ||\n\t\t! sanitizeCommentString( inputComment ).length;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"editor-collab-sidebar-panel__comment-form\"\n\t\t\tspacing=\"4\"\n\t\t>\n\t\t\t<VisuallyHidden as=\"label\" htmlFor={ inputId }>\n\t\t\t\t{ labelText ?? __( 'Comment' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<TextareaAutosize\n\t\t\t\tid={ inputId }\n\t\t\t\tvalue={ inputComment ?? '' }\n\t\t\t\tonChange={ ( comment ) =>\n\t\t\t\t\tsetInputComment( comment.target.value )\n\t\t\t\t}\n\t\t\t\trows={ 1 }\n\t\t\t\tmaxRows={ 20 }\n\t\t\t/>\n\t\t\t<HStack spacing=\"2\" justify=\"flex-end\" wrap>\n\t\t\t\t<Button size=\"compact\" variant=\"tertiary\" onClick={ onCancel }>\n\t\t\t\t\t<Truncate>{ __( 'Cancel' ) }</Truncate>\n\t\t\t\t</Button>\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonSubmit( inputComment );\n\t\t\t\t\t\tsetInputComment( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t>\n\t\t\t\t\t<Truncate>{ submitButtonText }</Truncate>\n\t\t\t\t</Button>\n\t\t\t</HStack>\n\t\t</VStack>\n\t);\n}\n\nexport default CommentForm;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,yBAAyB;;AAEtD;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SACCC,oBAAoB,IAAIC,MAAM,EAC9BC,oBAAoB,IAAIC,MAAM,EAC9BC,sBAAsB,IAAIC,QAAQ,EAClCC,MAAM,EACNC,cAAc,QACR,uBAAuB;AAC9B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,SAAS;;AAE/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAWA,SAASC,WAAWA,CAAE;EACrBC,QAAQ;EACRC,QAAQ;EACRC,MAAM;EACNC,gBAAgB;EAChBC;AACD,CAAC,EAAG;EAAA,IAAAC,mBAAA;EACH,MAAM,CAAEC,YAAY,EAAEC,eAAe,CAAE,GAAGxB,QAAQ,EAAAsB,mBAAA,GACjDH,MAAM,EAAEM,OAAO,EAAEC,GAAG,cAAAJ,mBAAA,cAAAA,mBAAA,GAAI,EACzB,CAAC;EAED,MAAMK,OAAO,GAAGjB,aAAa,CAAEM,WAAW,EAAE,eAAgB,CAAC;EAC7D,MAAMY,UAAU,GACfL,YAAY,KAAKJ,MAAM,EAAEM,OAAO,EAAEC,GAAG,IACrC,CAAEf,qBAAqB,CAAEY,YAAa,CAAC,CAACM,MAAM;EAE/C,oBACCd,KAAA,CAACb,MAAM;IACN4B,SAAS,EAAC,2CAA2C;IACrDC,OAAO,EAAC,GAAG;IAAAC,QAAA,gBAEXnB,IAAA,CAACL,cAAc;MAACyB,EAAE,EAAC,OAAO;MAACC,OAAO,EAAGP,OAAS;MAAAK,QAAA,EAC3CX,SAAS,aAATA,SAAS,cAATA,SAAS,GAAIZ,EAAE,CAAE,SAAU;IAAC,CACf,CAAC,eACjBI,IAAA,CAACd,gBAAgB;MAChBoC,EAAE,EAAGR,OAAS;MACdS,KAAK,EAAGb,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAI,EAAI;MAC5Bc,QAAQ,EAAKC,OAAO,IACnBd,eAAe,CAAEc,OAAO,CAACC,MAAM,CAACH,KAAM,CACtC;MACDI,IAAI,EAAG,CAAG;MACVC,OAAO,EAAG;IAAI,CACd,CAAC,eACF1B,KAAA,CAACX,MAAM;MAAC2B,OAAO,EAAC,GAAG;MAACW,OAAO,EAAC,UAAU;MAACC,IAAI;MAAAX,QAAA,gBAC1CnB,IAAA,CAACN,MAAM;QAACqC,IAAI,EAAC,SAAS;QAACC,OAAO,EAAC,UAAU;QAACC,OAAO,EAAG5B,QAAU;QAAAc,QAAA,eAC7DnB,IAAA,CAACP,QAAQ;UAAA0B,QAAA,EAAGvB,EAAE,CAAE,QAAS;QAAC,CAAY;MAAC,CAChC,CAAC,eACTI,IAAA,CAACN,MAAM;QACNqC,IAAI,EAAC,SAAS;QACdG,sBAAsB;QACtBF,OAAO,EAAC,SAAS;QACjBC,OAAO,EAAGA,CAAA,KAAM;UACf7B,QAAQ,CAAEM,YAAa,CAAC;UACxBC,eAAe,CAAE,EAAG,CAAC;QACtB,CAAG;QACHwB,QAAQ,EAAGpB,UAAY;QAAAI,QAAA,eAEvBnB,IAAA,CAACP,QAAQ;UAAA0B,QAAA,EAAGZ;QAAgB,CAAY;MAAC,CAClC,CAAC;IAAA,CACF,CAAC;EAAA,CACF,CAAC;AAEX;AAEA,eAAeJ,WAAW","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { ToolbarButton } from '@wordpress/components';
5
- import { _x, __, sprintf } from '@wordpress/i18n';
5
+ import { _x, __, _n, sprintf } from '@wordpress/i18n';
6
6
  import { useMemo } from '@wordpress/element';
7
7
  import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';
8
8
 
@@ -15,6 +15,7 @@ import clsx from 'clsx';
15
15
  * Internal dependencies
16
16
  */
17
17
  import { unlock } from '../../lock-unlock';
18
+ import { getAvatarBorderColor } from './utils';
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
20
  const {
20
21
  CommentIconToolbarSlotFill
@@ -41,6 +42,7 @@ const CommentAvatarIndicator = ({
41
42
  participantsMap.set(authorKey, {
42
43
  name: comment.author_name,
43
44
  avatar: comment.author_avatar_urls?.['48'] || comment.author_avatar_urls?.['96'],
45
+ id: comment.author,
44
46
  isOriginalCommenter: comment.id === thread.id,
45
47
  date: comment.date
46
48
  });
@@ -66,11 +68,11 @@ const CommentAvatarIndicator = ({
66
68
 
67
69
  // If we hit the comment limit, show "100+" instead of exact overflow count.
68
70
  const overflowText = threadHasMoreParticipants && overflowCount > 0 ? __('100+') : sprintf(
69
- // translators: %s: Number of comments.
71
+ // translators: %s: Number of participants.
70
72
  __('+%s'), overflowCount);
71
73
  const overflowTitle = threadHasMoreParticipants && overflowCount > 0 ? __('100+ participants') : sprintf(
72
- // translators: %s: Number of comments.
73
- __('+%s more participants'), overflowCount);
74
+ // translators: %s: Number of participants.
75
+ _n('+%s more participant', '+%s more participants', overflowCount), overflowCount);
74
76
  return /*#__PURE__*/_jsx(CommentIconToolbarSlotFill.Fill, {
75
77
  children: /*#__PURE__*/_jsx(ToolbarButton, {
76
78
  className: clsx('comment-avatar-indicator', {
@@ -86,7 +88,8 @@ const CommentAvatarIndicator = ({
86
88
  alt: participant.name,
87
89
  className: "comment-avatar",
88
90
  style: {
89
- zIndex: maxAvatars - index
91
+ zIndex: maxAvatars - index,
92
+ borderColor: getAvatarBorderColor(participant.id)
90
93
  }
91
94
  }, participant.name + index)), overflowCount > 0 && /*#__PURE__*/_jsx("div", {
92
95
  className: "comment-avatar-overflow",
@@ -1 +1 @@
1
- {"version":3,"names":["ToolbarButton","_x","__","sprintf","useMemo","privateApis","blockEditorPrivateApis","clsx","unlock","jsx","_jsx","jsxs","_jsxs","CommentIconToolbarSlotFill","CommentAvatarIndicator","onClick","thread","hasMoreComments","threadParticipants","participantsMap","Map","allComments","reply","sort","a","b","Date","date","forEach","comment","author_name","author_avatar_urls","authorKey","author","has","set","name","avatar","isOriginalCommenter","id","Array","from","values","hasUnresolved","status","threadHasMoreParticipants","length","maxAvatars","visibleParticipants","slice","overflowCount","Math","max","overflowText","overflowTitle","Fill","children","className","label","showTooltip","map","participant","index","src","alt","style","zIndex","title"],"sources":["@wordpress/editor/src/components/collab-sidebar/comment-indicator-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { _x, __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { CommentIconToolbarSlotFill } = unlock( blockEditorPrivateApis );\n\nconst CommentAvatarIndicator = ( { onClick, thread, hasMoreComments } ) => {\n\tconst threadParticipants = useMemo( () => {\n\t\tif ( ! thread ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst participantsMap = new Map();\n\t\tconst allComments = [ thread, ...thread.reply ];\n\n\t\t// Sort by date to show participants in chronological order.\n\t\tallComments.sort( ( a, b ) => new Date( a.date ) - new Date( b.date ) );\n\n\t\tallComments.forEach( ( comment ) => {\n\t\t\t// Track thread participants (original commenter + repliers).\n\t\t\tif ( comment.author_name && comment.author_avatar_urls ) {\n\t\t\t\tconst authorKey = `${ comment.author }-${ comment.author_name }`;\n\t\t\t\tif ( ! participantsMap.has( authorKey ) ) {\n\t\t\t\t\tparticipantsMap.set( authorKey, {\n\t\t\t\t\t\tname: comment.author_name,\n\t\t\t\t\t\tavatar:\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '48' ] ||\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '96' ],\n\t\t\t\t\t\tisOriginalCommenter: comment.id === thread.id,\n\t\t\t\t\t\tdate: comment.date,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn Array.from( participantsMap.values() );\n\t}, [ thread ] );\n\n\tconst hasUnresolved = thread?.status !== 'approved';\n\n\t// Check if this specific thread has more participants due to pagination.\n\t// If we have pagination AND this thread + its replies equals or exceeds the API limit,\n\t// then this thread likely has more participants that weren't loaded.\n\tconst threadHasMoreParticipants =\n\t\thasMoreComments && thread?.reply && 1 + thread.reply.length >= 100;\n\n\tif ( ! threadParticipants.length ) {\n\t\treturn null;\n\t}\n\n\t// Show up to 3 avatars, with overflow indicator.\n\tconst maxAvatars = 3;\n\tconst visibleParticipants = threadParticipants.slice( 0, maxAvatars );\n\tconst overflowCount = Math.max( 0, threadParticipants.length - maxAvatars );\n\n\t// If we hit the comment limit, show \"100+\" instead of exact overflow count.\n\tconst overflowText =\n\t\tthreadHasMoreParticipants && overflowCount > 0\n\t\t\t? __( '100+' )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: Number of comments.\n\t\t\t\t\t__( '+%s' ),\n\t\t\t\t\toverflowCount\n\t\t\t );\n\n\tconst overflowTitle =\n\t\tthreadHasMoreParticipants && overflowCount > 0\n\t\t\t? __( '100+ participants' )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: Number of comments.\n\t\t\t\t\t__( '+%s more participants' ),\n\t\t\t\t\toverflowCount\n\t\t\t );\n\n\treturn (\n\t\t<CommentIconToolbarSlotFill.Fill>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName={ clsx( 'comment-avatar-indicator', {\n\t\t\t\t\t'has-unresolved': hasUnresolved,\n\t\t\t\t} ) }\n\t\t\t\tlabel={ _x( 'View comments', 'View comment thread' ) }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tshowTooltip\n\t\t\t>\n\t\t\t\t<div className=\"comment-avatar-stack\">\n\t\t\t\t\t{ visibleParticipants.map( ( participant, index ) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tkey={ participant.name + index }\n\t\t\t\t\t\t\tsrc={ participant.avatar }\n\t\t\t\t\t\t\talt={ participant.name }\n\t\t\t\t\t\t\tclassName=\"comment-avatar\"\n\t\t\t\t\t\t\tstyle={ { zIndex: maxAvatars - index } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t\t{ overflowCount > 0 && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"comment-avatar-overflow\"\n\t\t\t\t\t\t\tstyle={ { zIndex: 0 } }\n\t\t\t\t\t\t\ttitle={ overflowTitle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ overflowText }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</ToolbarButton>\n\t\t</CommentIconToolbarSlotFill.Fill>\n\t);\n};\n\nexport default CommentAvatarIndicator;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACjD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE3C,MAAM;EAAEC;AAA2B,CAAC,GAAGL,MAAM,CAAEF,sBAAuB,CAAC;AAEvE,MAAMQ,sBAAsB,GAAGA,CAAE;EAAEC,OAAO;EAAEC,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GAAG,EAAGH,WAAW,CAACzB,IAAM;UACxBqB,SAAS,EAAC,gBAAgB;UAC1BQ,KAAK,EAAG;YAAEC,MAAM,EAAEnB,UAAU,GAAGe;UAAM;QAAG,GAJlCD,WAAW,CAACzB,IAAI,GAAG0B,KAKzB,CACA,CAAC,EACDZ,aAAa,GAAG,CAAC,iBAClBxC,IAAA;UACC+C,SAAS,EAAC,yBAAyB;UACnCQ,KAAK,EAAG;YAAEC,MAAM,EAAE;UAAE,CAAG;UACvBC,KAAK,EAAGb,aAAe;UAAAE,QAAA,EAErBH;QAAY,CACV,CACL;MAAA,CACG;IAAC,CACQ;EAAC,CACgB,CAAC;AAEpC,CAAC;AAED,eAAevC,sBAAsB","ignoreList":[]}
1
+ {"version":3,"names":["ToolbarButton","_x","__","_n","sprintf","useMemo","privateApis","blockEditorPrivateApis","clsx","unlock","getAvatarBorderColor","jsx","_jsx","jsxs","_jsxs","CommentIconToolbarSlotFill","CommentAvatarIndicator","onClick","thread","hasMoreComments","threadParticipants","participantsMap","Map","allComments","reply","sort","a","b","Date","date","forEach","comment","author_name","author_avatar_urls","authorKey","author","has","set","name","avatar","id","isOriginalCommenter","Array","from","values","hasUnresolved","status","threadHasMoreParticipants","length","maxAvatars","visibleParticipants","slice","overflowCount","Math","max","overflowText","overflowTitle","Fill","children","className","label","showTooltip","map","participant","index","src","alt","style","zIndex","borderColor","title"],"sources":["@wordpress/editor/src/components/collab-sidebar/comment-indicator-toolbar.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { _x, __, _n, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { getAvatarBorderColor } from './utils';\n\nconst { CommentIconToolbarSlotFill } = unlock( blockEditorPrivateApis );\n\nconst CommentAvatarIndicator = ( { onClick, thread, hasMoreComments } ) => {\n\tconst threadParticipants = useMemo( () => {\n\t\tif ( ! thread ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst participantsMap = new Map();\n\t\tconst allComments = [ thread, ...thread.reply ];\n\n\t\t// Sort by date to show participants in chronological order.\n\t\tallComments.sort( ( a, b ) => new Date( a.date ) - new Date( b.date ) );\n\n\t\tallComments.forEach( ( comment ) => {\n\t\t\t// Track thread participants (original commenter + repliers).\n\t\t\tif ( comment.author_name && comment.author_avatar_urls ) {\n\t\t\t\tconst authorKey = `${ comment.author }-${ comment.author_name }`;\n\t\t\t\tif ( ! participantsMap.has( authorKey ) ) {\n\t\t\t\t\tparticipantsMap.set( authorKey, {\n\t\t\t\t\t\tname: comment.author_name,\n\t\t\t\t\t\tavatar:\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '48' ] ||\n\t\t\t\t\t\t\tcomment.author_avatar_urls?.[ '96' ],\n\t\t\t\t\t\tid: comment.author,\n\t\t\t\t\t\tisOriginalCommenter: comment.id === thread.id,\n\t\t\t\t\t\tdate: comment.date,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn Array.from( participantsMap.values() );\n\t}, [ thread ] );\n\n\tconst hasUnresolved = thread?.status !== 'approved';\n\n\t// Check if this specific thread has more participants due to pagination.\n\t// If we have pagination AND this thread + its replies equals or exceeds the API limit,\n\t// then this thread likely has more participants that weren't loaded.\n\tconst threadHasMoreParticipants =\n\t\thasMoreComments && thread?.reply && 1 + thread.reply.length >= 100;\n\n\tif ( ! threadParticipants.length ) {\n\t\treturn null;\n\t}\n\n\t// Show up to 3 avatars, with overflow indicator.\n\tconst maxAvatars = 3;\n\tconst visibleParticipants = threadParticipants.slice( 0, maxAvatars );\n\tconst overflowCount = Math.max( 0, threadParticipants.length - maxAvatars );\n\n\t// If we hit the comment limit, show \"100+\" instead of exact overflow count.\n\tconst overflowText =\n\t\tthreadHasMoreParticipants && overflowCount > 0\n\t\t\t? __( '100+' )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: Number of participants.\n\t\t\t\t\t__( '+%s' ),\n\t\t\t\t\toverflowCount\n\t\t\t );\n\n\tconst overflowTitle =\n\t\tthreadHasMoreParticipants && overflowCount > 0\n\t\t\t? __( '100+ participants' )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: Number of participants.\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'+%s more participant',\n\t\t\t\t\t\t'+%s more participants',\n\t\t\t\t\t\toverflowCount\n\t\t\t\t\t),\n\t\t\t\t\toverflowCount\n\t\t\t );\n\n\treturn (\n\t\t<CommentIconToolbarSlotFill.Fill>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName={ clsx( 'comment-avatar-indicator', {\n\t\t\t\t\t'has-unresolved': hasUnresolved,\n\t\t\t\t} ) }\n\t\t\t\tlabel={ _x( 'View comments', 'View comment thread' ) }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tshowTooltip\n\t\t\t>\n\t\t\t\t<div className=\"comment-avatar-stack\">\n\t\t\t\t\t{ visibleParticipants.map( ( participant, index ) => (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tkey={ participant.name + index }\n\t\t\t\t\t\t\tsrc={ participant.avatar }\n\t\t\t\t\t\t\talt={ participant.name }\n\t\t\t\t\t\t\tclassName=\"comment-avatar\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tzIndex: maxAvatars - index,\n\t\t\t\t\t\t\t\tborderColor: getAvatarBorderColor(\n\t\t\t\t\t\t\t\t\tparticipant.id\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{ overflowCount > 0 && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"comment-avatar-overflow\"\n\t\t\t\t\t\t\tstyle={ { zIndex: 0 } }\n\t\t\t\t\t\t\ttitle={ overflowTitle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ overflowText }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</ToolbarButton>\n\t\t</CommentIconToolbarSlotFill.Fill>\n\t);\n};\n\nexport default CommentAvatarIndicator;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,uBAAuB;AACrD,SAASC,EAAE,EAAEC,EAAE,EAAEC,EAAE,EAAEC,OAAO,QAAQ,iBAAiB;AACrD,SAASC,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,WAAW,IAAIC,sBAAsB,QAAQ,yBAAyB;;AAE/E;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,oBAAoB,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAM;EAAEC;AAA2B,CAAC,GAAGN,MAAM,CAAEF,sBAAuB,CAAC;AAEvE,MAAMS,sBAAsB,GAAGA,CAAE;EAAEC,OAAO;EAAEC,MAAM;EAAEC;AAAgB,CAAC,KAAM;EAC1E,MAAMC,kBAAkB,GAAGf,OAAO,CAAE,MAAM;IACzC,IAAK,CAAEa,MAAM,EAAG;MACf,OAAO,EAAE;IACV;IAEA,MAAMG,eAAe,GAAG,IAAIC,GAAG,CAAC,CAAC;IACjC,MAAMC,WAAW,GAAG,CAAEL,MAAM,EAAE,GAAGA,MAAM,CAACM,KAAK,CAAE;;IAE/C;IACAD,WAAW,CAACE,IAAI,CAAE,CAAEC,CAAC,EAAEC,CAAC,KAAM,IAAIC,IAAI,CAAEF,CAAC,CAACG,IAAK,CAAC,GAAG,IAAID,IAAI,CAAED,CAAC,CAACE,IAAK,CAAE,CAAC;IAEvEN,WAAW,CAACO,OAAO,CAAIC,OAAO,IAAM;MACnC;MACA,IAAKA,OA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