fix scrolling
All checks were successful
CI / build (push) Successful in 3m21s
CI / bump-infra (push) Successful in 1s

This commit is contained in:
Philip Peterson 2026-06-14 01:55:30 -07:00
parent 0b3112f81b
commit 1b6a71060a
5 changed files with 85 additions and 25 deletions

19
node_modules/.package-lock.json generated vendored
View file

@ -15,6 +15,25 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@fullcalendar/core": {
"version": "6.1.20",
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.20.tgz",
"integrity": "sha512-1cukXLlePFiJ8YKXn/4tMKsy0etxYLCkXk8nUCFi11nRONF2Ba2CD5b21/ovtOO2tL6afTJfwmc1ed3HG7eB1g==",
"dev": true,
"dependencies": {
"preact": "~10.12.1"
}
},
"node_modules/@fullcalendar/core/node_modules/preact": {
"version": "10.12.1",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.12.1.tgz",
"integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==",
"dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",

20
package-lock.json generated
View file

@ -6,6 +6,7 @@
"": {
"name": "riverside-therapeutics",
"devDependencies": {
"@fullcalendar/core": "^6.1.20",
"htm": "^3.1.1",
"preact": "^10.29.2",
"tailwindcss": "^3.4.17",
@ -24,6 +25,25 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@fullcalendar/core": {
"version": "6.1.20",
"resolved": "https://registry.npmjs.org/@fullcalendar/core/-/core-6.1.20.tgz",
"integrity": "sha512-1cukXLlePFiJ8YKXn/4tMKsy0etxYLCkXk8nUCFi11nRONF2Ba2CD5b21/ovtOO2tL6afTJfwmc1ed3HG7eB1g==",
"dev": true,
"dependencies": {
"preact": "~10.12.1"
}
},
"node_modules/@fullcalendar/core/node_modules/preact": {
"version": "10.12.1",
"resolved": "https://registry.npmjs.org/preact/-/preact-10.12.1.tgz",
"integrity": "sha512-l8386ixSsBdbreOAkqtrwqHwdvR35ID8c3rKPa8lCWuO86dBi32QWHV4vfsZK1utLLFMvw+Z5Ad4XLkZzchscg==",
"dev": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/preact"
}
},
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",

View file

@ -3,9 +3,11 @@
"private": true,
"scripts": {
"watch": "tailwindcss -i ./web/modules/custom/riverside_pt/css/tailwind.css -o ./web/modules/custom/riverside_pt/css/app.css --watch",
"build": "tailwindcss -i ./web/modules/custom/riverside_pt/css/tailwind.css -o ./web/modules/custom/riverside_pt/css/app.css --minify"
"build": "tailwindcss -i ./web/modules/custom/riverside_pt/css/tailwind.css -o ./web/modules/custom/riverside_pt/css/app.css --minify",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@fullcalendar/core": "^6.1.20",
"htm": "^3.1.1",
"preact": "^10.29.2",
"tailwindcss": "^3.4.17",

View file

@ -197,7 +197,7 @@ function BookingPanel({ service, settings }) {
dayCellClassNames: function (/** @type {any} */ arg) {
var date = arg.date.toISOString().substring(0, 10);
if (settings.holidays[date]) return ["is-holiday"];
return settings.holidays[date] ? ["is-holiday"] : [];
},
dateClick: function (/** @type {any} */ arg) {
@ -221,7 +221,9 @@ function BookingPanel({ service, settings }) {
cal.render();
calRef.current = cal;
window.rptScrollTo(cal, true);
requestAnimationFrame(() => {
window.rptScrollTo(rootEl, true);
})
return function () { cal.destroy(); };
}, []);

View file

@ -1,25 +1,42 @@
interface RiversidePtSettings {
import type { Calendar } from "@fullcalendar/core";
declare global {
interface RiversidePtSettings {
eventsUrl: string;
storeSlotUrl: string;
bookingUrl?: string;
holidays: Record<string, boolean>;
scrollTo?: string;
}
}
interface RiversidePtEvent {
interface RiversidePtEvent {
id: number | string;
title?: string;
start: string;
end: string;
startStr?: string;
}
}
interface Window {
FullCalendar?: any;
interface ConfirmedAppointment {
start: string;
service: string;
firstName: string;
lastName: string;
email: string;
}
// FullCalendar is loaded as a UMD global. The Calendar constructor accepts
// any options object because plugin-specific options (e.g. dateClick from
// @fullcalendar/interaction) are not reflected in @fullcalendar/core types.
namespace FullCalendar {
const Calendar: new (el: HTMLElement, options?: Record<string, any>) => Calendar;
}
interface Window {
FullCalendar?: typeof FullCalendar;
rptScrollTo: (el: Element, animate?: boolean) => void;
drupalSettings?: {
riversidePt?: RiversidePtSettings;
};
}
}
declare const FullCalendar: any;