@primeui/scheduler-core 0.0.1-alpha.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 +23 -0
- package/README.md +1 -0
- package/dist/calendar/index.d.mts +57 -0
- package/dist/calendar/index.mjs +1 -0
- package/dist/chunk-2B3YLWHA.mjs +196 -0
- package/dist/chunk-2THQAZ26.mjs +1669 -0
- package/dist/chunk-5KORIWDT.mjs +41 -0
- package/dist/chunk-5N4ZOBJV.mjs +866 -0
- package/dist/chunk-6OZAPQZ5.mjs +229 -0
- package/dist/chunk-6PK5WSKT.mjs +369 -0
- package/dist/chunk-6VYWVIGM.mjs +1170 -0
- package/dist/chunk-AAVM7UCG.mjs +100 -0
- package/dist/chunk-C7ADJGNV.mjs +157 -0
- package/dist/chunk-DYW6WUHE.mjs +277 -0
- package/dist/chunk-F5W5HD7S.mjs +285 -0
- package/dist/chunk-FIBAZFC4.mjs +871 -0
- package/dist/chunk-HPC5B3AR.mjs +558 -0
- package/dist/chunk-KQGRXTP5.mjs +650 -0
- package/dist/chunk-NMX4BW42.mjs +672 -0
- package/dist/chunk-NX46LPLF.mjs +440 -0
- package/dist/chunk-NZGJN7HG.mjs +314 -0
- package/dist/chunk-QDMZBJDV.mjs +251 -0
- package/dist/chunk-QR2SVYAD.mjs +1144 -0
- package/dist/chunk-SYJ5O4KH.mjs +136 -0
- package/dist/chunk-TNKJPFGI.mjs +569 -0
- package/dist/chunk-UMAMDBU4.mjs +1 -0
- package/dist/chunk-W2SJW3QQ.mjs +3925 -0
- package/dist/chunk-WFUJWDST.mjs +352 -0
- package/dist/chunk-XUBQ2IQS.mjs +1 -0
- package/dist/chunk-ZUKUKGNK.mjs +613 -0
- package/dist/controllers/index.d.mts +384 -0
- package/dist/controllers/index.mjs +13 -0
- package/dist/date-D_CjQPmM.d.mts +74 -0
- package/dist/display-format-CLVvRt4I.d.mts +57 -0
- package/dist/event/index.d.mts +267 -0
- package/dist/event/index.mjs +8 -0
- package/dist/event-surface-_R_LHD95.d.mts +21 -0
- package/dist/event.positioning-BdzAVPk7.d.mts +51 -0
- package/dist/event.utils-QSNdd-3W.d.mts +35 -0
- package/dist/index.d.mts +1128 -0
- package/dist/index.mjs +1022 -0
- package/dist/interaction/index.d.mts +442 -0
- package/dist/interaction/index.mjs +9 -0
- package/dist/month/index.d.mts +104 -0
- package/dist/month/index.mjs +6 -0
- package/dist/overlay-BYM9B6nC.d.mts +64 -0
- package/dist/resource/index.d.mts +172 -0
- package/dist/resource/index.mjs +1 -0
- package/dist/selection-CO_98HdS.d.mts +56 -0
- package/dist/time-grid/index.d.mts +92 -0
- package/dist/time-grid/index.mjs +13 -0
- package/dist/timeline/index.d.mts +165 -0
- package/dist/timeline/index.mjs +6 -0
- package/dist/touch-BhsMWsjf.d.mts +69 -0
- package/dist/utils/index.d.mts +494 -0
- package/dist/utils/index.mjs +17 -0
- package/dist/views/index.d.mts +51 -0
- package/dist/views/index.mjs +8 -0
- package/dist/views/timeline/index.d.mts +37 -0
- package/dist/views/timeline/index.mjs +4 -0
- package/dist/year/index.d.mts +70 -0
- package/dist/year/index.mjs +6 -0
- package/package.json +58 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { SchedulerEvent, DragDelta, EventDragState, EventResizeState, SchedulerViewType, EventConstraint, EventAllowCallback, BusinessHours, BlockedIntervalsOptions, AppointmentSlot, AppointmentSlotsOptions, DateRange, SchedulerResource } from '@primeui/scheduler-types/scheduler';
|
|
2
|
+
import { S as SchedulerGridCell } from '../date-D_CjQPmM.mjs';
|
|
3
|
+
import { P as ParsedEvent } from '../event.utils-QSNdd-3W.mjs';
|
|
4
|
+
import { SchedulerCalendarInteractionOptions } from '../calendar/index.mjs';
|
|
5
|
+
import { d as SchedulerPointerInput, e as SchedulerRectInput } from '../touch-BhsMWsjf.mjs';
|
|
6
|
+
export { r as getTimeFromYPosition, s as getYPositionFromTime } from '../touch-BhsMWsjf.mjs';
|
|
7
|
+
import '@primeui/scheduler-types/date';
|
|
8
|
+
import '../display-format-CLVvRt4I.mjs';
|
|
9
|
+
import '@internationalized/date';
|
|
10
|
+
|
|
11
|
+
declare const RESIZE_EDGE_SIZE = 12;
|
|
12
|
+
interface MonthDragContext {
|
|
13
|
+
grid: SchedulerGridCell[][];
|
|
14
|
+
eventOverlap: boolean;
|
|
15
|
+
parsedEvents: ParsedEvent[];
|
|
16
|
+
}
|
|
17
|
+
interface MonthDragMoveResult {
|
|
18
|
+
dragGhostPosition: {
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
};
|
|
22
|
+
dropTargetDate: Date | null;
|
|
23
|
+
delta: DragDelta;
|
|
24
|
+
previewEvent: SchedulerEvent | null;
|
|
25
|
+
shouldEmitDragStart: boolean;
|
|
26
|
+
shouldEmitDrag: boolean;
|
|
27
|
+
}
|
|
28
|
+
interface MonthDragEndResult {
|
|
29
|
+
success: boolean;
|
|
30
|
+
newEvent: SchedulerEvent | null;
|
|
31
|
+
delta: DragDelta;
|
|
32
|
+
wasBlocked: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface MonthResizeContext {
|
|
35
|
+
grid: SchedulerGridCell[][];
|
|
36
|
+
eventOverlap: boolean;
|
|
37
|
+
parsedEvents: ParsedEvent[];
|
|
38
|
+
}
|
|
39
|
+
interface MonthResizePreviewData {
|
|
40
|
+
weekIndex: number;
|
|
41
|
+
startCol: number;
|
|
42
|
+
endCol: number;
|
|
43
|
+
row: number;
|
|
44
|
+
event: SchedulerEvent;
|
|
45
|
+
}
|
|
46
|
+
interface MonthResizeMoveResult {
|
|
47
|
+
resizeTargetDate: Date;
|
|
48
|
+
startDelta: number;
|
|
49
|
+
endDelta: number;
|
|
50
|
+
previewEvent: SchedulerEvent;
|
|
51
|
+
previewData: MonthResizePreviewData[];
|
|
52
|
+
}
|
|
53
|
+
interface MonthResizeEndResult {
|
|
54
|
+
success: boolean;
|
|
55
|
+
newEvent: SchedulerEvent | null;
|
|
56
|
+
wasBlocked: boolean;
|
|
57
|
+
}
|
|
58
|
+
declare function detectResizeEdgeForAllDay(relativeX: number, elementWidth: number, threshold?: number): 'start' | 'end' | null;
|
|
59
|
+
declare function calculateDragClickOffset(eventStart: Date, clickedDate: Date, calendarOptions?: SchedulerCalendarInteractionOptions): number;
|
|
60
|
+
declare function processMonthDragMove(state: EventDragState, targetDate: Date | null, dragClickDayOffset: number, mouseX: number, mouseY: number, calendarOptions?: SchedulerCalendarInteractionOptions): MonthDragMoveResult;
|
|
61
|
+
declare function finalizeMonthDrag(state: EventDragState, context: MonthDragContext, calendarOptions?: SchedulerCalendarInteractionOptions): MonthDragEndResult;
|
|
62
|
+
declare function calculateResizeDeltas(originalEvent: SchedulerEvent, targetDate: Date, resizeEdge: 'start' | 'end', calendarOptions?: SchedulerCalendarInteractionOptions): {
|
|
63
|
+
startDelta: number;
|
|
64
|
+
endDelta: number;
|
|
65
|
+
};
|
|
66
|
+
declare function calculateResizePreviewPosition(previewEvent: SchedulerEvent, grid: SchedulerGridCell[][], originalRow: number): MonthResizePreviewData[];
|
|
67
|
+
declare function processMonthResizeMove(state: EventResizeState & {
|
|
68
|
+
resizeEdge: 'start' | 'end';
|
|
69
|
+
originalRow?: number;
|
|
70
|
+
}, targetDate: Date, grid: SchedulerGridCell[][], calendarOptions?: SchedulerCalendarInteractionOptions): MonthResizeMoveResult;
|
|
71
|
+
declare function finalizeMonthResize(state: EventResizeState, context: MonthResizeContext): MonthResizeEndResult;
|
|
72
|
+
declare function findEventPositionInGrid(event: SchedulerEvent | ParsedEvent, grid: SchedulerGridCell[][], getWeekEventPositions: (week: SchedulerGridCell[]) => {
|
|
73
|
+
event: SchedulerEvent | ParsedEvent;
|
|
74
|
+
startCol: number;
|
|
75
|
+
endCol: number;
|
|
76
|
+
row: number;
|
|
77
|
+
}[]): {
|
|
78
|
+
weekIndex: number;
|
|
79
|
+
startCol: number;
|
|
80
|
+
endCol: number;
|
|
81
|
+
row: number;
|
|
82
|
+
} | null;
|
|
83
|
+
interface DragGhostStyle {
|
|
84
|
+
[key: string]: string;
|
|
85
|
+
position: string;
|
|
86
|
+
left: string;
|
|
87
|
+
top: string;
|
|
88
|
+
width: string;
|
|
89
|
+
height: string;
|
|
90
|
+
background: string;
|
|
91
|
+
color: string;
|
|
92
|
+
padding: string;
|
|
93
|
+
borderRadius: string;
|
|
94
|
+
fontSize: string;
|
|
95
|
+
fontWeight: string;
|
|
96
|
+
lineHeight: string;
|
|
97
|
+
pointerEvents: string;
|
|
98
|
+
zIndex: string;
|
|
99
|
+
opacity: string;
|
|
100
|
+
boxShadow: string;
|
|
101
|
+
whiteSpace: string;
|
|
102
|
+
overflow: string;
|
|
103
|
+
textOverflow: string;
|
|
104
|
+
display: string;
|
|
105
|
+
alignItems: string;
|
|
106
|
+
boxSizing: string;
|
|
107
|
+
}
|
|
108
|
+
declare function getDragGhostStyle(position: {
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
}, dimensions: {
|
|
112
|
+
width: number;
|
|
113
|
+
height: number;
|
|
114
|
+
} | null, event: SchedulerEvent): DragGhostStyle;
|
|
115
|
+
|
|
116
|
+
interface TimedPointerStartInput {
|
|
117
|
+
event: SchedulerEvent;
|
|
118
|
+
pointer: SchedulerPointerInput;
|
|
119
|
+
rect: SchedulerRectInput | null | undefined;
|
|
120
|
+
canDrag: boolean;
|
|
121
|
+
canResize: boolean;
|
|
122
|
+
}
|
|
123
|
+
type TimedPointerStartResult = {
|
|
124
|
+
mode: 'none';
|
|
125
|
+
} | {
|
|
126
|
+
mode: 'drag';
|
|
127
|
+
dragState: EventDragState;
|
|
128
|
+
} | {
|
|
129
|
+
mode: 'resize';
|
|
130
|
+
resizeState: EventResizeState;
|
|
131
|
+
};
|
|
132
|
+
declare function resolveTimedPointerStart(input: TimedPointerStartInput): TimedPointerStartResult;
|
|
133
|
+
interface TimedPointerDispatchHandlers {
|
|
134
|
+
onDrag: (pointer: SchedulerPointerInput) => void;
|
|
135
|
+
onResize: (pointer: SchedulerPointerInput) => void;
|
|
136
|
+
}
|
|
137
|
+
declare function dispatchTimedPointerMove(hasDragState: boolean, hasResizeState: boolean, handlers: TimedPointerDispatchHandlers, pointer: SchedulerPointerInput): void;
|
|
138
|
+
declare function dispatchTimedPointerEnd(hasDragState: boolean, hasResizeState: boolean, handlers: TimedPointerDispatchHandlers, pointer: SchedulerPointerInput): void;
|
|
139
|
+
interface TimedViewContext {
|
|
140
|
+
slotMinTime: string;
|
|
141
|
+
slotMaxTime: string;
|
|
142
|
+
slotDuration: number;
|
|
143
|
+
slotHeight: number;
|
|
144
|
+
eventOverlap: boolean;
|
|
145
|
+
parsedEvents: ParsedEvent[];
|
|
146
|
+
}
|
|
147
|
+
interface TimedDragMoveResult {
|
|
148
|
+
delta: DragDelta;
|
|
149
|
+
previewEvent: SchedulerEvent;
|
|
150
|
+
previewColIndex: number;
|
|
151
|
+
previewTop: number;
|
|
152
|
+
previewHeight: number;
|
|
153
|
+
}
|
|
154
|
+
interface TimedDragEndResult {
|
|
155
|
+
success: boolean;
|
|
156
|
+
newEvent: SchedulerEvent | null;
|
|
157
|
+
delta: DragDelta;
|
|
158
|
+
wasBlocked: boolean;
|
|
159
|
+
}
|
|
160
|
+
interface TimedResizeMoveResult {
|
|
161
|
+
previewEvent: SchedulerEvent;
|
|
162
|
+
previewColIndex: number;
|
|
163
|
+
previewTop: number;
|
|
164
|
+
previewHeight: number;
|
|
165
|
+
}
|
|
166
|
+
interface TimedResizeEndResult {
|
|
167
|
+
success: boolean;
|
|
168
|
+
newEvent: SchedulerEvent | null;
|
|
169
|
+
startDelta: number;
|
|
170
|
+
endDelta: number;
|
|
171
|
+
wasBlocked: boolean;
|
|
172
|
+
}
|
|
173
|
+
interface TimedDragCalculation {
|
|
174
|
+
daysDelta: number;
|
|
175
|
+
millisecondsDelta: number;
|
|
176
|
+
delta: DragDelta;
|
|
177
|
+
}
|
|
178
|
+
declare function calculateTimedDragDelta(state: EventDragState, columnWidth: number, slotHeight: number, slotDuration: number, snapDuration: number): TimedDragCalculation;
|
|
179
|
+
interface ColumnInfo {
|
|
180
|
+
date: Date;
|
|
181
|
+
index: number;
|
|
182
|
+
}
|
|
183
|
+
declare function findColumnIndexForDate(date: Date, columns: {
|
|
184
|
+
date: Date;
|
|
185
|
+
}[]): number;
|
|
186
|
+
declare function calculateTimedDragPreview(previewEvent: SchedulerEvent, columns: {
|
|
187
|
+
date: Date;
|
|
188
|
+
}[], slotMinTime: string, slotDuration: number, slotHeight: number): {
|
|
189
|
+
colIndex: number;
|
|
190
|
+
top: number;
|
|
191
|
+
height: number;
|
|
192
|
+
} | null;
|
|
193
|
+
declare function processTimedDragMove(state: EventDragState, columnWidth: number, columns: {
|
|
194
|
+
date: Date;
|
|
195
|
+
}[], context: Pick<TimedViewContext, 'slotHeight' | 'slotDuration' | 'slotMinTime'>, snapDuration: number, calendarOptions?: SchedulerCalendarInteractionOptions): TimedDragMoveResult | null;
|
|
196
|
+
declare function finalizeTimedDrag(state: EventDragState, context: Pick<TimedViewContext, 'eventOverlap' | 'parsedEvents'>, calendarOptions?: SchedulerCalendarInteractionOptions): TimedDragEndResult;
|
|
197
|
+
declare function calculateTimedResizePreview(previewEvent: SchedulerEvent, columns: {
|
|
198
|
+
date: Date;
|
|
199
|
+
}[], slotMinTime: string, slotDuration: number, slotHeight: number): {
|
|
200
|
+
colIndex: number;
|
|
201
|
+
top: number;
|
|
202
|
+
height: number;
|
|
203
|
+
} | null;
|
|
204
|
+
declare function processTimedResizeMove(state: EventResizeState, columns: {
|
|
205
|
+
date: Date;
|
|
206
|
+
}[], context: Pick<TimedViewContext, 'slotHeight' | 'slotDuration' | 'slotMinTime'>): TimedResizeMoveResult | null;
|
|
207
|
+
declare function finalizeTimedResize(state: EventResizeState, context: Pick<TimedViewContext, 'eventOverlap' | 'parsedEvents'>): TimedResizeEndResult;
|
|
208
|
+
interface PreviewStyle {
|
|
209
|
+
[key: string]: string | undefined;
|
|
210
|
+
position: string;
|
|
211
|
+
top: string;
|
|
212
|
+
height: string;
|
|
213
|
+
left: string;
|
|
214
|
+
right: string;
|
|
215
|
+
zIndex: string;
|
|
216
|
+
pointerEvents: string;
|
|
217
|
+
opacity: string;
|
|
218
|
+
background?: string;
|
|
219
|
+
borderColor?: string;
|
|
220
|
+
color?: string;
|
|
221
|
+
}
|
|
222
|
+
declare function getTimedPreviewStyle(top: number, height: number, event: SchedulerEvent): PreviewStyle;
|
|
223
|
+
interface TimedPreviewDropValidationInput {
|
|
224
|
+
previewEvent: SchedulerEvent | null | undefined;
|
|
225
|
+
originalEvent: SchedulerEvent | null | undefined;
|
|
226
|
+
view: SchedulerViewType;
|
|
227
|
+
eventConstraint?: EventConstraint;
|
|
228
|
+
eventAllow?: EventAllowCallback;
|
|
229
|
+
businessHours: BusinessHours;
|
|
230
|
+
blockedIntervals?: BlockedIntervalsOptions;
|
|
231
|
+
resourceId?: string | number;
|
|
232
|
+
}
|
|
233
|
+
declare function hasTimedDropConstraints(eventConstraint: EventConstraint | undefined, eventAllow: EventAllowCallback | undefined, blockedIntervals?: BlockedIntervalsOptions): boolean;
|
|
234
|
+
declare function canDropTimedPreviewEvent(input: TimedPreviewDropValidationInput): boolean;
|
|
235
|
+
|
|
236
|
+
declare function resolveTimelineSnapDuration(slotDuration: number, explicitSnapDuration?: number): number;
|
|
237
|
+
declare const TIMELINE_RESIZE_EDGE_SIZE = 12;
|
|
238
|
+
interface TimelineDragContext extends SchedulerCalendarInteractionOptions {
|
|
239
|
+
viewStart: Date;
|
|
240
|
+
viewEnd: Date;
|
|
241
|
+
totalWidth: number;
|
|
242
|
+
slotDuration: number;
|
|
243
|
+
snapDuration?: number;
|
|
244
|
+
eventOverlap: boolean;
|
|
245
|
+
parsedEvents: ParsedEvent[];
|
|
246
|
+
minTimeMinutes?: number;
|
|
247
|
+
maxTimeMinutes?: number;
|
|
248
|
+
overlapPolicy?: 'allow' | 'prevent';
|
|
249
|
+
allEvents?: SchedulerEvent[];
|
|
250
|
+
targetResourceId?: string | number;
|
|
251
|
+
targetResourceIds?: (string | number)[];
|
|
252
|
+
}
|
|
253
|
+
interface TimelineDragMoveResult {
|
|
254
|
+
dragGhostPosition: {
|
|
255
|
+
x: number;
|
|
256
|
+
y: number;
|
|
257
|
+
};
|
|
258
|
+
delta: DragDelta;
|
|
259
|
+
previewEvent: SchedulerEvent | null;
|
|
260
|
+
shouldEmitDragStart: boolean;
|
|
261
|
+
shouldEmitDrag: boolean;
|
|
262
|
+
}
|
|
263
|
+
interface TimelineDragEndResult {
|
|
264
|
+
success: boolean;
|
|
265
|
+
newEvent: SchedulerEvent | null;
|
|
266
|
+
delta: DragDelta;
|
|
267
|
+
wasBlocked: boolean;
|
|
268
|
+
}
|
|
269
|
+
interface TimelineResizeContext extends SchedulerCalendarInteractionOptions {
|
|
270
|
+
viewStart: Date;
|
|
271
|
+
viewEnd: Date;
|
|
272
|
+
totalWidth: number;
|
|
273
|
+
slotDuration: number;
|
|
274
|
+
snapDuration?: number;
|
|
275
|
+
eventOverlap: boolean;
|
|
276
|
+
parsedEvents: ParsedEvent[];
|
|
277
|
+
minTimeMinutes?: number;
|
|
278
|
+
maxTimeMinutes?: number;
|
|
279
|
+
overlapPolicy?: 'allow' | 'prevent';
|
|
280
|
+
allEvents?: SchedulerEvent[];
|
|
281
|
+
targetResourceId?: string | number;
|
|
282
|
+
targetResourceIds?: (string | number)[];
|
|
283
|
+
}
|
|
284
|
+
interface TimelineResizePreviewStyle {
|
|
285
|
+
left: string;
|
|
286
|
+
width: string;
|
|
287
|
+
}
|
|
288
|
+
interface TimelineResizeMoveResult {
|
|
289
|
+
startDelta: number;
|
|
290
|
+
endDelta: number;
|
|
291
|
+
previewEvent: SchedulerEvent;
|
|
292
|
+
previewStyle: TimelineResizePreviewStyle;
|
|
293
|
+
}
|
|
294
|
+
interface TimelineResizeEndResult {
|
|
295
|
+
success: boolean;
|
|
296
|
+
newEvent: SchedulerEvent | null;
|
|
297
|
+
wasBlocked: boolean;
|
|
298
|
+
}
|
|
299
|
+
declare function detectResizeEdgeForTimeline(relativeX: number, elementWidth: number, threshold?: number): 'start' | 'end' | null;
|
|
300
|
+
declare function createTimelineDragState(event: SchedulerEvent, startX: number, startY: number, offsetX: number, offsetY: number): EventDragState;
|
|
301
|
+
declare function updateTimelineDragState(state: EventDragState, currentX: number, currentY: number, minDistance?: number): EventDragState;
|
|
302
|
+
declare function calculateTimelineDragDelta(state: EventDragState, context: Pick<TimelineDragContext, 'viewStart' | 'viewEnd' | 'totalWidth' | 'slotDuration' | 'snapDuration' | 'minTimeMinutes' | 'maxTimeMinutes'>): DragDelta;
|
|
303
|
+
declare function processTimelineDragMove(state: EventDragState, mouseX: number, mouseY: number, context: TimelineDragContext, minDistance?: number): TimelineDragMoveResult;
|
|
304
|
+
declare function finalizeTimelineDrag(state: EventDragState, delta: DragDelta, context: Pick<TimelineDragContext, 'eventOverlap' | 'parsedEvents' | 'overlapPolicy' | 'allEvents' | 'targetResourceId' | 'targetResourceIds' | 'calendar' | 'locale' | 'view'>): TimelineDragEndResult;
|
|
305
|
+
interface TimelineResizeState extends Omit<EventResizeState, 'edge'> {
|
|
306
|
+
edge: 'start' | 'end';
|
|
307
|
+
startX: number;
|
|
308
|
+
currentX: number;
|
|
309
|
+
visualStartPx?: number;
|
|
310
|
+
visualEndPx?: number;
|
|
311
|
+
}
|
|
312
|
+
declare function createTimelineResizeState(event: SchedulerEvent, edge: 'start' | 'end', startX: number, startY: number): TimelineResizeState;
|
|
313
|
+
declare function calculateTimelineResizeDeltas(state: TimelineResizeState, context: Pick<TimelineResizeContext, 'viewStart' | 'viewEnd' | 'totalWidth' | 'slotDuration' | 'snapDuration' | 'minTimeMinutes' | 'maxTimeMinutes'>): {
|
|
314
|
+
startDelta: number;
|
|
315
|
+
endDelta: number;
|
|
316
|
+
};
|
|
317
|
+
declare function calculateResizePreviewStyle(originalEvent: SchedulerEvent, startDelta: number, endDelta: number, context: Pick<TimelineResizeContext, 'viewStart' | 'viewEnd' | 'totalWidth' | 'minTimeMinutes' | 'maxTimeMinutes'>): TimelineResizePreviewStyle;
|
|
318
|
+
declare function processTimelineResizeMove(state: TimelineResizeState, mouseX: number, context: TimelineResizeContext): TimelineResizeMoveResult;
|
|
319
|
+
declare function finalizeTimelineResize(state: TimelineResizeState, startDelta: number, endDelta: number, context: Pick<TimelineResizeContext, 'eventOverlap' | 'parsedEvents' | 'overlapPolicy' | 'allEvents' | 'targetResourceId' | 'targetResourceIds'>): TimelineResizeEndResult;
|
|
320
|
+
interface TimelineDragGhostStyle {
|
|
321
|
+
[key: string]: string;
|
|
322
|
+
position: string;
|
|
323
|
+
left: string;
|
|
324
|
+
top: string;
|
|
325
|
+
width: string;
|
|
326
|
+
height: string;
|
|
327
|
+
background: string;
|
|
328
|
+
color: string;
|
|
329
|
+
padding: string;
|
|
330
|
+
borderRadius: string;
|
|
331
|
+
borderInlineStart: string;
|
|
332
|
+
pointerEvents: string;
|
|
333
|
+
zIndex: string;
|
|
334
|
+
opacity: string;
|
|
335
|
+
boxShadow: string;
|
|
336
|
+
overflow: string;
|
|
337
|
+
display: string;
|
|
338
|
+
flexDirection: string;
|
|
339
|
+
justifyContent: string;
|
|
340
|
+
alignItems: string;
|
|
341
|
+
gap: string;
|
|
342
|
+
boxSizing: string;
|
|
343
|
+
}
|
|
344
|
+
declare function getTimelineDragGhostStyle(position: {
|
|
345
|
+
x: number;
|
|
346
|
+
y: number;
|
|
347
|
+
}, dimensions: {
|
|
348
|
+
width: number;
|
|
349
|
+
height: number;
|
|
350
|
+
} | null, event: SchedulerEvent): TimelineDragGhostStyle;
|
|
351
|
+
|
|
352
|
+
interface SlotTrackingSnapshot {
|
|
353
|
+
slot: AppointmentSlot;
|
|
354
|
+
bookedCount: number;
|
|
355
|
+
}
|
|
356
|
+
interface AppointmentSlotTrackingState {
|
|
357
|
+
initialized: boolean;
|
|
358
|
+
snapshots: Map<string, SlotTrackingSnapshot>;
|
|
359
|
+
previousEvents: SchedulerEvent[];
|
|
360
|
+
}
|
|
361
|
+
interface AppointmentSlotTrackingContext {
|
|
362
|
+
options: AppointmentSlotsOptions;
|
|
363
|
+
view: SchedulerViewType;
|
|
364
|
+
viewRange: DateRange;
|
|
365
|
+
resources: SchedulerResource[];
|
|
366
|
+
slotMinTime: string;
|
|
367
|
+
slotMaxTime: string;
|
|
368
|
+
}
|
|
369
|
+
interface AppointmentSlotTrackingChange {
|
|
370
|
+
type: 'book' | 'cancel';
|
|
371
|
+
slot: AppointmentSlot;
|
|
372
|
+
event: SchedulerEvent;
|
|
373
|
+
}
|
|
374
|
+
interface AppointmentSlotTrackingSyncResult {
|
|
375
|
+
state: AppointmentSlotTrackingState;
|
|
376
|
+
changes: AppointmentSlotTrackingChange[];
|
|
377
|
+
}
|
|
378
|
+
declare function createAppointmentSlotTrackingState(): AppointmentSlotTrackingState;
|
|
379
|
+
declare function isAppointmentSlotTrackingView(view: SchedulerViewType): boolean;
|
|
380
|
+
declare function getSlotTrackingKey(slot: AppointmentSlot): string;
|
|
381
|
+
declare function cloneEventForSlotTracking(event: SchedulerEvent): SchedulerEvent;
|
|
382
|
+
declare function syncAppointmentSlotTracking(state: AppointmentSlotTrackingState, context: AppointmentSlotTrackingContext, currentEvents: SchedulerEvent[]): AppointmentSlotTrackingSyncResult;
|
|
383
|
+
|
|
384
|
+
export { type AppointmentSlotTrackingChange, type AppointmentSlotTrackingContext, type AppointmentSlotTrackingState, type AppointmentSlotTrackingSyncResult, type ColumnInfo, type DragGhostStyle, type MonthDragContext, type MonthDragEndResult, type MonthDragMoveResult, type MonthResizeContext, type MonthResizeEndResult, type MonthResizeMoveResult, type MonthResizePreviewData, type PreviewStyle, RESIZE_EDGE_SIZE, type SlotTrackingSnapshot, TIMELINE_RESIZE_EDGE_SIZE, type TimedDragCalculation, type TimedDragEndResult, type TimedDragMoveResult, type TimedPointerDispatchHandlers, type TimedPointerStartInput, type TimedPointerStartResult, type TimedPreviewDropValidationInput, type TimedResizeEndResult, type TimedResizeMoveResult, type TimedViewContext, type TimelineDragContext, type TimelineDragEndResult, type TimelineDragGhostStyle, type TimelineDragMoveResult, type TimelineResizeContext, type TimelineResizeEndResult, type TimelineResizeMoveResult, type TimelineResizePreviewStyle, type TimelineResizeState, calculateDragClickOffset, calculateResizeDeltas, calculateResizePreviewPosition, calculateResizePreviewStyle, calculateTimedDragDelta, calculateTimedDragPreview, calculateTimedResizePreview, calculateTimelineDragDelta, calculateTimelineResizeDeltas, canDropTimedPreviewEvent, cloneEventForSlotTracking, createAppointmentSlotTrackingState, createTimelineDragState, createTimelineResizeState, detectResizeEdgeForAllDay, detectResizeEdgeForTimeline, dispatchTimedPointerEnd, dispatchTimedPointerMove, finalizeMonthDrag, finalizeMonthResize, finalizeTimedDrag, finalizeTimedResize, finalizeTimelineDrag, finalizeTimelineResize, findColumnIndexForDate, findEventPositionInGrid, getDragGhostStyle, getSlotTrackingKey, getTimedPreviewStyle, getTimelineDragGhostStyle, hasTimedDropConstraints, isAppointmentSlotTrackingView, processMonthDragMove, processMonthResizeMove, processTimedDragMove, processTimedResizeMove, processTimelineDragMove, processTimelineResizeMove, resolveTimedPointerStart, resolveTimelineSnapDuration, syncAppointmentSlotTracking, updateTimelineDragState };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { RESIZE_EDGE_SIZE, TIMELINE_RESIZE_EDGE_SIZE, calculateDragClickOffset, calculateResizeDeltas, calculateResizePreviewPosition, calculateResizePreviewStyle, calculateTimedDragDelta, calculateTimedDragPreview, calculateTimedResizePreview, calculateTimelineDragDelta, calculateTimelineResizeDeltas, canDropTimedPreviewEvent, cloneEventForSlotTracking, createAppointmentSlotTrackingState, createTimelineDragState, createTimelineResizeState, detectResizeEdgeForAllDay, detectResizeEdgeForTimeline, dispatchTimedPointerEnd, dispatchTimedPointerMove, finalizeMonthDrag, finalizeMonthResize, finalizeTimedDrag, finalizeTimedResize, finalizeTimelineDrag, finalizeTimelineResize, findColumnIndexForDate, findEventPositionInGrid, getDragGhostStyle, getSlotTrackingKey, getTimedPreviewStyle, getTimelineDragGhostStyle, hasTimedDropConstraints, isAppointmentSlotTrackingView, processMonthDragMove, processMonthResizeMove, processTimedDragMove, processTimedResizeMove, processTimelineDragMove, processTimelineResizeMove, resolveTimedPointerStart, resolveTimelineSnapDuration, syncAppointmentSlotTracking, updateTimelineDragState } from '../chunk-5N4ZOBJV.mjs';
|
|
2
|
+
export { getTimeFromYPosition, getYPositionFromTime } from '../chunk-2THQAZ26.mjs';
|
|
3
|
+
import '../chunk-SYJ5O4KH.mjs';
|
|
4
|
+
import '../chunk-NX46LPLF.mjs';
|
|
5
|
+
import '../chunk-2B3YLWHA.mjs';
|
|
6
|
+
import '../chunk-NZGJN7HG.mjs';
|
|
7
|
+
import '../chunk-HPC5B3AR.mjs';
|
|
8
|
+
import '../chunk-5KORIWDT.mjs';
|
|
9
|
+
import '../chunk-FIBAZFC4.mjs';
|
|
10
|
+
import '../chunk-WFUJWDST.mjs';
|
|
11
|
+
import '../chunk-TNKJPFGI.mjs';
|
|
12
|
+
import '../chunk-DYW6WUHE.mjs';
|
|
13
|
+
import '../chunk-QR2SVYAD.mjs';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { WeekNumbering } from '@primeui/scheduler-types/date';
|
|
2
|
+
import { S as SchedulerCalendarDisplayConfigInput } from './display-format-CLVvRt4I.mjs';
|
|
3
|
+
|
|
4
|
+
declare function getMonthDays(year: number, month: number): Date[];
|
|
5
|
+
declare function getWeekDays(date: Date, firstDayOfWeek?: number): Date[];
|
|
6
|
+
declare function getDayHours(date: Date, minTime?: string, maxTime?: string): Date[];
|
|
7
|
+
declare function getYearMonths(year: number): Date[];
|
|
8
|
+
declare function startOfWeek(date: Date, firstDayOfWeek?: number): Date;
|
|
9
|
+
declare function endOfWeek(date: Date, firstDayOfWeek?: number): Date;
|
|
10
|
+
declare function startOfMonth(date: Date): Date;
|
|
11
|
+
declare function endOfMonth(date: Date): Date;
|
|
12
|
+
declare function startOfDay(date: Date): Date;
|
|
13
|
+
declare function endOfDay(date: Date): Date;
|
|
14
|
+
declare function addDays(date: Date, amount: number): Date;
|
|
15
|
+
declare function addWeeks(date: Date, amount: number): Date;
|
|
16
|
+
declare function addMonths(date: Date, amount: number): Date;
|
|
17
|
+
declare function addYears(date: Date, amount: number): Date;
|
|
18
|
+
declare function addHours(date: Date, amount: number): Date;
|
|
19
|
+
declare function addMinutes(date: Date, amount: number): Date;
|
|
20
|
+
declare function isSameDay(d1: Date, d2: Date): boolean;
|
|
21
|
+
declare function isSameWeek(d1: Date, d2: Date, firstDayOfWeek?: number): boolean;
|
|
22
|
+
declare function isSameMonth(d1: Date, d2: Date): boolean;
|
|
23
|
+
declare function isSameYear(d1: Date, d2: Date): boolean;
|
|
24
|
+
declare function isToday(date: Date): boolean;
|
|
25
|
+
declare function isWeekend(date: Date): boolean;
|
|
26
|
+
declare function isBefore(d1: Date, d2: Date): boolean;
|
|
27
|
+
declare function isAfter(d1: Date, d2: Date): boolean;
|
|
28
|
+
declare function isBetween(date: Date, start: Date, end: Date, inclusive?: boolean): boolean;
|
|
29
|
+
declare function isDateInRange(date: Date, minDate: Date | null | undefined, maxDate: Date | null | undefined): boolean;
|
|
30
|
+
declare function getDaysInMonth(year: number, month: number): number;
|
|
31
|
+
declare function getWeekNumber(date: Date, weekNumbering?: WeekNumbering, locale?: string): number;
|
|
32
|
+
interface SchedulerGridCell {
|
|
33
|
+
date: Date;
|
|
34
|
+
dayOfMonth: number;
|
|
35
|
+
dayOfMonthLabel: string;
|
|
36
|
+
dayNumberLabel: string;
|
|
37
|
+
isCurrentMonth: boolean;
|
|
38
|
+
isToday: boolean;
|
|
39
|
+
isWeekend: boolean;
|
|
40
|
+
isDisabled: boolean;
|
|
41
|
+
weekNumber: number;
|
|
42
|
+
}
|
|
43
|
+
declare function getSchedulerGrid(year: number, month: number, firstDayOfWeek?: number, minDate?: Date | null, maxDate?: Date | null, weekNumbering?: WeekNumbering, locale?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): SchedulerGridCell[][];
|
|
44
|
+
declare function formatDateString(date: Date, format: string, locale?: string): string;
|
|
45
|
+
declare function formatMonthYearTitle(date: Date, locale?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
46
|
+
declare function formatWeekdayName(date: Date, locale?: string, format?: 'long' | 'short' | 'narrow', displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
47
|
+
declare function formatGregorianDayNumber(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
48
|
+
declare function formatGregorianWeekday(date: Date, locale?: string, width?: 'long' | 'short' | 'narrow', options?: Intl.DateTimeFormatOptions, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
49
|
+
declare function formatGregorianMonthTitle(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
50
|
+
declare function formatGregorianYear(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
51
|
+
declare function getWeekdayNames(locale?: string, format?: 'long' | 'short' | 'narrow', firstDayOfWeek?: number, displayConfig?: SchedulerCalendarDisplayConfigInput): string[];
|
|
52
|
+
declare function getMonthNames(locale?: string, format?: 'long' | 'short' | 'narrow', displayConfig?: SchedulerCalendarDisplayConfigInput): string[];
|
|
53
|
+
declare function parseDate(dateString: string): Date | null;
|
|
54
|
+
declare function toDateString(date: Date): string;
|
|
55
|
+
declare function toTimeString(date: Date): string;
|
|
56
|
+
declare function toDateTimeString(date: Date): string;
|
|
57
|
+
declare function getDatesBetween(start: Date, end: Date): Date[];
|
|
58
|
+
declare function clampDate(date: Date, minDate: Date | null | undefined, maxDate: Date | null | undefined): Date;
|
|
59
|
+
declare function differenceInDays(d1: Date, d2: Date): number;
|
|
60
|
+
declare function differenceInMinutes(d1: Date, d2: Date): number;
|
|
61
|
+
declare function differenceInHours(d1: Date, d2: Date): number;
|
|
62
|
+
declare function setTime(date: Date, hours: number, minutes?: number, seconds?: number): Date;
|
|
63
|
+
declare function parseTimeString(timeString: string): {
|
|
64
|
+
hours: number;
|
|
65
|
+
minutes: number;
|
|
66
|
+
};
|
|
67
|
+
declare function timeStringToMinutes(timeString: string): number;
|
|
68
|
+
declare function minutesToPixels(minutes: number, slotDuration: number, slotHeight: number): number;
|
|
69
|
+
declare function minutesToTimeString(minutes: number): string;
|
|
70
|
+
declare function formatEventTime12h(date: Date): string;
|
|
71
|
+
declare function calculateDaysDelta(targetDate: Date, originalDate: Date): number;
|
|
72
|
+
declare function applyDaysDelta(date: Date, days: number): Date;
|
|
73
|
+
|
|
74
|
+
export { toDateString as $, getMonthDays as A, getMonthNames as B, getSchedulerGrid as C, getWeekDays as D, getWeekNumber as E, getWeekdayNames as F, getYearMonths as G, isAfter as H, isBefore as I, isBetween as J, isDateInRange as K, isSameDay as L, isSameMonth as M, isSameWeek as N, isSameYear as O, isToday as P, isWeekend as Q, minutesToPixels as R, type SchedulerGridCell as S, minutesToTimeString as T, parseDate as U, parseTimeString as V, setTime as W, startOfDay as X, startOfMonth as Y, startOfWeek as Z, timeStringToMinutes as _, addDays as a, toDateTimeString as a0, toTimeString as a1, addHours as b, addMinutes as c, addMonths as d, addWeeks as e, addYears as f, applyDaysDelta as g, calculateDaysDelta as h, clampDate as i, differenceInDays as j, differenceInHours as k, differenceInMinutes as l, endOfDay as m, endOfMonth as n, endOfWeek as o, formatDateString as p, formatEventTime12h as q, formatGregorianDayNumber as r, formatGregorianMonthTitle as s, formatGregorianWeekday as t, formatGregorianYear as u, formatMonthYearTitle as v, formatWeekdayName as w, getDatesBetween as x, getDayHours as y, getDaysInMonth as z };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { SchedulerCalendarMode, SchedulerNumberingSystem, SchedulerViewType, DateDisplayOptions, DisplayOptions, TimeFormatOptions } from '@primeui/scheduler-types/scheduler';
|
|
2
|
+
|
|
3
|
+
declare const DEFAULT_TIME_FORMAT_OPTIONS: Required<TimeFormatOptions>;
|
|
4
|
+
declare const DEFAULT_DATE_DISPLAY_OPTIONS: Required<DateDisplayOptions>;
|
|
5
|
+
declare const DEFAULT_DISPLAY_OPTIONS: Required<DisplayOptions>;
|
|
6
|
+
interface SchedulerCalendarDisplayConfigInput {
|
|
7
|
+
locale?: string;
|
|
8
|
+
calendar?: SchedulerCalendarMode;
|
|
9
|
+
numberingSystem?: SchedulerNumberingSystem;
|
|
10
|
+
timeZone?: string;
|
|
11
|
+
view?: SchedulerViewType | string;
|
|
12
|
+
}
|
|
13
|
+
interface SchedulerCalendarDisplayConfig {
|
|
14
|
+
locale: string;
|
|
15
|
+
calendar: SchedulerCalendarMode;
|
|
16
|
+
numberingSystem?: string;
|
|
17
|
+
timeZone?: string;
|
|
18
|
+
}
|
|
19
|
+
interface SchedulerDateFormatter {
|
|
20
|
+
config: SchedulerCalendarDisplayConfig;
|
|
21
|
+
format: (date: Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
22
|
+
formatDayNumber: (date: Date, format?: 'numeric' | '2-digit') => string;
|
|
23
|
+
formatWeekdayDayNumber: (date: Date, weekday?: 'long' | 'short' | 'narrow', day?: 'numeric' | '2-digit') => string;
|
|
24
|
+
formatWeekday: (date: Date, width?: 'long' | 'short' | 'narrow') => string;
|
|
25
|
+
formatMonth: (date: Date, format?: 'numeric' | '2-digit' | 'short' | 'long' | 'narrow') => string;
|
|
26
|
+
formatMonthTitle: (date: Date, options?: Intl.DateTimeFormatOptions) => string;
|
|
27
|
+
formatYear: (date: Date) => string;
|
|
28
|
+
formatNumber: (value: number) => string;
|
|
29
|
+
}
|
|
30
|
+
declare function normalizeTimeFormatOptions(options?: TimeFormatOptions): Required<TimeFormatOptions>;
|
|
31
|
+
declare function normalizeDateDisplayOptions(options?: DateDisplayOptions): Required<DateDisplayOptions>;
|
|
32
|
+
declare function normalizeDisplayOptions(options?: DisplayOptions): Required<DisplayOptions>;
|
|
33
|
+
declare function resolveSchedulerCalendarDisplayConfig(input?: SchedulerCalendarDisplayConfigInput): SchedulerCalendarDisplayConfig;
|
|
34
|
+
declare function createSchedulerDateFormatter(input?: SchedulerCalendarDisplayConfigInput): SchedulerDateFormatter;
|
|
35
|
+
declare function __getDateTimeFormatterCacheSize(): number;
|
|
36
|
+
declare function __clearDateTimeFormatterCache(): void;
|
|
37
|
+
declare function formatTime(date: Date, locale: string, options?: TimeFormatOptions, timeZone?: string): string;
|
|
38
|
+
declare function formatTimeRange(start: Date, end: Date, locale: string, options?: TimeFormatOptions, timeZone?: string): string;
|
|
39
|
+
declare function formatSlotTime(date: Date, locale: string, options?: TimeFormatOptions, timeZone?: string): string;
|
|
40
|
+
declare function getRelativeDay(date: Date, locale: string, timeZone?: string): string | null;
|
|
41
|
+
declare function formatDate(date: Date, locale: string, options?: DateDisplayOptions, timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
42
|
+
declare function formatWeekday(date: Date, locale: string, format?: 'narrow' | 'short' | 'long', timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
43
|
+
declare function formatMonth(date: Date, locale: string, format?: 'numeric' | '2-digit' | 'short' | 'long', timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
44
|
+
declare function formatDayOfMonth(date: Date, locale: string, format?: 'numeric' | '2-digit', timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
45
|
+
declare function formatMonthYear(date: Date, locale: string, options?: DateDisplayOptions, timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
46
|
+
declare function formatDateRange(start: Date, end: Date, locale: string, options?: DateDisplayOptions, timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
47
|
+
declare function formatEventDateTime(event: {
|
|
48
|
+
start: Date | string;
|
|
49
|
+
end?: Date | string;
|
|
50
|
+
allDay?: boolean;
|
|
51
|
+
}, locale: string, displayOptions?: DisplayOptions, timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
52
|
+
declare function formatHeaderTitle(date: Date, view: string, locale: string, options?: DateDisplayOptions, context?: {
|
|
53
|
+
daysOfWeek?: number[];
|
|
54
|
+
firstDayOfWeek?: number;
|
|
55
|
+
}, timeZone?: string, displayConfig?: SchedulerCalendarDisplayConfigInput): string;
|
|
56
|
+
|
|
57
|
+
export { DEFAULT_DATE_DISPLAY_OPTIONS as D, type SchedulerCalendarDisplayConfigInput as S, __clearDateTimeFormatterCache as _, DEFAULT_DISPLAY_OPTIONS as a, DEFAULT_TIME_FORMAT_OPTIONS as b, type SchedulerCalendarDisplayConfig as c, type SchedulerDateFormatter as d, __getDateTimeFormatterCacheSize as e, createSchedulerDateFormatter as f, formatDate as g, formatDateRange as h, formatDayOfMonth as i, formatEventDateTime as j, formatHeaderTitle as k, formatMonth as l, formatMonthYear as m, formatSlotTime as n, formatTime as o, formatTimeRange as p, formatWeekday as q, getRelativeDay as r, normalizeDateDisplayOptions as s, normalizeDisplayOptions as t, normalizeTimeFormatOptions as u, resolveSchedulerCalendarDisplayConfig as v };
|