strapi-plugin-comments 3.0.0 → 3.0.2

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.
@@ -11815,7 +11815,7 @@ function isTopLayer(element) {
11815
11815
  function isContainingBlock(elementOrCss) {
11816
11816
  const webkit2 = isWebKit();
11817
11817
  const css2 = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
11818
- return css2.transform !== "none" || css2.perspective !== "none" || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit2 && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit2 && (css2.filter ? css2.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value));
11818
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css2[value] ? css2[value] !== "none" : false) || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit2 && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit2 && (css2.filter ? css2.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value));
11819
11819
  }
11820
11820
  function getContainingBlock(element) {
11821
11821
  let currentNode = getParentNode(element);
@@ -12321,6 +12321,9 @@ const platform = {
12321
12321
  isElement,
12322
12322
  isRTL
12323
12323
  };
12324
+ function rectsAreEqual(a2, b2) {
12325
+ return a2.x === b2.x && a2.y === b2.y && a2.width === b2.width && a2.height === b2.height;
12326
+ }
12324
12327
  function observeMove(element, onMove) {
12325
12328
  let io = null;
12326
12329
  let timeoutId;
@@ -12339,12 +12342,13 @@ function observeMove(element, onMove) {
12339
12342
  threshold = 1;
12340
12343
  }
12341
12344
  cleanup();
12345
+ const elementRectForRootMargin = element.getBoundingClientRect();
12342
12346
  const {
12343
12347
  left,
12344
12348
  top: top2,
12345
12349
  width,
12346
12350
  height
12347
- } = element.getBoundingClientRect();
12351
+ } = elementRectForRootMargin;
12348
12352
  if (!skip) {
12349
12353
  onMove();
12350
12354
  }
@@ -12375,6 +12379,9 @@ function observeMove(element, onMove) {
12375
12379
  refresh(false, ratio);
12376
12380
  }
12377
12381
  }
12382
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
12383
+ refresh();
12384
+ }
12378
12385
  isFirstUpdate = false;
12379
12386
  }
