@wordpress/editor 14.30.1-next.836ecdcae.0 → 14.31.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 (95) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/bindings/api.js +2 -0
  3. package/build/bindings/api.js.map +1 -1
  4. package/build/bindings/term-data.js +171 -0
  5. package/build/bindings/term-data.js.map +1 -0
  6. package/build/components/collab-sidebar/add-comment.js +6 -3
  7. package/build/components/collab-sidebar/add-comment.js.map +1 -1
  8. package/build/components/collab-sidebar/comment-author-info.js +3 -3
  9. package/build/components/collab-sidebar/comment-author-info.js.map +1 -1
  10. package/build/components/collab-sidebar/comment-form.js +24 -8
  11. package/build/components/collab-sidebar/comment-form.js.map +1 -1
  12. package/build/components/collab-sidebar/comment-indicator-toolbar.js +112 -0
  13. package/build/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -0
  14. package/build/components/collab-sidebar/comments.js +47 -58
  15. package/build/components/collab-sidebar/comments.js.map +1 -1
  16. package/build/components/collab-sidebar/index.js +120 -96
  17. package/build/components/collab-sidebar/index.js.map +1 -1
  18. package/build/components/post-excerpt/panel.js +5 -2
  19. package/build/components/post-excerpt/panel.js.map +1 -1
  20. package/build/components/post-taxonomies/hierarchical-term-selector.js +21 -9
  21. package/build/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  22. package/build/components/post-template/hooks.js +20 -5
  23. package/build/components/post-template/hooks.js.map +1 -1
  24. package/build/components/provider/index.js +1 -1
  25. package/build/components/provider/index.js.map +1 -1
  26. package/build/dataviews/store/private-actions.js +1 -1
  27. package/build/dataviews/store/private-actions.js.map +1 -1
  28. package/build-module/bindings/api.js +2 -0
  29. package/build-module/bindings/api.js.map +1 -1
  30. package/build-module/bindings/term-data.js +165 -0
  31. package/build-module/bindings/term-data.js.map +1 -0
  32. package/build-module/components/collab-sidebar/add-comment.js +6 -3
  33. package/build-module/components/collab-sidebar/add-comment.js.map +1 -1
  34. package/build-module/components/collab-sidebar/comment-author-info.js +4 -4
  35. package/build-module/components/collab-sidebar/comment-author-info.js.map +1 -1
  36. package/build-module/components/collab-sidebar/comment-form.js +24 -9
  37. package/build-module/components/collab-sidebar/comment-form.js.map +1 -1
  38. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js +104 -0
  39. package/build-module/components/collab-sidebar/comment-indicator-toolbar.js.map +1 -0
  40. package/build-module/components/collab-sidebar/comments.js +50 -61
  41. package/build-module/components/collab-sidebar/comments.js.map +1 -1
  42. package/build-module/components/collab-sidebar/index.js +121 -97
  43. package/build-module/components/collab-sidebar/index.js.map +1 -1
  44. package/build-module/components/post-excerpt/panel.js +5 -2
  45. package/build-module/components/post-excerpt/panel.js.map +1 -1
  46. package/build-module/components/post-taxonomies/hierarchical-term-selector.js +21 -11
  47. package/build-module/components/post-taxonomies/hierarchical-term-selector.js.map +1 -1
  48. package/build-module/components/post-template/hooks.js +20 -5
  49. package/build-module/components/post-template/hooks.js.map +1 -1
  50. package/build-module/components/provider/index.js +1 -1
  51. package/build-module/components/provider/index.js.map +1 -1
  52. package/build-module/dataviews/store/private-actions.js +1 -1
  53. package/build-module/dataviews/store/private-actions.js.map +1 -1
  54. package/build-style/style-rtl.css +71 -15
  55. package/build-style/style.css +71 -15
  56. package/build-types/bindings/api.d.ts.map +1 -1
  57. package/build-types/bindings/term-data.d.ts +25 -0
  58. package/build-types/bindings/term-data.d.ts.map +1 -0
  59. package/build-types/components/collab-sidebar/add-comment.d.ts.map +1 -1
  60. package/build-types/components/collab-sidebar/comment-author-info.d.ts.map +1 -1
  61. package/build-types/components/collab-sidebar/comment-form.d.ts +5 -1
  62. package/build-types/components/collab-sidebar/comment-form.d.ts.map +1 -1
  63. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts +7 -0
  64. package/build-types/components/collab-sidebar/comment-indicator-toolbar.d.ts.map +1 -0
  65. package/build-types/components/collab-sidebar/comments.d.ts +3 -1
  66. package/build-types/components/collab-sidebar/comments.d.ts.map +1 -1
  67. package/build-types/components/collab-sidebar/index.d.ts.map +1 -1
  68. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts +10 -1
  69. package/build-types/components/post-taxonomies/hierarchical-term-selector.d.ts.map +1 -1
  70. package/build-types/components/post-template/hooks.d.ts +1 -1
  71. package/build-types/components/post-template/hooks.d.ts.map +1 -1
  72. package/build-types/components/provider/index.d.ts.map +1 -1
  73. package/package.json +37 -37
  74. package/src/bindings/api.js +2 -0
  75. package/src/bindings/term-data.js +159 -0
  76. package/src/components/collab-sidebar/add-comment.js +20 -9
  77. package/src/components/collab-sidebar/comment-author-info.js +14 -4
  78. package/src/components/collab-sidebar/comment-form.js +32 -10
  79. package/src/components/collab-sidebar/comment-indicator-toolbar.js +124 -0
  80. package/src/components/collab-sidebar/comments.js +104 -106
  81. package/src/components/collab-sidebar/index.js +157 -122
  82. package/src/components/collab-sidebar/style.scss +82 -17
  83. package/src/components/post-excerpt/panel.js +6 -1
  84. package/src/components/post-taxonomies/hierarchical-term-selector.js +25 -8
  85. package/src/components/post-template/hooks.js +23 -7
  86. package/src/components/provider/index.js +4 -1
  87. package/src/dataviews/store/private-actions.ts +1 -1
  88. package/tsconfig.tsbuildinfo +1 -1
  89. package/build/components/collab-sidebar/comment-button-toolbar.js +0 -37
  90. package/build/components/collab-sidebar/comment-button-toolbar.js.map +0 -1
  91. package/build-module/components/collab-sidebar/comment-button-toolbar.js +0 -30
  92. package/build-module/components/collab-sidebar/comment-button-toolbar.js.map +0 -1
  93. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts +0 -5
  94. package/build-types/components/collab-sidebar/comment-button-toolbar.d.ts.map +0 -1
  95. package/src/components/collab-sidebar/comment-button-toolbar.js +0 -29
