@carlonicora/nextjs-jsonapi 5.4.0 → 5.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.
- package/dist/{BlockNoteEditor-4YCAIEPT.js → BlockNoteEditor-AE3ZTEEH.js} +20 -20
- package/dist/{BlockNoteEditor-4YCAIEPT.js.map → BlockNoteEditor-AE3ZTEEH.js.map} +1 -1
- package/dist/{BlockNoteEditor-YQL2SGFR.mjs → BlockNoteEditor-NEYG5L6W.mjs} +5 -5
- package/dist/{BlockNoteViewer-AEJKJ27Q.mjs → BlockNoteViewer-3OUT5UFY.mjs} +3 -3
- package/dist/{BlockNoteViewer-YL3J7J2Y.js → BlockNoteViewer-4CFKQM7U.js} +4 -4
- package/dist/{BlockNoteViewer-YL3J7J2Y.js.map → BlockNoteViewer-4CFKQM7U.js.map} +1 -1
- package/dist/billing/index.d.mts +186 -25
- package/dist/billing/index.d.ts +186 -25
- package/dist/billing/index.js +1149 -588
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +786 -225
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-5PPG6PL7.js → chunk-3I5AAJXV.js} +3 -3
- package/dist/{chunk-5PPG6PL7.js.map → chunk-3I5AAJXV.js.map} +1 -1
- package/dist/{chunk-YW4ZCEWB.js → chunk-53BAULDP.js} +4 -4
- package/dist/{chunk-YW4ZCEWB.js.map → chunk-53BAULDP.js.map} +1 -1
- package/dist/{chunk-XCHSX3VC.mjs → chunk-BTPUYUQ3.mjs} +2 -2
- package/dist/{chunk-WC63PJSC.mjs → chunk-EYA2F6AN.mjs} +756 -24
- package/dist/chunk-EYA2F6AN.mjs.map +1 -0
- package/dist/{chunk-NFBOSPNJ.js → chunk-HKZAESS6.js} +954 -222
- package/dist/chunk-HKZAESS6.js.map +1 -0
- package/dist/{chunk-6DC2WVVB.mjs → chunk-KQHBONL4.mjs} +2 -2
- package/dist/{chunk-3NLAXVIN.js → chunk-LQ4DK4JF.js} +1988 -1089
- package/dist/chunk-LQ4DK4JF.js.map +1 -0
- package/dist/{chunk-YNCQSWQW.js → chunk-RL3PL3KV.js} +8 -8
- package/dist/{chunk-YNCQSWQW.js.map → chunk-RL3PL3KV.js.map} +1 -1
- package/dist/{chunk-EUKTBOI2.mjs → chunk-SFYPXCK4.mjs} +3382 -2483
- package/dist/chunk-SFYPXCK4.mjs.map +1 -0
- package/dist/{chunk-QMYQRPQC.mjs → chunk-Y7RR57EW.mjs} +2 -2
- 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.d.mts +242 -3
- package/dist/core/index.d.ts +242 -3
- package/dist/core/index.js +36 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +35 -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/{stripe-promotion-code.interface-C3qqh3mi.d.ts → format-options-BtX3o0Yu.d.ts} +104 -1
- package/dist/{stripe-promotion-code.interface-ClZ7DxS9.d.mts → format-options-D6c7FNDi.d.mts} +104 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -4
- package/dist/server/index.js +4 -4
- package/dist/server/index.mjs +3 -3
- package/messages/en.json +125 -3
- package/messages/it.json +125 -3
- package/package.json +9 -1
- package/scripts/validate-messages.mjs +1 -0
- package/src/billing/index.ts +1 -0
- package/src/client/index.ts +4 -0
- 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/core/index.ts +1 -0
- package/src/core/registry/ModuleRegistry.ts +3 -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/components/cards/InvoicesSummaryCard.tsx +3 -2
- package/src/features/billing/components/cards/SubscriptionSummaryCard.tsx +4 -3
- package/src/features/billing/components/containers/BillingDashboardContainer.tsx +22 -5
- package/src/features/billing/components/utils/__tests__/discount.spec.ts +59 -0
- package/src/features/billing/components/utils/__tests__/url.spec.ts +32 -0
- package/src/features/billing/components/utils/discount.ts +38 -0
- package/src/features/billing/components/utils/index.ts +2 -0
- package/src/features/billing/components/utils/url.ts +12 -0
- package/src/features/billing/contexts/CouponContext.tsx +211 -0
- package/src/features/billing/contexts/index.ts +1 -0
- package/src/features/billing/i18n-keys.ts +79 -0
- package/src/features/billing/stripe-coupon/components/containers/CouponContainer.tsx +38 -0
- package/src/features/billing/stripe-coupon/components/containers/index.ts +1 -0
- package/src/features/billing/stripe-coupon/components/details/CouponDetails.tsx +69 -0
- package/src/features/billing/stripe-coupon/components/details/index.ts +1 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeEditor.tsx +79 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponCodeFields.tsx +192 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponEditor.tsx +333 -0
- package/src/features/billing/stripe-coupon/components/forms/CouponRefresher.tsx +45 -0
- package/src/features/billing/stripe-coupon/components/forms/index.ts +6 -0
- package/src/features/billing/stripe-coupon/components/index.ts +5 -0
- package/src/features/billing/stripe-coupon/components/lists/CouponCodesList.tsx +61 -0
- package/src/features/billing/stripe-coupon/components/lists/CouponsList.tsx +67 -0
- package/src/features/billing/stripe-coupon/components/lists/index.ts +2 -0
- package/src/features/billing/stripe-coupon/components/widgets/CouponCodeActions.tsx +80 -0
- package/src/features/billing/stripe-coupon/components/widgets/index.ts +1 -0
- package/src/features/billing/stripe-coupon/data/__tests__/stripe-coupon-models.spec.ts +114 -0
- package/src/features/billing/stripe-coupon/data/index.ts +10 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.fields.ts +8 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.interface.ts +44 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.service.ts +92 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-code.ts +132 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.interface.ts +17 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon-offer.ts +70 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.fields.ts +7 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.interface.ts +51 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.service.ts +93 -0
- package/src/features/billing/stripe-coupon/data/stripe-coupon.ts +165 -0
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponCodeTableStructure.tsx +154 -0
- package/src/features/billing/stripe-coupon/hooks/useStripeCouponTableStructure.tsx +113 -0
- package/src/features/billing/stripe-coupon/index.ts +5 -0
- package/src/features/billing/stripe-coupon/stripe-coupon-code.module.ts +14 -0
- package/src/features/billing/stripe-coupon/stripe-coupon-offer.module.ts +10 -0
- package/src/features/billing/stripe-coupon/stripe-coupon.module.ts +18 -0
- package/src/features/billing/stripe-coupon/utils/__tests__/coupon-places.spec.ts +19 -0
- package/src/features/billing/stripe-coupon/utils/__tests__/to-promotion-code-result.spec.ts +41 -0
- package/src/features/billing/stripe-coupon/utils/coupon-places.ts +23 -0
- package/src/features/billing/stripe-coupon/utils/format-coupon-discount.ts +36 -0
- package/src/features/billing/stripe-coupon/utils/index.ts +3 -0
- package/src/features/billing/stripe-coupon/utils/to-promotion-code-result.ts +23 -0
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +24 -8
- package/src/features/billing/stripe-price/stripe-price.module.ts +2 -0
- package/src/features/billing/stripe-product/components/containers/ProductsListContainer.tsx +21 -6
- package/src/features/billing/stripe-product/stripe-product.module.ts +2 -0
- package/src/features/billing/stripe-promotion-code/components/PromoCodeInput.tsx +60 -19
- package/src/features/billing/stripe-promotion-code/data/stripe-promotion-code.interface.ts +2 -0
- package/src/features/billing/stripe-subscription/components/containers/SubscriptionsContainer.tsx +24 -5
- package/src/features/billing/stripe-subscription/components/lists/SubscriptionsList.tsx +21 -2
- package/src/features/billing/stripe-subscription/components/wizards/SubscriptionWizard.tsx +1 -1
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepPaymentMethod.tsx +1 -1
- package/src/features/billing/stripe-subscription/components/wizards/WizardStepReview.tsx +60 -49
- package/src/features/billing/stripe-subscription/components/wizards/__tests__/review-card.spec.ts +34 -0
- package/src/features/billing/stripe-subscription/components/wizards/review-card.ts +24 -0
- package/src/features/billing/stripe-subscription/data/__tests__/stripe-subscription.discount.spec.ts +67 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts +14 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.service.ts +39 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +21 -0
- package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-payment.spec.ts +48 -0
- package/src/features/billing/stripe-subscription/hooks/__tests__/wizard-promotion.spec.ts +132 -0
- package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +138 -12
- package/src/features/billing/stripe-subscription/hooks/wizard-payment.ts +30 -0
- package/src/features/billing/stripe-subscription/hooks/wizard-promotion.ts +54 -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/CurrentUserContext.tsx +25 -0
- package/src/features/user/contexts/UserContext.tsx +18 -3
- package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +121 -2
- 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-NEYG5L6W.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-AEJKJ27Q.mjs.map → BlockNoteViewer-3OUT5UFY.mjs.map} +0 -0
- /package/dist/{chunk-XCHSX3VC.mjs.map → chunk-BTPUYUQ3.mjs.map} +0 -0
- /package/dist/{chunk-6DC2WVVB.mjs.map → chunk-KQHBONL4.mjs.map} +0 -0
- /package/dist/{chunk-QMYQRPQC.mjs.map → chunk-Y7RR57EW.mjs.map} +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
AdministrationProvider,
|
|
4
3
|
Alert,
|
|
5
4
|
AlertDescription,
|
|
6
5
|
Badge,
|
|
@@ -38,8 +37,8 @@ import {
|
|
|
38
37
|
registerTableGenerator,
|
|
39
38
|
useDataListRetriever,
|
|
40
39
|
usePageUrlGenerator
|
|
41
|
-
} from "../../chunk-
|
|
42
|
-
import "../../chunk-
|
|
40
|
+
} from "../../chunk-SFYPXCK4.mjs";
|
|
41
|
+
import "../../chunk-Y7RR57EW.mjs";
|
|
43
42
|
import "../../chunk-PW42LRSL.mjs";
|
|
44
43
|
import {
|
|
45
44
|
BLOG_ACTION,
|
|
@@ -65,10 +64,10 @@ import {
|
|
|
65
64
|
showToast,
|
|
66
65
|
useI18nLocale,
|
|
67
66
|
useI18nRouter
|
|
68
|
-
} from "../../chunk-
|
|
67
|
+
} from "../../chunk-EYA2F6AN.mjs";
|
|
68
|
+
import "../../chunk-V5MI7RNB.mjs";
|
|
69
69
|
import "../../chunk-AUXK7QSA.mjs";
|
|
70
70
|
import "../../chunk-PI56A4DG.mjs";
|
|
71
|
-
import "../../chunk-V5MI7RNB.mjs";
|
|
72
71
|
import "../../chunk-VOXD3ZLY.mjs";
|
|
73
72
|
import {
|
|
74
73
|
__name
|
|
@@ -160,7 +159,7 @@ function BlogCoverImageField({
|
|
|
160
159
|
alt: alt ?? label,
|
|
161
160
|
width: 320,
|
|
162
161
|
height: 180,
|
|
163
|
-
className: "h-auto max-h-48 w-auto rounded-md object-cover",
|
|
162
|
+
className: "h-auto max-h-48 w-auto max-w-full rounded-md object-cover",
|
|
164
163
|
unoptimized: isRemoteImageSrc(previewUrl ? void 0 : currentUrl)
|
|
165
164
|
}
|
|
166
165
|
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -813,7 +812,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
813
812
|
onSuccess,
|
|
814
813
|
onNavigate: (url) => router.push(url),
|
|
815
814
|
trigger,
|
|
816
|
-
children: /* @__PURE__ */ jsxs7("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
815
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
817
816
|
!post && /* @__PURE__ */ jsx8(
|
|
818
817
|
FormSelect,
|
|
819
818
|
{
|
|
@@ -825,43 +824,50 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
825
824
|
}
|
|
826
825
|
),
|
|
827
826
|
/* @__PURE__ */ jsx8(FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
827
|
+
/* @__PURE__ */ jsxs7("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
828
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-y-4", children: [
|
|
829
|
+
post && /* @__PURE__ */ jsx8(FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
830
|
+
/* @__PURE__ */ jsx8(
|
|
831
|
+
EntityMultiSelector,
|
|
832
|
+
{
|
|
833
|
+
id: "categories",
|
|
834
|
+
form,
|
|
835
|
+
label: t("blog.fields.categories"),
|
|
836
|
+
retriever: (params) => BlogCategoryService.findMany(params),
|
|
837
|
+
module: Modules.BlogCategory,
|
|
838
|
+
getLabel: blogCategoryAdminName,
|
|
839
|
+
getFormValueLabel: (value) => value.name || categoryName(value.id)
|
|
840
|
+
}
|
|
841
|
+
),
|
|
842
|
+
/* @__PURE__ */ jsx8(
|
|
843
|
+
FormTextarea,
|
|
844
|
+
{
|
|
845
|
+
form,
|
|
846
|
+
id: "summary",
|
|
847
|
+
name: t("blog.fields.summary"),
|
|
848
|
+
description: t("blog.fields.summaryHelp"),
|
|
849
|
+
className: "min-h-24"
|
|
850
|
+
}
|
|
851
|
+
)
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-y-4", children: [
|
|
854
|
+
/* @__PURE__ */ jsx8(
|
|
855
|
+
BlogCoverImageField,
|
|
856
|
+
{
|
|
857
|
+
form,
|
|
858
|
+
id: "coverImage",
|
|
859
|
+
label: t("blog.fields.coverImage"),
|
|
860
|
+
keyPrefix: BLOG_POST_UPLOAD_PREFIX,
|
|
861
|
+
entityId: form.getValues("id"),
|
|
862
|
+
currentUrl: post?.coverImage,
|
|
863
|
+
alt: original?.coverImageAlt,
|
|
864
|
+
selection: cover,
|
|
865
|
+
onSelectionChange: setCover
|
|
866
|
+
}
|
|
867
|
+
),
|
|
868
|
+
/* @__PURE__ */ jsx8(FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") })
|
|
869
|
+
] })
|
|
870
|
+
] }),
|
|
865
871
|
/* @__PURE__ */ jsx8(
|
|
866
872
|
FormBlockNote,
|
|
867
873
|
{
|
|
@@ -871,6 +877,8 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
871
877
|
name: t("blog.fields.body"),
|
|
872
878
|
type: "blog-post",
|
|
873
879
|
isRequired: true,
|
|
880
|
+
stretch: true,
|
|
881
|
+
className: "min-h-96",
|
|
874
882
|
onEmptyChange: setIsBodyEmptyState
|
|
875
883
|
}
|
|
876
884
|
)
|
|
@@ -923,14 +931,14 @@ __name(BlogPostsList, "BlogPostsList");
|
|
|
923
931
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
924
932
|
function BlogAdminContainer() {
|
|
925
933
|
const t = useTranslations9();
|
|
926
|
-
|
|
934
|
+
const breadcrumbs = [{ name: t("blog.admin.title") }];
|
|
935
|
+
return /* @__PURE__ */ jsx10(SharedProvider, { value: { breadcrumbs, title: { type: t("blog.admin.title") } }, children: /* @__PURE__ */ jsx10(
|
|
927
936
|
RoundPageContainer,
|
|
928
937
|
{
|
|
929
938
|
module: Modules.BlogPost,
|
|
930
|
-
fullWidth: true,
|
|
931
939
|
tabs: [
|
|
932
|
-
{ sectionKey: "posts", label: t("blog.tabs.posts"), content: /* @__PURE__ */ jsx10(BlogPostsList, {
|
|
933
|
-
{ sectionKey: "categories", label: t("blog.tabs.categories"), content: /* @__PURE__ */ jsx10(BlogCategoriesList, {
|
|
940
|
+
{ sectionKey: "posts", label: t("blog.tabs.posts"), content: /* @__PURE__ */ jsx10(BlogPostsList, {}) },
|
|
941
|
+
{ sectionKey: "categories", label: t("blog.tabs.categories"), content: /* @__PURE__ */ jsx10(BlogCategoriesList, {}) },
|
|
934
942
|
{ sectionKey: "layout", label: t("blog.tabs.layout"), content: /* @__PURE__ */ jsx10(BlogLayoutSetting, {}) }
|
|
935
943
|
]
|
|
936
944
|
}
|
|
@@ -1154,11 +1162,15 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1154
1162
|
onSuccess: onSuccess ?? (() => {
|
|
1155
1163
|
}),
|
|
1156
1164
|
trigger,
|
|
1157
|
-
children: /* @__PURE__ */ jsxs10("div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
1165
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
1158
1166
|
/* @__PURE__ */ jsx15(FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
|
|
1161
|
-
|
|
1167
|
+
/* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1168
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-y-4", children: [
|
|
1169
|
+
/* @__PURE__ */ jsx15(FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
1170
|
+
/* @__PURE__ */ jsx15(FormTextarea, { form, id: "summary", name: t("blog.fields.summary"), className: "min-h-24" })
|
|
1171
|
+
] }),
|
|
1172
|
+
/* @__PURE__ */ jsx15("div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ jsx15(FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") }) })
|
|
1173
|
+
] }),
|
|
1162
1174
|
/* @__PURE__ */ jsx15(
|
|
1163
1175
|
FormBlockNote,
|
|
1164
1176
|
{
|
|
@@ -1168,6 +1180,8 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1168
1180
|
name: t("blog.fields.body"),
|
|
1169
1181
|
type: "blog-post",
|
|
1170
1182
|
isRequired: true,
|
|
1183
|
+
stretch: true,
|
|
1184
|
+
className: "min-h-96",
|
|
1171
1185
|
onEmptyChange: setIsBodyEmptyState
|
|
1172
1186
|
}
|
|
1173
1187
|
)
|
|
@@ -1316,7 +1330,6 @@ function BlogPostShell() {
|
|
|
1316
1330
|
{
|
|
1317
1331
|
module: Modules.BlogPost,
|
|
1318
1332
|
id: post.id,
|
|
1319
|
-
fullWidth: true,
|
|
1320
1333
|
forceHeader: true,
|
|
1321
1334
|
tabs: translations.map((translation) => ({
|
|
1322
1335
|
sectionKey: translation.language,
|
|
@@ -1428,7 +1441,6 @@ function BlogLoadMore(props) {
|
|
|
1428
1441
|
__name(BlogLoadMore, "BlogLoadMore");
|
|
1429
1442
|
|
|
1430
1443
|
// src/features/blog/components/public/BlogPostCard.tsx
|
|
1431
|
-
import { useFormatter as useFormatter2 } from "next-intl";
|
|
1432
1444
|
import Image3 from "next/image";
|
|
1433
1445
|
|
|
1434
1446
|
// src/features/blog/components/public/BlogPostMeta.tsx
|
|
@@ -1475,15 +1487,14 @@ function BlogPostCover(props) {
|
|
|
1475
1487
|
__name(BlogPostCover, "BlogPostCover");
|
|
1476
1488
|
function BlogPostCard(props) {
|
|
1477
1489
|
const { post, categories, basePath, variant = "card", priority, headingLevel = "h2" } = props;
|
|
1478
|
-
const format = useFormatter2();
|
|
1479
1490
|
const category = resolvePostCategory(post, categories);
|
|
1480
1491
|
const isProminent = variant === "hero" || variant === "large";
|
|
1481
|
-
const eyebrow =
|
|
1492
|
+
const eyebrow = category?.name;
|
|
1482
1493
|
const text = /* @__PURE__ */ jsxs14("div", { className: "flex min-w-0 flex-col", children: [
|
|
1483
1494
|
eyebrow ? /* @__PURE__ */ jsx21(MicroLabel, { as: "span", children: eyebrow }) : null,
|
|
1484
1495
|
/* @__PURE__ */ jsx21(SectionHeader, { level: headingLevel === "h3" ? 3 : 2, className: "mt-1.5", children: /* @__PURE__ */ jsx21(Link, { href: blogPostHref(basePath, post.slug), className: "after:absolute after:inset-0", children: post.title }) }),
|
|
1485
1496
|
post.summary ? /* @__PURE__ */ jsx21("p", { className: "text-muted-foreground mt-2 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1486
|
-
/* @__PURE__ */ jsx21(BlogPostMeta, { post, showAuthor: isProminent,
|
|
1497
|
+
/* @__PURE__ */ jsx21(BlogPostMeta, { post, showAuthor: isProminent, className: "mt-3" })
|
|
1487
1498
|
] });
|
|
1488
1499
|
if (variant === "hero") {
|
|
1489
1500
|
return /* @__PURE__ */ jsxs14("article", { className: "group relative grid items-center gap-6 md:grid-cols-[1.4fr_1fr] md:gap-10", children: [
|
|
@@ -1714,7 +1725,7 @@ import { ArrowLeftIcon } from "lucide-react";
|
|
|
1714
1725
|
import { useTranslations as useTranslations21 } from "next-intl";
|
|
1715
1726
|
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1716
1727
|
function BlogPostView(props) {
|
|
1717
|
-
const { post, categories, related, basePath } = props;
|
|
1728
|
+
const { post, categories, related, basePath, body } = props;
|
|
1718
1729
|
const t = useTranslations21();
|
|
1719
1730
|
const category = resolvePostCategory(post, categories);
|
|
1720
1731
|
const more = related.slice(0, 3);
|
|
@@ -1727,7 +1738,7 @@ function BlogPostView(props) {
|
|
|
1727
1738
|
/* @__PURE__ */ jsxs19("header", { className: "mt-8", children: [
|
|
1728
1739
|
/* @__PURE__ */ jsx27(ContentTitle, { type: category?.name, element: post.title, headingLevel: 1, className: "mb-0" }),
|
|
1729
1740
|
post.summary ? /* @__PURE__ */ jsx27("p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1730
|
-
/* @__PURE__ */ jsx27(BlogPostMeta, { post, showAuthor: true,
|
|
1741
|
+
/* @__PURE__ */ jsx27(BlogPostMeta, { post, showAuthor: true, className: "mt-4" })
|
|
1731
1742
|
] }),
|
|
1732
1743
|
post.coverImage ? /* @__PURE__ */ jsx27(
|
|
1733
1744
|
BlogPostCover,
|
|
@@ -1739,7 +1750,7 @@ function BlogPostView(props) {
|
|
|
1739
1750
|
className: "mt-8 aspect-[16/9]"
|
|
1740
1751
|
}
|
|
1741
1752
|
) : null,
|
|
1742
|
-
/* @__PURE__ */ jsx27("div", { className: "mt-8", children: /* @__PURE__ */ jsx27(BlockNoteEditorContainer, { id: post.id, type: "blog-post", initialContent: post.body }) })
|
|
1753
|
+
/* @__PURE__ */ jsx27("div", { className: "mt-8", children: body ?? /* @__PURE__ */ jsx27(BlockNoteEditorContainer, { id: post.id, type: "blog-post", initialContent: post.body }) })
|
|
1743
1754
|
] }),
|
|
1744
1755
|
more.length > 0 ? /* @__PURE__ */ jsx27("section", { className: "mx-auto mt-16 max-w-5xl", children: /* @__PURE__ */ jsxs19("div", { className: "border-border border-t pt-10", children: [
|
|
1745
1756
|
/* @__PURE__ */ jsx27(SectionHeader, { level: 2, children: t("blog.public.moreIn", { category: category?.name ?? "" }) }),
|