12380
12387
  try {
@@ -12438,7 +12445,7 @@ function autoUpdate(reference, floating, update, options) {
12438
12445
  }
12439
12446
  function frameLoop() {
12440
12447
  const nextRefRect = getBoundingClientRect(reference);
12441
- if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
12448
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
12442
12449
  update();
12443
12450
  }
12444
12451
  prevRefRect = nextRefRect;
@@ -20425,7 +20432,7 @@ function findMinIndex(value, array) {
20425
20432
  }
20426
20433
  function countColumn(string2, tabSize, to = string2.length) {
20427
20434
  let n2 = 0;
20428
- for (let i = 0; i < to; ) {
20435
+ for (let i = 0; i < to && i < string2.length; ) {
20429
20436
  if (string2.charCodeAt(i) == 9) {
20430
20437
  n2 += tabSize - n2 % tabSize;
20431
20438
  i++;
@@ -24273,16 +24280,16 @@ function applyDOMChange(view, domChange) {
24273
24280
  return false;
24274
24281
  if (!change && domChange.typeOver && !sel.empty && newSel && newSel.main.empty) {
24275
24282
  change = { from: sel.from, to: sel.to, insert: view.state.doc.slice(sel.from, sel.to) };
24283
+ } else if ((browser.mac || browser.android) && change && change.from == change.to && change.from == sel.head - 1 && /^\. ?$/.test(change.insert.toString()) && view.contentDOM.getAttribute("autocorrect") == "off") {
24284
+ if (newSel && change.insert.length == 2)
24285
+ newSel = EditorSelection.single(newSel.main.anchor - 1, newSel.main.head - 1);
24286
+ change = { from: change.from, to: change.to, insert: Text.of([change.insert.toString().replace(".", " ")]) };
24276
24287
  } else if (change && change.from >= sel.from && change.to <= sel.to && (change.from != sel.from || change.to != sel.to) && sel.to - sel.from - (change.to - change.from) <= 4) {
24277
24288
  change = {
24278
24289
  from: sel.from,
24279
24290
  to: sel.to,
24280
24291
  insert: view.state.doc.slice(sel.from, change.from).append(change.insert).append(view.state.doc.slice(change.to, sel.to))
24281
24292
  };
24282
- } else if ((browser.mac || browser.android) && change && change.from == change.to && change.from == sel.head - 1 && /^\. ?$/.test(change.insert.toString()) && view.contentDOM.getAttribute("autocorrect") == "off") {
24283
- if (newSel && change.insert.length == 2)
24284
- newSel = EditorSelection.single(newSel.main.anchor - 1, newSel.main.head - 1);
24285
- change = { from: sel.from, to: sel.to, insert: Text.of([" "]) };
24286
24293
  } else if (browser.chrome && change && change.from == change.to && change.from == sel.head && change.insert.toString() == "\n " && view.lineWrapping) {
24287
24294
  if (newSel)
24288
24295
  newSel = EditorSelection.single(newSel.main.anchor - 1, newSel.main.head - 1);
@@ -25918,6 +25925,10 @@ function visiblePixelRange(dom, paddingTop) {
25918
25925
  bottom: Math.max(top2, bottom) - (rect.top + paddingTop)
25919
25926
  };
25920
25927
  }
25928
+ function inWindow(elt) {
25929
+ let rect = elt.getBoundingClientRect(), win = elt.ownerDocument.defaultView || window;
25930
+ return rect.left < win.innerWidth && rect.right > 0 && rect.top < win.innerHeight && rect.bottom > 0;
25931
+ }
25921
25932
  function fullPixelRange(dom, paddingTop) {
25922
25933
  let rect = dom.getBoundingClientRect();
25923
25934
  return {
@@ -26118,7 +26129,7 @@ class ViewState {
26118
26129
  if (inView)
26119
26130
  measureContent = true;
26120
26131
  }
26121
- if (!this.inView && !this.scrollTarget)
26132
+ if (!this.inView && !this.scrollTarget && !inWindow(view.dom))
26122
26133
  return 0;
26123
26134
  let contentWidth = domRect.width;
26124
26135
  if (this.contentDOMWidth != contentWidth || this.editorHeight != view.scrollDOM.clientHeight) {
@@ -27235,7 +27246,7 @@ class EditContextManager {
27235
27246
  selectionEnd: this.toContextPos(view.state.selection.main.head)
27236
27247
  });
27237
27248
  this.handlers.textupdate = (e2) => {
27238
- let { anchor } = view.state.selection.main;
27249
+ let main = view.state.selection.main, { anchor, head } = main;
27239
27250
  let from = this.toEditorPos(e2.updateRangeStart), to = this.toEditorPos(e2.updateRangeEnd);
27240
27251
  if (view.inputState.composing >= 0 && !this.composing)
27241
27252
  this.composing = { contextBase: e2.updateRangeStart, editorBase: from, drifted: false };
@@ -27244,8 +27255,14 @@ class EditContextManager {
27244
27255
  change.from = anchor;
27245
27256
  else if (change.to == this.to && anchor > this.to)
27246
27257
  change.to = anchor;
27247
- if (change.from == change.to && !change.insert.length)
27258
+ if (change.from == change.to && !change.insert.length) {
27259
+ let newSel = EditorSelection.single(this.toEditorPos(e2.selectionStart), this.toEditorPos(e2.selectionEnd));
27260
+ if (!newSel.main.eq(main))
27261
+ view.dispatch({ selection: newSel, userEvent: "select" });
27248
27262
  return;
27263
+ }
27264
+ if ((browser.mac || browser.android) && change.from == head - 1 && /^\. ?$/.test(e2.text) && view.contentDOM.getAttribute("autocorrect") == "off")
27265
+ change = { from, to, insert: Text.of([e2.text.replace(".", " ")]) };
27249
27266
  this.pendingContextChange = change;
27250
27267
  if (!view.state.readOnly) {
27251
27268
  let newLen = this.to - this.from + (change.to - change.from + change.insert.length);
@@ -51171,7 +51188,7 @@ const index = {
51171
51188
  id: `${pluginId}.plugin.name`,
51172
51189
  defaultMessage: displayName
51173
51190
  },
51174
- Component: () => import("./index-Db2zwbpe.mjs"),
51191
+ Component: () => import("./index-JWxk4wBa.mjs"),
51175
51192
  permissions: pluginPermissions.access
51176
51193
  });
51177
51194
  app.createSettingSection(
@@ -51190,7 +51207,7 @@ const index = {
51190
51207
  },
51191
51208
  id: "comments",
51192
51209
  to: `/settings/${pluginId}`,
51193
- Component: () => import("./index-BgN4aUMA.mjs"),
51210
+ Component: () => import("./index-ChxSaqbf.mjs"),
51194
51211
  permissions: pluginPermissions.settings
51195
51212
  }
51196
51213
  ]
@@ -51217,7 +51234,7 @@ const index = {
51217
51234
  }
51218
51235
  };
51219
51236
  export {
51220
- MenuItem as $,
51237
+ SimpleMenu as $,
51221
51238
  ForwardRef$11 as A,
51222
51239
  Box as B,
51223
51240
  CheckboxImpl as C,
@@ -51239,30 +51256,31 @@ export {
51239
51256
  SubNav as S,
51240
51257
  Typography as T,
51241
51258
  Avatar as U,
51242
- Loader as V,
51243
- Link as W,
51244
- ForwardRef$51 as X,
51245
- Grid as Y,
51246
- Td as Z,
51247
- SimpleMenu as _,
51259
+ TooltipImpl as V,
51260
+ Loader as W,
51261
+ Link as X,
51262
+ ForwardRef$51 as Y,
51263
+ Grid as Z,
51264
+ Td as _,
51248
51265
  SubNavHeader as a,
51249
- Alert as a0,
51250
- ForwardRef$1f as a1,
51251
- MultiSelect as a2,
51252
- MultiSelectOption as a3,
51253
- Accordion as a4,
51254
- SwitchImpl as a5,
51255
- Toggle as a6,
51256
- ForwardRef$59 as a7,
51257
- darkTheme as a8,
51258
- lightTheme as a9,
51259
- DesignSystemProvider as aa,
51260
- pluginPermissions as ab,
51261
- __assign as ac,
51262
- __rest as ad,
51263
- Dialog as ae,
51264
- ForwardRef$3 as af,
51265
- index as ag,
51266
+ MenuItem as a0,
51267
+ Alert as a1,
51268
+ ForwardRef$1f as a2,
51269
+ MultiSelect as a3,
51270
+ MultiSelectOption as a4,
51271
+ Accordion as a5,
51272
+ SwitchImpl as a6,
51273
+ Toggle as a7,
51274
+ ForwardRef$59 as a8,
51275
+ darkTheme as a9,
51276
+ lightTheme as aa,
51277
+ DesignSystemProvider as ab,
51278
+ pluginPermissions as ac,
51279
+ __assign as ad,
51280
+ __rest as ae,
51281
+ Dialog as af,
51282
+ ForwardRef$3 as ag,
51283
+ index as ah,
51266
51284
  SubNavSections as b,
51267
51285
  SubNavSection as c,
51268
51286
  SubNavLink as d,
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const admin = require("@strapi/strapi/admin");
5
5
  const reactRouterDom = require("react-router-dom");
6
- const index = require("./index-B-ygLKrb.js");
6
+ const index = require("./index-7Geqfcar.js");
7
7
  const reactQuery = require("@tanstack/react-query");
8
- const index$1 = require("./index-DFAPx7Bl.js");
8
+ const index$1 = require("./index-CiJKS9C3.js");
9
9
  const react = require("zustand/react");
10
10
  const React = require("react");
11
11
  const styled = require("styled-components");
@@ -452,9 +452,12 @@ const CommentStatusBadge = ({ item, canAccessReports, hasReports }) => {
452
452
  };
453
453
  const IconButtonGroup = styled__default.default(index.IconButtonGroup)(({ isSingle, withMargin }) => {
454
454
  const isSingleStyle = {
455
- span: {
456
- "&:first-child button": {
457
- borderRadius: "4px"
455
+ button: {
456
+ "&:first-child": {
457
+ borderRadius: "4px !important"
458
+ },
459
+ "&:last-child": {
460
+ borderRadius: "4px !important"
458
461
  }
459
462
  }
460
463
  };
@@ -50351,7 +50354,7 @@ const ModeratorResponseModal = ({ id: id2, content, title, Icon }) => {
50351
50354
  setIsModalVisible((prev) => !prev);
50352
50355
  }, []);
50353
50356
  return /* @__PURE__ */ jsxRuntime.jsxs(index.Modal.Root, { open: isModalVisible, onOpenChange: onToggleModal, children: [
50354
- /* @__PURE__ */ jsxRuntime.jsx(index.Modal.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(index.IconButton, { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) }),
50357
+ /* @__PURE__ */ jsxRuntime.jsx(index.Modal.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(index.IconButton, { label: index$1.getMessage("page.details.actions.thread.modal.start.thread"), children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) }),
50355
50358
  /* @__PURE__ */ jsxRuntime.jsxs(index.Modal.Content, { children: [
50356
50359
  /* @__PURE__ */ jsxRuntime.jsx(index.Modal.Header, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Modal.Title, { children: title }) }),
50357
50360
  /* @__PURE__ */ jsxRuntime.jsx(index.Modal.Body, { children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -50819,6 +50822,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50819
50822
  {
50820
50823
  onClick,
50821
50824
  loading: commentMutation.block.isPending,
50825
+ label: index$1.getMessage("page.details.actions.comment.block"),
50822
50826
  children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon, {})
50823
50827
  }
50824
50828
  ),
@@ -50832,6 +50836,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50832
50836
  {
50833
50837
  onClick: handleUnblockClick,
50834
50838
  loading: commentMutation.block.isPending,
50839
+ label: index$1.getMessage("page.details.actions.comment.unblock"),
50835
50840
  children: /* @__PURE__ */ jsxRuntime.jsx(UnlockIcon, {})
50836
50841
  }
50837
50842
  )
@@ -50860,6 +50865,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50860
50865
  {
50861
50866
  onClick: handleDeleteClick,
50862
50867
  loading: commentMutation.delete.isPending,
50868
+ label: index$1.getMessage("page.details.actions.comment.delete"),
50863
50869
  children: /* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$j, {})
50864
50870
  }
50865
50871
  ),
@@ -50874,6 +50880,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50874
50880
  index.IconButton,
50875
50881
  {
50876
50882
  onClick: handleDrillDownClick,
50883
+ label: index$1.getMessage("page.details.panel.discussion.nav.drilldown"),
50877
50884
  style: blocked && !blockedThread ? { marginTop: "1px", marginRight: ".5rem" } : {},
50878
50885
  children: /* @__PURE__ */ jsxRuntime.jsx(index.ForwardRef$3x, {})
50879
50886
  }
@@ -50894,10 +50901,11 @@ const AdminAvatar = ({ children }) => /* @__PURE__ */ jsxRuntime.jsxs(index.Box,
50894
50901
  /* @__PURE__ */ jsxRuntime.jsx(
50895
50902
  index.Flex,
50896
50903
  {
50904
+ padding: "2px",
50897
50905
  alignItems: "middle",
50898
50906
  position: "absolute",
50899
- right: "-35%",
50900
- top: "-35%",
50907
+ right: "-30%",
50908
+ top: "-30%",
50901
50909
  borderRadius: "50%",
50902
50910
  border: "2px #ffffff solid",
50903
50911
  background: "#ffffff",
@@ -50929,10 +50937,21 @@ const DiscussionThreadItemFooter = ({ item, children }) => {
50929
50937
  dateStyle: "medium",
50930
50938
  timeStyle: "short"
50931
50939
  });
50932
- const { name, avatar } = item.author || {};
50940
+ const { name, avatar, email: email2 } = item.author || {};
50933
50941
  return /* @__PURE__ */ jsxRuntime.jsx(index.Flex, { direction: "row", paddingTop: 2, children: /* @__PURE__ */ jsxRuntime.jsxs(DiscussionThreadItemFooterMeta, { children: [
50934
- item.author && /* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { avatar, name, isAdminComment: item.isAdminComment }),
50935
- /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral800", children: name || index$1.getMessage("components.author.unknown") }),
50942
+ /* @__PURE__ */ jsxRuntime.jsx(
50943
+ index.TooltipImpl,
50944
+ {
50945
+ open: item.isAdminComment ? false : void 0,
50946
+ label: !item.isAdminComment ? email2 : void 0,
50947
+ align: "start",
50948
+ side: "left",
50949
+ children: /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { style: { cursor: item.isAdminComment ? "default" : "help" }, children: [
50950
+ item.author && /* @__PURE__ */ jsxRuntime.jsx(UserAvatar, { avatar, name, isAdminComment: item.isAdminComment }),
50951
+ /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral800", children: name || index$1.getMessage("components.author.unknown") })
50952
+ ] })
50953
+ }
50954
+ ),
50936
50955
  /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "pi", textColor: "neutral600", children: dateTime }),
50937
50956
  children
50938
50957
  ] }) });
@@ -51241,10 +51260,30 @@ const CommentRow = ({ item }) => {
51241
51260
  const localeParam = related.locale ? `?plugins[i18n][locale]=${related.locale}` : "";
51242
51261
  return /* @__PURE__ */ jsxRuntime.jsx(index.Link, { href: `/admin/content-manager/collection-types/${related.uid}/${related.documentId}${localeParam}`, children: related.title });
51243
51262
  }, [item.related]);
51263
+ const { name, email: email2, avatar } = item.author || {};
51244
51264
  return /* @__PURE__ */ jsxRuntime.jsxs(index.Tr, { children: [
51245
- /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: item.id }),
51246
- /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: item.author.name }),
51247
- /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: item.content }),
51265
+ /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: item.id }) }),
51266
+ /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
51267
+ index.TooltipImpl,
51268
+ {
51269
+ open: item.isAdminComment ? false : void 0,
51270
+ label: !item.isAdminComment ? email2 : void 0,
51271
+ align: "start",
51272
+ side: "left",
51273
+ children: /* @__PURE__ */ jsxRuntime.jsxs(index.Flex, { gap: 2, style: { cursor: item.isAdminComment ? "default" : "help" }, children: [
51274
+ item.author && /* @__PURE__ */ jsxRuntime.jsx(
51275
+ UserAvatar,
51276
+ {
51277
+ name,
51278
+ avatar,
51279
+ isAdminComment: item.isAdminComment
51280
+ }
51281
+ ),
51282
+ /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: name || index$1.getMessage("components.author.unknown") })
51283
+ ] })
51284
+ }
51285
+ ) }),
51286
+ /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { ellipsis: true, children: item.content }) }),
51248
51287
  /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: item.threadOf ? /* @__PURE__ */ jsxRuntime.jsx(index.Link, { href: `discover/${item.threadOf.id}`, onClick: onClickDetails(item.threadOf.id), children: index$1.getMessage(
51249
51288
  {
51250
51289
  id: "page.discover.table.cell.thread",
@@ -51253,10 +51292,10 @@ const CommentRow = ({ item }) => {
51253
51292
  "#" + item.threadOf.id
51254
51293
  ) }) : "-" }),