@@ -36,6 +36,7 @@ var _jsxRuntime = require("react/jsx-runtime");
36
36
  * @param {Function} props.onAddReply - The function to add a reply to a comment.
37
37
  * @param {Function} props.onCommentDelete - The function to delete a comment.
38
38
  * @param {Function} props.onCommentResolve - The function to mark a comment as resolved.
39
+ * @param {Function} props.onCommentReopen - The function to reopen a resolved comment.
39
40
  * @param {boolean} props.showCommentBoard - Whether to show the comment board.
40
41
  * @param {Function} props.setShowCommentBoard - The function to set the comment board visibility.
41
42
  * @return {React.ReactNode} The rendered Comments component.
@@ -46,6 +47,7 @@ function Comments({
46
47
  onAddReply,
47
48
  onCommentDelete,
48
49
  onCommentResolve,
50
+ onCommentReopen,
49
51
  showCommentBoard,
50
52
  setShowCommentBoard
51
53
  }) {
@@ -90,9 +92,11 @@ function Comments({
90
92
  onAddReply: onAddReply,
91
93
  onCommentDelete: onCommentDelete,
92
94
  onCommentResolve: onCommentResolve,
95
+ onCommentReopen: onCommentReopen,
93
96
  onEditComment: onEditComment,
94
97
  isFocused: focusThread === thread.id,
95
- clearThreadFocus: clearThreadFocus
98
+ clearThreadFocus: clearThreadFocus,
99
+ setFocusThread: setFocusThread
96
100
  })
97
101
  }, thread.id))]
98
102
  });
@@ -103,22 +107,28 @@ function Thread({
103
107
  onAddReply,
104
108
  onCommentDelete,
105
109
  onCommentResolve,
110
+ onCommentReopen,
106
111
  isFocused,
107
- clearThreadFocus
112
+ clearThreadFocus,
113
+ setFocusThread
108
114
  }) {
109
115
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
110
116
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CommentBoard, {
111
117
  thread: thread,
112
118
  onResolve: onCommentResolve,
119
+ onReopen: onCommentReopen,
113
120
  onEdit: onEditComment,
114
121
  onDelete: onCommentDelete,
115
122
  status: thread.status
116
123
  }), 0 < thread?.reply?.length && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
