From 378d604b8ba6c4f2d9bea7f6fced3685e135a58d Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 19 Feb 2024 13:25:01 -0500 Subject: [PATCH 1/4] fix: eventContent custom content not rendering within print-mode --- package.json | 2 ++ tests/index.jsx | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 458a9e5..50434aa 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,13 @@ "@babel/core": "^7.0.0", "@babel/preset-env": "^7.9.0", "@babel/preset-react": "^7.9.4", + "@fullcalendar/adaptive": "~6.1.10", "@fullcalendar/core": "~6.1.10", "@fullcalendar/daygrid": "~6.1.10", "@fullcalendar/list": "~6.1.10", "@fullcalendar/resource": "~6.1.10", "@fullcalendar/resource-timeline": "~6.1.10", + "@fullcalendar/timegrid": "~6.1.10", "@rollup/plugin-babel": "^5.0.0", "@rollup/plugin-commonjs": "^12.0.0", "@rollup/plugin-json": "^4.0.3", diff --git a/tests/index.jsx b/tests/index.jsx index 7c7be00..0fec610 100644 --- a/tests/index.jsx +++ b/tests/index.jsx @@ -1,11 +1,13 @@ -import React, { useState, useEffect, useContext, useCallback, createContext } from 'react' +import React, { useState, useEffect, useContext, useCallback, createContext, createRef } from 'react' import { act } from 'react-dom/test-utils' import { render } from '@testing-library/react' import FullCalendar from '../dist/index.js' +import adaptivePlugin from '@fullcalendar/adaptive' import { sliceEvents } from '@fullcalendar/core' import dayGridPlugin from '@fullcalendar/daygrid' import listPlugin from '@fullcalendar/list' import resourceTimelinePlugin from '@fullcalendar/resource-timeline' +import timeGridPlugin from '@fullcalendar/timegrid' import { anyElsIntersect } from './utils.js' const NOW_DATE = new Date() @@ -696,6 +698,38 @@ it('custom view receives enough props for slicing', () => { expect(container.querySelector('.custom-view-events').innerText).toBe('1 events') }) +// https://github.com/fullcalendar/fullcalendar/issues/7419 +it('render custom event JSX during print-mode', (done) => { + let calendarRef = createRef() + + const { container } = render( + {eventArg.event.title}} + /> + ) + + act(() => { + const api = calendarRef.current.getApi() + api.trigger('_beforeprint') + + setTimeout(() => { + const eventEls = getEventEls(container) + expect(eventEls[0].offsetHeight).toBeGreaterThan(10) + done() + }) + }) +}) + // FullCalendar data utils // ------------------------------------------------------------------------------------------------- From e89533021b62f655676f702ab6e5d47bf9dc16e4 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 19 Feb 2024 18:05:20 -0500 Subject: [PATCH 2/4] fix: events incorrectly positioned w/ React strict-mode --- src/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 320a1dd..f8dd334 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -52,6 +52,9 @@ export default class FullCalendar extends Component() this.handleCustomRendering = customRenderingStore.handle.bind(customRenderingStore) From 4dfb83a6fed856bb4545d461c0fb521bfa270142 Mon Sep 17 00:00:00 2001 From: arshaw Date: Tue, 20 Feb 2024 00:48:19 -0500 Subject: [PATCH 3/4] RELEASING: Releasing 31 package(s) Releases: @fullcalendar/core@6.1.11 @fullcalendar/angular@6.1.11 @fullcalendar/react@6.1.11 @fullcalendar/vue@6.1.11 @fullcalendar/vue3@6.1.11 @fullcalendar/adaptive@6.1.11 @fullcalendar/premium-common@6.1.11 @fullcalendar/resource@6.1.11 @fullcalendar/resource-daygrid@6.1.11 @fullcalendar/resource-timegrid@6.1.11 @fullcalendar/resource-timeline@6.1.11 @fullcalendar/scrollgrid@6.1.11 @fullcalendar/timeline@6.1.11 @fullcalendar/bootstrap@6.1.11 @fullcalendar/bootstrap5@6.1.11 @fullcalendar/daygrid@6.1.11 @fullcalendar/google-calendar@6.1.11 @fullcalendar/icalendar@6.1.11 @fullcalendar/interaction@6.1.11 @fullcalendar/list@6.1.11 @fullcalendar/luxon@6.1.11 @fullcalendar/luxon2@6.1.11 @fullcalendar/luxon3@6.1.11 @fullcalendar/moment@6.1.11 @fullcalendar/moment-timezone@6.1.11 @fullcalendar/multimonth@6.1.11 @fullcalendar/rrule@6.1.11 @fullcalendar/timegrid@6.1.11 @fullcalendar/web-component@6.1.11 fullcalendar@6.1.11 fullcalendar-scheduler@6.1.11 --- package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 50434aa..01bc209 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fullcalendar/react", - "version": "6.1.10", + "version": "6.1.11", "title": "FullCalendar React Component", "description": "The official React Component for FullCalendar", "keywords": [ @@ -17,7 +17,7 @@ "url": "https://github.com/fullcalendar/fullcalendar-react.git" }, "peerDependencies": { - "@fullcalendar/core": "~6.1.10", + "@fullcalendar/core": "~6.1.11", "react": "^16.7.0 || ^17 || ^18", "react-dom": "^16.7.0 || ^17 || ^18" }, @@ -25,13 +25,13 @@ "@babel/core": "^7.0.0", "@babel/preset-env": "^7.9.0", "@babel/preset-react": "^7.9.4", - "@fullcalendar/adaptive": "~6.1.10", - "@fullcalendar/core": "~6.1.10", - "@fullcalendar/daygrid": "~6.1.10", - "@fullcalendar/list": "~6.1.10", - "@fullcalendar/resource": "~6.1.10", - "@fullcalendar/resource-timeline": "~6.1.10", - "@fullcalendar/timegrid": "~6.1.10", + "@fullcalendar/adaptive": "~6.1.11", + "@fullcalendar/core": "~6.1.11", + "@fullcalendar/daygrid": "~6.1.11", + "@fullcalendar/list": "~6.1.11", + "@fullcalendar/resource": "~6.1.11", + "@fullcalendar/resource-timeline": "~6.1.11", + "@fullcalendar/timegrid": "~6.1.11", "@rollup/plugin-babel": "^5.0.0", "@rollup/plugin-commonjs": "^12.0.0", "@rollup/plugin-json": "^4.0.3", From dfcb753fad65aba3ce5a2ed7c6f0e7fcacbad16d Mon Sep 17 00:00:00 2001 From: arshaw Date: Tue, 20 Feb 2024 00:50:25 -0500 Subject: [PATCH 4/4] meta:update --- pnpm-lock.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84b2f13..14fdc80 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4038,6 +4038,7 @@ packages: /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true dependencies: js-tokens: 4.0.0 dev: true