51255
51294
  /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: contentTypeLink }),
51256
- /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: formatDate(item.updatedAt || item.createdAt, {
51295
+ /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: formatDate(item.updatedAt || item.createdAt, {
51257
51296
  dateStyle: "long",
51258
51297
  timeStyle: "short"
51259
- }) }),
51298
+ }) }) }),
51260
51299
  /* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(
51261
51300
  CommentStatusBadge,
51262
51301
  {
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useNotification, Form, Page, Layouts, useTracking, useQueryParams, SearchInput, Pagination } from "@strapi/strapi/admin";
3
3
  import { useNavigate, useParams, Routes, Route, Navigate } from "react-router-dom";
4
- import { S as SubNav, a as SubNavHeader, b as SubNavSections, c as SubNavSection, d as SubNavLink, p as pluginId, B as Box, T as Typography, D as Divider, F as Flex, C as CheckboxImpl, e as Button, I as IconButton, f as ForwardRef$4x, g as ForwardRef$3$, h as Badge, i as IconButtonGroup$1, P as Portal$1, j as FocusTrap, k as ForwardRef$45, l as ForwardRef$3B, m as Field, n as SingleSelect, o as SingleSelectOption, q as ForwardRef$4X, r as ForwardRef$2v, s as ForwardRef$f, t as ForwardRef$1R, u as Popover, v as ForwardRef$v, w as ForwardRef$4R, x as ForwardRef$1L, y as ForwardRef$4d, z as ForwardRef$2l, A as ForwardRef$11, M as Modal, E as Table, G as Thead, H as Tr, J as Th, K as Tbody, L as ForwardRef$1r, N as ForwardRef$j, O as ForwardRef$3x, Q as ForwardRef$1d, R as ForwardRef$R, U as Avatar, V as Loader, W as Link, X as ForwardRef$51, Y as Grid, Z as Td, _ as SimpleMenu, $ as MenuItem } from "./index-Bx2boY6h.mjs";
4
+ import { S as SubNav, a as SubNavHeader, b as SubNavSections, c as SubNavSection, d as SubNavLink, p as pluginId, B as Box, T as Typography, D as Divider, F as Flex, C as CheckboxImpl, e as Button, I as IconButton, f as ForwardRef$4x, g as ForwardRef$3$, h as Badge, i as IconButtonGroup$1, P as Portal$1, j as FocusTrap, k as ForwardRef$45, l as ForwardRef$3B, m as Field, n as SingleSelect, o as SingleSelectOption, q as ForwardRef$4X, r as ForwardRef$2v, s as ForwardRef$f, t as ForwardRef$1R, u as Popover, v as ForwardRef$v, w as ForwardRef$4R, x as ForwardRef$1L, y as ForwardRef$4d, z as ForwardRef$2l, A as ForwardRef$11, M as Modal, E as Table, G as Thead, H as Tr, J as Th, K as Tbody, L as ForwardRef$1r, N as ForwardRef$j, O as ForwardRef$3x, Q as ForwardRef$1d, R as ForwardRef$R, U as Avatar, V as TooltipImpl, W as Loader, X as Link, Y as ForwardRef$51, Z as Grid, _ as Td, $ as SimpleMenu, a0 as MenuItem } from "./index-Ct7A5TFY.mjs";
5
5
  import { useQuery, useQueryClient, useMutation } from "@tanstack/react-query";
6
- import { u as useAPI, l as lodashExports, C as COMMENT_STATUS, R as REPORT_STATUS, g as getMessage, a as usePermissions, U as UserContext, b as getDefaultExportFromCjs, c as useIntl, d as REPORT_REASON, e as ConfirmationDialog, f as CommonProviders } from "./index-CIqMAf50.mjs";
6
+ import { u as useAPI, l as lodashExports, C as COMMENT_STATUS, R as REPORT_STATUS, g as getMessage, a as usePermissions, U as UserContext, b as getDefaultExportFromCjs, c as useIntl, d as REPORT_REASON, e as ConfirmationDialog, f as CommonProviders } from "./index-CIBI9Is6.mjs";
7
7
  import { create } from "zustand/react";
8
8
  import * as React from "react";
9
9
  import { useCallback, useMemo, useContext, useState, useRef, Fragment as Fragment$1 } from "react";
@@ -428,9 +428,12 @@ const CommentStatusBadge = ({ item, canAccessReports, hasReports }) => {
428
428
  };
429
429
  const IconButtonGroup = styled(IconButtonGroup$1)(({ isSingle, withMargin }) => {
430
430
  const isSingleStyle = {
431
- span: {
432
- "&:first-child button": {
433
- borderRadius: "4px"
431
+ button: {
432
+ "&:first-child": {
433
+ borderRadius: "4px !important"
434
+ },
435
+ "&:last-child": {
436
+ borderRadius: "4px !important"
434
437
  }
435
438
  }
436
439
  };
@@ -50327,7 +50330,7 @@ const ModeratorResponseModal = ({ id: id2, content, title, Icon }) => {
50327
50330
  setIsModalVisible((prev) => !prev);
50328
50331
  }, []);
50329
50332
  return /* @__PURE__ */ jsxs(Modal.Root, { open: isModalVisible, onOpenChange: onToggleModal, children: [
50330
- /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(IconButton, { children: /* @__PURE__ */ jsx(Icon, {}) }) }),
50333
+ /* @__PURE__ */ jsx(Modal.Trigger, { children: /* @__PURE__ */ jsx(IconButton, { label: getMessage("page.details.actions.thread.modal.start.thread"), children: /* @__PURE__ */ jsx(Icon, {}) }) }),
50331
50334
  /* @__PURE__ */ jsxs(Modal.Content, { children: [
50332
50335
  /* @__PURE__ */ jsx(Modal.Header, { children: /* @__PURE__ */ jsx(Modal.Title, { children: title }) }),
50333
50336
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(
@@ -50795,6 +50798,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50795
50798
  {
50796
50799
  onClick,
50797
50800
  loading: commentMutation.block.isPending,
50801
+ label: getMessage("page.details.actions.comment.block"),
50798
50802
  children: /* @__PURE__ */ jsx(LockIcon, {})
50799
50803
  }
50800
50804
  ),
@@ -50808,6 +50812,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50808
50812
  {
50809
50813
  onClick: handleUnblockClick,
50810
50814
  loading: commentMutation.block.isPending,
50815
+ label: getMessage("page.details.actions.comment.unblock"),
50811
50816
  children: /* @__PURE__ */ jsx(UnlockIcon, {})
50812
50817
  }
50813
50818
  )
@@ -50836,6 +50841,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50836
50841
  {
50837
50842
  onClick: handleDeleteClick,
50838
50843
  loading: commentMutation.delete.isPending,
50844
+ label: getMessage("page.details.actions.comment.delete"),
50839
50845
  children: /* @__PURE__ */ jsx(ForwardRef$j, {})
50840
50846
  }
50841
50847
  ),
@@ -50850,6 +50856,7 @@ const DiscussionThreadItemActions = ({ item, pinned, preview }) => {
50850
50856
  IconButton,
50851
50857
  {
50852
50858
  onClick: handleDrillDownClick,
50859
+ label: getMessage("page.details.panel.discussion.nav.drilldown"),
50853
50860
  style: blocked && !blockedThread ? { marginTop: "1px", marginRight: ".5rem" } : {},
50854
50861
  children: /* @__PURE__ */ jsx(ForwardRef$3x, {})
50855
50862
  }
@@ -50870,10 +50877,11 @@ const AdminAvatar = ({ children }) => /* @__PURE__ */ jsxs(Box, { position: "rel
50870
50877
  /* @__PURE__ */ jsx(
50871
50878
  Flex,
50872
50879
  {
50880
+ padding: "2px",
50873
50881
  alignItems: "middle",
50874
50882
  position: "absolute",
50875
- right: "-35%",
50876
- top: "-35%",
50883
+ right: "-30%",
50884
+ top: "-30%",
50877
50885
  borderRadius: "50%",
50878
50886
  border: "2px #ffffff solid",
50879
50887
  background: "#ffffff",
@@ -50905,10 +50913,21 @@ const DiscussionThreadItemFooter = ({ item, children }) => {
50905
50913
  dateStyle: "medium",
50906
50914
  timeStyle: "short"
50907
50915
  });
50908
- const { name, avatar } = item.author || {};
50916
+ const { name, avatar, email: email2 } = item.author || {};
50909
50917
  return /* @__PURE__ */ jsx(Flex, { direction: "row", paddingTop: 2, children: /* @__PURE__ */ jsxs(DiscussionThreadItemFooterMeta, { children: [
50910
- item.author && /* @__PURE__ */ jsx(UserAvatar, { avatar, name, isAdminComment: item.isAdminComment }),
50911
- /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral800", children: name || getMessage("components.author.unknown") }),
50918
+ /* @__PURE__ */ jsx(
50919
+ TooltipImpl,
50920
+ {
50921
+ open: item.isAdminComment ? false : void 0,
50922
+ label: !item.isAdminComment ? email2 : void 0,
50923
+ align: "start",
50924
+ side: "left",
50925
+ children: /* @__PURE__ */ jsxs(Flex, { style: { cursor: item.isAdminComment ? "default" : "help" }, children: [
50926
+ item.author && /* @__PURE__ */ jsx(UserAvatar, { avatar, name, isAdminComment: item.isAdminComment }),
50927
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", textColor: "neutral800", children: name || getMessage("components.author.unknown") })
50928
+ ] })
50929
+ }
50930
+ ),
50912
50931
  /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: dateTime }),
50913
50932
  children
50914
50933
  ] }) });
@@ -51217,10 +51236,30 @@ const CommentRow = ({ item }) => {
51217
51236
  const localeParam = related.locale ? `?plugins[i18n][locale]=${related.locale}` : "";
51218
51237
  return /* @__PURE__ */ jsx(Link, { href: `/admin/content-manager/collection-types/${related.uid}/${related.documentId}${localeParam}`, children: related.title });
51219
51238
  }, [item.related]);
51239
+ const { name, email: email2, avatar } = item.author || {};
51220
51240
  return /* @__PURE__ */ jsxs(Tr, { children: [
51221
- /* @__PURE__ */ jsx(Td, { children: item.id }),
51222
- /* @__PURE__ */ jsx(Td, { children: item.author.name }),
51223
- /* @__PURE__ */ jsx(Td, { children: item.content }),
51241
+ /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { children: item.id }) }),
51242
+ /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(
51243
+ TooltipImpl,
51244
+ {
51245
+ open: item.isAdminComment ? false : void 0,
51246
+ label: !item.isAdminComment ? email2 : void 0,
51247
+ align: "start",
51248
+ side: "left",
51249
+ children: /* @__PURE__ */ jsxs(Flex, { gap: 2, style: { cursor: item.isAdminComment ? "default" : "help" }, children: [
51250
+ item.author && /* @__PURE__ */ jsx(
51251
+ UserAvatar,
51252
+ {
51253
+ name,
51254
+ avatar,
51255
+ isAdminComment: item.isAdminComment
51256
+ }
51257
+ ),
51258
+ /* @__PURE__ */ jsx(Typography, { children: name || getMessage("components.author.unknown") })
51259
+ ] })
51260
+ }
51261
+ ) }),
51262
+ /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { ellipsis: true, children: item.content }) }),
51224
51263
  /* @__PURE__ */ jsx(Td, { children: item.threadOf ? /* @__PURE__ */ jsx(Link, { href: `discover/${item.threadOf.id}`, onClick: onClickDetails(item.threadOf.id), children: getMessage(
51225
51264
  {
51226
51265
  id: "page.discover.table.cell.thread",
@@ -51229,10 +51268,10 @@ const CommentRow = ({ item }) => {
51229
51268
  "#" + item.threadOf.id
51230
51269
  ) }) : "-" }),
51231
51270
  /* @__PURE__ */ jsx(Td, { children: contentTypeLink }),
51232
- /* @__PURE__ */ jsx(Td, { children: formatDate(item.updatedAt || item.createdAt, {
51271
+ /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { children: formatDate(item.updatedAt || item.createdAt, {
51233
51272
  dateStyle: "long",
51234
51273
  timeStyle: "short"
51235
- }) }),
51274
+ }) }) }),
51236
51275
  /* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(
51237
51276
  CommentStatusBadge,
51238
51277
  {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-B-ygLKrb.js");
2
+ const index = require("../_chunks/index-7Geqfcar.js");
3
3
  require("react");
4
4
  module.exports = index.index;
@@ -1,5 +1,5 @@
1
- import { ag } from "../_chunks/index-Bx2boY6h.mjs";
1
+ import { ah } from "../_chunks/index-Ct7A5TFY.mjs";
2
2
  import "react";
3
3
  export {
4
- ag as default
4
+ ah as default
5
5
  };