ghost 5.89.1 → 5.89.2
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/components/tryghost-adapter-cache-memory-ttl-5.89.2.tgz +0 -0
- package/components/{tryghost-adapter-cache-redis-5.89.1.tgz → tryghost-adapter-cache-redis-5.89.2.tgz} +0 -0
- package/components/{tryghost-adapter-manager-5.89.1.tgz → tryghost-adapter-manager-5.89.2.tgz} +0 -0
- package/components/{tryghost-announcement-bar-settings-5.89.1.tgz → tryghost-announcement-bar-settings-5.89.2.tgz} +0 -0
- package/components/{tryghost-api-framework-5.89.1.tgz → tryghost-api-framework-5.89.2.tgz} +0 -0
- package/components/{tryghost-api-version-compatibility-service-5.89.1.tgz → tryghost-api-version-compatibility-service-5.89.2.tgz} +0 -0
- package/components/tryghost-audience-feedback-5.89.2.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.89.2.tgz +0 -0
- package/components/{tryghost-bootstrap-socket-5.89.1.tgz → tryghost-bootstrap-socket-5.89.2.tgz} +0 -0
- package/components/tryghost-collections-5.89.2.tgz +0 -0
- package/components/tryghost-constants-5.89.2.tgz +0 -0
- package/components/{tryghost-custom-theme-settings-service-5.89.1.tgz → tryghost-custom-theme-settings-service-5.89.2.tgz} +0 -0
- package/components/{tryghost-data-generator-5.89.1.tgz → tryghost-data-generator-5.89.2.tgz} +0 -0
- package/components/tryghost-domain-events-5.89.2.tgz +0 -0
- package/components/tryghost-donations-5.89.2.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.89.2.tgz +0 -0
- package/components/tryghost-email-addresses-5.89.2.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.89.2.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.89.2.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.89.1.tgz → tryghost-email-content-generator-5.89.2.tgz} +0 -0
- package/components/tryghost-email-events-5.89.2.tgz +0 -0
- package/components/{tryghost-email-service-5.89.1.tgz → tryghost-email-service-5.89.2.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.89.2.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.89.2.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.89.2.tgz +0 -0
- package/components/tryghost-extract-api-key-5.89.2.tgz +0 -0
- package/components/{tryghost-ghost-5.89.1.tgz → tryghost-ghost-5.89.2.tgz} +0 -0
- package/components/tryghost-html-to-plaintext-5.89.2.tgz +0 -0
- package/components/tryghost-i18n-5.89.2.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.89.2.tgz +0 -0
- package/components/tryghost-importer-revue-5.89.2.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.89.2.tgz +0 -0
- package/components/{tryghost-job-manager-5.89.1.tgz → tryghost-job-manager-5.89.2.tgz} +0 -0
- package/components/tryghost-link-redirects-5.89.2.tgz +0 -0
- package/components/tryghost-link-replacer-5.89.2.tgz +0 -0
- package/components/{tryghost-link-tracking-5.89.1.tgz → tryghost-link-tracking-5.89.2.tgz} +0 -0
- package/components/{tryghost-magic-link-5.89.1.tgz → tryghost-magic-link-5.89.2.tgz} +0 -0
- package/components/{tryghost-mail-events-5.89.1.tgz → tryghost-mail-events-5.89.2.tgz} +0 -0
- package/components/{tryghost-mailgun-client-5.89.1.tgz → tryghost-mailgun-client-5.89.2.tgz} +0 -0
- package/components/{tryghost-member-attribution-5.89.1.tgz → tryghost-member-attribution-5.89.2.tgz} +0 -0
- package/components/{tryghost-member-events-5.89.1.tgz → tryghost-member-events-5.89.2.tgz} +0 -0
- package/components/{tryghost-members-api-5.89.1.tgz → tryghost-members-api-5.89.2.tgz} +0 -0
- package/components/tryghost-members-csv-5.89.2.tgz +0 -0
- package/components/tryghost-members-events-service-5.89.2.tgz +0 -0
- package/components/{tryghost-members-importer-5.89.1.tgz → tryghost-members-importer-5.89.2.tgz} +0 -0
- package/components/{tryghost-members-offers-5.89.1.tgz → tryghost-members-offers-5.89.2.tgz} +0 -0
- package/components/tryghost-members-payments-5.89.2.tgz +0 -0
- package/components/{tryghost-members-ssr-5.89.1.tgz → tryghost-members-ssr-5.89.2.tgz} +0 -0
- package/components/{tryghost-members-stripe-service-5.89.1.tgz → tryghost-members-stripe-service-5.89.2.tgz} +0 -0
- package/components/{tryghost-mentions-email-report-5.89.1.tgz → tryghost-mentions-email-report-5.89.2.tgz} +0 -0
- package/components/{tryghost-milestones-5.89.1.tgz → tryghost-milestones-5.89.2.tgz} +0 -0
- package/components/{tryghost-minifier-5.89.1.tgz → tryghost-minifier-5.89.2.tgz} +0 -0
- package/components/{tryghost-model-to-domain-event-interceptor-5.89.1.tgz → tryghost-model-to-domain-event-interceptor-5.89.2.tgz} +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.89.2.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.89.2.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.89.2.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.89.2.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.89.2.tgz +0 -0
- package/components/tryghost-mw-version-match-5.89.2.tgz +0 -0
- package/components/tryghost-mw-vhost-5.89.2.tgz +0 -0
- package/components/{tryghost-nql-filter-expansions-5.89.1.tgz → tryghost-nql-filter-expansions-5.89.2.tgz} +0 -0
- package/components/{tryghost-oembed-service-5.89.1.tgz → tryghost-oembed-service-5.89.2.tgz} +0 -0
- package/components/{tryghost-package-json-5.89.1.tgz → tryghost-package-json-5.89.2.tgz} +0 -0
- package/components/{tryghost-post-events-5.89.1.tgz → tryghost-post-events-5.89.2.tgz} +0 -0
- package/components/tryghost-post-revisions-5.89.2.tgz +0 -0
- package/components/{tryghost-posts-service-5.89.1.tgz → tryghost-posts-service-5.89.2.tgz} +0 -0
- package/components/tryghost-recommendations-5.89.2.tgz +0 -0
- package/components/tryghost-referrers-5.89.2.tgz +0 -0
- package/components/{tryghost-security-5.89.1.tgz → tryghost-security-5.89.2.tgz} +0 -0
- package/components/tryghost-session-service-5.89.2.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.89.2.tgz +0 -0
- package/components/{tryghost-slack-notifications-5.89.1.tgz → tryghost-slack-notifications-5.89.2.tgz} +0 -0
- package/components/tryghost-staff-service-5.89.2.tgz +0 -0
- package/components/{tryghost-stats-service-5.89.1.tgz → tryghost-stats-service-5.89.2.tgz} +0 -0
- package/components/{tryghost-tiers-5.89.1.tgz → tryghost-tiers-5.89.2.tgz} +0 -0
- package/components/tryghost-update-check-service-5.89.2.tgz +0 -0
- package/components/{tryghost-verification-trigger-5.89.1.tgz → tryghost-verification-trigger-5.89.2.tgz} +0 -0
- package/components/tryghost-version-notifications-data-service-5.89.2.tgz +0 -0
- package/components/tryghost-webmentions-5.89.2.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-980aeac1.mjs → index-e318fbcd.mjs} +16908 -17046
- package/core/built/admin/assets/admin-x-activitypub/modals-a6e383d4.mjs +422 -0
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
- package/core/built/admin/assets/admin-x-demo/{index-71687654.mjs → index-116afae1.mjs} +1972 -1953
- package/core/built/admin/assets/admin-x-demo/{modals-4b59bbd8.mjs → modals-c17f9071.mjs} +171 -166
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-8dcd0ded.mjs → CodeEditorView-511c0703.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-01e25660.mjs → index-5941f1da.mjs} +5734 -5702
- package/core/built/admin/assets/admin-x-settings/{index-541636a3.mjs → index-a33217a0.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-172c4d1c.mjs → modals-434ac8fd.mjs} +3 -3
- package/core/built/admin/assets/{chunk.42.a0b3ca84230d788d0e11.js → chunk.42.90f279da5ca389af68b9.js} +424 -422
- package/core/built/admin/assets/{chunk.524.e09e59707739cbab5488.js → chunk.524.fb82017fc304c64f1cab.js} +5 -5
- package/core/built/admin/assets/{chunk.582.8aa2a0331d317e552bbe.js → chunk.582.a9620f67df902832f07e.js} +6 -6
- package/core/built/admin/assets/{ghost-b5e602d62644bd997ce54c647953f437.js → ghost-ab064d1be3ae3f712cf329fa5766eeb2.js} +162 -130
- package/core/built/admin/assets/{ghost-dark-f0b3a9ea961171ad4f736edbab905a0c.css → ghost-dark-f9c5f2aae7d01ae36bd6932c0abf683a.css} +1 -1
- package/core/built/admin/assets/{ghost-87438e5801b7bb0f2e3497a68572a529.css → ghost-f627cc6acd7574a7bdbf2f2988365c78.css} +1 -1
- package/core/built/admin/assets/koenig-lexical/index.css +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +19003 -18821
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +138 -142
- package/core/built/admin/assets/{vendor-35f20b2f9b6201dcd4a00c8acac98aa6.js → vendor-eb806b4d193377b9b4bbf885840bfdc2.js} +23 -19
- package/core/built/admin/index.html +6 -6
- package/core/server/lib/lexical.js +5 -1
- package/core/shared/config/defaults.json +1 -1
- package/core/shared/labs.js +4 -3
- package/core/shared/settings-cache/public.js +2 -1
- package/package.json +156 -156
- package/yarn.lock +231 -226
- package/components/tryghost-adapter-cache-memory-ttl-5.89.1.tgz +0 -0
- package/components/tryghost-audience-feedback-5.89.1.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.89.1.tgz +0 -0
- package/components/tryghost-collections-5.89.1.tgz +0 -0
- package/components/tryghost-constants-5.89.1.tgz +0 -0
- package/components/tryghost-domain-events-5.89.1.tgz +0 -0
- package/components/tryghost-donations-5.89.1.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.89.1.tgz +0 -0
- package/components/tryghost-email-addresses-5.89.1.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.89.1.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.89.1.tgz +0 -0
- package/components/tryghost-email-events-5.89.1.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.89.1.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.89.1.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.89.1.tgz +0 -0
- package/components/tryghost-extract-api-key-5.89.1.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.89.1.tgz +0 -0
- package/components/tryghost-i18n-5.89.1.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.89.1.tgz +0 -0
- package/components/tryghost-importer-revue-5.89.1.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.89.1.tgz +0 -0
- package/components/tryghost-link-redirects-5.89.1.tgz +0 -0
- package/components/tryghost-link-replacer-5.89.1.tgz +0 -0
- package/components/tryghost-members-csv-5.89.1.tgz +0 -0
- package/components/tryghost-members-events-service-5.89.1.tgz +0 -0
- package/components/tryghost-members-payments-5.89.1.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.89.1.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.89.1.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.89.1.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.89.1.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.89.1.tgz +0 -0
- package/components/tryghost-mw-version-match-5.89.1.tgz +0 -0
- package/components/tryghost-mw-vhost-5.89.1.tgz +0 -0
- package/components/tryghost-post-revisions-5.89.1.tgz +0 -0
- package/components/tryghost-recommendations-5.89.1.tgz +0 -0
- package/components/tryghost-referrers-5.89.1.tgz +0 -0
- package/components/tryghost-session-service-5.89.1.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.89.1.tgz +0 -0
- package/components/tryghost-staff-service-5.89.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.89.1.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.89.1.tgz +0 -0
- package/components/tryghost-webmentions-5.89.1.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/modals-e013f67b.mjs +0 -654
- /package/core/built/admin/assets/{chunk.42.a0b3ca84230d788d0e11.js.LICENSE.txt → chunk.42.90f279da5ca389af68b9.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { c as d, j as s, u as T, a as D, H as b, S as _, b as z, d as ee, s as te, g as se, n as q, p as re, e as ne, f as C, h as oe, i as ie, k as A, l as le, N as w, m as S, M as U, o as y, A as v, q as ae, B, r as L, t as I } from "./index-e318fbcd.mjs";
|
|
2
|
+
const H = ({ children: i, color: t, className: e, ...n }) => {
|
|
3
|
+
if (!i)
|
|
4
|
+
return null;
|
|
5
|
+
let o = "text-grey-700 dark:text-grey-600";
|
|
6
|
+
switch (t) {
|
|
7
|
+
case "red":
|
|
8
|
+
o = "text-red dark:text-red-500";
|
|
9
|
+
break;
|
|
10
|
+
case "green":
|
|
11
|
+
o = "text-green dark:text-green-500";
|
|
12
|
+
break;
|
|
13
|
+
}
|
|
14
|
+
return e = d(
|
|
15
|
+
"mt-1 inline-block text-xs",
|
|
16
|
+
o,
|
|
17
|
+
e
|
|
18
|
+
), /* @__PURE__ */ s.jsx("span", { className: e, ...n, children: i });
|
|
19
|
+
}, ce = ({
|
|
20
|
+
type: i = "text",
|
|
21
|
+
inputRef: t,
|
|
22
|
+
title: e,
|
|
23
|
+
hideTitle: n,
|
|
24
|
+
value: o,
|
|
25
|
+
error: r,
|
|
26
|
+
placeholder: l,
|
|
27
|
+
rightPlaceholder: a,
|
|
28
|
+
hint: c,
|
|
29
|
+
onChange: u,
|
|
30
|
+
onFocus: h,
|
|
31
|
+
onBlur: x,
|
|
32
|
+
clearBg: g = !1,
|
|
33
|
+
className: m = "",
|
|
34
|
+
maxLength: j,
|
|
35
|
+
containerClassName: f = "",
|
|
36
|
+
hintClassName: k = "",
|
|
37
|
+
unstyled: p = !1,
|
|
38
|
+
disabled: R,
|
|
39
|
+
...Q
|
|
40
|
+
}) => {
|
|
41
|
+
const N = T(), { setFocusState: E } = D(), G = (M) => {
|
|
42
|
+
h == null || h(M), E(!0);
|
|
43
|
+
}, J = (M) => {
|
|
44
|
+
x == null || x(M), E(!1);
|
|
45
|
+
}, W = d(
|
|
46
|
+
"relative order-2 flex w-full items-center",
|
|
47
|
+
e && !n && "mt-1.5"
|
|
48
|
+
), O = !p && d(
|
|
49
|
+
"absolute inset-0 rounded-lg border text-grey-300 transition-colors peer-hover:bg-grey-100 peer-focus:border-green peer-focus:bg-white peer-focus:shadow-[0_0_0_2px_rgba(48,207,67,.25)] dark:peer-hover:bg-grey-925 dark:peer-focus:bg-grey-950",
|
|
50
|
+
r ? "border-red bg-white dark:bg-grey-925" : "border-transparent bg-grey-150 dark:bg-grey-900",
|
|
51
|
+
R && "bg-grey-50 peer-hover:bg-grey-50 dark:bg-grey-950 dark:peer-hover:bg-grey-950"
|
|
52
|
+
), X = !p && d(
|
|
53
|
+
"peer z-[1] order-2 h-9 w-full bg-transparent px-3 py-1.5 text-sm placeholder:text-grey-500 dark:placeholder:text-grey-700 md:h-[38px] md:py-2 md:text-md",
|
|
54
|
+
R ? "cursor-not-allowed text-grey-600 opacity-60 dark:text-grey-800" : "dark:text-white",
|
|
55
|
+
a ? "w-0 grow rounded-l-lg" : "rounded-lg",
|
|
56
|
+
m
|
|
57
|
+
), Y = !p && d(
|
|
58
|
+
"z-[1] order-3 rounded-r-lg",
|
|
59
|
+
a ? typeof a == "string" ? "flex h-8 items-center py-1 pr-3 text-right text-sm text-grey-500 md:h-9 md:text-base" : "h-9 pr-1" : "pr-2"
|
|
60
|
+
);
|
|
61
|
+
let F = /* @__PURE__ */ s.jsx(s.Fragment, {});
|
|
62
|
+
const Z = /* @__PURE__ */ s.jsx(
|
|
63
|
+
"input",
|
|
64
|
+
{
|
|
65
|
+
ref: t,
|
|
66
|
+
className: X || m,
|
|
67
|
+
disabled: R,
|
|
68
|
+
id: N,
|
|
69
|
+
maxLength: j,
|
|
70
|
+
placeholder: l,
|
|
71
|
+
type: i,
|
|
72
|
+
value: o,
|
|
73
|
+
onBlur: J,
|
|
74
|
+
onChange: u,
|
|
75
|
+
onFocus: G,
|
|
76
|
+
...Q
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
return F = /* @__PURE__ */ s.jsxs("div", { className: W, children: [
|
|
80
|
+
Z,
|
|
81
|
+
!p && !g && /* @__PURE__ */ s.jsx("div", { className: O || "" }),
|
|
82
|
+
a && /* @__PURE__ */ s.jsx("span", { className: Y || "", children: a })
|
|
83
|
+
] }), k = d(
|
|
84
|
+
"order-3",
|
|
85
|
+
k
|
|
86
|
+
), f = d(
|
|
87
|
+
"flex flex-col",
|
|
88
|
+
f
|
|
89
|
+
), e || c ? /* @__PURE__ */ s.jsxs("div", { className: f, children: [
|
|
90
|
+
F,
|
|
91
|
+
e && /* @__PURE__ */ s.jsx(b, { className: n ? "sr-only" : "order-1", htmlFor: N, useLabelTag: !0, children: e }),
|
|
92
|
+
c && /* @__PURE__ */ s.jsx(H, { className: k, color: r ? "red" : "default", children: c })
|
|
93
|
+
] }) : F;
|
|
94
|
+
}, V = ({ image: i, label: t, labelColor: e, bgColor: n, size: o, className: r }) => {
|
|
95
|
+
let l = "", a = " -mb-2 ";
|
|
96
|
+
switch (o) {
|
|
97
|
+
case "sm":
|
|
98
|
+
l = " w-7 h-7 text-sm ";
|
|
99
|
+
break;
|
|
100
|
+
case "lg":
|
|
101
|
+
l = " w-12 h-12 text-xl ";
|
|
102
|
+
break;
|
|
103
|
+
case "xl":
|
|
104
|
+
l = " w-16 h-16 text-2xl ", a = " -mb-3 ";
|
|
105
|
+
break;
|
|
106
|
+
case "2xl":
|
|
107
|
+
l = " w-20 h-20 text-2xl ", a = " -mb-3 ";
|
|
108
|
+
break;
|
|
109
|
+
default:
|
|
110
|
+
l = " w-10 h-10 text-md ";
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
return i ? /* @__PURE__ */ s.jsx("img", { alt: "", className: `inline-flex shrink-0 items-center justify-center rounded-full object-cover font-semibold ${l} ${r && r}`, src: i }) : t ? /* @__PURE__ */ s.jsx("div", { className: `${e && `text-${e}`} inline-flex items-center justify-center rounded-full p-2 font-semibold ${l} ${r && r}`, style: n ? { backgroundColor: n } : {}, children: t }) : /* @__PURE__ */ s.jsx("div", { className: `inline-flex items-center justify-center overflow-hidden rounded-full bg-grey-100 p-1 font-semibold ${l} ${r && r}`, children: /* @__PURE__ */ s.jsx(_, { className: `${a} h-full w-full text-grey-300` }) });
|
|
114
|
+
}, ue = ({
|
|
115
|
+
title: i,
|
|
116
|
+
titleSize: t = "sm",
|
|
117
|
+
actions: e,
|
|
118
|
+
titleSeparator: n
|
|
119
|
+
}) => {
|
|
120
|
+
let o;
|
|
121
|
+
if (i) {
|
|
122
|
+
const r = t === "sm" ? /* @__PURE__ */ s.jsx(b, { grey: !0, level: 6, children: i }) : /* @__PURE__ */ s.jsx(b, { level: 5, children: i });
|
|
123
|
+
o = e ? /* @__PURE__ */ s.jsxs("div", { className: "flex items-end justify-between gap-2", children: [
|
|
124
|
+
r,
|
|
125
|
+
e
|
|
126
|
+
] }) : r;
|
|
127
|
+
}
|
|
128
|
+
return o || n ? /* @__PURE__ */ s.jsxs("div", { className: "flex flex-col items-stretch gap-1", children: [
|
|
129
|
+
o,
|
|
130
|
+
n && /* @__PURE__ */ s.jsx(z, {})
|
|
131
|
+
] }) : /* @__PURE__ */ s.jsx(s.Fragment, {});
|
|
132
|
+
}, $ = ({
|
|
133
|
+
title: i,
|
|
134
|
+
titleSeparator: t = !0,
|
|
135
|
+
titleSize: e = "sm",
|
|
136
|
+
children: n,
|
|
137
|
+
actions: o,
|
|
138
|
+
hint: r,
|
|
139
|
+
hintSeparator: l = !0,
|
|
140
|
+
borderTop: a,
|
|
141
|
+
pageTitle: c,
|
|
142
|
+
className: u
|
|
143
|
+
}) => {
|
|
144
|
+
const h = d(
|
|
145
|
+
(a || c) && "border-t border-grey-300",
|
|
146
|
+
c && "mt-5",
|
|
147
|
+
u
|
|
148
|
+
);
|
|
149
|
+
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
150
|
+
c && /* @__PURE__ */ s.jsx(b, { children: c }),
|
|
151
|
+
/* @__PURE__ */ s.jsxs("section", { className: h, children: [
|
|
152
|
+
i && /* @__PURE__ */ s.jsx(ue, { actions: o, title: i, titleSeparator: !c && t && !a, titleSize: e }),
|
|
153
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col", children: n }),
|
|
154
|
+
r && /* @__PURE__ */ s.jsxs("div", { className: "-mt-px", children: [
|
|
155
|
+
l && /* @__PURE__ */ s.jsx(z, {}),
|
|
156
|
+
/* @__PURE__ */ s.jsx(H, { children: r })
|
|
157
|
+
] })
|
|
158
|
+
] })
|
|
159
|
+
] });
|
|
160
|
+
}, K = ({
|
|
161
|
+
id: i,
|
|
162
|
+
title: t,
|
|
163
|
+
detail: e,
|
|
164
|
+
action: n,
|
|
165
|
+
hideActions: o,
|
|
166
|
+
avatar: r,
|
|
167
|
+
className: l,
|
|
168
|
+
testId: a,
|
|
169
|
+
separator: c = !0,
|
|
170
|
+
bgOnHover: u = !0,
|
|
171
|
+
paddingRight: h = !0,
|
|
172
|
+
onClick: x,
|
|
173
|
+
children: g
|
|
174
|
+
}) => {
|
|
175
|
+
const m = (f) => {
|
|
176
|
+
x == null || x(f);
|
|
177
|
+
}, j = d(
|
|
178
|
+
"group/list-item flex items-center justify-between",
|
|
179
|
+
u && "hover:bg-gradient-to-r hover:from-white hover:to-grey-50 dark:hover:from-black dark:hover:to-grey-950",
|
|
180
|
+
c ? "border-b border-grey-100 last-of-type:border-b-transparent hover:border-grey-200 dark:border-grey-900 dark:hover:border-grey-800" : "border-y border-transparent hover:border-grey-200 first-of-type:hover:border-t-transparent dark:hover:border-grey-800",
|
|
181
|
+
l
|
|
182
|
+
);
|
|
183
|
+
return /* @__PURE__ */ s.jsxs("div", { className: j, "data-testid": a, children: [
|
|
184
|
+
g || /* @__PURE__ */ s.jsxs("div", { className: `flex grow items-center gap-3 ${x && "cursor-pointer"}`, onClick: m, children: [
|
|
185
|
+
r && r,
|
|
186
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex grow flex-col py-3 pr-6", id: i, children: [
|
|
187
|
+
/* @__PURE__ */ s.jsx("span", { children: t }),
|
|
188
|
+
e && /* @__PURE__ */ s.jsx("span", { className: "text-xs text-grey-700", children: e })
|
|
189
|
+
] })
|
|
190
|
+
] }),
|
|
191
|
+
n && /* @__PURE__ */ s.jsx("div", { className: `visible py-3 md:pl-6 ${h && "md:pr-6"} ${o ? "group-hover/list-item:visible md:invisible" : ""}`, children: n })
|
|
192
|
+
] });
|
|
193
|
+
};
|
|
194
|
+
class de extends ee {
|
|
195
|
+
constructor(t, e) {
|
|
196
|
+
super(), this.client = t, this.setOptions(e), this.bindMethods(), this.updateResult();
|
|
197
|
+
}
|
|
198
|
+
bindMethods() {
|
|
199
|
+
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
200
|
+
}
|
|
201
|
+
setOptions(t) {
|
|
202
|
+
var e;
|
|
203
|
+
const n = this.options;
|
|
204
|
+
this.options = this.client.defaultMutationOptions(t), te(n, this.options) || this.client.getMutationCache().notify({
|
|
205
|
+
type: "observerOptionsUpdated",
|
|
206
|
+
mutation: this.currentMutation,
|
|
207
|
+
observer: this
|
|
208
|
+
}), (e = this.currentMutation) == null || e.setOptions(this.options);
|
|
209
|
+
}
|
|
210
|
+
onUnsubscribe() {
|
|
211
|
+
if (!this.hasListeners()) {
|
|
212
|
+
var t;
|
|
213
|
+
(t = this.currentMutation) == null || t.removeObserver(this);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
onMutationUpdate(t) {
|
|
217
|
+
this.updateResult();
|
|
218
|
+
const e = {
|
|
219
|
+
listeners: !0
|
|
220
|
+
};
|
|
221
|
+
t.type === "success" ? e.onSuccess = !0 : t.type === "error" && (e.onError = !0), this.notify(e);
|
|
222
|
+
}
|
|
223
|
+
getCurrentResult() {
|
|
224
|
+
return this.currentResult;
|
|
225
|
+
}
|
|
226
|
+
reset() {
|
|
227
|
+
this.currentMutation = void 0, this.updateResult(), this.notify({
|
|
228
|
+
listeners: !0
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
mutate(t, e) {
|
|
232
|
+
return this.mutateOptions = e, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, {
|
|
233
|
+
...this.options,
|
|
234
|
+
variables: typeof t < "u" ? t : this.options.variables
|
|
235
|
+
}), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
236
|
+
}
|
|
237
|
+
updateResult() {
|
|
238
|
+
const t = this.currentMutation ? this.currentMutation.state : se(), e = {
|
|
239
|
+
...t,
|
|
240
|
+
isLoading: t.status === "loading",
|
|
241
|
+
isSuccess: t.status === "success",
|
|
242
|
+
isError: t.status === "error",
|
|
243
|
+
isIdle: t.status === "idle",
|
|
244
|
+
mutate: this.mutate,
|
|
245
|
+
reset: this.reset
|
|
246
|
+
};
|
|
247
|
+
this.currentResult = e;
|
|
248
|
+
}
|
|
249
|
+
notify(t) {
|
|
250
|
+
q.batch(() => {
|
|
251
|
+
if (this.mutateOptions && this.hasListeners()) {
|
|
252
|
+
if (t.onSuccess) {
|
|
253
|
+
var e, n, o, r;
|
|
254
|
+
(e = (n = this.mutateOptions).onSuccess) == null || e.call(n, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (o = (r = this.mutateOptions).onSettled) == null || o.call(r, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
|
|
255
|
+
} else if (t.onError) {
|
|
256
|
+
var l, a, c, u;
|
|
257
|
+
(l = (a = this.mutateOptions).onError) == null || l.call(a, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (c = (u = this.mutateOptions).onSettled) == null || c.call(u, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
t.listeners && this.listeners.forEach(({
|
|
261
|
+
listener: h
|
|
262
|
+
}) => {
|
|
263
|
+
h(this.currentResult);
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function P(i, t, e) {
|
|
269
|
+
const n = re(i, t, e), o = ne({
|
|
270
|
+
context: n.context
|
|
271
|
+
}), [r] = C(() => new de(o, n));
|
|
272
|
+
oe(() => {
|
|
273
|
+
r.setOptions(n);
|
|
274
|
+
}, [r, n]);
|
|
275
|
+
const l = ie(A((c) => r.subscribe(q.batchCalls(c)), [r]), () => r.getCurrentResult(), () => r.getCurrentResult()), a = A((c, u) => {
|
|
276
|
+
r.mutate(c, u).catch(he);
|
|
277
|
+
}, [r]);
|
|
278
|
+
if (l.error && le(r.options.useErrorBoundary, [l.error]))
|
|
279
|
+
throw l.error;
|
|
280
|
+
return {
|
|
281
|
+
...l,
|
|
282
|
+
mutate: a,
|
|
283
|
+
mutateAsync: l.mutate
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
function he() {
|
|
287
|
+
}
|
|
288
|
+
function xe(i, t, e) {
|
|
289
|
+
var a;
|
|
290
|
+
const o = (a = y().data) == null ? void 0 : a.site, r = (o == null ? void 0 : o.url) ?? window.location.origin, l = new v(
|
|
291
|
+
new URL(r),
|
|
292
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
293
|
+
i
|
|
294
|
+
);
|
|
295
|
+
return P({
|
|
296
|
+
async mutationFn(c) {
|
|
297
|
+
return l.follow(c);
|
|
298
|
+
},
|
|
299
|
+
onSuccess: t,
|
|
300
|
+
onError: e
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
const fe = w.create(() => {
|
|
304
|
+
const { updateRoute: i } = S(), t = w.useModal(), [e, n] = C(""), [o, r] = C(null);
|
|
305
|
+
async function l() {
|
|
306
|
+
ae({
|
|
307
|
+
message: "Site followed",
|
|
308
|
+
type: "success"
|
|
309
|
+
}), t.remove(), i("");
|
|
310
|
+
}
|
|
311
|
+
async function a() {
|
|
312
|
+
r(o);
|
|
313
|
+
}
|
|
314
|
+
const c = xe("index", l, a);
|
|
315
|
+
return /* @__PURE__ */ s.jsx(
|
|
316
|
+
U,
|
|
317
|
+
{
|
|
318
|
+
afterClose: () => {
|
|
319
|
+
c.reset(), i("");
|
|
320
|
+
},
|
|
321
|
+
cancelLabel: "Cancel",
|
|
322
|
+
okLabel: "Follow",
|
|
323
|
+
size: "sm",
|
|
324
|
+
title: "Follow a Ghost site",
|
|
325
|
+
onOk: () => c.mutate(e),
|
|
326
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ s.jsx(
|
|
327
|
+
ce,
|
|
328
|
+
{
|
|
329
|
+
autoFocus: !0,
|
|
330
|
+
error: !!o,
|
|
331
|
+
hint: o,
|
|
332
|
+
placeholder: "@username@hostname",
|
|
333
|
+
title: "Profile name",
|
|
334
|
+
value: e,
|
|
335
|
+
"data-test-new-follower": !0,
|
|
336
|
+
onChange: (u) => n(u.target.value)
|
|
337
|
+
}
|
|
338
|
+
) })
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
});
|
|
342
|
+
function ge(i) {
|
|
343
|
+
var r;
|
|
344
|
+
const e = (r = y().data) == null ? void 0 : r.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, o = new v(
|
|
345
|
+
new URL(n),
|
|
346
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
347
|
+
i
|
|
348
|
+
);
|
|
349
|
+
return I({
|
|
350
|
+
queryKey: [`followers:${i}`],
|
|
351
|
+
async queryFn() {
|
|
352
|
+
return o.getFollowers();
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
function me(i) {
|
|
357
|
+
var r;
|
|
358
|
+
const e = (r = y().data) == null ? void 0 : r.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, o = new v(
|
|
359
|
+
new URL(n),
|
|
360
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
361
|
+
i
|
|
362
|
+
);
|
|
363
|
+
return P({
|
|
364
|
+
async mutationFn(l) {
|
|
365
|
+
return o.follow(l);
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
const pe = ({}) => {
|
|
370
|
+
const { updateRoute: i } = S(), t = me("index"), { data: e = [] } = ge("index"), n = Array.isArray(e) ? e : [e];
|
|
371
|
+
return /* @__PURE__ */ s.jsx(
|
|
372
|
+
U,
|
|
373
|
+
{
|
|
374
|
+
afterClose: () => {
|
|
375
|
+
t.reset(), i("profile");
|
|
376
|
+
},
|
|
377
|
+
cancelLabel: "",
|
|
378
|
+
footer: !1,
|
|
379
|
+
okLabel: "",
|
|
380
|
+
size: "md",
|
|
381
|
+
title: "Followers",
|
|
382
|
+
topRightContent: "close",
|
|
383
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ s.jsx($, { children: n.map((o) => /* @__PURE__ */ s.jsx(K, { action: /* @__PURE__ */ s.jsx(B, { color: "grey", label: "Follow back", link: !0, onClick: () => t.mutate(L(o)) }), avatar: /* @__PURE__ */ s.jsx(V, { image: o.icon, size: "sm" }), detail: L(o), id: "list-item", title: o.name })) }) })
|
|
384
|
+
}
|
|
385
|
+
);
|
|
386
|
+
}, be = w.create(pe);
|
|
387
|
+
function we(i) {
|
|
388
|
+
var r;
|
|
389
|
+
const e = (r = y().data) == null ? void 0 : r.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, o = new v(
|
|
390
|
+
new URL(n),
|
|
391
|
+
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
392
|
+
i
|
|
393
|
+
);
|
|
394
|
+
return I({
|
|
395
|
+
queryKey: [`following:${i}`],
|
|
396
|
+
async queryFn() {
|
|
397
|
+
return o.getFollowing();
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
const ye = ({}) => {
|
|
402
|
+
const { updateRoute: i } = S(), { data: t = [] } = we("index"), e = Array.isArray(t) ? t : [t];
|
|
403
|
+
return /* @__PURE__ */ s.jsx(
|
|
404
|
+
U,
|
|
405
|
+
{
|
|
406
|
+
afterClose: () => {
|
|
407
|
+
i("profile");
|
|
408
|
+
},
|
|
409
|
+
cancelLabel: "",
|
|
410
|
+
footer: !1,
|
|
411
|
+
okLabel: "",
|
|
412
|
+
size: "md",
|
|
413
|
+
title: "Following",
|
|
414
|
+
topRightContent: "close",
|
|
415
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ s.jsx($, { children: e.map((n) => /* @__PURE__ */ s.jsx(K, { action: /* @__PURE__ */ s.jsx(B, { color: "grey", label: "Unfollow", link: !0 }), avatar: /* @__PURE__ */ s.jsx(V, { image: n.icon, size: "sm" }), detail: L(n), id: "list-item", title: n.name })) }) })
|
|
416
|
+
}
|
|
417
|
+
);
|
|
418
|
+
}, ve = w.create(ye), ke = { FollowSite: fe, ViewFollowing: ve, ViewFollowers: be };
|
|
419
|
+
export {
|
|
420
|
+
ke as default
|
|
421
|
+
};
|
|
422
|
+
//# sourceMappingURL=modals-a6e383d4.mjs.map
|