@churchapps/apphelper 1.11.3 → 1.11.5
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/dist/components/notes/FormattingPopup.d.ts +1 -1
- package/dist/components/notes/FormattingPopup.d.ts.map +1 -1
- package/dist/components/notes/FormattingPopup.js +28 -14
- package/dist/components/notes/FormattingPopup.js.map +1 -1
- package/dist/components/notes/Note.d.ts.map +1 -1
- package/dist/components/notes/Note.js +1 -1
- package/dist/components/notes/Note.js.map +1 -1
- package/dist/components/notes/formatSelection.d.ts +1 -0
- package/dist/components/notes/formatSelection.d.ts.map +1 -1
- package/dist/components/notes/formatSelection.js +20 -0
- package/dist/components/notes/formatSelection.js.map +1 -1
- package/dist/donations/components/FormPaymentQuestion.d.ts.map +1 -1
- package/dist/donations/components/FormPaymentQuestion.js +11 -4
- package/dist/donations/components/FormPaymentQuestion.js.map +1 -1
- package/dist/donations/helpers/Locale.d.ts.map +1 -1
- package/dist/donations/helpers/Locale.js +1 -0
- package/dist/donations/helpers/Locale.js.map +1 -1
- package/dist/donations/providers/ProviderFormPayment.d.ts +7 -0
- package/dist/donations/providers/ProviderFormPayment.d.ts.map +1 -0
- package/dist/donations/providers/ProviderFormPayment.js +150 -0
- package/dist/donations/providers/ProviderFormPayment.js.map +1 -0
- package/dist/forms/helpers/Locale.d.ts.map +1 -1
- package/dist/forms/helpers/Locale.js +1 -0
- package/dist/forms/helpers/Locale.js.map +1 -1
- package/dist/helpers/Locale.d.ts.map +1 -1
- package/dist/helpers/Locale.js +1 -0
- package/dist/helpers/Locale.js.map +1 -1
- package/dist/login/helpers/Locale.d.ts.map +1 -1
- package/dist/login/helpers/Locale.js +1 -0
- package/dist/login/helpers/Locale.js.map +1 -1
- package/dist/public/locales/ro.json +191 -168
- package/dist/website/components/AnnouncementBanner.d.ts.map +1 -1
- package/dist/website/components/AnnouncementBanner.js +19 -13
- package/dist/website/components/AnnouncementBanner.js.map +1 -1
- package/dist/website/styles/pages.css +6 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
4
|
export const parseAnnouncementConfig = (json) => {
|
|
5
5
|
if (!json)
|
|
6
6
|
return null;
|
|
@@ -36,18 +36,24 @@ const withinWindow = (start, end) => {
|
|
|
36
36
|
}
|
|
37
37
|
return true;
|
|
38
38
|
};
|
|
39
|
+
// A dismissal hides the bar for a day; a changed announcement has a new key and shows at once.
|
|
40
|
+
const DISMISS_MS = 24 * 60 * 60 * 1000;
|
|
41
|
+
const isDismissed = (key) => {
|
|
42
|
+
try {
|
|
43
|
+
const until = Number(window.localStorage.getItem(key));
|
|
44
|
+
if (until > Date.now())
|
|
45
|
+
return true;
|
|
46
|
+
if (until)
|
|
47
|
+
window.localStorage.removeItem(key);
|
|
48
|
+
}
|
|
49
|
+
catch { /* localStorage may be unavailable */ }
|
|
50
|
+
return false;
|
|
51
|
+
};
|
|
39
52
|
export const AnnouncementBanner = ({ config, onDismiss }) => {
|
|
40
53
|
const storageKey = dismissKey(config?.text || "");
|
|
41
|
-
const [dismissed, setDismissed] = useState(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
try {
|
|
45
|
-
return window.sessionStorage.getItem(storageKey) === "1";
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
54
|
+
const [dismissed, setDismissed] = useState(false);
|
|
55
|
+
// Read storage after mount so the client's first render matches the server's.
|
|
56
|
+
useEffect(() => { setDismissed(isDismissed(storageKey)); }, [storageKey]);
|
|
51
57
|
if (!config?.text)
|
|
52
58
|
return null;
|
|
53
59
|
if (!withinWindow(config.startDate, config.endDate))
|
|
@@ -57,9 +63,9 @@ export const AnnouncementBanner = ({ config, onDismiss }) => {
|
|
|
57
63
|
const textColor = config.textColor || "#ffffff";
|
|
58
64
|
const dismiss = () => {
|
|
59
65
|
try {
|
|
60
|
-
window.
|
|
66
|
+
window.localStorage.setItem(storageKey, String(Date.now() + DISMISS_MS));
|
|
61
67
|
}
|
|
62
|
-
catch { /*
|
|
68
|
+
catch { /* localStorage may be unavailable */ }
|
|
63
69
|
setDismissed(true);
|
|
64
70
|
onDismiss?.();
|
|
65
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnouncementBanner.js","sourceRoot":"","sources":["../../../src/website/components/AnnouncementBanner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AnnouncementBanner.js","sourceRoot":"","sources":["../../../src/website/components/AnnouncementBanner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAiBnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAmB,EAA6B,EAAE;IACxF,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC;QAC1G,OAAO,MAA4B,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE;IAClC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,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,EAAE,eAAe,EAAE,MAAM,CAAC,eAAe,IAAI,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,aAC5J,eAAM,SAAS,EAAC,2BAA2B,YAAE,MAAM,CAAC,IAAI,GAAQ,EAC/D,MAAM,CAAC,OAAO,IAAI,YAAG,SAAS,EAAC,2BAA2B,EAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,YAAG,MAAM,CAAC,QAAQ,IAAI,YAAY,GAAK,EACpJ,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAC,4BAA4B,gBAAY,sBAAsB,EAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAkB,IAC1J,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -947,11 +947,16 @@ code {
|
|
|
947
947
|
.service-time { padding: 2px 0; opacity: 0.9; }
|
|
948
948
|
|
|
949
949
|
/* announcement banner */
|
|
950
|
-
|
|
950
|
+
/* z-index sits above the site nav bar (1100) but below drawers (1200) and dialogs (1300). flex-wrap gives long text the full width and drops the link to its own line. */
|
|
951
|
+
.announcement-banner { position: sticky; top: 0; z-index: 1150; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: 16px; row-gap: 4px; padding: 10px 48px; text-align: center; box-sizing: border-box; }
|
|
951
952
|
.announcement-banner__text { font-weight: 500; }
|
|
952
953
|
.announcement-banner__link { text-decoration: underline; font-weight: 600; white-space: nowrap; }
|
|
953
954
|
.announcement-banner__close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; opacity: 0.85; }
|
|
954
955
|
.announcement-banner__close:hover { opacity: 1; }
|
|
956
|
+
@media (max-width: 599px) {
|
|
957
|
+
.announcement-banner { padding: 10px 44px 10px 16px; font-size: 15px; line-height: 1.35; }
|
|
958
|
+
.announcement-banner__link { white-space: normal; }
|
|
959
|
+
}
|
|
955
960
|
|
|
956
961
|
/* launcher (floating action hub) */
|
|
957
962
|
.launcher { position: fixed; bottom: 24px; z-index: 1300; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@churchapps/apphelper",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.5",
|
|
4
4
|
"description": "Library of helper functions, components, and feature modules (donations/forms/login/markdown/website) for React and NextJS ChurchApps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"slug": "^11.0.0"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@churchapps/helpers": "^2.
|
|
142
|
+
"@churchapps/helpers": "^2.16.0",
|
|
143
143
|
"@eslint/js": "^10.0.1",
|
|
144
144
|
"@stripe/react-stripe-js": "^3.10.0",
|
|
145
145
|
"@stripe/stripe-js": "^7.9.0",
|