@carlonicora/nextjs-jsonapi 5.4.0 → 5.5.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.
- package/dist/{BlockNoteEditor-YQL2SGFR.mjs → BlockNoteEditor-GVQCKRMU.mjs} +5 -5
- package/dist/{BlockNoteEditor-4YCAIEPT.js → BlockNoteEditor-THBJH2UR.js} +20 -20
- package/dist/{BlockNoteEditor-4YCAIEPT.js.map → BlockNoteEditor-THBJH2UR.js.map} +1 -1
- package/dist/{BlockNoteViewer-AEJKJ27Q.mjs → BlockNoteViewer-U6E3DS4F.mjs} +3 -3
- package/dist/{BlockNoteViewer-YL3J7J2Y.js → BlockNoteViewer-VZOVKTFO.js} +4 -4
- package/dist/{BlockNoteViewer-YL3J7J2Y.js.map → BlockNoteViewer-VZOVKTFO.js.map} +1 -1
- package/dist/billing/index.js +442 -442
- package/dist/billing/index.mjs +4 -4
- package/dist/{chunk-XCHSX3VC.mjs → chunk-3CGROPF3.mjs} +2 -2
- package/dist/{chunk-QMYQRPQC.mjs → chunk-6SQYXUVP.mjs} +2 -2
- package/dist/{chunk-NFBOSPNJ.js → chunk-G6UE6MEP.js} +59 -19
- package/dist/chunk-G6UE6MEP.js.map +1 -0
- package/dist/{chunk-YNCQSWQW.js → chunk-S4YJ5WCW.js} +8 -8
- package/dist/{chunk-YNCQSWQW.js.map → chunk-S4YJ5WCW.js.map} +1 -1
- package/dist/{chunk-3NLAXVIN.js → chunk-TY5FYP3G.js} +917 -881
- package/dist/chunk-TY5FYP3G.js.map +1 -0
- package/dist/{chunk-WC63PJSC.mjs → chunk-VC5A3AUZ.mjs} +61 -21
- package/dist/chunk-VC5A3AUZ.mjs.map +1 -0
- package/dist/{chunk-6DC2WVVB.mjs → chunk-W7F5BDSV.mjs} +2 -2
- package/dist/{chunk-5PPG6PL7.js → chunk-WPYT4UKJ.js} +3 -3
- package/dist/{chunk-5PPG6PL7.js.map → chunk-WPYT4UKJ.js.map} +1 -1
- package/dist/{chunk-EUKTBOI2.mjs → chunk-X5WIUUNG.mjs} +1471 -1435
- package/dist/chunk-X5WIUUNG.mjs.map +1 -0
- package/dist/{chunk-YW4ZCEWB.js → chunk-YDYVJM4I.js} +4 -4
- package/dist/{chunk-YW4ZCEWB.js.map → chunk-YDYVJM4I.js.map} +1 -1
- package/dist/client/index.js +5 -5
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +4 -4
- package/dist/components/editors/server.d.mts +15 -0
- package/dist/components/editors/server.d.ts +15 -0
- package/dist/components/editors/server.js +38 -0
- package/dist/components/editors/server.js.map +1 -0
- package/dist/components/editors/server.mjs +38 -0
- package/dist/components/editors/server.mjs.map +1 -0
- package/dist/components/index.d.mts +33 -10
- package/dist/components/index.d.ts +33 -10
- package/dist/components/index.js +7 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +8 -6
- package/dist/contexts/index.d.mts +9 -1
- package/dist/contexts/index.d.ts +9 -1
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.js +4 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +3 -3
- package/dist/email-automations/index.d.mts +3 -0
- package/dist/email-automations/index.d.ts +3 -0
- package/dist/email-automations/index.js +99 -95
- package/dist/email-automations/index.js.map +1 -1
- package/dist/email-automations/index.mjs +30 -26
- package/dist/email-automations/index.mjs.map +1 -1
- package/dist/features/analytics/index.d.mts +11 -4
- package/dist/features/analytics/index.d.ts +11 -4
- package/dist/features/analytics/index.js +127 -135
- package/dist/features/analytics/index.js.map +1 -1
- package/dist/features/analytics/index.mjs +16 -24
- package/dist/features/analytics/index.mjs.map +1 -1
- package/dist/features/analytics/server.d.mts +5 -2
- package/dist/features/analytics/server.d.ts +5 -2
- package/dist/features/analytics/server.js +7 -7
- package/dist/features/analytics/server.js.map +1 -1
- package/dist/features/analytics/server.mjs +5 -5
- package/dist/features/analytics/server.mjs.map +1 -1
- package/dist/features/blog/index.d.mts +12 -2
- package/dist/features/blog/index.d.ts +12 -2
- package/dist/features/blog/index.js +206 -195
- package/dist/features/blog/index.js.map +1 -1
- package/dist/features/blog/index.mjs +71 -60
- package/dist/features/blog/index.mjs.map +1 -1
- package/dist/features/blog/server.d.mts +4 -1
- package/dist/features/blog/server.d.ts +4 -1
- package/dist/features/blog/server.js +49 -21
- package/dist/features/blog/server.js.map +1 -1
- package/dist/features/blog/server.mjs +36 -8
- package/dist/features/blog/server.mjs.map +1 -1
- package/dist/features/help/index.js +38 -38
- package/dist/features/help/index.mjs +4 -4
- package/dist/features/tokenusage/index.d.mts +1 -3
- package/dist/features/tokenusage/index.d.ts +1 -3
- package/dist/features/tokenusage/index.js +127 -135
- package/dist/features/tokenusage/index.js.map +1 -1
- package/dist/features/tokenusage/index.mjs +10 -18
- package/dist/features/tokenusage/index.mjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/server/index.js +4 -4
- package/dist/server/index.mjs +3 -3
- package/package.json +9 -1
- package/src/components/editors/server/BlockNoteServerContent.tsx +28 -0
- package/src/components/editors/server/__tests__/renderBlockNoteHTML.spec.ts +44 -0
- package/src/components/editors/server/renderBlockNoteHTML.ts +26 -0
- package/src/components/editors/server-entry.ts +7 -0
- package/src/components/index.ts +1 -0
- package/src/components/viewers/BlockNoteStaticViewer.tsx +44 -0
- package/src/features/administration/components/AdminIndexContainer.tsx +61 -33
- package/src/features/administration/components/__tests__/AdminIndexContainer.spec.tsx +61 -1
- package/src/features/administration/components/index.ts +2 -1
- package/src/features/administration/contexts/AdministrationContext.tsx +11 -3
- package/src/features/administration/contexts/__tests__/AdministrationContext.spec.tsx +40 -0
- package/src/features/ai-connection/ai-connection.module.ts +2 -0
- package/src/features/ai-connection/contexts/AiConnectionsContext.tsx +3 -16
- package/src/features/ai-connection/contexts/__tests__/AiConnectionsContext.spec.tsx +33 -0
- package/src/features/analytics/__tests__/server-entry.spec.tsx +2 -1
- package/src/features/analytics/analytics.modules.ts +22 -5
- package/src/features/analytics/components/AnalyticsAdminContainer.tsx +4 -3
- package/src/features/analytics/components/AnalyticsAdminPageContainer.tsx +6 -3
- package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +4 -3
- package/src/features/analytics/components/__tests__/AnalyticsJourneyContainer.spec.tsx +11 -0
- package/src/features/analytics/components/__tests__/AnalyticsPageContainers.spec.tsx +12 -1
- package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +6 -3
- package/src/features/analytics/contexts/AnalyticsAdminContext.tsx +8 -17
- package/src/features/analytics/contexts/__tests__/AnalyticsAdminContext.spec.tsx +17 -0
- package/src/features/billing/stripe-price/stripe-price.module.ts +2 -0
- package/src/features/billing/stripe-product/stripe-product.module.ts +2 -0
- package/src/features/blog/components/admin/BlogAdminContainer.tsx +13 -6
- package/src/features/blog/components/admin/BlogCategoriesList.tsx +1 -1
- package/src/features/blog/components/admin/BlogCoverImageField.tsx +1 -1
- package/src/features/blog/components/admin/BlogPostContainer.tsx +0 -1
- package/src/features/blog/components/admin/BlogPostEditor.tsx +42 -33
- package/src/features/blog/components/admin/BlogPostTranslationEditor.tsx +12 -4
- package/src/features/blog/components/admin/BlogPostsList.tsx +1 -1
- package/src/features/blog/components/public/BlogPostCard.tsx +2 -9
- package/src/features/blog/components/public/BlogPostMeta.tsx +2 -2
- package/src/features/blog/components/public/BlogPostView.tsx +9 -3
- package/src/features/blog/components/public/__tests__/BlogList.spec.tsx +2 -0
- package/src/features/blog/components/public/__tests__/BlogPostView.spec.tsx +17 -11
- package/src/features/blog/server/fetchers.ts +57 -8
- package/src/features/email-automation/components/containers/EmailAutomationsListContainer.tsx +12 -3
- package/src/features/rbac/contexts/RbacContext.tsx +4 -7
- package/src/features/rbac/contexts/__tests__/RbacContext.spec.tsx +42 -0
- package/src/features/tokenusage/components/TokenUsageAdminContainer.tsx +4 -3
- package/src/features/tokenusage/contexts/TokenUsageAdminContext.tsx +3 -18
- package/src/features/tokenusage/contexts/__tests__/TokenUsageAdminContext.spec.tsx +17 -0
- package/src/features/tokenusage/tokenusage-admin.module.ts +4 -3
- package/src/features/tokenusage/tokenusage.modules.ts +12 -2
- package/src/features/user/contexts/UserContext.tsx +18 -3
- package/src/features/user/contexts/__tests__/UserContext.spec.tsx +95 -0
- package/dist/chunk-3NLAXVIN.js.map +0 -1
- package/dist/chunk-EUKTBOI2.mjs.map +0 -1
- package/dist/chunk-NFBOSPNJ.js.map +0 -1
- package/dist/chunk-WC63PJSC.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-YQL2SGFR.mjs.map → BlockNoteEditor-GVQCKRMU.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-AEJKJ27Q.mjs.map → BlockNoteViewer-U6E3DS4F.mjs.map} +0 -0
- /package/dist/{chunk-XCHSX3VC.mjs.map → chunk-3CGROPF3.mjs.map} +0 -0
- /package/dist/{chunk-QMYQRPQC.mjs.map → chunk-6SQYXUVP.mjs.map} +0 -0
- /package/dist/{chunk-6DC2WVVB.mjs.map → chunk-W7F5BDSV.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"names":["redirect","jsx"],"mappings":"AAAA;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACA;AChBA,6CAAyB;AAMzB,kEAA4C;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"names":["redirect","jsx"],"mappings":"AAAA;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACA;AChBA,6CAAyB;AAMzB,kEAA4C;AA2BnC,+CAAA;AALT,MAAA,SAAsB,kBAAA,CAAmB,EAAE,WAAA,EAAa,cAAA,EAAgB,eAAA,EAAiB,IAAI,CAAA,EAAU;AACrG,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAA,kCAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAO,6BAAA,sCAAC,EAAA,EAA4B,eAAA,CAAgC,CAAA;AACtE;AANsB,qCAAA,kBAAA,EAAA,oBAAA,CAAA;ADDtB;AACA;AE5BA;AAIA;AAuBS;AALT,MAAA,SAAsB,oBAAA,CAAqB,EAAE,WAAA,EAAa,SAAA,EAAW,OAAA,EAAS,eAAA,EAAiB,IAAI,CAAA,EAAU;AAC3G,EAAA,GAAA,CAAI,CAAE,MAAM,8BAAA,CAAc,OAAA,CAAQ,WAAW,CAAA,EAAI;AAC/C,IAAAA,kCAAAA,cAAuB,CAAA;AAAA,EACzB;AAEA,EAAA,uBAAOC,6BAAAA,wCAAC,EAAA,EAA8B,SAAA,EAAsB,QAAA,CAAkB,CAAA;AAChF;AANsB,qCAAA,oBAAA,EAAA,sBAAA,CAAA;AFiBtB;AACE;AACA;AACF,qGAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/features/analytics/server.js","sourcesContent":[null,"import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /**\n * @deprecated No longer read: the dashboard is the current page, so its\n * breadcrumb is not linked. Kept so existing callers still compile.\n */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServerSession
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-3CGROPF3.mjs";
|
|
4
4
|
import "../../chunk-T7SAW3UW.mjs";
|
|
5
5
|
import "../../chunk-3YW35YHQ.mjs";
|
|
6
6
|
import "../../chunk-F5UNXZ3J.mjs";
|
|
7
7
|
import "../../chunk-E2LENTUH.mjs";
|
|
8
8
|
import "../../chunk-PW42LRSL.mjs";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-VC5A3AUZ.mjs";
|
|
10
|
+
import "../../chunk-V5MI7RNB.mjs";
|
|
10
11
|
import "../../chunk-AUXK7QSA.mjs";
|
|
11
12
|
import "../../chunk-PI56A4DG.mjs";
|
|
12
|
-
import "../../chunk-V5MI7RNB.mjs";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "../../chunk-PAWJFY3S.mjs";
|
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
import { redirect } from "next/navigation";
|
|
19
19
|
import { AnalyticsAdminPageContainer } from "@carlonicora/nextjs-jsonapi/analytics";
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
|
-
async function AnalyticsAdminPage({ adminRoleId,
|
|
21
|
+
async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = "/" }) {
|
|
22
22
|
if (!await ServerSession.hasRole(adminRoleId)) {
|
|
23
23
|
redirect(deniedRedirect);
|
|
24
24
|
}
|
|
25
|
-
return /* @__PURE__ */ jsx(AnalyticsAdminPageContainer, {
|
|
25
|
+
return /* @__PURE__ */ jsx(AnalyticsAdminPageContainer, { sessionPageUrl });
|
|
26
26
|
}
|
|
27
27
|
__name(AnalyticsAdminPage, "AnalyticsAdminPage");
|
|
28
28
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"sourcesContent":["import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n
|
|
1
|
+
{"version":3,"sources":["../../../src/features/analytics/components/server/AnalyticsAdminPage.tsx","../../../src/features/analytics/components/server/AnalyticsJourneyPage.tsx"],"sourcesContent":["import { redirect } from \"next/navigation\";\n// The container is imported through the package's own client subpath, never by\n// relative path. tsup keeps this specifier external, so the built server entry\n// reaches the container through `features/analytics/index`, which carries the\n// \"use client\" banner. A relative import would inline the container's hooks and\n// contexts into this server bundle, outside any client boundary.\nimport { AnalyticsAdminPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n /**\n * @deprecated No longer read: the dashboard is the current page, so its\n * breadcrumb is not linked. Kept so existing callers still compile.\n */\n pageUrl?: string;\n /** Base route of the journey page each session row links to. */\n sessionPageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for the administrative analytics dashboard: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsAdminPage({ adminRoleId, sessionPageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsAdminPageContainer sessionPageUrl={sessionPageUrl} />;\n}\n","import { redirect } from \"next/navigation\";\n// Imported through the package's own client subpath for the same reason as in\n// AnalyticsAdminPage: the built server entry must reach the container through\n// the \"use client\" bundle, not inline it.\nimport { AnalyticsJourneyPageContainer } from \"@carlonicora/nextjs-jsonapi/analytics\";\nimport { ServerSession } from \"../../../../server\";\n\ntype Props = {\n /** Role id the viewer must hold. The package has no role constants, so the host app passes its own. */\n adminRoleId: string;\n sessionId: string;\n /** Route of the dashboard; the journey pages live under `${pageUrl}/sessions`. */\n pageUrl?: string;\n /** Where a viewer without the role is sent. */\n deniedRedirect?: string;\n};\n\n/**\n * Server page for one session's journey: role gate, then the client container.\n *\n * Reads the session: render inside a `<Suspense>` boundary (Cache Components).\n */\nexport async function AnalyticsJourneyPage({ adminRoleId, sessionId, pageUrl, deniedRedirect = \"/\" }: Props) {\n if (!(await ServerSession.hasRole(adminRoleId))) {\n redirect(deniedRedirect);\n }\n\n return <AnalyticsJourneyPageContainer sessionId={sessionId} pageUrl={pageUrl} />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SAAS,gBAAgB;AAMzB,SAAS,mCAAmC;AA2BnC;AALT,eAAsB,mBAAmB,EAAE,aAAa,gBAAgB,iBAAiB,IAAI,GAAU;AACrG,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,aAAS,cAAc;AAAA,EACzB;AAEA,SAAO,oBAAC,+BAA4B,gBAAgC;AACtE;AANsB;;;AC5BtB,SAAS,YAAAA,iBAAgB;AAIzB,SAAS,qCAAqC;AAuBrC,gBAAAC,YAAA;AALT,eAAsB,qBAAqB,EAAE,aAAa,WAAW,SAAS,iBAAiB,IAAI,GAAU;AAC3G,MAAI,CAAE,MAAM,cAAc,QAAQ,WAAW,GAAI;AAC/C,IAAAC,UAAS,cAAc;AAAA,EACzB;AAEA,SAAO,gBAAAD,KAAC,iCAA8B,WAAsB,SAAkB;AAChF;AANsB;","names":["redirect","jsx","redirect"]}
|
|
@@ -19,6 +19,11 @@ import '../../useDataListRetriever-WEXL4bqB.mjs';
|
|
|
19
19
|
* Blog admin page: posts, categories and the public list layout, one tab each.
|
|
20
20
|
* Client component because `module={Modules.BlogPost}` carries an icon component.
|
|
21
21
|
* Mirrors features/email-automation/components/containers/EmailAutomationsListContainer.tsx.
|
|
22
|
+
*
|
|
23
|
+
* Publishes its own breadcrumb, as CompanyProvider does for the companies list:
|
|
24
|
+
* the list root comes first and has no href because it is the current page.
|
|
25
|
+
* The lists inside the tabs omit `fullWidth` so they keep their bordered card,
|
|
26
|
+
* as PricesList does inside ProductContainer.
|
|
22
27
|
*/
|
|
23
28
|
declare function BlogAdminContainer(): React.JSX.Element;
|
|
24
29
|
|
|
@@ -41,7 +46,7 @@ declare function BlogPostContainer({ postId }: BlogPostContainerProps): React.JS
|
|
|
41
46
|
declare const useBlogPostTableStructure: UseTableStructureHook<BlogPostInterface, BlogPostFields>;
|
|
42
47
|
|
|
43
48
|
type BlogPostsListProps = {
|
|
44
|
-
/** Pass when the list is the page's
|
|
49
|
+
/** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
|
|
45
50
|
fullWidth?: boolean;
|
|
46
51
|
};
|
|
47
52
|
/** Admin posts table. Mirrors features/email-automation/components/lists/EmailAutomationsList.tsx. */
|
|
@@ -56,7 +61,7 @@ declare function BlogPostsList({ fullWidth }?: BlogPostsListProps): React.JSX.El
|
|
|
56
61
|
declare const useBlogCategoryTableStructure: UseTableStructureHook<BlogCategoryInterface, BlogCategoryFields>;
|
|
57
62
|
|
|
58
63
|
type BlogCategoriesListProps = {
|
|
59
|
-
/** Pass when the list is the page's
|
|
64
|
+
/** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
|
|
60
65
|
fullWidth?: boolean;
|
|
61
66
|
};
|
|
62
67
|
/**
|
|
@@ -228,12 +233,17 @@ declare function BlogList(props: BlogListProps): React.JSX.Element;
|
|
|
228
233
|
/**
|
|
229
234
|
* Public post page: back link, category, title, summary, meta, cover, body,
|
|
230
235
|
* then up to three posts from the same category.
|
|
236
|
+
*
|
|
237
|
+
* `body` replaces the client-only editor with server-rendered content (the app
|
|
238
|
+
* passes BlockNoteServerContent from `@carlonicora/nextjs-jsonapi/blocknote/server`),
|
|
239
|
+
* so the post text is in the HTML crawlers read.
|
|
231
240
|
*/
|
|
232
241
|
declare function BlogPostView(props: {
|
|
233
242
|
post: PublicBlogPost;
|
|
234
243
|
categories: PublicBlogCategory[];
|
|
235
244
|
related: PublicBlogPost[];
|
|
236
245
|
basePath: string;
|
|
246
|
+
body?: ReactNode;
|
|
237
247
|
}): React.JSX.Element;
|
|
238
248
|
|
|
239
249
|
interface BlogPostContextType {
|
|
@@ -19,6 +19,11 @@ import '../../useDataListRetriever-WEXL4bqB.js';
|
|
|
19
19
|
* Blog admin page: posts, categories and the public list layout, one tab each.
|
|
20
20
|
* Client component because `module={Modules.BlogPost}` carries an icon component.
|
|
21
21
|
* Mirrors features/email-automation/components/containers/EmailAutomationsListContainer.tsx.
|
|
22
|
+
*
|
|
23
|
+
* Publishes its own breadcrumb, as CompanyProvider does for the companies list:
|
|
24
|
+
* the list root comes first and has no href because it is the current page.
|
|
25
|
+
* The lists inside the tabs omit `fullWidth` so they keep their bordered card,
|
|
26
|
+
* as PricesList does inside ProductContainer.
|
|
22
27
|
*/
|
|
23
28
|
declare function BlogAdminContainer(): React.JSX.Element;
|
|
24
29
|
|
|
@@ -41,7 +46,7 @@ declare function BlogPostContainer({ postId }: BlogPostContainerProps): React.JS
|
|
|
41
46
|
declare const useBlogPostTableStructure: UseTableStructureHook<BlogPostInterface, BlogPostFields>;
|
|
42
47
|
|
|
43
48
|
type BlogPostsListProps = {
|
|
44
|
-
/** Pass when the list is the page's
|
|
49
|
+
/** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
|
|
45
50
|
fullWidth?: boolean;
|
|
46
51
|
};
|
|
47
52
|
/** Admin posts table. Mirrors features/email-automation/components/lists/EmailAutomationsList.tsx. */
|
|
@@ -56,7 +61,7 @@ declare function BlogPostsList({ fullWidth }?: BlogPostsListProps): React.JSX.El
|
|
|
56
61
|
declare const useBlogCategoryTableStructure: UseTableStructureHook<BlogCategoryInterface, BlogCategoryFields>;
|
|
57
62
|
|
|
58
63
|
type BlogCategoriesListProps = {
|
|
59
|
-
/** Pass when the list is the page's
|
|
64
|
+
/** Pass only when the list is the page's whole content inside a `RoundPageContainer fullWidth`; omit it in a tab so the list keeps its bordered card. */
|
|
60
65
|
fullWidth?: boolean;
|
|
61
66
|
};
|
|
62
67
|
/**
|
|
@@ -228,12 +233,17 @@ declare function BlogList(props: BlogListProps): React.JSX.Element;
|
|
|
228
233
|
/**
|
|
229
234
|
* Public post page: back link, category, title, summary, meta, cover, body,
|
|
230
235
|
* then up to three posts from the same category.
|
|
236
|
+
*
|
|
237
|
+
* `body` replaces the client-only editor with server-rendered content (the app
|
|
238
|
+
* passes BlockNoteServerContent from `@carlonicora/nextjs-jsonapi/blocknote/server`),
|
|
239
|
+
* so the post text is in the HTML crawlers read.
|
|
231
240
|
*/
|
|
232
241
|
declare function BlogPostView(props: {
|
|
233
242
|
post: PublicBlogPost;
|
|
234
243
|
categories: PublicBlogCategory[];
|
|
235
244
|
related: PublicBlogPost[];
|
|
236
245
|
basePath: string;
|
|
246
|
+
body?: ReactNode;
|
|
237
247
|
}): React.JSX.Element;
|
|
238
248
|
|
|
239
249
|
interface BlogPostContextType {
|