@carlonicora/nextjs-jsonapi 6.21.0 → 6.23.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-NXCRWS2O.js → BlockNoteEditor-PPRML5CO.js} +23 -23
- package/dist/{BlockNoteEditor-NXCRWS2O.js.map → BlockNoteEditor-PPRML5CO.js.map} +1 -1
- package/dist/{BlockNoteEditor-66ZACETR.mjs → BlockNoteEditor-UO4ZRCUM.mjs} +8 -8
- package/dist/{BlockNoteViewer-2UDFTXRS.mjs → BlockNoteViewer-2TJZ6JET.mjs} +6 -6
- package/dist/{BlockNoteViewer-4OHBRE4Q.js → BlockNoteViewer-K2HBF3IP.js} +7 -7
- package/dist/{BlockNoteViewer-4OHBRE4Q.js.map → BlockNoteViewer-K2HBF3IP.js.map} +1 -1
- package/dist/{JsonApiRequest-IKKHWCPB.mjs → JsonApiRequest-ADLBJ5RX.mjs} +2 -2
- package/dist/JsonApiRequest-KC6DOHKT.js +26 -0
- package/dist/{JsonApiRequest-G4J2WTSU.js.map → JsonApiRequest-KC6DOHKT.js.map} +1 -1
- package/dist/billing/index.js +495 -495
- package/dist/billing/index.mjs +7 -7
- package/dist/{chunk-N5ZE2Z6I.js → chunk-53SD4YRF.js} +5 -5
- package/dist/{chunk-N5ZE2Z6I.js.map → chunk-53SD4YRF.js.map} +1 -1
- package/dist/{chunk-4RA5PRXX.mjs → chunk-7OIWOPM5.mjs} +2 -2
- package/dist/{chunk-WCEYT3GG.js → chunk-A5M3MORY.js} +6 -3
- package/dist/chunk-A5M3MORY.js.map +1 -0
- package/dist/{chunk-AUD6ZLBB.mjs → chunk-BE6UMM5X.mjs} +13 -8
- package/dist/chunk-BE6UMM5X.mjs.map +1 -0
- package/dist/{chunk-KV4N7DEG.js → chunk-BQ2WAG4K.js} +29 -24
- package/dist/chunk-BQ2WAG4K.js.map +1 -0
- package/dist/{chunk-OQQ7CZWT.js → chunk-GMMDXINC.js} +12 -12
- package/dist/{chunk-OQQ7CZWT.js.map → chunk-GMMDXINC.js.map} +1 -1
- package/dist/{chunk-ZB6OYIMB.js → chunk-HN7L6RRW.js} +1296 -1093
- package/dist/{chunk-DPXOPLQP.mjs.map → chunk-HN7L6RRW.js.map} +1 -1
- package/dist/{chunk-OHHA5BBX.mjs → chunk-HP6DT6K3.mjs} +17 -15
- package/dist/chunk-HP6DT6K3.mjs.map +1 -0
- package/dist/{chunk-JSHLBRFV.mjs → chunk-N2BFT7KI.mjs} +2 -2
- package/dist/chunk-N2BFT7KI.mjs.map +1 -0
- package/dist/{chunk-YWLSIIE6.js → chunk-P7L6OFX5.js} +11 -11
- package/dist/{chunk-YWLSIIE6.js.map → chunk-P7L6OFX5.js.map} +1 -1
- package/dist/{chunk-3CGU6WXY.js → chunk-R5722NLL.js} +926 -924
- package/dist/chunk-R5722NLL.js.map +1 -0
- package/dist/{chunk-GM4VZTWL.js → chunk-RCOKQ3R4.js} +14 -8
- package/dist/chunk-RCOKQ3R4.js.map +1 -0
- package/dist/{chunk-M3N7LPHX.mjs → chunk-S7SPAC6X.mjs} +6 -3
- package/dist/chunk-S7SPAC6X.mjs.map +1 -0
- package/dist/{chunk-54K2CZ2F.js → chunk-SO3YUCL6.js} +4 -4
- package/dist/{chunk-54K2CZ2F.js.map → chunk-SO3YUCL6.js.map} +1 -1
- package/dist/{chunk-DPXOPLQP.mjs → chunk-T6G2F2BK.mjs} +220 -17
- package/dist/chunk-T6G2F2BK.mjs.map +1 -0
- package/dist/{chunk-G2UIQSNJ.mjs → chunk-TMV7TL7O.mjs} +4 -4
- package/dist/{chunk-BD6ARGGI.js → chunk-TNTCLVUR.js} +15 -15
- package/dist/{chunk-BD6ARGGI.js.map → chunk-TNTCLVUR.js.map} +1 -1
- package/dist/{chunk-QIEF7HIL.mjs → chunk-VNUT2D27.mjs} +2 -2
- package/dist/{chunk-KTGKW72G.mjs → chunk-W4ML6D2X.mjs} +2 -2
- package/dist/{chunk-MQ7TXALH.mjs → chunk-YMCL3JXZ.mjs} +14 -8
- package/dist/chunk-YMCL3JXZ.mjs.map +1 -0
- package/dist/{chunk-QGVVF77L.js → chunk-YSE2Z4RB.js} +11 -11
- package/dist/{chunk-QGVVF77L.js.map → chunk-YSE2Z4RB.js.map} +1 -1
- package/dist/{chunk-A3RB47X4.mjs → chunk-YTDGYI62.mjs} +3 -3
- package/dist/client/JsonApiClient.d.ts +5 -0
- package/dist/client/JsonApiClient.d.ts.map +1 -1
- package/dist/client/index.js +8 -8
- package/dist/client/index.mjs +7 -7
- package/dist/client/request.d.ts +5 -0
- package/dist/client/request.d.ts.map +1 -1
- package/dist/components/index.js +8 -8
- package/dist/components/index.mjs +7 -7
- package/dist/contexts/index.js +8 -8
- package/dist/contexts/index.mjs +7 -7
- package/dist/core/abstracts/AbstractService.d.ts +5 -0
- package/dist/core/abstracts/AbstractService.d.ts.map +1 -1
- package/dist/core/abstracts/ClientAbstractService.d.ts +5 -0
- package/dist/core/abstracts/ClientAbstractService.d.ts.map +1 -1
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +24 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +23 -5
- package/dist/core/registry/ModuleRegistry.d.ts +3 -0
- package/dist/core/registry/ModuleRegistry.d.ts.map +1 -1
- package/dist/email-automations/index.js +121 -121
- package/dist/email-automations/index.mjs +7 -7
- package/dist/features/analytics/index.js +139 -139
- package/dist/features/analytics/index.mjs +7 -7
- package/dist/features/analytics/server.js +9 -9
- package/dist/features/analytics/server.mjs +7 -7
- package/dist/features/blog/index.js +154 -154
- package/dist/features/blog/index.mjs +7 -7
- package/dist/features/blog/server.js +27 -27
- package/dist/features/blog/server.mjs +6 -6
- package/dist/features/discord-connection/data/discord-connect-confirmation.d.ts +11 -0
- package/dist/features/discord-connection/data/discord-connect-confirmation.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connect-confirmation.interface.d.ts +14 -0
- package/dist/features/discord-connection/data/discord-connect-confirmation.interface.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connect-confirmation.service.d.ts +10 -0
- package/dist/features/discord-connection/data/discord-connect-confirmation.service.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connect-intent.d.ts +11 -0
- package/dist/features/discord-connection/data/discord-connect-intent.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connect-intent.interface.d.ts +15 -0
- package/dist/features/discord-connection/data/discord-connect-intent.interface.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connect-intent.service.d.ts +11 -0
- package/dist/features/discord-connection/data/discord-connect-intent.service.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connection.d.ts +14 -0
- package/dist/features/discord-connection/data/discord-connection.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connection.interface.d.ts +10 -0
- package/dist/features/discord-connection/data/discord-connection.interface.d.ts.map +1 -0
- package/dist/features/discord-connection/data/discord-connection.service.d.ts +12 -0
- package/dist/features/discord-connection/data/discord-connection.service.d.ts.map +1 -0
- package/dist/features/discord-connection/data/index.d.ts +10 -0
- package/dist/features/discord-connection/data/index.d.ts.map +1 -0
- package/dist/features/discord-connection/discord-connection.module.d.ts +5 -0
- package/dist/features/discord-connection/discord-connection.module.d.ts.map +1 -0
- package/dist/features/discord-connection/index.d.ts +3 -0
- package/dist/features/discord-connection/index.d.ts.map +1 -0
- package/dist/features/help/index.js +41 -41
- package/dist/features/help/index.mjs +7 -7
- package/dist/features/tokenusage/index.js +130 -130
- package/dist/features/tokenusage/index.mjs +7 -7
- package/dist/features/user/contexts/UserContext.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -6
- package/dist/local-transport-MJPOKPTU.js +15 -0
- package/dist/{local-transport-4YDJ6FQG.js.map → local-transport-MJPOKPTU.js.map} +1 -1
- package/dist/{local-transport-C7YTA4I7.mjs → local-transport-RVD4FZGA.mjs} +5 -5
- package/dist/offline/index.js +51 -51
- package/dist/offline/index.mjs +6 -6
- package/dist/{request-66FGJIHB.mjs → request-4AWGPIGH.mjs} +2 -2
- package/dist/{request-6W6UGKJV.js → request-H5FZBZA2.js} +3 -3
- package/dist/{request-6W6UGKJV.js.map → request-H5FZBZA2.js.map} +1 -1
- package/dist/server/index.js +8 -8
- package/dist/server/index.mjs +7 -7
- package/dist/unified/JsonApiRequest.d.ts +5 -0
- package/dist/unified/JsonApiRequest.d.ts.map +1 -1
- package/dist/write-through-7I3LA2WN.mjs +15 -0
- package/dist/write-through-HE2QSOVI.js +15 -0
- package/dist/{write-through-BAPS24GL.js.map → write-through-HE2QSOVI.js.map} +1 -1
- package/package.json +1 -1
- package/src/client/JsonApiClient.ts +10 -0
- package/src/client/__tests__/request.credentials.spec.ts +103 -0
- package/src/client/request.ts +9 -0
- package/src/components/forms/EditorSheet.tsx +2 -2
- package/src/components/forms/__tests__/EditorSheet.spec.tsx +16 -0
- package/src/core/abstracts/AbstractService.ts +10 -0
- package/src/core/abstracts/ClientAbstractService.ts +10 -0
- package/src/core/index.ts +3 -0
- package/src/core/registry/ModuleRegistry.ts +4 -0
- package/src/features/discord-connection/data/__tests__/DiscordConnection.spec.ts +114 -0
- package/src/features/discord-connection/data/discord-connect-confirmation.interface.ts +16 -0
- package/src/features/discord-connection/data/discord-connect-confirmation.service.ts +21 -0
- package/src/features/discord-connection/data/discord-connect-confirmation.ts +46 -0
- package/src/features/discord-connection/data/discord-connect-intent.interface.ts +16 -0
- package/src/features/discord-connection/data/discord-connect-intent.service.ts +20 -0
- package/src/features/discord-connection/data/discord-connect-intent.ts +42 -0
- package/src/features/discord-connection/data/discord-connection.interface.ts +10 -0
- package/src/features/discord-connection/data/discord-connection.service.ts +17 -0
- package/src/features/discord-connection/data/discord-connection.ts +41 -0
- package/src/features/discord-connection/data/index.ts +9 -0
- package/src/features/discord-connection/discord-connection.module.ts +28 -0
- package/src/features/discord-connection/index.ts +2 -0
- package/src/features/oauth/components/OAuthClientDetail.tsx +1 -1
- package/src/features/user/contexts/UserContext.tsx +6 -2
- package/src/index.ts +1 -1
- package/src/unified/JsonApiRequest.ts +14 -0
- package/dist/JsonApiRequest-G4J2WTSU.js +0 -26
- package/dist/chunk-3CGU6WXY.js.map +0 -1
- package/dist/chunk-AUD6ZLBB.mjs.map +0 -1
- package/dist/chunk-GM4VZTWL.js.map +0 -1
- package/dist/chunk-JSHLBRFV.mjs.map +0 -1
- package/dist/chunk-KV4N7DEG.js.map +0 -1
- package/dist/chunk-M3N7LPHX.mjs.map +0 -1
- package/dist/chunk-MQ7TXALH.mjs.map +0 -1
- package/dist/chunk-OHHA5BBX.mjs.map +0 -1
- package/dist/chunk-WCEYT3GG.js.map +0 -1
- package/dist/chunk-ZB6OYIMB.js.map +0 -1
- package/dist/local-transport-4YDJ6FQG.js +0 -15
- package/dist/write-through-BAPS24GL.js +0 -15
- package/dist/write-through-IWQKXYHE.mjs +0 -15
- /package/dist/{BlockNoteEditor-66ZACETR.mjs.map → BlockNoteEditor-UO4ZRCUM.mjs.map} +0 -0
- /package/dist/{BlockNoteViewer-2UDFTXRS.mjs.map → BlockNoteViewer-2TJZ6JET.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-IKKHWCPB.mjs.map → JsonApiRequest-ADLBJ5RX.mjs.map} +0 -0
- /package/dist/{chunk-4RA5PRXX.mjs.map → chunk-7OIWOPM5.mjs.map} +0 -0
- /package/dist/{chunk-G2UIQSNJ.mjs.map → chunk-TMV7TL7O.mjs.map} +0 -0
- /package/dist/{chunk-QIEF7HIL.mjs.map → chunk-VNUT2D27.mjs.map} +0 -0
- /package/dist/{chunk-KTGKW72G.mjs.map → chunk-W4ML6D2X.mjs.map} +0 -0
- /package/dist/{chunk-A3RB47X4.mjs.map → chunk-YTDGYI62.mjs.map} +0 -0
- /package/dist/{local-transport-C7YTA4I7.mjs.map → local-transport-RVD4FZGA.mjs.map} +0 -0
- /package/dist/{request-66FGJIHB.mjs.map → request-4AWGPIGH.mjs.map} +0 -0
- /package/dist/{write-through-IWQKXYHE.mjs.map → write-through-7I3LA2WN.mjs.map} +0 -0
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkR5722NLLjs = require('../../chunk-R5722NLL.js');
|
|
41
41
|
require('../../chunk-3EPNHTMH.js');
|
|
42
|
-
require('../../chunk-
|
|
42
|
+
require('../../chunk-TNTCLVUR.js');
|
|
43
43
|
require('../../chunk-G4JR3SFV.js');
|
|
44
44
|
|
|
45
45
|
|
|
@@ -61,18 +61,18 @@ require('../../chunk-G4JR3SFV.js');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkHN7L6RRWjs = require('../../chunk-HN7L6RRW.js');
|
|
65
65
|
require('../../chunk-DGN3PR2F.js');
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
|
|
71
|
-
var
|
|
72
|
-
require('../../chunk-
|
|
73
|
-
require('../../chunk-
|
|
71
|
+
var _chunkP7L6OFX5js = require('../../chunk-P7L6OFX5.js');
|
|
72
|
+
require('../../chunk-BQ2WAG4K.js');
|
|
73
|
+
require('../../chunk-A5M3MORY.js');
|
|
74
74
|
require('../../chunk-WUNSG3IN.js');
|
|
75
|
-
require('../../chunk-
|
|
75
|
+
require('../../chunk-RCOKQ3R4.js');
|
|
76
76
|
require('../../chunk-LXKSUWAV.js');
|
|
77
77
|
|
|
78
78
|
|
|
@@ -113,7 +113,7 @@ var dropzone = {
|
|
|
113
113
|
};
|
|
114
114
|
async function uploadBlogImage(params) {
|
|
115
115
|
if (!params.selection || !params.key) return;
|
|
116
|
-
await
|
|
116
|
+
await _chunkHN7L6RRWjs.S3Service.upload({
|
|
117
117
|
key: params.key,
|
|
118
118
|
contentType: params.selection.contentType,
|
|
119
119
|
file: params.selection.file,
|
|
@@ -143,8 +143,8 @@ function BlogCoverImageField({
|
|
|
143
143
|
};
|
|
144
144
|
}, [previewUrl]);
|
|
145
145
|
const src = _nullishCoalesce(previewUrl, () => ( currentUrl));
|
|
146
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
147
|
-
|
|
146
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormFieldWrapper, { form, name: id, label, children: (field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
147
|
+
_chunkR5722NLLjs.FileUploader,
|
|
148
148
|
{
|
|
149
149
|
value: files,
|
|
150
150
|
onValueChange: (value) => {
|
|
@@ -157,7 +157,7 @@ function BlogCoverImageField({
|
|
|
157
157
|
},
|
|
158
158
|
dropzoneOptions: dropzone,
|
|
159
159
|
className: "w-full",
|
|
160
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
160
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FileInput, { className: "text-muted-foreground/50 rounded-lg outline-1 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center p-4", children: src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
161
161
|
_image2.default,
|
|
162
162
|
{
|
|
163
163
|
src,
|
|
@@ -165,7 +165,7 @@ function BlogCoverImageField({
|
|
|
165
165
|
width: 320,
|
|
166
166
|
height: 180,
|
|
167
167
|
className: "h-auto max-h-48 w-auto max-w-full rounded-md object-cover",
|
|
168
|
-
unoptimized:
|
|
168
|
+
unoptimized: _chunkHN7L6RRWjs.isRemoteImageSrc.call(void 0, previewUrl ? void 0 : currentUrl)
|
|
169
169
|
}
|
|
170
170
|
) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
171
171
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }),
|
|
@@ -191,7 +191,7 @@ function blogCategoryAdminName(category) {
|
|
|
191
191
|
}
|
|
192
192
|
_chunk7QVYU63Ejs.__name.call(void 0, blogCategoryAdminName, "blogCategoryAdminName");
|
|
193
193
|
function useBlogLanguageName() {
|
|
194
|
-
const locale =
|
|
194
|
+
const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
|
|
195
195
|
const names = _react.useMemo.call(void 0, () => {
|
|
196
196
|
try {
|
|
197
197
|
return new Intl.DisplayNames([locale], { type: "language" });
|
|
@@ -210,7 +210,7 @@ function useBlogLanguageName() {
|
|
|
210
210
|
}
|
|
211
211
|
_chunk7QVYU63Ejs.__name.call(void 0, useBlogLanguageName, "useBlogLanguageName");
|
|
212
212
|
function useBlogDateFormatter() {
|
|
213
|
-
const locale =
|
|
213
|
+
const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
|
|
214
214
|
return _react.useCallback.call(void 0, (date) => date ? date.toLocaleDateString(locale, { dateStyle: "medium" }) : "", [locale]);
|
|
215
215
|
}
|
|
216
216
|
_chunk7QVYU63Ejs.__name.call(void 0, useBlogDateFormatter, "useBlogDateFormatter");
|
|
@@ -219,7 +219,7 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
219
219
|
const [isRetrying, setIsRetrying] = _react.useState.call(void 0, false);
|
|
220
220
|
if (aiStatus === "completed") return null;
|
|
221
221
|
if (aiStatus === "pending" || aiStatus === "in_progress") {
|
|
222
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
222
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center gap-x-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softBlue", children: [
|
|
223
223
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.LoaderCircleIcon, { className: "animate-spin" }),
|
|
224
224
|
aiStatus === "pending" ? t("blog.translation.pending") : t("blog.translation.translating")
|
|
225
225
|
] }) });
|
|
@@ -230,14 +230,14 @@ function BlogTranslationStatus({ aiStatus, onRetranslate }) {
|
|
|
230
230
|
try {
|
|
231
231
|
await onRetranslate();
|
|
232
232
|
} catch (error) {
|
|
233
|
-
|
|
233
|
+
_chunkR5722NLLjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
234
234
|
} finally {
|
|
235
235
|
setIsRetrying(false);
|
|
236
236
|
}
|
|
237
237
|
}, "retranslate");
|
|
238
238
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
239
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
240
|
-
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
239
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softRed", children: t("blog.translation.failed") }),
|
|
240
|
+
onRetranslate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.Button, { type: "button", size: "sm", variant: "outline", onClick: () => void retranslate(), disabled: isRetrying, children: [
|
|
241
241
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}),
|
|
242
242
|
t("blog.actions.translateAgain")
|
|
243
243
|
] })
|
|
@@ -266,10 +266,10 @@ var sameTranslation = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (a, b
|
|
|
266
266
|
function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
267
267
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
268
268
|
const formSchema = _react.useMemo.call(void 0, () => buildFormSchema(t), [t]);
|
|
269
|
-
const locale =
|
|
269
|
+
const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
|
|
270
270
|
const languageName = useBlogLanguageName();
|
|
271
271
|
const [image, setImage] = _react.useState.call(void 0, null);
|
|
272
|
-
const languages = _react.useMemo.call(void 0, () =>
|
|
272
|
+
const languages = _react.useMemo.call(void 0, () => _chunkP7L6OFX5js.getI18nSupportedLocales.call(void 0, ), []);
|
|
273
273
|
const original = _optionalChain([category, 'optionalAccess', _6 => _6.original]);
|
|
274
274
|
const translations = _react.useMemo.call(void 0,
|
|
275
275
|
() => (_nullishCoalesce(_optionalChain([category, 'optionalAccess', _7 => _7.translations]), () => ( []))).filter((translation) => !translation.isOriginal),
|
|
@@ -298,20 +298,20 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
298
298
|
defaultValues: getDefaultValues()
|
|
299
299
|
});
|
|
300
300
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
301
|
-
|
|
301
|
+
_chunkR5722NLLjs.EditorSheet,
|
|
302
302
|
{
|
|
303
303
|
form,
|
|
304
304
|
entityType: t("blog.entities.category"),
|
|
305
305
|
entityName: _nullishCoalesce(_optionalChain([original, 'optionalAccess', _14 => _14.name]), () => ( _optionalChain([category, 'optionalAccess', _15 => _15.name]))),
|
|
306
306
|
title: category ? t("blog.admin.editCategory") : t("blog.admin.newCategory"),
|
|
307
307
|
isEdit: !!category,
|
|
308
|
-
module:
|
|
308
|
+
module: _chunkP7L6OFX5js.Modules.BlogCategory,
|
|
309
309
|
size: "md",
|
|
310
310
|
onSubmit: async (values) => {
|
|
311
311
|
if (values.image && image) await uploadBlogImage({ key: values.image, selection: image });
|
|
312
312
|
const imageKey = values.image && image ? values.image : void 0;
|
|
313
313
|
if (!category) {
|
|
314
|
-
return
|
|
314
|
+
return _chunkHN7L6RRWjs.BlogCategoryService.create({
|
|
315
315
|
id: values.id,
|
|
316
316
|
originalLanguage: values.originalLanguage,
|
|
317
317
|
name: values.name,
|
|
@@ -325,7 +325,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
325
325
|
{ id: defaults.id, name: defaults.name, slug: defaults.slug, description: defaults.description }
|
|
326
326
|
);
|
|
327
327
|
if (originalChanged) {
|
|
328
|
-
await
|
|
328
|
+
await _chunkHN7L6RRWjs.BlogCategoryService.update({
|
|
329
329
|
id: values.id,
|
|
330
330
|
originalLanguage: _optionalChain([category, 'optionalAccess', _16 => _16.originalLanguage]),
|
|
331
331
|
name: values.name,
|
|
@@ -337,7 +337,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
337
337
|
for (const translation of values.translations) {
|
|
338
338
|
const before = defaults.translations.find((candidate) => candidate.id === translation.id);
|
|
339
339
|
if (sameTranslation(translation, before)) continue;
|
|
340
|
-
await
|
|
340
|
+
await _chunkHN7L6RRWjs.BlogCategoryTranslationService.update({
|
|
341
341
|
id: translation.id,
|
|
342
342
|
name: translation.name,
|
|
343
343
|
slug: translation.slug || void 0,
|
|
@@ -355,7 +355,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
355
355
|
trigger,
|
|
356
356
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
|
|
357
357
|
!category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
358
|
-
|
|
358
|
+
_chunkR5722NLLjs.FormSelect,
|
|
359
359
|
{
|
|
360
360
|
form,
|
|
361
361
|
id: "originalLanguage",
|
|
@@ -364,16 +364,16 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
364
364
|
isRequired: true
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
368
|
-
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
369
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
367
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "name", name: t("blog.fields.name"), isRequired: true }),
|
|
368
|
+
category && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
369
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormTextarea, { form, id: "description", name: t("blog.fields.description") }),
|
|
370
370
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
371
371
|
BlogCoverImageField,
|
|
372
372
|
{
|
|
373
373
|
form,
|
|
374
374
|
id: "image",
|
|
375
375
|
label: t("blog.fields.image"),
|
|
376
|
-
keyPrefix:
|
|
376
|
+
keyPrefix: _chunkHN7L6RRWjs.BLOG_CATEGORY_UPLOAD_PREFIX,
|
|
377
377
|
entityId: form.getValues("id"),
|
|
378
378
|
currentUrl: _optionalChain([category, 'optionalAccess', _17 => _17.image]),
|
|
379
379
|
selection: image,
|
|
@@ -381,29 +381,29 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
383
|
translations.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
|
|
384
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
385
|
-
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
386
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
384
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.SectionHeader, { className: "mt-2", children: t("blog.fields.languages") }),
|
|
385
|
+
translations.map((translation, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.Collapsible, { className: "rounded-md border", children: [
|
|
386
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.CollapsibleTrigger, { className: "flex w-full items-center justify-between gap-x-2 px-3 py-2 text-start", children: [
|
|
387
387
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-x-2 text-sm font-medium", children: [
|
|
388
388
|
languageName(translation.language),
|
|
389
389
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogTranslationStatus, { aiStatus: translation.aiStatus })
|
|
390
390
|
] }),
|
|
391
391
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-4" })
|
|
392
392
|
] }),
|
|
393
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
393
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.CollapsibleContent, { className: "flex flex-col gap-y-4 border-t p-3", children: [
|
|
394
394
|
translation.aiStatus === "failed" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
395
395
|
BlogTranslationStatus,
|
|
396
396
|
{
|
|
397
397
|
aiStatus: translation.aiStatus,
|
|
398
398
|
onRetranslate: async () => {
|
|
399
|
-
await
|
|
399
|
+
await _chunkHN7L6RRWjs.BlogCategoryTranslationService.retranslate({ id: translation.id });
|
|
400
400
|
await _optionalChain([onSuccess, 'optionalCall', _18 => _18()]);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
404
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: `translations.${index}.name`, name: t("blog.fields.name"), isRequired: true }),
|
|
405
405
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
406
|
-
|
|
406
|
+
_chunkR5722NLLjs.FormInput,
|
|
407
407
|
{
|
|
408
408
|
form,
|
|
409
409
|
id: `translations.${index}.slug`,
|
|
@@ -412,7 +412,7 @@ function BlogCategoryEditor({ category, trigger, onSuccess }) {
|
|
|
412
412
|
}
|
|
413
413
|
),
|
|
414
414
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
415
|
-
|
|
415
|
+
_chunkR5722NLLjs.FormTextarea,
|
|
416
416
|
{
|
|
417
417
|
form,
|
|
418
418
|
id: `translations.${index}.description`,
|
|
@@ -485,37 +485,37 @@ var useBlogCategoryTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call
|
|
|
485
485
|
}, [params.fields, fieldColumnMap, t, refresh]);
|
|
486
486
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
487
487
|
}, "useBlogCategoryTableStructure");
|
|
488
|
-
|
|
488
|
+
_chunkR5722NLLjs.registerTableGenerator.call(void 0, "blog-categories", useBlogCategoryTableStructure);
|
|
489
489
|
|
|
490
490
|
// src/features/blog/components/admin/BlogCategoriesList.tsx
|
|
491
491
|
|
|
492
492
|
function BlogCategoriesList({ fullWidth } = {}) {
|
|
493
493
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
494
|
-
const data =
|
|
495
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) =>
|
|
494
|
+
const data = _chunkR5722NLLjs.useDataListRetriever.call(void 0, {
|
|
495
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.BlogCategoryService.findMany(params), "retriever"),
|
|
496
496
|
retrieverParams: {},
|
|
497
|
-
module:
|
|
497
|
+
module: _chunkP7L6OFX5js.Modules.BlogCategory
|
|
498
498
|
});
|
|
499
499
|
const functions = [
|
|
500
500
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
501
501
|
BlogCategoryEditor,
|
|
502
502
|
{
|
|
503
503
|
onSuccess: data.refresh,
|
|
504
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
504
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newCategory") })
|
|
505
505
|
},
|
|
506
506
|
"create-blog-category"
|
|
507
507
|
)
|
|
508
508
|
];
|
|
509
509
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
510
|
-
|
|
510
|
+
_chunkR5722NLLjs.ContentListTable,
|
|
511
511
|
{
|
|
512
512
|
data,
|
|
513
513
|
fields: ["name" /* name */, "languages" /* languages */],
|
|
514
|
-
tableGeneratorType:
|
|
514
|
+
tableGeneratorType: _chunkP7L6OFX5js.Modules.BlogCategory,
|
|
515
515
|
functions,
|
|
516
516
|
fullWidth,
|
|
517
517
|
title: t("blog.entities.categories"),
|
|
518
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
518
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.EmptyState, { icon: _lucidereact.TagIcon, title: t("blog.admin.emptyCategories") })
|
|
519
519
|
}
|
|
520
520
|
);
|
|
521
521
|
}
|
|
@@ -531,7 +531,7 @@ function BlogLayoutSetting() {
|
|
|
531
531
|
const [saving, setSaving] = _react.useState.call(void 0, false);
|
|
532
532
|
_react.useEffect.call(void 0, () => {
|
|
533
533
|
let active = true;
|
|
534
|
-
|
|
534
|
+
_chunkHN7L6RRWjs.BlogSettingsService.get().then((settings) => {
|
|
535
535
|
if (active) setLayout(_nullishCoalesce(_optionalChain([settings, 'optionalAccess', _23 => _23.listLayout]), () => ( "featured")));
|
|
536
536
|
}).catch(() => {
|
|
537
537
|
if (active) setLayout("featured");
|
|
@@ -550,19 +550,19 @@ function BlogLayoutSetting() {
|
|
|
550
550
|
setLayout(next);
|
|
551
551
|
setSaving(true);
|
|
552
552
|
try {
|
|
553
|
-
await
|
|
554
|
-
|
|
553
|
+
await _chunkHN7L6RRWjs.BlogSettingsService.save({ id: _chunkHN7L6RRWjs.BLOG_SETTINGS_ID, listLayout: next });
|
|
554
|
+
_chunkHN7L6RRWjs.showToast.call(void 0, t("blog.layout.saved"));
|
|
555
555
|
} catch (error) {
|
|
556
556
|
setLayout(previous);
|
|
557
|
-
|
|
557
|
+
_chunkR5722NLLjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
558
558
|
} finally {
|
|
559
559
|
setSaving(false);
|
|
560
560
|
}
|
|
561
561
|
}, "save");
|
|
562
562
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full max-w-3xl flex-col gap-y-4 p-4", children: [
|
|
563
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
563
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.SectionHeader, { children: t("blog.layout.title") }),
|
|
564
564
|
layout && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
565
|
-
|
|
565
|
+
_chunkR5722NLLjs.RadioGroup,
|
|
566
566
|
{
|
|
567
567
|
value: layout,
|
|
568
568
|
onValueChange: (value) => {
|
|
@@ -571,13 +571,13 @@ function BlogLayoutSetting() {
|
|
|
571
571
|
},
|
|
572
572
|
disabled: saving,
|
|
573
573
|
className: "grid grid-cols-1 gap-3 md:grid-cols-3",
|
|
574
|
-
children:
|
|
574
|
+
children: _chunkHN7L6RRWjs.BLOG_LIST_LAYOUTS.map((option) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
575
575
|
"label",
|
|
576
576
|
{
|
|
577
577
|
htmlFor: `blog-layout-${option}`,
|
|
578
578
|
className: "has-data-checked:border-primary flex cursor-pointer items-start gap-x-3 rounded-lg border p-4",
|
|
579
579
|
children: [
|
|
580
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
580
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.RadioGroupItem, { value: option, id: `blog-layout-${option}`, className: "mt-0.5" }),
|
|
581
581
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-col gap-y-1", children: [
|
|
582
582
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium", children: options[option].label }),
|
|
583
583
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs/relaxed", children: options[option].description })
|
|
@@ -606,7 +606,7 @@ function useBlogCategoryNames() {
|
|
|
606
606
|
const [names, setNames] = _react.useState.call(void 0, {});
|
|
607
607
|
_react.useEffect.call(void 0, () => {
|
|
608
608
|
let cancelled = false;
|
|
609
|
-
|
|
609
|
+
_chunkHN7L6RRWjs.BlogCategoryService.findMany({ fetchAll: true }).then((categories) => {
|
|
610
610
|
if (cancelled) return;
|
|
611
611
|
setNames(Object.fromEntries(categories.map((category) => [category.id, blogCategoryAdminName(category)])));
|
|
612
612
|
}).catch(() => {
|
|
@@ -623,8 +623,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, useBlogCategoryNames, "useBlogCategoryNames
|
|
|
623
623
|
|
|
624
624
|
var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
|
|
625
625
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
626
|
-
const locale =
|
|
627
|
-
const generateUrl =
|
|
626
|
+
const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
|
|
627
|
+
const generateUrl = _chunkR5722NLLjs.usePageUrlGenerator.call(void 0, );
|
|
628
628
|
const categoryName = useBlogCategoryNames();
|
|
629
629
|
const tableData = _react.useMemo.call(void 0, () => {
|
|
630
630
|
return params.data.map((post) => {
|
|
@@ -642,7 +642,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
642
642
|
header: t("blog.fields.title"),
|
|
643
643
|
cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => {
|
|
644
644
|
const post = row.original.jsonApiData;
|
|
645
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
645
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Link, { href: generateUrl({ page: _chunkP7L6OFX5js.Modules.BlogPost, id: post.id }), children: _nullishCoalesce(_nullishCoalesce(_optionalChain([post, 'access', _24 => _24.original, 'optionalAccess', _25 => _25.title]), () => ( post.title)), () => ( post.id)) });
|
|
646
646
|
}, "cell"),
|
|
647
647
|
enableSorting: false,
|
|
648
648
|
enableHiding: false
|
|
@@ -658,7 +658,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
658
658
|
published: t("blog.status.published"),
|
|
659
659
|
unpublished: t("blog.status.unpublished")
|
|
660
660
|
}[post.status];
|
|
661
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
661
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: _nullishCoalesce(BLOG_STATUS_BADGE[post.status], () => ( "softGray")), children: _nullishCoalesce(label, () => ( post.status)) });
|
|
662
662
|
}, "cell"),
|
|
663
663
|
enableSorting: false,
|
|
664
664
|
enableHiding: false
|
|
@@ -712,7 +712,7 @@ var useBlogPostTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(voi
|
|
|
712
712
|
}, [params.fields, fieldColumnMap, t, generateUrl, locale, categoryName]);
|
|
713
713
|
return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
|
|
714
714
|
}, "useBlogPostTableStructure");
|
|
715
|
-
|
|
715
|
+
_chunkR5722NLLjs.registerTableGenerator.call(void 0, "blog-posts", useBlogPostTableStructure);
|
|
716
716
|
|
|
717
717
|
// src/features/blog/components/admin/BlogPostEditor.tsx
|
|
718
718
|
|
|
@@ -726,13 +726,13 @@ var isBodyEmpty = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (body) =>
|
|
|
726
726
|
function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
727
727
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
728
728
|
const categoryName = useBlogCategoryNames();
|
|
729
|
-
const router =
|
|
730
|
-
const locale =
|
|
729
|
+
const router = _chunkP7L6OFX5js.useI18nRouter.call(void 0, );
|
|
730
|
+
const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
|
|
731
731
|
const languageName = useBlogLanguageName();
|
|
732
732
|
const original = _optionalChain([post, 'optionalAccess', _28 => _28.original]);
|
|
733
733
|
const [cover, setCover] = _react.useState.call(void 0, null);
|
|
734
734
|
const [isBodyEmptyState, setIsBodyEmptyState] = _react.useState.call(void 0, isBodyEmpty(_optionalChain([original, 'optionalAccess', _29 => _29.body])));
|
|
735
|
-
const languages = _react.useMemo.call(void 0, () =>
|
|
735
|
+
const languages = _react.useMemo.call(void 0, () => _chunkP7L6OFX5js.getI18nSupportedLocales.call(void 0, ), []);
|
|
736
736
|
const formSchema = _react.useMemo.call(void 0,
|
|
737
737
|
() => _zod3.z.object({
|
|
738
738
|
id: _zod3.z.string().uuid(),
|
|
@@ -777,14 +777,14 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
777
777
|
return Object.keys(dirty).length > 0;
|
|
778
778
|
}, [dirtyFields, isBodyEmptyState]);
|
|
779
779
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
780
|
-
|
|
780
|
+
_chunkR5722NLLjs.EditorSheet,
|
|
781
781
|
{
|
|
782
782
|
form,
|
|
783
783
|
entityType: t("blog.entities.post"),
|
|
784
784
|
entityName: _optionalChain([original, 'optionalAccess', _38 => _38.title]),
|
|
785
785
|
title: post ? t("blog.admin.editPost") : t("blog.admin.newPost"),
|
|
786
786
|
isEdit: !!post,
|
|
787
|
-
module:
|
|
787
|
+
module: _chunkP7L6OFX5js.Modules.BlogPost,
|
|
788
788
|
size: "lg",
|
|
789
789
|
isFormDirty,
|
|
790
790
|
onSubmit: async (values) => {
|
|
@@ -801,13 +801,13 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
801
801
|
categoryIds: values.categories.map((category) => category.id)
|
|
802
802
|
};
|
|
803
803
|
if (post) {
|
|
804
|
-
return
|
|
804
|
+
return _chunkHN7L6RRWjs.BlogPostService.update({
|
|
805
805
|
...payload,
|
|
806
806
|
originalLanguage: post.originalLanguage,
|
|
807
807
|
slug: values.slug || void 0
|
|
808
808
|
});
|
|
809
809
|
}
|
|
810
|
-
return
|
|
810
|
+
return _chunkHN7L6RRWjs.BlogPostService.create({ ...payload, originalLanguage: values.originalLanguage });
|
|
811
811
|
},
|
|
812
812
|
onReset: () => {
|
|
813
813
|
setCover(null);
|
|
@@ -819,7 +819,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
819
819
|
trigger,
|
|
820
820
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
821
821
|
!post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
822
|
-
|
|
822
|
+
_chunkR5722NLLjs.FormSelect,
|
|
823
823
|
{
|
|
824
824
|
form,
|
|
825
825
|
id: "originalLanguage",
|
|
@@ -828,24 +828,24 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
828
828
|
isRequired: true
|
|
829
829
|
}
|
|
830
830
|
),
|
|
831
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
831
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
832
832
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
833
833
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
834
|
-
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
834
|
+
post && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
835
835
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
836
|
-
|
|
836
|
+
_chunkR5722NLLjs.EntityMultiSelector,
|
|
837
837
|
{
|
|
838
838
|
id: "categories",
|
|
839
839
|
form,
|
|
840
840
|
label: t("blog.fields.categories"),
|
|
841
|
-
retriever: (params) =>
|
|
842
|
-
module:
|
|
841
|
+
retriever: (params) => _chunkHN7L6RRWjs.BlogCategoryService.findMany(params),
|
|
842
|
+
module: _chunkP7L6OFX5js.Modules.BlogCategory,
|
|
843
843
|
getLabel: blogCategoryAdminName,
|
|
844
844
|
getFormValueLabel: (value) => value.name || categoryName(value.id)
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
847
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
848
|
-
|
|
848
|
+
_chunkR5722NLLjs.FormTextarea,
|
|
849
849
|
{
|
|
850
850
|
form,
|
|
851
851
|
id: "summary",
|
|
@@ -862,7 +862,7 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
862
862
|
form,
|
|
863
863
|
id: "coverImage",
|
|
864
864
|
label: t("blog.fields.coverImage"),
|
|
865
|
-
keyPrefix:
|
|
865
|
+
keyPrefix: _chunkHN7L6RRWjs.BLOG_POST_UPLOAD_PREFIX,
|
|
866
866
|
entityId: form.getValues("id"),
|
|
867
867
|
currentUrl: _optionalChain([post, 'optionalAccess', _40 => _40.coverImage]),
|
|
868
868
|
alt: _optionalChain([original, 'optionalAccess', _41 => _41.coverImageAlt]),
|
|
@@ -870,13 +870,13 @@ function BlogPostEditor({ post, trigger, onSuccess }) {
|
|
|
870
870
|
onSelectionChange: setCover
|
|
871
871
|
}
|
|
872
872
|
),
|
|
873
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
873
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") })
|
|
874
874
|
] })
|
|
875
875
|
] }),
|
|
876
876
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
877
|
-
|
|
877
|
+
_chunkR5722NLLjs.FormBlockNote,
|
|
878
878
|
{
|
|
879
|
-
uploadKeyPrefix:
|
|
879
|
+
uploadKeyPrefix: _chunkHN7L6RRWjs.BLOG_POST_UPLOAD_PREFIX,
|
|
880
880
|
form,
|
|
881
881
|
id: "body",
|
|
882
882
|
name: t("blog.fields.body"),
|
|
@@ -897,22 +897,22 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostEditor, "BlogPostEditor");
|
|
|
897
897
|
|
|
898
898
|
function BlogPostsList({ fullWidth } = {}) {
|
|
899
899
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
900
|
-
const data =
|
|
901
|
-
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) =>
|
|
900
|
+
const data = _chunkR5722NLLjs.useDataListRetriever.call(void 0, {
|
|
901
|
+
retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.BlogPostService.findMany(params), "retriever"),
|
|
902
902
|
retrieverParams: {},
|
|
903
|
-
module:
|
|
903
|
+
module: _chunkP7L6OFX5js.Modules.BlogPost
|
|
904
904
|
});
|
|
905
905
|
const functions = [
|
|
906
906
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
907
907
|
BlogPostEditor,
|
|
908
908
|
{
|
|
909
|
-
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
909
|
+
trigger: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("blog.admin.newPost") })
|
|
910
910
|
},
|
|
911
911
|
"create-blog-post"
|
|
912
912
|
)
|
|
913
913
|
];
|
|
914
914
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
915
|
-
|
|
915
|
+
_chunkR5722NLLjs.ContentListTable,
|
|
916
916
|
{
|
|
917
917
|
data,
|
|
918
918
|
fields: [
|
|
@@ -922,11 +922,11 @@ function BlogPostsList({ fullWidth } = {}) {
|
|
|
922
922
|
"publishedAt" /* publishedAt */,
|
|
923
923
|
"languages" /* languages */
|
|
924
924
|
],
|
|
925
|
-
tableGeneratorType:
|
|
925
|
+
tableGeneratorType: _chunkP7L6OFX5js.Modules.BlogPost,
|
|
926
926
|
functions,
|
|
927
927
|
fullWidth,
|
|
928
928
|
title: t("blog.entities.posts"),
|
|
929
|
-
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
929
|
+
emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.EmptyState, { icon: _lucidereact.NewspaperIcon, title: t("blog.admin.empty") })
|
|
930
930
|
}
|
|
931
931
|
);
|
|
932
932
|
}
|
|
@@ -937,10 +937,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostsList, "BlogPostsList");
|
|
|
937
937
|
function BlogAdminContainer() {
|
|
938
938
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
939
939
|
const breadcrumbs = [{ name: t("blog.admin.title") }];
|
|
940
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
941
|
-
|
|
940
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.SharedProvider, { value: { breadcrumbs, title: { type: t("blog.admin.title") } }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
941
|
+
_chunkR5722NLLjs.RoundPageContainer,
|
|
942
942
|
{
|
|
943
|
-
module:
|
|
943
|
+
module: _chunkP7L6OFX5js.Modules.BlogPost,
|
|
944
944
|
tabs: [
|
|
945
945
|
{ sectionKey: "posts", label: t("blog.tabs.posts"), content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostsList, {}) },
|
|
946
946
|
{ sectionKey: "categories", label: t("blog.tabs.categories"), content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogCategoriesList, {}) },
|
|
@@ -963,7 +963,7 @@ var BlogPostContext = _react.createContext.call(void 0, void 0);
|
|
|
963
963
|
var BlogPostProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ postId, children }) => {
|
|
964
964
|
const [post, setPost] = _react.useState.call(void 0, void 0);
|
|
965
965
|
const reload = _react.useCallback.call(void 0, async () => {
|
|
966
|
-
const loaded = await
|
|
966
|
+
const loaded = await _chunkHN7L6RRWjs.BlogPostService.findOne({ id: postId });
|
|
967
967
|
setPost(loaded);
|
|
968
968
|
}, [postId]);
|
|
969
969
|
_react.useEffect.call(void 0, () => {
|
|
@@ -999,19 +999,19 @@ var useBlogPost = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
|
|
|
999
999
|
|
|
1000
1000
|
function BlogPostDeleter() {
|
|
1001
1001
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1002
|
-
const generateUrl =
|
|
1002
|
+
const generateUrl = _chunkR5722NLLjs.usePageUrlGenerator.call(void 0, );
|
|
1003
1003
|
const { post } = useBlogPost();
|
|
1004
1004
|
if (!post) return null;
|
|
1005
1005
|
const type = t("blog.entities.post");
|
|
1006
1006
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1007
|
-
|
|
1007
|
+
_chunkR5722NLLjs.CommonDeleter,
|
|
1008
1008
|
{
|
|
1009
1009
|
title: t("common.delete.title", { type }),
|
|
1010
1010
|
subtitle: t("common.delete.subtitle", { type }),
|
|
1011
1011
|
description: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-destructive p-4 text-sm", children: t("common.delete.description", { type }) }),
|
|
1012
1012
|
showLabel: true,
|
|
1013
|
-
deleteFunction: () =>
|
|
1014
|
-
redirectTo: generateUrl({ page:
|
|
1013
|
+
deleteFunction: () => _chunkHN7L6RRWjs.BlogPostService.delete({ id: post.id }),
|
|
1014
|
+
redirectTo: generateUrl({ page: _chunkP7L6OFX5js.Modules.BlogPost })
|
|
1015
1015
|
}
|
|
1016
1016
|
);
|
|
1017
1017
|
}
|
|
@@ -1031,17 +1031,17 @@ function BlogPostPublishButton() {
|
|
|
1031
1031
|
const toggle = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
1032
1032
|
setSaving(true);
|
|
1033
1033
|
try {
|
|
1034
|
-
if (isPublished) await
|
|
1035
|
-
else await
|
|
1034
|
+
if (isPublished) await _chunkHN7L6RRWjs.BlogPostService.unpublish({ id: post.id });
|
|
1035
|
+
else await _chunkHN7L6RRWjs.BlogPostService.publish({ id: post.id });
|
|
1036
1036
|
await reload();
|
|
1037
1037
|
} catch (error) {
|
|
1038
|
-
|
|
1038
|
+
_chunkR5722NLLjs.errorToast.call(void 0, { title: t("common.errors.error"), error });
|
|
1039
1039
|
} finally {
|
|
1040
1040
|
setSaving(false);
|
|
1041
1041
|
}
|
|
1042
1042
|
}, "toggle");
|
|
1043
1043
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1044
|
-
|
|
1044
|
+
_chunkR5722NLLjs.Button,
|
|
1045
1045
|
{
|
|
1046
1046
|
type: "button",
|
|
1047
1047
|
size: "sm",
|
|
@@ -1069,11 +1069,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostPublishButton, "BlogPostPublishButt
|
|
|
1069
1069
|
function BlogPostTranslationFields({ translation }) {
|
|
1070
1070
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1071
1071
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1072
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1073
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1074
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1075
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1076
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1072
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.title"), value: translation.title }),
|
|
1073
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.slug"), value: translation.slug }),
|
|
1074
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.summary"), value: translation.summary }),
|
|
1075
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.coverImageAlt"), value: translation.coverImageAlt }),
|
|
1076
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.body"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.BlockNoteEditorContainer, { id: translation.id, type: "blog-post", initialContent: translation.body }) })
|
|
1077
1077
|
] });
|
|
1078
1078
|
}
|
|
1079
1079
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostTranslationFields, "BlogPostTranslationFields");
|
|
@@ -1083,15 +1083,15 @@ function BlogPostComparison({ original, translation }) {
|
|
|
1083
1083
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1084
1084
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/40 flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1085
1085
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1086
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1087
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1086
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.MicroLabel, { as: "h3", children: languageName(original.language) }),
|
|
1087
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softGray", children: t("blog.translation.original") })
|
|
1088
1088
|
] }),
|
|
1089
1089
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation: original })
|
|
1090
1090
|
] }),
|
|
1091
1091
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4 rounded-lg border p-4", children: [
|
|
1092
1092
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
|
|
1093
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1094
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1093
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.MicroLabel, { as: "h3", children: languageName(translation.language) }),
|
|
1094
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") })
|
|
1095
1095
|
] }),
|
|
1096
1096
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostTranslationFields, { translation })
|
|
1097
1097
|
] })
|
|
@@ -1142,17 +1142,17 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1142
1142
|
return Object.keys(dirty).length > 0;
|
|
1143
1143
|
}, [dirtyFields, isBodyEmptyState]);
|
|
1144
1144
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1145
|
-
|
|
1145
|
+
_chunkR5722NLLjs.EditorSheet,
|
|
1146
1146
|
{
|
|
1147
1147
|
form,
|
|
1148
1148
|
entityType: t("blog.entities.post"),
|
|
1149
1149
|
entityName: translation.title,
|
|
1150
1150
|
title: `${t("blog.admin.editPost")} \xB7 ${languageName(translation.language)}`,
|
|
1151
1151
|
isEdit: true,
|
|
1152
|
-
module:
|
|
1152
|
+
module: _chunkP7L6OFX5js.Modules.BlogPostTranslation,
|
|
1153
1153
|
size: "lg",
|
|
1154
1154
|
isFormDirty,
|
|
1155
|
-
onSubmit: async (values) =>
|
|
1155
|
+
onSubmit: async (values) => _chunkHN7L6RRWjs.BlogPostTranslationService.update({
|
|
1156
1156
|
id: values.id,
|
|
1157
1157
|
title: values.title,
|
|
1158
1158
|
slug: values.slug || void 0,
|
|
@@ -1168,18 +1168,18 @@ function BlogPostTranslationEditor({ translation, trigger, onSuccess }) {
|
|
|
1168
1168
|
}))),
|
|
1169
1169
|
trigger,
|
|
1170
1170
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex h-full min-h-0 w-full flex-col gap-y-4", children: [
|
|
1171
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1171
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "title", name: t("blog.fields.title"), isRequired: true }),
|
|
1172
1172
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
|
|
1173
1173
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-4", children: [
|
|
1174
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1175
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1174
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "slug", name: t("blog.fields.slug"), description: t("blog.fields.slugHelp") }),
|
|
1175
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormTextarea, { form, id: "summary", name: t("blog.fields.summary"), className: "min-h-24" })
|
|
1176
1176
|
] }),
|
|
1177
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1177
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.FormInput, { form, id: "coverImageAlt", name: t("blog.fields.coverImageAlt") }) })
|
|
1178
1178
|
] }),
|
|
1179
1179
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1180
|
-
|
|
1180
|
+
_chunkR5722NLLjs.FormBlockNote,
|
|
1181
1181
|
{
|
|
1182
|
-
uploadKeyPrefix:
|
|
1182
|
+
uploadKeyPrefix: _chunkHN7L6RRWjs.BLOG_POST_UPLOAD_PREFIX,
|
|
1183
1183
|
form,
|
|
1184
1184
|
id: "body",
|
|
1185
1185
|
name: t("blog.fields.body"),
|
|
@@ -1207,7 +1207,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1207
1207
|
const original = post.original;
|
|
1208
1208
|
const reload = _nullishCoalesce(onChanged, () => ( (async () => {
|
|
1209
1209
|
})));
|
|
1210
|
-
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1210
|
+
const editTrigger = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: [
|
|
1211
1211
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, {}),
|
|
1212
1212
|
t("blog.actions.edit")
|
|
1213
1213
|
] });
|
|
@@ -1219,7 +1219,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1219
1219
|
}[post.status];
|
|
1220
1220
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1221
1221
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1222
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1222
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softGray", children: t("blog.translation.original") }),
|
|
1223
1223
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostEditor, { post, trigger: editTrigger, onSuccess: reload })
|
|
1224
1224
|
] }),
|
|
1225
1225
|
post.coverImage && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1230,14 +1230,14 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1230
1230
|
width: 640,
|
|
1231
1231
|
height: 360,
|
|
1232
1232
|
className: "h-auto max-h-72 w-auto rounded-lg object-cover",
|
|
1233
|
-
unoptimized:
|
|
1233
|
+
unoptimized: _chunkHN7L6RRWjs.isRemoteImageSrc.call(void 0, post.coverImage)
|
|
1234
1234
|
}
|
|
1235
1235
|
),
|
|
1236
1236
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
|
|
1237
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1238
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1237
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.status"), value: statusLabel }),
|
|
1238
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.DetailField, { label: t("blog.fields.publishedAt"), value: formatDate(post.publishedAt) || "\u2014" }),
|
|
1239
1239
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1240
|
-
|
|
1240
|
+
_chunkR5722NLLjs.DetailField,
|
|
1241
1241
|
{
|
|
1242
1242
|
label: t("blog.fields.categories"),
|
|
1243
1243
|
value: post.categories.map((category) => categoryName(category.id)).filter(Boolean).join(", ") || "\u2014"
|
|
@@ -1249,16 +1249,16 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1249
1249
|
}
|
|
1250
1250
|
const isWorking = translation.aiStatus === "pending" || translation.aiStatus === "in_progress";
|
|
1251
1251
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-6 p-4", children: [
|
|
1252
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1252
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Alert, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.AlertDescription, { className: "flex flex-col gap-y-2", children: [
|
|
1253
1253
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
1254
|
-
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1254
|
+
translation.source === "manual" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: "softAmber", children: t("blog.translation.editedByHand") }),
|
|
1255
1255
|
original && translation.translatedAt && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.translatedFrom", {
|
|
1256
1256
|
language: languageName(original.language),
|
|
1257
1257
|
date: formatDate(translation.translatedAt)
|
|
1258
1258
|
}) })
|
|
1259
1259
|
] }),
|
|
1260
1260
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("blog.translation.overwriteWarning") }),
|
|
1261
|
-
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1261
|
+
original && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Button, { type: "button", size: "sm", variant: "ghost", onClick: () => setIsComparing((value) => !value), children: isComparing ? t("blog.actions.hideComparison") : t("blog.actions.compareWithOriginal") }) })
|
|
1262
1262
|
] }) }),
|
|
1263
1263
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between gap-x-4", children: [
|
|
1264
1264
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -1266,7 +1266,7 @@ function BlogPostTranslationPanel({ post, translation, onChanged }) {
|
|
|
1266
1266
|
{
|
|
1267
1267
|
aiStatus: translation.aiStatus,
|
|
1268
1268
|
onRetranslate: async () => {
|
|
1269
|
-
await
|
|
1269
|
+
await _chunkHN7L6RRWjs.BlogPostTranslationService.retranslate({ id: translation.id });
|
|
1270
1270
|
await reload();
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
@@ -1286,7 +1286,7 @@ function BlogPostContainer({ postId }) {
|
|
|
1286
1286
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogPostContainer, "BlogPostContainer");
|
|
1287
1287
|
function BlogPostShell() {
|
|
1288
1288
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1289
|
-
const generateUrl =
|
|
1289
|
+
const generateUrl = _chunkR5722NLLjs.usePageUrlGenerator.call(void 0, );
|
|
1290
1290
|
const languageName = useBlogLanguageName();
|
|
1291
1291
|
const { post, reload } = useBlogPost();
|
|
1292
1292
|
const translations = _react.useMemo.call(void 0, () => {
|
|
@@ -1299,7 +1299,7 @@ function BlogPostShell() {
|
|
|
1299
1299
|
if (!post) return null;
|
|
1300
1300
|
const title = _nullishCoalesce(_nullishCoalesce(_optionalChain([post, 'access', _44 => _44.original, 'optionalAccess', _45 => _45.title]), () => ( post.title)), () => ( ""));
|
|
1301
1301
|
const breadcrumbs = [
|
|
1302
|
-
{ name: t("blog.admin.title"), href: generateUrl({ page:
|
|
1302
|
+
{ name: t("blog.admin.title"), href: generateUrl({ page: _chunkP7L6OFX5js.Modules.BlogPost }) },
|
|
1303
1303
|
{ name: title }
|
|
1304
1304
|
];
|
|
1305
1305
|
const statusLabel = {
|
|
@@ -1316,7 +1316,7 @@ function BlogPostShell() {
|
|
|
1316
1316
|
return parts.join(" \xB7 ");
|
|
1317
1317
|
}, "tabLabel");
|
|
1318
1318
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1319
|
-
|
|
1319
|
+
_chunkR5722NLLjs.SharedProvider,
|
|
1320
1320
|
{
|
|
1321
1321
|
value: {
|
|
1322
1322
|
breadcrumbs,
|
|
@@ -1324,16 +1324,16 @@ function BlogPostShell() {
|
|
|
1324
1324
|
type: t("blog.admin.title"),
|
|
1325
1325
|
element: title,
|
|
1326
1326
|
functions: [
|
|
1327
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1327
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Badge, { variant: BLOG_STATUS_BADGE[post.status], children: statusLabel }, "blogPostStatus"),
|
|
1328
1328
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostPublishButton, {}, "blogPostPublish"),
|
|
1329
1329
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostDeleter, {}, "blogPostDeleter")
|
|
1330
1330
|
]
|
|
1331
1331
|
}
|
|
1332
1332
|
},
|
|
1333
1333
|
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1334
|
-
|
|
1334
|
+
_chunkR5722NLLjs.RoundPageContainer,
|
|
1335
1335
|
{
|
|
1336
|
-
module:
|
|
1336
|
+
module: _chunkP7L6OFX5js.Modules.BlogPost,
|
|
1337
1337
|
id: post.id,
|
|
1338
1338
|
forceHeader: true,
|
|
1339
1339
|
tabs: translations.map((translation) => ({
|
|
@@ -1395,10 +1395,10 @@ function BlogCategoryChips(props) {
|
|
|
1395
1395
|
];
|
|
1396
1396
|
const inactiveVariant = variant === "chips" ? "outline" : "ghost";
|
|
1397
1397
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { "aria-label": t("blog.entities.categories"), className, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "ul", { className: variant === "chips" ? "flex flex-wrap items-center gap-2" : "flex flex-col items-start gap-2", children: items.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1398
|
-
|
|
1398
|
+
_chunkR5722NLLjs.Badge,
|
|
1399
1399
|
{
|
|
1400
1400
|
variant: item.active ? "default" : inactiveVariant,
|
|
1401
|
-
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1401
|
+
render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Link, { href: item.href, "aria-current": item.active ? "page" : void 0 }),
|
|
1402
1402
|
children: item.label
|
|
1403
1403
|
}
|
|
1404
1404
|
) }, item.key)) }) });
|
|
@@ -1413,12 +1413,12 @@ function BlogListHeader(props) {
|
|
|
1413
1413
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1414
1414
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: align === "center" ? "text-center" : void 0, children: [
|
|
1415
1415
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1416
|
-
|
|
1416
|
+
_chunkR5722NLLjs.ContentTitle,
|
|
1417
1417
|
{
|
|
1418
1418
|
type: t("blog.public.eyebrow"),
|
|
1419
1419
|
element: t("blog.public.title"),
|
|
1420
1420
|
headingLevel: 1,
|
|
1421
|
-
className:
|
|
1421
|
+
className: _chunkHN7L6RRWjs.cn.call(void 0, "mb-0", align === "center" && "[&_div]:justify-center")
|
|
1422
1422
|
}
|
|
1423
1423
|
),
|
|
1424
1424
|
showSubtitle ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: t("blog.public.subtitle") }) : null
|
|
@@ -1427,18 +1427,18 @@ function BlogListHeader(props) {
|
|
|
1427
1427
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogListHeader, "BlogListHeader");
|
|
1428
1428
|
function BlogListEmpty(props) {
|
|
1429
1429
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1430
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className:
|
|
1430
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunkHN7L6RRWjs.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") });
|
|
1431
1431
|
}
|
|
1432
1432
|
_chunk7QVYU63Ejs.__name.call(void 0, BlogListEmpty, "BlogListEmpty");
|
|
1433
1433
|
function BlogLoadMore(props) {
|
|
1434
1434
|
const { basePath, page, activeCategorySlug, query, className } = props;
|
|
1435
1435
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1436
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1437
|
-
|
|
1436
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkHN7L6RRWjs.cn.call(void 0, "flex justify-center", className), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1437
|
+
_chunkR5722NLLjs.Link,
|
|
1438
1438
|
{
|
|
1439
1439
|
href: blogListHref(basePath, { category: activeCategorySlug, q: query, page: page + 1 }),
|
|
1440
1440
|
scroll: false,
|
|
1441
|
-
className:
|
|
1441
|
+
className: _chunkR5722NLLjs.buttonVariants.call(void 0, { variant: "outline" }),
|
|
1442
1442
|
children: t("blog.public.loadMore")
|
|
1443
1443
|
}
|
|
1444
1444
|
) });
|
|
@@ -1465,7 +1465,7 @@ function BlogPostMeta(props) {
|
|
|
1465
1465
|
parts.push(t("blog.public.updated", { date: format.dateTime(new Date(post.updatedAt), { dateStyle: "medium" }) }));
|
|
1466
1466
|
}
|
|
1467
1467
|
parts.push(t("blog.public.readingTime", { minutes: post.readingMinutes }));
|
|
1468
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className:
|
|
1468
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: _chunkHN7L6RRWjs.cn.call(void 0, "text-muted-foreground text-xs", className), children: parts.map((part, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
|
|
1469
1469
|
index > 0 ? " \xB7 " : null,
|
|
1470
1470
|
part
|
|
1471
1471
|
] }, index)) });
|
|
@@ -1476,7 +1476,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostMeta, "BlogPostMeta");
|
|
|
1476
1476
|
|
|
1477
1477
|
function BlogPostCover(props) {
|
|
1478
1478
|
const { src, alt, sizes, priority, className } = props;
|
|
1479
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className:
|
|
1479
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkHN7L6RRWjs.cn.call(void 0, "border-border bg-primary/10 relative overflow-hidden rounded-lg border", className), children: src ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1480
1480
|
_image2.default,
|
|
1481
1481
|
{
|
|
1482
1482
|
src,
|
|
@@ -1485,7 +1485,7 @@ function BlogPostCover(props) {
|
|
|
1485
1485
|
sizes,
|
|
1486
1486
|
priority,
|
|
1487
1487
|
className: "object-cover",
|
|
1488
|
-
unoptimized:
|
|
1488
|
+
unoptimized: _chunkHN7L6RRWjs.isRemoteImageSrc.call(void 0, src)
|
|
1489
1489
|
}
|
|
1490
1490
|
) : null });
|
|
1491
1491
|
}
|
|
@@ -1496,8 +1496,8 @@ function BlogPostCard(props) {
|
|
|
1496
1496
|
const isProminent = variant === "hero" || variant === "large";
|
|
1497
1497
|
const eyebrow = _optionalChain([category, 'optionalAccess', _46 => _46.name]);
|
|
1498
1498
|
const text = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col", children: [
|
|
1499
|
-
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1500
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1499
|
+
eyebrow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.MicroLabel, { as: "span", children: eyebrow }) : null,
|
|
1500
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.SectionHeader, { level: headingLevel === "h3" ? 3 : 2, className: "mt-1.5", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.Link, { href: blogPostHref(basePath, post.slug), className: "after:absolute after:inset-0", children: post.title }) }),
|
|
1501
1501
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-2 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1502
1502
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: isProminent, className: "mt-3" })
|
|
1503
1503
|
] });
|
|
@@ -1555,7 +1555,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostCard, "BlogPostCard");
|
|
|
1555
1555
|
function BlogSearchBox(props) {
|
|
1556
1556
|
const { basePath, query, activeCategorySlug, className } = props;
|
|
1557
1557
|
const t = _nextintl.useTranslations.call(void 0, );
|
|
1558
|
-
const router =
|
|
1558
|
+
const router = _chunkP7L6OFX5js.useI18nRouter.call(void 0, );
|
|
1559
1559
|
const [value, setValue] = _react.useState.call(void 0, _nullishCoalesce(query, () => ( "")));
|
|
1560
1560
|
_react.useEffect.call(void 0, () => setValue(_nullishCoalesce(query, () => ( ""))), [query]);
|
|
1561
1561
|
const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
|
|
@@ -1563,10 +1563,10 @@ function BlogSearchBox(props) {
|
|
|
1563
1563
|
const q = value.trim();
|
|
1564
1564
|
router.push(blogListHref(basePath, { category: activeCategorySlug, q: q || void 0 }));
|
|
1565
1565
|
}, "onSubmit");
|
|
1566
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1567
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1566
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "form", { role: "search", onSubmit, className, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.InputGroup, { children: [
|
|
1567
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.InputGroupAddon, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.SearchIcon, {}) }),
|
|
1568
1568
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1569
|
-
|
|
1569
|
+
_chunkR5722NLLjs.InputGroupInput,
|
|
1570
1570
|
{
|
|
1571
1571
|
type: "search",
|
|
1572
1572
|
name: "q",
|
|
@@ -1678,7 +1678,7 @@ function BlogListRail(props) {
|
|
|
1678
1678
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogListHeader, { showSubtitle: false }),
|
|
1679
1679
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogSearchBox, { basePath, query, activeCategorySlug }),
|
|
1680
1680
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
|
|
1681
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1681
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.MicroLabel, { as: "span", className: "block", children: t("blog.entities.categories") }),
|
|
1682
1682
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1683
1683
|
BlogCategoryChips,
|
|
1684
1684
|
{
|
|
@@ -1736,12 +1736,12 @@ function BlogPostView(props) {
|
|
|
1736
1736
|
const more = related.slice(0, 3);
|
|
1737
1737
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "article", { className: "px-4 pt-12 pb-20 md:pt-16", children: [
|
|
1738
1738
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mx-auto max-w-3xl", children: [
|
|
1739
|
-
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
1739
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkR5722NLLjs.Link, { href: basePath, className: "inline-flex items-center gap-1.5", children: [
|
|
1740
1740
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArrowLeftIcon, { className: "size-4 rtl:rotate-180" }),
|
|
1741
1741
|
t("blog.public.back")
|
|
1742
1742
|
] }),
|
|
1743
1743
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "header", { className: "mt-8", children: [
|
|
1744
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1744
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.ContentTitle, { type: _optionalChain([category, 'optionalAccess', _47 => _47.name]), element: post.title, headingLevel: 1, className: "mb-0" }),
|
|
1745
1745
|
post.summary ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mt-3 text-sm leading-relaxed", children: post.summary }) : null,
|
|
1746
1746
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlogPostMeta, { post, showAuthor: true, className: "mt-4" })
|
|
1747
1747
|
] }),
|
|
@@ -1755,10 +1755,10 @@ function BlogPostView(props) {
|
|
|
1755
1755
|
className: "mt-8 aspect-[16/9]"
|
|
1756
1756
|
}
|
|
1757
1757
|
) : null,
|
|
1758
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1758
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-8", children: _nullishCoalesce(body, () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.BlockNoteEditorContainer, { id: post.id, type: "blog-post", initialContent: post.body }))) })
|
|
1759
1759
|
] }),
|
|
1760
1760
|
more.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "mx-auto mt-16 max-w-5xl", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border-border border-t pt-10", children: [
|
|
1761
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1761
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkR5722NLLjs.SectionHeader, { level: 2, children: t("blog.public.moreIn", { category: _nullishCoalesce(_optionalChain([category, 'optionalAccess', _48 => _48.name]), () => ( "")) }) }),
|
|
1762
1762
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mt-6 grid gap-x-6 gap-y-10 sm:grid-cols-2 lg:grid-cols-3", children: more.map((relatedPost) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
1763
1763
|
BlogPostCard,
|
|
1764
1764
|
{
|
|
@@ -1811,5 +1811,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlogPostView, "BlogPostView");
|
|
|
1811
1811
|
|
|
1812
1812
|
|
|
1813
1813
|
|
|
1814
|
-
exports.BLOG_ACTION =
|
|
1814
|
+
exports.BLOG_ACTION = _chunkHN7L6RRWjs.BLOG_ACTION; exports.BLOG_CATEGORY_UPLOAD_PREFIX = _chunkHN7L6RRWjs.BLOG_CATEGORY_UPLOAD_PREFIX; exports.BLOG_LIST_LAYOUTS = _chunkHN7L6RRWjs.BLOG_LIST_LAYOUTS; exports.BLOG_MODULE_ID = _chunkHN7L6RRWjs.BLOG_MODULE_ID; exports.BLOG_POST_STATUSES = _chunkHN7L6RRWjs.BLOG_POST_STATUSES; exports.BLOG_POST_UPLOAD_PREFIX = _chunkHN7L6RRWjs.BLOG_POST_UPLOAD_PREFIX; exports.BLOG_PUBLIC_PREFIX = _chunkHN7L6RRWjs.BLOG_PUBLIC_PREFIX; exports.BLOG_SETTINGS_ID = _chunkHN7L6RRWjs.BLOG_SETTINGS_ID; exports.BLOG_STATUS_BADGE = BLOG_STATUS_BADGE; exports.BLOG_TRANSLATION_SOURCES = _chunkHN7L6RRWjs.BLOG_TRANSLATION_SOURCES; exports.BLOG_UPLOAD_ROOT = _chunkHN7L6RRWjs.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;
|
|
1815
1815
|
//# sourceMappingURL=index.js.map
|