From 04cf5c442fa0b880387d3d756376b528e09b897f Mon Sep 17 00:00:00 2001 From: Michael Driscoll Date: Fri, 22 Nov 2024 09:28:04 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#71223=20event-cale?= =?UTF-8?q?ndar:=20Support=20nested=20resources=20by=20@syncsynchalt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../event-calendar__core-tests.ts | 13 +++++++++++++ types/event-calendar__core/index.d.ts | 1 + types/event-calendar__core/package.json | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/types/event-calendar__core/event-calendar__core-tests.ts b/types/event-calendar__core/event-calendar__core-tests.ts index 52a93230d5a8a0..0a64deeae7b28c 100644 --- a/types/event-calendar__core/event-calendar__core-tests.ts +++ b/types/event-calendar__core/event-calendar__core-tests.ts @@ -271,6 +271,19 @@ cal.setOption("buttonText", () => { .setOption("moreLinkContent", (_info: Calendar.MoreLinkInfo) => "content") .setOption("noEventsContent", () => "content") .setOption("resourceLabelContent", (_info: Calendar.ResourceLabelInfo) => "content") + .setOption("resources", [{ + id: "foo", + children: [ + { + id: "bar", + children: [ + { + id: "baz", + }, + ], + }, + ], + }]) .setOption("slotLabelFormat", (_t: Date) => "content") .setOption("theme", (theme: Calendar.Theme) => { let result: Calendar.Theme = {}; diff --git a/types/event-calendar__core/index.d.ts b/types/event-calendar__core/index.d.ts index 39d5d3d63b509a..982e95882dff48 100644 --- a/types/event-calendar__core/index.d.ts +++ b/types/event-calendar__core/index.d.ts @@ -58,6 +58,7 @@ declare namespace Calendar { eventBackgroundColor?: string; eventTextColor?: string; extendedProps?: Record; + children?: ResourceInput[]; } interface Resource { diff --git a/types/event-calendar__core/package.json b/types/event-calendar__core/package.json index 9d9a0764c43039..c643a88beb8fd0 100644 --- a/types/event-calendar__core/package.json +++ b/types/event-calendar__core/package.json @@ -2,7 +2,7 @@ "private": true, "type": "module", "name": "@types/event-calendar__core", - "version": "3.6.9999", + "version": "3.7.9999", "projects": [ "https://vkurko.github.io/calendar/" ],