@openrails/contentkit-ui 0.79.0 → 0.81.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/README.md +82 -54
- package/dist/client/beacons.d.ts +53 -0
- package/dist/client/beacons.js +72 -0
- package/dist/client/beacons.js.map +1 -0
- package/dist/client/catalog.d.ts +2 -2
- package/dist/client/catalog.js +1 -1
- package/dist/client/catalog.js.map +1 -1
- package/dist/client/client.d.ts +24 -11
- package/dist/client/client.js +37 -29
- package/dist/client/client.js.map +1 -1
- package/dist/client/content/comments.d.ts +12 -8
- package/dist/client/content/comments.js +33 -20
- package/dist/client/content/comments.js.map +1 -1
- package/dist/client/content/favorites.d.ts +24 -9
- package/dist/client/content/favorites.js +21 -22
- package/dist/client/content/favorites.js.map +1 -1
- package/dist/client/content/moderation.d.ts +1 -1
- package/dist/client/content/moderation.js.map +1 -1
- package/dist/client/content/reactions.d.ts +11 -6
- package/dist/client/content/reactions.js +23 -18
- package/dist/client/content/reactions.js.map +1 -1
- package/dist/client/content/types.d.ts +40 -21
- package/dist/client/content/types.js +5 -2
- package/dist/client/content/types.js.map +1 -1
- package/dist/client/contents.d.ts +55 -0
- package/dist/client/contents.js +144 -0
- package/dist/client/contents.js.map +1 -0
- package/dist/client/discovery.d.ts +126 -0
- package/dist/client/discovery.js +125 -0
- package/dist/client/discovery.js.map +1 -0
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/error-codes.js +12 -0
- package/dist/client/generated/error-codes.js.map +1 -1
- package/dist/client/generated/routes.d.ts +1244 -370
- package/dist/client/generated/routes.js +1870 -554
- package/dist/client/generated/routes.js.map +1 -1
- package/dist/client/generated/wire.d.ts +960 -134
- package/dist/client/generated/wire.js.map +1 -1
- package/dist/client/group-fields.d.ts +25 -0
- package/dist/client/group-fields.js +63 -0
- package/dist/client/group-fields.js.map +1 -0
- package/dist/client/groups.d.ts +58 -0
- package/dist/client/groups.js +119 -0
- package/dist/client/groups.js.map +1 -0
- package/dist/client/http.d.ts +24 -12
- package/dist/client/http.js +20 -24
- package/dist/client/http.js.map +1 -1
- package/dist/client/index.d.ts +11 -6
- package/dist/client/media/api.d.ts +1 -1
- package/dist/client/media/api.js +4 -2
- package/dist/client/media/api.js.map +1 -1
- package/dist/client/media/client.d.ts +8 -9
- package/dist/client/media/client.js +58 -71
- package/dist/client/media/client.js.map +1 -1
- package/dist/client/media/ref.d.ts +30 -0
- package/dist/client/media/ref.js +10 -3
- package/dist/client/media/ref.js.map +1 -1
- package/dist/client/offers.d.ts +41 -0
- package/dist/client/offers.js +66 -0
- package/dist/client/offers.js.map +1 -0
- package/dist/client/route.d.ts +2 -0
- package/dist/client/route.js +2 -1
- package/dist/client/route.js.map +1 -1
- package/dist/client/versions.d.ts +20 -0
- package/dist/client/versions.js +53 -0
- package/dist/client/versions.js.map +1 -0
- package/dist/client.js +35 -30
- package/dist/components/admin/content-manager.d.ts +80 -0
- package/dist/components/admin/content-manager.js +591 -0
- package/dist/components/admin/content-manager.js.map +1 -0
- package/dist/components/admin/group-manager.d.ts +24 -0
- package/dist/components/admin/group-manager.js +244 -0
- package/dist/components/admin/group-manager.js.map +1 -0
- package/dist/components/admin/media-item-panel.js +1 -1
- package/dist/components/admin/media-item-panel.js.map +1 -1
- package/dist/components/content/card.d.ts +44 -0
- package/dist/components/content/card.js +285 -0
- package/dist/components/content/card.js.map +1 -0
- package/dist/components/content/editors.d.ts +40 -0
- package/dist/components/content/editors.js +764 -0
- package/dist/components/content/editors.js.map +1 -0
- package/dist/components/content/filters.d.ts +28 -0
- package/dist/components/content/filters.js +134 -0
- package/dist/components/content/filters.js.map +1 -0
- package/dist/components/content/grid.d.ts +62 -0
- package/dist/components/content/grid.js +233 -0
- package/dist/components/content/grid.js.map +1 -0
- package/dist/components/content/index.d.ts +8 -0
- package/dist/components/content/listing.d.ts +20 -0
- package/dist/components/content/listing.js +150 -0
- package/dist/components/content/listing.js.map +1 -0
- package/dist/components/content/offer-fields.d.ts +8 -0
- package/dist/components/content/offer-fields.js +127 -0
- package/dist/components/content/offer-fields.js.map +1 -0
- package/dist/components/content/paywall.d.ts +53 -0
- package/dist/components/content/paywall.js +221 -0
- package/dist/components/content/paywall.js.map +1 -0
- package/dist/components/content/search.d.ts +27 -0
- package/dist/components/content/search.js +164 -0
- package/dist/components/content/search.js.map +1 -0
- package/dist/components/groups/banner.d.ts +51 -0
- package/dist/components/groups/banner.js +194 -0
- package/dist/components/groups/banner.js.map +1 -0
- package/dist/components/groups/directory.d.ts +37 -0
- package/dist/components/groups/directory.js +117 -0
- package/dist/components/groups/directory.js.map +1 -0
- package/dist/components/groups/editor.d.ts +44 -0
- package/dist/components/groups/editor.js +860 -0
- package/dist/components/groups/editor.js.map +1 -0
- package/dist/components/groups/fields.d.ts +13 -0
- package/dist/components/groups/fields.js +68 -0
- package/dist/components/groups/fields.js.map +1 -0
- package/dist/components/groups/header.d.ts +25 -0
- package/dist/components/groups/header.js +131 -0
- package/dist/components/groups/header.js.map +1 -0
- package/dist/components/groups/index.d.ts +6 -0
- package/dist/components/groups/memberships.d.ts +55 -0
- package/dist/components/groups/memberships.js +527 -0
- package/dist/components/groups/memberships.js.map +1 -0
- package/dist/components/groups/parts.d.ts +49 -0
- package/dist/components/groups/parts.js +172 -0
- package/dist/components/groups/parts.js.map +1 -0
- package/dist/components/media-folder-editor.js +153 -152
- package/dist/components/media-folder-editor.js.map +1 -1
- package/dist/components/social/comments.d.ts +7 -5
- package/dist/components/social/comments.js +6 -2
- package/dist/components/social/comments.js.map +1 -1
- package/dist/components/social/engagement.d.ts +4 -3
- package/dist/components/social/engagement.js.map +1 -1
- package/dist/components/social/moderation.d.ts +1 -1
- package/dist/components/social/moderation.js +3 -3
- package/dist/components/social/moderation.js.map +1 -1
- package/dist/editor/rich-text-editor.d.ts +4 -4
- package/dist/editor/rich-text-editor.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +23 -9
- package/dist/locales/admin/de.js +5 -66
- package/dist/locales/admin/de.js.map +1 -1
- package/dist/locales/admin/en.d.ts +5 -66
- package/dist/locales/admin/en.js +19 -80
- package/dist/locales/admin/en.js.map +1 -1
- package/dist/locales/admin/es.js +5 -66
- package/dist/locales/admin/es.js.map +1 -1
- package/dist/locales/admin/ja.js +5 -66
- package/dist/locales/admin/ja.js.map +1 -1
- package/dist/locales/admin/ko.js +5 -66
- package/dist/locales/admin/ko.js.map +1 -1
- package/dist/locales/admin/zh.js +5 -66
- package/dist/locales/admin/zh.js.map +1 -1
- package/dist/locales/content/de.d.ts +2 -0
- package/dist/locales/content/de.js +98 -0
- package/dist/locales/content/de.js.map +1 -0
- package/dist/locales/content/en.d.ts +93 -0
- package/dist/locales/content/en.js +98 -0
- package/dist/locales/content/en.js.map +1 -0
- package/dist/locales/content/es.d.ts +2 -0
- package/dist/locales/content/es.js +98 -0
- package/dist/locales/content/es.js.map +1 -0
- package/dist/locales/content/ja.d.ts +2 -0
- package/dist/locales/content/ja.js +98 -0
- package/dist/locales/content/ja.js.map +1 -0
- package/dist/locales/content/ko.d.ts +2 -0
- package/dist/locales/content/ko.js +98 -0
- package/dist/locales/content/ko.js.map +1 -0
- package/dist/locales/content/zh.d.ts +2 -0
- package/dist/locales/content/zh.js +98 -0
- package/dist/locales/content/zh.js.map +1 -0
- package/dist/locales/de.js +11 -2
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/discovery/de.d.ts +2 -0
- package/dist/locales/discovery/de.js +68 -0
- package/dist/locales/discovery/de.js.map +1 -0
- package/dist/locales/discovery/en.d.ts +63 -0
- package/dist/locales/discovery/en.js +68 -0
- package/dist/locales/discovery/en.js.map +1 -0
- package/dist/locales/discovery/es.d.ts +2 -0
- package/dist/locales/discovery/es.js +68 -0
- package/dist/locales/discovery/es.js.map +1 -0
- package/dist/locales/discovery/ja.d.ts +2 -0
- package/dist/locales/discovery/ja.js +68 -0
- package/dist/locales/discovery/ja.js.map +1 -0
- package/dist/locales/discovery/ko.d.ts +2 -0
- package/dist/locales/discovery/ko.js +68 -0
- package/dist/locales/discovery/ko.js.map +1 -0
- package/dist/locales/discovery/zh.d.ts +2 -0
- package/dist/locales/discovery/zh.js +68 -0
- package/dist/locales/discovery/zh.js.map +1 -0
- package/dist/locales/en.d.ts +288 -67
- package/dist/locales/en.js +11 -2
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +11 -2
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/groups/de.d.ts +2 -0
- package/dist/locales/groups/de.js +133 -0
- package/dist/locales/groups/de.js.map +1 -0
- package/dist/locales/groups/en.d.ts +128 -0
- package/dist/locales/groups/en.js +133 -0
- package/dist/locales/groups/en.js.map +1 -0
- package/dist/locales/groups/es.d.ts +2 -0
- package/dist/locales/groups/es.js +133 -0
- package/dist/locales/groups/es.js.map +1 -0
- package/dist/locales/groups/ja.d.ts +2 -0
- package/dist/locales/groups/ja.js +133 -0
- package/dist/locales/groups/ja.js.map +1 -0
- package/dist/locales/groups/ko.d.ts +2 -0
- package/dist/locales/groups/ko.js +133 -0
- package/dist/locales/groups/ko.js.map +1 -0
- package/dist/locales/groups/zh.d.ts +2 -0
- package/dist/locales/groups/zh.js +133 -0
- package/dist/locales/groups/zh.js.map +1 -0
- package/dist/locales/ja.js +11 -2
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +11 -2
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/social/de.js +2 -1
- package/dist/locales/social/de.js.map +1 -1
- package/dist/locales/social/en.d.ts +2 -1
- package/dist/locales/social/en.js +2 -1
- package/dist/locales/social/en.js.map +1 -1
- package/dist/locales/social/es.js +2 -1
- package/dist/locales/social/es.js.map +1 -1
- package/dist/locales/social/ja.js +2 -1
- package/dist/locales/social/ja.js.map +1 -1
- package/dist/locales/social/ko.js +2 -1
- package/dist/locales/social/ko.js.map +1 -1
- package/dist/locales/social/zh.js +2 -1
- package/dist/locales/social/zh.js.map +1 -1
- package/dist/locales/zh.js +11 -2
- package/dist/locales/zh.js.map +1 -1
- package/dist/react/admin.d.ts +1 -1
- package/dist/react/admin.js +8 -6
- package/dist/react/admin.js.map +1 -1
- package/dist/react/comments.d.ts +9 -7
- package/dist/react/comments.js +42 -27
- package/dist/react/comments.js.map +1 -1
- package/dist/react/contents.d.ts +57 -0
- package/dist/react/contents.js +214 -0
- package/dist/react/contents.js.map +1 -0
- package/dist/react/context.d.ts +1 -1
- package/dist/react/context.js.map +1 -1
- package/dist/react/crop.js +45 -44
- package/dist/react/crop.js.map +1 -1
- package/dist/react/detail.d.ts +30 -0
- package/dist/react/detail.js +42 -0
- package/dist/react/detail.js.map +1 -0
- package/dist/react/discovery.d.ts +138 -0
- package/dist/react/discovery.js +299 -0
- package/dist/react/discovery.js.map +1 -0
- package/dist/react/engagement.d.ts +5 -5
- package/dist/react/engagement.js +55 -41
- package/dist/react/engagement.js.map +1 -1
- package/dist/react/folder.js +54 -53
- package/dist/react/folder.js.map +1 -1
- package/dist/react/groups.d.ts +115 -0
- package/dist/react/groups.js +229 -0
- package/dist/react/groups.js.map +1 -0
- package/dist/react/index.d.ts +5 -1
- package/dist/react/public.d.ts +6 -5
- package/dist/react/public.js +19 -22
- package/dist/react/public.js.map +1 -1
- package/dist/react/read.js +105 -106
- package/dist/react/read.js.map +1 -1
- package/dist/react/resources.d.ts +2 -2
- package/dist/react/resources.js +69 -40
- package/dist/react/resources.js.map +1 -1
- package/dist/react/store.js +41 -39
- package/dist/react/store.js.map +1 -1
- package/dist/react/upload.js +54 -53
- package/dist/react/upload.js.map +1 -1
- package/dist/react/use-resource.d.ts +2 -1
- package/dist/react/use-resource.js +1 -0
- package/dist/react/use-resource.js.map +1 -1
- package/dist/react/versions.d.ts +57 -0
- package/dist/react/versions.js +94 -0
- package/dist/react/versions.js.map +1 -0
- package/dist/react/video.js +87 -86
- package/dist/react/video.js.map +1 -1
- package/dist/react.js +9 -5
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/client/content/posts.d.ts +0 -52
- package/dist/client/content/posts.js +0 -84
- package/dist/client/content/posts.js.map +0 -1
- package/dist/client/taxonomy.d.ts +0 -34
- package/dist/client/taxonomy.js +0 -84
- package/dist/client/taxonomy.js.map +0 -1
- package/dist/components/admin/post-manager.d.ts +0 -45
- package/dist/components/admin/post-manager.js +0 -602
- package/dist/components/admin/post-manager.js.map +0 -1
- package/dist/components/admin/taxonomy-manager.d.ts +0 -54
- package/dist/components/admin/taxonomy-manager.js +0 -976
- package/dist/components/admin/taxonomy-manager.js.map +0 -1
- package/dist/react/posts.d.ts +0 -61
- package/dist/react/posts.js +0 -183
- package/dist/react/posts.js.map +0 -1
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
import { toContentKitError as e } from "../../client/errors.js";
|
|
2
|
+
import { useMessages as t } from "../../i18n/context.js";
|
|
3
|
+
import { useContentKitClient as n, useErrorReporter as r } from "../../react/context.js";
|
|
4
|
+
import { Alert as i, AlertDescription as a } from "../../ui/alert.js";
|
|
5
|
+
import { Button as o, buttonVariants as s } from "../../ui/button.js";
|
|
6
|
+
import { keyOf as c, useContentScope as l, usePaged as ee } from "../../react/use-resource.js";
|
|
7
|
+
import { Badge as te } from "../../ui/badge.js";
|
|
8
|
+
import { Input as u } from "../../ui/input.js";
|
|
9
|
+
import { Label as d } from "../../ui/label.js";
|
|
10
|
+
import { Select as ne, SelectContent as re, SelectItem as f, SelectTrigger as ie, SelectValue as ae } from "../../ui/select.js";
|
|
11
|
+
import { Skeleton as p } from "../../ui/skeleton.js";
|
|
12
|
+
import { Textarea as m } from "../../ui/textarea.js";
|
|
13
|
+
import { ErrorLine as h, RelativeTime as g, contentError as _, formatDate as oe, useAction as se } from "../social/parts.js";
|
|
14
|
+
import { AdminRoot as v, LoadFailed as ce, NoAccess as y, Pager as le, Rows as b, pageOf as x, useConfirm as ue } from "./shell.js";
|
|
15
|
+
import { localInput as de } from "../social/bans.js";
|
|
16
|
+
import { imageRefs as S } from "../../client/contents.js";
|
|
17
|
+
import { useAdminLocation as C, useFlowClient as w, useStaffAccess as T } from "../../react/admin.js";
|
|
18
|
+
import { ContentSections as E } from "../content/editors.js";
|
|
19
|
+
import { useContent as D } from "../../react/contents.js";
|
|
20
|
+
import { useEffect as O, useId as k, useMemo as A, useRef as j, useState as M } from "react";
|
|
21
|
+
import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
22
|
+
//#region src/components/admin/content-manager.tsx
|
|
23
|
+
function I(e = {}) {
|
|
24
|
+
return T(["contents"], e);
|
|
25
|
+
}
|
|
26
|
+
function L(e) {
|
|
27
|
+
return e.moderation === "rejected" ? "rejected" : e.moderation === "held" ? "held" : e.state === "draft" ? "draft" : e.live ? "published" : "scheduled";
|
|
28
|
+
}
|
|
29
|
+
var fe = (e) => (e ?? []).map((e) => typeof e == "string" ? {
|
|
30
|
+
value: e,
|
|
31
|
+
label: e
|
|
32
|
+
} : e), R = {
|
|
33
|
+
published: "default",
|
|
34
|
+
scheduled: "secondary",
|
|
35
|
+
draft: "outline",
|
|
36
|
+
held: "secondary",
|
|
37
|
+
rejected: "destructive"
|
|
38
|
+
}, z = [
|
|
39
|
+
"draft",
|
|
40
|
+
"scheduled",
|
|
41
|
+
"published"
|
|
42
|
+
];
|
|
43
|
+
function B({ client: e, baseUrl: t, auth: n, guard: r, appearance: i, className: a, language: o, messages: s, ...c }) {
|
|
44
|
+
let l = w({
|
|
45
|
+
client: e,
|
|
46
|
+
baseUrl: t,
|
|
47
|
+
auth: n
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ P(v, {
|
|
50
|
+
flow: "content-manager",
|
|
51
|
+
appearance: i,
|
|
52
|
+
className: a,
|
|
53
|
+
language: o,
|
|
54
|
+
messages: s,
|
|
55
|
+
guard: r,
|
|
56
|
+
children: /* @__PURE__ */ P(V, {
|
|
57
|
+
...c,
|
|
58
|
+
client: l
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function V({ basePath: e, navigation: n, ...r }) {
|
|
63
|
+
let { t: i } = t(), a = C(e, n), s = I({ client: r.client });
|
|
64
|
+
return s.loading ? /* @__PURE__ */ P(b, {}) : s.allowed.contents ? a.view ? /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(o, {
|
|
65
|
+
variant: "ghost",
|
|
66
|
+
size: "sm",
|
|
67
|
+
className: "justify-self-start",
|
|
68
|
+
onClick: () => a.go(""),
|
|
69
|
+
children: i("contentManager.back")
|
|
70
|
+
}), /* @__PURE__ */ P(W, {
|
|
71
|
+
...r,
|
|
72
|
+
id: a.view === "new" ? null : a.view,
|
|
73
|
+
onCreated: (e) => a.go(e.id, void 0, { replace: !0 }),
|
|
74
|
+
onDeleted: () => a.go("", void 0, { replace: !0 })
|
|
75
|
+
}, a.view)] }) : /* @__PURE__ */ P(H, {
|
|
76
|
+
...r,
|
|
77
|
+
loc: a
|
|
78
|
+
}) : /* @__PURE__ */ P(y, { children: i("contentManager.noAccess") });
|
|
79
|
+
}
|
|
80
|
+
function H({ loc: e, client: n, kind: r, languages: i, contentHref: a, pageSize: p = 20, onError: m }) {
|
|
81
|
+
let _ = t(), { t: v } = _, y = k(), de = fe(i)[0]?.value, S = e.query.get("q") ?? "", C = z.find((t) => t === e.query.get("status")) ?? "", w = e.query.get("deleted") === "1", T = x(e.query), E = {
|
|
82
|
+
q: S,
|
|
83
|
+
status: C,
|
|
84
|
+
deleted: w ? "1" : void 0
|
|
85
|
+
}, D = (t) => e.go("", {
|
|
86
|
+
...E,
|
|
87
|
+
...t
|
|
88
|
+
}), [A, j] = M(S);
|
|
89
|
+
O(() => j(S), [S]);
|
|
90
|
+
let { store: I, scope: B } = l(n), V = w ? "deleted" : C || void 0, H = ee(I, c("contents-page", B, r, S, V, p), {
|
|
91
|
+
type: "contents",
|
|
92
|
+
scope: w ? "deleted" : void 0
|
|
93
|
+
}, T, p, (e, t) => n.contents.manage({
|
|
94
|
+
...e,
|
|
95
|
+
kind: r,
|
|
96
|
+
q: S || void 0,
|
|
97
|
+
state: V,
|
|
98
|
+
language: de
|
|
99
|
+
}, t)), U = se("content.save", m), { confirm: W, dialog: pe } = ue(), G = async (e) => {
|
|
100
|
+
await W({
|
|
101
|
+
title: v("contentManager.deleteTitle", { title: e.title }),
|
|
102
|
+
description: v("contentManager.deleteBody"),
|
|
103
|
+
confirm: v("contentManager.delete")
|
|
104
|
+
}) && await U.run(() => n.contents.remove(e.id));
|
|
105
|
+
};
|
|
106
|
+
return /* @__PURE__ */ F("div", {
|
|
107
|
+
className: "grid gap-4",
|
|
108
|
+
children: [
|
|
109
|
+
/* @__PURE__ */ F("div", {
|
|
110
|
+
className: "flex flex-wrap items-center justify-between gap-2",
|
|
111
|
+
children: [/* @__PURE__ */ P("h2", {
|
|
112
|
+
className: "text-base font-semibold",
|
|
113
|
+
children: v("contentManager.title")
|
|
114
|
+
}), /* @__PURE__ */ P(o, {
|
|
115
|
+
size: "sm",
|
|
116
|
+
onClick: () => e.go("new"),
|
|
117
|
+
children: v("contentManager.new")
|
|
118
|
+
})]
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ F("div", {
|
|
121
|
+
className: "flex gap-2",
|
|
122
|
+
role: "group",
|
|
123
|
+
"aria-label": v("contentManager.title"),
|
|
124
|
+
children: [/* @__PURE__ */ P(o, {
|
|
125
|
+
size: "sm",
|
|
126
|
+
variant: w ? "outline" : "default",
|
|
127
|
+
"aria-pressed": !w,
|
|
128
|
+
onClick: () => e.go("", { q: S }),
|
|
129
|
+
children: v("contentManager.items")
|
|
130
|
+
}), /* @__PURE__ */ P(o, {
|
|
131
|
+
size: "sm",
|
|
132
|
+
variant: w ? "default" : "outline",
|
|
133
|
+
"aria-pressed": w,
|
|
134
|
+
onClick: () => e.go("", {
|
|
135
|
+
q: S,
|
|
136
|
+
deleted: "1"
|
|
137
|
+
}),
|
|
138
|
+
children: v("contentManager.deleted")
|
|
139
|
+
})]
|
|
140
|
+
}),
|
|
141
|
+
/* @__PURE__ */ F("div", {
|
|
142
|
+
className: "grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto]",
|
|
143
|
+
children: [/* @__PURE__ */ F("form", {
|
|
144
|
+
className: "flex gap-2",
|
|
145
|
+
role: "search",
|
|
146
|
+
onSubmit: (e) => {
|
|
147
|
+
e.preventDefault(), D({ q: A.trim() });
|
|
148
|
+
},
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ P(d, {
|
|
151
|
+
htmlFor: `${y}-q`,
|
|
152
|
+
className: "sr-only",
|
|
153
|
+
children: v("contentManager.search")
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ P(u, {
|
|
156
|
+
id: `${y}-q`,
|
|
157
|
+
className: "h-8",
|
|
158
|
+
type: "search",
|
|
159
|
+
value: A,
|
|
160
|
+
placeholder: v("contentManager.search"),
|
|
161
|
+
onChange: (e) => j(e.target.value)
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ P(o, {
|
|
164
|
+
type: "submit",
|
|
165
|
+
size: "sm",
|
|
166
|
+
variant: "outline",
|
|
167
|
+
children: v("moderation.filter")
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
}), !w && /* @__PURE__ */ F(ne, {
|
|
171
|
+
value: C,
|
|
172
|
+
onValueChange: (e) => D({ status: String(e ?? "") }),
|
|
173
|
+
children: [/* @__PURE__ */ P(ie, {
|
|
174
|
+
size: "sm",
|
|
175
|
+
"aria-label": v("contentManager.status"),
|
|
176
|
+
children: /* @__PURE__ */ P(ae, { children: (e) => v(e ? `contentManager.${e}` : "contentManager.allStatuses") })
|
|
177
|
+
}), /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(f, {
|
|
178
|
+
value: "",
|
|
179
|
+
children: v("contentManager.allStatuses")
|
|
180
|
+
}), z.map((e) => /* @__PURE__ */ P(f, {
|
|
181
|
+
value: e,
|
|
182
|
+
children: v(`contentManager.${e}`)
|
|
183
|
+
}, e))] })]
|
|
184
|
+
})]
|
|
185
|
+
}),
|
|
186
|
+
/* @__PURE__ */ P(h, { error: U.error }),
|
|
187
|
+
H.loading && !H.items.length ? /* @__PURE__ */ P(b, {}) : H.error && !H.items.length ? /* @__PURE__ */ P(ce, {
|
|
188
|
+
error: H.error,
|
|
189
|
+
message: v("contentManager.loadFailed"),
|
|
190
|
+
retry: H.reload
|
|
191
|
+
}) : H.items.length ? /* @__PURE__ */ P("ul", {
|
|
192
|
+
className: "grid divide-y divide-border rounded-lg border border-border",
|
|
193
|
+
"aria-busy": H.loading,
|
|
194
|
+
children: H.items.map((t) => {
|
|
195
|
+
let r = L(t), i = r === "published" ? a?.(t) : void 0;
|
|
196
|
+
return /* @__PURE__ */ F("li", {
|
|
197
|
+
className: "flex flex-wrap items-start gap-3 p-3",
|
|
198
|
+
"data-ckui": "content-row",
|
|
199
|
+
"data-status": w ? "deleted" : r,
|
|
200
|
+
children: [/* @__PURE__ */ F("div", {
|
|
201
|
+
className: "grid min-w-0 flex-1 gap-1",
|
|
202
|
+
children: [w ? /* @__PURE__ */ P("span", {
|
|
203
|
+
className: "font-medium break-words",
|
|
204
|
+
children: t.title
|
|
205
|
+
}) : /* @__PURE__ */ P("button", {
|
|
206
|
+
type: "button",
|
|
207
|
+
className: "text-left font-medium break-words hover:underline",
|
|
208
|
+
onClick: () => e.go(t.id),
|
|
209
|
+
children: t.title
|
|
210
|
+
}), /* @__PURE__ */ F("div", {
|
|
211
|
+
className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground",
|
|
212
|
+
children: [
|
|
213
|
+
!w && /* @__PURE__ */ P(te, {
|
|
214
|
+
variant: R[r],
|
|
215
|
+
children: v(`contentManager.${r}`)
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ P("span", { children: t.language }),
|
|
218
|
+
/* @__PURE__ */ P(g, { at: w && t.deleted_at ? t.deleted_at : t.updated_at }),
|
|
219
|
+
r === "scheduled" && t.publish_at && /* @__PURE__ */ P("span", { children: v("pollManager.goesLive", { date: oe(_, t.publish_at) }) })
|
|
220
|
+
]
|
|
221
|
+
})]
|
|
222
|
+
}), /* @__PURE__ */ P("div", {
|
|
223
|
+
className: "flex flex-wrap gap-2",
|
|
224
|
+
children: w ? /* @__PURE__ */ P(o, {
|
|
225
|
+
size: "sm",
|
|
226
|
+
variant: "outline",
|
|
227
|
+
disabled: U.pending,
|
|
228
|
+
onClick: () => void U.run(() => n.contents.restore(t.id)),
|
|
229
|
+
children: v("moderation.restore")
|
|
230
|
+
}) : /* @__PURE__ */ F(N, { children: [
|
|
231
|
+
i && /* @__PURE__ */ P("a", {
|
|
232
|
+
className: s({
|
|
233
|
+
size: "sm",
|
|
234
|
+
variant: "ghost"
|
|
235
|
+
}),
|
|
236
|
+
href: i,
|
|
237
|
+
children: v("contentManager.view")
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ P(o, {
|
|
240
|
+
size: "sm",
|
|
241
|
+
variant: "outline",
|
|
242
|
+
onClick: () => e.go(t.id),
|
|
243
|
+
children: v("comments.edit")
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ P(o, {
|
|
246
|
+
size: "sm",
|
|
247
|
+
variant: "destructive",
|
|
248
|
+
disabled: U.pending,
|
|
249
|
+
onClick: () => void G(t),
|
|
250
|
+
children: v("comments.delete")
|
|
251
|
+
})
|
|
252
|
+
] })
|
|
253
|
+
})]
|
|
254
|
+
}, t.id);
|
|
255
|
+
})
|
|
256
|
+
}) : /* @__PURE__ */ P("p", {
|
|
257
|
+
className: "text-muted-foreground",
|
|
258
|
+
children: v(w ? "contentManager.noDeleted" : "contentManager.empty")
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ P(le, {
|
|
261
|
+
page: T,
|
|
262
|
+
hasNext: H.hasNext,
|
|
263
|
+
disabled: H.loading,
|
|
264
|
+
onPage: (t) => e.go("", {
|
|
265
|
+
...E,
|
|
266
|
+
page: t > 1 ? t : void 0
|
|
267
|
+
})
|
|
268
|
+
}),
|
|
269
|
+
pe
|
|
270
|
+
]
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
var U = {
|
|
274
|
+
title: "",
|
|
275
|
+
slug: "",
|
|
276
|
+
description: "",
|
|
277
|
+
publishAt: "",
|
|
278
|
+
body: ""
|
|
279
|
+
};
|
|
280
|
+
function W({ id: s, client: c, kind: l, languages: ee, renderEditor: g, contentHref: oe, labels: se, ownerGroup: v, onCreated: y, onDeleted: le, onError: b }) {
|
|
281
|
+
let x = n(c), C = t(), { t: w } = C, T = k(), j = fe(ee), [I, z] = M(j[0]?.value ?? "en"), B = D(s, l, I, { client: x }), V = r(b), [H, W] = M(s ? null : U), [G, K] = M(null), [me, q] = M(null), { confirm: he, dialog: ge } = ue(), J = B.content;
|
|
282
|
+
O(() => {
|
|
283
|
+
if (!J) return;
|
|
284
|
+
let e = J.text?.[I];
|
|
285
|
+
W((t) => t ?? {
|
|
286
|
+
title: e?.title ?? "",
|
|
287
|
+
slug: e?.slug ?? "",
|
|
288
|
+
description: e?.description ?? "",
|
|
289
|
+
body: e?.body ?? "",
|
|
290
|
+
publishAt: J.publish_at && !J.live ? de(new Date(J.publish_at)) : ""
|
|
291
|
+
});
|
|
292
|
+
}, [J, I]);
|
|
293
|
+
let { imageSrc: _e } = B, ve = A(() => (H?.body ?? "").replace(S(), (e, t) => {
|
|
294
|
+
let n = _e(t);
|
|
295
|
+
return n && n !== t ? n.replaceAll("&", "&") : e;
|
|
296
|
+
}), [H?.body, _e]);
|
|
297
|
+
if (s && !H) return B.error ? /* @__PURE__ */ P(ce, {
|
|
298
|
+
error: B.error,
|
|
299
|
+
message: w("contentManager.loadFailed"),
|
|
300
|
+
retry: B.reload
|
|
301
|
+
}) : /* @__PURE__ */ F("div", {
|
|
302
|
+
className: "grid gap-3",
|
|
303
|
+
"aria-busy": !0,
|
|
304
|
+
children: [/* @__PURE__ */ P(p, { className: "h-9 w-full" }), /* @__PURE__ */ P(p, { className: "h-48 w-full" })]
|
|
305
|
+
});
|
|
306
|
+
let Y = H, X = (e) => W((t) => ({
|
|
307
|
+
...t,
|
|
308
|
+
...e
|
|
309
|
+
})), Z = (t) => {
|
|
310
|
+
let n = e(t);
|
|
311
|
+
K(n), V(n, "content.save");
|
|
312
|
+
}, ye = () => ({
|
|
313
|
+
title: Y.title.trim(),
|
|
314
|
+
slug: Y.slug.trim() || void 0,
|
|
315
|
+
description: Y.description.trim(),
|
|
316
|
+
body: Y.body
|
|
317
|
+
}), be = async () => {
|
|
318
|
+
if (K(null), q(null), !Y.title.trim()) return K(w("contentManager.titleRequired"));
|
|
319
|
+
try {
|
|
320
|
+
if (!J) {
|
|
321
|
+
let e = await B.create({
|
|
322
|
+
kind: l,
|
|
323
|
+
text: { [I]: ye() },
|
|
324
|
+
owner_group_id: v
|
|
325
|
+
});
|
|
326
|
+
y?.(e);
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
let e = await B.putText(ye());
|
|
330
|
+
q(w("pollEditor.saved")), W((t) => ({
|
|
331
|
+
...t,
|
|
332
|
+
slug: e.text?.[I]?.slug ?? t.slug
|
|
333
|
+
}));
|
|
334
|
+
} catch (e) {
|
|
335
|
+
Z(e);
|
|
336
|
+
}
|
|
337
|
+
}, xe = async (e) => {
|
|
338
|
+
K(null), q(null);
|
|
339
|
+
try {
|
|
340
|
+
e ? await B.publish(Y.publishAt ? new Date(Y.publishAt).toISOString() : void 0) : await B.unpublish(), q(w(e ? "contentManager.publishedNotice" : "contentManager.unpublishedNotice"));
|
|
341
|
+
} catch (e) {
|
|
342
|
+
Z(e);
|
|
343
|
+
}
|
|
344
|
+
}, Se = async () => {
|
|
345
|
+
if (J && await he({
|
|
346
|
+
title: w("contentManager.deleteTitle", { title: J.title }),
|
|
347
|
+
description: w("contentManager.deleteBody"),
|
|
348
|
+
confirm: w("contentManager.delete")
|
|
349
|
+
})) try {
|
|
350
|
+
await B.remove(), le?.(J);
|
|
351
|
+
} catch (e) {
|
|
352
|
+
Z(e);
|
|
353
|
+
}
|
|
354
|
+
}, Q = J ? L(J) : "draft", Ce = J && Q === "published" ? oe?.(J) : void 0, $ = {
|
|
355
|
+
value: ve,
|
|
356
|
+
onChange: (e) => X({ body: B.storedBody(e) }),
|
|
357
|
+
uploadImage: J ? (e) => B.uploadImage(e) : void 0,
|
|
358
|
+
disabled: B.saving,
|
|
359
|
+
placeholder: w("contentManager.bodyPlaceholder"),
|
|
360
|
+
"aria-label": w("contentManager.body")
|
|
361
|
+
};
|
|
362
|
+
return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ F("form", {
|
|
363
|
+
className: "grid gap-4",
|
|
364
|
+
"data-ckui": "content-form",
|
|
365
|
+
onSubmit: (e) => {
|
|
366
|
+
e.preventDefault(), be();
|
|
367
|
+
},
|
|
368
|
+
children: [
|
|
369
|
+
/* @__PURE__ */ F("div", {
|
|
370
|
+
className: "flex flex-wrap items-center gap-2",
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ P("h2", {
|
|
373
|
+
className: "text-base font-semibold",
|
|
374
|
+
children: w(J ? "contentManager.editTitle" : "contentManager.newTitle")
|
|
375
|
+
}),
|
|
376
|
+
J && /* @__PURE__ */ P(te, {
|
|
377
|
+
variant: R[Q],
|
|
378
|
+
children: w(`contentManager.${Q}`)
|
|
379
|
+
}),
|
|
380
|
+
Ce && /* @__PURE__ */ P("a", {
|
|
381
|
+
className: "text-xs text-muted-foreground hover:underline",
|
|
382
|
+
href: Ce,
|
|
383
|
+
children: w("contentManager.view")
|
|
384
|
+
})
|
|
385
|
+
]
|
|
386
|
+
}),
|
|
387
|
+
J?.moderation && /* @__PURE__ */ P(i, {
|
|
388
|
+
variant: J.moderation === "rejected" ? "destructive" : "default",
|
|
389
|
+
children: /* @__PURE__ */ P(a, { children: J.moderation_reason ? w(`contentManager.${J.moderation === "rejected" ? "rejectedBecause" : "heldBecause"}`, { reason: J.moderation_reason }) : w(`contentManager.${J.moderation === "rejected" ? "rejectedNote" : "heldNote"}`) })
|
|
390
|
+
}),
|
|
391
|
+
j.length > 1 && /* @__PURE__ */ F("div", {
|
|
392
|
+
className: "grid gap-1.5",
|
|
393
|
+
children: [/* @__PURE__ */ P(d, {
|
|
394
|
+
htmlFor: `${T}-lang`,
|
|
395
|
+
children: w("contentManager.language")
|
|
396
|
+
}), /* @__PURE__ */ F(ne, {
|
|
397
|
+
value: I,
|
|
398
|
+
onValueChange: (e) => {
|
|
399
|
+
z(String(e ?? "")), W(J ? null : U);
|
|
400
|
+
},
|
|
401
|
+
children: [/* @__PURE__ */ P(ie, {
|
|
402
|
+
id: `${T}-lang`,
|
|
403
|
+
className: "w-full",
|
|
404
|
+
children: /* @__PURE__ */ P(ae, { children: (e) => j.find((t) => t.value === e)?.label ?? e })
|
|
405
|
+
}), /* @__PURE__ */ P(re, { children: j.map((e) => /* @__PURE__ */ P(f, {
|
|
406
|
+
value: e.value,
|
|
407
|
+
children: e.label
|
|
408
|
+
}, e.value)) })]
|
|
409
|
+
})]
|
|
410
|
+
}),
|
|
411
|
+
/* @__PURE__ */ F("div", {
|
|
412
|
+
className: "grid gap-1.5",
|
|
413
|
+
children: [/* @__PURE__ */ P(d, {
|
|
414
|
+
htmlFor: `${T}-title`,
|
|
415
|
+
children: w("contentManager.itemTitle")
|
|
416
|
+
}), /* @__PURE__ */ P(u, {
|
|
417
|
+
id: `${T}-title`,
|
|
418
|
+
value: Y.title,
|
|
419
|
+
required: !0,
|
|
420
|
+
maxLength: 300,
|
|
421
|
+
onChange: (e) => X({ title: e.target.value })
|
|
422
|
+
})]
|
|
423
|
+
}),
|
|
424
|
+
/* @__PURE__ */ F("div", {
|
|
425
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
426
|
+
children: [/* @__PURE__ */ F("div", {
|
|
427
|
+
className: "grid gap-1.5",
|
|
428
|
+
children: [/* @__PURE__ */ P(d, {
|
|
429
|
+
htmlFor: `${T}-slug`,
|
|
430
|
+
children: w("contentManager.slug")
|
|
431
|
+
}), /* @__PURE__ */ P(u, {
|
|
432
|
+
id: `${T}-slug`,
|
|
433
|
+
value: Y.slug,
|
|
434
|
+
placeholder: w("contentManager.slugAuto"),
|
|
435
|
+
onChange: (e) => X({ slug: e.target.value })
|
|
436
|
+
})]
|
|
437
|
+
}), /* @__PURE__ */ F("div", {
|
|
438
|
+
className: "grid gap-1.5",
|
|
439
|
+
children: [/* @__PURE__ */ P(d, {
|
|
440
|
+
htmlFor: `${T}-publish`,
|
|
441
|
+
children: w("contentManager.publishAt")
|
|
442
|
+
}), /* @__PURE__ */ P(u, {
|
|
443
|
+
id: `${T}-publish`,
|
|
444
|
+
type: "datetime-local",
|
|
445
|
+
value: Y.publishAt,
|
|
446
|
+
onChange: (e) => X({ publishAt: e.target.value })
|
|
447
|
+
})]
|
|
448
|
+
})]
|
|
449
|
+
}),
|
|
450
|
+
/* @__PURE__ */ F("div", {
|
|
451
|
+
className: "grid gap-1.5",
|
|
452
|
+
children: [/* @__PURE__ */ P(d, {
|
|
453
|
+
htmlFor: `${T}-description`,
|
|
454
|
+
children: w("contentManager.description")
|
|
455
|
+
}), /* @__PURE__ */ P(m, {
|
|
456
|
+
id: `${T}-description`,
|
|
457
|
+
rows: 2,
|
|
458
|
+
value: Y.description,
|
|
459
|
+
onChange: (e) => X({ description: e.target.value })
|
|
460
|
+
})]
|
|
461
|
+
}),
|
|
462
|
+
/* @__PURE__ */ P(pe, {
|
|
463
|
+
item: J,
|
|
464
|
+
src: B.coverSrc,
|
|
465
|
+
saving: B.saving,
|
|
466
|
+
onFile: (e) => void B.setCover(e).catch(Z)
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ F("div", {
|
|
469
|
+
className: "grid gap-1.5",
|
|
470
|
+
children: [
|
|
471
|
+
/* @__PURE__ */ P("span", {
|
|
472
|
+
className: "text-sm font-medium",
|
|
473
|
+
children: w("contentManager.body")
|
|
474
|
+
}),
|
|
475
|
+
g ? g($) : /* @__PURE__ */ P(m, {
|
|
476
|
+
"aria-label": $["aria-label"],
|
|
477
|
+
rows: 12,
|
|
478
|
+
value: Y.body,
|
|
479
|
+
placeholder: $.placeholder,
|
|
480
|
+
onChange: (e) => X({ body: e.target.value })
|
|
481
|
+
}),
|
|
482
|
+
!J && /* @__PURE__ */ P("p", {
|
|
483
|
+
className: "text-xs text-muted-foreground",
|
|
484
|
+
children: w("contentManager.imagesAfterCreate")
|
|
485
|
+
})
|
|
486
|
+
]
|
|
487
|
+
}),
|
|
488
|
+
G && /* @__PURE__ */ P(h, { children: typeof G == "string" ? G : _(C, G) }),
|
|
489
|
+
me && !G && /* @__PURE__ */ P("p", {
|
|
490
|
+
role: "status",
|
|
491
|
+
className: "text-sm text-muted-foreground",
|
|
492
|
+
children: me
|
|
493
|
+
}),
|
|
494
|
+
/* @__PURE__ */ F("div", {
|
|
495
|
+
className: "flex flex-wrap gap-2 border-t border-border pt-4",
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ P(o, {
|
|
498
|
+
type: "submit",
|
|
499
|
+
disabled: B.saving,
|
|
500
|
+
children: B.saving ? w("common.saving") : w(J ? "common.save" : "contentManager.createDraft")
|
|
501
|
+
}),
|
|
502
|
+
J && !J.live && /* @__PURE__ */ P(o, {
|
|
503
|
+
type: "button",
|
|
504
|
+
variant: "outline",
|
|
505
|
+
disabled: B.saving,
|
|
506
|
+
onClick: () => void xe(!0),
|
|
507
|
+
children: w("contentManager.publish")
|
|
508
|
+
}),
|
|
509
|
+
J?.state === "published" && /* @__PURE__ */ P(o, {
|
|
510
|
+
type: "button",
|
|
511
|
+
variant: "outline",
|
|
512
|
+
disabled: B.saving,
|
|
513
|
+
onClick: () => void xe(!1),
|
|
514
|
+
children: w("contentManager.unpublish")
|
|
515
|
+
}),
|
|
516
|
+
J && /* @__PURE__ */ P(o, {
|
|
517
|
+
type: "button",
|
|
518
|
+
variant: "destructive",
|
|
519
|
+
className: "ms-auto",
|
|
520
|
+
disabled: B.saving,
|
|
521
|
+
onClick: () => void Se(),
|
|
522
|
+
children: w("contentManager.delete")
|
|
523
|
+
})
|
|
524
|
+
]
|
|
525
|
+
}),
|
|
526
|
+
ge
|
|
527
|
+
]
|
|
528
|
+
}), J && /* @__PURE__ */ P(E, {
|
|
529
|
+
content: J,
|
|
530
|
+
client: x,
|
|
531
|
+
onError: b,
|
|
532
|
+
labels: se
|
|
533
|
+
})] });
|
|
534
|
+
}
|
|
535
|
+
function pe({ item: e, src: n, saving: r, onFile: i }) {
|
|
536
|
+
let { t: a } = t(), s = j(null);
|
|
537
|
+
return /* @__PURE__ */ F("div", {
|
|
538
|
+
className: "grid gap-1.5",
|
|
539
|
+
"data-ckui": "content-cover",
|
|
540
|
+
children: [/* @__PURE__ */ P("span", {
|
|
541
|
+
className: "text-sm font-medium",
|
|
542
|
+
children: a("contentManager.cover")
|
|
543
|
+
}), e ? /* @__PURE__ */ F("div", {
|
|
544
|
+
className: "flex flex-wrap items-center gap-3",
|
|
545
|
+
children: [
|
|
546
|
+
n ? /* @__PURE__ */ P("img", {
|
|
547
|
+
src: n,
|
|
548
|
+
alt: "",
|
|
549
|
+
className: "h-20 w-36 rounded-md border border-border object-cover"
|
|
550
|
+
}) : /* @__PURE__ */ P("span", {
|
|
551
|
+
className: "text-muted-foreground",
|
|
552
|
+
children: a("contentManager.noCover")
|
|
553
|
+
}),
|
|
554
|
+
/* @__PURE__ */ P(o, {
|
|
555
|
+
type: "button",
|
|
556
|
+
size: "sm",
|
|
557
|
+
variant: "outline",
|
|
558
|
+
disabled: r,
|
|
559
|
+
onClick: () => s.current?.click(),
|
|
560
|
+
children: a(n ? "pollEditor.replaceImage" : "contentManager.addCover")
|
|
561
|
+
}),
|
|
562
|
+
n && /* @__PURE__ */ P(o, {
|
|
563
|
+
type: "button",
|
|
564
|
+
size: "sm",
|
|
565
|
+
variant: "ghost",
|
|
566
|
+
disabled: r,
|
|
567
|
+
onClick: () => i(null),
|
|
568
|
+
children: a("pollEditor.removeImage")
|
|
569
|
+
}),
|
|
570
|
+
/* @__PURE__ */ P("input", {
|
|
571
|
+
ref: s,
|
|
572
|
+
type: "file",
|
|
573
|
+
accept: "image/*",
|
|
574
|
+
hidden: !0,
|
|
575
|
+
"aria-label": a("contentManager.cover"),
|
|
576
|
+
onChange: (e) => {
|
|
577
|
+
let t = e.target.files?.[0];
|
|
578
|
+
e.target.value = "", t && i(t);
|
|
579
|
+
}
|
|
580
|
+
})
|
|
581
|
+
]
|
|
582
|
+
}) : /* @__PURE__ */ P("p", {
|
|
583
|
+
className: "text-xs text-muted-foreground",
|
|
584
|
+
children: a("contentManager.imagesAfterCreate")
|
|
585
|
+
})]
|
|
586
|
+
});
|
|
587
|
+
}
|
|
588
|
+
//#endregion
|
|
589
|
+
export { W as ContentEditor, B as ContentManager, L as contentStatus, I as useContentManagerAccess };
|
|
590
|
+
|
|
591
|
+
//# sourceMappingURL=content-manager.js.map
|