ghost 5.88.3 → 5.89.1
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.1.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.89.1.tgz +0 -0
- package/components/tryghost-adapter-manager-5.89.1.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.89.1.tgz +0 -0
- package/components/tryghost-api-framework-5.89.1.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-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-bootstrap-socket-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-custom-theme-settings-service-5.89.1.tgz +0 -0
- package/components/{tryghost-data-generator-5.88.3.tgz → tryghost-data-generator-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.88.3.tgz → 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-content-generator-5.89.1.tgz +0 -0
- package/components/tryghost-email-events-5.89.1.tgz +0 -0
- package/components/{tryghost-email-service-5.88.3.tgz → tryghost-email-service-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-ghost-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-job-manager-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-link-tracking-5.89.1.tgz +0 -0
- package/components/tryghost-magic-link-5.89.1.tgz +0 -0
- package/components/tryghost-mail-events-5.89.1.tgz +0 -0
- package/components/tryghost-mailgun-client-5.89.1.tgz +0 -0
- package/components/tryghost-member-attribution-5.89.1.tgz +0 -0
- package/components/tryghost-member-events-5.89.1.tgz +0 -0
- package/components/tryghost-members-api-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-importer-5.88.3.tgz → tryghost-members-importer-5.89.1.tgz} +0 -0
- package/components/tryghost-members-offers-5.89.1.tgz +0 -0
- package/components/tryghost-members-payments-5.89.1.tgz +0 -0
- package/components/tryghost-members-ssr-5.89.1.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.89.1.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.89.1.tgz +0 -0
- package/components/tryghost-milestones-5.89.1.tgz +0 -0
- package/components/tryghost-minifier-5.89.1.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-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-nql-filter-expansions-5.89.1.tgz +0 -0
- package/components/tryghost-oembed-service-5.89.1.tgz +0 -0
- package/components/tryghost-package-json-5.89.1.tgz +0 -0
- package/components/tryghost-post-events-5.89.1.tgz +0 -0
- package/components/{tryghost-post-revisions-5.88.3.tgz → tryghost-post-revisions-5.89.1.tgz} +0 -0
- package/components/tryghost-posts-service-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-security-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-slack-notifications-5.89.1.tgz +0 -0
- package/components/tryghost-staff-service-5.89.1.tgz +0 -0
- package/components/tryghost-stats-service-5.89.1.tgz +0 -0
- package/components/tryghost-tiers-5.89.1.tgz +0 -0
- package/components/tryghost-update-check-service-5.89.1.tgz +0 -0
- package/components/tryghost-verification-trigger-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/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-d7494526.mjs → index-980aeac1.mjs} +3107 -3030
- package/core/built/admin/assets/admin-x-activitypub/{modals-8098b85c.mjs → modals-e013f67b.mjs} +182 -191
- package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
- package/core/built/admin/assets/admin-x-demo/{index-5e68f89b.mjs → index-71687654.mjs} +801 -796
- package/core/built/admin/assets/admin-x-demo/{modals-f789a6c4.mjs → modals-4b59bbd8.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{CodeEditorView-3601b44e.mjs → CodeEditorView-8dcd0ded.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-e7c4aa3c.mjs → index-01e25660.mjs} +2527 -2522
- package/core/built/admin/assets/admin-x-settings/{index-0b24e982.mjs → index-541636a3.mjs} +2365 -2272
- package/core/built/admin/assets/admin-x-settings/{modals-f8ab7cf2.mjs → modals-172c4d1c.mjs} +732 -726
- package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js → chunk.42.a0b3ca84230d788d0e11.js} +209 -196
- package/core/built/admin/assets/{chunk.524.4004209e970256976de7.js → chunk.524.e09e59707739cbab5488.js} +5 -5
- package/core/built/admin/assets/{chunk.582.eab996a9d6616a80727a.js → chunk.582.8aa2a0331d317e552bbe.js} +6 -6
- package/core/built/admin/assets/codemirror/{codemirror-98996fc475bb3df2b1b82dd701d32bc0.js → codemirror-91774021e5e17ea08db5cd2ed9f3e664.js} +5 -5
- package/core/built/admin/assets/{ghost-cb98187b163a0d8b42d752ab890e039a.css → ghost-87438e5801b7bb0f2e3497a68572a529.css} +1 -1
- package/core/built/admin/assets/{ghost-a9fa385e2a92cc3686349b2dea0249d2.js → ghost-b5e602d62644bd997ce54c647953f437.js} +154 -142
- package/core/built/admin/assets/{ghost-dark-0d78b0a11f5c2604992de20c1bfe396f.css → ghost-dark-f0b3a9ea961171ad4f736edbab905a0c.css} +1 -1
- package/core/built/admin/assets/{vendor-051d43ec47258b77ffd2fcc21a6d8c50.js → vendor-35f20b2f9b6201dcd4a00c8acac98aa6.js} +9 -9
- package/core/built/admin/index.html +6 -6
- package/core/frontend/meta/blog-logo.js +1 -1
- package/core/frontend/services/rss/renderer.js +1 -1
- package/core/server/data/migrations/versions/5.89/2024-07-30-19-51-06-backfill-offer-redemptions.js +64 -0
- package/core/server/lib/image/BlogIcon.js +13 -5
- package/core/server/services/members/middleware.js +1 -1
- package/core/server/services/slack.js +3 -3
- package/core/server/services/staff/index.js +2 -0
- package/core/shared/config/env/config.development.json +12 -0
- package/package.json +168 -168
- package/yarn.lock +963 -1076
- package/components/tryghost-adapter-cache-memory-ttl-5.88.3.tgz +0 -0
- package/components/tryghost-adapter-cache-redis-5.88.3.tgz +0 -0
- package/components/tryghost-adapter-manager-5.88.3.tgz +0 -0
- package/components/tryghost-announcement-bar-settings-5.88.3.tgz +0 -0
- package/components/tryghost-api-framework-5.88.3.tgz +0 -0
- package/components/tryghost-api-version-compatibility-service-5.88.3.tgz +0 -0
- package/components/tryghost-audience-feedback-5.88.3.tgz +0 -0
- package/components/tryghost-bookshelf-repository-5.88.3.tgz +0 -0
- package/components/tryghost-bootstrap-socket-5.88.3.tgz +0 -0
- package/components/tryghost-collections-5.88.3.tgz +0 -0
- package/components/tryghost-constants-5.88.3.tgz +0 -0
- package/components/tryghost-custom-theme-settings-service-5.88.3.tgz +0 -0
- package/components/tryghost-domain-events-5.88.3.tgz +0 -0
- package/components/tryghost-donations-5.88.3.tgz +0 -0
- package/components/tryghost-dynamic-routing-events-5.88.3.tgz +0 -0
- package/components/tryghost-email-analytics-provider-mailgun-5.88.3.tgz +0 -0
- package/components/tryghost-email-analytics-service-5.88.3.tgz +0 -0
- package/components/tryghost-email-content-generator-5.88.3.tgz +0 -0
- package/components/tryghost-email-events-5.88.3.tgz +0 -0
- package/components/tryghost-email-suppression-list-5.88.3.tgz +0 -0
- package/components/tryghost-express-dynamic-redirects-5.88.3.tgz +0 -0
- package/components/tryghost-external-media-inliner-5.88.3.tgz +0 -0
- package/components/tryghost-extract-api-key-5.88.3.tgz +0 -0
- package/components/tryghost-ghost-5.88.3.tgz +0 -0
- package/components/tryghost-html-to-plaintext-5.88.3.tgz +0 -0
- package/components/tryghost-i18n-5.88.3.tgz +0 -0
- package/components/tryghost-importer-handler-content-files-5.88.3.tgz +0 -0
- package/components/tryghost-importer-revue-5.88.3.tgz +0 -0
- package/components/tryghost-in-memory-repository-5.88.3.tgz +0 -0
- package/components/tryghost-job-manager-5.88.3.tgz +0 -0
- package/components/tryghost-link-redirects-5.88.3.tgz +0 -0
- package/components/tryghost-link-replacer-5.88.3.tgz +0 -0
- package/components/tryghost-link-tracking-5.88.3.tgz +0 -0
- package/components/tryghost-magic-link-5.88.3.tgz +0 -0
- package/components/tryghost-mail-events-5.88.3.tgz +0 -0
- package/components/tryghost-mailgun-client-5.88.3.tgz +0 -0
- package/components/tryghost-member-attribution-5.88.3.tgz +0 -0
- package/components/tryghost-member-events-5.88.3.tgz +0 -0
- package/components/tryghost-members-api-5.88.3.tgz +0 -0
- package/components/tryghost-members-csv-5.88.3.tgz +0 -0
- package/components/tryghost-members-events-service-5.88.3.tgz +0 -0
- package/components/tryghost-members-offers-5.88.3.tgz +0 -0
- package/components/tryghost-members-payments-5.88.3.tgz +0 -0
- package/components/tryghost-members-ssr-5.88.3.tgz +0 -0
- package/components/tryghost-members-stripe-service-5.88.3.tgz +0 -0
- package/components/tryghost-mentions-email-report-5.88.3.tgz +0 -0
- package/components/tryghost-milestones-5.88.3.tgz +0 -0
- package/components/tryghost-minifier-5.88.3.tgz +0 -0
- package/components/tryghost-model-to-domain-event-interceptor-5.88.3.tgz +0 -0
- package/components/tryghost-mw-api-version-mismatch-5.88.3.tgz +0 -0
- package/components/tryghost-mw-cache-control-5.88.3.tgz +0 -0
- package/components/tryghost-mw-error-handler-5.88.3.tgz +0 -0
- package/components/tryghost-mw-session-from-token-5.88.3.tgz +0 -0
- package/components/tryghost-mw-update-user-last-seen-5.88.3.tgz +0 -0
- package/components/tryghost-mw-version-match-5.88.3.tgz +0 -0
- package/components/tryghost-mw-vhost-5.88.3.tgz +0 -0
- package/components/tryghost-nql-filter-expansions-5.88.3.tgz +0 -0
- package/components/tryghost-oembed-service-5.88.3.tgz +0 -0
- package/components/tryghost-package-json-5.88.3.tgz +0 -0
- package/components/tryghost-post-events-5.88.3.tgz +0 -0
- package/components/tryghost-posts-service-5.88.3.tgz +0 -0
- package/components/tryghost-recommendations-5.88.3.tgz +0 -0
- package/components/tryghost-referrers-5.88.3.tgz +0 -0
- package/components/tryghost-security-5.88.3.tgz +0 -0
- package/components/tryghost-session-service-5.88.3.tgz +0 -0
- package/components/tryghost-settings-path-manager-5.88.3.tgz +0 -0
- package/components/tryghost-slack-notifications-5.88.3.tgz +0 -0
- package/components/tryghost-staff-service-5.88.3.tgz +0 -0
- package/components/tryghost-stats-service-5.88.3.tgz +0 -0
- package/components/tryghost-tiers-5.88.3.tgz +0 -0
- package/components/tryghost-update-check-service-5.88.3.tgz +0 -0
- package/components/tryghost-verification-trigger-5.88.3.tgz +0 -0
- package/components/tryghost-version-notifications-data-service-5.88.3.tgz +0 -0
- package/components/tryghost-webmentions-5.88.3.tgz +0 -0
- /package/core/built/admin/assets/{chunk.42.0879e40a4de3db25b177.js.LICENSE.txt → chunk.42.a0b3ca84230d788d0e11.js.LICENSE.txt} +0 -0
package/core/built/admin/assets/admin-x-activitypub/{modals-8098b85c.mjs → modals-e013f67b.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { u as he, a as xe, c as
|
|
1
|
+
import { u as he, a as xe, c as o, j as t, H as X, b as fe, d as ne, e as be, f as B, g as z, B as K, h as we, N as E, S as ge, s as ye, i as ve, n as re, p as ke, k as je, l as Fe, m as se, o as Me, q as Y, r as D, A as G, t as Re, L as ie, v as ae, w as Z, x as le, y as ce } from "./index-980aeac1.mjs";
|
|
2
2
|
const Ce = ({
|
|
3
|
-
type:
|
|
4
|
-
inputRef:
|
|
3
|
+
type: r = "text",
|
|
4
|
+
inputRef: s,
|
|
5
5
|
title: e,
|
|
6
|
-
hideTitle:
|
|
6
|
+
hideTitle: n,
|
|
7
7
|
value: a,
|
|
8
8
|
error: i,
|
|
9
9
|
placeholder: u,
|
|
@@ -15,43 +15,43 @@ const Ce = ({
|
|
|
15
15
|
clearBg: k = !1,
|
|
16
16
|
className: j = "",
|
|
17
17
|
maxLength: F,
|
|
18
|
-
containerClassName:
|
|
18
|
+
containerClassName: S = "",
|
|
19
19
|
hintClassName: y = "",
|
|
20
20
|
unstyled: f = !1,
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: U,
|
|
22
22
|
...M
|
|
23
23
|
}) => {
|
|
24
24
|
const T = he(), { setFocusState: H } = xe(), _ = (C) => {
|
|
25
25
|
x == null || x(C), H(!0);
|
|
26
26
|
}, I = (C) => {
|
|
27
27
|
w == null || w(C), H(!1);
|
|
28
|
-
},
|
|
28
|
+
}, P = o(
|
|
29
29
|
"relative order-2 flex w-full items-center",
|
|
30
|
-
e && !
|
|
31
|
-
), q = !f &&
|
|
30
|
+
e && !n && "mt-1.5"
|
|
31
|
+
), q = !f && o(
|
|
32
32
|
"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",
|
|
33
33
|
i ? "border-red bg-white dark:bg-grey-925" : "border-transparent bg-grey-150 dark:bg-grey-900",
|
|
34
|
-
|
|
35
|
-
), R = !f &&
|
|
34
|
+
U && "bg-grey-50 peer-hover:bg-grey-50 dark:bg-grey-950 dark:peer-hover:bg-grey-950"
|
|
35
|
+
), R = !f && o(
|
|
36
36
|
"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",
|
|
37
|
-
|
|
37
|
+
U ? "cursor-not-allowed text-grey-600 opacity-60 dark:text-grey-800" : "dark:text-white",
|
|
38
38
|
c ? "w-0 grow rounded-l-lg" : "rounded-lg",
|
|
39
39
|
j
|
|
40
|
-
),
|
|
40
|
+
), Q = !f && o(
|
|
41
41
|
"z-[1] order-3 rounded-r-lg",
|
|
42
42
|
c ? typeof c == "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"
|
|
43
43
|
);
|
|
44
|
-
let v = /* @__PURE__ */
|
|
45
|
-
const
|
|
44
|
+
let v = /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
45
|
+
const W = /* @__PURE__ */ t.jsx(
|
|
46
46
|
"input",
|
|
47
47
|
{
|
|
48
|
-
ref:
|
|
48
|
+
ref: s,
|
|
49
49
|
className: R || j,
|
|
50
|
-
disabled:
|
|
50
|
+
disabled: U,
|
|
51
51
|
id: T,
|
|
52
52
|
maxLength: F,
|
|
53
53
|
placeholder: u,
|
|
54
|
-
type:
|
|
54
|
+
type: r,
|
|
55
55
|
value: a,
|
|
56
56
|
onBlur: I,
|
|
57
57
|
onChange: h,
|
|
@@ -59,39 +59,39 @@ const Ce = ({
|
|
|
59
59
|
...M
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
return v = /* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
!f && !k && /* @__PURE__ */
|
|
65
|
-
c && /* @__PURE__ */
|
|
66
|
-
] }), y =
|
|
62
|
+
return v = /* @__PURE__ */ t.jsxs("div", { className: P, children: [
|
|
63
|
+
W,
|
|
64
|
+
!f && !k && /* @__PURE__ */ t.jsx("div", { className: q || "" }),
|
|
65
|
+
c && /* @__PURE__ */ t.jsx("span", { className: Q || "", children: c })
|
|
66
|
+
] }), y = o(
|
|
67
67
|
"order-3",
|
|
68
68
|
y
|
|
69
|
-
),
|
|
69
|
+
), S = o(
|
|
70
70
|
"flex flex-col",
|
|
71
|
-
|
|
72
|
-
), e || l ? /* @__PURE__ */
|
|
71
|
+
S
|
|
72
|
+
), e || l ? /* @__PURE__ */ t.jsxs("div", { className: S, children: [
|
|
73
73
|
v,
|
|
74
|
-
e && /* @__PURE__ */
|
|
75
|
-
l && /* @__PURE__ */
|
|
74
|
+
e && /* @__PURE__ */ t.jsx(X, { className: n ? "sr-only" : "order-1", htmlFor: T, useLabelTag: !0, children: e }),
|
|
75
|
+
l && /* @__PURE__ */ t.jsx(fe, { className: y, color: i ? "red" : "default", children: l })
|
|
76
76
|
] }) : v;
|
|
77
77
|
}, Le = ({
|
|
78
|
-
shiftY:
|
|
79
|
-
footerBgColorClass:
|
|
78
|
+
shiftY: r,
|
|
79
|
+
footerBgColorClass: s = "bg-white dark:bg-black",
|
|
80
80
|
contentBgColorClass: e = "bg-white dark:bg-black",
|
|
81
|
-
height:
|
|
81
|
+
height: n = 96,
|
|
82
82
|
children: a
|
|
83
83
|
}) => {
|
|
84
|
-
const i =
|
|
84
|
+
const i = o(
|
|
85
85
|
"w-100 sticky bottom-[-24px] z-[297] m-0 box-border p-0"
|
|
86
|
-
), u =
|
|
86
|
+
), u = r ? `calc(${r} - 24px)` : "-24px", c = `${n + 24}px`, l = o(
|
|
87
87
|
"sticky z-[298] block h-[24px]",
|
|
88
88
|
e
|
|
89
|
-
), h = "0", x =
|
|
89
|
+
), h = "0", x = o(
|
|
90
90
|
"sticky z-[299] mb-[-24px] flex items-center justify-between",
|
|
91
91
|
"h-[96px]",
|
|
92
|
-
|
|
93
|
-
), w = "0", k = `${
|
|
94
|
-
return /* @__PURE__ */
|
|
92
|
+
s
|
|
93
|
+
), w = "0", k = `${n}px`, j = "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)]", F = r ? `calc(${r} + ${n - 24}px)` : `${n - 24}px`;
|
|
94
|
+
return /* @__PURE__ */ t.jsxs(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
className: i,
|
|
@@ -100,7 +100,7 @@ const Ce = ({
|
|
|
100
100
|
height: c
|
|
101
101
|
},
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ t.jsx(
|
|
104
104
|
"div",
|
|
105
105
|
{
|
|
106
106
|
className: l,
|
|
@@ -109,7 +109,7 @@ const Ce = ({
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ t.jsx(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: x,
|
|
@@ -120,7 +120,7 @@ const Ce = ({
|
|
|
120
120
|
children: a
|
|
121
121
|
}
|
|
122
122
|
),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ t.jsx(
|
|
124
124
|
"div",
|
|
125
125
|
{
|
|
126
126
|
className: j,
|
|
@@ -133,27 +133,27 @@ const Ce = ({
|
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
};
|
|
136
|
-
function
|
|
137
|
-
|
|
136
|
+
function oe(r, s, e = {}) {
|
|
137
|
+
r ? E.show(Se, {
|
|
138
138
|
title: "Are you sure you want to leave this page?",
|
|
139
|
-
prompt: /* @__PURE__ */
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
139
|
+
prompt: /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
140
|
+
/* @__PURE__ */ t.jsx("p", { children: "Hey there! It looks like you didn't save the changes you made." }),
|
|
141
|
+
/* @__PURE__ */ t.jsx("p", { children: "Save before you go!" })
|
|
142
142
|
] }),
|
|
143
143
|
okLabel: "Leave",
|
|
144
144
|
cancelLabel: "Stay",
|
|
145
145
|
okColor: "red",
|
|
146
|
-
onOk: (
|
|
147
|
-
|
|
146
|
+
onOk: (n) => {
|
|
147
|
+
s(), n == null || n.remove();
|
|
148
148
|
},
|
|
149
149
|
...e
|
|
150
|
-
}) :
|
|
150
|
+
}) : s();
|
|
151
151
|
}
|
|
152
152
|
const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
153
|
-
size:
|
|
154
|
-
width:
|
|
153
|
+
size: r = "md",
|
|
154
|
+
width: s,
|
|
155
155
|
height: e,
|
|
156
|
-
testId:
|
|
156
|
+
testId: n,
|
|
157
157
|
title: a,
|
|
158
158
|
okLabel: i = "OK",
|
|
159
159
|
okLoading: u = !1,
|
|
@@ -165,29 +165,29 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
165
165
|
okDisabled: k,
|
|
166
166
|
padding: j = !0,
|
|
167
167
|
onOk: F,
|
|
168
|
-
okColor:
|
|
168
|
+
okColor: S = "black",
|
|
169
169
|
onCancel: y,
|
|
170
170
|
topRightContent: f,
|
|
171
|
-
hideXOnMobile:
|
|
171
|
+
hideXOnMobile: U = !1,
|
|
172
172
|
afterClose: M,
|
|
173
173
|
children: T,
|
|
174
174
|
backDrop: H = !0,
|
|
175
175
|
backDropClick: _ = !0,
|
|
176
176
|
stickyFooter: I = !1,
|
|
177
|
-
stickyHeader:
|
|
177
|
+
stickyHeader: P = !1,
|
|
178
178
|
scrolling: q = !0,
|
|
179
179
|
dirty: R = !1,
|
|
180
|
-
animate:
|
|
180
|
+
animate: Q = !0,
|
|
181
181
|
formSheet: v = !1,
|
|
182
|
-
enableCMDS:
|
|
182
|
+
enableCMDS: W = !0
|
|
183
183
|
}) => {
|
|
184
|
-
const C =
|
|
184
|
+
const C = ne(), { setGlobalDirtyState: ee } = be(), [te, de] = B(!1);
|
|
185
185
|
z(() => {
|
|
186
186
|
ee(R);
|
|
187
187
|
}, [R, ee]), z(() => {
|
|
188
188
|
const g = (L) => {
|
|
189
189
|
L.key === "Escape" && (document.activeElement && document.activeElement instanceof HTMLElement && document.activeElement.blur(), setTimeout(() => {
|
|
190
|
-
y ? y() :
|
|
190
|
+
y ? y() : oe(R, () => {
|
|
191
191
|
C.remove(), M == null || M();
|
|
192
192
|
});
|
|
193
193
|
}), L.stopPropagation());
|
|
@@ -205,20 +205,20 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
205
205
|
const g = (L) => {
|
|
206
206
|
(L.metaKey || L.ctrlKey) && L.key === "s" && (L.preventDefault(), F());
|
|
207
207
|
};
|
|
208
|
-
if (
|
|
208
|
+
if (W)
|
|
209
209
|
return window.addEventListener("keydown", g), () => {
|
|
210
210
|
window.removeEventListener("keydown", g);
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
|
-
const
|
|
214
|
+
const $ = [];
|
|
215
215
|
let O;
|
|
216
216
|
const J = () => {
|
|
217
|
-
|
|
217
|
+
oe(R, () => {
|
|
218
218
|
C.remove(), M == null || M();
|
|
219
219
|
});
|
|
220
220
|
};
|
|
221
|
-
l || (c &&
|
|
221
|
+
l || (c && $.push({
|
|
222
222
|
key: "cancel-modal",
|
|
223
223
|
label: c,
|
|
224
224
|
color: "outline",
|
|
@@ -226,168 +226,168 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
226
226
|
J();
|
|
227
227
|
}),
|
|
228
228
|
disabled: w
|
|
229
|
-
}), i &&
|
|
229
|
+
}), i && $.push({
|
|
230
230
|
key: "ok-modal",
|
|
231
231
|
label: i,
|
|
232
|
-
color:
|
|
232
|
+
color: S,
|
|
233
233
|
className: "min-w-[80px]",
|
|
234
234
|
onClick: F,
|
|
235
235
|
disabled: w || k,
|
|
236
236
|
loading: u
|
|
237
237
|
}));
|
|
238
|
-
let m =
|
|
238
|
+
let m = o(
|
|
239
239
|
"relative z-50 mx-auto flex max-h-[100%] w-full flex-col justify-between overflow-x-hidden bg-white dark:bg-black",
|
|
240
|
-
|
|
240
|
+
r !== "bleed" && "rounded",
|
|
241
241
|
v ? "shadow-md" : "shadow-xl",
|
|
242
|
-
|
|
242
|
+
Q && !v && !te && "animate-modal-in",
|
|
243
243
|
v && !te && "animate-modal-in-reverse",
|
|
244
244
|
q ? "overflow-y-auto" : "overflow-y-hidden"
|
|
245
|
-
), p =
|
|
245
|
+
), p = o(
|
|
246
246
|
"fixed inset-0 z-[1000] h-[100vh] w-[100vw]"
|
|
247
|
-
), b = "", d =
|
|
247
|
+
), b = "", d = o(
|
|
248
248
|
!f || f === "close" ? "" : "flex items-center justify-between gap-5"
|
|
249
249
|
);
|
|
250
|
-
switch (
|
|
250
|
+
switch (P && (d = o(
|
|
251
251
|
d,
|
|
252
252
|
"sticky top-0 z-[200] -mb-4 bg-white !pb-4 dark:bg-black"
|
|
253
|
-
)),
|
|
253
|
+
)), r) {
|
|
254
254
|
case "sm":
|
|
255
|
-
m =
|
|
255
|
+
m = o(
|
|
256
256
|
m,
|
|
257
257
|
"max-w-[480px]"
|
|
258
|
-
), p =
|
|
258
|
+
), p = o(
|
|
259
259
|
p,
|
|
260
260
|
"p-4 md:p-[8vmin]"
|
|
261
|
-
), b = "p-8", d =
|
|
261
|
+
), b = "p-8", d = o(
|
|
262
262
|
d,
|
|
263
263
|
"-inset-x-8"
|
|
264
264
|
);
|
|
265
265
|
break;
|
|
266
266
|
case "md":
|
|
267
|
-
m =
|
|
267
|
+
m = o(
|
|
268
268
|
m,
|
|
269
269
|
"max-w-[720px]"
|
|
270
|
-
), p =
|
|
270
|
+
), p = o(
|
|
271
271
|
p,
|
|
272
272
|
"p-4 md:p-[8vmin]"
|
|
273
|
-
), b = "p-8", d =
|
|
273
|
+
), b = "p-8", d = o(
|
|
274
274
|
d,
|
|
275
275
|
"-inset-x-8"
|
|
276
276
|
);
|
|
277
277
|
break;
|
|
278
278
|
case "lg":
|
|
279
|
-
m =
|
|
279
|
+
m = o(
|
|
280
280
|
m,
|
|
281
281
|
"max-w-[1020px]"
|
|
282
|
-
), p =
|
|
282
|
+
), p = o(
|
|
283
283
|
p,
|
|
284
284
|
"p-4 md:p-[4vmin]"
|
|
285
|
-
), b = "p-7", d =
|
|
285
|
+
), b = "p-7", d = o(
|
|
286
286
|
d,
|
|
287
287
|
"-inset-x-8"
|
|
288
288
|
);
|
|
289
289
|
break;
|
|
290
290
|
case "xl":
|
|
291
|
-
m =
|
|
291
|
+
m = o(
|
|
292
292
|
m,
|
|
293
293
|
"max-w-[1240px]0"
|
|
294
|
-
), p =
|
|
294
|
+
), p = o(
|
|
295
295
|
p,
|
|
296
296
|
"p-4 md:p-[3vmin]"
|
|
297
|
-
), b = "p-10", d =
|
|
297
|
+
), b = "p-10", d = o(
|
|
298
298
|
d,
|
|
299
299
|
"-inset-x-10 -top-10"
|
|
300
300
|
);
|
|
301
301
|
break;
|
|
302
302
|
case "full":
|
|
303
|
-
m =
|
|
303
|
+
m = o(
|
|
304
304
|
m,
|
|
305
305
|
"h-full"
|
|
306
|
-
), p =
|
|
306
|
+
), p = o(
|
|
307
307
|
p,
|
|
308
308
|
"p-4 md:p-[3vmin]"
|
|
309
|
-
), b = "p-10", d =
|
|
309
|
+
), b = "p-10", d = o(
|
|
310
310
|
d,
|
|
311
311
|
"-inset-x-10"
|
|
312
312
|
);
|
|
313
313
|
break;
|
|
314
314
|
case "bleed":
|
|
315
|
-
m =
|
|
315
|
+
m = o(
|
|
316
316
|
m,
|
|
317
317
|
"h-full"
|
|
318
|
-
), b = "p-10", d =
|
|
318
|
+
), b = "p-10", d = o(
|
|
319
319
|
d,
|
|
320
320
|
"-inset-x-10"
|
|
321
321
|
);
|
|
322
322
|
break;
|
|
323
323
|
default:
|
|
324
|
-
p =
|
|
324
|
+
p = o(
|
|
325
325
|
p,
|
|
326
326
|
"p-4 md:p-[8vmin]"
|
|
327
|
-
), b = "p-8", d =
|
|
327
|
+
), b = "p-8", d = o(
|
|
328
328
|
d,
|
|
329
329
|
"-inset-x-8"
|
|
330
330
|
);
|
|
331
331
|
break;
|
|
332
332
|
}
|
|
333
|
-
j || (b = "p-0"), m =
|
|
333
|
+
j || (b = "p-0"), m = o(
|
|
334
334
|
m
|
|
335
|
-
), d =
|
|
335
|
+
), d = o(
|
|
336
336
|
d,
|
|
337
337
|
b,
|
|
338
338
|
"pb-0"
|
|
339
|
-
), O =
|
|
339
|
+
), O = o(
|
|
340
340
|
b,
|
|
341
341
|
"py-0"
|
|
342
|
-
), p =
|
|
342
|
+
), p = o(
|
|
343
343
|
p,
|
|
344
344
|
"max-[800px]:!pb-20"
|
|
345
345
|
);
|
|
346
|
-
const me =
|
|
346
|
+
const me = o(
|
|
347
347
|
`${b} ${I ? "py-6" : ""}`,
|
|
348
348
|
"flex w-full items-center justify-between"
|
|
349
349
|
);
|
|
350
|
-
O =
|
|
350
|
+
O = o(
|
|
351
351
|
O,
|
|
352
|
-
(
|
|
352
|
+
(r === "full" || r === "bleed" || e === "full" || typeof e == "number") && "grow"
|
|
353
353
|
);
|
|
354
354
|
const pe = (g) => {
|
|
355
355
|
g.target === g.currentTarget && _ && J();
|
|
356
356
|
}, A = {};
|
|
357
|
-
typeof
|
|
357
|
+
typeof s == "number" ? (A.width = "100%", A.maxWidth = s + "px") : s === "full" && (m = o(
|
|
358
358
|
m,
|
|
359
359
|
"w-full"
|
|
360
|
-
)), typeof e == "number" ? (A.height = "100%", A.maxHeight = e + "px") : e === "full" && (m =
|
|
360
|
+
)), typeof e == "number" ? (A.height = "100%", A.maxHeight = e + "px") : e === "full" && (m = o(
|
|
361
361
|
m,
|
|
362
362
|
"h-full"
|
|
363
363
|
));
|
|
364
364
|
let N;
|
|
365
|
-
return l ? N = l : l === !1 ? O += " pb-0 " : N = /* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
] }), N = I ? /* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
365
|
+
return l ? N = l : l === !1 ? O += " pb-0 " : N = /* @__PURE__ */ t.jsxs("div", { className: me, children: [
|
|
366
|
+
/* @__PURE__ */ t.jsx("div", { children: x && /* @__PURE__ */ t.jsx(K, { ...x }) }),
|
|
367
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex gap-3", children: /* @__PURE__ */ t.jsx(we, { buttons: $ }) })
|
|
368
|
+
] }), N = I ? /* @__PURE__ */ t.jsx(Le, { height: 84, children: N }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: N }), /* @__PURE__ */ t.jsxs("div", { className: p, id: "modal-backdrop", onMouseDown: pe, children: [
|
|
369
|
+
/* @__PURE__ */ t.jsx("div", { className: o(
|
|
370
370
|
"pointer-events-none fixed inset-0 z-0",
|
|
371
371
|
H && !v && Ne,
|
|
372
372
|
v && "bg-[rgba(98,109,121,0.08)]"
|
|
373
373
|
) }),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
h === !1 ? "" : !f || f === "close" ? /* @__PURE__ */
|
|
376
|
-
a && /* @__PURE__ */
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
] }) : /* @__PURE__ */
|
|
379
|
-
a && /* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ t.jsxs("section", { className: m, "data-testid": n, style: A, children: [
|
|
375
|
+
h === !1 ? "" : !f || f === "close" ? /* @__PURE__ */ t.jsxs("header", { className: d, children: [
|
|
376
|
+
a && /* @__PURE__ */ t.jsx(X, { level: 3, children: a }),
|
|
377
|
+
/* @__PURE__ */ t.jsx("div", { className: `${f !== "close" && "md:!invisible md:!hidden"} ${U && "hidden"} absolute right-6 top-6`, children: /* @__PURE__ */ t.jsx(K, { className: "-m-2 cursor-pointer p-2 opacity-50 hover:opacity-100", icon: "close", iconColorClass: "text-black dark:text-white", size: "sm", testId: "close-modal", unstyled: !0, onClick: J }) })
|
|
378
|
+
] }) : /* @__PURE__ */ t.jsxs("header", { className: d, children: [
|
|
379
|
+
a && /* @__PURE__ */ t.jsx(X, { level: 3, children: a }),
|
|
380
380
|
f
|
|
381
381
|
] }),
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ t.jsx("div", { className: O, children: T }),
|
|
383
383
|
N
|
|
384
384
|
] })
|
|
385
385
|
] });
|
|
386
386
|
}, Ee = ({
|
|
387
|
-
title:
|
|
388
|
-
prompt:
|
|
387
|
+
title: r = "Are you sure?",
|
|
388
|
+
prompt: s,
|
|
389
389
|
cancelLabel: e = "Cancel",
|
|
390
|
-
okLabel:
|
|
390
|
+
okLabel: n = "OK",
|
|
391
391
|
okRunningLabel: a = "...",
|
|
392
392
|
okColor: i = "black",
|
|
393
393
|
onCancel: u,
|
|
@@ -395,8 +395,8 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
395
395
|
customFooter: l,
|
|
396
396
|
formSheet: h = !0
|
|
397
397
|
}) => {
|
|
398
|
-
const x =
|
|
399
|
-
return /* @__PURE__ */
|
|
398
|
+
const x = ne(), [w, k] = B("");
|
|
399
|
+
return /* @__PURE__ */ t.jsx(
|
|
400
400
|
V,
|
|
401
401
|
{
|
|
402
402
|
backDropClick: !1,
|
|
@@ -405,9 +405,9 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
405
405
|
footer: l,
|
|
406
406
|
formSheet: h,
|
|
407
407
|
okColor: i,
|
|
408
|
-
okLabel: w === "running" ? a :
|
|
408
|
+
okLabel: w === "running" ? a : n,
|
|
409
409
|
testId: "confirmation-modal",
|
|
410
|
-
title:
|
|
410
|
+
title: r,
|
|
411
411
|
width: 540,
|
|
412
412
|
onCancel: u,
|
|
413
413
|
onOk: async () => {
|
|
@@ -419,21 +419,21 @@ const Ne = "bg-[rgba(98,109,121,0.2)] backdrop-blur-[3px]", V = ({
|
|
|
419
419
|
}
|
|
420
420
|
k("");
|
|
421
421
|
},
|
|
422
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "py-4 leading-9", children: s })
|
|
423
423
|
}
|
|
424
424
|
);
|
|
425
|
-
},
|
|
426
|
-
class
|
|
427
|
-
constructor(
|
|
428
|
-
super(), this.client =
|
|
425
|
+
}, Se = E.create(Ee);
|
|
426
|
+
class Ue extends ge {
|
|
427
|
+
constructor(s, e) {
|
|
428
|
+
super(), this.client = s, this.setOptions(e), this.bindMethods(), this.updateResult();
|
|
429
429
|
}
|
|
430
430
|
bindMethods() {
|
|
431
431
|
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
432
432
|
}
|
|
433
|
-
setOptions(
|
|
433
|
+
setOptions(s) {
|
|
434
434
|
var e;
|
|
435
|
-
const
|
|
436
|
-
this.options = this.client.defaultMutationOptions(
|
|
435
|
+
const n = this.options;
|
|
436
|
+
this.options = this.client.defaultMutationOptions(s), ye(n, this.options) || this.client.getMutationCache().notify({
|
|
437
437
|
type: "observerOptionsUpdated",
|
|
438
438
|
mutation: this.currentMutation,
|
|
439
439
|
observer: this
|
|
@@ -441,16 +441,16 @@ class Se extends ge {
|
|
|
441
441
|
}
|
|
442
442
|
onUnsubscribe() {
|
|
443
443
|
if (!this.hasListeners()) {
|
|
444
|
-
var
|
|
445
|
-
(
|
|
444
|
+
var s;
|
|
445
|
+
(s = this.currentMutation) == null || s.removeObserver(this);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
onMutationUpdate(
|
|
448
|
+
onMutationUpdate(s) {
|
|
449
449
|
this.updateResult();
|
|
450
450
|
const e = {
|
|
451
451
|
listeners: !0
|
|
452
452
|
};
|
|
453
|
-
|
|
453
|
+
s.type === "success" ? e.onSuccess = !0 : s.type === "error" && (e.onError = !0), this.notify(e);
|
|
454
454
|
}
|
|
455
455
|
getCurrentResult() {
|
|
456
456
|
return this.currentResult;
|
|
@@ -460,36 +460,36 @@ class Se extends ge {
|
|
|
460
460
|
listeners: !0
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
|
-
mutate(
|
|
463
|
+
mutate(s, e) {
|
|
464
464
|
return this.mutateOptions = e, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, {
|
|
465
465
|
...this.options,
|
|
466
|
-
variables: typeof
|
|
466
|
+
variables: typeof s < "u" ? s : this.options.variables
|
|
467
467
|
}), this.currentMutation.addObserver(this), this.currentMutation.execute();
|
|
468
468
|
}
|
|
469
469
|
updateResult() {
|
|
470
|
-
const
|
|
471
|
-
...
|
|
472
|
-
isLoading:
|
|
473
|
-
isSuccess:
|
|
474
|
-
isError:
|
|
475
|
-
isIdle:
|
|
470
|
+
const s = this.currentMutation ? this.currentMutation.state : ve(), e = {
|
|
471
|
+
...s,
|
|
472
|
+
isLoading: s.status === "loading",
|
|
473
|
+
isSuccess: s.status === "success",
|
|
474
|
+
isError: s.status === "error",
|
|
475
|
+
isIdle: s.status === "idle",
|
|
476
476
|
mutate: this.mutate,
|
|
477
477
|
reset: this.reset
|
|
478
478
|
};
|
|
479
479
|
this.currentResult = e;
|
|
480
480
|
}
|
|
481
|
-
notify(
|
|
481
|
+
notify(s) {
|
|
482
482
|
re.batch(() => {
|
|
483
483
|
if (this.mutateOptions && this.hasListeners()) {
|
|
484
|
-
if (
|
|
485
|
-
var e,
|
|
486
|
-
(e = (
|
|
487
|
-
} else if (
|
|
484
|
+
if (s.onSuccess) {
|
|
485
|
+
var e, n, a, i;
|
|
486
|
+
(e = (n = this.mutateOptions).onSuccess) == null || e.call(n, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (a = (i = this.mutateOptions).onSettled) == null || a.call(i, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
|
|
487
|
+
} else if (s.onError) {
|
|
488
488
|
var u, c, l, h;
|
|
489
489
|
(u = (c = this.mutateOptions).onError) == null || u.call(c, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (l = (h = this.mutateOptions).onSettled) == null || l.call(h, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
|
|
492
|
+
s.listeners && this.listeners.forEach(({
|
|
493
493
|
listener: x
|
|
494
494
|
}) => {
|
|
495
495
|
x(this.currentResult);
|
|
@@ -497,13 +497,13 @@ class Se extends ge {
|
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
function ue(
|
|
501
|
-
const
|
|
502
|
-
context:
|
|
503
|
-
}), [i] = B(() => new
|
|
500
|
+
function ue(r, s, e) {
|
|
501
|
+
const n = ke(r, s, e), a = je({
|
|
502
|
+
context: n.context
|
|
503
|
+
}), [i] = B(() => new Ue(a, n));
|
|
504
504
|
z(() => {
|
|
505
|
-
i.setOptions(
|
|
506
|
-
}, [i,
|
|
505
|
+
i.setOptions(n);
|
|
506
|
+
}, [i, n]);
|
|
507
507
|
const u = Fe(se((l) => i.subscribe(re.batchCalls(l)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), c = se((l, h) => {
|
|
508
508
|
i.mutate(l, h).catch(Oe);
|
|
509
509
|
}, [i]);
|
|
@@ -517,45 +517,45 @@ function ue(o, t, e) {
|
|
|
517
517
|
}
|
|
518
518
|
function Oe() {
|
|
519
519
|
}
|
|
520
|
-
function Ae(
|
|
520
|
+
function Ae(r, s, e) {
|
|
521
521
|
var c;
|
|
522
522
|
const a = (c = D().data) == null ? void 0 : c.site, i = (a == null ? void 0 : a.url) ?? window.location.origin, u = new G(
|
|
523
523
|
new URL(i),
|
|
524
524
|
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
525
|
-
|
|
525
|
+
r
|
|
526
526
|
);
|
|
527
527
|
return ue({
|
|
528
528
|
async mutationFn(l) {
|
|
529
529
|
return u.follow(l);
|
|
530
530
|
},
|
|
531
|
-
onSuccess:
|
|
531
|
+
onSuccess: s,
|
|
532
532
|
onError: e
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
const ze = E.create(() => {
|
|
536
|
-
const { updateRoute:
|
|
536
|
+
const { updateRoute: r } = Y(), s = E.useModal(), [e, n] = B(""), [a, i] = B(null);
|
|
537
537
|
async function u() {
|
|
538
538
|
Re({
|
|
539
539
|
message: "Site followed",
|
|
540
540
|
type: "success"
|
|
541
|
-
}),
|
|
541
|
+
}), s.remove(), r("");
|
|
542
542
|
}
|
|
543
543
|
async function c() {
|
|
544
544
|
i(a);
|
|
545
545
|
}
|
|
546
546
|
const l = Ae("index", u, c);
|
|
547
|
-
return /* @__PURE__ */
|
|
547
|
+
return /* @__PURE__ */ t.jsx(
|
|
548
548
|
V,
|
|
549
549
|
{
|
|
550
550
|
afterClose: () => {
|
|
551
|
-
l.reset(),
|
|
551
|
+
l.reset(), r("");
|
|
552
552
|
},
|
|
553
553
|
cancelLabel: "Cancel",
|
|
554
554
|
okLabel: "Follow",
|
|
555
555
|
size: "sm",
|
|
556
556
|
title: "Follow a Ghost site",
|
|
557
557
|
onOk: () => l.mutate(e),
|
|
558
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ t.jsx(
|
|
559
559
|
Ce,
|
|
560
560
|
{
|
|
561
561
|
autoFocus: !0,
|
|
@@ -565,41 +565,32 @@ const ze = E.create(() => {
|
|
|
565
565
|
title: "Profile name",
|
|
566
566
|
value: e,
|
|
567
567
|
"data-test-new-follower": !0,
|
|
568
|
-
onChange: (h) =>
|
|
568
|
+
onChange: (h) => n(h.target.value)
|
|
569
569
|
}
|
|
570
570
|
) })
|
|
571
571
|
}
|
|
572
572
|
);
|
|
573
573
|
});
|
|
574
|
-
function
|
|
575
|
-
if (!o.preferredUsername || !o.id)
|
|
576
|
-
return "@unknown@unknown";
|
|
577
|
-
try {
|
|
578
|
-
return `@${o.preferredUsername}@${new URL(o.id).hostname}`;
|
|
579
|
-
} catch {
|
|
580
|
-
return "@unknown@unknown";
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
function Be(o) {
|
|
574
|
+
function Be(r) {
|
|
584
575
|
var i;
|
|
585
|
-
const e = (i = D().data) == null ? void 0 : i.site,
|
|
586
|
-
new URL(
|
|
576
|
+
const e = (i = D().data) == null ? void 0 : i.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, a = new G(
|
|
577
|
+
new URL(n),
|
|
587
578
|
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
588
|
-
|
|
579
|
+
r
|
|
589
580
|
);
|
|
590
581
|
return ce({
|
|
591
|
-
queryKey: [`followers:${
|
|
582
|
+
queryKey: [`followers:${r}`],
|
|
592
583
|
async queryFn() {
|
|
593
584
|
return a.getFollowers();
|
|
594
585
|
}
|
|
595
586
|
});
|
|
596
587
|
}
|
|
597
|
-
function Te(
|
|
588
|
+
function Te(r) {
|
|
598
589
|
var i;
|
|
599
|
-
const e = (i = D().data) == null ? void 0 : i.site,
|
|
600
|
-
new URL(
|
|
590
|
+
const e = (i = D().data) == null ? void 0 : i.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, a = new G(
|
|
591
|
+
new URL(n),
|
|
601
592
|
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
602
|
-
|
|
593
|
+
r
|
|
603
594
|
);
|
|
604
595
|
return ue({
|
|
605
596
|
async mutationFn(u) {
|
|
@@ -608,12 +599,12 @@ function Te(o) {
|
|
|
608
599
|
});
|
|
609
600
|
}
|
|
610
601
|
const He = ({}) => {
|
|
611
|
-
const { updateRoute:
|
|
612
|
-
return /* @__PURE__ */
|
|
602
|
+
const { updateRoute: r } = Y(), s = Te("index"), { data: e = [] } = Be("index"), n = Array.isArray(e) ? e : [e];
|
|
603
|
+
return /* @__PURE__ */ t.jsx(
|
|
613
604
|
V,
|
|
614
605
|
{
|
|
615
606
|
afterClose: () => {
|
|
616
|
-
|
|
607
|
+
s.reset(), r("");
|
|
617
608
|
},
|
|
618
609
|
cancelLabel: "",
|
|
619
610
|
footer: !1,
|
|
@@ -621,31 +612,31 @@ const He = ({}) => {
|
|
|
621
612
|
size: "md",
|
|
622
613
|
title: "Followers",
|
|
623
614
|
topRightContent: "close",
|
|
624
|
-
children: /* @__PURE__ */
|
|
615
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ t.jsx(ie, { children: n.map((a) => /* @__PURE__ */ t.jsx(ae, { action: /* @__PURE__ */ t.jsx(K, { color: "grey", label: "Follow back", link: !0, onClick: () => s.mutate(Z(a)) }), avatar: /* @__PURE__ */ t.jsx(le, { image: a.icon, size: "sm" }), detail: Z(a), id: "list-item", title: a.name })) }) })
|
|
625
616
|
}
|
|
626
617
|
);
|
|
627
618
|
}, Ie = E.create(He);
|
|
628
|
-
function qe(
|
|
619
|
+
function qe(r) {
|
|
629
620
|
var i;
|
|
630
|
-
const e = (i = D().data) == null ? void 0 : i.site,
|
|
631
|
-
new URL(
|
|
621
|
+
const e = (i = D().data) == null ? void 0 : i.site, n = (e == null ? void 0 : e.url) ?? window.location.origin, a = new G(
|
|
622
|
+
new URL(n),
|
|
632
623
|
new URL("/ghost/api/admin/identities/", window.location.origin),
|
|
633
|
-
|
|
624
|
+
r
|
|
634
625
|
);
|
|
635
626
|
return ce({
|
|
636
|
-
queryKey: [`following:${
|
|
627
|
+
queryKey: [`following:${r}`],
|
|
637
628
|
async queryFn() {
|
|
638
629
|
return a.getFollowing();
|
|
639
630
|
}
|
|
640
631
|
});
|
|
641
632
|
}
|
|
642
633
|
const Ke = ({}) => {
|
|
643
|
-
const { updateRoute:
|
|
644
|
-
return /* @__PURE__ */
|
|
634
|
+
const { updateRoute: r } = Y(), { data: s = [] } = qe("index"), e = Array.isArray(s) ? s : [s];
|
|
635
|
+
return /* @__PURE__ */ t.jsx(
|
|
645
636
|
V,
|
|
646
637
|
{
|
|
647
638
|
afterClose: () => {
|
|
648
|
-
|
|
639
|
+
r("");
|
|
649
640
|
},
|
|
650
641
|
cancelLabel: "",
|
|
651
642
|
footer: !1,
|
|
@@ -653,11 +644,11 @@ const Ke = ({}) => {
|
|
|
653
644
|
size: "md",
|
|
654
645
|
title: "Following",
|
|
655
646
|
topRightContent: "close",
|
|
656
|
-
children: /* @__PURE__ */
|
|
647
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ t.jsx(ie, { children: e.map((n) => /* @__PURE__ */ t.jsx(ae, { action: /* @__PURE__ */ t.jsx(K, { color: "grey", label: "Unfollow", link: !0 }), avatar: /* @__PURE__ */ t.jsx(le, { image: n.icon, size: "sm" }), detail: Z(n), id: "list-item", title: n.name })) }) })
|
|
657
648
|
}
|
|
658
649
|
);
|
|
659
650
|
}, De = E.create(Ke), Ve = { FollowSite: ze, ViewFollowing: De, ViewFollowers: Ie };
|
|
660
651
|
export {
|
|
661
652
|
Ve as default
|
|
662
653
|
};
|
|
663
|
-
//# sourceMappingURL=modals-
|
|
654
|
+
//# sourceMappingURL=modals-e013f67b.mjs.map
|