@carlonicora/nextjs-jsonapi 6.28.0 → 6.29.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-2LO34HXR.mjs → BlockNoteEditor-BHCNJ2JA.mjs} +8 -60
- package/dist/BlockNoteEditor-BHCNJ2JA.mjs.map +1 -0
- package/dist/{BlockNoteEditor-SWDRMNLT.js → BlockNoteEditor-KGCHQQVY.js} +21 -73
- package/dist/BlockNoteEditor-KGCHQQVY.js.map +1 -0
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-NV3NNNS6.mjs → chunk-UQFDOZVF.mjs} +66 -5
- package/dist/chunk-UQFDOZVF.mjs.map +1 -0
- package/dist/{chunk-6RWEYSYE.js → chunk-WXTEAATG.js} +67 -6
- package/dist/chunk-WXTEAATG.js.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/editors/BlockNoteEditorMentionHoverCard.d.ts.map +1 -1
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts +2 -0
- package/dist/components/editors/BlockNoteEditorMentionInlineContent.d.ts.map +1 -1
- package/dist/components/editors/index.d.ts +1 -0
- package/dist/components/editors/index.d.ts.map +1 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -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/BlockNoteEditorMentionHoverCard.tsx +8 -1
- package/src/components/editors/BlockNoteEditorMentionInlineContent.tsx +3 -1
- package/src/components/editors/__tests__/BlockNoteEditorMentionHoverCard.spec.tsx +42 -0
- package/src/components/editors/__tests__/BlockNoteEditorMentionInlineContent.spec.ts +30 -2
- package/src/components/editors/__tests__/blocknote-editor-options.spec.ts +8 -0
- package/src/components/editors/index.ts +1 -0
- package/dist/BlockNoteEditor-2LO34HXR.mjs.map +0 -1
- package/dist/BlockNoteEditor-SWDRMNLT.js.map +0 -1
- package/dist/chunk-6RWEYSYE.js.map +0 -1
- package/dist/chunk-NV3NNNS6.mjs.map +0 -1
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkWXTEAATGjs = require('../../chunk-WXTEAATG.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunkSYMI4IDWjs = require('../../chunk-SYMI4IDW.js');
|
|
@@ -149,8 +149,8 @@ function BlogCoverImageField({
|
|
|
149
149
|
};
|
|
150
150
|
}, [previewUrl]);
|
|
151
151
|
const src = _nullishCoalesce(previewUrl, () => ( currentUrl));
|
|
152
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
153
|
-
|
|
152
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormFieldWrapper, { form, name: id, label, children: (field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
153
|
+
_chunkWXTEAATGjs.FileUploader,
|
|
154
154
|
{
|
|
155
155
|
value: files,
|
|
156
156
|
onValueChange: (value) => {
|
|
@@ -163,7 +163,7 @@ function BlogCoverImageField({
|
|
|
163
163
|
},
|
|
164
164
|
dropzoneOptions: dropzone,
|
|
165
165
|
className: "w-full",
|
|
166
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
166
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.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,
|
|
167
167
|
_image2.default,
|
|
168
168
|
{
|
|
169
169
|
src,
|
|
@@ -225,7 +225,7 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
225
225
|
const [isRetrying, setIsRetrying] = _react.useState.call(void 0, false);
|
|
226
226
|
if (aiStatus === "completed") return null;
|
|
227
227
|
if (aiStatus === "pending" || aiStatus === "in_progress") {
|
|
228
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
228
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softBlue", children: [
|
|
229
229
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircleIcon, { className: "animate-spin" }),
|
|
230
230
|
aiStatus === "pending" ? t("blog.translation.pending") : t("blog.translation.translating")
|
|
231
231
|
] }) });
|
|
@@ -236,14 +236,14 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
236
236
|
try {
|
|
237
237
|
await onRetranslate();
|
|
238
238
|
} catch (error) {
|
|
239
|
-
|
|
239
|
+
_chunkWXTEAATGjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
240
240
|
} finally {
|
|
241
241
|
setIsRetrying(false);
|
|
242
242
|
}
|
|
243
243
|
}, "retranslate");
|
|
244
244
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
245
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
246
|
-
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
245
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softRed", children: t("blog.translation.failed") }),
|
|
246
|
+
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.Button, { type: "button", size: "sm", variant: "outline", onClick: () => void retranslate(), disabled: isRetrying, children: [
|
|
247
247
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}),
|
|
248
248
|
t("blog.actions.translateAgain")
|
|
249
249
|
] })
|
|
@@ -304,7 +304,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
304
304
|
defaultValues: getDefaultValues()
|
|
305
305
|
});
|
|
306
306
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
307
|
-
|
|
307
|
+
_chunkWXTEAATGjs.EditorSheet,
|
|
308
308
|
{
|
|
309
309
|
form,
|
|
310
310
|
entityType: t("blog.entities.category"),
|
|
@@ -361,7 +361,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
361
361
|
trigger,
|
|
362
362
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
363
363
|
!category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
364
|
-
|
|
364
|
+
_chunkWXTEAATGjs.FormSelect,
|
|
365
365
|
{
|
|
366
366
|
form,
|
|
367
367
|
id: "originalLanguage",
|
|
@@ -370,9 +370,9 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
370
370
|
isRequired: true
|
|
371
371
|
}
|
|
372
372
|
),
|
|
373
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
374
|
-
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
375
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
373
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "name", name: t("blog.fields.name"), isRequired: true }),
|
|
374
|
+
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
375
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormTextarea, { form, id: "description", name: t("blog.fields.description") }),
|
|
376
376
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
377
|
BlogCoverImageField,
|
|
378
378
|
{
|
|
@@ -387,16 +387,16 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
387
387
|
}
|
|
388
388
|
),
|
|
389
389
|
translations.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
|
|
390
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
391
|
-
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
392
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
390
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.SectionHeader, { className: "mt-2", children: t("blog.fields.languages") }),
|
|
391
|
+
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.Collapsible, { className: "rounded-md border", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.CollapsibleTrigger, { className: "flex w-full items-center justify-between gap-x-2 px-3 py-2 text-start", children: [
|
|
393
393
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-x-2 text-sm font-medium", children: [
|
|
394
394
|
languageName(translation.language),
|
|
395
395
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogTranslationStatus, { aiStatus: translation.aiStatus })
|
|
396
396
|
] }),
|
|
397
397
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-4" })
|
|
398
398
|
] }),
|
|
399
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
399
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.CollapsibleContent, { className: "flex flex-col gap-y-4 border-t p-3", children: [
|
|
400
400
|
translation.aiStatus === "failed" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
401
401
|
BlogTranslationStatus,
|
|
402
402
|
{
|
|
@@ -407,9 +407,9 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
410
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: `translations.${index}.name`, name: t("blog.fields.name"), isRequired: true }),
|
|
411
411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
412
|
-
|
|
412
|
+
_chunkWXTEAATGjs.FormInput,
|
|
413
413
|
{
|
|
414
414
|
form,
|
|
415
415
|
id: `translations.${index}.slug`,
|
|
@@ -418,7 +418,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
418
418
|
}
|
|
419
419
|
),
|
|
420
420
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
421
|
-
|
|
421
|
+
_chunkWXTEAATGjs.FormTextarea,
|
|
422
422
|
{
|
|
423
423
|
form,
|
|
424
424
|
id: `translations.${index}.description`,
|
|
@@ -491,13 +491,13 @@ var useBlogCategoryTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
491
491
|
}, [params.fields, fieldColumnMap, t, refresh]);
|
|
492
492
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
493
493
|
}, "useBlogCategoryTableStructure");
|
|
494
|
-
|
|
494
|
+
_chunkWXTEAATGjs.registerTableGenerator.call(void 0, "blog-categories", useBlogCategoryTableStructure);
|
|
495
495
|
|
|
496
496
|
// src/features/blog/components/admin/BlogCategoriesList.tsx
|
|
497
497
|
|
|
498
498
|
function BlogCategoriesList({ fullWidth } = {}) {
|
|
499
499
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
500
|
-
const data =
|
|
500
|
+
const data = _chunkWXTEAATGjs.useDataListRetriever.call(void 0, {
|
|
501
501
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.BlogCategoryService.findMany(params), "retriever"),
|
|
502
502
|
retrieverParams: {},
|
|
503
503
|
module: _chunkZ6T2575Ajs.Modules.BlogCategory
|
|
@@ -507,13 +507,13 @@ function BlogCategoriesList({ fullWidth } = {}) {
|
|
|
507
507
|
BlogCategoryEditor,
|
|
508
508
|
{
|
|
509
509
|
onSuccess: data.refresh,
|
|
510
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
510
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newCategory") })
|
|
511
511
|
},
|
|
512
512
|
"create-blog-category"
|
|
513
513
|
)
|
|
514
514
|
];
|
|
515
515
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
516
|
-
|
|
516
|
+
_chunkWXTEAATGjs.ContentListTable,
|
|
517
517
|
{
|
|
518
518
|
data,
|
|
519
519
|
fields: ["name" /* name */, "languages" /* languages */],
|
|
@@ -521,7 +521,7 @@ function BlogCategoriesList({ fullWidth } = {}) {
|
|
|
521
521
|
functions,
|
|
522
522
|
fullWidth,
|
|
523
523
|
title: t("blog.entities.categories"),
|
|
524
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
524
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.EmptyState, { icon: _lucidereact.TagIcon, title: t("blog.admin.emptyCategories") })
|
|
525
525
|
}
|
|
526
526
|
);
|
|
527
527
|
}
|
|
@@ -560,15 +560,15 @@ function BlogLayoutSetting() {
|
|
|
560
560
|
_chunk77JC2UCFjs.showToast.call(void 0, t("blog.layout.saved"));
|
|
561
561
|
} catch (error) {
|
|
562
562
|
setLayout(previous);
|
|
563
|
-
|
|
563
|
+
_chunkWXTEAATGjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
564
564
|
} finally {
|
|
565
565
|
setSaving(false);
|
|
566
566
|
}
|
|
567
567
|
}, "save");
|
|
568
568
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full max-w-3xl flex-col gap-y-4 p-4", children: [
|
|
569
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
569
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.SectionHeader, { children: t("blog.layout.title") }),
|
|
570
570
|
layout && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
571
|
-
|
|
571
|
+
_chunkWXTEAATGjs.RadioGroup,
|
|
572
572
|
{
|
|
573
573
|
value: layout,
|
|
574
574
|
onValueChange: (value) => {
|
|
@@ -583,7 +583,7 @@ function BlogLayoutSetting() {
|
|
|
583
583
|
htmlFor: `blog-layout-${option}`,
|
|
584
584
|
className: "has-data-checked:border-primary flex cursor-pointer items-start gap-x-3 rounded-lg border p-4",
|
|
585
585
|
children: [
|
|
586
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
586
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.RadioGroupItem, { value: option, id: `blog-layout-${option}`, className: "mt-0.5" }),
|
|
587
587
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col gap-y-1", children: [
|
|
588
588
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium", children: options[option].label }),
|
|
589
589
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs/relaxed", children: options[option].description })
|
|
@@ -630,7 +630,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, useBlogCategoryNames, "useBlogCategoryNames
|
|
|
630
630
|
var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
631
631
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
632
632
|
const dates = _chunkSYMI4IDWjs.useDateFormatter.call(void 0, );
|
|
633
|
-
const generateUrl =
|
|
633
|
+
const generateUrl = _chunkWXTEAATGjs.usePageUrlGenerator.call(void 0, );
|
|
634
634
|
const categoryName = useBlogCategoryNames();
|
|
635
635
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
636
636
|
return params.data.map((post) => {
|
|
@@ -648,7 +648,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
648
648
|
header: t("blog.fields.title"),
|
|
649
649
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
650
650
|
const post = row.original.jsonApiData;
|
|
651
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
651
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Link, { href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.BlogPost, id: post.id }), children: _nullishCoalesce(_nullishCoalesce(_optionalChain([post, 'access', _24 => _24.original, 'optionalAccess', _25 => _25.title]), () => ( post.title)), () => ( post.id)) });
|
|
652
652
|
}, "cell"),
|
|
653
653
|
enableSorting: false,
|
|
654
654
|
enableHiding: false
|
|
@@ -664,7 +664,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
664
664
|
published: t("blog.status.published"),
|
|
665
665
|
unpublished: t("blog.status.unpublished")
|
|
666
666
|
}[post.status];
|
|
667
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
667
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: _nullishCoalesce(BLOG_STATUS_BADGE[post.status], () => ( "softGray")), children: _nullishCoalesce(label, () => ( post.status)) });
|
|
668
668
|
}, "cell"),
|
|
669
669
|
enableSorting: false,
|
|
670
670
|
enableHiding: false
|
|
@@ -718,7 +718,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
718
718
|
}, [params.fields, fieldColumnMap, t, generateUrl, dates, categoryName]);
|
|
719
719
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
720
720
|
}, "useBlogPostTableStructure");
|
|
721
|
-
|
|
721
|
+
_chunkWXTEAATGjs.registerTableGenerator.call(void 0, "blog-posts", useBlogPostTableStructure);
|
|
722
722
|
|
|
723
723
|
// src/features/blog/components/admin/BlogPostEditor.tsx
|
|
724
724
|
|
|
@@ -783,7 +783,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
783
783
|
return Object.keys(dirty).length > 0;
|
|
784
784
|
}, [dirtyFields, isBodyEmptyState]);
|
|
785
785
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
786
|
-
|
|
786
|
+
_chunkWXTEAATGjs.EditorSheet,
|
|
787
787
|
{
|
|
788
788
|
form,
|
|
789
789
|
entityType: t("blog.entities.post"),
|
|
@@ -825,7 +825,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
825
825
|
trigger,
|
|
826
826
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
827
827
|
!post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
828
|
-
|
|
828
|
+
_chunkWXTEAATGjs.FormSelect,
|
|
829
829
|
{
|
|
830
830
|
form,
|
|
831
831
|
id: "originalLanguage",
|
|
@@ -834,12 +834,12 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
834
834
|
isRequired: true
|
|
835
835
|
}
|
|
836
836
|
),
|
|
837
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
837
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
838
838
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
839
839
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
840
|
-
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
840
|
+
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
841
841
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
842
|
-
|
|
842
|
+
_chunkWXTEAATGjs.EntityMultiSelector,
|
|
843
843
|
{
|
|
844
844
|
id: "categories",
|
|
845
845
|
form,
|
|
@@ -851,7 +851,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
851
851
|
}
|
|
852
852
|
),
|
|
853
853
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
-
|
|
854
|
+
_chunkWXTEAATGjs.FormTextarea,
|
|
855
855
|
{
|
|
856
856
|
form,
|
|
857
857
|
id: "summary",
|
|
@@ -876,11 +876,11 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
876
876
|
onSelectionChange: setCover
|
|
877
877
|
}
|
|
878
878
|
),
|
|
879
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
879
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") })
|
|
880
880
|
] })
|
|
881
881
|
] }),
|
|
882
882
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
883
|
-
|
|
883
|
+
_chunkWXTEAATGjs.FormBlockNote,
|
|
884
884
|
{
|
|
885
885
|
uploadKeyPrefix: _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX,
|
|
886
886
|
form,
|
|
@@ -903,7 +903,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostEditor, "BlogPostEditor");
|
|
|
903
903
|
|
|
904
904
|
function BlogPostsList({ fullWidth } = {}) {
|
|
905
905
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
906
|
-
const data =
|
|
906
|
+
const data = _chunkWXTEAATGjs.useDataListRetriever.call(void 0, {
|
|
907
907
|
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.BlogPostService.findMany(params), "retriever"),
|
|
908
908
|
retrieverParams: {},
|
|
909
909
|
module: _chunkZ6T2575Ajs.Modules.BlogPost
|
|
@@ -912,13 +912,13 @@ function BlogPostsList({ fullWidth } = {}) {
|
|
|
912
912
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
913
913
|
BlogPostEditor,
|
|
914
914
|
{
|
|
915
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newPost") })
|
|
916
916
|
},
|
|
917
917
|
"create-blog-post"
|
|
918
918
|
)
|
|
919
919
|
];
|
|
920
920
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
921
|
-
|
|
921
|
+
_chunkWXTEAATGjs.ContentListTable,
|
|
922
922
|
{
|
|
923
923
|
data,
|
|
924
924
|
fields: [
|
|
@@ -932,7 +932,7 @@ function BlogPostsList({ fullWidth } = {}) {
|
|
|
932
932
|
functions,
|
|
933
933
|
fullWidth,
|
|
934
934
|
title: t("blog.entities.posts"),
|
|
935
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
935
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.EmptyState, { icon: _lucidereact.NewspaperIcon, title: t("blog.admin.empty") })
|
|
936
936
|
}
|
|
937
937
|
);
|
|
938
938
|
}
|
|
@@ -943,8 +943,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostsList, "BlogPostsList");
|
|
|
943
943
|
function BlogAdminContainer() {
|
|
944
944
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
945
945
|
const breadcrumbs = [{ name: t("blog.admin.title") }];
|
|
946
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
947
|
-
|
|
946
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.SharedProvider, { value: { breadcrumbs, title: { type: t("blog.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
947
|
+
_chunkWXTEAATGjs.RoundPageContainer,
|
|
948
948
|
{
|
|
949
949
|
module: _chunkZ6T2575Ajs.Modules.BlogPost,
|
|
950
950
|
tabs: [
|
|
@@ -1005,12 +1005,12 @@ var useBlogPost = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
|
1005
1005
|
|
|
1006
1006
|
function BlogPostDeleter() {
|
|
1007
1007
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1008
|
-
const generateUrl =
|
|
1008
|
+
const generateUrl = _chunkWXTEAATGjs.usePageUrlGenerator.call(void 0, );
|
|
1009
1009
|
const { post } = useBlogPost();
|
|
1010
1010
|
if (!post) return null;
|
|
1011
1011
|
const type = t("blog.entities.post");
|
|
1012
1012
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1013
|
-
|
|
1013
|
+
_chunkWXTEAATGjs.CommonDeleter,
|
|
1014
1014
|
{
|
|
1015
1015
|
title: t("common.delete.title", { type }),
|
|
1016
1016
|
subtitle: t("common.delete.subtitle", { type }),
|
|
@@ -1041,13 +1041,13 @@ function BlogPostPublishButton() {
|
|
|
1041
1041
|
else await _chunk77JC2UCFjs.BlogPostService.publish({ id: post.id });
|
|
1042
1042
|
await reload();
|
|
1043
1043
|
} catch (error) {
|
|
1044
|
-
|
|
1044
|
+
_chunkWXTEAATGjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
1045
1045
|
} finally {
|
|
1046
1046
|
setSaving(false);
|
|
1047
1047
|
}
|
|
1048
1048
|
}, "toggle");
|
|
1049
1049
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1050
|
-
|
|
1050
|
+
_chunkWXTEAATGjs.Button,
|
|
1051
1051
|
{
|
|
1052
1052
|
type: "button",
|
|
1053
1053
|
size: "sm",
|
|
@@ -1075,11 +1075,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostPublishButton, "BlogPostPublishButt
|
|
|
1075
1075
|
function BlogPostTranslationFields({ translation }) {
|
|
1076
1076
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1077
1077
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1078
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1079
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1080
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1081
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1082
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1078
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.title"), value: translation.title }),
|
|
1079
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.slug"), value: translation.slug }),
|
|
1080
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.summary"), value: translation.summary }),
|
|
1081
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.coverImageAlt"), value: translation.coverImageAlt }),
|
|
1082
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.body"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.BlockNoteEditorContainer, { id: translation.id, type: "blog-post", initialContent: translation.body }) })
|
|
1083
1083
|
] });
|
|
1084
1084
|
}
|
|
1085
1085
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostTranslationFields, "BlogPostTranslationFields");
|
|
@@ -1089,15 +1089,15 @@ function BlogPostComparison({ original, translation }) {
|
|
|
1089
1089
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1090
1090
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1091
1091
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1092
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1093
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1092
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.MicroLabel, { as: "h3", children: languageName(original.language) }),
|
|
1093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softGray", children: t("blog.translation.original") })
|
|
1094
1094
|
] }),
|
|
1095
1095
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation: original })
|
|
1096
1096
|
] }),
|
|
1097
1097
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1098
1098
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1099
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1100
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1099
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.MicroLabel, { as: "h3", children: languageName(translation.language) }),
|
|
1100
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") })
|
|
1101
1101
|
] }),
|
|
1102
1102
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation })
|
|
1103
1103
|
] })
|
|
@@ -1148,7 +1148,7 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1148
1148
|
return Object.keys(dirty).length > 0;
|
|
1149
1149
|
}, [dirtyFields, isBodyEmptyState]);
|
|
1150
1150
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1151
|
-
|
|
1151
|
+
_chunkWXTEAATGjs.EditorSheet,
|
|
1152
1152
|
{
|
|
1153
1153
|
form,
|
|
1154
1154
|
entityType: t("blog.entities.post"),
|
|
@@ -1174,16 +1174,16 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1174
1174
|
}))),
|
|
1175
1175
|
trigger,
|
|
1176
1176
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
1177
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1177
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
1178
1178
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1179
1179
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1180
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1181
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
1181
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormTextarea, { form, id: "summary", name: t("blog.fields.summary"), className: "min-h-24" })
|
|
1182
1182
|
] }),
|
|
1183
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1183
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") }) })
|
|
1184
1184
|
] }),
|
|
1185
1185
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1186
|
-
|
|
1186
|
+
_chunkWXTEAATGjs.FormBlockNote,
|
|
1187
1187
|
{
|
|
1188
1188
|
uploadKeyPrefix: _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX,
|
|
1189
1189
|
form,
|
|
@@ -1213,7 +1213,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1213
1213
|
const original = post.original;
|
|
1214
1214
|
const reload = _nullishCoalesce(onChanged, () => ( (async () => {
|
|
1215
1215
|
})));
|
|
1216
|
-
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1216
|
+
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: [
|
|
1217
1217
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {}),
|
|
1218
1218
|
t("blog.actions.edit")
|
|
1219
1219
|
] });
|
|
@@ -1225,7 +1225,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1225
1225
|
}[post.status];
|
|
1226
1226
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1227
1227
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1228
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1228
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softGray", children: t("blog.translation.original") }),
|
|
1229
1229
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostEditor, { post, trigger: editTrigger, onSuccess: reload })
|
|
1230
1230
|
] }),
|
|
1231
1231
|
post.coverImage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1240,10 +1240,10 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
),
|
|
1242
1242
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
1243
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1244
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1243
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.status"), value: statusLabel }),
|
|
1244
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.DetailField, { label: t("blog.fields.publishedAt"), value: formatDate(post.publishedAt) || "\u2014" }),
|
|
1245
1245
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1246
|
-
|
|
1246
|
+
_chunkWXTEAATGjs.DetailField,
|
|
1247
1247
|
{
|
|
1248
1248
|
label: t("blog.fields.categories"),
|
|
1249
1249
|
value: post.categories.map((category) => categoryName(category.id)).filter(Boolean).join(", ") || "\u2014"
|
|
@@ -1255,16 +1255,16 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
const isWorking = translation.aiStatus === "pending" || translation.aiStatus === "in_progress";
|
|
1257
1257
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1258
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1258
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Alert, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.AlertDescription, { className: "flex flex-col gap-y-2", children: [
|
|
1259
1259
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1260
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1260
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") }),
|
|
1261
1261
|
original && translation.translatedAt && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.translatedFrom", {
|
|
1262
1262
|
language: languageName(original.language),
|
|
1263
1263
|
date: formatDate(translation.translatedAt)
|
|
1264
1264
|
}) })
|
|
1265
1265
|
] }),
|
|
1266
1266
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.overwriteWarning") }),
|
|
1267
|
-
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1267
|
+
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setIsComparing((value) => !value), children: isComparing ? t("blog.actions.hideComparison") : t("blog.actions.compareWithOriginal") }) })
|
|
1268
1268
|
] }) }),
|
|
1269
1269
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1270
1270
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1292,7 +1292,7 @@ function BlogPostContainer({ postId }) {
|
|
|
1292
1292
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostContainer, "BlogPostContainer");
|
|
1293
1293
|
function BlogPostShell() {
|
|
1294
1294
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1295
|
-
const generateUrl =
|
|
1295
|
+
const generateUrl = _chunkWXTEAATGjs.usePageUrlGenerator.call(void 0, );
|
|
1296
1296
|
const languageName = useBlogLanguageName();
|
|
1297
1297
|
const { post, reload } = useBlogPost();
|
|
1298
1298
|
const translations = _react.useMemo.call(void 0, () => {
|
|
@@ -1322,7 +1322,7 @@ function BlogPostShell() {
|
|
|
1322
1322
|
return parts.join(" \xB7 ");
|
|
1323
1323
|
}, "tabLabel");
|
|
1324
1324
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1325
|
-
|
|
1325
|
+
_chunkWXTEAATGjs.SharedProvider,
|
|
1326
1326
|
{
|
|
1327
1327
|
value: {
|
|
1328
1328
|
breadcrumbs,
|
|
@@ -1330,14 +1330,14 @@ function BlogPostShell() {
|
|
|
1330
1330
|
type: t("blog.admin.title"),
|
|
1331
1331
|
element: title,
|
|
1332
1332
|
functions: [
|
|
1333
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1333
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Badge, { variant: BLOG_STATUS_BADGE[post.status], children: statusLabel }, "blogPostStatus"),
|
|
1334
1334
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostPublishButton, {}, "blogPostPublish"),
|
|
1335
1335
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostDeleter, {}, "blogPostDeleter")
|
|
1336
1336
|
]
|
|
1337
1337
|
}
|
|
1338
1338
|
},
|
|
1339
1339
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1340
|
-
|
|
1340
|
+
_chunkWXTEAATGjs.RoundPageContainer,
|
|
1341
1341
|
{
|
|
1342
1342
|
module: _chunkZ6T2575Ajs.Modules.BlogPost,
|
|
1343
1343
|
id: post.id,
|
|
@@ -1401,10 +1401,10 @@ function BlogCategoryChips(props) {
|
|
|
1401
1401
|
];
|
|
1402
1402
|
const inactiveVariant = variant === "chips" ? "outline" : "ghost";
|
|
1403
1403
|
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,
|
|
1404
|
-
|
|
1404
|
+
_chunkWXTEAATGjs.Badge,
|
|
1405
1405
|
{
|
|
1406
1406
|
variant: item.active ? "default" : inactiveVariant,
|
|
1407
|
-
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1407
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Link, { href: item.href, "aria-current": item.active ? "page" : void 0 }),
|
|
1408
1408
|
children: item.label
|
|
1409
1409
|
}
|
|
1410
1410
|
) }, item.key)) }) });
|
|
@@ -1419,7 +1419,7 @@ function BlogListHeader(props) {
|
|
|
1419
1419
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1420
1420
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: align === "center" ? "text-center" : void 0, children: [
|
|
1421
1421
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1422
|
-
|
|
1422
|
+
_chunkWXTEAATGjs.ContentTitle,
|
|
1423
1423
|
{
|
|
1424
1424
|
type: t("blog.public.eyebrow"),
|
|
1425
1425
|
element: t("blog.public.title"),
|
|
@@ -1440,11 +1440,11 @@ function BlogLoadMore(props) {
|
|
|
1440
1440
|
const { basePath, page, activeCategorySlug, query, className } = props;
|
|
1441
1441
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1442
1442
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk77JC2UCFjs.cn.call(void 0, "flex justify-center", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1443
|
-
|
|
1443
|
+
_chunkWXTEAATGjs.Link,
|
|
1444
1444
|
{
|
|
1445
1445
|
href: blogListHref(basePath, { category: activeCategorySlug, q: query, page: page + 1 }),
|
|
1446
1446
|
scroll: false,
|
|
1447
|
-
className:
|
|
1447
|
+
className: _chunkWXTEAATGjs.buttonVariants.call(void 0, { variant: "outline" }),
|
|
1448
1448
|
children: t("blog.public.loadMore")
|
|
1449
1449
|
}
|
|
1450
1450
|
) });
|
|
@@ -1502,8 +1502,8 @@ function BlogPostCard(props) {
|
|
|
1502
1502
|
const isProminent = variant === "hero" || variant === "large";
|
|
1503
1503
|
const eyebrow = _optionalChain([category, 'optionalAccess', _46 => _46.name]);
|
|
1504
1504
|
const text = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
1505
|
-
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1506
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1505
|
+
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.MicroLabel, { as: "span", children: eyebrow }) : null,
|
|
1506
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.SectionHeader, { level: headingLevel === "h3" ? 3 : 2, className: "mt-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.Link, { href: blogPostHref(basePath, post.slug), className: "after:absolute after:inset-0", children: post.title }) }),
|
|
1507
1507
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-2 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1508
1508
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: isProminent, className: "mt-3" })
|
|
1509
1509
|
] });
|
|
@@ -1569,10 +1569,10 @@ function BlogSearchBox(props) {
|
|
|
1569
1569
|
const q = value.trim();
|
|
1570
1570
|
router.push(blogListHref(basePath, { category: activeCategorySlug, q: q || void 0 }));
|
|
1571
1571
|
}, "onSubmit");
|
|
1572
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1573
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1572
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.InputGroup, { children: [
|
|
1573
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, {}) }),
|
|
1574
1574
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1575
|
-
|
|
1575
|
+
_chunkWXTEAATGjs.InputGroupInput,
|
|
1576
1576
|
{
|
|
1577
1577
|
type: "search",
|
|
1578
1578
|
name: "q",
|
|
@@ -1684,7 +1684,7 @@ function BlogListRail(props) {
|
|
|
1684
1684
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogListHeader, { showSubtitle: false }),
|
|
1685
1685
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogSearchBox, { basePath, query, activeCategorySlug }),
|
|
1686
1686
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
1687
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1687
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.MicroLabel, { as: "span", className: "block", children: t("blog.entities.categories") }),
|
|
1688
1688
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1689
1689
|
BlogCategoryChips,
|
|
1690
1690
|
{
|
|
@@ -1742,12 +1742,12 @@ function BlogPostView(props) {
|
|
|
1742
1742
|
const more = related.slice(0, 3);
|
|
1743
1743
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "px-4 pt-12 pb-20 md:pt-16", children: [
|
|
1744
1744
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mx-auto max-w-3xl", children: [
|
|
1745
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1745
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWXTEAATGjs.Link, { href: basePath, className: "inline-flex items-center gap-1.5", children: [
|
|
1746
1746
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowLeftIcon, { className: "size-4 rtl:rotate-180" }),
|
|
1747
1747
|
t("blog.public.back")
|
|
1748
1748
|
] }),
|
|
1749
1749
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: "mt-8", children: [
|
|
1750
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1750
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.ContentTitle, { type: _optionalChain([category, 'optionalAccess', _47 => _47.name]), element: post.title, headingLevel: 1, className: "mb-0" }),
|
|
1751
1751
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1752
1752
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: true, className: "mt-4" })
|
|
1753
1753
|
] }),
|
|
@@ -1761,10 +1761,10 @@ function BlogPostView(props) {
|
|
|
1761
1761
|
className: "mt-8 aspect-[16/9]"
|
|
1762
1762
|
}
|
|
1763
1763
|
) : null,
|
|
1764
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1764
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.BlockNoteEditorContainer, { id: post.id, type: "blog-post", initialContent: post.body }))) })
|
|
1765
1765
|
] }),
|
|
1766
1766
|
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: [
|
|
1767
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1767
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWXTEAATGjs.SectionHeader, { level: 2, children: t("blog.public.moreIn", { category: _nullishCoalesce(_optionalChain([category, 'optionalAccess', _48 => _48.name]), () => ( "")) }) }),
|
|
1768
1768
|
/* @__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,
|
|
1769
1769
|
BlogPostCard,
|
|
1770
1770
|
{
|