@manzanohq/calendar-lite 0.1.1
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 +191 -0
- package/cdn/calendar.component.d.ts +146 -0
- package/cdn/calendar.component.js +2 -0
- package/cdn/calendar.component.js.map +7 -0
- package/cdn/calendar.d.ts +9 -0
- package/cdn/calendar.js +2 -0
- package/cdn/calendar.js.map +7 -0
- package/cdn/calendar.styles.d.ts +3 -0
- package/cdn/calendar.styles.js +2 -0
- package/cdn/calendar.styles.js.map +7 -0
- package/cdn/calendar.types.d.ts +99 -0
- package/cdn/calendar.types.js +2 -0
- package/cdn/calendar.types.js.map +7 -0
- package/cdn/chunks/chunk.B6XGWUEF.js +1 -0
- package/cdn/chunks/chunk.B6XGWUEF.js.map +7 -0
- package/cdn/chunks/chunk.BYWXPW2P.js +2 -0
- package/cdn/chunks/chunk.BYWXPW2P.js.map +7 -0
- package/cdn/chunks/chunk.EOXXNYIW.js +2 -0
- package/cdn/chunks/chunk.EOXXNYIW.js.map +7 -0
- package/cdn/chunks/chunk.MGICPQBB.js +2 -0
- package/cdn/chunks/chunk.MGICPQBB.js.map +7 -0
- package/cdn/chunks/chunk.OEC274YS.js +915 -0
- package/cdn/chunks/chunk.OEC274YS.js.map +7 -0
- package/cdn/chunks/chunk.PJFNXC5P.js +307 -0
- package/cdn/chunks/chunk.PJFNXC5P.js.map +7 -0
- package/cdn/index.d.ts +3 -0
- package/cdn/index.js +2 -0
- package/cdn/index.js.map +7 -0
- package/cdn/internal/date-utils.d.ts +74 -0
- package/cdn/internal/date-utils.js +2 -0
- package/cdn/internal/date-utils.js.map +7 -0
- package/cdn/internal/event-layout.d.ts +67 -0
- package/cdn/internal/event-layout.js +2 -0
- package/cdn/internal/event-layout.js.map +7 -0
- package/dist/calendar.component.d.ts +146 -0
- package/dist/calendar.component.d.ts.map +1 -0
- package/dist/calendar.component.js +1218 -0
- package/dist/calendar.component.js.map +7 -0
- package/dist/calendar.d.ts +9 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +5 -0
- package/dist/calendar.js.map +7 -0
- package/dist/calendar.styles.d.ts +3 -0
- package/dist/calendar.styles.d.ts.map +1 -0
- package/dist/calendar.styles.js +923 -0
- package/dist/calendar.styles.js.map +7 -0
- package/dist/calendar.types.d.ts +99 -0
- package/dist/calendar.types.d.ts.map +1 -0
- package/dist/calendar.types.js +1 -0
- package/dist/calendar.types.js.map +7 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +7 -0
- package/dist/internal/date-utils.d.ts +74 -0
- package/dist/internal/date-utils.d.ts.map +1 -0
- package/dist/internal/date-utils.js +133 -0
- package/dist/internal/date-utils.js.map +7 -0
- package/dist/internal/event-layout.d.ts +67 -0
- package/dist/internal/event-layout.d.ts.map +1 -0
- package/dist/internal/event-layout.js +224 -0
- package/dist/internal/event-layout.js.map +7 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding any notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2025 Manzano HQ
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { type TemplateResult } from 'lit';
|
|
2
|
+
import { ManzanoElement } from '@manzanohq/components/dist/internal/manzano-element.js';
|
|
3
|
+
import type { CalendarEvent, CalendarResource, CalendarView } from './calendar.types.js';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A full-featured calendar component with day, week, month, and resource views.
|
|
6
|
+
*
|
|
7
|
+
* @tag mz-calendar
|
|
8
|
+
*
|
|
9
|
+
* @event mz-calendar-event-click - Emitted when a calendar event is clicked.
|
|
10
|
+
* @event mz-calendar-event-drop - Emitted when a calendar event is dragged to a new time/day.
|
|
11
|
+
* @event mz-calendar-event-resize - Emitted when a calendar event is resized.
|
|
12
|
+
* @event mz-calendar-select - Emitted when a date range is selected by dragging on the grid.
|
|
13
|
+
* @event mz-calendar-dates-set - Emitted when the visible date range changes.
|
|
14
|
+
*
|
|
15
|
+
* @csspart calendar - The calendar wrapper.
|
|
16
|
+
* @csspart toolbar - The toolbar container.
|
|
17
|
+
* @csspart title - The title text.
|
|
18
|
+
* @csspart header - The day/resource column headers row.
|
|
19
|
+
* @csspart allday - The all-day event row.
|
|
20
|
+
* @csspart grid - The time grid.
|
|
21
|
+
* @csspart event - Individual event elements (available in all views).
|
|
22
|
+
*
|
|
23
|
+
* @cssproperty --mz-calendar-bg - Calendar background color.
|
|
24
|
+
* @cssproperty --mz-calendar-border-color - Border color.
|
|
25
|
+
* @cssproperty --mz-calendar-event-bg - Default event background color.
|
|
26
|
+
* @cssproperty --mz-calendar-event-color - Default event text color.
|
|
27
|
+
* @cssproperty --mz-calendar-slot-height - Height of each time slot.
|
|
28
|
+
* @cssproperty --mz-calendar-today-bg - Today column highlight color.
|
|
29
|
+
* @cssproperty --mz-calendar-now-indicator-color - Now indicator line color.
|
|
30
|
+
* @cssproperty --mz-calendar-min-height - Minimum calendar height.
|
|
31
|
+
* @cssproperty --mz-calendar-body-height - Max height of scrollable time grid body.
|
|
32
|
+
*/
|
|
33
|
+
export declare class MzCalendar extends ManzanoElement {
|
|
34
|
+
static styles: import("lit").CSSResult[];
|
|
35
|
+
/** The current view type. */
|
|
36
|
+
view: CalendarView;
|
|
37
|
+
/** The initial date (ISO date string YYYY-MM-DD). */
|
|
38
|
+
date: string;
|
|
39
|
+
/** Array of calendar events to display. */
|
|
40
|
+
events: CalendarEvent[];
|
|
41
|
+
/** Array of resources for resource views. */
|
|
42
|
+
resources: CalendarResource[];
|
|
43
|
+
/** Duration of each time slot in minutes. */
|
|
44
|
+
slotDuration: number;
|
|
45
|
+
/** Earliest visible time in the time grid (HH:MM format). */
|
|
46
|
+
slotMinTime: string;
|
|
47
|
+
/** Latest visible time in the time grid (HH:MM format). */
|
|
48
|
+
slotMaxTime: string;
|
|
49
|
+
/** Whether to show the all-day event slot. */
|
|
50
|
+
allDaySlot: boolean;
|
|
51
|
+
/** Whether date range selection is enabled. */
|
|
52
|
+
selectable: boolean;
|
|
53
|
+
/** Whether events are editable (drag/resize). */
|
|
54
|
+
editable: boolean;
|
|
55
|
+
/** Whether to show the now indicator line. */
|
|
56
|
+
nowIndicator: boolean;
|
|
57
|
+
/** First day of the week (0=Sunday, 1=Monday, etc.). */
|
|
58
|
+
firstDay: number;
|
|
59
|
+
/** Locale for date/time formatting (BCP 47 string). Defaults to browser locale. */
|
|
60
|
+
locale: string;
|
|
61
|
+
/** Custom duration in days for the view (0 = use view default). */
|
|
62
|
+
duration: number;
|
|
63
|
+
/** Maximum number of events to show per day cell in month view. */
|
|
64
|
+
dayMaxEvents: number;
|
|
65
|
+
/** Whether to display the time grid at full height without scrolling. */
|
|
66
|
+
noScroll: boolean;
|
|
67
|
+
/** Custom render function for event content. Receives the event and returns a TemplateResult or string. */
|
|
68
|
+
eventContent: ((event: CalendarEvent) => TemplateResult | string) | null;
|
|
69
|
+
private currentDate;
|
|
70
|
+
private nowMinutes;
|
|
71
|
+
private dragSelection;
|
|
72
|
+
private _containerWidth;
|
|
73
|
+
private nowTimer;
|
|
74
|
+
private dragCleanup;
|
|
75
|
+
private resizeObserver;
|
|
76
|
+
private liveText;
|
|
77
|
+
connectedCallback(): void;
|
|
78
|
+
disconnectedCallback(): void;
|
|
79
|
+
handleDateChange(_oldValue: string, newValue: string): void;
|
|
80
|
+
handleViewChange(): void;
|
|
81
|
+
handleNowIndicatorChange(_old: boolean, enabled: boolean): void;
|
|
82
|
+
/** Navigate to the previous period. */
|
|
83
|
+
prev(): void;
|
|
84
|
+
/** Navigate to the next period. */
|
|
85
|
+
next(): void;
|
|
86
|
+
/** Navigate to today. */
|
|
87
|
+
today(): void;
|
|
88
|
+
/** Navigate to a specific date. */
|
|
89
|
+
gotoDate(date: Date | string): void;
|
|
90
|
+
/** Change the current view. */
|
|
91
|
+
changeView(view: CalendarView): void;
|
|
92
|
+
/** Get the current date as a Date object. */
|
|
93
|
+
getDate(): Date;
|
|
94
|
+
/** Add an event to the calendar. */
|
|
95
|
+
addEvent(event: CalendarEvent): void;
|
|
96
|
+
/** Update an existing event by ID. */
|
|
97
|
+
updateEvent(event: CalendarEvent): void;
|
|
98
|
+
/** Remove an event by ID. */
|
|
99
|
+
removeEvent(id: string): void;
|
|
100
|
+
/** Trigger a re-render of all events. */
|
|
101
|
+
refetchEvents(): void;
|
|
102
|
+
private updateNowMinutes;
|
|
103
|
+
private getResolvedLocale;
|
|
104
|
+
/** Responsive day count — reduces visible days at narrow widths (like Google Calendar) */
|
|
105
|
+
private get responsiveDayCount();
|
|
106
|
+
/** Get the days array for the current view */
|
|
107
|
+
private getVisibleDays;
|
|
108
|
+
/** Calculate offset date for prev/next navigation */
|
|
109
|
+
private getOffsetDate;
|
|
110
|
+
/** Get the visible date range for emitting events */
|
|
111
|
+
private getVisibleRange;
|
|
112
|
+
private emitDatesSet;
|
|
113
|
+
private announceLive;
|
|
114
|
+
/** Get display title for the toolbar */
|
|
115
|
+
private getTitle;
|
|
116
|
+
private getViewLabel;
|
|
117
|
+
/** Total slot count for the time grid */
|
|
118
|
+
private getSlotCount;
|
|
119
|
+
/** Generate hour label entries for the gutter */
|
|
120
|
+
private getHourLabels;
|
|
121
|
+
/** Get now indicator position as a percentage of the grid height */
|
|
122
|
+
private getNowPosition;
|
|
123
|
+
/** Get the day column index for "now" (for the now indicator) */
|
|
124
|
+
private getNowDayIndex;
|
|
125
|
+
private handleEventClick;
|
|
126
|
+
private handleEventKeydown;
|
|
127
|
+
protected updated(): void;
|
|
128
|
+
private setupGridDrag;
|
|
129
|
+
/** Set up drag-to-move on an event element */
|
|
130
|
+
private setupEventDrag;
|
|
131
|
+
render(): TemplateResult;
|
|
132
|
+
private renderToolbar;
|
|
133
|
+
private renderViewButton;
|
|
134
|
+
private renderView;
|
|
135
|
+
private renderTimeGrid;
|
|
136
|
+
private renderTimeGridEvent;
|
|
137
|
+
/** Returns a ref callback that sets up drag on the event element */
|
|
138
|
+
private refEventDrag;
|
|
139
|
+
private renderMonthGrid;
|
|
140
|
+
private renderMonthCell;
|
|
141
|
+
private renderResourceTimeGrid;
|
|
142
|
+
private renderResourceTimeGridEvent;
|
|
143
|
+
private renderResourceTimeline;
|
|
144
|
+
private renderListView;
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=calendar.component.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MzCalendar } from './calendar.component.js';
|
|
2
|
+
export * from './calendar.component.js';
|
|
3
|
+
export * from './calendar.types.js';
|
|
4
|
+
declare global {
|
|
5
|
+
interface HTMLElementTagNameMap {
|
|
6
|
+
'mz-calendar': MzCalendar;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=calendar.d.ts.map
|
package/cdn/calendar.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as e}from"./chunks/chunk.PJFNXC5P.js";import"./chunks/chunk.OEC274YS.js";import"./chunks/chunk.B6XGWUEF.js";import"./chunks/chunk.EOXXNYIW.js";import"./chunks/chunk.BYWXPW2P.js";import"./chunks/chunk.MGICPQBB.js";e.define("mz-calendar");export{e as MzCalendar};
|
|
2
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/calendar.ts"],
|
|
4
|
+
"sourcesContent": ["import { MzCalendar } from './calendar.component.js';\n\nexport * from './calendar.component.js';\nexport * from './calendar.types.js';\n\nMzCalendar.define('mz-calendar');\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'mz-calendar': MzCalendar;\n }\n}\n"],
|
|
5
|
+
"mappings": "8NAKAA,EAAW,OAAO,aAAa",
|
|
6
|
+
"names": ["MzCalendar"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/** Calendar event object */
|
|
2
|
+
export interface CalendarEvent {
|
|
3
|
+
/** Unique event identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Event title displayed on the calendar */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Start date/time (ISO string or Date) */
|
|
8
|
+
start: string | Date;
|
|
9
|
+
/** End date/time (ISO string or Date) */
|
|
10
|
+
end: string | Date;
|
|
11
|
+
/** Whether the event spans the entire day */
|
|
12
|
+
allDay?: boolean;
|
|
13
|
+
/** Resource ID for resource views */
|
|
14
|
+
resourceId?: string;
|
|
15
|
+
/** CSS background color override */
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/** CSS text color override */
|
|
18
|
+
textColor?: string;
|
|
19
|
+
/** CSS class name(s) to apply to the event element */
|
|
20
|
+
classNames?: string[];
|
|
21
|
+
/** Whether the event can be dragged */
|
|
22
|
+
editable?: boolean;
|
|
23
|
+
/** Extended properties (arbitrary user data) */
|
|
24
|
+
extendedProps?: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
/** Calendar resource (for resource views) */
|
|
27
|
+
export interface CalendarResource {
|
|
28
|
+
/** Unique resource identifier */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Display title */
|
|
31
|
+
title: string;
|
|
32
|
+
/** Optional children for grouped resources */
|
|
33
|
+
children?: CalendarResource[];
|
|
34
|
+
/** Extended properties (arbitrary user data) */
|
|
35
|
+
extendedProps?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
/** Calendar view type */
|
|
38
|
+
export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridDay' | 'resourceTimeGridDay' | 'resourceTimeGridWeek' | 'resourceTimeline' | 'listWeek';
|
|
39
|
+
/** Date range for dates-set event */
|
|
40
|
+
export interface DateRange {
|
|
41
|
+
start: Date;
|
|
42
|
+
end: Date;
|
|
43
|
+
}
|
|
44
|
+
/** Event click detail */
|
|
45
|
+
export interface EventClickDetail {
|
|
46
|
+
event: CalendarEvent;
|
|
47
|
+
el: HTMLElement;
|
|
48
|
+
jsEvent: MouseEvent;
|
|
49
|
+
}
|
|
50
|
+
/** Event drop detail (drag-to-move) */
|
|
51
|
+
export interface EventDropDetail {
|
|
52
|
+
event: CalendarEvent;
|
|
53
|
+
oldEvent: CalendarEvent;
|
|
54
|
+
delta: {
|
|
55
|
+
days: number;
|
|
56
|
+
milliseconds: number;
|
|
57
|
+
};
|
|
58
|
+
revert: () => void;
|
|
59
|
+
}
|
|
60
|
+
/** Event resize detail */
|
|
61
|
+
export interface EventResizeDetail {
|
|
62
|
+
event: CalendarEvent;
|
|
63
|
+
oldEvent: CalendarEvent;
|
|
64
|
+
endDelta: {
|
|
65
|
+
days: number;
|
|
66
|
+
milliseconds: number;
|
|
67
|
+
};
|
|
68
|
+
revert: () => void;
|
|
69
|
+
}
|
|
70
|
+
/** Date select detail (drag-to-create) */
|
|
71
|
+
export interface DateSelectDetail {
|
|
72
|
+
start: Date;
|
|
73
|
+
end: Date;
|
|
74
|
+
startStr: string;
|
|
75
|
+
endStr: string;
|
|
76
|
+
allDay: boolean;
|
|
77
|
+
resourceId?: string;
|
|
78
|
+
}
|
|
79
|
+
/** Dates-set detail (view range changed) */
|
|
80
|
+
export interface DatesSetDetail {
|
|
81
|
+
start: Date;
|
|
82
|
+
end: Date;
|
|
83
|
+
view: CalendarView;
|
|
84
|
+
}
|
|
85
|
+
/** Event content render info */
|
|
86
|
+
export interface EventContentArg {
|
|
87
|
+
event: CalendarEvent;
|
|
88
|
+
timeText: string;
|
|
89
|
+
view: CalendarView;
|
|
90
|
+
}
|
|
91
|
+
/** Calendar event map for typed addEventListener */
|
|
92
|
+
export interface MzCalendarEventMap {
|
|
93
|
+
'mz-calendar-event-click': CustomEvent<EventClickDetail>;
|
|
94
|
+
'mz-calendar-event-drop': CustomEvent<EventDropDetail>;
|
|
95
|
+
'mz-calendar-event-resize': CustomEvent<EventResizeDetail>;
|
|
96
|
+
'mz-calendar-select': CustomEvent<DateSelectDetail>;
|
|
97
|
+
'mz-calendar-dates-set': CustomEvent<DatesSetDetail>;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=calendar.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk.B6XGWUEF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function s(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function i(e,t){let n=new Date(e);return n.setDate(n.getDate()+t),n}function d(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function g(e){return d(e,new Date)}function l(e,t){let n=s(e),r=(n.getDay()-t+7)%7;return n.setDate(n.getDate()-r),n}function p(e,t){let n=l(e,t),o=[];for(let r=0;r<7;r++)o.push(i(n,r));return o}function y(e,t,n){let o=new Date(e,t,1),r=l(o,n),u=[],a=new Date(r);for(let m=0;m<6;m++){let c=[];for(let f=0;f<7;f++)c.push({date:new Date(a),isCurrentMonth:a.getMonth()===t,isToday:g(a)}),a=i(a,1);u.push(c)}return u[u.length-1].every(m=>!m.isCurrentMonth)&&u.pop(),u}function h(e){return[s(e),i(s(e),1),i(s(e),2)]}function b(e){return[s(e)]}function w(e,t){let n=t||void 0;return new Intl.DateTimeFormat(n,{hour:"numeric",minute:"2-digit"}).format(e)}function x(e,t){let n=t||void 0;return e.getMinutes()===0?new Intl.DateTimeFormat(n,{hour:"numeric"}).format(e):new Intl.DateTimeFormat(n,{hour:"numeric",minute:"2-digit"}).format(e)}function T(e,t){let n=t||void 0,o=new Intl.DateTimeFormat(n,{weekday:"short"}).format(e),r=e.getDate();return`${o} ${r}`}function M(e,t){let n=t||void 0;return new Intl.DateTimeFormat(n,{month:"long",year:"numeric"}).format(e)}function k(e,t){return e*60+t}function F(e,t){return Math.floor(e/t)+1}function C(e){let[t,n]=e.split(":").map(Number);return{hours:t,minutes:n||0}}function v(e,t){let n=t||void 0,o=new Intl.DateTimeFormat(n,{weekday:"short"}),r=new Date(2024,0,7),u=[];for(let a=0;a<7;a++){let D=i(r,(a+e)%7);u.push(o.format(D))}return u}export{s as a,i as b,d as c,g as d,l as e,p as f,y as g,h,b as i,w as j,x as k,T as l,M as m,k as n,F as o,C as p,v as q};
|
|
2
|
+
//# sourceMappingURL=chunk.BYWXPW2P.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/date-utils.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Pure date utility functions for the calendar component.\n * All functions are side-effect free and use Intl.DateTimeFormat for locale-aware formatting.\n */\n\nexport interface DayCell {\n date: Date;\n isCurrentMonth: boolean;\n isToday: boolean;\n}\n\n/** Returns a new Date set to midnight (00:00:00.000) of the given date */\nexport function startOfDay(date: Date): Date {\n const d = new Date(date);\n d.setHours(0, 0, 0, 0);\n return d;\n}\n\n/** Returns a new Date with `n` days added */\nexport function addDays(date: Date, n: number): Date {\n const d = new Date(date);\n d.setDate(d.getDate() + n);\n return d;\n}\n\n/** Checks if two dates represent the same calendar day */\nexport function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\n/** Checks if the given date is today */\nexport function isToday(date: Date): boolean {\n return isSameDay(date, new Date());\n}\n\n/**\n * Returns the start of the week containing `date`.\n * `firstDay` is 0=Sunday, 1=Monday, etc.\n */\nexport function startOfWeek(date: Date, firstDay: number): Date {\n const d = startOfDay(date);\n const day = d.getDay();\n const diff = (day - firstDay + 7) % 7;\n d.setDate(d.getDate() - diff);\n return d;\n}\n\n/**\n * Returns an array of 7 Date objects for the week containing `date`.\n * `firstDay` is 0=Sunday, 1=Monday, etc.\n */\nexport function getWeekDays(date: Date, firstDay: number): Date[] {\n const start = startOfWeek(date, firstDay);\n const days: Date[] = [];\n for (let i = 0; i < 7; i++) {\n days.push(addDays(start, i));\n }\n return days;\n}\n\n/**\n * Returns a 2D array (5-6 weeks x 7 days) of DayCell objects for a month grid.\n * `firstDay` is 0=Sunday, 1=Monday, etc.\n */\nexport function getMonthGrid(year: number, month: number, firstDay: number): DayCell[][] {\n const firstOfMonth = new Date(year, month, 1);\n const gridStart = startOfWeek(firstOfMonth, firstDay);\n\n const weeks: DayCell[][] = [];\n let cursor = new Date(gridStart);\n\n // Generate 6 weeks to cover all possible month layouts\n for (let w = 0; w < 6; w++) {\n const week: DayCell[] = [];\n for (let d = 0; d < 7; d++) {\n week.push({\n date: new Date(cursor),\n isCurrentMonth: cursor.getMonth() === month,\n isToday: isToday(cursor)\n });\n cursor = addDays(cursor, 1);\n }\n weeks.push(week);\n }\n\n // Remove trailing week if it's entirely in the next month\n const lastWeek = weeks[weeks.length - 1];\n if (lastWeek.every(cell => !cell.isCurrentMonth)) {\n weeks.pop();\n }\n\n return weeks;\n}\n\n/** Returns an array of 3 consecutive days starting from `date` */\nexport function get3DayRange(date: Date): Date[] {\n return [startOfDay(date), addDays(startOfDay(date), 1), addDays(startOfDay(date), 2)];\n}\n\n/** Returns an array of 1 day */\nexport function getDayRange(date: Date): Date[] {\n return [startOfDay(date)];\n}\n\n/**\n * Formats a time using Intl.DateTimeFormat.\n * Example: \"9:00 AM\"\n */\nexport function formatTime(date: Date, locale?: string): string {\n const resolvedLocale = locale || undefined;\n return new Intl.DateTimeFormat(resolvedLocale, {\n hour: 'numeric',\n minute: '2-digit'\n }).format(date);\n}\n\n/** Compact time format for narrow gutters \u2014 \"9 AM\", \"12 PM\" (no minutes when :00). */\nexport function formatTimeShort(date: Date, locale?: string): string {\n const resolvedLocale = locale || undefined;\n // On the hour, omit minutes for brevity\n if (date.getMinutes() === 0) {\n return new Intl.DateTimeFormat(resolvedLocale, {\n hour: 'numeric'\n }).format(date);\n }\n return new Intl.DateTimeFormat(resolvedLocale, {\n hour: 'numeric',\n minute: '2-digit'\n }).format(date);\n}\n\n/**\n * Formats a day header using Intl.DateTimeFormat.\n * Example: \"Mon 15\"\n */\nexport function formatDayHeader(date: Date, locale?: string): string {\n const resolvedLocale = locale || undefined;\n const dayName = new Intl.DateTimeFormat(resolvedLocale, { weekday: 'short' }).format(date);\n const dayNum = date.getDate();\n return `${dayName} ${dayNum}`;\n}\n\n/**\n * Formats month and year using Intl.DateTimeFormat.\n * Example: \"January 2025\"\n */\nexport function formatMonthYear(date: Date, locale?: string): string {\n const resolvedLocale = locale || undefined;\n return new Intl.DateTimeFormat(resolvedLocale, {\n month: 'long',\n year: 'numeric'\n }).format(date);\n}\n\n/** Converts hours and minutes to total minutes since midnight */\nexport function timeToMinutes(hours: number, minutes: number): number {\n return hours * 60 + minutes;\n}\n\n/**\n * Converts minutes since midnight to a 1-based CSS grid row index.\n * `slotDuration` is the number of minutes per slot.\n */\nexport function minutesToGridRow(minutes: number, slotDuration: number): number {\n return Math.floor(minutes / slotDuration) + 1;\n}\n\n/**\n * Parses a time string in \"HH:MM\" format.\n * Returns { hours, minutes }.\n */\nexport function parseTimeString(timeStr: string): { hours: number; minutes: number } {\n const [h, m] = timeStr.split(':').map(Number);\n return { hours: h, minutes: m || 0 };\n}\n\n/**\n * Returns weekday names for column headers in the given locale.\n * `firstDay` is 0=Sunday, 1=Monday, etc.\n */\nexport function getWeekdayNames(firstDay: number, locale?: string): string[] {\n const resolvedLocale = locale || undefined;\n const formatter = new Intl.DateTimeFormat(resolvedLocale, { weekday: 'short' });\n // Use a known Sunday (Jan 7, 2024 is a Sunday)\n const baseSunday = new Date(2024, 0, 7);\n const names: string[] = [];\n for (let i = 0; i < 7; i++) {\n const day = addDays(baseSunday, (i + firstDay) % 7);\n names.push(formatter.format(day));\n }\n return names;\n}\n"],
|
|
5
|
+
"mappings": "AAYO,SAASA,EAAWC,EAAkB,CAC3C,IAAMC,EAAI,IAAI,KAAKD,CAAI,EACvB,OAAAC,EAAE,SAAS,EAAG,EAAG,EAAG,CAAC,EACdA,CACT,CAGO,SAASC,EAAQF,EAAYG,EAAiB,CACnD,IAAMF,EAAI,IAAI,KAAKD,CAAI,EACvB,OAAAC,EAAE,QAAQA,EAAE,QAAQ,EAAIE,CAAC,EAClBF,CACT,CAGO,SAASG,EAAUC,EAASC,EAAkB,CACnD,OACED,EAAE,YAAY,IAAMC,EAAE,YAAY,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AM,EAC5C,MAAO,CAAE,MAAOC,EAAG,QAASC,GAAK,CAAE,CACrC,CAMO,SAASC,EAAgBnC,EAAkBmB,EAA2B,CAC3E,IAAMC,EAAiBD,GAAU,OAC3BiB,EAAY,IAAI,KAAK,eAAehB,EAAgB,CAAE,QAAS,OAAQ,CAAC,EAExEiB,EAAa,IAAI,KAAK,KAAM,EAAG,CAAC,EAChCC,EAAkB,CAAC,EACzB,QAASjC,EAAI,EAAGA,EAAI,EAAGA,IAAK,CAC1B,IAAMkC,EAAM9C,EAAQ4C,GAAahC,EAAIL,GAAY,CAAC,EAClDsC,EAAM,KAAKF,EAAU,OAAOG,CAAG,CAAC,CAClC,CACA,OAAOD,CACT",
|
|
6
|
+
"names": ["startOfDay", "date", "d", "addDays", "n", "isSameDay", "a", "b", "isToday", "startOfWeek", "firstDay", "diff", "getWeekDays", "start", "days", "i", "getMonthGrid", "year", "month", "firstOfMonth", "gridStart", "weeks", "cursor", "w", "week", "cell", "get3DayRange", "getDayRange", "formatTime", "locale", "resolvedLocale", "formatTimeShort", "formatDayHeader", "dayName", "dayNum", "formatMonthYear", "timeToMinutes", "hours", "minutes", "minutesToGridRow", "slotDuration", "parseTimeString", "timeStr", "h", "m", "getWeekdayNames", "formatter", "baseSunday", "names", "day"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as C,b as x,c as D,n as S,o as R,p as k}from"./chunk.BYWXPW2P.js";function s(d){return d instanceof Date?d:new Date(d)}function P(d){return S(d.getHours(),d.getMinutes())}function G(d,u,m,v,b){let l=(()=>{let{hours:r,minutes:i}=k(v);return S(r,i)})(),E=(()=>{let{hours:r,minutes:i}=k(b);return S(r,i)})(),h=[],n=d.filter(r=>!r.allDay);for(let r=0;r<u.length;r++){let i=u[r],T=n.filter(o=>{let e=s(o.start),c=s(o.end);return D(e,i)||D(c,i)||e<C(x(i,1))&&c>C(i)});T.sort((o,e)=>{let c=s(o.start),f=s(e.start),t=c.getTime()-f.getTime();if(t!==0)return t;let M=s(o.end).getTime()-c.getTime();return s(e.end).getTime()-f.getTime()-M});let p=T.map(o=>{let e=s(o.start),c=s(o.end),f=D(e,i)?P(e):0,t=D(c,i)?P(c):1440;return f=Math.max(f,l),t=Math.min(t,E),t-f<m&&(t=f+m),{event:o,startMin:f,endMin:t}}),a=[];for(let o of p){let e=!1;for(let c of a)if(c.some(t=>o.startMin<t.endMin&&o.endMin>t.startMin)){c.push(o),e=!0;break}e||a.push([o])}let w=!0;for(;w;){w=!1;for(let o=0;o<a.length;o++){for(let e=o+1;e<a.length;e++)if(a[o].some(f=>a[e].some(t=>f.startMin<t.endMin&&f.endMin>t.startMin))){a[o].push(...a[e]),a.splice(e,1),w=!0;break}if(w)break}}for(let o of a){o.sort((t,M)=>t.startMin-M.startMin||M.endMin-M.startMin-(t.endMin-t.startMin));let e=[],c=new Map;for(let t of o){let M=!1;for(let g=0;g<e.length;g++){let y=e[g][e[g].length-1];if(t.startMin>=y.endMin){e[g].push(t),c.set(t,g),M=!0;break}}if(!M){let g=e.length;e.push([t]),c.set(t,g)}}let f=e.length;for(let t of o){let M=c.get(t),g=1;for(let y=M+1;y<f&&!e[y].some(A=>t.startMin<A.endMin&&t.endMin>A.startMin);y++)g++;h.push({event:t.event,column:M,totalColumns:f,colSpan:g,startRow:R(t.startMin-l,m),endRow:R(t.endMin-l,m),dayIndex:r})}}}return h}function H(d,u){let m=d.filter(l=>l.allDay);m.sort((l,E)=>{let h=s(l.end).getTime()-s(l.start).getTime(),n=s(E.end).getTime()-s(E.start).getTime();return n!==h?n-h:s(l.start).getTime()-s(E.start).getTime()});let v=[],b=[];for(let l of m){let E=C(s(l.start)),h=C(s(l.end)),n=-1,r=-1;for(let p=0;p<u.length;p++){let a=C(u[p]);n===-1&&a>=E&&(n=p),a<=h&&(r=p+1)}if(n===-1||r===-1)continue;n=Math.max(0,n),r=Math.min(u.length,r);let i=0,T=!1;for(;!T;){b[i]||(b[i]=new Array(u.length).fill(!1));let p=!0;for(let a=n;a<r;a++)if(b[i][a]){p=!1;break}if(p){for(let a=n;a<r;a++)b[i][a]=!0;v.push({event:l,row:i,startCol:n+1,endCol:r+1}),T=!0}else i++}}return v}function O(d,u,m){let v=C(u),b=C(x(u,1)),l=d.filter(n=>{let r=s(n.start),i=s(n.end);return r<b&&i>v});l.sort((n,r)=>n.allDay&&!r.allDay?-1:!n.allDay&&r.allDay?1:s(n.start).getTime()-s(r.start).getTime());let E=l.slice(0,m).map(n=>({event:n,isStart:D(s(n.start),u),isEnd:D(s(n.end),u)||D(x(s(n.end),-1),u)})),h=Math.max(0,l.length-m);return{visible:E,overflow:h}}function q(d,u){let m=s(d.start);for(let v=0;v<u.length;v++)if(D(m,u[v]))return v;return-1}export{G as a,H as b,O as c,q as d};
|
|
2
|
+
//# sourceMappingURL=chunk.EOXXNYIW.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/internal/event-layout.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Event layout algorithms for the calendar component.\n * All functions are pure \u2014 no side effects, no DOM access.\n */\n\nimport type { CalendarEvent } from '../calendar.types.js';\nimport { isSameDay, startOfDay, addDays, parseTimeString, timeToMinutes, minutesToGridRow } from './date-utils.js';\n\nexport interface PositionedEvent {\n event: CalendarEvent;\n /** 0-based column index for overlap positioning */\n column: number;\n /** Total overlapping columns in this group */\n totalColumns: number;\n /** How many columns this event spans (defaults to 1, can expand when no neighbors) */\n colSpan: number;\n /** CSS grid row start (1-based) */\n startRow: number;\n /** CSS grid row end (1-based) */\n endRow: number;\n /** Day index in the days array (0-based) */\n dayIndex: number;\n}\n\nexport interface AllDayPositionedEvent {\n event: CalendarEvent;\n /** Stacking row (0-based) */\n row: number;\n /** Day column start (1-based, relative to the days array) */\n startCol: number;\n /** Day column end (1-based, exclusive) */\n endCol: number;\n}\n\nexport interface MonthCellEvent {\n event: CalendarEvent;\n /** Whether this day is the event's start day */\n isStart: boolean;\n /** Whether this day is the event's end day */\n isEnd: boolean;\n}\n\n/** Converts a CalendarEvent start/end to Date objects */\nfunction toDate(value: string | Date): Date {\n return value instanceof Date ? value : new Date(value);\n}\n\n/** Gets minutes since midnight for a Date */\nfunction dateToMinutes(date: Date): number {\n return timeToMinutes(date.getHours(), date.getMinutes());\n}\n\n/**\n * Lays out timed events on a time grid.\n *\n * For each day column, collects non-allDay events, sorts by start time,\n * groups overlapping events, and assigns columns greedily.\n *\n * Returns PositionedEvent[] with CSS grid coordinates.\n */\nexport function layoutTimeGridEvents(\n events: CalendarEvent[],\n days: Date[],\n slotDuration: number,\n slotMinTime: string,\n slotMaxTime: string\n): PositionedEvent[] {\n const minMinutes = (() => {\n const { hours, minutes } = parseTimeString(slotMinTime);\n return timeToMinutes(hours, minutes);\n })();\n const maxMinutes = (() => {\n const { hours, minutes } = parseTimeString(slotMaxTime);\n return timeToMinutes(hours, minutes);\n })();\n\n const result: PositionedEvent[] = [];\n\n // Filter to non-allDay timed events\n const timedEvents = events.filter(e => !e.allDay);\n\n for (let dayIndex = 0; dayIndex < days.length; dayIndex++) {\n const day = days[dayIndex];\n\n // Events on this day\n const dayEvents = timedEvents.filter(e => {\n const start = toDate(e.start);\n const end = toDate(e.end);\n return isSameDay(start, day) || isSameDay(end, day) ||\n (start < startOfDay(addDays(day, 1)) && end > startOfDay(day));\n });\n\n // Sort by start time, then by duration (longer first)\n dayEvents.sort((a, b) => {\n const aStart = toDate(a.start);\n const bStart = toDate(b.start);\n const diff = aStart.getTime() - bStart.getTime();\n if (diff !== 0) return diff;\n // Longer events first\n const aDur = toDate(a.end).getTime() - aStart.getTime();\n const bDur = toDate(b.end).getTime() - bStart.getTime();\n return bDur - aDur;\n });\n\n // Build positioned events with time ranges\n interface EventRange {\n event: CalendarEvent;\n startMin: number;\n endMin: number;\n }\n\n const ranges: EventRange[] = dayEvents.map(e => {\n const start = toDate(e.start);\n const end = toDate(e.end);\n\n let startMin = isSameDay(start, day) ? dateToMinutes(start) : 0;\n let endMin = isSameDay(end, day) ? dateToMinutes(end) : 1440;\n\n // Clamp to visible range\n startMin = Math.max(startMin, minMinutes);\n endMin = Math.min(endMin, maxMinutes);\n\n // Ensure minimum height of 1 slot\n if (endMin - startMin < slotDuration) {\n endMin = startMin + slotDuration;\n }\n\n return { event: e, startMin, endMin };\n });\n\n // Group overlapping events\n const groups: EventRange[][] = [];\n for (const range of ranges) {\n let placed = false;\n for (const group of groups) {\n // Check if this event overlaps with any event in the group\n const overlaps = group.some(\n g => range.startMin < g.endMin && range.endMin > g.startMin\n );\n if (overlaps) {\n group.push(range);\n placed = true;\n break;\n }\n }\n if (!placed) {\n groups.push([range]);\n }\n }\n\n // Merge groups that transitively overlap\n let merged = true;\n while (merged) {\n merged = false;\n for (let i = 0; i < groups.length; i++) {\n for (let j = i + 1; j < groups.length; j++) {\n const overlaps = groups[i].some(a =>\n groups[j].some(b => a.startMin < b.endMin && a.endMin > b.startMin)\n );\n if (overlaps) {\n groups[i].push(...groups[j]);\n groups.splice(j, 1);\n merged = true;\n break;\n }\n }\n if (merged) break;\n }\n }\n\n // Assign columns within each group\n for (const group of groups) {\n // Sort within group by start time\n group.sort((a, b) => a.startMin - b.startMin || (b.endMin - b.startMin) - (a.endMin - a.startMin));\n\n const columns: EventRange[][] = [];\n // Track which column each range was placed in\n const rangeToCol = new Map<EventRange, number>();\n\n for (const range of group) {\n let placed = false;\n for (let col = 0; col < columns.length; col++) {\n const lastInCol = columns[col][columns[col].length - 1];\n if (range.startMin >= lastInCol.endMin) {\n columns[col].push(range);\n rangeToCol.set(range, col);\n placed = true;\n break;\n }\n }\n if (!placed) {\n const col = columns.length;\n columns.push([range]);\n rangeToCol.set(range, col);\n }\n }\n\n const totalCols = columns.length;\n\n // For each event, compute how far right it can expand (colSpan).\n // An event in column C can expand into columns C+1, C+2, ... as long as\n // no event in those columns overlaps its time range.\n for (const range of group) {\n const col = rangeToCol.get(range)!;\n let span = 1;\n for (let nextCol = col + 1; nextCol < totalCols; nextCol++) {\n const hasConflict = columns[nextCol].some(\n other => range.startMin < other.endMin && range.endMin > other.startMin\n );\n if (hasConflict) break;\n span++;\n }\n\n result.push({\n event: range.event,\n column: col,\n totalColumns: totalCols,\n colSpan: span,\n startRow: minutesToGridRow(range.startMin - minMinutes, slotDuration),\n endRow: minutesToGridRow(range.endMin - minMinutes, slotDuration),\n dayIndex\n });\n }\n }\n }\n\n return result;\n}\n\n/**\n * Lays out all-day events across multiple day columns.\n *\n * Sorts by duration (longest first) and stacks into rows,\n * packing greedily.\n */\nexport function layoutAllDayEvents(events: CalendarEvent[], days: Date[]): AllDayPositionedEvent[] {\n const allDayEvents = events.filter(e => e.allDay);\n\n // Sort by duration (longest first), then by start date\n allDayEvents.sort((a, b) => {\n const aDur = toDate(a.end).getTime() - toDate(a.start).getTime();\n const bDur = toDate(b.end).getTime() - toDate(b.start).getTime();\n if (bDur !== aDur) return bDur - aDur;\n return toDate(a.start).getTime() - toDate(b.start).getTime();\n });\n\n const result: AllDayPositionedEvent[] = [];\n // Track which columns are occupied in each row\n const rows: boolean[][] = [];\n\n for (const event of allDayEvents) {\n const eventStart = startOfDay(toDate(event.start));\n const eventEnd = startOfDay(toDate(event.end));\n\n // Find start and end columns\n let startCol = -1;\n let endCol = -1;\n\n for (let i = 0; i < days.length; i++) {\n const dayStart = startOfDay(days[i]);\n if (startCol === -1 && dayStart >= eventStart) {\n startCol = i;\n }\n if (dayStart <= eventEnd) {\n endCol = i + 1;\n }\n }\n\n // Event doesn't overlap with visible days\n if (startCol === -1 || endCol === -1) continue;\n\n // Clamp to visible range\n startCol = Math.max(0, startCol);\n endCol = Math.min(days.length, endCol);\n\n // Find first available row\n let row = 0;\n let placed = false;\n while (!placed) {\n if (!rows[row]) {\n rows[row] = new Array(days.length).fill(false);\n }\n\n // Check if columns are free in this row\n let free = true;\n for (let c = startCol; c < endCol; c++) {\n if (rows[row][c]) {\n free = false;\n break;\n }\n }\n\n if (free) {\n // Mark columns as occupied\n for (let c = startCol; c < endCol; c++) {\n rows[row][c] = true;\n }\n\n result.push({\n event,\n row,\n startCol: startCol + 1, // 1-based for CSS grid\n endCol: endCol + 1 // 1-based, exclusive\n });\n placed = true;\n } else {\n row++;\n }\n }\n }\n\n return result;\n}\n\n/**\n * Lays out events within a month grid cell.\n *\n * Returns up to `maxPerCell` events that overlap with the given day,\n * plus an overflow count.\n */\nexport function layoutMonthEvents(\n events: CalendarEvent[],\n dayCell: Date,\n maxPerCell: number\n): { visible: MonthCellEvent[]; overflow: number } {\n const dayStart = startOfDay(dayCell);\n const dayEnd = startOfDay(addDays(dayCell, 1));\n\n // Filter events that overlap with this day\n const overlapping = events.filter(e => {\n const start = toDate(e.start);\n const end = toDate(e.end);\n return start < dayEnd && end > dayStart;\n });\n\n // Sort: all-day first, then by start time\n overlapping.sort((a, b) => {\n if (a.allDay && !b.allDay) return -1;\n if (!a.allDay && b.allDay) return 1;\n return toDate(a.start).getTime() - toDate(b.start).getTime();\n });\n\n const visible: MonthCellEvent[] = overlapping.slice(0, maxPerCell).map(event => ({\n event,\n isStart: isSameDay(toDate(event.start), dayCell),\n isEnd: isSameDay(toDate(event.end), dayCell) || isSameDay(addDays(toDate(event.end), -1), dayCell)\n }));\n\n const overflow = Math.max(0, overlapping.length - maxPerCell);\n\n return { visible, overflow };\n}\n\n/**\n * Returns the index of the event's start day in the days array, or -1 if not found.\n */\nexport function getEventDayIndex(event: CalendarEvent, days: Date[]): number {\n const eventStart = toDate(event.start);\n for (let i = 0; i < days.length; i++) {\n if (isSameDay(eventStart, days[i])) {\n return i;\n }\n }\n return -1;\n}\n"],
|
|
5
|
+
"mappings": "2EA2CA,SAASA,EAAOC,EAA4B,CAC1C,OAAOA,aAAiB,KAAOA,EAAQ,IAAI,KAAKA,CAAK,CACvD,CAGA,SAASC,EAAcC,EAAoB,CACzC,OAAOC,EAAcD,EAAK,SAAS,EAAGA,EAAK,WAAW,CAAC,CACzD,CAUO,SAASE,EACdC,EACAC,EAC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kD,EACd5D,EACA6D,EACAC,EACiD,CACjD,IAAMN,EAAWrC,EAAW0C,CAAO,EAC7BE,EAAS5C,EAAWC,EAAQyC,EAAS,CAAC,CAAC,EAGvCG,EAAchE,EAAO,OAAOY,GAAK,CACrC,IAAMI,EAAQtB,EAAOkB,EAAE,KAAK,EACtBK,EAAMvB,EAAOkB,EAAE,GAAG,EACxB,OAAOI,EAAQ+C,GAAU9C,EAAMuC,CACjC,CAAC,EAGDQ,EAAY,KAAK,CAAC3C,EAAGC,IACfD,EAAE,QAAU,CAACC,EAAE,OAAe,GAC9B,CAACD,EAAE,QAAUC,EAAE,OAAe,EAC3B5B,EAAO2B,EAAE,KAAK,EAAE,QAAQ,EAAI3B,EAAO4B,EAAE,KAAK,EAAE,QAAQ,CAC5D,EAED,IAAM2C,EAA4BD,EAAY,MAAM,EAAGF,CAAU,EAAE,IAAIX,IAAU,CAC/E,MAAAA,EACA,QAASjC,EAAUxB,EAAOyD,EAAM,KAAK,EAAGU,CAAO,EAC/C,MAAO3C,EAAUxB,EAAOyD,EAAM,GAAG,EAAGU,CAAO,GAAK3C,EAAUE,EAAQ1B,EAAOyD,EAAM,GAAG,EAAG,EAAE,EAAGU,CAAO,CACnG,EAAE,EAEIK,EAAW,KAAK,IAAI,EAAGF,EAAY,OAASF,CAAU,EAE5D,MAAO,CAAE,QAAAG,EAAS,SAAAC,CAAS,CAC7B,CAKO,SAASC,EAAiBhB,EAAsBlD,EAAsB,CAC3E,IAAMmD,EAAa1D,EAAOyD,EAAM,KAAK,EACrC,QAASf,EAAI,EAAGA,EAAInC,EAAK,OAAQmC,IAC/B,GAAIlB,EAAUkC,EAAYnD,EAAKmC,CAAC,CAAC,EAC/B,OAAOA,EAGX,MAAO,EACT",
|
|
6
|
+
"names": ["toDate", "value", "dateToMinutes", "date", "timeToMinutes", "layoutTimeGridEvents", "events", "days", "slotDuration", "slotMinTime", "slotMaxTime", "minMinutes", "hours", "minutes", "parseTimeString", "maxMinutes", "result", "timedEvents", "e", "dayIndex", "day", "dayEvents", "start", "end", "isSameDay", "startOfDay", "addDays", "a", "b", "aStart", "bStart", "diff", "aDur", "ranges", "startMin", "endMin", "groups", "range", "placed", "group", "g", "merged", "i", "j", "columns", "rangeToCol", "col", "lastInCol", "totalCols", "span", "nextCol", "other", "minutesToGridRow", "layoutAllDayEvents", "allDayEvents", "bDur", "rows", "event", "eventStart", "eventEnd", "startCol", "endCol", "dayStart", "row", "free", "c", "layoutMonthEvents", "dayCell", "maxPerCell", "dayEnd", "overlapping", "visible", "overflow", "getEventDayIndex"]
|
|
7
|
+
}
|