@yimingliao/cms 0.0.185 → 0.0.186
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/export/client/components/resources/index.js +0 -1
- package/dist/src/client/interfaces/components/resources/admin/admin-relations-section.js +5 -14
- package/dist/src/client/interfaces/components/resources/category/category-list.js +12 -7
- package/dist/src/client/interfaces/components/resources/file/file-relations-section.js +3 -10
- package/dist/src/client/interfaces/components/resources/post/post-list.js +14 -14
- package/dist/src/client/interfaces/components/resources/post/post-relations-section.js +1 -7
- package/dist/src/client/interfaces/components/resources/topic/topic-list.js +11 -6
- package/dist/types/export/client/components/resources/index.d.ts +1 -1
- package/dist/types/export/client/components/resources/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/admin/admin-list.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/admin/admin-relations-section.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/category/category-list.d.ts +3 -2
- package/dist/types/src/client/interfaces/components/resources/category/category-list.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/file/file-relations-section.d.ts +2 -2
- package/dist/types/src/client/interfaces/components/resources/file/file-relations-section.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/index.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/resources/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/post/post-list.d.ts +5 -5
- package/dist/types/src/client/interfaces/components/resources/post/post-list.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/post/post-relations-section.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/topic/index.d.ts +0 -1
- package/dist/types/src/client/interfaces/components/resources/topic/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/topic/topic-list.d.ts +3 -2
- package/dist/types/src/client/interfaces/components/resources/topic/topic-list.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/client/interfaces/components/resources/topic/topic-relations-section.js +0 -106
- package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts +0 -15
- package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts.map +0 -1
|
@@ -22,7 +22,6 @@ export { createCategoryList } from '../../../../src/client/interfaces/components
|
|
|
22
22
|
export { createCategoryRelationsSection } from '../../../../src/client/interfaces/components/resources/category/category-relations-section.js';
|
|
23
23
|
export { TopicCard } from '../../../../src/client/interfaces/components/resources/topic/topic-card.js';
|
|
24
24
|
export { createTopicList } from '../../../../src/client/interfaces/components/resources/topic/topic-list.js';
|
|
25
|
-
export { createTopicRelationsSection } from '../../../../src/client/interfaces/components/resources/topic/topic-relations-section.js';
|
|
26
25
|
export { TagCard } from '../../../../src/client/interfaces/components/resources/tag/tag-card.js';
|
|
27
26
|
export { createTagList } from '../../../../src/client/interfaces/components/resources/tag/tag-list.js';
|
|
28
27
|
export { createTagRelationsSection } from '../../../../src/client/interfaces/components/resources/tag/tag-relations-section.js';
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useTranslator } from 'intor/react';
|
|
4
|
-
import '../../../../../domain/resources/admin/constants.js';
|
|
5
|
-
import { POST_TYPES } from '../../../../../domain/resources/post/props.js';
|
|
6
4
|
import 'mime-types';
|
|
7
5
|
import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
|
|
8
6
|
import 'lucide-react';
|
|
@@ -34,6 +32,7 @@ import '../../../../../constants/paths/resources.js';
|
|
|
34
32
|
import '../../../../../constants/redirect-paths.js';
|
|
35
33
|
import { Accordion } from '../../ui/features/accordion/accordion.js';
|
|
36
34
|
import { AccordionContainer } from '../../ui/features/accordion/accordion-container.js';
|
|
35
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
37
36
|
import 'next/image';
|
|
38
37
|
|
|
39
38
|
function createAdminRelationsSection({
|
|
@@ -41,32 +40,24 @@ function createAdminRelationsSection({
|
|
|
41
40
|
}) {
|
|
42
41
|
return function AdminRelationsSection({
|
|
43
42
|
admin,
|
|
44
|
-
usableFields = [
|
|
45
|
-
"isActive",
|
|
46
|
-
"isIndexActive",
|
|
47
|
-
"isSlugActive",
|
|
48
|
-
"isFeatured",
|
|
49
|
-
"isShownOnHome"
|
|
50
|
-
],
|
|
43
|
+
usableFields = ["isActive", "index", "slug", "isFeatured", "isShownOnHome"],
|
|
51
44
|
headerProps
|
|
52
45
|
}) {
|
|
53
46
|
const { t } = useTranslator();
|
|
54
|
-
const
|
|
55
|
-
(p) => p.type === POST_TYPES.POST
|
|
56
|
-
);
|
|
47
|
+
const postIds = ensureArray(admin?.posts).map((p) => p.id);
|
|
57
48
|
return /* @__PURE__ */ jsx(AccordionContainer, { children: /* @__PURE__ */ jsx(
|
|
58
49
|
Accordion,
|
|
59
50
|
{
|
|
60
51
|
hasBorder: true,
|
|
61
52
|
accordionHeaderProps: {
|
|
62
|
-
count:
|
|
53
|
+
count: postIds.length,
|
|
63
54
|
isRelated: headerProps?.isRelated ?? true,
|
|
64
55
|
children: headerProps?.children ?? t("resources.post.text")
|
|
65
56
|
},
|
|
66
57
|
children: /* @__PURE__ */ jsx(
|
|
67
58
|
PostList,
|
|
68
59
|
{
|
|
69
|
-
postIds
|
|
60
|
+
postIds,
|
|
70
61
|
openNewTab: true,
|
|
71
62
|
type: null,
|
|
72
63
|
usableFields
|
|
@@ -46,15 +46,17 @@ function createCategoryList({
|
|
|
46
46
|
}) {
|
|
47
47
|
return function CategoryList({
|
|
48
48
|
usableFields = ["isActive", "index", "slug"],
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// search
|
|
50
|
+
type = POST_TYPES.CATEGORY,
|
|
51
51
|
topicId,
|
|
52
52
|
postIds,
|
|
53
|
-
//
|
|
53
|
+
// link
|
|
54
54
|
openNewTab = false,
|
|
55
|
-
//
|
|
55
|
+
// pick
|
|
56
56
|
pickedItems,
|
|
57
|
-
handleClick
|
|
57
|
+
handleClick,
|
|
58
|
+
// item states
|
|
59
|
+
setItemStates
|
|
58
60
|
}) {
|
|
59
61
|
const [page, setPage] = useState(1);
|
|
60
62
|
const [pageSize, setPageSize] = useState(20);
|
|
@@ -66,14 +68,16 @@ function createCategoryList({
|
|
|
66
68
|
const [controlFields, setControlFields] = useState({
|
|
67
69
|
isActive: false,
|
|
68
70
|
index: false,
|
|
69
|
-
slug: false
|
|
71
|
+
slug: false,
|
|
72
|
+
isFeatured: false,
|
|
73
|
+
isShownOnHome: false
|
|
70
74
|
});
|
|
71
75
|
useEffect(() => {
|
|
72
76
|
queueMicrotask(() => setPage(1));
|
|
73
77
|
}, [controlFields, setPage]);
|
|
74
78
|
const { data, isFetching } = useQuery(
|
|
75
79
|
() => postFindListCardsAction({
|
|
76
|
-
type
|
|
80
|
+
type,
|
|
77
81
|
page,
|
|
78
82
|
pageSize,
|
|
79
83
|
searchString,
|
|
@@ -83,6 +87,7 @@ function createCategoryList({
|
|
|
83
87
|
}),
|
|
84
88
|
[
|
|
85
89
|
CACHE_KEYS.findListCards("category"),
|
|
90
|
+
type,
|
|
86
91
|
page,
|
|
87
92
|
pageSize,
|
|
88
93
|
searchString,
|
|
@@ -45,19 +45,13 @@ const postRelations = [
|
|
|
45
45
|
"postsAsImage4"
|
|
46
46
|
];
|
|
47
47
|
function createFileRelationsSection({
|
|
48
|
-
|
|
48
|
+
autherEnabled,
|
|
49
49
|
AdminList,
|
|
50
50
|
PostList
|
|
51
51
|
}) {
|
|
52
52
|
return function FileRelationsSection({
|
|
53
53
|
file,
|
|
54
|
-
usableFields = [
|
|
55
|
-
"isActive",
|
|
56
|
-
"isIndexActive",
|
|
57
|
-
"isSlugActive",
|
|
58
|
-
"isFeatured",
|
|
59
|
-
"isShownOnHome"
|
|
60
|
-
],
|
|
54
|
+
usableFields = ["isActive", "index", "slug", "isFeatured", "isShownOnHome"],
|
|
61
55
|
headerProps
|
|
62
56
|
}) {
|
|
63
57
|
const { t } = useTranslator();
|
|
@@ -67,9 +61,8 @@ function createFileRelationsSection({
|
|
|
67
61
|
...new Set(postRelations.flatMap((key) => file[key].map((p) => p.id)))
|
|
68
62
|
];
|
|
69
63
|
}, [file]);
|
|
70
|
-
console.log(postIds);
|
|
71
64
|
return /* @__PURE__ */ jsxs(AccordionContainer, { children: [
|
|
72
|
-
|
|
65
|
+
autherEnabled && file?.type === "IMAGE" && file?.adminAsAvatarImage.length > 0 && /* @__PURE__ */ jsx(
|
|
73
66
|
Accordion,
|
|
74
67
|
{
|
|
75
68
|
hasBorder: true,
|
|
@@ -6,6 +6,8 @@ import '../../../../../constants/paths/main.js';
|
|
|
6
6
|
import '../../../../../constants/paths/resources.js';
|
|
7
7
|
import { CACHE_KEYS } from '../../../../../constants/cache-keys.js';
|
|
8
8
|
import '../../../../../constants/redirect-paths.js';
|
|
9
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
10
|
+
import { POST_TYPES } from '../../../../../domain/resources/post/props.js';
|
|
9
11
|
import 'mime-types';
|
|
10
12
|
import { debounce } from '../../../../../shared/utils/debounce.js';
|
|
11
13
|
import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
|
|
@@ -33,7 +35,6 @@ import '@radix-ui/react-tabs';
|
|
|
33
35
|
import '@radix-ui/react-tooltip';
|
|
34
36
|
import { ListCardsContainer } from '../../ui/blocks/list-cards-container/list-cards-container.js';
|
|
35
37
|
import 'next/link';
|
|
36
|
-
import '../../../../../domain/resources/admin/constants.js';
|
|
37
38
|
import 'next/image';
|
|
38
39
|
import { Tick } from '../../ui/features/tick.js';
|
|
39
40
|
import { ControlFieldsButtons } from './control-fields-buttons.js';
|
|
@@ -44,19 +45,19 @@ function createPostList({
|
|
|
44
45
|
PostCard
|
|
45
46
|
}) {
|
|
46
47
|
return function PostList({
|
|
47
|
-
usableFields,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
setItemStates,
|
|
51
|
-
// Fetch Condition
|
|
48
|
+
usableFields = ["isActive", "index", "slug", "isFeatured", "isShownOnHome"],
|
|
49
|
+
// search
|
|
50
|
+
type = POST_TYPES.POST,
|
|
52
51
|
topicId,
|
|
53
52
|
postIds,
|
|
54
|
-
|
|
53
|
+
excludeId,
|
|
54
|
+
// link
|
|
55
55
|
openNewTab = false,
|
|
56
|
-
//
|
|
56
|
+
// pick
|
|
57
57
|
pickedItems,
|
|
58
58
|
handleClick,
|
|
59
|
-
|
|
59
|
+
// item states
|
|
60
|
+
setItemStates
|
|
60
61
|
}) {
|
|
61
62
|
const [page, setPage] = useState(1);
|
|
62
63
|
const [pageSize, setPageSize] = useState(20);
|
|
@@ -77,31 +78,30 @@ function createPostList({
|
|
|
77
78
|
}, [controlFields, setPage]);
|
|
78
79
|
const { data, isFetching } = useQuery(
|
|
79
80
|
() => postFindListCardsAction({
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
|
|
81
81
|
type,
|
|
82
82
|
page,
|
|
83
83
|
pageSize,
|
|
84
84
|
searchString,
|
|
85
85
|
...topicId && { topicId },
|
|
86
86
|
...postIds && { postIds },
|
|
87
|
+
...excludeId && { excludeId },
|
|
87
88
|
...controlFields
|
|
88
89
|
}),
|
|
89
90
|
[
|
|
90
91
|
CACHE_KEYS.findListCards("post"),
|
|
92
|
+
type,
|
|
91
93
|
page,
|
|
92
94
|
pageSize,
|
|
93
95
|
searchString,
|
|
94
96
|
topicId,
|
|
95
97
|
JSON.stringify(postIds),
|
|
98
|
+
JSON.stringify(excludeId),
|
|
96
99
|
JSON.stringify(controlFields)
|
|
97
100
|
],
|
|
98
101
|
{ enabled: topicId !== DO_NOT_FETCH_KEY }
|
|
99
102
|
// Use in Post Topic Page
|
|
100
103
|
);
|
|
101
|
-
const posts = useMemo(
|
|
102
|
-
() => ensureArray(data?.items).filter((i) => i.id !== excludeId),
|
|
103
|
-
[data?.items, excludeId]
|
|
104
|
-
);
|
|
104
|
+
const posts = useMemo(() => ensureArray(data?.items), [data?.items]);
|
|
105
105
|
useEffect(() => {
|
|
106
106
|
setItemStates?.({
|
|
107
107
|
items: posts,
|
|
@@ -40,13 +40,7 @@ function createPostRelationsSection({
|
|
|
40
40
|
}) {
|
|
41
41
|
return function PostRelationsSection({
|
|
42
42
|
post,
|
|
43
|
-
usableFields = [
|
|
44
|
-
"isActive",
|
|
45
|
-
"isIndexActive",
|
|
46
|
-
"isSlugActive",
|
|
47
|
-
"isFeatured",
|
|
48
|
-
"isShownOnHome"
|
|
49
|
-
],
|
|
43
|
+
usableFields = ["isActive", "index", "slug", "isFeatured", "isShownOnHome"],
|
|
50
44
|
headerProps
|
|
51
45
|
}) {
|
|
52
46
|
const { t } = useTranslator();
|
|
@@ -44,11 +44,13 @@ function createTopicList({
|
|
|
44
44
|
}) {
|
|
45
45
|
return function TopicList({
|
|
46
46
|
usableFields = ["isActive", "index", "slug"],
|
|
47
|
-
//
|
|
48
|
-
|
|
49
|
-
//
|
|
47
|
+
// search
|
|
48
|
+
type = POST_TYPES.TOPIC,
|
|
49
|
+
// pick
|
|
50
50
|
pickedItems,
|
|
51
|
-
handleClick
|
|
51
|
+
handleClick,
|
|
52
|
+
// item states
|
|
53
|
+
setItemStates
|
|
52
54
|
}) {
|
|
53
55
|
const [page, setPage] = useState(1);
|
|
54
56
|
const [pageSize, setPageSize] = useState(20);
|
|
@@ -60,14 +62,16 @@ function createTopicList({
|
|
|
60
62
|
const [controlFields, setControlFields] = useState({
|
|
61
63
|
isActive: false,
|
|
62
64
|
index: false,
|
|
63
|
-
slug: false
|
|
65
|
+
slug: false,
|
|
66
|
+
isFeatured: false,
|
|
67
|
+
isShownOnHome: false
|
|
64
68
|
});
|
|
65
69
|
useEffect(() => {
|
|
66
70
|
queueMicrotask(() => setPage(1));
|
|
67
71
|
}, [controlFields, setPage]);
|
|
68
72
|
const { data, isFetching } = useQuery(
|
|
69
73
|
() => postFindListCardsAction({
|
|
70
|
-
type
|
|
74
|
+
type,
|
|
71
75
|
page,
|
|
72
76
|
pageSize,
|
|
73
77
|
searchString,
|
|
@@ -75,6 +79,7 @@ function createTopicList({
|
|
|
75
79
|
}),
|
|
76
80
|
[
|
|
77
81
|
CACHE_KEYS.findListCards("topic"),
|
|
82
|
+
type,
|
|
78
83
|
page,
|
|
79
84
|
pageSize,
|
|
80
85
|
searchString,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AdminCard, createAdminList, createAdminRelationsSection, ActiveSessionsBadge, AdminRefreshTokenCard, createFileCard, createFileList, createFileRelationsSection, FolderCard, createFolderList, FolderFullPath, createFileManagerList, createFolderRelationsSection, createPostCard, createPostList, createPostRelationsSection, PostTypeGate, CategoryCard, createCategoryList, createCategoryRelationsSection, TopicCard, createTopicList,
|
|
1
|
+
export { AdminCard, createAdminList, createAdminRelationsSection, ActiveSessionsBadge, AdminRefreshTokenCard, createFileCard, createFileList, createFileRelationsSection, FolderCard, createFolderList, FolderFullPath, createFileManagerList, createFolderRelationsSection, createPostCard, createPostList, createPostRelationsSection, PostTypeGate, CategoryCard, createCategoryList, createCategoryRelationsSection, TopicCard, createTopicList, TagCard, createTagList, createTagRelationsSection, } from "../../../../src/client/interfaces/components/resources";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../export/client/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EAErB,cAAc,EACd,cAAc,EACd,0BAA0B,EAE1B,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,4BAA4B,EAE5B,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,8BAA8B,EAE9B,SAAS,EACT,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../export/client/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,EAErB,cAAc,EACd,cAAc,EACd,0BAA0B,EAE1B,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,4BAA4B,EAE5B,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,YAAY,EAEZ,YAAY,EACZ,kBAAkB,EAClB,8BAA8B,EAE9B,SAAS,EACT,eAAe,EAEf,OAAO,EACP,aAAa,EACb,yBAAyB,GAC1B,MAAM,wDAAwD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/admin/admin-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAK/B,UAAU,cAAc;IACtB,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,wBAAwB,GACzB,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,wBAAwB,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;CAC7E,IAC2B,oEASvB,cAAc,
|
|
1
|
+
{"version":3,"file":"admin-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/admin/admin-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAK/B,UAAU,cAAc;IACtB,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpE,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,wBAAwB,GACzB,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,wBAAwB,EAAE,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;CAC7E,IAC2B,oEASvB,cAAc,6CAmFlB"}
|
package/dist/types/src/client/interfaces/components/resources/admin/admin-relations-section.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/admin/admin-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"admin-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/admin/admin-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKxD,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IACuC,uCAInC;IACD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;CACpE,6CA2BF"}
|
|
@@ -5,16 +5,17 @@ import { type MultiItems, type PostListCard, type SingleItem } from "../../../..
|
|
|
5
5
|
import { type ListItemsState } from "../../../../../shared";
|
|
6
6
|
interface CategoryListProps {
|
|
7
7
|
usableFields: string[];
|
|
8
|
+
type?: string;
|
|
8
9
|
topicId?: string;
|
|
9
10
|
postIds?: string[];
|
|
10
11
|
openNewTab?: boolean;
|
|
11
12
|
pickedItems?: MultiItems;
|
|
12
|
-
setItemStates?: Dispatch<SetStateAction<ListItemsState<PostListCard>>>;
|
|
13
13
|
handleClick?: (item: SingleItem) => void;
|
|
14
|
+
setItemStates?: Dispatch<SetStateAction<ListItemsState<PostListCard>>>;
|
|
14
15
|
}
|
|
15
16
|
export declare function createCategoryList({ useQuery, postFindListCardsAction, }: {
|
|
16
17
|
useQuery: ReturnType<typeof createUseQuery>;
|
|
17
18
|
postFindListCardsAction: ReturnType<typeof createPostFindListCardsAction>;
|
|
18
|
-
}): ({ usableFields,
|
|
19
|
+
}): ({ usableFields, type, topicId, postIds, openNewTab, pickedItems, handleClick, setItemStates, }: CategoryListProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
20
|
export {};
|
|
20
21
|
//# sourceMappingURL=category-list.d.ts.map
|
package/dist/types/src/client/interfaces/components/resources/category/category-list.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/category/category-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"category-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/category/category-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAS/B,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,kBAAkB,CAAC,EACjC,QAAQ,EACR,uBAAuB,GACxB,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,uBAAuB,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;CAC3E,IAC8B,gGAa1B,iBAAiB,6CA6GrB"}
|
package/dist/types/src/client/interfaces/components/resources/file/file-relations-section.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import type { FileFull } from "../../../../../domain/resources/file/full";
|
|
|
2
2
|
import type { AccordionHeaderProps } from "../../ui/features/accordion/accordion-header";
|
|
3
3
|
import type { createAdminList } from "../admin/admin-list";
|
|
4
4
|
import type { createPostList } from "../post/post-list";
|
|
5
|
-
export declare function createFileRelationsSection({
|
|
6
|
-
|
|
5
|
+
export declare function createFileRelationsSection({ autherEnabled, AdminList, PostList, }: {
|
|
6
|
+
autherEnabled: boolean;
|
|
7
7
|
AdminList: ReturnType<typeof createAdminList>;
|
|
8
8
|
PostList: ReturnType<typeof createPostList>;
|
|
9
9
|
}): ({ file, usableFields, headerProps, }: {
|
package/dist/types/src/client/interfaces/components/resources/file/file-relations-section.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/file/file-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBxD,wBAAgB,0BAA0B,CAAC,EACzC,
|
|
1
|
+
{"version":3,"file":"file-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/file/file-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBxD,wBAAgB,0BAA0B,CAAC,EACzC,aAAa,EACb,SAAS,EACT,QAAQ,GACT,EAAE;IACD,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;IAC9C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IACsC,sCAIlC;IACD,IAAI,EAAE,QAAQ,GAAG,IAAI,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;CACpE,6CAmDF"}
|
|
@@ -3,6 +3,6 @@ export { createFileCard, createFileList, createFileRelationsSection, } from "./f
|
|
|
3
3
|
export { FolderCard, createFolderList, FolderFullPath, createFileManagerList, createFolderRelationsSection, } from "./folder";
|
|
4
4
|
export { createPostCard, createPostList, createPostRelationsSection, PostTypeGate, } from "./post";
|
|
5
5
|
export { CategoryCard, createCategoryList, createCategoryRelationsSection, } from "./category";
|
|
6
|
-
export { TopicCard, createTopicList
|
|
6
|
+
export { TopicCard, createTopicList } from "./topic";
|
|
7
7
|
export { TagCard, createTagList, createTagRelationsSection } from "./tag";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/client/interfaces/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,YAAY,GACb,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/client/interfaces/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,2BAA2B,EAC3B,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,YAAY,GACb,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,8BAA8B,GAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -2,23 +2,23 @@ import type { createPostCard } from "./post-card";
|
|
|
2
2
|
import type { createPostFindListCardsAction } from "../../../../../server";
|
|
3
3
|
import type { createUseQuery } from "../../../../infrastructure";
|
|
4
4
|
import type { Dispatch, SetStateAction } from "react";
|
|
5
|
-
import { type MultiItems, type PostListCard, type
|
|
5
|
+
import { type MultiItems, type PostListCard, type SingleItem } from "../../../../../domain";
|
|
6
6
|
import { type ListItemsState } from "../../../../../shared";
|
|
7
7
|
interface PostListProps {
|
|
8
8
|
usableFields: string[];
|
|
9
|
-
type
|
|
10
|
-
setItemStates?: Dispatch<SetStateAction<ListItemsState<PostListCard>>>;
|
|
9
|
+
type?: string | null;
|
|
11
10
|
topicId?: string;
|
|
12
11
|
postIds?: string[];
|
|
12
|
+
excludeId?: string;
|
|
13
13
|
openNewTab?: boolean;
|
|
14
14
|
pickedItems?: MultiItems;
|
|
15
15
|
handleClick?: (item: SingleItem) => void;
|
|
16
|
-
|
|
16
|
+
setItemStates?: Dispatch<SetStateAction<ListItemsState<PostListCard>>>;
|
|
17
17
|
}
|
|
18
18
|
export declare function createPostList({ useQuery, postFindListCardsAction, PostCard, }: {
|
|
19
19
|
useQuery: ReturnType<typeof createUseQuery>;
|
|
20
20
|
postFindListCardsAction: ReturnType<typeof createPostFindListCardsAction>;
|
|
21
21
|
PostCard: ReturnType<typeof createPostCard>;
|
|
22
|
-
}): ({ usableFields, type,
|
|
22
|
+
}): ({ usableFields, type, topicId, postIds, excludeId, openNewTab, pickedItems, handleClick, setItemStates, }: PostListProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export {};
|
|
24
24
|
//# sourceMappingURL=post-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,
|
|
1
|
+
{"version":3,"file":"post-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAQ/B,UAAU,aAAa;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,uBAAuB,EACvB,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,uBAAuB,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;IAC1E,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IAC0B,2GActB,aAAa,6CAgHjB"}
|
package/dist/types/src/client/interfaces/components/resources/post/post-relations-section.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"post-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAKzF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IACsC,
|
|
1
|
+
{"version":3,"file":"post-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/post/post-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAKzF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IACsC,sCAIlC;IACD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;CACpE,6CA4BF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/topic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/topic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -5,13 +5,14 @@ import { type MultiItems, type PostListCard, type SingleItem } from "../../../..
|
|
|
5
5
|
import { type ListItemsState } from "../../../../../shared";
|
|
6
6
|
interface TopicListProps {
|
|
7
7
|
usableFields?: string[];
|
|
8
|
-
|
|
8
|
+
type?: string;
|
|
9
9
|
pickedItems?: MultiItems;
|
|
10
10
|
handleClick?: (item: SingleItem) => void;
|
|
11
|
+
setItemStates?: Dispatch<SetStateAction<ListItemsState<PostListCard>>>;
|
|
11
12
|
}
|
|
12
13
|
export declare function createTopicList({ useQuery, postFindListCardsAction, }: {
|
|
13
14
|
useQuery: ReturnType<typeof createUseQuery>;
|
|
14
15
|
postFindListCardsAction: ReturnType<typeof createPostFindListCardsAction>;
|
|
15
|
-
}): ({ usableFields,
|
|
16
|
+
}): ({ usableFields, type, pickedItems, handleClick, setItemStates, }: TopicListProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=topic-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/topic/topic-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"topic-list.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/topic/topic-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,YAAY,EAEjB,KAAK,UAAU,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAS/B,UAAU,cAAc;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;CACxE;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,uBAAuB,GACxB,EAAE;IACD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,uBAAuB,EAAE,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;CAC3E,IAC2B,kEASvB,cAAc,6CAuGlB"}
|
package/package.json
CHANGED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useTranslator } from 'intor/react';
|
|
4
|
-
import '../../../../../domain/resources/admin/constants.js';
|
|
5
|
-
import { POST_TYPES } from '../../../../../domain/resources/post/props.js';
|
|
6
|
-
import 'mime-types';
|
|
7
|
-
import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
|
|
8
|
-
import 'lucide-react';
|
|
9
|
-
import 'react';
|
|
10
|
-
import 'ua-parser-js';
|
|
11
|
-
import 'clsx';
|
|
12
|
-
import 'tailwind-merge';
|
|
13
|
-
import 'next/navigation';
|
|
14
|
-
import '@radix-ui/react-avatar';
|
|
15
|
-
import '../../shadcn/badge.js';
|
|
16
|
-
import '../../shadcn/button.js';
|
|
17
|
-
import '@radix-ui/react-collapsible';
|
|
18
|
-
import '@radix-ui/react-dialog';
|
|
19
|
-
import '@radix-ui/react-dropdown-menu';
|
|
20
|
-
import '../../shadcn/input-group.js';
|
|
21
|
-
import '../../shadcn/item.js';
|
|
22
|
-
import '@radix-ui/react-label';
|
|
23
|
-
import '@radix-ui/react-select';
|
|
24
|
-
import '@radix-ui/react-separator';
|
|
25
|
-
import '../../shadcn/sidebar.js';
|
|
26
|
-
import 'next-themes';
|
|
27
|
-
import 'sonner';
|
|
28
|
-
import '@radix-ui/react-tabs';
|
|
29
|
-
import '@radix-ui/react-tooltip';
|
|
30
|
-
import 'next/link';
|
|
31
|
-
import '../../../../../constants/paths/auth.js';
|
|
32
|
-
import '../../../../../constants/paths/main.js';
|
|
33
|
-
import '../../../../../constants/paths/resources.js';
|
|
34
|
-
import '../../../../../constants/redirect-paths.js';
|
|
35
|
-
import { Accordion } from '../../ui/features/accordion/accordion.js';
|
|
36
|
-
import { AccordionContainer } from '../../ui/features/accordion/accordion-container.js';
|
|
37
|
-
import 'next/image';
|
|
38
|
-
|
|
39
|
-
function createTopicRelationsSection({
|
|
40
|
-
CategoryList,
|
|
41
|
-
PostList
|
|
42
|
-
}) {
|
|
43
|
-
return function TopicRelationsSection({
|
|
44
|
-
topic,
|
|
45
|
-
categoryUsableFields = ["isActive", "isIndexActive", "isSlugActive"],
|
|
46
|
-
postUsableFields = [
|
|
47
|
-
"isActive",
|
|
48
|
-
"isIndexActive",
|
|
49
|
-
"isSlugActive",
|
|
50
|
-
"isFeatured",
|
|
51
|
-
"isShownOnHome"
|
|
52
|
-
],
|
|
53
|
-
categoryHeaderProps,
|
|
54
|
-
postHeaderProps
|
|
55
|
-
}) {
|
|
56
|
-
const { t } = useTranslator();
|
|
57
|
-
const postsInTopic = ensureArray(topic?.postsInTopic);
|
|
58
|
-
const categories = postsInTopic.filter(
|
|
59
|
-
(p) => p.type === POST_TYPES.CATEGORY
|
|
60
|
-
);
|
|
61
|
-
const posts = postsInTopic.filter((p) => p.type === POST_TYPES.POST);
|
|
62
|
-
return /* @__PURE__ */ jsxs(AccordionContainer, { children: [
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
64
|
-
Accordion,
|
|
65
|
-
{
|
|
66
|
-
hasBorder: true,
|
|
67
|
-
accordionHeaderProps: {
|
|
68
|
-
count: categories.length,
|
|
69
|
-
isRelated: categoryHeaderProps?.isRelated ?? true,
|
|
70
|
-
children: categoryHeaderProps?.children ?? t("resources.category.text")
|
|
71
|
-
},
|
|
72
|
-
children: /* @__PURE__ */ jsx(
|
|
73
|
-
CategoryList,
|
|
74
|
-
{
|
|
75
|
-
postIds: categories.map((p) => p.id),
|
|
76
|
-
openNewTab: true,
|
|
77
|
-
usableFields: categoryUsableFields
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
/* @__PURE__ */ jsx(
|
|
83
|
-
Accordion,
|
|
84
|
-
{
|
|
85
|
-
hasBorder: true,
|
|
86
|
-
accordionHeaderProps: {
|
|
87
|
-
count: posts.length,
|
|
88
|
-
isRelated: postHeaderProps?.isRelated ?? true,
|
|
89
|
-
children: postHeaderProps?.children ?? t("resources.post.text")
|
|
90
|
-
},
|
|
91
|
-
children: /* @__PURE__ */ jsx(
|
|
92
|
-
PostList,
|
|
93
|
-
{
|
|
94
|
-
postIds: posts.map((p) => p.id),
|
|
95
|
-
openNewTab: true,
|
|
96
|
-
type: null,
|
|
97
|
-
usableFields: postUsableFields
|
|
98
|
-
}
|
|
99
|
-
)
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
] });
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { createTopicRelationsSection };
|
package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PostFull } from "../../../../../domain/resources/post/full";
|
|
2
|
-
import type { AccordionHeaderProps } from "../../ui/features/accordion/accordion-header";
|
|
3
|
-
import type { createCategoryList } from "../category";
|
|
4
|
-
import type { createPostList } from "../post";
|
|
5
|
-
export declare function createTopicRelationsSection({ CategoryList, PostList, }: {
|
|
6
|
-
CategoryList: ReturnType<typeof createCategoryList>;
|
|
7
|
-
PostList: ReturnType<typeof createPostList>;
|
|
8
|
-
}): ({ topic, categoryUsableFields, postUsableFields, categoryHeaderProps, postHeaderProps, }: {
|
|
9
|
-
topic?: PostFull;
|
|
10
|
-
categoryUsableFields?: string[];
|
|
11
|
-
postUsableFields?: string[];
|
|
12
|
-
categoryHeaderProps?: Pick<AccordionHeaderProps, "isRelated" | "children">;
|
|
13
|
-
postHeaderProps?: Pick<AccordionHeaderProps, "isRelated" | "children">;
|
|
14
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
//# sourceMappingURL=topic-relations-section.d.ts.map
|
package/dist/types/src/client/interfaces/components/resources/topic/topic-relations-section.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"topic-relations-section.d.ts","sourceRoot":"","sources":["../../../../../../../../src/client/interfaces/components/resources/topic/topic-relations-section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C,wBAAgB,2BAA2B,CAAC,EAC1C,YAAY,EACZ,QAAQ,GACT,EAAE;IACD,YAAY,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACpD,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,IACuC,0FAYnC;IACD,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,mBAAmB,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;IAC3E,eAAe,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,WAAW,GAAG,UAAU,CAAC,CAAC;CACxE,6CA+CF"}
|