ghost 5.74.2 → 5.74.4
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.74.2.tgz → tryghost-adapter-cache-memory-ttl-5.74.4.tgz} +0 -0
- package/components/{tryghost-adapter-cache-redis-5.74.2.tgz → tryghost-adapter-cache-redis-5.74.4.tgz} +0 -0
- package/components/{tryghost-adapter-manager-5.74.2.tgz → tryghost-adapter-manager-5.74.4.tgz} +0 -0
- package/components/{tryghost-announcement-bar-settings-5.74.2.tgz → tryghost-announcement-bar-settings-5.74.4.tgz} +0 -0
- package/components/{tryghost-api-framework-5.74.2.tgz → tryghost-api-framework-5.74.4.tgz} +0 -0
- package/components/tryghost-api-version-compatibility-service-5.74.4.tgz +0 -0
- package/components/{tryghost-audience-feedback-5.74.2.tgz → tryghost-audience-feedback-5.74.4.tgz} +0 -0
- package/components/tryghost-bookshelf-repository-5.74.4.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.74.4.tgz +0 -0
- package/components/tryghost-collections-5.74.4.tgz +0 -0
- package/components/{tryghost-constants-5.74.2.tgz → tryghost-constants-5.74.4.tgz} +0 -0
- package/components/tryghost-custom-theme-settings-service-5.74.4.tgz +0 -0
- package/components/{tryghost-data-generator-5.74.2.tgz → tryghost-data-generator-5.74.4.tgz} +0 -0
- package/components/tryghost-domain-events-5.74.4.tgz +0 -0
- package/components/tryghost-donations-5.74.4.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.74.4.tgz +0 -0
- package/components/tryghost-email-addresses-5.74.4.tgz +0 -0
- package/components/{tryghost-email-analytics-provider-mailgun-5.74.2.tgz → tryghost-email-analytics-provider-mailgun-5.74.4.tgz} +0 -0
- package/components/tryghost-email-analytics-service-5.74.4.tgz +0 -0
- package/components/{tryghost-email-content-generator-5.74.2.tgz → tryghost-email-content-generator-5.74.4.tgz} +0 -0
- package/components/{tryghost-email-events-5.74.2.tgz → tryghost-email-events-5.74.4.tgz} +0 -0
- package/components/tryghost-email-service-5.74.4.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.74.4.tgz +0 -0
- package/components/{tryghost-event-aware-cache-wrapper-5.74.2.tgz → tryghost-event-aware-cache-wrapper-5.74.4.tgz} +0 -0
- package/components/{tryghost-express-dynamic-redirects-5.74.2.tgz → tryghost-express-dynamic-redirects-5.74.4.tgz} +0 -0
- package/components/{tryghost-external-media-inliner-5.74.2.tgz → tryghost-external-media-inliner-5.74.4.tgz} +0 -0
- package/components/tryghost-extract-api-key-5.74.4.tgz +0 -0
- package/components/{tryghost-html-to-plaintext-5.74.2.tgz → tryghost-html-to-plaintext-5.74.4.tgz} +0 -0
- package/components/tryghost-i18n-5.74.4.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.74.4.tgz +0 -0
- package/components/{tryghost-importer-revue-5.74.2.tgz → tryghost-importer-revue-5.74.4.tgz} +0 -0
- package/components/tryghost-in-memory-repository-5.74.4.tgz +0 -0
- package/components/{tryghost-job-manager-5.74.2.tgz → tryghost-job-manager-5.74.4.tgz} +0 -0
- package/components/{tryghost-link-redirects-5.74.2.tgz → tryghost-link-redirects-5.74.4.tgz} +0 -0
- package/components/tryghost-link-replacer-5.74.4.tgz +0 -0
- package/components/{tryghost-link-tracking-5.74.2.tgz → tryghost-link-tracking-5.74.4.tgz} +0 -0
- package/components/{tryghost-magic-link-5.74.2.tgz → tryghost-magic-link-5.74.4.tgz} +0 -0
- package/components/tryghost-mail-events-5.74.4.tgz +0 -0
- package/components/{tryghost-mailgun-client-5.74.2.tgz → tryghost-mailgun-client-5.74.4.tgz} +0 -0
- package/components/tryghost-member-attribution-5.74.4.tgz +0 -0
- package/components/{tryghost-member-events-5.74.2.tgz → tryghost-member-events-5.74.4.tgz} +0 -0
- package/components/{tryghost-members-api-5.74.2.tgz → tryghost-members-api-5.74.4.tgz} +0 -0
- package/components/tryghost-members-csv-5.74.4.tgz +0 -0
- package/components/tryghost-members-events-service-5.74.4.tgz +0 -0
- package/components/{tryghost-members-importer-5.74.2.tgz → tryghost-members-importer-5.74.4.tgz} +0 -0
- package/components/tryghost-members-offers-5.74.4.tgz +0 -0
- package/components/tryghost-members-payments-5.74.4.tgz +0 -0
- package/components/{tryghost-members-ssr-5.74.2.tgz → tryghost-members-ssr-5.74.4.tgz} +0 -0
- package/components/{tryghost-members-stripe-service-5.74.2.tgz → tryghost-members-stripe-service-5.74.4.tgz} +0 -0
- package/components/{tryghost-mentions-email-report-5.74.2.tgz → tryghost-mentions-email-report-5.74.4.tgz} +0 -0
- package/components/{tryghost-milestones-5.74.2.tgz → tryghost-milestones-5.74.4.tgz} +0 -0
- package/components/tryghost-minifier-5.74.4.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.74.4.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.74.4.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.74.4.tgz +0 -0
- package/components/{tryghost-mw-error-handler-5.74.2.tgz → tryghost-mw-error-handler-5.74.4.tgz} +0 -0
- package/components/tryghost-mw-session-from-token-5.74.4.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.74.4.tgz +0 -0
- package/components/tryghost-mw-version-match-5.74.4.tgz +0 -0
- package/components/tryghost-mw-vhost-5.74.4.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.74.4.tgz +0 -0
- package/components/tryghost-oembed-service-5.74.4.tgz +0 -0
- package/components/{tryghost-package-json-5.74.2.tgz → tryghost-package-json-5.74.4.tgz} +0 -0
- package/components/{tryghost-post-events-5.74.2.tgz → tryghost-post-events-5.74.4.tgz} +0 -0
- package/components/tryghost-post-revisions-5.74.4.tgz +0 -0
- package/components/{tryghost-posts-service-5.74.2.tgz → tryghost-posts-service-5.74.4.tgz} +0 -0
- package/components/tryghost-recommendations-5.74.4.tgz +0 -0
- package/components/{tryghost-referrers-5.74.2.tgz → tryghost-referrers-5.74.4.tgz} +0 -0
- package/components/{tryghost-security-5.74.2.tgz → tryghost-security-5.74.4.tgz} +0 -0
- package/components/tryghost-session-service-5.74.4.tgz +0 -0
- package/components/{tryghost-settings-path-manager-5.74.2.tgz → tryghost-settings-path-manager-5.74.4.tgz} +0 -0
- package/components/{tryghost-slack-notifications-5.74.2.tgz → tryghost-slack-notifications-5.74.4.tgz} +0 -0
- package/components/tryghost-staff-service-5.74.4.tgz +0 -0
- package/components/tryghost-stats-service-5.74.4.tgz +0 -0
- package/components/{tryghost-tiers-5.74.2.tgz → tryghost-tiers-5.74.4.tgz} +0 -0
- package/components/{tryghost-update-check-service-5.74.2.tgz → tryghost-update-check-service-5.74.4.tgz} +0 -0
- package/components/tryghost-verification-trigger-5.74.4.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.74.4.tgz +0 -0
- package/components/{tryghost-webmentions-5.74.2.tgz → tryghost-webmentions-5.74.4.tgz} +0 -0
- package/core/boot.js +4 -0
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +6 -0
- package/core/built/admin/assets/admin-x-demo/index-2fa5a3c2.mjs +8291 -0
- package/core/built/admin/assets/admin-x-demo/modals-10ef986a.mjs +381 -0
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-f1193dcf.mjs → CodeEditorView-b41ea5f8.mjs} +76 -76
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-114d5aab.mjs → index-bc03188e.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-89bf7b3f.mjs → index-e5bc288c.mjs} +8140 -7624
- package/core/built/admin/assets/admin-x-settings/{modals-045fb940.mjs → modals-98e015fa.mjs} +8005 -8080
- package/core/built/admin/assets/{chunk.761.5cfbe0d0f8ec7aefe7bc.js → chunk.137.0297fba124bc9ba1bbc1.js} +691 -686
- package/core/built/admin/assets/{chunk.143.a97e9374518a7e548084.js → chunk.143.0c31227118654150d49c.js} +5 -5
- package/core/built/admin/assets/{chunk.178.cce4259fa74902c8483a.js → chunk.178.b2467b9ba07dbbc9016a.js} +4 -4
- package/core/built/admin/assets/ghost-0456ea5c74bd1b27239c11706d1acae9.css +1 -0
- package/core/built/admin/assets/{ghost-ad9952b86c1d886c49a92339adf702e3.js → ghost-7d0f91cd17901ac15ce0ae64a3091e2a.js} +225 -194
- package/core/built/admin/assets/ghost-dark-29863e517e1917a3b0df74979a6cf03f.css +1 -0
- package/core/built/admin/assets/koenig-lexical/index.css +1 -1
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +7878 -7857
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +119 -119
- package/core/built/admin/index.html +5 -5
- package/core/frontend/helpers/img_url.js +7 -97
- package/core/frontend/meta/image-dimensions.js +34 -6
- package/core/frontend/utils/images.js +100 -0
- package/core/server/api/endpoints/users.js +34 -5
- package/core/server/data/schema/schema.js +1 -1
- package/core/server/models/base/plugins/events.js +20 -1
- package/core/server/services/email-address/EmailAddressServiceWrapper.js +39 -0
- package/core/server/services/email-address/index.js +3 -0
- package/core/server/services/email-service/EmailServiceWrapper.js +2 -0
- package/core/server/services/mail/GhostMailer.js +46 -9
- package/core/server/services/members/service.js +8 -1
- package/core/server/services/newsletters/NewslettersService.js +52 -19
- package/core/server/services/newsletters/index.js +3 -1
- package/core/server/services/offers/OfferBookshelfRepository.js +8 -1
- package/core/server/services/settings/settings-service.js +4 -0
- package/core/server/services/settings-helpers/SettingsHelpers.js +71 -2
- package/core/server/services/settings-helpers/index.js +2 -1
- package/core/shared/config/overrides.json +2 -1
- package/core/shared/labs.js +5 -1
- package/core/shared/sentry.js +56 -33
- package/package.json +150 -149
- package/yarn.lock +700 -790
- package/components/tryghost-api-version-compatibility-service-5.74.2.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.74.2.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.74.2.tgz +0 -0
- package/components/tryghost-collections-5.74.2.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.74.2.tgz +0 -0
- package/components/tryghost-domain-events-5.74.2.tgz +0 -0
- package/components/tryghost-donations-5.74.2.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.74.2.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.74.2.tgz +0 -0
- package/components/tryghost-email-service-5.74.2.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.74.2.tgz +0 -0
- package/components/tryghost-extract-api-key-5.74.2.tgz +0 -0
- package/components/tryghost-i18n-5.74.2.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.74.2.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.74.2.tgz +0 -0
- package/components/tryghost-link-replacer-5.74.2.tgz +0 -0
- package/components/tryghost-mail-events-5.74.2.tgz +0 -0
- package/components/tryghost-member-attribution-5.74.2.tgz +0 -0
- package/components/tryghost-members-csv-5.74.2.tgz +0 -0
- package/components/tryghost-members-events-service-5.74.2.tgz +0 -0
- package/components/tryghost-members-offers-5.74.2.tgz +0 -0
- package/components/tryghost-members-payments-5.74.2.tgz +0 -0
- package/components/tryghost-minifier-5.74.2.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.74.2.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.74.2.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.74.2.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.74.2.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.74.2.tgz +0 -0
- package/components/tryghost-mw-version-match-5.74.2.tgz +0 -0
- package/components/tryghost-mw-vhost-5.74.2.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.74.2.tgz +0 -0
- package/components/tryghost-oembed-service-5.74.2.tgz +0 -0
- package/components/tryghost-post-revisions-5.74.2.tgz +0 -0
- package/components/tryghost-recommendations-5.74.2.tgz +0 -0
- package/components/tryghost-session-service-5.74.2.tgz +0 -0
- package/components/tryghost-staff-service-5.74.2.tgz +0 -0
- package/components/tryghost-stats-service-5.74.2.tgz +0 -0
- package/components/tryghost-verification-trigger-5.74.2.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.74.2.tgz +0 -0
- package/core/built/admin/assets/ghost-ad224505f7a80c242cc1272d1755995d.css +0 -1
- package/core/built/admin/assets/ghost-dark-81e3ee175ed67abaafca3fa228c620a3.css +0 -1
- /package/core/built/admin/assets/{chunk.761.5cfbe0d0f8ec7aefe7bc.js.LICENSE.txt → chunk.137.0297fba124bc9ba1bbc1.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { c as e, j as s, u as O, a as te, b as U, d as $, B as K, e as ae, H as T, N as D, f as le } from "./index-2fa5a3c2.mjs";
|
|
2
|
+
const ne = ({
|
|
3
|
+
shiftY: l,
|
|
4
|
+
footerBgColorClass: o = "bg-white dark:bg-black",
|
|
5
|
+
contentBgColorClass: i = "bg-white dark:bg-black",
|
|
6
|
+
height: c = 96,
|
|
7
|
+
children: m
|
|
8
|
+
}) => {
|
|
9
|
+
const f = e(
|
|
10
|
+
"w-100 sticky bottom-[-24px] z-[297] m-0 box-border p-0"
|
|
11
|
+
), g = l ? `calc(${l} - 24px)` : "-24px", x = `${c + 24}px`, u = e(
|
|
12
|
+
"sticky z-[298] block h-[24px]",
|
|
13
|
+
i
|
|
14
|
+
), j = "0", h = e(
|
|
15
|
+
"sticky z-[299] mb-[-24px] flex items-center justify-between",
|
|
16
|
+
"h-[96px]",
|
|
17
|
+
o
|
|
18
|
+
), p = "0", k = `${c}px`, b = "sticky mx-2 block h-[24px] rounded-full shadow-[0_0_0_1px_rgba(0,0,0,.025),0_-8px_16px_-3px_rgba(0,0,0,.08)]", B = l ? `calc(${l} + ${c - 24}px)` : `${c - 24}px`;
|
|
19
|
+
return /* @__PURE__ */ s.jsxs(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: f,
|
|
23
|
+
style: {
|
|
24
|
+
bottom: g,
|
|
25
|
+
height: x
|
|
26
|
+
},
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ s.jsx(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: u,
|
|
32
|
+
style: {
|
|
33
|
+
bottom: j
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ s.jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
className: h,
|
|
41
|
+
style: {
|
|
42
|
+
bottom: p,
|
|
43
|
+
height: k
|
|
44
|
+
},
|
|
45
|
+
children: m
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ s.jsx(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: b,
|
|
52
|
+
style: {
|
|
53
|
+
bottom: B
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
function F(l, o, i = {}) {
|
|
62
|
+
l ? D.show(ce, {
|
|
63
|
+
title: "Are you sure you want to leave this page?",
|
|
64
|
+
prompt: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ s.jsx("p", { children: "Hey there! It looks like you didn't save the changes you made." }),
|
|
66
|
+
/* @__PURE__ */ s.jsx("p", { children: "Save before you go!" })
|
|
67
|
+
] }),
|
|
68
|
+
okLabel: "Leave",
|
|
69
|
+
cancelLabel: "Stay",
|
|
70
|
+
okColor: "red",
|
|
71
|
+
onOk: (c) => {
|
|
72
|
+
o(), c == null || c.remove();
|
|
73
|
+
},
|
|
74
|
+
...i
|
|
75
|
+
}) : o();
|
|
76
|
+
}
|
|
77
|
+
const oe = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", W = ({
|
|
78
|
+
size: l = "md",
|
|
79
|
+
width: o,
|
|
80
|
+
height: i,
|
|
81
|
+
testId: c,
|
|
82
|
+
title: m,
|
|
83
|
+
okLabel: f = "OK",
|
|
84
|
+
okLoading: g = !1,
|
|
85
|
+
cancelLabel: x = "Cancel",
|
|
86
|
+
footer: u,
|
|
87
|
+
header: j,
|
|
88
|
+
leftButtonProps: h,
|
|
89
|
+
buttonsDisabled: p,
|
|
90
|
+
padding: k = !0,
|
|
91
|
+
onOk: b,
|
|
92
|
+
okColor: B = "black",
|
|
93
|
+
onCancel: N,
|
|
94
|
+
topRightContent: v,
|
|
95
|
+
hideXOnMobile: X = !1,
|
|
96
|
+
afterClose: C,
|
|
97
|
+
children: q,
|
|
98
|
+
backDrop: J = !0,
|
|
99
|
+
backDropClick: P = !0,
|
|
100
|
+
stickyFooter: z = !1,
|
|
101
|
+
stickyHeader: Q = !1,
|
|
102
|
+
scrolling: R = !0,
|
|
103
|
+
dirty: E = !1,
|
|
104
|
+
animate: V = !0,
|
|
105
|
+
formSheet: M = !1,
|
|
106
|
+
enableCMDS: Z = !0
|
|
107
|
+
}) => {
|
|
108
|
+
const H = O(), { setGlobalDirtyState: G } = te(), [I, Y] = U(!1);
|
|
109
|
+
$(() => {
|
|
110
|
+
G(E);
|
|
111
|
+
}, [E, G]), $(() => {
|
|
112
|
+
const r = (w) => {
|
|
113
|
+
w.key === "Escape" && (document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), setTimeout(() => {
|
|
114
|
+
N ? N() : F(E, () => {
|
|
115
|
+
H.remove(), C == null || C();
|
|
116
|
+
});
|
|
117
|
+
}));
|
|
118
|
+
};
|
|
119
|
+
return document.addEventListener("keydown", r), () => {
|
|
120
|
+
document.removeEventListener("keydown", r);
|
|
121
|
+
};
|
|
122
|
+
}, [H, E, C, N]), $(() => {
|
|
123
|
+
const r = setTimeout(() => {
|
|
124
|
+
Y(!0);
|
|
125
|
+
}, 250);
|
|
126
|
+
return () => clearTimeout(r);
|
|
127
|
+
}, []), $(() => {
|
|
128
|
+
if (b) {
|
|
129
|
+
const r = (w) => {
|
|
130
|
+
(w.metaKey || w.ctrlKey) && w.key === "s" && (w.preventDefault(), b());
|
|
131
|
+
};
|
|
132
|
+
if (Z)
|
|
133
|
+
return window.addEventListener("keydown", r), () => {
|
|
134
|
+
window.removeEventListener("keydown", r);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const _ = [];
|
|
139
|
+
let A;
|
|
140
|
+
const S = () => {
|
|
141
|
+
F(E, () => {
|
|
142
|
+
H.remove(), C == null || C();
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
u || (x && _.push({
|
|
146
|
+
key: "cancel-modal",
|
|
147
|
+
label: x,
|
|
148
|
+
color: "outline",
|
|
149
|
+
onClick: N || (() => {
|
|
150
|
+
S();
|
|
151
|
+
}),
|
|
152
|
+
disabled: p
|
|
153
|
+
}), f && _.push({
|
|
154
|
+
key: "ok-modal",
|
|
155
|
+
label: f,
|
|
156
|
+
color: B,
|
|
157
|
+
className: "min-w-[80px]",
|
|
158
|
+
onClick: b,
|
|
159
|
+
disabled: p,
|
|
160
|
+
loading: g
|
|
161
|
+
}));
|
|
162
|
+
let a = e(
|
|
163
|
+
"relative z-50 mx-auto flex max-h-[100%] w-full flex-col justify-between overflow-x-hidden bg-white dark:bg-black",
|
|
164
|
+
l !== "bleed" && "rounded",
|
|
165
|
+
M ? "shadow-md" : "shadow-xl",
|
|
166
|
+
V && !M && !I && "animate-modal-in",
|
|
167
|
+
M && !I && "animate-modal-in-reverse",
|
|
168
|
+
R ? "overflow-y-auto" : "overflow-y-hidden"
|
|
169
|
+
), n = e(
|
|
170
|
+
"fixed inset-0 z-[1000] h-[100vh] w-[100vw]"
|
|
171
|
+
), d = "", t = e(
|
|
172
|
+
!v || v === "close" ? "" : "flex items-center justify-between gap-5"
|
|
173
|
+
);
|
|
174
|
+
switch (Q && (t = e(
|
|
175
|
+
t,
|
|
176
|
+
"sticky top-0 z-[200] -mb-4 bg-white !pb-4 dark:bg-black"
|
|
177
|
+
)), l) {
|
|
178
|
+
case "sm":
|
|
179
|
+
a = e(
|
|
180
|
+
a,
|
|
181
|
+
"max-w-[480px]"
|
|
182
|
+
), n = e(
|
|
183
|
+
n,
|
|
184
|
+
"p-4 md:p-[8vmin]"
|
|
185
|
+
), d = "p-8", t = e(
|
|
186
|
+
t,
|
|
187
|
+
"-inset-x-8"
|
|
188
|
+
);
|
|
189
|
+
break;
|
|
190
|
+
case "md":
|
|
191
|
+
a = e(
|
|
192
|
+
a,
|
|
193
|
+
"max-w-[720px]"
|
|
194
|
+
), n = e(
|
|
195
|
+
n,
|
|
196
|
+
"p-4 md:p-[8vmin]"
|
|
197
|
+
), d = "p-8", t = e(
|
|
198
|
+
t,
|
|
199
|
+
"-inset-x-8"
|
|
200
|
+
);
|
|
201
|
+
break;
|
|
202
|
+
case "lg":
|
|
203
|
+
a = e(
|
|
204
|
+
a,
|
|
205
|
+
"max-w-[1020px]"
|
|
206
|
+
), n = e(
|
|
207
|
+
n,
|
|
208
|
+
"p-4 md:p-[4vmin]"
|
|
209
|
+
), d = "p-8", t = e(
|
|
210
|
+
t,
|
|
211
|
+
"-inset-x-8"
|
|
212
|
+
);
|
|
213
|
+
break;
|
|
214
|
+
case "xl":
|
|
215
|
+
a = e(
|
|
216
|
+
a,
|
|
217
|
+
"max-w-[1240px]0"
|
|
218
|
+
), n = e(
|
|
219
|
+
n,
|
|
220
|
+
"p-4 md:p-[3vmin]"
|
|
221
|
+
), d = "p-10", t = e(
|
|
222
|
+
t,
|
|
223
|
+
"-inset-x-10 -top-10"
|
|
224
|
+
);
|
|
225
|
+
break;
|
|
226
|
+
case "full":
|
|
227
|
+
a = e(
|
|
228
|
+
a,
|
|
229
|
+
"h-full"
|
|
230
|
+
), n = e(
|
|
231
|
+
n,
|
|
232
|
+
"p-4 md:p-[3vmin]"
|
|
233
|
+
), d = "p-10", t = e(
|
|
234
|
+
t,
|
|
235
|
+
"-inset-x-10"
|
|
236
|
+
);
|
|
237
|
+
break;
|
|
238
|
+
case "bleed":
|
|
239
|
+
a = e(
|
|
240
|
+
a,
|
|
241
|
+
"h-full"
|
|
242
|
+
), d = "p-10", t = e(
|
|
243
|
+
t,
|
|
244
|
+
"-inset-x-10"
|
|
245
|
+
);
|
|
246
|
+
break;
|
|
247
|
+
default:
|
|
248
|
+
n = e(
|
|
249
|
+
n,
|
|
250
|
+
"p-4 md:p-[8vmin]"
|
|
251
|
+
), d = "p-8", t = e(
|
|
252
|
+
t,
|
|
253
|
+
"-inset-x-8"
|
|
254
|
+
);
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
k || (d = "p-0"), a = e(
|
|
258
|
+
a
|
|
259
|
+
), t = e(
|
|
260
|
+
t,
|
|
261
|
+
d,
|
|
262
|
+
"pb-0"
|
|
263
|
+
), A = e(
|
|
264
|
+
d,
|
|
265
|
+
"py-0"
|
|
266
|
+
), n = e(
|
|
267
|
+
n,
|
|
268
|
+
"max-[800px]:!pb-20"
|
|
269
|
+
);
|
|
270
|
+
const ee = e(
|
|
271
|
+
`${d} ${z ? "py-6" : ""}`,
|
|
272
|
+
"flex w-full items-center justify-between"
|
|
273
|
+
);
|
|
274
|
+
A = e(
|
|
275
|
+
A,
|
|
276
|
+
(l === "full" || l === "bleed" || i === "full" || typeof i == "number") && "grow"
|
|
277
|
+
);
|
|
278
|
+
const se = (r) => {
|
|
279
|
+
r.target === r.currentTarget && P && S();
|
|
280
|
+
}, L = {};
|
|
281
|
+
typeof o == "number" ? (L.width = "100%", L.maxWidth = o + "px") : o === "full" && (a = e(
|
|
282
|
+
a,
|
|
283
|
+
"w-full"
|
|
284
|
+
)), typeof i == "number" ? (L.height = "100%", L.maxHeight = i + "px") : i === "full" && (a = e(
|
|
285
|
+
a,
|
|
286
|
+
"h-full"
|
|
287
|
+
));
|
|
288
|
+
let y;
|
|
289
|
+
return u ? y = u : u === !1 ? A += " pb-0 " : y = /* @__PURE__ */ s.jsxs("div", { className: ee, children: [
|
|
290
|
+
/* @__PURE__ */ s.jsx("div", { children: h && /* @__PURE__ */ s.jsx(K, { ...h }) }),
|
|
291
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex gap-3", children: /* @__PURE__ */ s.jsx(ae, { buttons: _ }) })
|
|
292
|
+
] }), y = z ? /* @__PURE__ */ s.jsx(ne, { height: 84, children: y }) : /* @__PURE__ */ s.jsx(s.Fragment, { children: y }), /* @__PURE__ */ s.jsxs("div", { className: n, id: "modal-backdrop", onMouseDown: se, children: [
|
|
293
|
+
/* @__PURE__ */ s.jsx("div", { className: e(
|
|
294
|
+
"pointer-events-none fixed inset-0 z-0",
|
|
295
|
+
J && !M && oe,
|
|
296
|
+
M && "bg-[rgba(98,109,121,0.08)]"
|
|
297
|
+
) }),
|
|
298
|
+
/* @__PURE__ */ s.jsxs("section", { className: a, "data-testid": c, style: L, children: [
|
|
299
|
+
j === !1 ? "" : !v || v === "close" ? /* @__PURE__ */ s.jsxs("header", { className: t, children: [
|
|
300
|
+
m && /* @__PURE__ */ s.jsx(T, { level: 3, children: m }),
|
|
301
|
+
/* @__PURE__ */ s.jsx("div", { className: `${v !== "close" && "md:!invisible md:!hidden"} ${X && "hidden"} absolute right-6 top-6`, children: /* @__PURE__ */ s.jsx(K, { className: "-m-2 cursor-pointer p-2 opacity-50 hover:opacity-100", icon: "close", iconColorClass: "text-black dark:text-white", size: "sm", unstyled: !0, onClick: S }) })
|
|
302
|
+
] }) : /* @__PURE__ */ s.jsxs("header", { className: t, children: [
|
|
303
|
+
m && /* @__PURE__ */ s.jsx(T, { level: 3, children: m }),
|
|
304
|
+
v
|
|
305
|
+
] }),
|
|
306
|
+
/* @__PURE__ */ s.jsx("div", { className: A, children: q }),
|
|
307
|
+
y
|
|
308
|
+
] })
|
|
309
|
+
] });
|
|
310
|
+
}, ie = ({
|
|
311
|
+
title: l = "Are you sure?",
|
|
312
|
+
prompt: o,
|
|
313
|
+
cancelLabel: i = "Cancel",
|
|
314
|
+
okLabel: c = "OK",
|
|
315
|
+
okRunningLabel: m = "...",
|
|
316
|
+
okColor: f = "black",
|
|
317
|
+
onCancel: g,
|
|
318
|
+
onOk: x,
|
|
319
|
+
customFooter: u,
|
|
320
|
+
formSheet: j = !0
|
|
321
|
+
}) => {
|
|
322
|
+
const h = O(), [p, k] = U("");
|
|
323
|
+
return /* @__PURE__ */ s.jsx(
|
|
324
|
+
W,
|
|
325
|
+
{
|
|
326
|
+
backDropClick: !1,
|
|
327
|
+
buttonsDisabled: p === "running",
|
|
328
|
+
cancelLabel: i,
|
|
329
|
+
footer: u,
|
|
330
|
+
formSheet: j,
|
|
331
|
+
okColor: f,
|
|
332
|
+
okLabel: p === "running" ? m : c,
|
|
333
|
+
testId: "confirmation-modal",
|
|
334
|
+
title: l,
|
|
335
|
+
width: 540,
|
|
336
|
+
onCancel: g,
|
|
337
|
+
onOk: async () => {
|
|
338
|
+
k("running");
|
|
339
|
+
try {
|
|
340
|
+
await (x == null ? void 0 : x(h));
|
|
341
|
+
} catch (b) {
|
|
342
|
+
console.error("Unhandled Promise Rejection. Make sure you catch errors in your onOk handler.", b);
|
|
343
|
+
}
|
|
344
|
+
k("");
|
|
345
|
+
},
|
|
346
|
+
children: /* @__PURE__ */ s.jsx("div", { className: "py-4 leading-9", children: o })
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
}, ce = D.create(ie), de = D.create(() => {
|
|
350
|
+
const { updateRoute: l } = le(), o = D.useModal();
|
|
351
|
+
return /* @__PURE__ */ s.jsx(
|
|
352
|
+
W,
|
|
353
|
+
{
|
|
354
|
+
afterClose: () => {
|
|
355
|
+
l("");
|
|
356
|
+
},
|
|
357
|
+
cancelLabel: "",
|
|
358
|
+
okLabel: "Close",
|
|
359
|
+
size: "sm",
|
|
360
|
+
title: "About",
|
|
361
|
+
onOk: () => {
|
|
362
|
+
l(""), o.remove();
|
|
363
|
+
},
|
|
364
|
+
children: /* @__PURE__ */ s.jsxs("div", { className: "mt-3 flex flex-col gap-4", children: [
|
|
365
|
+
/* @__PURE__ */ s.jsx("p", { children: "You're looking at a React app inside Ghost Admin. It uses common AdminX framework and Design System packages, and works seamlessly with the current Admin's routing." }),
|
|
366
|
+
/* @__PURE__ */ s.jsx("p", { children: "At the moment the look and feel follows the current Admin's style to blend in with existing pages. However the system is built in a very flexible way to allow easy updates in the future." }),
|
|
367
|
+
/* @__PURE__ */ s.jsx(T, { className: "-mb-2 mt-4", level: 5, children: "Contents" }),
|
|
368
|
+
/* @__PURE__ */ s.jsxs("p", { children: [
|
|
369
|
+
"The demo uses a mocked list of members — it's ",
|
|
370
|
+
/* @__PURE__ */ s.jsx("strong", { children: "not" }),
|
|
371
|
+
" ",
|
|
372
|
+
"the actual or future design of members in Ghost Admin. Instead, the pages showcase common design patterns like a list and detail, navigation, modals and toasts."
|
|
373
|
+
] })
|
|
374
|
+
] })
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
}), me = { DemoModal: de };
|
|
378
|
+
export {
|
|
379
|
+
me as default
|
|
380
|
+
};
|
|
381
|
+
//# sourceMappingURL=modals-10ef986a.mjs.map
|