@vicacha-devs/strapi-plugin-calendar 0.0.0-stage → 1.0.0
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/LICENSE.md +21 -0
- package/README.md +163 -2
- package/dist/admin/CalendarPage-CVqowKst.cjs +1015 -0
- package/dist/admin/CalendarPage-Dq6YfSXF.js +1015 -0
- package/dist/admin/SettingsPage-7SecVQEi.js +2088 -0
- package/dist/admin/SettingsPage-D0aCDb9w.cjs +2088 -0
- package/dist/admin/ar-O6QL_nJZ.js +331 -0
- package/dist/admin/ar-yKsEpX_y.cjs +331 -0
- package/dist/admin/de-BpDxjctz.js +331 -0
- package/dist/admin/de-ryVtwWOz.cjs +331 -0
- package/dist/admin/en-BHYSUqXv.cjs +331 -0
- package/dist/admin/en-BoRq-9QD.js +331 -0
- package/dist/admin/es-BZ7WX8Ev.js +331 -0
- package/dist/admin/es-T5v93hXW.cjs +331 -0
- package/dist/admin/fr-BnDr9DC8.js +331 -0
- package/dist/admin/fr-DTdTwx7e.cjs +331 -0
- package/dist/admin/index-DO0QbnXX.cjs +3223 -0
- package/dist/admin/index-USqxqyAm.js +3216 -0
- package/dist/admin/index.cjs +9 -0
- package/dist/admin/index.js +9 -0
- package/dist/admin/index.mjs +9 -0
- package/dist/admin/it-BkJNzy27.cjs +331 -0
- package/dist/admin/it-DkdUInap.js +331 -0
- package/dist/admin/nl-C2NFORLS.js +331 -0
- package/dist/admin/nl-CjnlbeUM.cjs +331 -0
- package/dist/admin/pl-BJArPgCQ.cjs +331 -0
- package/dist/admin/pl-mv5eXA8W.js +331 -0
- package/dist/admin/pt-CSYqSGnz.cjs +331 -0
- package/dist/admin/pt-WpvZGj3b.js +331 -0
- package/dist/admin/src/components/CalendarSidePanel.d.ts +13 -0
- package/dist/admin/src/components/Initializer.d.ts +6 -0
- package/dist/admin/src/components/PluginIcon.d.ts +3 -0
- package/dist/admin/src/components/RRuleInput.d.ts +20 -0
- package/dist/admin/src/components/calendar/CalendarToolbar.d.ts +32 -0
- package/dist/admin/src/components/calendar/FullCalendarCanvas.d.ts +21 -0
- package/dist/admin/src/components/calendar/FullCalendarDayCell.d.ts +11 -0
- package/dist/admin/src/components/calendar/OccurrenceDetailDrawer.d.ts +15 -0
- package/dist/admin/src/components/calendar/QuickCreatePanel.d.ts +29 -0
- package/dist/admin/src/components/calendar/QuickCreateSubcomponents.d.ts +40 -0
- package/dist/admin/src/components/calendar/calendarPageHelpers.d.ts +52 -0
- package/dist/admin/src/components/calendar/calendarThemeStyles.d.ts +2 -0
- package/dist/admin/src/components/settings/CalendarThemeSection.d.ts +9 -0
- package/dist/admin/src/components/settings/CalendarViewsSection.d.ts +10 -0
- package/dist/admin/src/components/settings/CollectionSourcesSection.d.ts +12 -0
- package/dist/admin/src/components/settings/CompanionSuiteSettingsSection.d.ts +29 -0
- package/dist/admin/src/components/settings/SecondaryCalendarsSection.d.ts +11 -0
- package/dist/admin/src/fields/rruleField.d.ts +19 -0
- package/dist/admin/src/index.d.ts +18 -0
- package/dist/admin/src/pages/CalendarPage.d.ts +3 -0
- package/dist/admin/src/pages/SettingsPage.d.ts +3 -0
- package/dist/admin/src/pages/calendarPageSupport.d.ts +8 -0
- package/dist/admin/tr-BhZKvFoK.js +331 -0
- package/dist/admin/tr-zUVxuw9X.cjs +331 -0
- package/dist/package.json +3 -0
- package/dist/server/index.cjs +2585 -0
- package/dist/server/index.js +2585 -0
- package/dist/server/index.mjs +2585 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +7 -0
- package/dist/server/src/controllers/admin.d.ts +15 -0
- package/dist/server/src/controllers/content-api.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts +21 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +85 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/admin.d.ts +17 -0
- package/dist/server/src/routes/content-api.d.ts +10 -0
- package/dist/server/src/routes/index.d.ts +28 -0
- package/dist/server/src/services/builtinSources.d.ts +3 -0
- package/dist/server/src/services/ical.d.ts +6 -0
- package/dist/server/src/services/index.d.ts +23 -0
- package/dist/server/src/services/occurrence.d.ts +6 -0
- package/dist/server/src/services/occurrenceDates.d.ts +7 -0
- package/dist/server/src/services/quickCreateHelpers.d.ts +20 -0
- package/dist/server/src/services/registry.d.ts +19 -0
- package/dist/server/src/services/settings.d.ts +6 -0
- package/dist/server/src/types.d.ts +98 -0
- package/dist/shared/calendarSystems.d.ts +41 -0
- package/dist/shared/icalGenerator.d.ts +18 -0
- package/dist/shared/index.cjs +1612 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/index.js +1612 -0
- package/dist/shared/index.mjs +1612 -0
- package/dist/shared/localization.d.ts +14 -0
- package/dist/shared/pluginId.d.ts +2 -0
- package/dist/shared/rruleEngine.d.ts +22 -0
- package/dist/shared/themePalettes.d.ts +27 -0
- package/dist/shared/themePresets.d.ts +32 -0
- package/dist/shared/types.d.ts +311 -0
- package/package.json +120 -3
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CalendarDirection, CalendarDirectionSetting, FullCalendarLocaleDefinition } from './types';
|
|
2
|
+
export declare const SUPPORTED_CALENDAR_LOCALES: FullCalendarLocaleDefinition[];
|
|
3
|
+
export declare function normalizeLocaleCode(locale?: string): string;
|
|
4
|
+
export declare function isRtlLocale(locale?: string): boolean;
|
|
5
|
+
export declare function getLocalizedCalendarBundle(locale?: string): FullCalendarLocaleDefinition;
|
|
6
|
+
export declare function resolveFullCalendarLocale(uiLocale?: string, defaultLocaleSetting?: string, runtimeOverrideLocale?: string): string;
|
|
7
|
+
export declare function resolveCalendarDirection(locale: string, directionSetting?: CalendarDirectionSetting): CalendarDirection;
|
|
8
|
+
export declare function resolveLocaleFirstDay(locale: string, configuredFirstDay?: number | null): number;
|
|
9
|
+
export declare function buildFullCalendarTimeFormat(timeFormat24h?: boolean): {
|
|
10
|
+
hour: "2-digit" | "numeric";
|
|
11
|
+
minute: "2-digit";
|
|
12
|
+
meridiem: false | "short";
|
|
13
|
+
hour12: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { OccurrenceOverride, ParsedRRule, RRuleFieldValue } from './types';
|
|
2
|
+
export declare function parseRRule(rawRule?: string | null): ParsedRRule;
|
|
3
|
+
export declare function buildRRule(parsed: ParsedRRule): string;
|
|
4
|
+
export declare function describeRRule(rawRule?: string | null): string;
|
|
5
|
+
export declare function parseRRuleFieldValue(raw: unknown, defaultTimezone?: string): RRuleFieldValue;
|
|
6
|
+
export interface ExpandedSlot {
|
|
7
|
+
occurrenceDate: string;
|
|
8
|
+
startDate: string;
|
|
9
|
+
endDate: string;
|
|
10
|
+
isRecurring: boolean;
|
|
11
|
+
isOverridden: boolean;
|
|
12
|
+
rscale?: string;
|
|
13
|
+
override?: OccurrenceOverride;
|
|
14
|
+
}
|
|
15
|
+
export declare function expandRuleSlots(params: {
|
|
16
|
+
baseStartDate: string;
|
|
17
|
+
baseEndDate?: string | null;
|
|
18
|
+
recurrence?: RRuleFieldValue | null;
|
|
19
|
+
windowStart: string;
|
|
20
|
+
windowEnd: string;
|
|
21
|
+
maxOccurrences?: number;
|
|
22
|
+
}): ExpandedSlot[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CalendarColorPaletteId, CalendarColorScheme } from './types';
|
|
2
|
+
export interface CalendarColorPaletteDefinition {
|
|
3
|
+
id: CalendarColorPaletteId;
|
|
4
|
+
label: string;
|
|
5
|
+
lightPrimary: string;
|
|
6
|
+
darkPrimary: string;
|
|
7
|
+
lightHeaderBg: string;
|
|
8
|
+
lightHeaderText: string;
|
|
9
|
+
lightTodayBg: string;
|
|
10
|
+
lightBadgeBg: string;
|
|
11
|
+
lightBadgeText: string;
|
|
12
|
+
lightBadgeBorder: string;
|
|
13
|
+
darkHeaderBg: string;
|
|
14
|
+
darkHeaderText: string;
|
|
15
|
+
darkTodayBg: string;
|
|
16
|
+
darkBadgeBg: string;
|
|
17
|
+
darkBadgeText: string;
|
|
18
|
+
darkBadgeBorder: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const CALENDAR_COLOR_PALETTES: Record<CalendarColorPaletteId, CalendarColorPaletteDefinition>;
|
|
21
|
+
/**
|
|
22
|
+
* Detects the active 'light' | 'dark' color scheme from:
|
|
23
|
+
* 1. Explicit 'light' or 'dark' preference
|
|
24
|
+
* 2. Strapi Design System theme's `colors.neutral0` hex luminance (e.g. #212134 in dark mode vs #ffffff in light mode)
|
|
25
|
+
* 3. Strapi Admin localStorage `STRAPI_THEME` and browser `prefers-color-scheme: dark` media query
|
|
26
|
+
*/
|
|
27
|
+
export declare function detectEffectiveColorScheme(colorScheme?: CalendarColorScheme, strapiNeutral0?: string): "light" | "dark";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CalendarColorPaletteId, CalendarColorScheme, CalendarThemePreset } from './types';
|
|
2
|
+
export interface CalendarThemeDefinition {
|
|
3
|
+
id: CalendarThemePreset;
|
|
4
|
+
label: string;
|
|
5
|
+
description: string;
|
|
6
|
+
category?: "modern" | "design-system" | "heritage";
|
|
7
|
+
fontFamily?: string;
|
|
8
|
+
containerRadius?: string;
|
|
9
|
+
containerShadow?: string;
|
|
10
|
+
eventRadius?: string;
|
|
11
|
+
eventStyle?: "solid" | "tinted" | "accent-bar";
|
|
12
|
+
dayNumberAlign?: "start" | "center" | "end";
|
|
13
|
+
todayHeaderAccent?: "pill" | "top-bar" | "tint";
|
|
14
|
+
primaryColor: string;
|
|
15
|
+
headerBg: string;
|
|
16
|
+
headerText: string;
|
|
17
|
+
cellBg: string;
|
|
18
|
+
cellAltBg: string;
|
|
19
|
+
cellHoverBg: string;
|
|
20
|
+
cellText: string;
|
|
21
|
+
cellMutedText: string;
|
|
22
|
+
borderColor: string;
|
|
23
|
+
todayBg: string;
|
|
24
|
+
todayBorder: string;
|
|
25
|
+
todayNumberBg: string;
|
|
26
|
+
todayNumberText: string;
|
|
27
|
+
badgeBg: string;
|
|
28
|
+
badgeText: string;
|
|
29
|
+
badgeBorder: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const CALENDAR_THEME_PRESETS: Record<CalendarThemePreset, CalendarThemeDefinition>;
|
|
32
|
+
export declare function resolveCalendarTheme(themeKey?: CalendarThemePreset, colorScheme?: CalendarColorScheme, paletteKey?: CalendarColorPaletteId, strapiNeutral0?: string): CalendarThemeDefinition;
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
export type RRuleFrequency = "NONE" | "DAILY" | "WEEKLY" | "MONTHLY" | "YEARLY";
|
|
2
|
+
export type RRuleWeekday = "MO" | "TU" | "WE" | "TH" | "FR" | "SA" | "SU";
|
|
3
|
+
export type CalendarItemStatus = "scheduled" | "cancelled" | "postponed" | "rescheduled";
|
|
4
|
+
export type CalendarViewMode = "dayGridMonth" | "timeGridWeek" | "timeGridDay" | "listMonth" | "multiMonthYear" | "multiMonthYearStacked" | "dayGridYear";
|
|
5
|
+
export interface OccurrenceOverride {
|
|
6
|
+
/** Original occurrence ISO date (YYYY-MM-DD) */
|
|
7
|
+
originalDate: string;
|
|
8
|
+
/** Whether this specific occurrence is cancelled */
|
|
9
|
+
cancelled?: boolean;
|
|
10
|
+
/** Optional overridden start ISO datetime */
|
|
11
|
+
startDate?: string;
|
|
12
|
+
/** Optional overridden end ISO datetime */
|
|
13
|
+
endDate?: string;
|
|
14
|
+
/** Optional overridden title for this occurrence */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Optional overridden location for this occurrence */
|
|
17
|
+
location?: string;
|
|
18
|
+
/** Optional note for this occurrence */
|
|
19
|
+
note?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface RRuleFieldValue {
|
|
22
|
+
/**
|
|
23
|
+
* RFC 5545 / RFC 7529 RRULE string
|
|
24
|
+
* e.g. "FREQ=WEEKLY;INTERVAL=1;BYDAY=FR"
|
|
25
|
+
* or "RSCALE=ISLAMIC-UMALQURA;FREQ=YEARLY;BYMONTH=9;BYMONTHDAY=1"
|
|
26
|
+
*/
|
|
27
|
+
rrule: string;
|
|
28
|
+
/** IANA timezone identifier (e.g. "UTC", "America/New_York", "America/Bogota") */
|
|
29
|
+
timezone: string;
|
|
30
|
+
/** Optional RFC 7529 non-Gregorian recurrence scale (e.g. "islamic-umalqura", "hebrew", "persian") */
|
|
31
|
+
rscale?: string;
|
|
32
|
+
/** Whether the entry spans full days */
|
|
33
|
+
allDay?: boolean;
|
|
34
|
+
/** Excluded occurrence dates in YYYY-MM-DD format */
|
|
35
|
+
exdates?: string[];
|
|
36
|
+
/** Per-occurrence overrides keyed by YYYY-MM-DD */
|
|
37
|
+
overrides?: Record<string, OccurrenceOverride>;
|
|
38
|
+
}
|
|
39
|
+
export interface ParsedRRule {
|
|
40
|
+
freq: RRuleFrequency;
|
|
41
|
+
interval: number;
|
|
42
|
+
byDay: RRuleWeekday[];
|
|
43
|
+
byMonth?: number;
|
|
44
|
+
byMonthDay?: number;
|
|
45
|
+
rscale?: string;
|
|
46
|
+
count?: number;
|
|
47
|
+
until?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface TimeSlotWindow {
|
|
50
|
+
/** Start time in HH:mm:ss format (e.g. "09:00:00") */
|
|
51
|
+
start: string;
|
|
52
|
+
/** End time in HH:mm:ss format (e.g. "11:00:00") */
|
|
53
|
+
end: string;
|
|
54
|
+
}
|
|
55
|
+
export interface BusinessHoursWindow {
|
|
56
|
+
/** Days of week (0 = Sunday .. 6 = Saturday) */
|
|
57
|
+
daysOfWeek: number[];
|
|
58
|
+
/** Start time in HH:mm format (e.g. "08:00") */
|
|
59
|
+
startTime: string;
|
|
60
|
+
/** End time in HH:mm format (e.g. "18:00") */
|
|
61
|
+
endTime: string;
|
|
62
|
+
}
|
|
63
|
+
export interface CalendarSystemConfig {
|
|
64
|
+
/** Unique identifier for this calendar system (e.g. "hijri", "hebrew", "persian", "fiscal") */
|
|
65
|
+
id: string;
|
|
66
|
+
/** Human-readable display label (e.g. "Hijri (Umm al-Qura)", "Hebrew", "Persian") */
|
|
67
|
+
label: string;
|
|
68
|
+
/** Unicode BCP 47 / @internationalized/date calendar identifier or custom formatter ID */
|
|
69
|
+
intlCalendar: string;
|
|
70
|
+
/** Optional BCP 47 locale tag for formatting (defaults to current request/UI locale) */
|
|
71
|
+
locale?: string;
|
|
72
|
+
/** Optional day offset (-2 to +2) for lunar sighting or regional adjustments */
|
|
73
|
+
dayOffset?: number;
|
|
74
|
+
/** Optional document field name that overrides the auto-computed date when non-empty (e.g. "hijriDate") */
|
|
75
|
+
overrideField?: string;
|
|
76
|
+
/** Whether this calendar system is active in the Admin Calendar & Occurrence APIs */
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
}
|
|
79
|
+
export type CalendarSystemFormatterFn = (date: Date, context: {
|
|
80
|
+
locale: string;
|
|
81
|
+
system: CalendarSystemConfig;
|
|
82
|
+
compact: boolean;
|
|
83
|
+
}) => string;
|
|
84
|
+
export interface AlternateDateValue {
|
|
85
|
+
calendarId: string;
|
|
86
|
+
label: string;
|
|
87
|
+
formatted: string;
|
|
88
|
+
compact?: string;
|
|
89
|
+
intlCalendar?: string;
|
|
90
|
+
year?: number;
|
|
91
|
+
month?: number;
|
|
92
|
+
day?: number;
|
|
93
|
+
isOverridden?: boolean;
|
|
94
|
+
}
|
|
95
|
+
export interface CalendarSourceMapping {
|
|
96
|
+
/** Unique identifier for this source mapping (e.g. "events", "bookings", "articles") */
|
|
97
|
+
id: string;
|
|
98
|
+
/** Human-readable label shown in Calendar filter pills */
|
|
99
|
+
label: string;
|
|
100
|
+
/** Strapi Content-Type UID (e.g. "api::event.event", "api::booking.booking") */
|
|
101
|
+
uid: string;
|
|
102
|
+
/** Hex color used on the calendar grid (e.g. "#0D9488") */
|
|
103
|
+
color: string;
|
|
104
|
+
/** Whether this source is enabled on the calendar & occurrence APIs */
|
|
105
|
+
enabled: boolean;
|
|
106
|
+
/** Whether this source is included in public Content-API feeds (defaults to true, false for private bookings) */
|
|
107
|
+
publicFeed?: boolean;
|
|
108
|
+
/** Field mapping on the target collection type */
|
|
109
|
+
fields: {
|
|
110
|
+
title: string;
|
|
111
|
+
startDate: string;
|
|
112
|
+
endDate?: string;
|
|
113
|
+
rrule?: string;
|
|
114
|
+
location?: string;
|
|
115
|
+
category?: string;
|
|
116
|
+
status?: string;
|
|
117
|
+
summary?: string;
|
|
118
|
+
slug?: string;
|
|
119
|
+
color?: string;
|
|
120
|
+
timeSlot?: string;
|
|
121
|
+
/** Optional mapping of calendar system IDs to document override fields (e.g. { hijri: "hijriDate" }) */
|
|
122
|
+
alternateDateFields?: Record<string, string>;
|
|
123
|
+
/** Optional list of custom document attributes to pass through onto each ExpandedCalendarOccurrence */
|
|
124
|
+
customFields?: string[];
|
|
125
|
+
};
|
|
126
|
+
/** Optional custom mapping from timeSlot enum values to start/end times */
|
|
127
|
+
timeSlotMap?: Record<string, TimeSlotWindow>;
|
|
128
|
+
/** Optional category-to-color overrides */
|
|
129
|
+
categoryColors?: Record<string, string>;
|
|
130
|
+
/** Default allDay flag when endDate is omitted and startDate is date-only */
|
|
131
|
+
defaultAllDay?: boolean;
|
|
132
|
+
}
|
|
133
|
+
export interface RecurrencePreset {
|
|
134
|
+
/** Unique identifier for the preset */
|
|
135
|
+
id: string;
|
|
136
|
+
/** Human-readable preset label */
|
|
137
|
+
label: string;
|
|
138
|
+
/** RFC 5545 / RFC 7529 RRULE string */
|
|
139
|
+
rrule: string;
|
|
140
|
+
}
|
|
141
|
+
export interface DiscoveredContentTypeField {
|
|
142
|
+
name: string;
|
|
143
|
+
type: string;
|
|
144
|
+
}
|
|
145
|
+
export interface DiscoveredContentType {
|
|
146
|
+
uid: string;
|
|
147
|
+
displayName: string;
|
|
148
|
+
kind: string;
|
|
149
|
+
fields: DiscoveredContentTypeField[];
|
|
150
|
+
}
|
|
151
|
+
export type CalendarDirection = "ltr" | "rtl";
|
|
152
|
+
export type CalendarDirectionSetting = "auto" | "ltr" | "rtl";
|
|
153
|
+
export type WeekNumberCalculationMode = "local" | "ISO";
|
|
154
|
+
export type CalendarThemePreset = "breeze" | "monarch" | "forma" | "pulse" | "classic" | "shadcn" | "mui" | "emerald" | "sand" | "midnight";
|
|
155
|
+
export type CalendarColorScheme = "auto" | "light" | "dark";
|
|
156
|
+
export type CalendarColorPaletteId = "default" | "purple" | "blue" | "indigo" | "emerald" | "rose" | "amber";
|
|
157
|
+
export type SecondaryCalendarLanguageMode = "local" | "ar" | "off";
|
|
158
|
+
export * from './themePalettes';
|
|
159
|
+
export * from './themePresets';
|
|
160
|
+
export interface FullCalendarLocaleDefinition {
|
|
161
|
+
/** BCP 47 locale code (e.g. "en", "es", "fr", "ar") */
|
|
162
|
+
code: string;
|
|
163
|
+
/** English display name */
|
|
164
|
+
label: string;
|
|
165
|
+
/** Native display name */
|
|
166
|
+
nativeName: string;
|
|
167
|
+
/** Default text direction for this locale */
|
|
168
|
+
direction: CalendarDirection;
|
|
169
|
+
/** Default week parameters (dow: 0=Sun..6=Sat, doy: min days in first week) */
|
|
170
|
+
week: {
|
|
171
|
+
dow: number;
|
|
172
|
+
doy: number;
|
|
173
|
+
};
|
|
174
|
+
/** Localized button labels for FullCalendar */
|
|
175
|
+
buttonText: {
|
|
176
|
+
prev: string;
|
|
177
|
+
next: string;
|
|
178
|
+
today: string;
|
|
179
|
+
year: string;
|
|
180
|
+
month: string;
|
|
181
|
+
week: string;
|
|
182
|
+
day: string;
|
|
183
|
+
list: string;
|
|
184
|
+
};
|
|
185
|
+
/** Week number column prefix (e.g. "Wk", "Sm", "KW", "أسبوع") */
|
|
186
|
+
weekText: string;
|
|
187
|
+
/** Label for all-day slot in TimeGrid */
|
|
188
|
+
allDayText: string;
|
|
189
|
+
/** Label for "+N more" popover link */
|
|
190
|
+
moreLinkText: string;
|
|
191
|
+
/** Empty state message in List / Agenda view */
|
|
192
|
+
noEventsText: string;
|
|
193
|
+
}
|
|
194
|
+
export interface CalendarPluginSettings {
|
|
195
|
+
/** Visual calendar theme preset ("breeze" by default) */
|
|
196
|
+
theme?: CalendarThemePreset;
|
|
197
|
+
/** Light or dark color scheme ("light" by default) */
|
|
198
|
+
colorScheme?: CalendarColorScheme;
|
|
199
|
+
/** Optional accent color palette override ("default" | "purple" | "blue" | "indigo" | "emerald" | "rose" | "amber") */
|
|
200
|
+
themePalette?: CalendarColorPaletteId;
|
|
201
|
+
/** Secondary calendar display language mode ("local" | "ar" | "off") */
|
|
202
|
+
secondaryCalendarLanguage?: SecondaryCalendarLanguageMode;
|
|
203
|
+
/** Default IANA timezone (e.g. "UTC") */
|
|
204
|
+
defaultTimezone: string;
|
|
205
|
+
/** Default FullCalendar locale ("auto" uses Strapi Admin locale, or explicit code e.g. "es", "ar") */
|
|
206
|
+
defaultLocale?: string;
|
|
207
|
+
/** Layout direction ("auto" derives from active locale, or explicit "ltr" | "rtl") */
|
|
208
|
+
direction?: CalendarDirectionSetting;
|
|
209
|
+
/** Default FullCalendar view mode */
|
|
210
|
+
defaultView: CalendarViewMode;
|
|
211
|
+
/** First day of week (0 = Sunday, 1 = Monday, 6 = Saturday) */
|
|
212
|
+
firstDayOfWeek: number;
|
|
213
|
+
/** Show week numbers on Month/Week grids */
|
|
214
|
+
weekNumbers?: boolean;
|
|
215
|
+
/** Week number calculation rule ("ISO" or "local") */
|
|
216
|
+
weekNumberCalculation?: WeekNumberCalculationMode;
|
|
217
|
+
/** Use 24-hour time formatting (true = 14:30, false = 2:30 PM) */
|
|
218
|
+
timeFormat24h?: boolean;
|
|
219
|
+
/** TimeGrid start time (e.g. "07:00:00") */
|
|
220
|
+
startHour: string;
|
|
221
|
+
/** TimeGrid end time (e.g. "21:00:00") */
|
|
222
|
+
endHour: string;
|
|
223
|
+
/** TimeGrid slot duration in HH:mm:ss (e.g. "00:30:00") */
|
|
224
|
+
slotDuration: string;
|
|
225
|
+
/** Primary accent color for the calendar */
|
|
226
|
+
primaryColor: string;
|
|
227
|
+
/** Show weekends on Month/Week grids */
|
|
228
|
+
showWeekends: boolean;
|
|
229
|
+
/** Show Today button in toolbar */
|
|
230
|
+
showTodayButton: boolean;
|
|
231
|
+
/** Show Quick-Create button in toolbar & allow slot selection */
|
|
232
|
+
showCreateButton: boolean;
|
|
233
|
+
/** Enable Month view tab */
|
|
234
|
+
monthView: boolean;
|
|
235
|
+
/** Enable Week TimeGrid view tab */
|
|
236
|
+
weekView: boolean;
|
|
237
|
+
/** Enable Day TimeGrid view tab */
|
|
238
|
+
dayView: boolean;
|
|
239
|
+
/** Enable Agenda List view tab */
|
|
240
|
+
agendaView: boolean;
|
|
241
|
+
/** Enable Multi-Month Year view tab */
|
|
242
|
+
yearView: boolean;
|
|
243
|
+
/** Business / Operating hours shaded on Week & Day TimeGrids */
|
|
244
|
+
businessHours: BusinessHoursWindow[];
|
|
245
|
+
/** Public iCal feed calendar name */
|
|
246
|
+
feedTitle: string;
|
|
247
|
+
/** Configured collection sources */
|
|
248
|
+
sources: CalendarSourceMapping[];
|
|
249
|
+
/** Optional secondary/alternative calendar systems (Hijri, Hebrew, Persian, Buddhist, or custom) */
|
|
250
|
+
secondaryCalendars?: CalendarSystemConfig[];
|
|
251
|
+
/** Configurable RRULE / RSCALE recurrence presets */
|
|
252
|
+
recurrencePresets?: RecurrencePreset[];
|
|
253
|
+
}
|
|
254
|
+
export interface CalendarLinkSet {
|
|
255
|
+
google: string;
|
|
256
|
+
outlook: string;
|
|
257
|
+
yahoo: string;
|
|
258
|
+
icsPath: string;
|
|
259
|
+
}
|
|
260
|
+
export interface ExpandedCalendarOccurrence {
|
|
261
|
+
/** Deterministic ID: `${sourceId}:${documentId}:${occurrenceDate}` */
|
|
262
|
+
occurrenceId: string;
|
|
263
|
+
/** Source mapping ID */
|
|
264
|
+
sourceId: string;
|
|
265
|
+
/** Source display label */
|
|
266
|
+
sourceLabel: string;
|
|
267
|
+
/** Strapi Content-Type UID */
|
|
268
|
+
uid: string;
|
|
269
|
+
/** Strapi v5 documentId */
|
|
270
|
+
documentId: string;
|
|
271
|
+
/** Document locale code when localized via Strapi i18n (e.g. "es", "en") */
|
|
272
|
+
locale?: string;
|
|
273
|
+
/** Occurrence date key (YYYY-MM-DD) */
|
|
274
|
+
occurrenceDate: string;
|
|
275
|
+
/** Effective start ISO timestamp */
|
|
276
|
+
startDate: string;
|
|
277
|
+
/** Effective end ISO timestamp */
|
|
278
|
+
endDate: string;
|
|
279
|
+
/** All-day flag */
|
|
280
|
+
allDay: boolean;
|
|
281
|
+
/** IANA timezone */
|
|
282
|
+
timezone: string;
|
|
283
|
+
/** Entry title */
|
|
284
|
+
title: string;
|
|
285
|
+
/** Optional slug */
|
|
286
|
+
slug?: string;
|
|
287
|
+
/** Optional summary */
|
|
288
|
+
summary?: string;
|
|
289
|
+
/** Physical location or venue */
|
|
290
|
+
location?: string;
|
|
291
|
+
/** Category string */
|
|
292
|
+
category?: string;
|
|
293
|
+
/** Lifecycle status */
|
|
294
|
+
status: CalendarItemStatus;
|
|
295
|
+
/** Hex badge color */
|
|
296
|
+
color: string;
|
|
297
|
+
/** Whether generated from an RRULE/RSCALE recurrence */
|
|
298
|
+
isRecurring: boolean;
|
|
299
|
+
/** Raw RRULE string if recurring */
|
|
300
|
+
rrule?: string;
|
|
301
|
+
/** Optional non-Gregorian RSCALE identifier */
|
|
302
|
+
rscale?: string;
|
|
303
|
+
/** Whether this specific occurrence has an override applied */
|
|
304
|
+
isOverridden?: boolean;
|
|
305
|
+
/** Add-to-calendar links */
|
|
306
|
+
calendarLinks: CalendarLinkSet;
|
|
307
|
+
/** Alternate calendar representations (e.g., Hijri, Hebrew, Persian, or custom date systems) */
|
|
308
|
+
alternateDates?: Record<string, AlternateDateValue>;
|
|
309
|
+
/** Custom fields extracted from the source document via `source.fields.customFields` */
|
|
310
|
+
customFields?: Record<string, unknown>;
|
|
311
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vicacha-devs/strapi-plugin-calendar",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Universal Multi-Source Calendar, FullCalendar v6 Scheduler, RFC 5545/7529 Recurrence (RRULE & RSCALE), Multi-Calendar Systems (Hijri, Hebrew, Persian, etc.), and iCal (.ics) plugin for Strapi v5.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"calendar",
|
|
7
|
+
"fullcalendar",
|
|
8
|
+
"hebrew",
|
|
9
|
+
"hijri",
|
|
10
|
+
"ical",
|
|
11
|
+
"ics",
|
|
12
|
+
"internationalized-date",
|
|
13
|
+
"persian",
|
|
14
|
+
"rrule",
|
|
15
|
+
"rscale",
|
|
16
|
+
"scheduler",
|
|
17
|
+
"strapi",
|
|
18
|
+
"strapi-plugin",
|
|
19
|
+
"strapi-v5"
|
|
20
|
+
],
|
|
21
|
+
"homepage": "https://github.com/Vicacha-Devs/strapi-v5-extensions/tree/main/packages/strapi-plugin-calendar#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/Vicacha-Devs/strapi-v5-extensions/issues"
|
|
24
|
+
},
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"author": "Vicacha Devs",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/Vicacha-Devs/strapi-v5-extensions.git",
|
|
30
|
+
"directory": "packages/strapi-plugin-calendar"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist"
|
|
34
|
+
],
|
|
35
|
+
"type": "module",
|
|
36
|
+
"exports": {
|
|
37
|
+
"./package.json": "./package.json",
|
|
38
|
+
"./strapi-admin": {
|
|
39
|
+
"types": "./dist/admin/src/index.d.ts",
|
|
40
|
+
"source": "./admin/src/index.ts",
|
|
41
|
+
"import": "./dist/admin/index.js",
|
|
42
|
+
"require": "./dist/admin/index.cjs",
|
|
43
|
+
"default": "./dist/admin/index.js"
|
|
44
|
+
},
|
|
45
|
+
"./strapi-server": {
|
|
46
|
+
"types": "./dist/server/src/index.d.ts",
|
|
47
|
+
"source": "./server/src/index.ts",
|
|
48
|
+
"import": "./dist/server/index.js",
|
|
49
|
+
"require": "./dist/server/index.cjs",
|
|
50
|
+
"default": "./dist/server/index.js"
|
|
51
|
+
},
|
|
52
|
+
"./shared": {
|
|
53
|
+
"types": "./dist/shared/index.d.ts",
|
|
54
|
+
"source": "./shared/index.ts",
|
|
55
|
+
"import": "./dist/shared/index.js",
|
|
56
|
+
"require": "./dist/shared/index.cjs",
|
|
57
|
+
"default": "./dist/shared/index.js"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public",
|
|
62
|
+
"provenance": true
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@fullcalendar/core": "^6.1.15",
|
|
66
|
+
"@fullcalendar/daygrid": "^6.1.15",
|
|
67
|
+
"@fullcalendar/interaction": "^6.1.15",
|
|
68
|
+
"@fullcalendar/list": "^6.1.15",
|
|
69
|
+
"@fullcalendar/multimonth": "^6.1.15",
|
|
70
|
+
"@fullcalendar/react": "^6.1.15",
|
|
71
|
+
"@fullcalendar/timegrid": "^6.1.15",
|
|
72
|
+
"@internationalized/date": "^3.10.0",
|
|
73
|
+
"@strapi/design-system": "^2.0.0",
|
|
74
|
+
"@strapi/icons": "^2.0.0",
|
|
75
|
+
"react-intl": "^6.6.8"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@strapi/sdk-plugin": "6.1.1",
|
|
79
|
+
"@strapi/strapi": "^5.0.0",
|
|
80
|
+
"@strapi/typescript-utils": "^5.0.0",
|
|
81
|
+
"@types/node": "^20.11.0",
|
|
82
|
+
"@types/react": "^18.3.3",
|
|
83
|
+
"@types/react-dom": "^18.3.0",
|
|
84
|
+
"react": "^18.3.1",
|
|
85
|
+
"react-dom": "^18.3.1",
|
|
86
|
+
"react-router-dom": "^6.26.0",
|
|
87
|
+
"styled-components": "^6.1.12",
|
|
88
|
+
"typescript": "^5.5.4",
|
|
89
|
+
"vitest": "^2.1.0",
|
|
90
|
+
"@vicacha-devs/plugin-shared": "1.0.0",
|
|
91
|
+
"@vicacha-devs/typescript-config": "1.0.0"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@strapi/design-system": "^2.0.0",
|
|
95
|
+
"@strapi/icons": "^2.0.0",
|
|
96
|
+
"@strapi/strapi": "^5.0.0",
|
|
97
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
98
|
+
"react-dom": "^17.0.0 || ^18.0.0",
|
|
99
|
+
"react-router-dom": "^6.0.0",
|
|
100
|
+
"styled-components": "^6.0.0"
|
|
101
|
+
},
|
|
102
|
+
"engines": {
|
|
103
|
+
"node": ">=20.16.0",
|
|
104
|
+
"pnpm": ">=10.0.0"
|
|
105
|
+
},
|
|
106
|
+
"strapi": {
|
|
107
|
+
"name": "calendar",
|
|
108
|
+
"displayName": "Calendar & Scheduler",
|
|
109
|
+
"description": "Visualize, schedule, and syndicate any Strapi v5 collection types across Month, Week, Day, Agenda, and Year views with multi-calendar & RRULE support.",
|
|
110
|
+
"kind": "plugin"
|
|
111
|
+
},
|
|
112
|
+
"scripts": {
|
|
113
|
+
"build": "strapi-plugin build && node ../../scripts/ensure-esm-dist.ts",
|
|
114
|
+
"clean": "rm -rf dist .strapi",
|
|
115
|
+
"test": "node --import ./tests/register-ts-resolver.ts --test tests/*.test.ts",
|
|
116
|
+
"test:ts": "npm run test:ts:front && npm run test:ts:back",
|
|
117
|
+
"test:ts:back": "tsc -p server/tsconfig.json --noEmit",
|
|
118
|
+
"test:ts:front": "tsc -p admin/tsconfig.json --noEmit",
|
|
119
|
+
"verify": "strapi-plugin verify",
|
|
120
|
+
"watch": "strapi-plugin watch",
|
|
121
|
+
"watch:link": "strapi-plugin watch:link"
|
|
122
|
+
}
|
|
6
123
|
}
|