strapi-plugin-comments 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{index-BIorFYba.mjs → index-BAKREpmX.mjs} +27 -26
- package/dist/_chunks/{index-D1DAMkhj.mjs → index-BIcU6CkW.mjs} +56 -17
- package/dist/_chunks/{index-R1krliyC.js → index-BMbvyf7_.js} +2 -2
- package/dist/_chunks/{index-Ccb93U47.js → index-BUVqbcoe.js} +3 -2
- package/dist/_chunks/{index-BC5Odn17.mjs → index-CZsqxJsf.mjs} +2 -2
- package/dist/_chunks/{index-_exHAK6u.mjs → index-CaFBMp1z.mjs} +3 -2
- package/dist/_chunks/{index-k7z0V0lj.js → index-D_Yjpru0.js} +56 -17
- package/dist/_chunks/{index-COoWcAcA.js → index-DkFRVIkq.js} +3 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +2 -2
- package/dist/admin/src/api/client.d.ts +5 -5
- package/dist/admin/src/api/schemas.d.ts +63 -63
- package/dist/admin/src/hooks/useAPI.d.ts +5 -5
- package/dist/admin/src/hooks/useCommentsAll.d.ts +1 -1
- package/dist/admin/src/hooks/useReports.d.ts +1 -1
- package/dist/server/index.js +20 -21
- package/dist/server/index.mjs +20 -21
- package/dist/server/src/controllers/index.d.ts +1 -1
- package/dist/server/src/index.d.ts +3 -3
- package/dist/server/src/services/index.d.ts +2 -2
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +2 -2
- package/dist/server/src/validators/utils.d.ts +4 -4
- package/package.json +1 -2
|
@@ -51188,7 +51188,7 @@ const index = {
|
|
|
51188
51188
|
id: `${pluginId}.plugin.name`,
|
|
51189
51189
|
defaultMessage: displayName
|
|
51190
51190
|
},
|
|
51191
|
-
Component: () => import("./index-
|
|
51191
|
+
Component: () => import("./index-BIcU6CkW.mjs"),
|
|
51192
51192
|
permissions: pluginPermissions.access
|
|
51193
51193
|
});
|
|
51194
51194
|
app.createSettingSection(
|
|
@@ -51207,7 +51207,7 @@ const index = {
|
|
|
51207
51207
|
},
|
|
51208
51208
|
id: "comments",
|
|
51209
51209
|
to: `/settings/${pluginId}`,
|
|
51210
|
-
Component: () => import("./index-
|
|
51210
|
+
Component: () => import("./index-CZsqxJsf.mjs"),
|
|
51211
51211
|
permissions: pluginPermissions.settings
|
|
51212
51212
|
}
|
|
51213
51213
|
]
|
|
@@ -51234,7 +51234,7 @@ const index = {
|
|
|
51234
51234
|
}
|
|
51235
51235
|
};
|
|
51236
51236
|
export {
|
|
51237
|
-
|
|
51237
|
+
SimpleMenu as $,
|
|
51238
51238
|
ForwardRef$11 as A,
|
|
51239
51239
|
Box as B,
|
|
51240
51240
|
CheckboxImpl as C,
|
|
@@ -51256,30 +51256,31 @@ export {
|
|
|
51256
51256
|
SubNav as S,
|
|
51257
51257
|
Typography as T,
|
|
51258
51258
|
Avatar as U,
|
|
51259
|
-
|
|
51260
|
-
|
|
51261
|
-
|
|
51262
|
-
|
|
51263
|
-
|
|
51264
|
-
|
|
51259
|
+
TooltipImpl as V,
|
|
51260
|
+
Loader as W,
|
|
51261
|
+
Link as X,
|
|
51262
|
+
ForwardRef$51 as Y,
|
|
51263
|
+
Grid as Z,
|
|
51264
|
+
Td as _,
|
|
51265
51265
|
SubNavHeader as a,
|
|
51266
|
-
|
|
51267
|
-
|
|
51268
|
-
|
|
51269
|
-
|
|
51270
|
-
|
|
51271
|
-
|
|
51272
|
-
|
|
51273
|
-
|
|
51274
|
-
|
|
51275
|
-
|
|
51276
|
-
|
|
51277
|
-
|
|
51278
|
-
|
|
51279
|
-
|
|
51280
|
-
|
|
51281
|
-
|
|
51282
|
-
|
|
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,
|
|
51283
51284
|
SubNavSections as b,
|
|
51284
51285
|
SubNavSection as c,
|
|
51285
51286
|
SubNavLink as d,
|
|
@@ -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
|
|
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-BAKREpmX.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-
|
|
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-CaFBMp1z.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
|
-
|
|
432
|
-
"&:first-child
|
|
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: "-
|
|
50876
|
-
top: "-
|
|
50883
|
+
right: "-30%",
|
|
50884
|
+
top: "-30%",
|
|
50877
50885
|
borderRadius: "50%",
|
|
50878
50886
|
border: "2px #ffffff solid",
|
|
50879
50887
|
background: "#ffffff",
|
|
@@ -50883,7 +50891,7 @@ const AdminAvatar = ({ children }) => /* @__PURE__ */ jsxs(Box, { position: "rel
|
|
|
50883
50891
|
] });
|
|
50884
50892
|
const UserAvatar = ({ avatar, isAdminComment, name }) => {
|
|
50885
50893
|
if (avatar) {
|
|
50886
|
-
const image3 = "formats" in avatar ? avatar.formats?.thumbnail?.url
|
|
50894
|
+
const image3 = lodashExports.isObject(avatar) ? "formats" in avatar ? avatar.formats?.thumbnail?.url : avatar.url : avatar;
|
|
50887
50895
|
if (isAdminComment) {
|
|
50888
50896
|
return /* @__PURE__ */ jsx(AdminAvatar, { children: image3 ? /* @__PURE__ */ jsx(Avatar.Item, { src: image3, alt: name }) : null });
|
|
50889
50897
|
}
|
|
@@ -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
|
-
|
|
50911
|
-
|
|
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:
|
|
51223
|
-
|
|
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,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const index$2 = require("./index-
|
|
4
|
+
const index$2 = require("./index-BUVqbcoe.js");
|
|
5
5
|
const admin = require("@strapi/strapi/admin");
|
|
6
6
|
const reactQuery = require("@tanstack/react-query");
|
|
7
|
-
const index$1 = require("./index-
|
|
7
|
+
const index$1 = require("./index-DkFRVIkq.js");
|
|
8
8
|
const React = require("react");
|
|
9
9
|
const styled = require("styled-components");
|
|
10
10
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
@@ -51206,7 +51206,7 @@ const index = {
|
|
|
51206
51206
|
id: `${pluginId}.plugin.name`,
|
|
51207
51207
|
defaultMessage: displayName
|
|
51208
51208
|
},
|
|
51209
|
-
Component: () => Promise.resolve().then(() => require("./index-
|
|
51209
|
+
Component: () => Promise.resolve().then(() => require("./index-D_Yjpru0.js")),
|
|
51210
51210
|
permissions: pluginPermissions.access
|
|
51211
51211
|
});
|
|
51212
51212
|
app.createSettingSection(
|
|
@@ -51225,7 +51225,7 @@ const index = {
|
|
|
51225
51225
|
},
|
|
51226
51226
|
id: "comments",
|
|
51227
51227
|
to: `/settings/${pluginId}`,
|
|
51228
|
-
Component: () => Promise.resolve().then(() => require("./index-
|
|
51228
|
+
Component: () => Promise.resolve().then(() => require("./index-BMbvyf7_.js")),
|
|
51229
51229
|
permissions: pluginPermissions.settings
|
|
51230
51230
|
}
|
|
51231
51231
|
]
|
|
@@ -51313,6 +51313,7 @@ exports.Td = Td;
|
|
|
51313
51313
|
exports.Th = Th;
|
|
51314
51314
|
exports.Thead = Thead;
|
|
51315
51315
|
exports.Toggle = Toggle;
|
|
51316
|
+
exports.TooltipImpl = TooltipImpl;
|
|
51316
51317
|
exports.Tr = Tr;
|
|
51317
51318
|
exports.Typography = Typography;
|
|
51318
51319
|
exports.__rest = __rest;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a1 as Alert, e as Button, f as ForwardRef$4x, B as Box, a2 as ForwardRef$1f, F as Flex, T as Typography, Z as Grid, m as Field, a3 as MultiSelect, a4 as MultiSelectOption, a5 as Accordion, a6 as SwitchImpl, a7 as Toggle, a8 as ForwardRef$59 } from "./index-BAKREpmX.mjs";
|
|
3
3
|
import { useTracking, useNotification, Page, Layouts, Form } from "@strapi/strapi/admin";
|
|
4
4
|
import { useMutation, useQuery, useQueryClient, QueryClient } from "@tanstack/react-query";
|
|
5
|
-
import { u as useAPI, f as CommonProviders, a as usePermissions, g as getMessage, l as lodashExports, e as ConfirmationDialog } from "./index-
|
|
5
|
+
import { u as useAPI, f as CommonProviders, a as usePermissions, g as getMessage, l as lodashExports, e as ConfirmationDialog } from "./index-CaFBMp1z.mjs";
|
|
6
6
|
import { useMemo, useRef, useState, useCallback } from "react";
|
|
7
7
|
import styled from "styled-components";
|
|
8
8
|
const RenderIf = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { a9 as darkTheme, aa as lightTheme, ab as DesignSystemProvider, ac as pluginPermissions, ad as __assign, ae as __rest, p as pluginId, af as Dialog, F as Flex, ag as ForwardRef$3, T as Typography, e as Button } from "./index-BAKREpmX.mjs";
|
|
3
3
|
import { useQuery, QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { useMemo, createContext, useState } from "react";
|
|
@@ -7673,7 +7673,8 @@ const authorSchema = z.object({
|
|
|
7673
7673
|
url: z.string()
|
|
7674
7674
|
}).nullable()
|
|
7675
7675
|
})
|
|
7676
|
-
})
|
|
7676
|
+
}),
|
|
7677
|
+
z.string()
|
|
7677
7678
|
]).nullable().optional()
|
|
7678
7679
|
});
|
|
7679
7680
|
const approvalStatusSchema = z.union([
|
|
@@ -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-
|
|
6
|
+
const index = require("./index-BUVqbcoe.js");
|
|
7
7
|
const reactQuery = require("@tanstack/react-query");
|
|
8
|
-
const index$1 = require("./index-
|
|
8
|
+
const index$1 = require("./index-DkFRVIkq.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
|
-
|
|
456
|
-
"&:first-child
|
|
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: "-
|
|
50900
|
-
top: "-
|
|
50907
|
+
right: "-30%",
|
|
50908
|
+
top: "-30%",
|
|
50901
50909
|
borderRadius: "50%",
|
|
50902
50910
|
border: "2px #ffffff solid",
|
|
50903
50911
|
background: "#ffffff",
|
|
@@ -50907,7 +50915,7 @@ const AdminAvatar = ({ children }) => /* @__PURE__ */ jsxRuntime.jsxs(index.Box,
|
|
|
50907
50915
|
] });
|
|
50908
50916
|
const UserAvatar = ({ avatar, isAdminComment, name }) => {
|
|
50909
50917
|
if (avatar) {
|
|
50910
|
-
const image3 = "formats" in avatar ? avatar.formats?.thumbnail?.url
|
|
50918
|
+
const image3 = index$1.lodashExports.isObject(avatar) ? "formats" in avatar ? avatar.formats?.thumbnail?.url : avatar.url : avatar;
|
|
50911
50919
|
if (isAdminComment) {
|
|
50912
50920
|
return /* @__PURE__ */ jsxRuntime.jsx(AdminAvatar, { children: image3 ? /* @__PURE__ */ jsxRuntime.jsx(index.Avatar.Item, { src: image3, alt: name }) : null });
|
|
50913
50921
|
}
|
|
@@ -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
|
-
|
|
50935
|
-
|
|
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:
|
|
51247
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-BUVqbcoe.js");
|
|
4
4
|
const reactQuery = require("@tanstack/react-query");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
@@ -7691,7 +7691,8 @@ const authorSchema = zod.z.object({
|
|
|
7691
7691
|
url: zod.z.string()
|
|
7692
7692
|
}).nullable()
|
|
7693
7693
|
})
|
|
7694
|
-
})
|
|
7694
|
+
}),
|
|
7695
|
+
zod.z.string()
|
|
7695
7696
|
]).nullable().optional()
|
|
7696
7697
|
});
|
|
7697
7698
|
const approvalStatusSchema = zod.z.union([
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
|
@@ -153,7 +153,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
153
153
|
email: string;
|
|
154
154
|
id: string | number;
|
|
155
155
|
name?: string | undefined;
|
|
156
|
-
avatar?: {
|
|
156
|
+
avatar?: string | {
|
|
157
157
|
url: string;
|
|
158
158
|
} | {
|
|
159
159
|
url: string;
|
|
@@ -191,7 +191,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
191
191
|
email: string;
|
|
192
192
|
id: string | number;
|
|
193
193
|
name?: string | undefined;
|
|
194
|
-
avatar?: {
|
|
194
|
+
avatar?: string | {
|
|
195
195
|
url: string;
|
|
196
196
|
} | {
|
|
197
197
|
url: string;
|
|
@@ -228,7 +228,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
228
228
|
email: string;
|
|
229
229
|
id: string | number;
|
|
230
230
|
name?: string | undefined;
|
|
231
|
-
avatar?: {
|
|
231
|
+
avatar?: string | {
|
|
232
232
|
url: string;
|
|
233
233
|
} | {
|
|
234
234
|
url: string;
|
|
@@ -271,7 +271,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
271
271
|
email: string;
|
|
272
272
|
id: string | number;
|
|
273
273
|
name?: string | undefined;
|
|
274
|
-
avatar?: {
|
|
274
|
+
avatar?: string | {
|
|
275
275
|
url: string;
|
|
276
276
|
} | {
|
|
277
277
|
url: string;
|
|
@@ -344,7 +344,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
344
344
|
email: string;
|
|
345
345
|
id: string | number;
|
|
346
346
|
name?: string | undefined;
|
|
347
|
-
avatar?: {
|
|
347
|
+
avatar?: string | {
|
|
348
348
|
url: string;
|
|
349
349
|
} | {
|
|
350
350
|
url: string;
|