@carlonicora/nextjs-jsonapi 6.20.2 → 6.20.3
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-S7EVHYWT.mjs → BlockNoteEditor-GKCETT5I.mjs} +32 -4
- package/dist/BlockNoteEditor-GKCETT5I.mjs.map +1 -0
- package/dist/{BlockNoteEditor-V76V5XFY.js → BlockNoteEditor-GZCLWUF6.js} +39 -11
- package/dist/BlockNoteEditor-GZCLWUF6.js.map +1 -0
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-2CXF5XBU.js → chunk-6IQCMCIA.js} +2 -2
- package/dist/{chunk-2CXF5XBU.js.map → chunk-6IQCMCIA.js.map} +1 -1
- package/dist/{chunk-QWQZUFFA.mjs → chunk-GNHY6W42.mjs} +2 -2
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/editors/BlockNoteEditor.tsx +42 -2
- package/src/components/editors/__tests__/BlockNoteEditor.empty-change.spec.tsx +50 -1
- package/dist/BlockNoteEditor-S7EVHYWT.mjs.map +0 -1
- package/dist/BlockNoteEditor-V76V5XFY.js.map +0 -1
- /package/dist/{chunk-QWQZUFFA.mjs.map → chunk-GNHY6W42.mjs.map} +0 -0
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunk6IQCMCIAjs = require('../../chunk-6IQCMCIA.js');
|
|
41
41
|
require('../../chunk-3EPNHTMH.js');
|
|
42
42
|
require('../../chunk-2CR7HWVS.js');
|
|
43
43
|
require('../../chunk-G4JR3SFV.js');
|
|
@@ -143,8 +143,8 @@ function BlogCoverImageField({
|
|
|
143
143
|
};
|
|
144
144
|
}, [previewUrl]);
|
|
145
145
|
const src = _nullishCoalesce(previewUrl, () => ( currentUrl));
|
|
146
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
147
|
-
|
|
146
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormFieldWrapper, { form, name: id, label, children: (field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
147
|
+
_chunk6IQCMCIAjs.FileUploader,
|
|
148
148
|
{
|
|
149
149
|
value: files,
|
|
150
150
|
onValueChange: (value) => {
|
|
@@ -157,7 +157,7 @@ function BlogCoverImageField({
|
|
|
157
157
|
},
|
|
158
158
|
dropzoneOptions: dropzone,
|
|
159
159
|
className: "w-full",
|
|
160
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
160
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center p-4", children: src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
161
161
|
_image2.default,
|
|
162
162
|
{
|
|
163
163
|
src,
|
|
@@ -219,7 +219,7 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
219
219
|
const [isRetrying, setIsRetrying] = _react.useState.call(void 0, false);
|
|
220
220
|
if (aiStatus === "completed") return null;
|
|
221
221
|
if (aiStatus === "pending" || aiStatus === "in_progress") {
|
|
222
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
222
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softBlue", children: [
|
|
223
223
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircleIcon, { className: "animate-spin" }),
|
|
224
224
|
aiStatus === "pending" ? t("blog.translation.pending") : t("blog.translation.translating")
|
|
225
225
|
] }) });
|
|
@@ -230,14 +230,14 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
230
230
|
try {
|
|
231
231
|
await onRetranslate();
|
|
232
232
|
} catch (error) {
|
|
233
|
-
|
|
233
|
+
_chunk6IQCMCIAjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
234
234
|
} finally {
|
|
235
235
|
setIsRetrying(false);
|
|
236
236
|
}
|
|
237
237
|
}, "retranslate");
|
|
238
238
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
239
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
240
|
-
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
239
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softRed", children: t("blog.translation.failed") }),
|
|
240
|
+
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { type: "button", size: "sm", variant: "outline", onClick: () => void retranslate(), disabled: isRetrying, children: [
|
|
241
241
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}),
|
|
242
242
|
t("blog.actions.translateAgain")
|
|
243
243
|
] })
|
|
@@ -298,7 +298,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
298
298
|
defaultValues: getDefaultValues()
|
|
299
299
|
});
|
|
300
300
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
301
|
-
|
|
301
|
+
_chunk6IQCMCIAjs.EditorSheet,
|
|
302
302
|
{
|
|
303
303
|
form,
|
|
304
304
|
entityType: t("blog.entities.category"),
|
|
@@ -355,7 +355,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
355
355
|
trigger,
|
|
356
356
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
357
357
|
!category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
358
|
-
|
|
358
|
+
_chunk6IQCMCIAjs.FormSelect,
|
|
359
359
|
{
|
|
360
360
|
form,
|
|
361
361
|
id: "originalLanguage",
|
|
@@ -364,9 +364,9 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
364
364
|
isRequired: true
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
368
|
-
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
369
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
367
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "name", name: t("blog.fields.name"), isRequired: true }),
|
|
368
|
+
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
369
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormTextarea, { form, id: "description", name: t("blog.fields.description") }),
|
|
370
370
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
371
371
|
BlogCoverImageField,
|
|
372
372
|
{
|
|
@@ -381,16 +381,16 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
383
|
translations.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
|
|
384
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
385
|
-
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
386
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
384
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { className: "mt-2", children: t("blog.fields.languages") }),
|
|
385
|
+
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Collapsible, { className: "rounded-md border", children: [
|
|
386
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CollapsibleTrigger, { className: "flex w-full items-center justify-between gap-x-2 px-3 py-2 text-start", children: [
|
|
387
387
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-x-2 text-sm font-medium", children: [
|
|
388
388
|
languageName(translation.language),
|
|
389
389
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogTranslationStatus, { aiStatus: translation.aiStatus })
|
|
390
390
|
] }),
|
|
391
391
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-4" })
|
|
392
392
|
] }),
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CollapsibleContent, { className: "flex flex-col gap-y-4 border-t p-3", children: [
|
|
394
394
|
translation.aiStatus === "failed" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
395
395
|
BlogTranslationStatus,
|
|
396
396
|
{
|
|
@@ -401,9 +401,9 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: `translations.${index}.name`, name: t("blog.fields.name"), isRequired: true }),
|
|
405
405
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
406
|
-
|
|
406
|
+
_chunk6IQCMCIAjs.FormInput,
|
|
407
407
|
{
|
|
408
408
|
form,
|
|
409
409
|
id: `translations.${index}.slug`,
|
|
@@ -412,7 +412,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
412
412
|
}
|
|
413
413
|
),
|
|
414
414
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
415
|
-
|
|
415
|
+
_chunk6IQCMCIAjs.FormTextarea,
|
|
416
416
|
{
|
|
417
417
|
form,
|
|
418
418
|
id: `translations.${index}.description`,
|
|
@@ -485,13 +485,13 @@ var useBlogCategoryTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
485
485
|
}, [params.fields, fieldColumnMap, t, refresh]);
|
|
486
486
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
487
487
|
}, "useBlogCategoryTableStructure");
|
|
488
|
-
|
|
488
|
+
_chunk6IQCMCIAjs.registerTableGenerator.call(void 0, "blog-categories", useBlogCategoryTableStructure);
|
|
489
489
|
|
|
490
490
|
// src/features/blog/components/admin/BlogCategoriesList.tsx
|
|
491
491
|
|
|
492
492
|
function BlogCategoriesList({ fullWidth } = {}) {
|
|
493
493
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
494
|
-
const data =
|
|
494
|
+
const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
|
|
495
495
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.BlogCategoryService.findMany(params), "retriever"),
|
|
496
496
|
retrieverParams: {},
|
|
497
497
|
module: _chunkYWLSIIE6js.Modules.BlogCategory
|
|
@@ -501,13 +501,13 @@ function BlogCategoriesList({ fullWidth } = {}) {
|
|
|
501
501
|
BlogCategoryEditor,
|
|
502
502
|
{
|
|
503
503
|
onSuccess: data.refresh,
|
|
504
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
504
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newCategory") })
|
|
505
505
|
},
|
|
506
506
|
"create-blog-category"
|
|
507
507
|
)
|
|
508
508
|
];
|
|
509
509
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
510
|
-
|
|
510
|
+
_chunk6IQCMCIAjs.ContentListTable,
|
|
511
511
|
{
|
|
512
512
|
data,
|
|
513
513
|
fields: ["name" /* name */, "languages" /* languages */],
|
|
@@ -515,7 +515,7 @@ function BlogCategoriesList({ fullWidth } = {}) {
|
|
|
515
515
|
functions,
|
|
516
516
|
fullWidth,
|
|
517
517
|
title: t("blog.entities.categories"),
|
|
518
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
518
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.EmptyState, { icon: _lucidereact.TagIcon, title: t("blog.admin.emptyCategories") })
|
|
519
519
|
}
|
|
520
520
|
);
|
|
521
521
|
}
|
|
@@ -554,15 +554,15 @@ function BlogLayoutSetting() {
|
|
|
554
554
|
_chunkCMNJENSJjs.showToast.call(void 0, t("blog.layout.saved"));
|
|
555
555
|
} catch (error) {
|
|
556
556
|
setLayout(previous);
|
|
557
|
-
|
|
557
|
+
_chunk6IQCMCIAjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
558
558
|
} finally {
|
|
559
559
|
setSaving(false);
|
|
560
560
|
}
|
|
561
561
|
}, "save");
|
|
562
562
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full max-w-3xl flex-col gap-y-4 p-4", children: [
|
|
563
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
563
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { children: t("blog.layout.title") }),
|
|
564
564
|
layout && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
565
|
-
|
|
565
|
+
_chunk6IQCMCIAjs.RadioGroup,
|
|
566
566
|
{
|
|
567
567
|
value: layout,
|
|
568
568
|
onValueChange: (value) => {
|
|
@@ -577,7 +577,7 @@ function BlogLayoutSetting() {
|
|
|
577
577
|
htmlFor: `blog-layout-${option}`,
|
|
578
578
|
className: "has-data-checked:border-primary flex cursor-pointer items-start gap-x-3 rounded-lg border p-4",
|
|
579
579
|
children: [
|
|
580
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
580
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.RadioGroupItem, { value: option, id: `blog-layout-${option}`, className: "mt-0.5" }),
|
|
581
581
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col gap-y-1", children: [
|
|
582
582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium", children: options[option].label }),
|
|
583
583
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs/relaxed", children: options[option].description })
|
|
@@ -624,7 +624,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, useBlogCategoryNames, "useBlogCategoryNames
|
|
|
624
624
|
var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
625
625
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
626
626
|
const locale = _chunkYWLSIIE6js.useI18nLocale.call(void 0, );
|
|
627
|
-
const generateUrl =
|
|
627
|
+
const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
|
|
628
628
|
const categoryName = useBlogCategoryNames();
|
|
629
629
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
630
630
|
return params.data.map((post) => {
|
|
@@ -642,7 +642,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
642
642
|
header: t("blog.fields.title"),
|
|
643
643
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
644
644
|
const post = row.original.jsonApiData;
|
|
645
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
645
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Link, { href: generateUrl({ page: _chunkYWLSIIE6js.Modules.BlogPost, id: post.id }), children: _nullishCoalesce(_nullishCoalesce(_optionalChain([post, 'access', _24 => _24.original, 'optionalAccess', _25 => _25.title]), () => ( post.title)), () => ( post.id)) });
|
|
646
646
|
}, "cell"),
|
|
647
647
|
enableSorting: false,
|
|
648
648
|
enableHiding: false
|
|
@@ -658,7 +658,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
658
658
|
published: t("blog.status.published"),
|
|
659
659
|
unpublished: t("blog.status.unpublished")
|
|
660
660
|
}[post.status];
|
|
661
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
661
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: _nullishCoalesce(BLOG_STATUS_BADGE[post.status], () => ( "softGray")), children: _nullishCoalesce(label, () => ( post.status)) });
|
|
662
662
|
}, "cell"),
|
|
663
663
|
enableSorting: false,
|
|
664
664
|
enableHiding: false
|
|
@@ -712,7 +712,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
712
712
|
}, [params.fields, fieldColumnMap, t, generateUrl, locale, categoryName]);
|
|
713
713
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
714
714
|
}, "useBlogPostTableStructure");
|
|
715
|
-
|
|
715
|
+
_chunk6IQCMCIAjs.registerTableGenerator.call(void 0, "blog-posts", useBlogPostTableStructure);
|
|
716
716
|
|
|
717
717
|
// src/features/blog/components/admin/BlogPostEditor.tsx
|
|
718
718
|
|
|
@@ -777,7 +777,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
777
777
|
return Object.keys(dirty).length > 0;
|
|
778
778
|
}, [dirtyFields, isBodyEmptyState]);
|
|
779
779
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
780
|
-
|
|
780
|
+
_chunk6IQCMCIAjs.EditorSheet,
|
|
781
781
|
{
|
|
782
782
|
form,
|
|
783
783
|
entityType: t("blog.entities.post"),
|
|
@@ -819,7 +819,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
819
819
|
trigger,
|
|
820
820
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
821
821
|
!post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
822
|
-
|
|
822
|
+
_chunk6IQCMCIAjs.FormSelect,
|
|
823
823
|
{
|
|
824
824
|
form,
|
|
825
825
|
id: "originalLanguage",
|
|
@@ -828,12 +828,12 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
828
828
|
isRequired: true
|
|
829
829
|
}
|
|
830
830
|
),
|
|
831
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
831
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
832
832
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
833
833
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
834
|
-
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
834
|
+
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
835
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
836
|
-
|
|
836
|
+
_chunk6IQCMCIAjs.EntityMultiSelector,
|
|
837
837
|
{
|
|
838
838
|
id: "categories",
|
|
839
839
|
form,
|
|
@@ -845,7 +845,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
847
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
848
|
-
|
|
848
|
+
_chunk6IQCMCIAjs.FormTextarea,
|
|
849
849
|
{
|
|
850
850
|
form,
|
|
851
851
|
id: "summary",
|
|
@@ -870,11 +870,11 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
870
870
|
onSelectionChange: setCover
|
|
871
871
|
}
|
|
872
872
|
),
|
|
873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") })
|
|
874
874
|
] })
|
|
875
875
|
] }),
|
|
876
876
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
877
|
-
|
|
877
|
+
_chunk6IQCMCIAjs.FormBlockNote,
|
|
878
878
|
{
|
|
879
879
|
uploadKeyPrefix: _chunkCMNJENSJjs.BLOG_POST_UPLOAD_PREFIX,
|
|
880
880
|
form,
|
|
@@ -897,7 +897,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostEditor, "BlogPostEditor");
|
|
|
897
897
|
|
|
898
898
|
function BlogPostsList({ fullWidth } = {}) {
|
|
899
899
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
900
|
-
const data =
|
|
900
|
+
const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
|
|
901
901
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.BlogPostService.findMany(params), "retriever"),
|
|
902
902
|
retrieverParams: {},
|
|
903
903
|
module: _chunkYWLSIIE6js.Modules.BlogPost
|
|
@@ -906,13 +906,13 @@ function BlogPostsList({ fullWidth } = {}) {
|
|
|
906
906
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
907
|
BlogPostEditor,
|
|
908
908
|
{
|
|
909
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newPost") })
|
|
910
910
|
},
|
|
911
911
|
"create-blog-post"
|
|
912
912
|
)
|
|
913
913
|
];
|
|
914
914
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
-
|
|
915
|
+
_chunk6IQCMCIAjs.ContentListTable,
|
|
916
916
|
{
|
|
917
917
|
data,
|
|
918
918
|
fields: [
|
|
@@ -926,7 +926,7 @@ function BlogPostsList({ fullWidth } = {}) {
|
|
|
926
926
|
functions,
|
|
927
927
|
fullWidth,
|
|
928
928
|
title: t("blog.entities.posts"),
|
|
929
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
929
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.EmptyState, { icon: _lucidereact.NewspaperIcon, title: t("blog.admin.empty") })
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
932
|
}
|
|
@@ -937,8 +937,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostsList, "BlogPostsList");
|
|
|
937
937
|
function BlogAdminContainer() {
|
|
938
938
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
939
939
|
const breadcrumbs = [{ name: t("blog.admin.title") }];
|
|
940
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
941
|
-
|
|
940
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SharedProvider, { value: { breadcrumbs, title: { type: t("blog.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
941
|
+
_chunk6IQCMCIAjs.RoundPageContainer,
|
|
942
942
|
{
|
|
943
943
|
module: _chunkYWLSIIE6js.Modules.BlogPost,
|
|
944
944
|
tabs: [
|
|
@@ -999,12 +999,12 @@ var useBlogPost = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
|
999
999
|
|
|
1000
1000
|
function BlogPostDeleter() {
|
|
1001
1001
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1002
|
-
const generateUrl =
|
|
1002
|
+
const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
|
|
1003
1003
|
const { post } = useBlogPost();
|
|
1004
1004
|
if (!post) return null;
|
|
1005
1005
|
const type = t("blog.entities.post");
|
|
1006
1006
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
|
-
|
|
1007
|
+
_chunk6IQCMCIAjs.CommonDeleter,
|
|
1008
1008
|
{
|
|
1009
1009
|
title: t("common.delete.title", { type }),
|
|
1010
1010
|
subtitle: t("common.delete.subtitle", { type }),
|
|
@@ -1035,13 +1035,13 @@ function BlogPostPublishButton() {
|
|
|
1035
1035
|
else await _chunkCMNJENSJjs.BlogPostService.publish({ id: post.id });
|
|
1036
1036
|
await reload();
|
|
1037
1037
|
} catch (error) {
|
|
1038
|
-
|
|
1038
|
+
_chunk6IQCMCIAjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
1039
1039
|
} finally {
|
|
1040
1040
|
setSaving(false);
|
|
1041
1041
|
}
|
|
1042
1042
|
}, "toggle");
|
|
1043
1043
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1044
|
-
|
|
1044
|
+
_chunk6IQCMCIAjs.Button,
|
|
1045
1045
|
{
|
|
1046
1046
|
type: "button",
|
|
1047
1047
|
size: "sm",
|
|
@@ -1069,11 +1069,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostPublishButton, "BlogPostPublishButt
|
|
|
1069
1069
|
function BlogPostTranslationFields({ translation }) {
|
|
1070
1070
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1071
1071
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1072
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1073
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1074
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1075
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1072
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.title"), value: translation.title }),
|
|
1073
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.slug"), value: translation.slug }),
|
|
1074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.summary"), value: translation.summary }),
|
|
1075
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.coverImageAlt"), value: translation.coverImageAlt }),
|
|
1076
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.body"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.BlockNoteEditorContainer, { id: translation.id, type: "blog-post", initialContent: translation.body }) })
|
|
1077
1077
|
] });
|
|
1078
1078
|
}
|
|
1079
1079
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostTranslationFields, "BlogPostTranslationFields");
|
|
@@ -1083,15 +1083,15 @@ function BlogPostComparison({ original, translation }) {
|
|
|
1083
1083
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1084
1084
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1085
1085
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1086
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1087
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1086
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.MicroLabel, { as: "h3", children: languageName(original.language) }),
|
|
1087
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: t("blog.translation.original") })
|
|
1088
1088
|
] }),
|
|
1089
1089
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation: original })
|
|
1090
1090
|
] }),
|
|
1091
1091
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1092
1092
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1093
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1094
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.MicroLabel, { as: "h3", children: languageName(translation.language) }),
|
|
1094
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") })
|
|
1095
1095
|
] }),
|
|
1096
1096
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation })
|
|
1097
1097
|
] })
|
|
@@ -1142,7 +1142,7 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1142
1142
|
return Object.keys(dirty).length > 0;
|
|
1143
1143
|
}, [dirtyFields, isBodyEmptyState]);
|
|
1144
1144
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1145
|
-
|
|
1145
|
+
_chunk6IQCMCIAjs.EditorSheet,
|
|
1146
1146
|
{
|
|
1147
1147
|
form,
|
|
1148
1148
|
entityType: t("blog.entities.post"),
|
|
@@ -1168,16 +1168,16 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1168
1168
|
}))),
|
|
1169
1169
|
trigger,
|
|
1170
1170
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
1171
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1171
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
1172
1172
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1173
1173
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1174
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1175
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1174
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
1175
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormTextarea, { form, id: "summary", name: t("blog.fields.summary"), className: "min-h-24" })
|
|
1176
1176
|
] }),
|
|
1177
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1177
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") }) })
|
|
1178
1178
|
] }),
|
|
1179
1179
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
-
|
|
1180
|
+
_chunk6IQCMCIAjs.FormBlockNote,
|
|
1181
1181
|
{
|
|
1182
1182
|
uploadKeyPrefix: _chunkCMNJENSJjs.BLOG_POST_UPLOAD_PREFIX,
|
|
1183
1183
|
form,
|
|
@@ -1207,7 +1207,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1207
1207
|
const original = post.original;
|
|
1208
1208
|
const reload = _nullishCoalesce(onChanged, () => ( (async () => {
|
|
1209
1209
|
})));
|
|
1210
|
-
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1210
|
+
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: [
|
|
1211
1211
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {}),
|
|
1212
1212
|
t("blog.actions.edit")
|
|
1213
1213
|
] });
|
|
@@ -1219,7 +1219,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1219
1219
|
}[post.status];
|
|
1220
1220
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1221
1221
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1222
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1222
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: t("blog.translation.original") }),
|
|
1223
1223
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostEditor, { post, trigger: editTrigger, onSuccess: reload })
|
|
1224
1224
|
] }),
|
|
1225
1225
|
post.coverImage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1234,10 +1234,10 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
),
|
|
1236
1236
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
1237
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1238
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1237
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.status"), value: statusLabel }),
|
|
1238
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("blog.fields.publishedAt"), value: formatDate(post.publishedAt) || "\u2014" }),
|
|
1239
1239
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1240
|
-
|
|
1240
|
+
_chunk6IQCMCIAjs.DetailField,
|
|
1241
1241
|
{
|
|
1242
1242
|
label: t("blog.fields.categories"),
|
|
1243
1243
|
value: post.categories.map((category) => categoryName(category.id)).filter(Boolean).join(", ") || "\u2014"
|
|
@@ -1249,16 +1249,16 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
const isWorking = translation.aiStatus === "pending" || translation.aiStatus === "in_progress";
|
|
1251
1251
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1252
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1252
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Alert, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.AlertDescription, { className: "flex flex-col gap-y-2", children: [
|
|
1253
1253
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1254
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1254
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") }),
|
|
1255
1255
|
original && translation.translatedAt && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.translatedFrom", {
|
|
1256
1256
|
language: languageName(original.language),
|
|
1257
1257
|
date: formatDate(translation.translatedAt)
|
|
1258
1258
|
}) })
|
|
1259
1259
|
] }),
|
|
1260
1260
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.overwriteWarning") }),
|
|
1261
|
-
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1261
|
+
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setIsComparing((value) => !value), children: isComparing ? t("blog.actions.hideComparison") : t("blog.actions.compareWithOriginal") }) })
|
|
1262
1262
|
] }) }),
|
|
1263
1263
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1264
1264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1286,7 +1286,7 @@ function BlogPostContainer({ postId }) {
|
|
|
1286
1286
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostContainer, "BlogPostContainer");
|
|
1287
1287
|
function BlogPostShell() {
|
|
1288
1288
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1289
|
-
const generateUrl =
|
|
1289
|
+
const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
|
|
1290
1290
|
const languageName = useBlogLanguageName();
|
|
1291
1291
|
const { post, reload } = useBlogPost();
|
|
1292
1292
|
const translations = _react.useMemo.call(void 0, () => {
|
|
@@ -1316,7 +1316,7 @@ function BlogPostShell() {
|
|
|
1316
1316
|
return parts.join(" \xB7 ");
|
|
1317
1317
|
}, "tabLabel");
|
|
1318
1318
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1319
|
-
|
|
1319
|
+
_chunk6IQCMCIAjs.SharedProvider,
|
|
1320
1320
|
{
|
|
1321
1321
|
value: {
|
|
1322
1322
|
breadcrumbs,
|
|
@@ -1324,14 +1324,14 @@ function BlogPostShell() {
|
|
|
1324
1324
|
type: t("blog.admin.title"),
|
|
1325
1325
|
element: title,
|
|
1326
1326
|
functions: [
|
|
1327
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: BLOG_STATUS_BADGE[post.status], children: statusLabel }, "blogPostStatus"),
|
|
1328
1328
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostPublishButton, {}, "blogPostPublish"),
|
|
1329
1329
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostDeleter, {}, "blogPostDeleter")
|
|
1330
1330
|
]
|
|
1331
1331
|
}
|
|
1332
1332
|
},
|
|
1333
1333
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1334
|
-
|
|
1334
|
+
_chunk6IQCMCIAjs.RoundPageContainer,
|
|
1335
1335
|
{
|
|
1336
1336
|
module: _chunkYWLSIIE6js.Modules.BlogPost,
|
|
1337
1337
|
id: post.id,
|
|
@@ -1395,10 +1395,10 @@ function BlogCategoryChips(props) {
|
|
|
1395
1395
|
];
|
|
1396
1396
|
const inactiveVariant = variant === "chips" ? "outline" : "ghost";
|
|
1397
1397
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { "aria-label": t("blog.entities.categories"), className, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: variant === "chips" ? "flex flex-wrap items-center gap-2" : "flex flex-col items-start gap-2", children: items.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1398
|
-
|
|
1398
|
+
_chunk6IQCMCIAjs.Badge,
|
|
1399
1399
|
{
|
|
1400
1400
|
variant: item.active ? "default" : inactiveVariant,
|
|
1401
|
-
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1401
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Link, { href: item.href, "aria-current": item.active ? "page" : void 0 }),
|
|
1402
1402
|
children: item.label
|
|
1403
1403
|
}
|
|
1404
1404
|
) }, item.key)) }) });
|
|
@@ -1413,7 +1413,7 @@ function BlogListHeader(props) {
|
|
|
1413
1413
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1414
1414
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: align === "center" ? "text-center" : void 0, children: [
|
|
1415
1415
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1416
|
-
|
|
1416
|
+
_chunk6IQCMCIAjs.ContentTitle,
|
|
1417
1417
|
{
|
|
1418
1418
|
type: t("blog.public.eyebrow"),
|
|
1419
1419
|
element: t("blog.public.title"),
|
|
@@ -1434,11 +1434,11 @@ function BlogLoadMore(props) {
|
|
|
1434
1434
|
const { basePath, page, activeCategorySlug, query, className } = props;
|
|
1435
1435
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1436
1436
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkCMNJENSJjs.cn.call(void 0, "flex justify-center", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1437
|
-
|
|
1437
|
+
_chunk6IQCMCIAjs.Link,
|
|
1438
1438
|
{
|
|
1439
1439
|
href: blogListHref(basePath, { category: activeCategorySlug, q: query, page: page + 1 }),
|
|
1440
1440
|
scroll: false,
|
|
1441
|
-
className:
|
|
1441
|
+
className: _chunk6IQCMCIAjs.buttonVariants.call(void 0, { variant: "outline" }),
|
|
1442
1442
|
children: t("blog.public.loadMore")
|
|
1443
1443
|
}
|
|
1444
1444
|
) });
|
|
@@ -1496,8 +1496,8 @@ function BlogPostCard(props) {
|
|
|
1496
1496
|
const isProminent = variant === "hero" || variant === "large";
|
|
1497
1497
|
const eyebrow = _optionalChain([category, 'optionalAccess', _46 => _46.name]);
|
|
1498
1498
|
const text = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
1499
|
-
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1499
|
+
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.MicroLabel, { as: "span", children: eyebrow }) : null,
|
|
1500
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { level: headingLevel === "h3" ? 3 : 2, className: "mt-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Link, { href: blogPostHref(basePath, post.slug), className: "after:absolute after:inset-0", children: post.title }) }),
|
|
1501
1501
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-2 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1502
1502
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: isProminent, className: "mt-3" })
|
|
1503
1503
|
] });
|
|
@@ -1563,10 +1563,10 @@ function BlogSearchBox(props) {
|
|
|
1563
1563
|
const q = value.trim();
|
|
1564
1564
|
router.push(blogListHref(basePath, { category: activeCategorySlug, q: q || void 0 }));
|
|
1565
1565
|
}, "onSubmit");
|
|
1566
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1567
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1566
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.InputGroup, { children: [
|
|
1567
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, {}) }),
|
|
1568
1568
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1569
|
-
|
|
1569
|
+
_chunk6IQCMCIAjs.InputGroupInput,
|
|
1570
1570
|
{
|
|
1571
1571
|
type: "search",
|
|
1572
1572
|
name: "q",
|
|
@@ -1678,7 +1678,7 @@ function BlogListRail(props) {
|
|
|
1678
1678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogListHeader, { showSubtitle: false }),
|
|
1679
1679
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogSearchBox, { basePath, query, activeCategorySlug }),
|
|
1680
1680
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
1681
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1681
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.MicroLabel, { as: "span", className: "block", children: t("blog.entities.categories") }),
|
|
1682
1682
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1683
1683
|
BlogCategoryChips,
|
|
1684
1684
|
{
|
|
@@ -1736,12 +1736,12 @@ function BlogPostView(props) {
|
|
|
1736
1736
|
const more = related.slice(0, 3);
|
|
1737
1737
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "px-4 pt-12 pb-20 md:pt-16", children: [
|
|
1738
1738
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mx-auto max-w-3xl", children: [
|
|
1739
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1739
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Link, { href: basePath, className: "inline-flex items-center gap-1.5", children: [
|
|
1740
1740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowLeftIcon, { className: "size-4 rtl:rotate-180" }),
|
|
1741
1741
|
t("blog.public.back")
|
|
1742
1742
|
] }),
|
|
1743
1743
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: "mt-8", children: [
|
|
1744
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1744
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.ContentTitle, { type: _optionalChain([category, 'optionalAccess', _47 => _47.name]), element: post.title, headingLevel: 1, className: "mb-0" }),
|
|
1745
1745
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1746
1746
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: true, className: "mt-4" })
|
|
1747
1747
|
] }),
|
|
@@ -1755,10 +1755,10 @@ function BlogPostView(props) {
|
|
|
1755
1755
|
className: "mt-8 aspect-[16/9]"
|
|
1756
1756
|
}
|
|
1757
1757
|
) : null,
|
|
1758
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1758
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.BlockNoteEditorContainer, { id: post.id, type: "blog-post", initialContent: post.body }))) })
|
|
1759
1759
|
] }),
|
|
1760
1760
|
more.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "mx-auto mt-16 max-w-5xl", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-border border-t pt-10", children: [
|
|
1761
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { level: 2, children: t("blog.public.moreIn", { category: _nullishCoalesce(_optionalChain([category, 'optionalAccess', _48 => _48.name]), () => ( "")) }) }),
|
|
1762
1762
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-6 grid gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3", children: more.map((relatedPost) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1763
1763
|
BlogPostCard,
|
|
1764
1764
|
{
|