117
- children: [!isFocused && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalVStack, {
124
+ children: [!isFocused && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
125
+ __next40pxDefaultSize: true,
126
+ variant: "link",
118
127
  className: "editor-collab-sidebar-panel__show-more-reply",
128
+ onClick: () => setFocusThread(thread.id),
119
129
  children: (0, _i18n.sprintf)(
120
130
  // translators: %s: number of replies.
121
- (0, _i18n._x)('%s more replies', 'Show replies button'), thread?.reply?.length)
131
+ (0, _i18n._n)('%s more reply', '%s more replies', thread?.reply?.length), thread?.reply?.length)
122
132
  }), isFocused && thread.reply.map(reply => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
123
133
  className: "editor-collab-sidebar-panel__child-thread",
124
134
  id: reply.id,
@@ -131,7 +141,7 @@ function Thread({
131
141
  thread: reply
132
142
  })]
133
143
  }, reply.id))]
134
- }), 'approved' !== thread.status && isFocused && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
144
+ }), isFocused && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
135
145
  className: "editor-collab-sidebar-panel__child-thread",
136
146
  spacing: "2",
137
147
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHStack, {
@@ -144,13 +154,18 @@ function Thread({
144
154
  className: "editor-collab-sidebar-panel__comment-field",
145
155
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_commentForm.default, {
146
156
  onSubmit: inputComment => {
157
+ if ('approved' === thread.status) {
158
+ onCommentReopen(thread.id);
159
+ }
147
160
  onAddReply(inputComment, thread.id);
148
161
  },
149
162
  onCancel: event => {
150
163
  event.stopPropagation(); // Prevent the parent onClick from being triggered
151
164
  clearThreadFocus();
152
165
  },
153
- submitButtonText: (0, _i18n._x)('Reply', 'Add reply comment')
166
+ placeholderText: 'approved' === thread.status && (0, _i18n.__)('Adding a comment will re-open this discussion….'),
167
+ submitButtonText: 'approved' === thread.status ? (0, _i18n._x)('Reopen & Reply', 'Reopen comment and add reply') : (0, _i18n._x)('Reply', 'Add reply comment'),
168
+ rows: 'approved' === thread.status ? 2 : 4
154
169
  })
155
170
  })]
156
171
  })]
@@ -159,6 +174,7 @@ function Thread({
159
174
  const CommentBoard = ({
160
175
  thread,
161
176
  onResolve,
177
+ onReopen,
162
178
  onEdit,
163
179
  onDelete,
164
180
  status
@@ -170,16 +186,11 @@ const CommentBoard = ({
170
186
  setActionState(false);
171
187
  setShowConfirmDialog(false);
172
188
  };
173
- const handleConfirmResolve = () => {
174
- onResolve(thread.id);
175
- setActionState(false);
176
- setShowConfirmDialog(false);
177
- };
178
189
  const handleCancel = () => {
179
190
  setActionState(false);
180
191
  setShowConfirmDialog(false);
181
192
  };
182
- const actions = [onEdit && {
193
+ const actions = [onEdit && status !== 'approved' && {
183
194
  title: (0, _i18n._x)('Edit', 'Edit comment'),
184
195
  onClick: () => {
185
196
  setActionState('edit');
@@ -190,6 +201,11 @@ const CommentBoard = ({
190
201
  setActionState('delete');
191
202
  setShowConfirmDialog(true);
192
203
  }
204
+ }, onReopen && status === 'approved' && {
205
+ title: (0, _i18n._x)('Reopen', 'Reopen comment'),
206
+ onClick: () => {
207
+ onReopen(thread.id);
208
+ }
193
209
  }];
194
210
  const moreActions = actions.filter(item => item?.onClick);
195
211
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
@@ -201,72 +217,45 @@ const CommentBoard = ({
201
217
  avatar: thread?.author_avatar_urls?.[48],
202
218
  name: thread?.author_name,
203
219
  date: thread?.date
204
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
220
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
205
221
  className: "editor-collab-sidebar-panel__comment-status",
206
- children: [status !== 'approved' && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
222
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalHStack, {
207
223
  alignment: "right",
208
224
  justify: "flex-end",
209
225
  spacing: "0",
210
226
  children: [0 === thread?.parent && onResolve && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
211
227
  label: (0, _i18n._x)('Resolve', 'Mark comment as resolved'),
212
- __next40pxDefaultSize: true,
228
+ size: "small",
213
229
  icon: _icons.published,
230
+ disabled: status === 'approved',
231
+ accessibleWhenDisabled: status === 'approved',
214
232
  onClick: () => {
215
- setActionState('resolve');
216
- setShowConfirmDialog(true);
217
- },
218
- showTooltip: true
233
+ onResolve(thread.id);
234
+ }
219
235
  }), 0 < moreActions.length && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
220
236
  icon: _icons.moreVertical,
221
237
  label: (0, _i18n._x)('Select an action', 'Select comment action'),
222
238
  className: "editor-collab-sidebar-panel__comment-dropdown-menu",
223
239
  controls: moreActions
224
240
  })]
225
- }), status === 'approved' &&
226
- /*#__PURE__*/
227
- // translators: tooltip for resolved comment
228
- (0, _jsxRuntime.jsx)(_components.Tooltip, {
229
- text: (0, _i18n.__)('Resolved'),
230
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.Icon, {
231
- icon: _icons.check
232
- })
233
- })]
241
+ })
234
242
  })]
