strapi-plugin-comments 3.0.3 → 3.0.4
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-BMbvyf7_.js → index-BMAhFLKR.js} +2 -2
- package/dist/_chunks/{index-CZsqxJsf.mjs → index-CK1XCSqz.mjs} +2 -2
- package/dist/_chunks/{index-D_Yjpru0.js → index-DCKroyap.js} +5 -5
- package/dist/_chunks/{index-BUVqbcoe.js → index-DHhRVslt.js} +2 -2
- package/dist/_chunks/{index-BAKREpmX.mjs → index-DUWJDJLu.mjs} +2 -2
- package/dist/_chunks/{index-CaFBMp1z.mjs → index-PCqyAKE7.mjs} +8 -3
- package/dist/_chunks/{index-DkFRVIkq.js → index-_4jTpBrc.js} +8 -3
- package/dist/_chunks/{index-BIcU6CkW.mjs → index-yhf78avJ.mjs} +5 -5
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/api/client.d.ts +5 -5
- package/dist/admin/src/api/schemas.d.ts +63 -63
- package/dist/admin/src/components/UserAvatar/index.d.ts +1 -1
- 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 +34 -19
- package/dist/server/index.mjs +34 -19
- package/dist/server/src/controllers/index.d.ts +526 -1
- package/dist/server/src/index.d.ts +2281 -181
- package/dist/server/src/services/admin/admin.service.d.ts +526 -1
- package/dist/server/src/services/admin/utils.d.ts +9 -1
- package/dist/server/src/services/client.service.d.ts +526 -1
- package/dist/server/src/services/common.service.d.ts +1 -1
- package/dist/server/src/services/index.d.ts +1800 -225
- package/dist/server/src/validators/api/controllers/client.controller.validator.d.ts +527 -2
- package/package.json +1 -1
|
@@ -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-DHhRVslt.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-_4jTpBrc.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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
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-
|
|
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-DUWJDJLu.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-PCqyAKE7.mjs";
|
|
6
6
|
import { useMemo, useRef, useState, useCallback } from "react";
|
|
7
7
|
import styled from "styled-components";
|
|
8
8
|
const RenderIf = ({
|
|
@@ -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-DHhRVslt.js");
|
|
7
7
|
const reactQuery = require("@tanstack/react-query");
|
|
8
|
-
const index$1 = require("./index-
|
|
8
|
+
const index$1 = require("./index-_4jTpBrc.js");
|
|
9
9
|
const react = require("zustand/react");
|
|
10
10
|
const React = require("react");
|
|
11
11
|
const styled = require("styled-components");
|
|
@@ -51274,7 +51274,7 @@ const CommentRow = ({ item }) => {
|
|
|
51274
51274
|
item.author && /* @__PURE__ */ jsxRuntime.jsx(
|
|
51275
51275
|
UserAvatar,
|
|
51276
51276
|
{
|
|
51277
|
-
name,
|
|
51277
|
+
name: name || "",
|
|
51278
51278
|
avatar,
|
|
51279
51279
|
isAdminComment: item.isAdminComment
|
|
51280
51280
|
}
|
|
@@ -51283,7 +51283,7 @@ const CommentRow = ({ item }) => {
|
|
|
51283
51283
|
] })
|
|
51284
51284
|
}
|
|
51285
51285
|
) }),
|
|
51286
|
-
/* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { ellipsis: true, children: item.content }) }),
|
|
51286
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Td, { maxWidth: "200px", children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { ellipsis: true, children: item.content }) }),
|
|
51287
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(
|
|
51288
51288
|
{
|
|
51289
51289
|
id: "page.discover.table.cell.thread",
|
|
@@ -51291,7 +51291,7 @@ const CommentRow = ({ item }) => {
|
|
|
51291
51291
|
},
|
|
51292
51292
|
"#" + item.threadOf.id
|
|
51293
51293
|
) }) : "-" }),
|
|
51294
|
-
/* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: contentTypeLink }),
|
|
51294
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Td, { maxWidth: "200px", children: contentTypeLink }),
|
|
51295
51295
|
/* @__PURE__ */ jsxRuntime.jsx(index.Td, { children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: formatDate(item.updatedAt || item.createdAt, {
|
|
51296
51296
|
dateStyle: "long",
|
|
51297
51297
|
timeStyle: "short"
|
|
@@ -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-DCKroyap.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-BMAhFLKR.js")),
|
|
51229
51229
|
permissions: pluginPermissions.settings
|
|
51230
51230
|
}
|
|
51231
51231
|
]
|
|
@@ -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-yhf78avJ.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-CK1XCSqz.mjs"),
|
|
51211
51211
|
permissions: pluginPermissions.settings
|
|
51212
51212
|
}
|
|
51213
51213
|
]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
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-
|
|
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-DUWJDJLu.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";
|
|
@@ -7660,7 +7660,7 @@ const relatedSchema = z.intersection(
|
|
|
7660
7660
|
);
|
|
7661
7661
|
const authorSchema = z.object({
|
|
7662
7662
|
id: z.union([z.number(), z.string()]),
|
|
7663
|
-
name: z.string().optional(),
|
|
7663
|
+
name: z.string().optional().nullable(),
|
|
7664
7664
|
email: z.string(),
|
|
7665
7665
|
avatar: z.union([
|
|
7666
7666
|
z.object({
|
|
@@ -7738,7 +7738,12 @@ const commentsSchema = z.object({
|
|
|
7738
7738
|
});
|
|
7739
7739
|
const commentDetailsSchema = z.object({
|
|
7740
7740
|
entity: relatedSchema,
|
|
7741
|
-
selected: baseCommentSchema.merge(
|
|
7741
|
+
selected: baseCommentSchema.merge(
|
|
7742
|
+
z.object({
|
|
7743
|
+
related: z.string(),
|
|
7744
|
+
threadOf: getCommentSchema().omit({ related: true }).merge(z.object({ related: z.string() })).nullable().optional()
|
|
7745
|
+
})
|
|
7746
|
+
).nullable(),
|
|
7742
7747
|
level: z.array(getCommentSchema().omit({ threadOf: true, related: true }))
|
|
7743
7748
|
});
|
|
7744
7749
|
const singleContentTypeSchema = z.object({
|
|
@@ -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-DHhRVslt.js");
|
|
4
4
|
const reactQuery = require("@tanstack/react-query");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
@@ -7678,7 +7678,7 @@ const relatedSchema = zod.z.intersection(
|
|
|
7678
7678
|
);
|
|
7679
7679
|
const authorSchema = zod.z.object({
|
|
7680
7680
|
id: zod.z.union([zod.z.number(), zod.z.string()]),
|
|
7681
|
-
name: zod.z.string().optional(),
|
|
7681
|
+
name: zod.z.string().optional().nullable(),
|
|
7682
7682
|
email: zod.z.string(),
|
|
7683
7683
|
avatar: zod.z.union([
|
|
7684
7684
|
zod.z.object({
|
|
@@ -7756,7 +7756,12 @@ const commentsSchema = zod.z.object({
|
|
|
7756
7756
|
});
|
|
7757
7757
|
const commentDetailsSchema = zod.z.object({
|
|
7758
7758
|
entity: relatedSchema,
|
|
7759
|
-
selected: baseCommentSchema.merge(
|
|
7759
|
+
selected: baseCommentSchema.merge(
|
|
7760
|
+
zod.z.object({
|
|
7761
|
+
related: zod.z.string(),
|
|
7762
|
+
threadOf: getCommentSchema().omit({ related: true }).merge(zod.z.object({ related: zod.z.string() })).nullable().optional()
|
|
7763
|
+
})
|
|
7764
|
+
).nullable(),
|
|
7760
7765
|
level: zod.z.array(getCommentSchema().omit({ threadOf: true, related: true }))
|
|
7761
7766
|
});
|
|
7762
7767
|
const singleContentTypeSchema = zod.z.object({
|
|
@@ -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 TooltipImpl, W as Loader, X as Link, Y as ForwardRef$51, Z as Grid, _ as Td, $ as SimpleMenu, a0 as MenuItem } from "./index-
|
|
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-DUWJDJLu.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-PCqyAKE7.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";
|
|
@@ -51250,7 +51250,7 @@ const CommentRow = ({ item }) => {
|
|
|
51250
51250
|
item.author && /* @__PURE__ */ jsx(
|
|
51251
51251
|
UserAvatar,
|
|
51252
51252
|
{
|
|
51253
|
-
name,
|
|
51253
|
+
name: name || "",
|
|
51254
51254
|
avatar,
|
|
51255
51255
|
isAdminComment: item.isAdminComment
|
|
51256
51256
|
}
|
|
@@ -51259,7 +51259,7 @@ const CommentRow = ({ item }) => {
|
|
|
51259
51259
|
] })
|
|
51260
51260
|
}
|
|
51261
51261
|
) }),
|
|
51262
|
-
/* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { ellipsis: true, children: item.content }) }),
|
|
51262
|
+
/* @__PURE__ */ jsx(Td, { maxWidth: "200px", children: /* @__PURE__ */ jsx(Typography, { ellipsis: true, children: item.content }) }),
|
|
51263
51263
|
/* @__PURE__ */ jsx(Td, { children: item.threadOf ? /* @__PURE__ */ jsx(Link, { href: `discover/${item.threadOf.id}`, onClick: onClickDetails(item.threadOf.id), children: getMessage(
|
|
51264
51264
|
{
|
|
51265
51265
|
id: "page.discover.table.cell.thread",
|
|
@@ -51267,7 +51267,7 @@ const CommentRow = ({ item }) => {
|
|
|
51267
51267
|
},
|
|
51268
51268
|
"#" + item.threadOf.id
|
|
51269
51269
|
) }) : "-" }),
|
|
51270
|
-
/* @__PURE__ */ jsx(Td, { children: contentTypeLink }),
|
|
51270
|
+
/* @__PURE__ */ jsx(Td, { maxWidth: "200px", children: contentTypeLink }),
|
|
51271
51271
|
/* @__PURE__ */ jsx(Td, { children: /* @__PURE__ */ jsx(Typography, { children: formatDate(item.updatedAt || item.createdAt, {
|
|
51272
51272
|
dateStyle: "long",
|
|
51273
51273
|
timeStyle: "short"
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
|
@@ -152,7 +152,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
152
152
|
author: {
|
|
153
153
|
email: string;
|
|
154
154
|
id: string | number;
|
|
155
|
-
name?: string | undefined;
|
|
155
|
+
name?: string | null | undefined;
|
|
156
156
|
avatar?: string | {
|
|
157
157
|
url: string;
|
|
158
158
|
} | {
|
|
@@ -190,7 +190,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
190
190
|
author: {
|
|
191
191
|
email: string;
|
|
192
192
|
id: string | number;
|
|
193
|
-
name?: string | undefined;
|
|
193
|
+
name?: string | null | undefined;
|
|
194
194
|
avatar?: string | {
|
|
195
195
|
url: string;
|
|
196
196
|
} | {
|
|
@@ -227,7 +227,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
227
227
|
author: {
|
|
228
228
|
email: string;
|
|
229
229
|
id: string | number;
|
|
230
|
-
name?: string | undefined;
|
|
230
|
+
name?: string | null | undefined;
|
|
231
231
|
avatar?: string | {
|
|
232
232
|
url: string;
|
|
233
233
|
} | {
|
|
@@ -270,7 +270,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
270
270
|
author: {
|
|
271
271
|
email: string;
|
|
272
272
|
id: string | number;
|
|
273
|
-
name?: string | undefined;
|
|
273
|
+
name?: string | null | undefined;
|
|
274
274
|
avatar?: string | {
|
|
275
275
|
url: string;
|
|
276
276
|
} | {
|
|
@@ -343,7 +343,7 @@ export declare const getApiClient: (fetch: ReturnType<typeof getFetchClient>) =>
|
|
|
343
343
|
author: {
|
|
344
344
|
email: string;
|
|
345
345
|
id: string | number;
|
|
346
|
-
name?: string | undefined;
|
|
346
|
+
name?: string | null | undefined;
|
|
347
347
|
avatar?: string | {
|
|
348
348
|
url: string;
|
|
349
349
|
} | {
|