@carlonicora/nextjs-jsonapi 6.25.0 → 6.27.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-Z5LDF47Z.mjs → BlockNoteEditor-D2DXVXTJ.mjs} +4 -4
- package/dist/{BlockNoteEditor-TNX77GCD.js → BlockNoteEditor-NQB75M47.js} +18 -18
- package/dist/{BlockNoteEditor-TNX77GCD.js.map → BlockNoteEditor-NQB75M47.js.map} +1 -1
- package/dist/{BlockNoteViewer-TQ452ZYW.mjs → BlockNoteViewer-76CKL6W5.mjs} +2 -2
- package/dist/{BlockNoteViewer-6KQJODNF.js → BlockNoteViewer-B25WKYQP.js} +3 -3
- package/dist/{BlockNoteViewer-6KQJODNF.js.map → BlockNoteViewer-B25WKYQP.js.map} +1 -1
- package/dist/billing/index.js +465 -465
- package/dist/billing/index.mjs +3 -3
- package/dist/{chunk-CSBQAPHD.js → chunk-77JC2UCF.js} +1 -1
- package/dist/chunk-77JC2UCF.js.map +1 -0
- package/dist/{chunk-K7KLUYS7.mjs → chunk-7MGXQIEP.mjs} +2 -2
- package/dist/{chunk-OOM54Z5Z.js → chunk-F3EVYBMA.js} +4 -4
- package/dist/{chunk-OOM54Z5Z.js.map → chunk-F3EVYBMA.js.map} +1 -1
- package/dist/{chunk-HJT7TXGG.mjs → chunk-FJUKLVVX.mjs} +1 -1
- package/dist/chunk-FJUKLVVX.mjs.map +1 -0
- package/dist/{chunk-KVYYPKRO.mjs → chunk-HU3AGUFI.mjs} +29 -7
- package/dist/chunk-HU3AGUFI.mjs.map +1 -0
- package/dist/{chunk-JELEQV5T.mjs → chunk-M7YK5CCE.mjs} +2 -2
- package/dist/{chunk-JGL4P3DS.js → chunk-ONU4WCDG.js} +3 -3
- package/dist/{chunk-JGL4P3DS.js.map → chunk-ONU4WCDG.js.map} +1 -1
- package/dist/{chunk-M6SNTMK6.js → chunk-YGV27OAW.js} +747 -725
- package/dist/chunk-YGV27OAW.js.map +1 -0
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/components/containers/RoundPageContainer.d.ts.map +1 -1
- package/dist/components/containers/detailsFitsByDefault.d.ts +19 -0
- package/dist/components/containers/detailsFitsByDefault.d.ts.map +1 -0
- package/dist/components/index.js +4 -4
- package/dist/components/index.mjs +3 -3
- package/dist/contexts/index.js +4 -4
- package/dist/contexts/index.mjs +3 -3
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/email-automations/index.js +105 -105
- package/dist/email-automations/index.mjs +3 -3
- package/dist/features/analytics/index.js +114 -114
- package/dist/features/analytics/index.mjs +3 -3
- package/dist/features/analytics/server.js +4 -4
- package/dist/features/analytics/server.mjs +2 -2
- package/dist/features/blog/index.js +129 -129
- package/dist/features/blog/index.mjs +3 -3
- package/dist/features/blog/server.js +7 -7
- package/dist/features/blog/server.mjs +1 -1
- package/dist/features/help/index.js +37 -37
- package/dist/features/help/index.mjs +3 -3
- package/dist/features/tokenusage/index.js +114 -114
- package/dist/features/tokenusage/index.mjs +3 -3
- package/dist/index.js +3 -3
- package/dist/index.mjs +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/utils/toast.d.ts +2 -0
- package/dist/utils/toast.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +23 -2
- package/src/components/containers/__tests__/detailsFitsByDefault.spec.ts +25 -0
- package/src/components/containers/detailsFitsByDefault.ts +30 -0
- package/src/utils/__tests__/toast.spec.ts +39 -0
- package/src/utils/toast.ts +2 -0
- package/dist/chunk-CSBQAPHD.js.map +0 -1
- package/dist/chunk-HJT7TXGG.mjs.map +0 -1
- package/dist/chunk-KVYYPKRO.mjs.map +0 -1
- package/dist/chunk-M6SNTMK6.js.map +0 -1
- /package/dist/{BlockNoteEditor-Z5LDF47Z.mjs.map → BlockNoteEditor-D2DXVXTJ.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-TQ452ZYW.mjs.map → BlockNoteViewer-76CKL6W5.mjs.map} +0 -0
- /package/dist/{chunk-K7KLUYS7.mjs.map → chunk-7MGXQIEP.mjs.map} +0 -0
- /package/dist/{chunk-JELEQV5T.mjs.map → chunk-M7YK5CCE.mjs.map} +0 -0
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkYGV27OAWjs = require('../../chunk-YGV27OAW.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunkSYMI4IDWjs = require('../../chunk-SYMI4IDW.js');
|
|
44
44
|
require('../../chunk-3EPNHTMH.js');
|
|
45
|
-
require('../../chunk-
|
|
45
|
+
require('../../chunk-ONU4WCDG.js');
|
|
46
46
|
require('../../chunk-G4JR3SFV.js');
|
|
47
47
|
|
|
48
48
|
|
|
@@ -64,7 +64,7 @@ require('../../chunk-G4JR3SFV.js');
|
|
|
64
64
|
|
|
65
65
|
|
|
66
66
|
|
|
67
|
-
var
|
|
67
|
+
var _chunk77JC2UCFjs = require('../../chunk-77JC2UCF.js');
|
|
68
68
|
require('../../chunk-HROKKUBQ.js');
|
|
69
69
|
require('../../chunk-DGN3PR2F.js');
|
|
70
70
|
|
|
@@ -119,7 +119,7 @@ var dropzone = {
|
|
|
119
119
|
};
|
|
120
120
|
async function uploadBlogImage(params) {
|
|
121
121
|
if (!params.selection || !params.key) return;
|
|
122
|
-
await
|
|
122
|
+
await _chunk77JC2UCFjs.S3Service.upload({
|
|
123
123
|
key: params.key,
|
|
124
124
|
contentType: params.selection.contentType,
|
|
125
125
|
file: params.selection.file,
|
|
@@ -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, _chunkYGV27OAWjs.FormFieldWrapper, { form, name: id, label, children: (field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
153
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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,
|
|
@@ -171,7 +171,7 @@ function BlogCoverImageField({
|
|
|
171
171
|
width: 320,
|
|
172
172
|
height: 180,
|
|
173
173
|
className: "h-auto max-h-48 w-auto max-w-full rounded-md object-cover",
|
|
174
|
-
unoptimized:
|
|
174
|
+
unoptimized: _chunk77JC2UCFjs.isRemoteImageSrc.call(void 0, previewUrl ? void 0 : currentUrl)
|
|
175
175
|
}
|
|
176
176
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
177
177
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
|
|
@@ -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, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.Badge, { variant: "softRed", children: t("blog.translation.failed") }),
|
|
246
|
+
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.EditorSheet,
|
|
308
308
|
{
|
|
309
309
|
form,
|
|
310
310
|
entityType: t("blog.entities.category"),
|
|
@@ -317,7 +317,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
317
317
|
if (values.image && image) await uploadBlogImage({ key: values.image, selection: image });
|
|
318
318
|
const imageKey = values.image && image ? values.image : void 0;
|
|
319
319
|
if (!category) {
|
|
320
|
-
return
|
|
320
|
+
return _chunk77JC2UCFjs.BlogCategoryService.create({
|
|
321
321
|
id: values.id,
|
|
322
322
|
originalLanguage: values.originalLanguage,
|
|
323
323
|
name: values.name,
|
|
@@ -331,7 +331,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
331
331
|
{ id: defaults.id, name: defaults.name, slug: defaults.slug, description: defaults.description }
|
|
332
332
|
);
|
|
333
333
|
if (originalChanged) {
|
|
334
|
-
await
|
|
334
|
+
await _chunk77JC2UCFjs.BlogCategoryService.update({
|
|
335
335
|
id: values.id,
|
|
336
336
|
originalLanguage: _optionalChain([category, 'optionalAccess', _16 => _16.originalLanguage]),
|
|
337
337
|
name: values.name,
|
|
@@ -343,7 +343,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
343
343
|
for (const translation of values.translations) {
|
|
344
344
|
const before = defaults.translations.find((candidate) => candidate.id === translation.id);
|
|
345
345
|
if (sameTranslation(translation, before)) continue;
|
|
346
|
-
await
|
|
346
|
+
await _chunk77JC2UCFjs.BlogCategoryTranslationService.update({
|
|
347
347
|
id: translation.id,
|
|
348
348
|
name: translation.name,
|
|
349
349
|
slug: translation.slug || void 0,
|
|
@@ -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
|
+
_chunkYGV27OAWjs.FormSelect,
|
|
365
365
|
{
|
|
366
366
|
form,
|
|
367
367
|
id: "originalLanguage",
|
|
@@ -370,16 +370,16 @@ 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, _chunkYGV27OAWjs.FormInput, { form, id: "name", name: t("blog.fields.name"), isRequired: true }),
|
|
374
|
+
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
375
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.FormTextarea, { form, id: "description", name: t("blog.fields.description") }),
|
|
376
376
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
377
377
|
BlogCoverImageField,
|
|
378
378
|
{
|
|
379
379
|
form,
|
|
380
380
|
id: "image",
|
|
381
381
|
label: t("blog.fields.image"),
|
|
382
|
-
keyPrefix:
|
|
382
|
+
keyPrefix: _chunk77JC2UCFjs.BLOG_CATEGORY_UPLOAD_PREFIX,
|
|
383
383
|
entityId: form.getValues("id"),
|
|
384
384
|
currentUrl: _optionalChain([category, 'optionalAccess', _17 => _17.image]),
|
|
385
385
|
selection: image,
|
|
@@ -387,29 +387,29 @@ 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, _chunkYGV27OAWjs.SectionHeader, { className: "mt-2", children: t("blog.fields.languages") }),
|
|
391
|
+
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYGV27OAWjs.Collapsible, { className: "rounded-md border", children: [
|
|
392
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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
|
{
|
|
403
403
|
aiStatus: translation.aiStatus,
|
|
404
404
|
onRetranslate: async () => {
|
|
405
|
-
await
|
|
405
|
+
await _chunk77JC2UCFjs.BlogCategoryTranslationService.retranslate({ id: translation.id });
|
|
406
406
|
await _optionalChain([onSuccess, 'optionalCall', _18 => _18()]);
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
),
|
|
410
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
410
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.FormInput, { form, id: `translations.${index}.name`, name: t("blog.fields.name"), isRequired: true }),
|
|
411
411
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
412
|
-
|
|
412
|
+
_chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.FormTextarea,
|
|
422
422
|
{
|
|
423
423
|
form,
|
|
424
424
|
id: `translations.${index}.description`,
|
|
@@ -491,14 +491,14 @@ 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
|
+
_chunkYGV27OAWjs.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 =
|
|
501
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) =>
|
|
500
|
+
const data = _chunkYGV27OAWjs.useDataListRetriever.call(void 0, {
|
|
501
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.BlogCategoryService.findMany(params), "retriever"),
|
|
502
502
|
retrieverParams: {},
|
|
503
503
|
module: _chunkZ6T2575Ajs.Modules.BlogCategory
|
|
504
504
|
});
|
|
@@ -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, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.EmptyState, { icon: _lucidereact.TagIcon, title: t("blog.admin.emptyCategories") })
|
|
525
525
|
}
|
|
526
526
|
);
|
|
527
527
|
}
|
|
@@ -537,7 +537,7 @@ function BlogLayoutSetting() {
|
|
|
537
537
|
const [saving, setSaving] = _react.useState.call(void 0, false);
|
|
538
538
|
_react.useEffect.call(void 0, () => {
|
|
539
539
|
let active = true;
|
|
540
|
-
|
|
540
|
+
_chunk77JC2UCFjs.BlogSettingsService.get().then((settings) => {
|
|
541
541
|
if (active) setLayout(_nullishCoalesce(_optionalChain([settings, 'optionalAccess', _23 => _23.listLayout]), () => ( "featured")));
|
|
542
542
|
}).catch(() => {
|
|
543
543
|
if (active) setLayout("featured");
|
|
@@ -556,19 +556,19 @@ function BlogLayoutSetting() {
|
|
|
556
556
|
setLayout(next);
|
|
557
557
|
setSaving(true);
|
|
558
558
|
try {
|
|
559
|
-
await
|
|
560
|
-
|
|
559
|
+
await _chunk77JC2UCFjs.BlogSettingsService.save({ id: _chunk77JC2UCFjs.BLOG_SETTINGS_ID, listLayout: next });
|
|
560
|
+
_chunk77JC2UCFjs.showToast.call(void 0, t("blog.layout.saved"));
|
|
561
561
|
} catch (error) {
|
|
562
562
|
setLayout(previous);
|
|
563
|
-
|
|
563
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.SectionHeader, { children: t("blog.layout.title") }),
|
|
570
570
|
layout && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
571
|
-
|
|
571
|
+
_chunkYGV27OAWjs.RadioGroup,
|
|
572
572
|
{
|
|
573
573
|
value: layout,
|
|
574
574
|
onValueChange: (value) => {
|
|
@@ -577,13 +577,13 @@ function BlogLayoutSetting() {
|
|
|
577
577
|
},
|
|
578
578
|
disabled: saving,
|
|
579
579
|
className: "grid grid-cols-1 gap-3 md:grid-cols-3",
|
|
580
|
-
children:
|
|
580
|
+
children: _chunk77JC2UCFjs.BLOG_LIST_LAYOUTS.map((option) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
581
581
|
"label",
|
|
582
582
|
{
|
|
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, _chunkYGV27OAWjs.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 })
|
|
@@ -612,7 +612,7 @@ function useBlogCategoryNames() {
|
|
|
612
612
|
const [names, setNames] = _react.useState.call(void 0, {});
|
|
613
613
|
_react.useEffect.call(void 0, () => {
|
|
614
614
|
let cancelled = false;
|
|
615
|
-
|
|
615
|
+
_chunk77JC2UCFjs.BlogCategoryService.findMany({ fetchAll: true }).then((categories) => {
|
|
616
616
|
if (cancelled) return;
|
|
617
617
|
setNames(Object.fromEntries(categories.map((category) => [category.id, blogCategoryAdminName(category)])));
|
|
618
618
|
}).catch(() => {
|
|
@@ -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 = _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.EditorSheet,
|
|
787
787
|
{
|
|
788
788
|
form,
|
|
789
789
|
entityType: t("blog.entities.post"),
|
|
@@ -807,13 +807,13 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
807
807
|
categoryIds: values.categories.map((category) => category.id)
|
|
808
808
|
};
|
|
809
809
|
if (post) {
|
|
810
|
-
return
|
|
810
|
+
return _chunk77JC2UCFjs.BlogPostService.update({
|
|
811
811
|
...payload,
|
|
812
812
|
originalLanguage: post.originalLanguage,
|
|
813
813
|
slug: values.slug || void 0
|
|
814
814
|
});
|
|
815
815
|
}
|
|
816
|
-
return
|
|
816
|
+
return _chunk77JC2UCFjs.BlogPostService.create({ ...payload, originalLanguage: values.originalLanguage });
|
|
817
817
|
},
|
|
818
818
|
onReset: () => {
|
|
819
819
|
setCover(null);
|
|
@@ -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
|
+
_chunkYGV27OAWjs.FormSelect,
|
|
829
829
|
{
|
|
830
830
|
form,
|
|
831
831
|
id: "originalLanguage",
|
|
@@ -834,24 +834,24 @@ 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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
841
841
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
842
|
-
|
|
842
|
+
_chunkYGV27OAWjs.EntityMultiSelector,
|
|
843
843
|
{
|
|
844
844
|
id: "categories",
|
|
845
845
|
form,
|
|
846
846
|
label: t("blog.fields.categories"),
|
|
847
|
-
retriever: (params) =>
|
|
847
|
+
retriever: (params) => _chunk77JC2UCFjs.BlogCategoryService.findMany(params),
|
|
848
848
|
module: _chunkZ6T2575Ajs.Modules.BlogCategory,
|
|
849
849
|
getLabel: blogCategoryAdminName,
|
|
850
850
|
getFormValueLabel: (value) => value.name || categoryName(value.id)
|
|
851
851
|
}
|
|
852
852
|
),
|
|
853
853
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
854
|
-
|
|
854
|
+
_chunkYGV27OAWjs.FormTextarea,
|
|
855
855
|
{
|
|
856
856
|
form,
|
|
857
857
|
id: "summary",
|
|
@@ -868,7 +868,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
868
868
|
form,
|
|
869
869
|
id: "coverImage",
|
|
870
870
|
label: t("blog.fields.coverImage"),
|
|
871
|
-
keyPrefix:
|
|
871
|
+
keyPrefix: _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX,
|
|
872
872
|
entityId: form.getValues("id"),
|
|
873
873
|
currentUrl: _optionalChain([post, 'optionalAccess', _40 => _40.coverImage]),
|
|
874
874
|
alt: _optionalChain([original, 'optionalAccess', _41 => _41.coverImageAlt]),
|
|
@@ -876,13 +876,13 @@ 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, _chunkYGV27OAWjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") })
|
|
880
880
|
] })
|
|
881
881
|
] }),
|
|
882
882
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
883
|
-
|
|
883
|
+
_chunkYGV27OAWjs.FormBlockNote,
|
|
884
884
|
{
|
|
885
|
-
uploadKeyPrefix:
|
|
885
|
+
uploadKeyPrefix: _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX,
|
|
886
886
|
form,
|
|
887
887
|
id: "body",
|
|
888
888
|
name: t("blog.fields.body"),
|
|
@@ -903,8 +903,8 @@ _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 =
|
|
907
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) =>
|
|
906
|
+
const data = _chunkYGV27OAWjs.useDataListRetriever.call(void 0, {
|
|
907
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.BlogPostService.findMany(params), "retriever"),
|
|
908
908
|
retrieverParams: {},
|
|
909
909
|
module: _chunkZ6T2575Ajs.Modules.BlogPost
|
|
910
910
|
});
|
|
@@ -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, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.SharedProvider, { value: { breadcrumbs, title: { type: t("blog.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
947
|
+
_chunkYGV27OAWjs.RoundPageContainer,
|
|
948
948
|
{
|
|
949
949
|
module: _chunkZ6T2575Ajs.Modules.BlogPost,
|
|
950
950
|
tabs: [
|
|
@@ -969,7 +969,7 @@ var BlogPostContext = _react.createContext.call(void 0, void 0);
|
|
|
969
969
|
var BlogPostProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ postId, children }) => {
|
|
970
970
|
const [post, setPost] = _react.useState.call(void 0, void 0);
|
|
971
971
|
const reload = _react.useCallback.call(void 0, async () => {
|
|
972
|
-
const loaded = await
|
|
972
|
+
const loaded = await _chunk77JC2UCFjs.BlogPostService.findOne({ id: postId });
|
|
973
973
|
setPost(loaded);
|
|
974
974
|
}, [postId]);
|
|
975
975
|
_react.useEffect.call(void 0, () => {
|
|
@@ -1005,18 +1005,18 @@ 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 = _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.CommonDeleter,
|
|
1014
1014
|
{
|
|
1015
1015
|
title: t("common.delete.title", { type }),
|
|
1016
1016
|
subtitle: t("common.delete.subtitle", { type }),
|
|
1017
1017
|
description: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t("common.delete.description", { type }) }),
|
|
1018
1018
|
showLabel: true,
|
|
1019
|
-
deleteFunction: () =>
|
|
1019
|
+
deleteFunction: () => _chunk77JC2UCFjs.BlogPostService.delete({ id: post.id }),
|
|
1020
1020
|
redirectTo: generateUrl({ page: _chunkZ6T2575Ajs.Modules.BlogPost })
|
|
1021
1021
|
}
|
|
1022
1022
|
);
|
|
@@ -1037,17 +1037,17 @@ function BlogPostPublishButton() {
|
|
|
1037
1037
|
const toggle = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
1038
1038
|
setSaving(true);
|
|
1039
1039
|
try {
|
|
1040
|
-
if (isPublished) await
|
|
1041
|
-
else await
|
|
1040
|
+
if (isPublished) await _chunk77JC2UCFjs.BlogPostService.unpublish({ id: post.id });
|
|
1041
|
+
else await _chunk77JC2UCFjs.BlogPostService.publish({ id: post.id });
|
|
1042
1042
|
await reload();
|
|
1043
1043
|
} catch (error) {
|
|
1044
|
-
|
|
1044
|
+
_chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.title"), value: translation.title }),
|
|
1079
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.slug"), value: translation.slug }),
|
|
1080
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.summary"), value: translation.summary }),
|
|
1081
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.coverImageAlt"), value: translation.coverImageAlt }),
|
|
1082
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.body"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.MicroLabel, { as: "h3", children: languageName(original.language) }),
|
|
1093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.MicroLabel, { as: "h3", children: languageName(translation.language) }),
|
|
1100
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.EditorSheet,
|
|
1152
1152
|
{
|
|
1153
1153
|
form,
|
|
1154
1154
|
entityType: t("blog.entities.post"),
|
|
@@ -1158,7 +1158,7 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1158
1158
|
module: _chunkZ6T2575Ajs.Modules.BlogPostTranslation,
|
|
1159
1159
|
size: "lg",
|
|
1160
1160
|
isFormDirty,
|
|
1161
|
-
onSubmit: async (values) =>
|
|
1161
|
+
onSubmit: async (values) => _chunk77JC2UCFjs.BlogPostTranslationService.update({
|
|
1162
1162
|
id: values.id,
|
|
1163
1163
|
title: values.title,
|
|
1164
1164
|
slug: values.slug || void 0,
|
|
@@ -1174,18 +1174,18 @@ 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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
1181
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") }) })
|
|
1184
1184
|
] }),
|
|
1185
1185
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1186
|
-
|
|
1186
|
+
_chunkYGV27OAWjs.FormBlockNote,
|
|
1187
1187
|
{
|
|
1188
|
-
uploadKeyPrefix:
|
|
1188
|
+
uploadKeyPrefix: _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX,
|
|
1189
1189
|
form,
|
|
1190
1190
|
id: "body",
|
|
1191
1191
|
name: t("blog.fields.body"),
|
|
@@ -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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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,
|
|
@@ -1236,14 +1236,14 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1236
1236
|
width: 640,
|
|
1237
1237
|
height: 360,
|
|
1238
1238
|
className: "h-auto max-h-72 w-auto rounded-lg object-cover",
|
|
1239
|
-
unoptimized:
|
|
1239
|
+
unoptimized: _chunk77JC2UCFjs.isRemoteImageSrc.call(void 0, post.coverImage)
|
|
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, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.status"), value: statusLabel }),
|
|
1244
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.DetailField, { label: t("blog.fields.publishedAt"), value: formatDate(post.publishedAt) || "\u2014" }),
|
|
1245
1245
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1246
|
-
|
|
1246
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.Alert, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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,
|
|
@@ -1272,7 +1272,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1272
1272
|
{
|
|
1273
1273
|
aiStatus: translation.aiStatus,
|
|
1274
1274
|
onRetranslate: async () => {
|
|
1275
|
-
await
|
|
1275
|
+
await _chunk77JC2UCFjs.BlogPostTranslationService.retranslate({ id: translation.id });
|
|
1276
1276
|
await reload();
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
@@ -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 = _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.Link, { href: item.href, "aria-current": item.active ? "page" : void 0 }),
|
|
1408
1408
|
children: item.label
|
|
1409
1409
|
}
|
|
1410
1410
|
) }, item.key)) }) });
|
|
@@ -1419,12 +1419,12 @@ 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
|
+
_chunkYGV27OAWjs.ContentTitle,
|
|
1423
1423
|
{
|
|
1424
1424
|
type: t("blog.public.eyebrow"),
|
|
1425
1425
|
element: t("blog.public.title"),
|
|
1426
1426
|
headingLevel: 1,
|
|
1427
|
-
className:
|
|
1427
|
+
className: _chunk77JC2UCFjs.cn.call(void 0, "mb-0", align === "center" && "[&_div]:justify-center")
|
|
1428
1428
|
}
|
|
1429
1429
|
),
|
|
1430
1430
|
showSubtitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: t("blog.public.subtitle") }) : null
|
|
@@ -1433,18 +1433,18 @@ function BlogListHeader(props) {
|
|
|
1433
1433
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogListHeader, "BlogListHeader");
|
|
1434
1434
|
function BlogListEmpty(props) {
|
|
1435
1435
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1436
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className:
|
|
1436
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunk77JC2UCFjs.cn.call(void 0, "text-muted-foreground py-12 text-center text-sm", props.className), children: props.query ? t("blog.public.noResults") : t("blog.public.empty") });
|
|
1437
1437
|
}
|
|
1438
1438
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogListEmpty, "BlogListEmpty");
|
|
1439
1439
|
function BlogLoadMore(props) {
|
|
1440
1440
|
const { basePath, page, activeCategorySlug, query, className } = props;
|
|
1441
1441
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1442
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1443
|
-
|
|
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
|
+
_chunkYGV27OAWjs.Link,
|
|
1444
1444
|
{
|
|
1445
1445
|
href: blogListHref(basePath, { category: activeCategorySlug, q: query, page: page + 1 }),
|
|
1446
1446
|
scroll: false,
|
|
1447
|
-
className:
|
|
1447
|
+
className: _chunkYGV27OAWjs.buttonVariants.call(void 0, { variant: "outline" }),
|
|
1448
1448
|
children: t("blog.public.loadMore")
|
|
1449
1449
|
}
|
|
1450
1450
|
) });
|
|
@@ -1471,7 +1471,7 @@ function BlogPostMeta(props) {
|
|
|
1471
1471
|
parts.push(t("blog.public.updated", { date: dates.format(post.updatedAt, "dateMedium") }));
|
|
1472
1472
|
}
|
|
1473
1473
|
parts.push(t("blog.public.readingTime", { minutes: post.readingMinutes }));
|
|
1474
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className:
|
|
1474
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunk77JC2UCFjs.cn.call(void 0, "text-muted-foreground text-xs", className), children: parts.map((part, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1475
1475
|
index > 0 ? " \xB7 " : null,
|
|
1476
1476
|
part
|
|
1477
1477
|
] }, index)) });
|
|
@@ -1482,7 +1482,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostMeta, "BlogPostMeta");
|
|
|
1482
1482
|
|
|
1483
1483
|
function BlogPostCover(props) {
|
|
1484
1484
|
const { src, alt, sizes, priority, className } = props;
|
|
1485
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1485
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunk77JC2UCFjs.cn.call(void 0, "border-border bg-primary/10 relative overflow-hidden rounded-lg border", className), children: src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1486
1486
|
_image2.default,
|
|
1487
1487
|
{
|
|
1488
1488
|
src,
|
|
@@ -1491,7 +1491,7 @@ function BlogPostCover(props) {
|
|
|
1491
1491
|
sizes,
|
|
1492
1492
|
priority,
|
|
1493
1493
|
className: "object-cover",
|
|
1494
|
-
unoptimized:
|
|
1494
|
+
unoptimized: _chunk77JC2UCFjs.isRemoteImageSrc.call(void 0, src)
|
|
1495
1495
|
}
|
|
1496
1496
|
) : null });
|
|
1497
1497
|
}
|
|
@@ -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, _chunkYGV27OAWjs.MicroLabel, { as: "span", children: eyebrow }) : null,
|
|
1506
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.SectionHeader, { level: headingLevel === "h3" ? 3 : 2, className: "mt-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.InputGroup, { children: [
|
|
1573
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYGV27OAWjs.InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, {}) }),
|
|
1574
1574
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1575
|
-
|
|
1575
|
+
_chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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, _chunkYGV27OAWjs.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
|
{
|
|
@@ -1817,5 +1817,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostView, "BlogPostView");
|
|
|
1817
1817
|
|
|
1818
1818
|
|
|
1819
1819
|
|
|
1820
|
-
exports.BLOG_ACTION =
|
|
1820
|
+
exports.BLOG_ACTION = _chunk77JC2UCFjs.BLOG_ACTION; exports.BLOG_CATEGORY_UPLOAD_PREFIX = _chunk77JC2UCFjs.BLOG_CATEGORY_UPLOAD_PREFIX; exports.BLOG_LIST_LAYOUTS = _chunk77JC2UCFjs.BLOG_LIST_LAYOUTS; exports.BLOG_MODULE_ID = _chunk77JC2UCFjs.BLOG_MODULE_ID; exports.BLOG_POST_STATUSES = _chunk77JC2UCFjs.BLOG_POST_STATUSES; exports.BLOG_POST_UPLOAD_PREFIX = _chunk77JC2UCFjs.BLOG_POST_UPLOAD_PREFIX; exports.BLOG_PUBLIC_PREFIX = _chunk77JC2UCFjs.BLOG_PUBLIC_PREFIX; exports.BLOG_SETTINGS_ID = _chunk77JC2UCFjs.BLOG_SETTINGS_ID; exports.BLOG_STATUS_BADGE = BLOG_STATUS_BADGE; exports.BLOG_TRANSLATION_SOURCES = _chunk77JC2UCFjs.BLOG_TRANSLATION_SOURCES; exports.BLOG_UPLOAD_ROOT = _chunk77JC2UCFjs.BLOG_UPLOAD_ROOT; exports.BlogAdminContainer = BlogAdminContainer; exports.BlogCategoriesList = BlogCategoriesList; exports.BlogCategoryEditor = BlogCategoryEditor; exports.BlogCoverImageField = BlogCoverImageField; exports.BlogLayoutSetting = BlogLayoutSetting; exports.BlogList = BlogList; exports.BlogPostComparison = BlogPostComparison; exports.BlogPostContainer = BlogPostContainer; exports.BlogPostDeleter = BlogPostDeleter; exports.BlogPostEditor = BlogPostEditor; exports.BlogPostProvider = BlogPostProvider; exports.BlogPostPublishButton = BlogPostPublishButton; exports.BlogPostTranslationEditor = BlogPostTranslationEditor; exports.BlogPostTranslationFields = BlogPostTranslationFields; exports.BlogPostTranslationPanel = BlogPostTranslationPanel; exports.BlogPostView = BlogPostView; exports.BlogPostsList = BlogPostsList; exports.BlogTranslationStatus = BlogTranslationStatus; exports.blogCategoryAdminName = blogCategoryAdminName; exports.uploadBlogImage = uploadBlogImage; exports.useBlogCategoryNames = useBlogCategoryNames; exports.useBlogCategoryTableStructure = useBlogCategoryTableStructure; exports.useBlogDateFormatter = useBlogDateFormatter; exports.useBlogLanguageName = useBlogLanguageName; exports.useBlogPost = useBlogPost; exports.useBlogPostTableStructure = useBlogPostTableStructure;
|
|
1821
1821
|
//# sourceMappingURL=index.js.map
|