sitero 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/export/cms/client/components/index.js +1 -1
  2. package/dist/src/cms/client/interfaces/components/resources/admin/admin-fields.js +5 -0
  3. package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/_id_/edit/page.js +6 -4
  4. package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/_id_/page.js +6 -4
  5. package/dist/src/cms/client/interfaces/pages/dashboard/system/access/admin/create/page.js +6 -4
  6. package/dist/src/config/{author.js → admin.js} +5 -1
  7. package/dist/src/core/infrastructure/prisma/post/include.js +8 -5
  8. package/dist/src/core/infrastructure/prisma/post/mappers.js +10 -5
  9. package/dist/src/web/server/resources/post/actions.js +4 -24
  10. package/dist/types/export/cms/client/components/index.d.ts +1 -1
  11. package/dist/types/export/cms/client/components/index.d.ts.map +1 -1
  12. package/dist/types/export/index.d.ts +1 -1
  13. package/dist/types/export/index.d.ts.map +1 -1
  14. package/dist/types/src/cms/client/interfaces/components/resources/admin/admin-fields.d.ts +7 -0
  15. package/dist/types/src/cms/client/interfaces/components/resources/admin/admin-fields.d.ts.map +1 -0
  16. package/dist/types/src/cms/client/interfaces/components/resources/admin/index.d.ts +1 -1
  17. package/dist/types/src/cms/client/interfaces/components/resources/admin/index.d.ts.map +1 -1
  18. package/dist/types/src/cms/client/interfaces/components/resources/index.d.ts +1 -1
  19. package/dist/types/src/cms/client/interfaces/components/resources/index.d.ts.map +1 -1
  20. package/dist/types/src/cms/client/interfaces/components/resources/post/content/types.d.ts +1 -1
  21. package/dist/types/src/cms/client/interfaces/components/resources/post/content/types.d.ts.map +1 -1
  22. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/edit/page.d.ts +2 -2
  23. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/edit/page.d.ts.map +1 -1
  24. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/page.d.ts +2 -2
  25. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/page.d.ts.map +1 -1
  26. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/create/page.d.ts +2 -2
  27. package/dist/types/src/cms/client/interfaces/pages/dashboard/system/access/admin/create/page.d.ts.map +1 -1
  28. package/dist/types/src/config/admin.d.ts +7 -0
  29. package/dist/types/src/config/admin.d.ts.map +1 -0
  30. package/dist/types/src/config/index.d.ts +1 -1
  31. package/dist/types/src/config/index.d.ts.map +1 -1
  32. package/dist/types/src/core/infrastructure/prisma/post/include.d.ts +50 -7
  33. package/dist/types/src/core/infrastructure/prisma/post/include.d.ts.map +1 -1
  34. package/dist/types/src/core/infrastructure/prisma/post/mappers.d.ts +3 -2
  35. package/dist/types/src/core/infrastructure/prisma/post/mappers.d.ts.map +1 -1
  36. package/dist/types/src/core/infrastructure/prisma/post/types.d.ts +4 -1
  37. package/dist/types/src/core/infrastructure/prisma/post/types.d.ts.map +1 -1
  38. package/dist/types/src/web/contracts/resources/post/actions.d.ts +1 -2
  39. package/dist/types/src/web/contracts/resources/post/actions.d.ts.map +1 -1
  40. package/dist/types/src/web/server/resources/post/actions.d.ts.map +1 -1
  41. package/package.json +3 -3
  42. package/dist/src/cms/client/interfaces/components/resources/admin/author-fields.js +0 -5
  43. package/dist/types/src/cms/client/interfaces/components/resources/admin/author-fields.d.ts +0 -7
  44. package/dist/types/src/cms/client/interfaces/components/resources/admin/author-fields.d.ts.map +0 -1
  45. package/dist/types/src/config/author.d.ts +0 -4
  46. package/dist/types/src/config/author.d.ts.map +0 -1
@@ -69,4 +69,4 @@ import '../../../../src/cms/client/interfaces/components/ui/inputs/switch-input.
69
69
  export { PasswordInput } from '../../../../src/cms/client/interfaces/components/ui/inputs/password-input.js';
70
70
  export { Option, Select } from '../../../../src/cms/client/interfaces/components/ui/inputs/select.js';
71
71
  export { createAllowPostField } from '../../../../src/cms/client/interfaces/components/resources/post/content/types.js';
72
- export { createAllowAuthorField } from '../../../../src/cms/client/interfaces/components/resources/admin/author-fields.js';
72
+ export { createAllowAdminField } from '../../../../src/cms/client/interfaces/components/resources/admin/admin-fields.js';
@@ -0,0 +1,5 @@
1
+ function createAllowAdminField(fields) {
2
+ return ({ field }) => fields.includes(field);
3
+ }
4
+
5
+ export { createAllowAdminField };
@@ -4,7 +4,7 @@ import { useTranslator } from 'intor/react';
4
4
  import { ShieldUser } from 'lucide-react';
5
5
  import { useParams, useRouter } from 'next/navigation';
6
6
  import { ADMIN_ROLES } from 'sitero-domain';
7
- import { AUTHOR_FIELDS } from '../../../../../../../../../../config/author.js';
7
+ import { ADMIN_PREFERENCE_FIELDS, AUTHOR_FIELDS } from '../../../../../../../../../../config/admin.js';
8
8
  import { CMS_PATHS } from '../../../../../../../../../../constants/paths/cms-paths.js';
9
9
  import '../../../../../../../../../../constants/paths/redirect.js';
10
10
  import { CMS_LOCALES_ARRAY } from '../../../../../../../../../../constants/cms-locale.js';
