ghost 5.89.6 → 5.90.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/components/tryghost-adapter-cache-memory-ttl-5.90.0.tgz +0 -0
- package/components/{tryghost-adapter-cache-redis-5.89.6.tgz → tryghost-adapter-cache-redis-5.90.0.tgz} +0 -0
- package/components/{tryghost-adapter-manager-5.89.6.tgz → tryghost-adapter-manager-5.90.0.tgz} +0 -0
- package/components/tryghost-announcement-bar-settings-5.90.0.tgz +0 -0
- package/components/{tryghost-api-framework-5.89.6.tgz → tryghost-api-framework-5.90.0.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.90.0.tgz +0 -0
- package/components/tryghost-audience-feedback-5.90.0.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.90.0.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.90.0.tgz +0 -0
- package/components/tryghost-collections-5.90.0.tgz +0 -0
- package/components/tryghost-constants-5.90.0.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.90.0.tgz +0 -0
- package/components/{tryghost-data-generator-5.89.6.tgz → tryghost-data-generator-5.90.0.tgz} +0 -0
- package/components/tryghost-domain-events-5.90.0.tgz +0 -0
- package/components/tryghost-donations-5.90.0.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.90.0.tgz +0 -0
- package/components/tryghost-email-addresses-5.90.0.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.90.0.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.90.0.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.89.6.tgz → tryghost-email-content-generator-5.90.0.tgz} +0 -0
- package/components/tryghost-email-events-5.90.0.tgz +0 -0
- package/components/{tryghost-email-service-5.89.6.tgz → tryghost-email-service-5.90.0.tgz} +0 -0
- package/components/tryghost-email-suppression-list-5.90.0.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.90.0.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.90.0.tgz +0 -0
- package/components/tryghost-extract-api-key-5.90.0.tgz +0 -0
- package/components/tryghost-ghost-5.90.0.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.90.0.tgz +0 -0
- package/components/tryghost-i18n-5.90.0.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.90.0.tgz +0 -0
- package/components/{tryghost-importer-revue-5.89.6.tgz → tryghost-importer-revue-5.90.0.tgz} +0 -0
- package/components/tryghost-in-memory-repository-5.90.0.tgz +0 -0
- package/components/{tryghost-job-manager-5.89.6.tgz → tryghost-job-manager-5.90.0.tgz} +0 -0
- package/components/tryghost-link-redirects-5.90.0.tgz +0 -0
- package/components/{tryghost-link-replacer-5.89.6.tgz → tryghost-link-replacer-5.90.0.tgz} +0 -0
- package/components/{tryghost-link-tracking-5.89.6.tgz → tryghost-link-tracking-5.90.0.tgz} +0 -0
- package/components/tryghost-magic-link-5.90.0.tgz +0 -0
- package/components/tryghost-mail-events-5.90.0.tgz +0 -0
- package/components/{tryghost-mailgun-client-5.89.6.tgz → tryghost-mailgun-client-5.90.0.tgz} +0 -0
- package/components/{tryghost-member-attribution-5.89.6.tgz → tryghost-member-attribution-5.90.0.tgz} +0 -0
- package/components/tryghost-member-events-5.90.0.tgz +0 -0
- package/components/tryghost-members-api-5.90.0.tgz +0 -0
- package/components/tryghost-members-csv-5.90.0.tgz +0 -0
- package/components/tryghost-members-events-service-5.90.0.tgz +0 -0
- package/components/tryghost-members-importer-5.90.0.tgz +0 -0
- package/components/tryghost-members-offers-5.90.0.tgz +0 -0
- package/components/tryghost-members-payments-5.90.0.tgz +0 -0
- package/components/tryghost-members-ssr-5.90.0.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.90.0.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.90.0.tgz +0 -0
- package/components/tryghost-milestones-5.90.0.tgz +0 -0
- package/components/tryghost-minifier-5.90.0.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.90.0.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.90.0.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.90.0.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.90.0.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.90.0.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.90.0.tgz +0 -0
- package/components/tryghost-mw-version-match-5.90.0.tgz +0 -0
- package/components/tryghost-mw-vhost-5.90.0.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.90.0.tgz +0 -0
- package/components/{tryghost-oembed-service-5.89.6.tgz → tryghost-oembed-service-5.90.0.tgz} +0 -0
- package/components/tryghost-package-json-5.90.0.tgz +0 -0
- package/components/{tryghost-post-events-5.89.6.tgz → tryghost-post-events-5.90.0.tgz} +0 -0
- package/components/tryghost-post-revisions-5.90.0.tgz +0 -0
- package/components/tryghost-posts-service-5.90.0.tgz +0 -0
- package/components/tryghost-recommendations-5.90.0.tgz +0 -0
- package/components/tryghost-referrers-5.90.0.tgz +0 -0
- package/components/tryghost-security-5.90.0.tgz +0 -0
- package/components/{tryghost-session-service-5.89.6.tgz → tryghost-session-service-5.90.0.tgz} +0 -0
- package/components/tryghost-settings-path-manager-5.90.0.tgz +0 -0
- package/components/tryghost-slack-notifications-5.90.0.tgz +0 -0
- package/components/{tryghost-staff-service-5.89.6.tgz → tryghost-staff-service-5.90.0.tgz} +0 -0
- package/components/{tryghost-stats-service-5.89.6.tgz → tryghost-stats-service-5.90.0.tgz} +0 -0
- package/components/{tryghost-tiers-5.89.6.tgz → tryghost-tiers-5.90.0.tgz} +0 -0
- package/components/tryghost-update-check-service-5.90.0.tgz +0 -0
- package/components/tryghost-verification-trigger-5.90.0.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.90.0.tgz +0 -0
- package/components/tryghost-webmentions-5.90.0.tgz +0 -0
- package/core/boot.js +8 -5
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-e318fbcd.mjs → index-79b91eda.mjs} +4643 -4540
- package/core/built/admin/assets/admin-x-activitypub/modals-25d834a0.mjs +1017 -0
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
- package/core/built/admin/assets/admin-x-demo/index-9379b3eb.mjs +15889 -0
- package/core/built/admin/assets/admin-x-demo/{modals-c17f9071.mjs → modals-88dc270f.mjs} +3 -3
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-511c0703.mjs → CodeEditorView-821d5b2c.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +3 -3
- package/core/built/admin/assets/admin-x-settings/{index-5941f1da.mjs → index-1c47835f.mjs} +16355 -12569
- package/core/built/admin/assets/admin-x-settings/{index-a33217a0.mjs → index-29d842f9.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{modals-434ac8fd.mjs → modals-7c030639.mjs} +6330 -5814
- package/core/built/admin/assets/{chunk.42.90f279da5ca389af68b9.js → chunk.42.eae83e03ed76c8e8c57a.js} +4 -4
- package/core/built/admin/assets/{chunk.524.c121fa5c220befde8234.js → chunk.524.4551f9a844deaa462046.js} +5 -5
- package/core/built/admin/assets/{chunk.582.78f1ec44751f5313fcc9.js → chunk.582.1b3f6a148cd1896c12aa.js} +6 -6
- package/core/built/admin/assets/ghost-dark-cedf65ab1ef5082419d66cc99a151071.css +1 -0
- package/core/built/admin/assets/ghost-e452bcc2710cf5a8372a7f7202661191.css +1 -0
- package/core/built/admin/assets/{ghost-532c38e4c3ecd17d68cdcc9fb58b9098.js → ghost-e733775ba236c045dbcdaaa39231c6d8.js} +61 -53
- package/core/built/admin/assets/{vendor-eb806b4d193377b9b4bbf885840bfdc2.js → vendor-bff75d127fcf4a75c8a83b473bdb308f.js} +2 -2
- package/core/built/admin/index.html +6 -6
- package/core/frontend/services/routing/RouterManager.js +7 -7
- package/core/frontend/src/cards/css/audio.css +3 -0
- package/core/frontend/src/cards/css/file.css +4 -1
- package/core/frontend/src/cards/css/product.css +3 -3
- package/core/frontend/src/cards/css/toggle.css +1 -1
- package/core/server/data/migrations/versions/5.90/2024-08-20-09-40-24-update-default-donations-suggested-amount.js +42 -0
- package/core/server/data/schema/default-settings/default-settings.json +1 -1
- package/core/server/models/base/plugins/crud.js +14 -0
- package/core/server/models/member-click-event.js +5 -2
- package/core/server/services/email-analytics/EmailAnalyticsServiceWrapper.js +37 -8
- package/core/server/services/email-analytics/lib/queries.js +117 -21
- package/core/server/services/members/RequestIntegrityTokenProvider.js +62 -0
- package/core/server/services/members/middleware.js +42 -2
- package/core/server/services/members/service.js +6 -0
- package/core/server/web/members/app.js +3 -0
- package/core/shared/instrumentation.js +39 -27
- package/package.json +150 -153
- package/yarn.lock +466 -801
- package/components/tryghost-adapter-cache-memory-ttl-5.89.6.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.89.6.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.89.6.tgz +0 -0
- package/components/tryghost-audience-feedback-5.89.6.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.89.6.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.89.6.tgz +0 -0
- package/components/tryghost-collections-5.89.6.tgz +0 -0
- package/components/tryghost-constants-5.89.6.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.89.6.tgz +0 -0
- package/components/tryghost-domain-events-5.89.6.tgz +0 -0
- package/components/tryghost-donations-5.89.6.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.89.6.tgz +0 -0
- package/components/tryghost-email-addresses-5.89.6.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.89.6.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.89.6.tgz +0 -0
- package/components/tryghost-email-events-5.89.6.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.89.6.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.89.6.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.89.6.tgz +0 -0
- package/components/tryghost-extract-api-key-5.89.6.tgz +0 -0
- package/components/tryghost-ghost-5.89.6.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.89.6.tgz +0 -0
- package/components/tryghost-i18n-5.89.6.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.89.6.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.89.6.tgz +0 -0
- package/components/tryghost-link-redirects-5.89.6.tgz +0 -0
- package/components/tryghost-magic-link-5.89.6.tgz +0 -0
- package/components/tryghost-mail-events-5.89.6.tgz +0 -0
- package/components/tryghost-member-events-5.89.6.tgz +0 -0
- package/components/tryghost-members-api-5.89.6.tgz +0 -0
- package/components/tryghost-members-csv-5.89.6.tgz +0 -0
- package/components/tryghost-members-events-service-5.89.6.tgz +0 -0
- package/components/tryghost-members-importer-5.89.6.tgz +0 -0
- package/components/tryghost-members-offers-5.89.6.tgz +0 -0
- package/components/tryghost-members-payments-5.89.6.tgz +0 -0
- package/components/tryghost-members-ssr-5.89.6.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.89.6.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.89.6.tgz +0 -0
- package/components/tryghost-milestones-5.89.6.tgz +0 -0
- package/components/tryghost-minifier-5.89.6.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.89.6.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.89.6.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.89.6.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.89.6.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.89.6.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.89.6.tgz +0 -0
- package/components/tryghost-mw-version-match-5.89.6.tgz +0 -0
- package/components/tryghost-mw-vhost-5.89.6.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.89.6.tgz +0 -0
- package/components/tryghost-package-json-5.89.6.tgz +0 -0
- package/components/tryghost-post-revisions-5.89.6.tgz +0 -0
- package/components/tryghost-posts-service-5.89.6.tgz +0 -0
- package/components/tryghost-recommendations-5.89.6.tgz +0 -0
- package/components/tryghost-referrers-5.89.6.tgz +0 -0
- package/components/tryghost-security-5.89.6.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.89.6.tgz +0 -0
- package/components/tryghost-slack-notifications-5.89.6.tgz +0 -0
- package/components/tryghost-update-check-service-5.89.6.tgz +0 -0
- package/components/tryghost-verification-trigger-5.89.6.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.89.6.tgz +0 -0
- package/components/tryghost-webmentions-5.89.6.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/modals-a6e383d4.mjs +0 -422
- package/core/built/admin/assets/admin-x-demo/index-116afae1.mjs +0 -12365
- package/core/built/admin/assets/ghost-dark-f9c5f2aae7d01ae36bd6932c0abf683a.css +0 -1
- package/core/built/admin/assets/ghost-f627cc6acd7574a7bdbf2f2988365c78.css +0 -1
- /package/core/built/admin/assets/{chunk.42.90f279da5ca389af68b9.js.LICENSE.txt → chunk.42.eae83e03ed76c8e8c57a.js.LICENSE.txt} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,422 +0,0 @@
|
|
|
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
|