235
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalHStack, {
236
- alignment: "left",
237
- spacing: "3",
238
- justify: "flex-start",
243
+ }), 'edit' === actionState ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_commentForm.default, {
244
+ onSubmit: value => {
245
+ onEdit(thread.id, value);
246
+ setActionState(false);
247
+ },
248
+ onCancel: () => handleCancel(),
249
+ thread: thread,
250
+ submitButtonText: (0, _i18n._x)('Update', 'verb')
251
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.RawHTML, {
239
252
  className: "editor-collab-sidebar-panel__user-comment",
240
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.__experimentalVStack, {
241
- spacing: "3",
242
- className: "editor-collab-sidebar-panel__comment-field",
243
- children: ['edit' === actionState && /*#__PURE__*/(0, _jsxRuntime.jsx)(_commentForm.default, {
244
- onSubmit: value => {
245
- onEdit(thread.id, value);
246
- setActionState(false);
247
- },
248
- onCancel: () => handleCancel(),
249
- thread: thread,
250
- submitButtonText: (0, _i18n._x)('Update', 'verb')
251
- }), 'edit' !== actionState && /*#__PURE__*/(0, _jsxRuntime.jsx)(_element.RawHTML, {
252
- children: thread?.content?.raw
253
- })]
254
- })
255
- }), 'resolve' === actionState && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalConfirmDialog, {
256
- isOpen: showConfirmDialog,
257
- onConfirm: handleConfirmResolve,
258
- onCancel: handleCancel,
259
- confirmButtonText: "Yes",
260
- cancelButtonText: "No",
261
- children:
262
- // translators: message displayed when confirming an action
263
- (0, _i18n.__)('Are you sure you want to mark this comment as resolved?')
253
+ children: thread?.content?.rendered
264
254
  }), 'delete' === actionState && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.__experimentalConfirmDialog, {
265
255
  isOpen: showConfirmDialog,
266
256
  onConfirm: handleConfirmDelete,
267
257
  onCancel: handleCancel,
268
- confirmButtonText: "Yes",
269
- cancelButtonText: "No",
258
+ confirmButtonText: (0, _i18n.__)('Delete'),
270
259
  children:
271
260
  // translators: message displayed when confirming an action
272
261
  (0, _i18n.__)('Are you sure you want to delete this comment?')
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_components","_icons","_i18n","_data","_blockEditor","_commentAuthorInfo","_commentForm","_jsxRuntime","Comments","threads","onEditComment","onAddReply","onCommentDelete","onCommentResolve","showCommentBoard","setShowCommentBoard","blockCommentId","useSelect","select","getBlockAttributes","getSelectedBlockClientId","blockEditorStore","_clientId","focusThread","setFocusThread","useState","clearThreadFocus","jsxs","Fragment","children","Array","isArray","length","jsx","__experimentalVStack","alignment","className","justify","spacing","__","map","thread","clsx","id","onClick","Thread","isFocused","CommentBoard","onResolve","onEdit","onDelete","status","reply","sprintf","_x","__experimentalHStack","default","onSubmit","inputComment","onCancel","event","stopPropagation","submitButtonText","actionState","setActionState","showConfirmDialog","setShowConfirmDialog","handleConfirmDelete","handleConfirmResolve","handleCancel","actions","title","moreActions","filter","item","avatar","author_avatar_urls","name","author_name","date","parent","Button","label","__next40pxDefaultSize","icon","published","showTooltip","DropdownMenu","moreVertical","controls","Tooltip","text","Icon","check","value","RawHTML","content","raw","__experimentalConfirmDialog","isOpen","onConfirm","confirmButtonText","cancelButtonText"],"sources":["@wordpress/editor/src/components/collab-sidebar/comments.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, RawHTML } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tDropdownMenu,\n\tTooltip,\n} from '@wordpress/components';\nimport { Icon, check, published, moreVertical } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\n\n/**\n * Renders the Comments component.\n *\n * @param {Object} props - The component props.\n * @param {Array} props.threads - The array of comment threads.\n * @param {Function} props.onEditComment - The function to handle comment editing.\n * @param {Function} props.onAddReply - The function to add a reply to a comment.\n * @param {Function} props.onCommentDelete - The function to delete a comment.\n * @param {Function} props.onCommentResolve - The function to mark a comment as resolved.\n * @param {boolean} props.showCommentBoard - Whether to show the comment board.\n * @param {Function} props.setShowCommentBoard - The function to set the comment board visibility.\n * @return {React.ReactNode} The rendered Comments component.\n */\nexport function Comments( {\n\tthreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n} ) {\n\tconst { blockCommentId } = useSelect( ( select ) => {\n\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst _clientId = getSelectedBlockClientId();\n\n\t\treturn {\n\t\t\tblockCommentId: _clientId\n\t\t\t\t? getBlockAttributes( _clientId )?.blockCommentId\n\t\t\t\t: null,\n\t\t};\n\t}, [] );\n\n\tconst [ focusThread, setFocusThread ] = useState(\n\t\tshowCommentBoard && blockCommentId ? blockCommentId : null\n\t);\n\n\tconst clearThreadFocus = () => {\n\t\tsetFocusThread( null );\n\t\tsetShowCommentBoard( false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{\n\t\t\t\t// If there are no comments, show a message indicating no comments are available.\n\t\t\t\t( ! Array.isArray( threads ) || threads.length === 0 ) && (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__thread\"\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// translators: message displayed when there are no comments available\n\t\t\t\t\t\t\t__( 'No comments available' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VStack>\n\t\t\t\t)\n\t\t\t}\n\t\t\t{ Array.isArray( threads ) &&\n\t\t\t\tthreads.length > 0 &&\n\t\t\t\tthreads.map( ( thread ) => (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__thread',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__active-thread':\n\t\t\t\t\t\t\t\t\tblockCommentId &&\n\t\t\t\t\t\t\t\t\tblockCommentId === thread.id,\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__focus-thread':\n\t\t\t\t\t\t\t\t\tfocusThread && focusThread === thread.id,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tid={ thread.id }\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tonClick={ () => setFocusThread( thread.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thread\n\t\t\t\t\t\t\tthread={ thread }\n\t\t\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\t\t\tonCommentDelete={ onCommentDelete }\n\t\t\t\t\t\t\tonCommentResolve={ onCommentResolve }\n\t\t\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\t\t\tisFocused={ focusThread === thread.id }\n\t\t\t\t\t\t\tclearThreadFocus={ clearThreadFocus }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tisFocused,\n\tclearThreadFocus,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tonResolve={ onCommentResolve }\n\t\t\t\tonEdit={ onEditComment }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\tstatus={ thread.status }\n\t\t\t/>\n\t\t\t{ 0 < thread?.reply?.length && (\n\t\t\t\t<>\n\t\t\t\t\t{ ! isFocused && (\n\t\t\t\t\t\t<VStack className=\"editor-collab-sidebar-panel__show-more-reply\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t\t_x( '%s more replies', 'Show replies button' ),\n\t\t\t\t\t\t\t\tthread?.reply?.length\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ isFocused &&\n\t\t\t\t\t\tthread.reply.map( ( reply ) => (\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\t\t\t\tid={ reply.id }\n\t\t\t\t\t\t\t\tspacing=\"2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ 'approved' !== thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\t\t\t\t\tonDelete={ onCommentDelete }\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{ 'approved' === thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard thread={ reply } />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ 'approved' !== thread.status && isFocused && (\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\tspacing=\"2\"\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-field\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tonAddReply( inputComment, thread.id );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\tevent.stopPropagation(); // Prevent the parent onClick from being triggered\n\t\t\t\t\t\t\t\tclearThreadFocus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsubmitButtonText={ _x(\n\t\t\t\t\t\t\t\t'Reply',\n\t\t\t\t\t\t\t\t'Add reply comment'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst CommentBoard = ( { thread, onResolve, onEdit, onDelete, status } ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread.id );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleConfirmResolve = () => {\n\t\tonResolve( thread.id );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst actions = [\n\t\tonEdit && {\n\t\t\ttitle: _x( 'Edit', 'Edit comment' ),\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'edit' );\n\t\t\t},\n\t\t},\n\t\tonDelete && {\n\t\t\ttitle: _x( 'Delete', 'Delete comment' ),\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst moreActions = actions.filter( ( item ) => item?.onClick );\n\n\treturn (\n\t\t<>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t/>\n\t\t\t\t<span className=\"editor-collab-sidebar-panel__comment-status\">\n\t\t\t\t\t{ status !== 'approved' && (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\talignment=\"right\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\tspacing=\"0\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ 0 === thread?.parent && onResolve && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t\t'Mark comment as resolved'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetActionState( 'resolve' );\n\t\t\t\t\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tshowTooltip\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{ 0 < moreActions.length && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Select an action',\n\t\t\t\t\t\t\t\t\t\t'Select comment action'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-dropdown-menu\"\n\t\t\t\t\t\t\t\t\tcontrols={ moreActions }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ status === 'approved' && (\n\t\t\t\t\t\t// translators: tooltip for resolved comment\n\t\t\t\t\t\t<Tooltip text={ __( 'Resolved' ) }>\n\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) }\n\t\t\t\t</span>\n\t\t\t</HStack>\n\t\t\t<HStack\n\t\t\t\talignment=\"left\"\n\t\t\t\tspacing=\"3\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-comment\"\n\t\t\t>\n\t\t\t\t<VStack\n\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-field\"\n\t\t\t\t>\n\t\t\t\t\t{ 'edit' === actionState && (\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\t\t\tonEdit( thread.id, value );\n\t\t\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\t\t\tthread={ thread }\n\t\t\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ 'edit' !== actionState && (\n\t\t\t\t\t\t<RawHTML>{ thread?.content?.raw }</RawHTML>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</HStack>\n\t\t\t{ 'resolve' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmResolve }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText=\"Yes\"\n\t\t\t\t\tcancelButtonText=\"No\"\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\t// translators: message displayed when confirming an action\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Are you sure you want to mark this comment as resolved?'\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText=\"Yes\"\n\t\t\t\t\tcancelButtonText=\"No\"\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\t// translators: message displayed when confirming an action\n\t\t\t\t\t\t__( 'Are you sure you want to delete this comment?' )\n\t\t\t\t\t}\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n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O,EAAEC;QAAG,CAAW,CAC1C;MAAA,CACM;IAAC,CACF,CAAC,EACP,SAAS,KAAKlC,WAAW,iBAC1B,IAAAxD,WAAA,CAAA0B,GAAA,EAACjC,WAAA,CAAAkG,2BAAa;MACbC,MAAM,EAAGlC,iBAAmB;MAC5BmC,SAAS,EAAGhC,oBAAsB;MAClCT,QAAQ,EAAGU,YAAc;MACzBgC,iBAAiB,EAAC,KAAK;MACvBC,gBAAgB,EAAC,IAAI;MAAAzE,QAAA;MAGpB;MACA,IAAAU,QAAE,EACD,yDACD;IAAC,CAEY,CACf,EACC,QAAQ,KAAKwB,WAAW,iBACzB,IAAAxD,WAAA,CAAA0B,GAAA,EAACjC,WAAA,CAAAkG,2BAAa;MACbC,MAAM,EAAGlC,iBAAmB;MAC5BmC,SAAS,EAAGjC,mBAAqB;MACjCR,QAAQ,EAAGU,YAAc;MACzBgC,iBAAiB,EAAC,KAAK;MACvBC,gBAAgB,EAAC,IAAI;MAAAzE,QAAA;MAGpB;MACA,IAAAU,QAAE,EAAE,+CAAgD;IAAC,CAExC,CACf;EAAA,CACA,CAAC;AAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_components","_icons","_i18n","_data","_blockEditor","_commentAuthorInfo","_commentForm","_jsxRuntime","Comments","threads","onEditComment","onAddReply","onCommentDelete","onCommentResolve","onCommentReopen","showCommentBoard","setShowCommentBoard","blockCommentId","useSelect","select","getBlockAttributes","getSelectedBlockClientId","blockEditorStore","_clientId","focusThread","setFocusThread","useState","clearThreadFocus","jsxs","Fragment","children","Array","isArray","length","jsx","__experimentalVStack","alignment","className","justify","spacing","__","map","thread","clsx","id","onClick","Thread","isFocused","CommentBoard","onResolve","onReopen","onEdit","onDelete","status","reply","Button","__next40pxDefaultSize","variant","sprintf","_n","__experimentalHStack","default","onSubmit","inputComment","onCancel","event","stopPropagation","placeholderText","submitButtonText","_x","rows","actionState","setActionState","showConfirmDialog","setShowConfirmDialog","handleConfirmDelete","handleCancel","actions","title","moreActions","filter","item","avatar","author_avatar_urls","name","author_name","date","parent","label","size","icon","published","disabled","accessibleWhenDisabled","DropdownMenu","moreVertical","controls","value","RawHTML","content","rendered","__experimentalConfirmDialog","isOpen","onConfirm","confirmButtonText"],"sources":["@wordpress/editor/src/components/collab-sidebar/comments.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, RawHTML } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport { published, moreVertical } from '@wordpress/icons';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\n\n/**\n * Renders the Comments component.\n *\n * @param {Object} props - The component props.\n * @param {Array} props.threads - The array of comment threads.\n * @param {Function} props.onEditComment - The function to handle comment editing.\n * @param {Function} props.onAddReply - The function to add a reply to a comment.\n * @param {Function} props.onCommentDelete - The function to delete a comment.\n * @param {Function} props.onCommentResolve - The function to mark a comment as resolved.\n * @param {Function} props.onCommentReopen - The function to reopen a resolved comment.\n * @param {boolean} props.showCommentBoard - Whether to show the comment board.\n * @param {Function} props.setShowCommentBoard - The function to set the comment board visibility.\n * @return {React.ReactNode} The rendered Comments component.\n */\nexport function Comments( {\n\tthreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tonCommentReopen,\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n} ) {\n\tconst { blockCommentId } = useSelect( ( select ) => {\n\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst _clientId = getSelectedBlockClientId();\n\n\t\treturn {\n\t\t\tblockCommentId: _clientId\n\t\t\t\t? getBlockAttributes( _clientId )?.blockCommentId\n\t\t\t\t: null,\n\t\t};\n\t}, [] );\n\n\tconst [ focusThread, setFocusThread ] = useState(\n\t\tshowCommentBoard && blockCommentId ? blockCommentId : null\n\t);\n\n\tconst clearThreadFocus = () => {\n\t\tsetFocusThread( null );\n\t\tsetShowCommentBoard( false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{\n\t\t\t\t// If there are no comments, show a message indicating no comments are available.\n\t\t\t\t( ! Array.isArray( threads ) || threads.length === 0 ) && (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__thread\"\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// translators: message displayed when there are no comments available\n\t\t\t\t\t\t\t__( 'No comments available' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VStack>\n\t\t\t\t)\n\t\t\t}\n\t\t\t{ Array.isArray( threads ) &&\n\t\t\t\tthreads.length > 0 &&\n\t\t\t\tthreads.map( ( thread ) => (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__thread',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__active-thread':\n\t\t\t\t\t\t\t\t\tblockCommentId &&\n\t\t\t\t\t\t\t\t\tblockCommentId === thread.id,\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__focus-thread':\n\t\t\t\t\t\t\t\t\tfocusThread && focusThread === thread.id,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tid={ thread.id }\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tonClick={ () => setFocusThread( thread.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thread\n\t\t\t\t\t\t\tthread={ thread }\n\t\t\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\t\t\tonCommentDelete={ onCommentDelete }\n\t\t\t\t\t\t\tonCommentResolve={ onCommentResolve }\n\t\t\t\t\t\t\tonCommentReopen={ onCommentReopen }\n\t\t\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\t\t\tisFocused={ focusThread === thread.id }\n\t\t\t\t\t\t\tclearThreadFocus={ clearThreadFocus }\n\t\t\t\t\t\t\tsetFocusThread={ setFocusThread }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tonCommentReopen,\n\tisFocused,\n\tclearThreadFocus,\n\tsetFocusThread,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tonResolve={ onCommentResolve }\n\t\t\t\tonReopen={ onCommentReopen }\n\t\t\t\tonEdit={ onEditComment }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\tstatus={ thread.status }\n\t\t\t/>\n\t\t\t{ 0 < thread?.reply?.length && (\n\t\t\t\t<>\n\t\t\t\t\t{ ! isFocused && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__show-more-reply\"\n\t\t\t\t\t\t\tonClick={ () => setFocusThread( thread.id ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: number of replies.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'%s more reply',\n\t\t\t\t\t\t\t\t\t'%s more replies',\n\t\t\t\t\t\t\t\t\tthread?.reply?.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tthread?.reply?.length\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ isFocused &&\n\t\t\t\t\t\tthread.reply.map( ( reply ) => (\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\t\t\t\tid={ reply.id }\n\t\t\t\t\t\t\t\tspacing=\"2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ 'approved' !== thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\t\t\t\t\tonDelete={ onCommentDelete }\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{ 'approved' === thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard thread={ reply } />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ isFocused && (\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\tspacing=\"2\"\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-field\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tif ( 'approved' === thread.status ) {\n\t\t\t\t\t\t\t\t\tonCommentReopen( thread.id );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonAddReply( inputComment, thread.id );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\tevent.stopPropagation(); // Prevent the parent onClick from being triggered\n\t\t\t\t\t\t\t\tclearThreadFocus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tplaceholderText={\n\t\t\t\t\t\t\t\t'approved' === thread.status &&\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Adding a comment will re-open this discussion….'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsubmitButtonText={\n\t\t\t\t\t\t\t\t'approved' === thread.status\n\t\t\t\t\t\t\t\t\t? _x(\n\t\t\t\t\t\t\t\t\t\t\t'Reopen & Reply',\n\t\t\t\t\t\t\t\t\t\t\t'Reopen comment and add reply'\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: _x( 'Reply', 'Add reply comment' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trows={ 'approved' === thread.status ? 2 : 4 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst CommentBoard = ( {\n\tthread,\n\tonResolve,\n\tonReopen,\n\tonEdit,\n\tonDelete,\n\tstatus,\n} ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread.id );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst actions = [\n\t\tonEdit &&\n\t\t\tstatus !== 'approved' && {\n\t\t\t\ttitle: _x( 'Edit', 'Edit comment' ),\n\t\t\t\tonClick: () => {\n\t\t\t\t\tsetActionState( 'edit' );\n\t\t\t\t},\n\t\t\t},\n\t\tonDelete && {\n\t\t\ttitle: _x( 'Delete', 'Delete comment' ),\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t\tonReopen &&\n\t\t\tstatus === 'approved' && {\n\t\t\t\ttitle: _x( 'Reopen', 'Reopen comment' ),\n\t\t\t\tonClick: () => {\n\t\t\t\t\tonReopen( thread.id );\n\t\t\t\t},\n\t\t\t},\n\t];\n\n\tconst moreActions = actions.filter( ( item ) => item?.onClick );\n\n\treturn (\n\t\t<>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t/>\n\t\t\t\t<span className=\"editor-collab-sidebar-panel__comment-status\">\n\t\t\t\t\t<HStack alignment=\"right\" justify=\"flex-end\" spacing=\"0\">\n\t\t\t\t\t\t{ 0 === thread?.parent && onResolve && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t'Mark comment as resolved'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\tdisabled={ status === 'approved' }\n\t\t\t\t\t\t\t\taccessibleWhenDisabled={ status === 'approved' }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonResolve( thread.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\t{ 0 < moreActions.length && (\n\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t'Select an action',\n\t\t\t\t\t\t\t\t\t'Select comment action'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-dropdown-menu\"\n\t\t\t\t\t\t\t\tcontrols={ moreActions }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</span>\n\t\t\t</HStack>\n\t\t\t{ 'edit' === actionState ? (\n\t\t\t\t<CommentForm\n\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\tonEdit( thread.id, value );\n\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\tthread={ thread }\n\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<RawHTML className=\"editor-collab-sidebar-panel__user-comment\">\n\t\t\t\t\t{ thread?.content?.rendered }\n\t\t\t\t</RawHTML>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\t// translators: message displayed when confirming an action\n\t\t\t\t\t\t__( 'Are you sure you want to delete this comment?' )\n\t\t\t\t\t}\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IA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