@@ -122,8 +122,10 @@ function createAdminEditPage({
122
122
  fieldErrors
123
123
  );
124
124
  const fieldErrorMessages = getCmsFieldErrorMessageMap(localizedFieldErrors);
125
- const PreferenceFieldsCard = /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
126
- /* @__PURE__ */ jsx(
125
+ const PreferenceFieldsCard = ADMIN_PREFERENCE_FIELDS.some(
126
+ (field) => allowField({ field })
127
+ ) && /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
128
+ allowField({ field: "preferredLocale" }) && /* @__PURE__ */ jsx(
127
129
  FormField,
128
130
  {
129
131
  controlId: "preferredLocale",
@@ -147,7 +149,7 @@ function createAdminEditPage({
147
149
  )
148
150
  }
149
151
  ),
150
- /* @__PURE__ */ jsx(
152
+ allowField({ field: "receivesInquiryNotifications" }) && /* @__PURE__ */ jsx(
151
153
  FormField,
152
154
  {
153
155
  controlId: "receivesInquiryNotifications",
@@ -7,7 +7,7 @@ import { ADMIN_ROLES } from 'sitero-domain';
7
7
  import 'zod';
8
8
  import { useCmsCommand } from '../../../../../../../infrastructure/operation-result/use-cms-command.js';
9
9
  import { useCmsQuery } from '../../../../../../../infrastructure/operation-result/use-cms-query.js';
10
- import { AUTHOR_FIELDS } from '../../../../../../../../../config/author.js';
10
+ import { ADMIN_PREFERENCE_FIELDS, AUTHOR_FIELDS } from '../../../../../../../../../config/admin.js';
11
11
  import { CMS_PATHS } from '../../../../../../../../../constants/paths/cms-paths.js';
12
12
  import '../../../../../../../../../constants/paths/redirect.js';
13
13
  import { DATE_FORMAT_OPTIONS } from '../../../../../../../../../constants/date.js';
@@ -91,9 +91,11 @@ function createAdminShowPage({
91
91
  );
92
92
  const isSuperAdmin = admin?.role === ADMIN_ROLES.SUPER_ADMIN;
93
93
  const preferredLanguage = getLocaleLanguageCode(admin?.preferredLocale);
94
- const PreferenceFieldsCard = /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
95
- /* @__PURE__ */ jsx(Field, { label: t("resources.admin.preferred-locale.text"), children: /* @__PURE__ */ jsx(FieldBody, { isLoading: isFetching, children: preferredLanguage ? format.displayName(preferredLanguage, { type: "language" }) : "" }) }),
96
- /* @__PURE__ */ jsx(
94
+ const PreferenceFieldsCard = ADMIN_PREFERENCE_FIELDS.some(
95
+ (field) => allowField({ field })
96
+ ) && /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
97
+ allowField({ field: "preferredLocale" }) && /* @__PURE__ */ jsx(Field, { label: t("resources.admin.preferred-locale.text"), children: /* @__PURE__ */ jsx(FieldBody, { isLoading: isFetching, children: preferredLanguage ? format.displayName(preferredLanguage, { type: "language" }) : "" }) }),
98
+ allowField({ field: "receivesInquiryNotifications" }) && /* @__PURE__ */ jsx(
97
99
  Field,
98
100
  {
99
101
  htmlFor: "receivesInquiryNotifications",
@@ -4,7 +4,7 @@ import { useTranslator } from 'intor/react';
4
4
  import { ShieldUser } from 'lucide-react';
5
5
  import { useRouter } from 'next/navigation';
6
6
  import { ADMIN_ROLE_ARRAY, ADMIN_ROLES } from 'sitero-domain';
7
- import { AUTHOR_FIELDS } from '../../../../../../../../../config/author.js';
7
+ import { ADMIN_PREFERENCE_FIELDS, AUTHOR_FIELDS } from '../../../../../../../../../config/admin.js';
8
8
  import { CMS_PATHS } from '../../../../../../../../../constants/paths/cms-paths.js';
9
9
  import '../../../../../../../../../constants/paths/redirect.js';
10
10
  import { CMS_LOCALES_ARRAY } from '../../../../../../../../../constants/cms-locale.js';
@@ -102,8 +102,10 @@ function createAdminCreatePage({
102
102
  fieldErrors
103
103
  );
104
104
  const fieldErrorMessages = getCmsFieldErrorMessageMap(localizedFieldErrors);
105
- const PreferenceFieldsCard = /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
106
- /* @__PURE__ */ jsx(
105
+ const PreferenceFieldsCard = ADMIN_PREFERENCE_FIELDS.some(
106
+ (field) => allowField({ field })
107
+ ) && /* @__PURE__ */ jsxs(Card, { className: cn("flex flex-col gap-6", "bg-base-100 p-4"), children: [
108
+ allowField({ field: "preferredLocale" }) && /* @__PURE__ */ jsx(
107
109
  FormField,
108
110
  {
109
111
  controlId: "preferredLocale",
@@ -126,7 +128,7 @@ function createAdminCreatePage({
126
128
  )
127
129
  }
128
130
  ),
129
- /* @__PURE__ */ jsx(
131
+ allowField({ field: "receivesInquiryNotifications" }) && /* @__PURE__ */ jsx(
130
132
  FormField,
131
133
  {
132
134
  controlId: "receivesInquiryNotifications",
@@ -9,5 +9,9 @@ const AUTHOR_FIELDS = [
9
9
  "homeLocation",
10
10
  "nationality"
11
11
  ];
12
+ const ADMIN_PREFERENCE_FIELDS = [
13
+ "preferredLocale",
14
+ "receivesInquiryNotifications"
15
+ ];
12
16
 
13
- export { AUTHOR_FIELDS };
17
+ export { ADMIN_PREFERENCE_FIELDS, AUTHOR_FIELDS };
@@ -1,10 +1,14 @@
1
1
  const POST_REFERENCE_INCLUDE = {
2
2
  translations: true
3
3
  };
4
+ const POST_REFERENCE_WITH_COVER_INCLUDE = {
5
+ ...POST_REFERENCE_INCLUDE,
6
+ coverImage: { include: { translations: true } }
7
+ };
4
8
  const POST_LIST_CARD_INCLUDE = {
5
- translations: true,
9
+ ...POST_REFERENCE_WITH_COVER_INCLUDE,
6
10
  topic: { include: POST_REFERENCE_INCLUDE },
7
- coverImage: { include: { translations: true } }
11
+ parents: { include: POST_REFERENCE_WITH_COVER_INCLUDE }
8
12
  };
9
13
  const POST_DETAIL_INCLUDE = {
10
14
  ...POST_LIST_CARD_INCLUDE,
@@ -15,11 +19,10 @@ const POST_DETAIL_INCLUDE = {
15
19
  }
16
20
  },
17
21
  postsInTopic: { include: POST_REFERENCE_INCLUDE },
18
- parents: { include: POST_REFERENCE_INCLUDE },
19
22
  children: { include: POST_REFERENCE_INCLUDE },
20
23
  tags: { include: POST_REFERENCE_INCLUDE },
21
24
  taggedPosts: { include: POST_REFERENCE_INCLUDE },
22
- relatedPosts: { include: POST_REFERENCE_INCLUDE },
25
+ relatedPosts: { include: POST_LIST_CARD_INCLUDE },
23
26
  referencingPosts: { include: POST_REFERENCE_INCLUDE },
24
27
  contentImages: { include: { translations: true } },
25
28
  files1: { include: { translations: true } },
@@ -39,4 +42,4 @@ const POST_RELATIONS_INCLUDE = {
39
42
  }
40
43
  };
41
44
 
42
- export { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_REFERENCE_INCLUDE, POST_RELATIONS_INCLUDE };
45
+ export { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_REFERENCE_INCLUDE, POST_REFERENCE_WITH_COVER_INCLUDE, POST_RELATIONS_INCLUDE };
@@ -18,24 +18,29 @@ function postReferenceToDomain(post) {
18
18
  translations: post.translations.map(translationToDomain)
19
19
  };
20
20
  }
21
- function postListCardToDomain(post) {
21
+ function postReferenceWithCoverToDomain(post) {
22
22
  return {
23
23
  ...postReferenceToDomain(post),
24
- topic: post.topic ? postReferenceToDomain(post.topic) : null,
25
24
  coverImage: post.coverImage ? fileToCard(post.coverImage) : null
26
25
  };
27
26
  }
27
+ function postListCardToDomain(post) {
28
+ return {
29
+ ...postReferenceWithCoverToDomain(post),
30
+ topic: post.topic ? postReferenceToDomain(post.topic) : null,
31
+ parents: post.parents.map(postReferenceWithCoverToDomain)
32
+ };
33
+ }
28
34
  function postDetailToDomain(post) {
29
35
  const author = post.author ? adminListCardToDomain(post.author) : null;
30
36
  return {
31
37
  ...postListCardToDomain(post),
32
38
  author,
33
39
  postsInTopic: post.postsInTopic.map(postReferenceToDomain),
34
- parents: post.parents.map(postReferenceToDomain),
35
40
  children: post.children.map(postReferenceToDomain),
36
41
  tags: post.tags.map(postReferenceToDomain),
37
42
  taggedPosts: post.taggedPosts.map(postReferenceToDomain),
38
- relatedPosts: post.relatedPosts.map(postReferenceToDomain),
43
+ relatedPosts: post.relatedPosts.map(postListCardToDomain),
39
44
  referencingPosts: post.referencingPosts.map(postReferenceToDomain),
40
45
  contentImages: post.contentImages.map(fileToCard),
41
46
  files1: post.files1.map(fileToCard),
@@ -66,4 +71,4 @@ function postRelationsToDomain(post) {
66
71
  };
67
72
  }
68
73
 
69
- export { postDetailToDomain, postListCardToDomain, postReferenceToDomain, postRelationsToDomain };
74
+ export { postDetailToDomain, postListCardToDomain, postReferenceToDomain, postReferenceWithCoverToDomain, postRelationsToDomain };
@@ -4,8 +4,7 @@ import { operationResult } from 'sitero-server';
4
4
  function toWebPostListCard(post) {
5
5
  return {
6
6
  ...post,
7
- children: [],
8
- parents: []
7
+ children: []
9
8
  };
10
9
  }
11
10
  function toNullableWebPostListCard(post) {
@@ -31,12 +30,8 @@ function createWebPostActions({
31
30
  if (!result.success) return result;
32
31
  return operationResult.success({
33
32
  post: result.data.post,
34
- prev: await hydrateListCardParents(
35
- toNullableWebPostListCard(result.data.previous)
36
- ),
37
- next: await hydrateListCardParents(
38
- toNullableWebPostListCard(result.data.next)
39
- )
33
+ prev: toNullableWebPostListCard(result.data.previous),
34
+ next: toNullableWebPostListCard(result.data.next)
40
35
  });
41
36
  };
42
37
  const postFindListCardsAction = async (input) => {
@@ -51,19 +46,6 @@ function createWebPostActions({
51
46
  items: result.data.items.map(toWebPostListCard)
52
47
  });
53
48
  };
54
- async function hydrateListCardParents(post) {
55
- if (!post) return post;
56
- const response = await siteroServer.executor.execute(
57
- siteroServer.resources.post.findDetail,
58
- { id: post.id, isActive: true },
59
- {}
60
- );
61
- if (!response.success) return post;
62
- return {
63
- ...post,
64
- parents: response.data.post.parents
65
- };
66
- }
67
49
  const loadPage = async ({ pageSlug }) => {
68
50
  const response = await postFindDetailAction({
69
51
  type: POST_TYPES.PAGE,
@@ -212,9 +194,7 @@ function createWebPostActions({
212
194
  if (!response.success) {
213
195
  return { posts: [], total: 0, totalPages: 1 };
214
196
  }
215
- const posts = await Promise.all(
216
- (response.data?.items ?? []).map((post) => hydrateListCardParents(post))
217
- );
197
+ const posts = response.data?.items ?? [];
218
198
  const total = response.data?.total ?? 0;
219
199
  const totalPages = pageSize ? Math.max(1, Math.ceil(total / pageSize)) : 1;
220
200
  return {
@@ -10,5 +10,5 @@ export { PickDialog, PickerInput, type PickDialogProps, type PickerInputProps, t
10
10
  export { Form, FormField, type FormFieldControlProps, Field, FieldBody, FieldsContainer, MainFields, SideFields, ControlFields, type ControlMeta, } from "../../../../src/cms/client/interfaces/components/ui/form";
11
11
  export { Separator } from "../../../../src/cms/client/interfaces/components/shadcn";
12
12
  export { createNavbar, createCmsLayout, type NavItem, NavMain, Sidebar, SidebarContent, ContentContainer, } from "../../../../src/cms/client/interfaces/components/ui/layouts";
13
- export { createAllowAuthorField, type AllowAuthorField, } from "../../../../src/cms/client/interfaces/components/resources/admin";
13
+ export { createAllowAdminField, type AllowAdminField, } from "../../../../src/cms/client/interfaces/components/resources/admin";
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../export/cms/client/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,UAAU,GAChB,MAAM,oEAAoE,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,uEAAuE,CAAC;AAG/E,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,cAAc,GACf,MAAM,iEAAiE,CAAC;AAKzE,OAAO,EACL,iBAAiB,EACjB,WAAW,GACZ,MAAM,2DAA2D,CAAC;AAKnE,OAAO,EACL,KAAK,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,4DAA4D,CAAC;AAKpE,OAAO,EACL,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,6DAA6D,CAAC;AAKrE,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,GACN,MAAM,6DAA6D,CAAC;AAKrE,OAAO,EACL,gBAAgB,EAChB,aAAa,GACd,MAAM,4DAA4D,CAAC;AAKpE,OAAO,EACL,UAAU,EACV,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,gBAAgB,EAChB,IAAI,EACJ,SAAS,GACV,MAAM,8DAA8D,CAAC;AAKtE,OAAO,EACL,IAAI,EACJ,SAAS,EACT,KAAK,qBAAqB,EAC1B,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,aAAa,EACb,KAAK,WAAW,GACjB,MAAM,0DAA0D,CAAC;AAKlE,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AAKpF,OAAO,EAEL,YAAY,EAEZ,eAAe,EAEf,KAAK,OAAO,EACZ,OAAO,EACP,OAAO,EACP,cAAc,EAEd,gBAAgB,GACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,GACtB,MAAM,kEAAkE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../export/cms/client/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,UAAU,GAChB,MAAM,oEAAoE,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,KAAK,YAAY,GAClB,MAAM,uEAAuE,CAAC;AAG/E,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,cAAc,GACf,MAAM,iEAAiE,CAAC;AAKzE,OAAO,EACL,iBAAiB,EACjB,WAAW,GACZ,MAAM,2DAA2D,CAAC;AAKnE,OAAO,EACL,KAAK,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,MAAM,EACN,QAAQ,GACT,MAAM,4DAA4D,CAAC;AAKpE,OAAO,EACL,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,UAAU,GACX,MAAM,6DAA6D,CAAC;AAKrE,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,GACN,MAAM,6DAA6D,CAAC;AAKrE,OAAO,EACL,gBAAgB,EAChB,aAAa,GACd,MAAM,4DAA4D,CAAC;AAKpE,OAAO,EACL,UAAU,EACV,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,gBAAgB,EAChB,IAAI,EACJ,SAAS,GACV,MAAM,8DAA8D,CAAC;AAKtE,OAAO,EACL,IAAI,EACJ,SAAS,EACT,KAAK,qBAAqB,EAC1B,KAAK,EACL,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,aAAa,EACb,KAAK,WAAW,GACjB,MAAM,0DAA0D,CAAC;AAKlE,OAAO,EAAE,SAAS,EAAE,MAAM,yDAAyD,CAAC;AAKpF,OAAO,EAEL,YAAY,EAEZ,eAAe,EAEf,KAAK,OAAO,EACZ,OAAO,EACP,OAAO,EACP,cAAc,EAEd,gBAAgB,GACjB,MAAM,6DAA6D,CAAC;AAGrE,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,GACrB,MAAM,kEAAkE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export * from "sitero-domain";
2
2
  export { type RuntimePublicEnv, getServerPublicEnv, getRuntimePublicEnv, publicEnv, RuntimePublicEnvScript, } from "../src/env";
3
- export { type StaticAdmins, type AuthorField, type StaticTopics, getTopicCategories, getTopicPosts, getTopicProducts, getTopicSubcategories, hasTopicRole, isContentTopic, isProductTopic, type StaticPages, type StaticInquiry, type StaticConfigs, type SeoMetadataField, type PostField, type PostCustomStateField, type SiteConfig, EMAIL_DEFINITION_KEYS, type EmailRenderContext, type EmailCatalog, type EmailDefinition, type EmailDefinitionKey, type EmailLocaleDefinition, } from "../src/config";
3
+ export { type StaticAdmins, type AdminField, type StaticTopics, getTopicCategories, getTopicPosts, getTopicProducts, getTopicSubcategories, hasTopicRole, isContentTopic, isProductTopic, type StaticPages, type StaticInquiry, type StaticConfigs, type SeoMetadataField, type PostField, type PostCustomStateField, type SiteConfig, EMAIL_DEFINITION_KEYS, type EmailRenderContext, type EmailCatalog, type EmailDefinition, type EmailDefinitionKey, type EmailLocaleDefinition, } from "../src/config";
4
4
  export type { AdminDetail, AdminListCard, ConfigDetail, FileCard, FileDetail, PostListCard, PostDetail, PostReference, } from "sitero-server";
5
5
  export { CMS_PATHS, API_PATHS, NEW_TAB_REL, NEW_TAB_TARGET, DATE_FORMAT_OPTIONS, CMS_LOCALES_MAP, CMS_LOCALES_ARRAY, CMS_DEFAULT_LOCALE, } from "../src/constants";
6
6
  export { findTranslation, createBuildTranslations, cn, debounce, ensureArray, joinUrl, normalizeSlug, parsePositiveInt, toIsoTime, localeToFlagEmoji, createVersion, normalizeUnorderedCacheKey, dateToUi, deepMerge, TIME, type ListItemStates, DO_NOT_FETCH_KEY, } from "../src/shared";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../export/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAK9B,OAAO,EACL,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EAEZ,QAAQ,EACR,UAAU,EAEV,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAEL,eAAe,EACf,uBAAuB,EAGvB,EAAE,EACF,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,0BAA0B,EAC1B,QAAQ,EACR,SAAS,EAGT,IAAI,EAGJ,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../export/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAK9B,OAAO,EACL,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,sBAAsB,GACvB,MAAM,YAAY,CAAC;AAKpB,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,WAAW,EACX,aAAa,EACb,YAAY,EAEZ,QAAQ,EACR,UAAU,EAEV,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAEL,eAAe,EACf,uBAAuB,EAGvB,EAAE,EACF,QAAQ,EACR,WAAW,EACX,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,iBAAiB,EACjB,aAAa,EACb,0BAA0B,EAC1B,QAAQ,EACR,SAAS,EAGT,IAAI,EAGJ,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { AdminField } from "../../../../../../config";
2
+ export type AllowAdminField = (params: {
3
+ field: AdminField;
4
+ }) => boolean;
5
+ /** Creates a CMS visibility guard from the consumer's admin field allowlist. */
6
+ export declare function createAllowAdminField(fields: readonly AdminField[]): AllowAdminField;
7
+ //# sourceMappingURL=admin-fields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-fields.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/cms/client/interfaces/components/resources/admin/admin-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,KAAK,OAAO,CAAC;AAEzE,gFAAgF;AAChF,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,UAAU,EAAE,GAC5B,eAAe,CAEjB"}
@@ -3,5 +3,5 @@ export { createAdminList } from "./admin-list";
3
3
  export { AdminRelationsLink } from "./admin-relations-link";
4
4
  export { AdminSessionsLink } from "./admin-refresh-tokens/admin-sessions-link";
5
5
  export { AdminRefreshTokenCard } from "./admin-refresh-tokens/admin-refresh-token-card";
6
- export { createAllowAuthorField, type AllowAuthorField } from "./author-fields";
6
+ export { createAllowAdminField, type AllowAdminField } from "./admin-fields";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/cms/client/interfaces/components/resources/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAExF,OAAO,EAAE,sBAAsB,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/cms/client/interfaces/components/resources/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iDAAiD,CAAC;AAExF,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { createAllowAuthorField, type AllowAuthorField, createAdminCard, createAdminList, AdminRelationsLink, AdminSessionsLink, AdminRefreshTokenCard, } from "./admin";
1
+ export { createAllowAdminField, type AllowAdminField, createAdminCard, createAdminList, AdminRelationsLink, AdminSessionsLink, AdminRefreshTokenCard, } from "./admin";
2
2
  export { createFileCard, createFileList, FileRelationsLink } from "./file";
3
3
  export { createPostCard, createPostList, PostRelationsLink, createPostRelationsLayout, createPostCreateContent, createPostEditContent, createPostShowContent, createAllowPostField, } from "./post";
4
4
  export type { AllowPostField, AllowPostFieldParams, PostFieldRules, TopicPostFieldRules, } from "./post";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/cms/client/interfaces/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3E,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,mBAAmB,GACpB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../src/cms/client/interfaces/components/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAE3E,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,QAAQ,CAAC;AAChB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,mBAAmB,GACpB,MAAM,QAAQ,CAAC;AAEhB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -20,7 +20,7 @@ export type PostFieldRules<ExtraField extends string = never> = {
20
20
  default: (PostField | ExtraField)[];
21
21
  [fieldRuleKey: string]: (PostField | ExtraField)[];
22
22
  };
23
- export type TopicPostFieldRules<TopicKey extends string = string, ExtraField extends string = never> = Record<"global", Partial<Record<PostType, PostFieldRules<ExtraField>>>> & Record<TopicKey, Partial<Record<PostType, PostFieldRules<ExtraField>>>>;
23
+ export type TopicPostFieldRules<TopicKey extends string = string, ExtraField extends string = never> = Record<"global", Partial<Record<PostType, PostFieldRules<ExtraField>>>> & Partial<Record<TopicKey, Partial<Record<PostType, PostFieldRules<ExtraField>>>>>;
24
24
  /**
25
25
  * Create a post field guard from topic-scoped field rules.
26
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/cms/client/interfaces/components/resources/post/content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EACD,MAAM,GACN,CAAC,MAAM,CAAC,OAAO,kBAAkB,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACrE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI,CAC9D,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC,KACrC,OAAO,CAAC;AAEb,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI;IAC9D,OAAO,EAAE,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;IACpC,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,UAAU,SAAS,MAAM,GAAG,KAAK,IAC/B,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzE,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,SAAS,MAAM,EACvB,UAAU,SAAS,MAAM,GAAG,KAAK,EAEjC,KAAK,EAAE,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,GAC/C,cAAc,CAAC,UAAU,CAAC,CAgB5B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/cms/client/interfaces/components/resources/post/content/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,mFAAmF;AACnF,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,oBAAoB,CAAC;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EACD,MAAM,GACN,CAAC,MAAM,CAAC,OAAO,kBAAkB,EAAE,MAAM,CAAC,GACxC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK;IACrE,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI,CAC9D,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC,KACrC,OAAO,CAAC;AAEb,MAAM,MAAM,cAAc,CAAC,UAAU,SAAS,MAAM,GAAG,KAAK,IAAI;IAC9D,OAAO,EAAE,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;IACpC,CAAC,YAAY,EAAE,MAAM,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,mBAAmB,CAC7B,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,UAAU,SAAS,MAAM,GAAG,KAAK,IAC/B,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GACzE,OAAO,CACL,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACxE,CAAC;AAEJ;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,SAAS,MAAM,EACvB,UAAU,SAAS,MAAM,GAAG,KAAK,EAEjC,KAAK,EAAE,mBAAmB,CAAC,QAAQ,EAAE,UAAU,CAAC,GAC/C,cAAc,CAAC,UAAU,CAAC,CAgB5B"}
@@ -1,10 +1,10 @@
1
1
  import type { AdminFindDetailAction, AdminUpdateAction } from "../../../../../../../../../contracts/resources/admin/actions";
2
2
  import type { createFileCard, createFileList } from "../../../../../../../components/resources";
3
- import type { AllowAuthorField } from "../../../../../../../components/resources/admin";
3
+ import type { AllowAdminField } from "../../../../../../../components/resources/admin";
4
4
  import type { createUploader } from "../../../../../../../components/ui/features";
5
5
  import { type createUseAdminUpdateFormData } from "../../../../../../../../applications";
6
6
  export declare function createAdminEditPage({ allowField, webLocales, useAdminUpdateFormData, adminFindDetailAction, adminUpdateAction, FileList, FileCard, Uploader, }: {
7
- allowField?: AllowAuthorField;
7
+ allowField?: AllowAdminField;
8
8
  webLocales: readonly string[];
9
9
  useAdminUpdateFormData: ReturnType<typeof createUseAdminUpdateFormData>;
10
10
  adminFindDetailAction: AdminFindDetailAction;
@@ -1 +1 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/edit/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAelF,OAAO,EAML,KAAK,4BAA4B,EAClC,MAAM,sCAAsC,CAAC;AAiC9C,wBAAgB,mBAAmB,CAAC,EAClC,UAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;IACxE,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDAkfA"}
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/edit/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,8DAA8D,CAAC;AACtE,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAkBlF,OAAO,EAML,KAAK,4BAA4B,EAClC,MAAM,sCAAsC,CAAC;AAiC9C,wBAAgB,mBAAmB,CAAC,EAClC,UAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;IACxE,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDAsfA"}
@@ -1,8 +1,8 @@
1
1
  import type { AdminDeleteAction, AdminFindDetailAction } from "../../../../../../../../contracts/resources/admin/actions";
2
2
  import type { createFileCard } from "../../../../../../components/resources";
3
- import type { AllowAuthorField } from "../../../../../../components/resources/admin";
3
+ import type { AllowAdminField } from "../../../../../../components/resources/admin";
4
4
  export declare function createAdminShowPage({ allowField, webLocales, adminFindDetailAction, adminDeleteAction, FileCard, }: {
5
- allowField?: AllowAuthorField;
5
+ allowField?: AllowAdminField;
6
6
  webLocales: readonly string[];
7
7
  adminFindDetailAction: AdminFindDetailAction;
8
8
  adminDeleteAction: AdminDeleteAction;
@@ -1 +1 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AA2CrF,wBAAgB,mBAAmB,CAAC,EAClC,UAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDAiZA"}
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/[id]/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AA8CpF,wBAAgB,mBAAmB,CAAC,EAClC,UAAuB,EACvB,UAAU,EACV,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDAqZA"}
@@ -1,10 +1,10 @@
1
1
  import type { AdminCreateAction } from "../../../../../../../../contracts/resources/admin/actions";
2
2
  import type { createFileCard, createFileList } from "../../../../../../components/resources";
3
- import type { AllowAuthorField } from "../../../../../../components/resources/admin";
3
+ import type { AllowAdminField } from "../../../../../../components/resources/admin";
4
4
  import type { createUploader } from "../../../../../../components/ui/features";
5
5
  import { type createUseAdminCreateFormData } from "../../../../../../../applications";
6
6
  export declare function createAdminCreatePage({ allowField, webLocales, useAdminCreateFormData, adminCreateAction, FileList, FileCard, Uploader, }: {
7
- allowField?: AllowAuthorField;
7
+ allowField?: AllowAdminField;
8
8
  webLocales: readonly string[];
9
9
  useAdminCreateFormData: ReturnType<typeof createUseAdminCreateFormData>;
10
10
  adminCreateAction: AdminCreateAction;
@@ -1 +1 @@
1
- {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/create/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAe/E,OAAO,EAML,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAC;AA+B3C,wBAAgB,qBAAqB,CAAC,EACpC,UAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;IACxE,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDA+fA"}
1
+ {"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../../../../src/cms/client/interfaces/pages/dashboard/system/access/admin/create/page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACf,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAkB/E,OAAO,EAML,KAAK,4BAA4B,EAClC,MAAM,mCAAmC,CAAC;AA+B3C,wBAAgB,qBAAqB,CAAC,EACpC,UAAuB,EACvB,UAAU,EACV,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,sBAAsB,EAAE,UAAU,CAAC,OAAO,4BAA4B,CAAC,CAAC;IACxE,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;CAC7C,iDAmgBA"}
@@ -0,0 +1,7 @@
1
+ /** Author profile fields grouped for CMS section visibility. */
2
+ export declare const AUTHOR_FIELDS: readonly ["authorName", "socialLinks", "description", "jobTitle", "url", "worksFor", "knowsAbout", "homeLocation", "nationality"];
3
+ /** Preference fields grouped for CMS card visibility. */
4
+ export declare const ADMIN_PREFERENCE_FIELDS: readonly ["preferredLocale", "receivesInquiryNotifications"];
5
+ /** Admin fields configurable in CMS; does not control persistence or authorization. */
6
+ export type AdminField = (typeof AUTHOR_FIELDS)[number] | (typeof ADMIN_PREFERENCE_FIELDS)[number];
7
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../../src/config/admin.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,eAAO,MAAM,aAAa,mIAUhB,CAAC;AAEX,yDAAyD;AACzD,eAAO,MAAM,uBAAuB,8DAG1B,CAAC;AAEX,uFAAuF;AACvF,MAAM,MAAM,UAAU,GAClB,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,GAC9B,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- export { AUTHOR_FIELDS, type AuthorField } from "./author";
1
+ export { AUTHOR_FIELDS, ADMIN_PREFERENCE_FIELDS, type AdminField, } from "./admin";
2
2
  export type { StaticAdmins } from "./admins";
3
3
  export { getTopicCategories, getTopicPosts, getTopicProducts, getTopicSubcategories, hasTopicRole, isContentTopic, isProductTopic, type StaticTopics, } from "./topics";
4
4
  export type { StaticPages } from "./pages";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,wBAAwB,EACxB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,KAAK,UAAU,GAChB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EACL,wBAAwB,EACxB,KAAK,SAAS,EACd,KAAK,oBAAoB,GAC1B,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,18 +1,36 @@
1
1
  export declare const POST_REFERENCE_INCLUDE: {
2
2
  readonly translations: true;
3
3
  };
4
- export declare const POST_LIST_CARD_INCLUDE: {
4
+ export declare const POST_REFERENCE_WITH_COVER_INCLUDE: {
5
+ readonly coverImage: {
6
+ readonly include: {
7
+ readonly translations: true;
8
+ };
9
+ };
5
10
  readonly translations: true;
11
+ };
12
+ export declare const POST_LIST_CARD_INCLUDE: {
6
13
  readonly topic: {
7
14
  readonly include: {
8
15
  readonly translations: true;
9
16
  };
10
17
  };
18
+ readonly parents: {
19
+ readonly include: {
20
+ readonly coverImage: {
21
+ readonly include: {
22
+ readonly translations: true;
23
+ };
24
+ };
25
+ readonly translations: true;
26
+ };
27
+ };
11
28
  readonly coverImage: {
12
29
  readonly include: {
13
30
  readonly translations: true;
14
31
  };
15
32
  };
33
+ readonly translations: true;
16
34
  };
17
35
  export declare const POST_DETAIL_INCLUDE: {
18
36
  readonly author: {
@@ -30,11 +48,6 @@ export declare const POST_DETAIL_INCLUDE: {
30
48
  readonly translations: true;
31
49
  };
32
50
  };
33
- readonly parents: {
34
- readonly include: {
35
- readonly translations: true;
36
- };
37
- };
38
51
  readonly children: {
39
52
  readonly include: {
40
53
  readonly translations: true;
@@ -52,6 +65,26 @@ export declare const POST_DETAIL_INCLUDE: {
52
65
  };
53
66
  readonly relatedPosts: {
54
67
  readonly include: {
68
+ readonly topic: {
69
+ readonly include: {
70
+ readonly translations: true;
71
+ };
72
+ };
73
+ readonly parents: {
74
+ readonly include: {
75
+ readonly coverImage: {
76
+ readonly include: {
77
+ readonly translations: true;
78
+ };
79
+ };
80
+ readonly translations: true;
81
+ };
82
+ };
83
+ readonly coverImage: {
84
+ readonly include: {
85
+ readonly translations: true;
86
+ };
87
+ };
55
88
  readonly translations: true;
56
89
  };
57
90
  };
@@ -96,17 +129,27 @@ export declare const POST_DETAIL_INCLUDE: {
96
129
  };
97
130
  };
98
131
  readonly seoMetadatas: true;
99
- readonly translations: true;
100
132
  readonly topic: {
101
133
  readonly include: {
102
134
  readonly translations: true;
103
135
  };
104
136
  };
137
+ readonly parents: {
138
+ readonly include: {
139
+ readonly coverImage: {
140
+ readonly include: {
141
+ readonly translations: true;
142
+ };
143
+ };
144
+ readonly translations: true;
145
+ };
146
+ };
105
147
  readonly coverImage: {
106
148
  readonly include: {
107
149
  readonly translations: true;
108
150
  };
109
151
  };
152
+ readonly translations: true;
110
153
  };
111
154
  /** Minimal reverse-reference selection for Post relation pages. */
112
155
  export declare const POST_RELATIONS_INCLUDE: {
@@ -1 +1 @@
1
- {"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/include.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAEI,CAAC;AAExC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;CAII,CAAC;AAExC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuBO,CAAC;AAExC,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOI,CAAC"}
1
+ {"version":3,"file":"include.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/include.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB;;CAEI,CAAC;AAExC,eAAO,MAAM,iCAAiC;;;;;;;CAGP,CAAC;AAExC,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;CAII,CAAC;AAExC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsBO,CAAC;AAExC,mEAAmE;AACnE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOI,CAAC"}
@@ -1,6 +1,7 @@
1
- import type { PrismaPostDetail, PrismaPostListCard, PrismaPostReference, PrismaPostRelations } from "./types";
2
- import type { PostDetail, PostListCard, PostReference, PostRelations } from "sitero-server";
1
+ import type { PrismaPostDetail, PrismaPostListCard, PrismaPostReference, PrismaPostReferenceWithCover, PrismaPostRelations } from "./types";
2
+ import type { PostDetail, PostListCard, PostReference, PostReferenceWithCover, PostRelations } from "sitero-server";
3
3
  export declare function postReferenceToDomain(post: PrismaPostReference): PostReference;
4
+ export declare function postReferenceWithCoverToDomain(post: PrismaPostReferenceWithCover): PostReferenceWithCover;
4
5
  export declare function postListCardToDomain(post: PrismaPostListCard): PostListCard;
5
6
  export declare function postDetailToDomain(post: PrismaPostDetail): PostDetail;
6
7
  /** Groups only supported direct reverse Post references by target type. */
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EACd,MAAM,eAAe,CAAC;AAmBvB,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAKf;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CAM3E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU,CAsBrE;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAwBf"}
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,aAAa,EACd,MAAM,eAAe,CAAC;AAmBvB,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAKf;AAED,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,4BAA4B,GACjC,sBAAsB,CAKxB;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,kBAAkB,GAAG,YAAY,CAM3E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,UAAU,CAqBrE;AAED,2EAA2E;AAC3E,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,mBAAmB,GACxB,aAAa,CAwBf"}
@@ -1,4 +1,4 @@
1
- import type { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_RELATIONS_INCLUDE, POST_REFERENCE_INCLUDE } from "./include";
1
+ import type { POST_DETAIL_INCLUDE, POST_LIST_CARD_INCLUDE, POST_RELATIONS_INCLUDE, POST_REFERENCE_INCLUDE, POST_REFERENCE_WITH_COVER_INCLUDE } from "./include";
2
2
  import type { Prisma, PrismaClient } from "../../../../../prisma/generated/client";
3
3
  export type PrismaPostReference = Prisma.PostGetPayload<{
4
4
  include: typeof POST_REFERENCE_INCLUDE;
@@ -13,4 +13,7 @@ export type PrismaPostRelations = Prisma.PostGetPayload<{
13
13
  include: typeof POST_RELATIONS_INCLUDE;
14
14
  }>;
15
15
  export type PrismaPostClient = Pick<PrismaClient, "post" | "$transaction">;
16
+ export type PrismaPostReferenceWithCover = Prisma.PostGetPayload<{
17
+ include: typeof POST_REFERENCE_WITH_COVER_INCLUDE;
18
+ }>;
16
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACb,MAAM,wCAAwC,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC;IACrD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC;IACnD,OAAO,EAAE,OAAO,mBAAmB,CAAC;CACrC,CAAC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/infrastructure/prisma/post/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,iCAAiC,EAClC,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACb,MAAM,wCAAwC,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,cAAc,CAAC;IACrD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,cAAc,CAAC;IACnD,OAAO,EAAE,OAAO,mBAAmB,CAAC;CACrC,CAAC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,cAAc,CAAC;IACtD,OAAO,EAAE,OAAO,sBAAsB,CAAC;CACxC,CAAC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC;AAE3E,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC,cAAc,CAAC;IAC/D,OAAO,EAAE,OAAO,iCAAiC,CAAC;CACnD,CAAC,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import type { OperationResult } from "sitero-server";
2
- import type { PostFindDetailInput, PostFindListCardsInput, PostDetail, PostListCard, PostReference } from "sitero-server";
2
+ import type { PostFindDetailInput, PostFindListCardsInput, PostDetail, PostListCard } from "sitero-server";
3
3
  export type WebPostListCard = PostListCard & {
4
- parents: PostReference[];
5
4
  children: WebPostListCard[];
6
5
  };
7
6
  type WithoutActiveFilter<Input> = Input extends unknown ? Omit<Input, "isActive"> : never;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/contracts/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,YAAY,EACZ,aAAa,EACd,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,mBAAmB,CAAC,KAAK,IAAI,KAAK,SAAS,OAAO,GACnD,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GACvB,KAAK,CAAC;AAEV,4EAA4E;AAC5E,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GACnC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAC3E,eAAe,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;CAC9B,CAAC,CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,yBAAyB,KAC7B,OAAO,CAAC,eAAe,CAAC;IAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/contracts/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,QAAQ,EAAE,eAAe,EAAE,CAAC;CAC7B,CAAC;AAEF,KAAK,mBAAmB,CAAC,KAAK,IAAI,KAAK,SAAS,OAAO,GACnD,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,GACvB,KAAK,CAAC;AAEV,4EAA4E;AAC5E,MAAM,MAAM,sBAAsB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AAE9E,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GACnC,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,sBAAsB,KAAK,OAAO,CAC3E,eAAe,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;CAC9B,CAAC,CACH,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,yBAAyB,KAC7B,OAAO,CAAC,eAAe,CAAC;IAAE,KAAK,EAAE,eAAe,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/server/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAiClD,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,YAAY,GACb,EAAE;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;;;;;;;;;;;;;;yBAWO,CAAA;;;;;;;;;;;;;wBAWG,CAAC;yBAA2B,CAAC;;;;;;;;;;;;;wBAY7B,CAAC;uBAA2B,CAAC;oBACjB,CAAC;sBACD,CAAC;yBACD,CAAC;sBACd,CAAC;mBACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoPF"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../../../src/web/server/resources/post/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgClD,wBAAgB,oBAAoB,CAAC,EACnC,YAAY,EACZ,YAAY,GACb,EAAE;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;CAC5B;;;;;;;;;;;;;;yBAWK,CAAA;;;;;;;;;;;;;wBASY,CAAA;yBAEd,CAAJ;;;;;;;;;;;;;wBAUuC,CAAC;uBACtC,CAAF;oBAAwB,CAAC;sBAA0B,CAAC;yBAC7C,CAAC;sBAA2B,CAAC;mBACxB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0NX"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sitero",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -111,8 +111,8 @@
111
111
  "ua-parser-js": "2.0.9",
112
112
  "ulid": "3.0.2",
113
113
  "zod": "4.3.6",
114
- "sitero-domain": "0.4.0",
115
- "sitero-server": "0.4.0"
114
+ "sitero-domain": "0.6.0",
115
+ "sitero-server": "0.6.0"
116
116
  },
117
117
  "peerDependencies": {
118
118
  "@aws-sdk/client-s3": "3.913.0",
@@ -1,5 +0,0 @@
1
- function createAllowAuthorField(fields) {
2
- return ({ field }) => fields.includes(field);
3
- }
4
-
5
- export { createAllowAuthorField };
@@ -1,7 +0,0 @@
1
- import type { AuthorField } from "../../../../../../config";
2
- export type AllowAuthorField = (params: {
3
- field: AuthorField;
4
- }) => boolean;
5
- /** Creates a CMS visibility guard from the consumer's author field allowlist. */
6
- export declare function createAllowAuthorField(fields: readonly AuthorField[]): AllowAuthorField;
7
- //# sourceMappingURL=author-fields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"author-fields.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/cms/client/interfaces/components/resources/admin/author-fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,WAAW,CAAA;CAAE,KAAK,OAAO,CAAC;AAE3E,iFAAiF;AACjF,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,WAAW,EAAE,GAC7B,gBAAgB,CAElB"}
@@ -1,4 +0,0 @@
1
- /** Author profile fields configurable in CMS; does not control public data access. */
2
- export declare const AUTHOR_FIELDS: readonly ["authorName", "socialLinks", "description", "jobTitle", "url", "worksFor", "knowsAbout", "homeLocation", "nationality"];
3
- export type AuthorField = (typeof AUTHOR_FIELDS)[number];
4
- //# sourceMappingURL=author.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"author.d.ts","sourceRoot":"","sources":["../../../../src/config/author.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,eAAO,MAAM,aAAa,mIAUhB,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC"}