regular-calendar 0.0.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.
@@ -0,0 +1,1467 @@
1
+ import { default as default_2 } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { ReactNode } from 'react';
4
+ import { z } from 'zod';
5
+
6
+ export declare function applyThemeSettings(settings: AppSettings, rootElement?: HTMLElement): void;
7
+
8
+ export declare interface AppSettings {
9
+ theme: "light" | "dark";
10
+ density: "compact" | "normal" | "spacious";
11
+ borderRadius: number;
12
+ fontSize: number;
13
+ weekStartsOn: 0 | 1;
14
+ businessHoursStart: string;
15
+ businessHoursEnd: string;
16
+ closedDays: number[];
17
+ language: "ja" | "en";
18
+ timeZone: string;
19
+ }
20
+
21
+ declare type AttendeeInfo = z.infer<typeof AttendeeInfoSchema>;
22
+
23
+ declare const AttendeeInfoSchema: z.ZodObject<{
24
+ name: z.ZodString;
25
+ email: z.ZodOptional<z.ZodString>;
26
+ personnelId: z.ZodOptional<z.ZodString>;
27
+ type: z.ZodDefault<z.ZodEnum<["personnel", "external"]>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ name: string;
30
+ type: "personnel" | "external";
31
+ email?: string | undefined;
32
+ personnelId?: string | undefined;
33
+ }, {
34
+ name: string;
35
+ type?: "personnel" | "external" | undefined;
36
+ email?: string | undefined;
37
+ personnelId?: string | undefined;
38
+ }>;
39
+
40
+ /**
41
+ * Booking data from resource availability API
42
+ */
43
+ declare interface BookingData {
44
+ eventId: string;
45
+ title: string;
46
+ startDate: string;
47
+ endDate: string;
48
+ isAllDay: boolean;
49
+ attendee: string;
50
+ extendedProps?: string | Record<string, unknown>;
51
+ }
52
+
53
+ /**
54
+ * Browser localStorage implementation
55
+ *
56
+ * Default implementation using browser's localStorage API.
57
+ * Should be used in production.
58
+ */
59
+ export declare class BrowserStorage implements StorageAdapter {
60
+ getItem(key: string): string | null;
61
+ setItem(key: string, value: string): void;
62
+ removeItem(key: string): void;
63
+ }
64
+
65
+ /**
66
+ * Calculates the display range for a given view mode and reference date.
67
+ * Useful for DayView and WeekView to extend hours if settings require it.
68
+ */
69
+ export declare function calculateViewRange(date: Date, viewMode: "day" | "week" | "month", settings: {
70
+ startTime: string;
71
+ endTime: string;
72
+ weekStartsOn?: number;
73
+ }): {
74
+ start: Date;
75
+ end: Date;
76
+ };
77
+
78
+ /**
79
+ * Check collision for a new event against existing events
80
+ */
81
+ export declare function checkScheduleConflict(newEvent: Partial<ScheduleEvent> & {
82
+ startDate: Date;
83
+ endDate: Date;
84
+ resourceId: string;
85
+ }, existingEvents: ScheduleEvent[]): ScheduleConflict | null;
86
+
87
+ /**
88
+ * Configuration response from API
89
+ */
90
+ declare interface ConfigResponse {
91
+ groups: ResourceGroup[];
92
+ resources: Resource[];
93
+ settings: FacilityScheduleSettings;
94
+ }
95
+
96
+ export declare interface ConflictInfo {
97
+ existingSchedule: ScheduleEvent;
98
+ }
99
+
100
+ export declare function ConnectedCalendar({ settings, additionalEvents, currentUserId, }: ConnectedCalendarProps): JSX.Element;
101
+
102
+ declare interface ConnectedCalendarProps {
103
+ settings: {
104
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
105
+ businessHoursStart: string;
106
+ businessHoursEnd: string;
107
+ timeZone: string;
108
+ [key: string]: unknown;
109
+ };
110
+ additionalEvents?: ScheduleEvent[];
111
+ currentUserId?: string;
112
+ }
113
+
114
+ export declare function ConnectedEventModal({ isOpen, event, resources, events, groups, defaultResourceId, defaultStartTime, onClose, onSave, onDelete, readOnlyResource, currentUserId, }: ConnectedEventModalProps): JSX.Element;
115
+
116
+ declare interface ConnectedEventModalProps {
117
+ isOpen: boolean;
118
+ event?: ScheduleEvent;
119
+ resources: Resource[];
120
+ events: ScheduleEvent[];
121
+ groups: ResourceGroup[];
122
+ defaultResourceId?: string;
123
+ defaultStartTime?: Date;
124
+ readOnlyResource?: boolean;
125
+ onClose: () => void;
126
+ onSave: (data: EventFormData_3) => void;
127
+ onDelete?: (eventId: string) => void;
128
+ currentUserId?: string;
129
+ }
130
+
131
+ export declare function ConnectedFacilitySchedule({ settings, currentUserId, }: ConnectedFacilityScheduleProps): JSX.Element;
132
+
133
+ declare interface ConnectedFacilityScheduleProps {
134
+ settings: ConnectedFacilityScheduleSettings;
135
+ currentUserId?: string;
136
+ }
137
+
138
+ declare interface ConnectedFacilityScheduleSettings {
139
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
140
+ businessHoursStart: string;
141
+ businessHoursEnd: string;
142
+ [key: string]: unknown;
143
+ }
144
+
145
+ export declare function createPersonnelColorMap(selectedIds: string[]): Map<string, string>;
146
+
147
+ export declare function DatePicker(props: DatePickerProps): JSX.Element;
148
+
149
+ declare interface DatePickerBaseProps {
150
+ className?: string;
151
+ label?: string;
152
+ disabled?: boolean;
153
+ minDate?: Date;
154
+ maxDate?: Date;
155
+ monthsShown?: number;
156
+ }
157
+
158
+ export declare type DatePickerProps = SingleDatePickerProps | RangeDatePickerProps;
159
+
160
+ export declare const DEFAULT_SETTINGS: AppSettings;
161
+
162
+ /**
163
+ * Default storage instance
164
+ *
165
+ * Uses BrowserStorage by default. Can be overridden in tests.
166
+ */
167
+ export declare const defaultStorage: StorageAdapter;
168
+
169
+ /**
170
+ * デフォルトのテーマ適用インスタンス
171
+ */
172
+ export declare const defaultThemeApplier: ThemeApplier;
173
+
174
+ export declare function detectAndMarkConflicts(events: ScheduleEvent[]): ScheduleEvent[];
175
+
176
+ /**
177
+ * DOM実装 - document.documentElement.styleを操作
178
+ *
179
+ * 本番環境で使用する実装。
180
+ * ブラウザのDOM APIを使用してCSS変数を設定・削除します。
181
+ */
182
+ export declare class DOMThemeApplier implements ThemeApplier {
183
+ applyVariables(config: ThemeConfig): void;
184
+ removeVariables(): void;
185
+ }
186
+
187
+ /**
188
+ * Event data for create/update operations
189
+ */
190
+ declare interface EventData {
191
+ title: string;
192
+ attendee?: string;
193
+ resourceId?: string;
194
+ startDate: Date;
195
+ endDate: Date;
196
+ status?: string;
197
+ note?: string;
198
+ isAllDay?: boolean;
199
+ extendedProps?: Record<string, unknown>;
200
+ }
201
+
202
+ export declare function EventForm({ event, resources, groups, events, resourceAvailability, defaultResourceId, defaultStartTime, onSubmit, onCancel, onDelete, readOnlyResource, personnel, currentUserId, }: EventFormProps): JSX.Element;
203
+
204
+ export declare interface EventFormData extends Omit<EventFormValues, "startDate" | "endDate"> {
205
+ startDate: Date;
206
+ endDate: Date;
207
+ description?: string;
208
+ [key: string]: unknown;
209
+ }
210
+
211
+ declare interface EventFormData_2 {
212
+ title: string;
213
+ attendee: string;
214
+ resourceId?: string;
215
+ groupId?: string;
216
+ startDate: Date;
217
+ endDate: Date;
218
+ durationHours: number;
219
+ status?: string;
220
+ note?: string;
221
+ isAllDay?: boolean;
222
+ notes?: string;
223
+ description?: string;
224
+ color?: string;
225
+ [key: string]: unknown;
226
+ }
227
+
228
+ /**
229
+ * Event form data with parsed dates
230
+ */
231
+ declare interface EventFormData_3 extends Omit<EventFormValues_2, "startDate"> {
232
+ startDate: Date;
233
+ endDate: Date;
234
+ extendedProps?: Record<string, unknown>;
235
+ }
236
+
237
+ declare interface EventFormProps {
238
+ event?: ScheduleEvent;
239
+ resources: Resource[];
240
+ groups: ResourceGroup[];
241
+ events: ScheduleEvent[];
242
+ resourceAvailability?: {
243
+ resourceId: string;
244
+ isAvailable: boolean;
245
+ }[];
246
+ defaultResourceId?: string;
247
+ defaultStartTime?: Date;
248
+ onSubmit: (data: EventFormData) => void;
249
+ onCancel: () => void;
250
+ onDelete?: () => void;
251
+ readOnlyResource?: boolean;
252
+ personnel?: Personnel[];
253
+ currentUserId?: string;
254
+ }
255
+
256
+ /**
257
+ * Zod schema for event form validation
258
+ */
259
+ declare const eventFormSchema: z.ZodObject<{
260
+ title: z.ZodString;
261
+ attendee: z.ZodString;
262
+ resourceId: z.ZodString;
263
+ startDate: z.ZodString;
264
+ durationHours: z.ZodNumber;
265
+ status: z.ZodOptional<z.ZodString>;
266
+ note: z.ZodOptional<z.ZodString>;
267
+ usage: z.ZodOptional<z.ZodString>;
268
+ isAllDay: z.ZodOptional<z.ZodBoolean>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ title: string;
271
+ resourceId: string;
272
+ attendee: string;
273
+ startDate: string;
274
+ durationHours: number;
275
+ note?: string | undefined;
276
+ status?: string | undefined;
277
+ isAllDay?: boolean | undefined;
278
+ usage?: string | undefined;
279
+ }, {
280
+ title: string;
281
+ resourceId: string;
282
+ attendee: string;
283
+ startDate: string;
284
+ durationHours: number;
285
+ note?: string | undefined;
286
+ status?: string | undefined;
287
+ isAllDay?: boolean | undefined;
288
+ usage?: string | undefined;
289
+ }>;
290
+
291
+ declare type EventFormValues = z.infer<typeof eventSchema>;
292
+
293
+ declare type EventFormValues_2 = z.infer<typeof eventFormSchema>;
294
+
295
+ export declare function EventModal({ isOpen, event, resources, groups, events, defaultResourceId, defaultStartTime, onClose, onSave, onDelete, readOnlyResource, personnel, currentUserId, resourceAvailability, }: EventModalProps): JSX.Element;
296
+
297
+ declare interface EventModalComponentProps {
298
+ isOpen: boolean;
299
+ event?: ScheduleEvent;
300
+ resources: Resource[];
301
+ groups: ResourceGroup[];
302
+ events: ScheduleEvent[];
303
+ personnel?: Personnel[];
304
+ resourceAvailability?: {
305
+ resourceId: string;
306
+ isAvailable: boolean;
307
+ }[];
308
+ defaultResourceId?: string;
309
+ defaultStartTime?: Date;
310
+ readOnlyResource?: boolean;
311
+ onClose: () => void;
312
+ onSave: (data: EventFormData_2) => void;
313
+ onDelete?: (eventId: string) => void;
314
+ currentUserId?: string;
315
+ }
316
+
317
+ declare interface EventModalProps {
318
+ isOpen: boolean;
319
+ event?: ScheduleEvent;
320
+ resources: Resource[];
321
+ groups: ResourceGroup[];
322
+ events: ScheduleEvent[];
323
+ personnel?: Personnel[];
324
+ resourceAvailability?: {
325
+ resourceId: string;
326
+ isAvailable: boolean;
327
+ }[];
328
+ defaultResourceId?: string;
329
+ defaultStartTime?: Date;
330
+ readOnlyResource?: boolean;
331
+ onClose: () => void;
332
+ onSave: (data: EventFormData) => void;
333
+ onDelete?: (eventId: string) => void;
334
+ currentUserId?: string;
335
+ }
336
+
337
+ declare const eventSchema: z.ZodObject<{
338
+ title: z.ZodString;
339
+ attendee: z.ZodString;
340
+ resourceId: z.ZodOptional<z.ZodString>;
341
+ startDate: z.ZodString;
342
+ durationHours: z.ZodNumber;
343
+ status: z.ZodOptional<z.ZodString>;
344
+ note: z.ZodOptional<z.ZodString>;
345
+ isRecurring: z.ZodOptional<z.ZodBoolean>;
346
+ scheduleType: z.ZodOptional<z.ZodString>;
347
+ endDate: z.ZodOptional<z.ZodString>;
348
+ isAllDay: z.ZodOptional<z.ZodBoolean>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ title: string;
351
+ attendee: string;
352
+ startDate: string;
353
+ durationHours: number;
354
+ note?: string | undefined;
355
+ status?: string | undefined;
356
+ resourceId?: string | undefined;
357
+ endDate?: string | undefined;
358
+ isAllDay?: boolean | undefined;
359
+ isRecurring?: boolean | undefined;
360
+ scheduleType?: string | undefined;
361
+ }, {
362
+ title: string;
363
+ attendee: string;
364
+ startDate: string;
365
+ durationHours: number;
366
+ note?: string | undefined;
367
+ status?: string | undefined;
368
+ resourceId?: string | undefined;
369
+ endDate?: string | undefined;
370
+ isAllDay?: boolean | undefined;
371
+ isRecurring?: boolean | undefined;
372
+ scheduleType?: string | undefined;
373
+ }>;
374
+
375
+ export declare function FacilitySchedule({ events, resources, groups, settings, currentDate: propCurrentDate, viewMode: propViewMode, selectedGroupId: propSelectedGroupId, onDateChange, onViewChange, onGroupChange, onEventCreate, onEventUpdate, onEventDelete, isLoading, className, hideGroupSelector, components, headerLeft, headerRight, defaultView, enablePersistence, storageKey, }: FacilityScheduleProps): JSX.Element;
376
+
377
+ declare interface FacilityScheduleProps {
378
+ events: ScheduleEvent[];
379
+ resources: Resource[];
380
+ groups: ResourceGroup[];
381
+ settings: FacilityScheduleSettings;
382
+ currentDate?: Date;
383
+ viewMode?: ViewMode;
384
+ selectedGroupId?: string | null;
385
+ onDateChange?: (date: Date) => void;
386
+ onViewChange?: (view: ViewMode) => void;
387
+ onGroupChange?: (groupId: string | null) => void;
388
+ onEventCreate?: (data: EventFormData_2) => void;
389
+ onEventUpdate?: (id: string, data: EventFormData_2) => void;
390
+ onEventDelete?: (eventId: string) => void;
391
+ isLoading?: boolean;
392
+ className?: string;
393
+ hideGroupSelector?: boolean;
394
+ /**
395
+ * Custom components to override default internal components.
396
+ */
397
+ components?: {
398
+ EventModal?: default_2.ComponentType<EventModalComponentProps>;
399
+ };
400
+ headerLeft?: default_2.ReactNode;
401
+ headerRight?: default_2.ReactNode;
402
+ defaultView?: ViewMode;
403
+ enablePersistence?: boolean;
404
+ storageKey?: string;
405
+ }
406
+
407
+ declare type FacilityScheduleSettings = z.infer<typeof FacilityScheduleSettingsSchema>;
408
+
409
+ declare type FacilityScheduleSettings_2 = z.infer<typeof FacilityScheduleSettingsSchema_2>;
410
+
411
+ declare const FacilityScheduleSettingsSchema: z.ZodObject<{
412
+ defaultDuration: z.ZodNumber;
413
+ startTime: z.ZodString;
414
+ endTime: z.ZodString;
415
+ closedDays: z.ZodArray<z.ZodNumber, "many">;
416
+ weekStartsOn: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
417
+ timeZone: z.ZodOptional<z.ZodString>;
418
+ timeSlots: z.ZodOptional<z.ZodArray<z.ZodObject<{
419
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
420
+ label: z.ZodString;
421
+ startTime: z.ZodString;
422
+ endTime: z.ZodString;
423
+ }, "strip", z.ZodTypeAny, {
424
+ id: string | number;
425
+ label: string;
426
+ startTime: string;
427
+ endTime: string;
428
+ }, {
429
+ id: string | number;
430
+ label: string;
431
+ startTime: string;
432
+ endTime: string;
433
+ }>, "many">>;
434
+ }, "strip", z.ZodTypeAny, {
435
+ startTime: string;
436
+ endTime: string;
437
+ defaultDuration: number;
438
+ closedDays: number[];
439
+ weekStartsOn: 0 | 1 | 3 | 2 | 4 | 5 | 6;
440
+ timeZone?: string | undefined;
441
+ timeSlots?: {
442
+ id: string | number;
443
+ label: string;
444
+ startTime: string;
445
+ endTime: string;
446
+ }[] | undefined;
447
+ }, {
448
+ startTime: string;
449
+ endTime: string;
450
+ defaultDuration: number;
451
+ closedDays: number[];
452
+ weekStartsOn: 0 | 1 | 3 | 2 | 4 | 5 | 6;
453
+ timeZone?: string | undefined;
454
+ timeSlots?: {
455
+ id: string | number;
456
+ label: string;
457
+ startTime: string;
458
+ endTime: string;
459
+ }[] | undefined;
460
+ }>;
461
+
462
+ declare const FacilityScheduleSettingsSchema_2: z.ZodObject<{
463
+ defaultDuration: z.ZodNumber;
464
+ startTime: z.ZodString;
465
+ endTime: z.ZodString;
466
+ closedDays: z.ZodArray<z.ZodNumber, "many">;
467
+ weekStartsOn: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
468
+ timeZone: z.ZodOptional<z.ZodString>;
469
+ timeSlots: z.ZodOptional<z.ZodArray<z.ZodObject<{
470
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
471
+ label: z.ZodString;
472
+ startTime: z.ZodString;
473
+ endTime: z.ZodString;
474
+ }, "strip", z.ZodTypeAny, {
475
+ id: string | number;
476
+ label: string;
477
+ startTime: string;
478
+ endTime: string;
479
+ }, {
480
+ id: string | number;
481
+ label: string;
482
+ startTime: string;
483
+ endTime: string;
484
+ }>, "many">>;
485
+ }, "strip", z.ZodTypeAny, {
486
+ startTime: string;
487
+ endTime: string;
488
+ defaultDuration: number;
489
+ closedDays: number[];
490
+ weekStartsOn: 0 | 1;
491
+ timeZone?: string | undefined;
492
+ timeSlots?: {
493
+ id: string | number;
494
+ label: string;
495
+ startTime: string;
496
+ endTime: string;
497
+ }[] | undefined;
498
+ }, {
499
+ startTime: string;
500
+ endTime: string;
501
+ defaultDuration: number;
502
+ closedDays: number[];
503
+ weekStartsOn: 0 | 1;
504
+ timeZone?: string | undefined;
505
+ timeSlots?: {
506
+ id: string | number;
507
+ label: string;
508
+ startTime: string;
509
+ endTime: string;
510
+ }[] | undefined;
511
+ }>;
512
+
513
+ export declare function FacilityStructureSettings({ groups, resources, onCreateGroup, onUpdateGroup, onDeleteGroup, onCreateResource, onUpdateResource, onDeleteResource, onClose, }: FacilityStructureSettingsProps): JSX.Element;
514
+
515
+ declare interface FacilityStructureSettingsProps {
516
+ groups: ResourceGroup[];
517
+ resources: Resource[];
518
+ onCreateGroup: (group: Partial<ResourceGroup>) => Promise<void>;
519
+ onUpdateGroup: (id: string, group: Partial<ResourceGroup>) => Promise<void>;
520
+ onDeleteGroup: (id: string) => Promise<void>;
521
+ onCreateResource: (resource: Partial<Resource>) => Promise<void>;
522
+ onUpdateResource: (id: string, resource: Partial<Resource>) => Promise<void>;
523
+ onDeleteResource: (id: string) => Promise<void>;
524
+ onClose: () => void;
525
+ }
526
+
527
+ export declare function filterEventsByDateRange(events: ScheduleEvent[], startDate: Date, endDate: Date): ScheduleEvent[];
528
+
529
+ export declare function filterEventsByDay(events: ScheduleEvent[], date: Date): ScheduleEvent[];
530
+
531
+ export declare function filterEventsByResource(events: ScheduleEvent[], resourceId: string): ScheduleEvent[];
532
+
533
+ export declare function generateDateRange(start: Date, end: Date): Date[];
534
+
535
+ export declare function getEventDisplayText(event: ScheduleEvent): string;
536
+
537
+ export declare function getEventDuration(event: ScheduleEvent): number;
538
+
539
+ export declare function getMonthEnd(date: Date): Date;
540
+
541
+ export declare function getMonthStart(date: Date): Date;
542
+
543
+ export declare function getPersonnelColor(index: number): string;
544
+
545
+ /**
546
+ * 指定された時間範囲に対するすべてのリソースの空き状況を計算する。
547
+ * 視覚化のために、開始日のイベントも返す。
548
+ */
549
+ export declare function getResourceAvailability(resources: Resource[], events: ScheduleEvent[], timeRange: {
550
+ start: Date;
551
+ end: Date;
552
+ }, excludeEventId?: string): ResourceAvailabilityInfo[];
553
+
554
+ /**
555
+ * 今日の日付を取得(時刻を0:00:00にリセット)
556
+ *
557
+ * @returns 今日の日付(時刻なし)
558
+ */
559
+ export declare function getToday(): Date;
560
+
561
+ export declare function getWeekEnd(date: Date, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date;
562
+
563
+ export declare function getWeekStart(date: Date, weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6): Date;
564
+
565
+ /**
566
+ * Check if time ranges overlap
567
+ */
568
+ export declare function hasTimeOverlap(schedule1: {
569
+ startDate: Date;
570
+ endDate: Date;
571
+ }, schedule2: {
572
+ startDate: Date;
573
+ endDate: Date;
574
+ }): boolean;
575
+
576
+ /**
577
+ * In-memory storage implementation
578
+ *
579
+ * Test-friendly implementation that stores data in memory.
580
+ * Each instance maintains its own isolated storage.
581
+ * Perfect for unit tests where you need independent storage per test.
582
+ *
583
+ * @example
584
+ * ```typescript
585
+ * const storage = new InMemoryStorage();
586
+ * storage.setItem('key', 'value');
587
+ * expect(storage.getItem('key')).toBe('value');
588
+ * ```
589
+ */
590
+ export declare class InMemoryStorage implements StorageAdapter {
591
+ private storage;
592
+ getItem(key: string): string | null;
593
+ setItem(key: string, value: string): void;
594
+ removeItem(key: string): void;
595
+ /**
596
+ * Clear all items from storage
597
+ * Useful for test cleanup
598
+ */
599
+ clear(): void;
600
+ /**
601
+ * Get all keys in storage
602
+ * Useful for test assertions
603
+ */
604
+ keys(): string[];
605
+ }
606
+
607
+ /**
608
+ * モック実装 - テスト用
609
+ *
610
+ * DOM操作を行わず、適用された設定をメモリ上に保持します。
611
+ * テストで使用することで、DOM環境なしでテーマ適用ロジックをテスト可能です。
612
+ *
613
+ * @example
614
+ * ```typescript
615
+ * const mockApplier = new MockThemeApplier();
616
+ * mockApplier.applyVariables({ radius: 0.5 });
617
+ * expect(mockApplier.appliedConfig).toEqual({ radius: 0.5 });
618
+ * ```
619
+ */
620
+ export declare class MockThemeApplier implements ThemeApplier {
621
+ /** 適用されたテーマ設定 */
622
+ appliedConfig?: ThemeConfig;
623
+ applyVariables(config: ThemeConfig): void;
624
+ removeVariables(): void;
625
+ /** テスト用: 適用された設定をクリア */
626
+ reset(): void;
627
+ }
628
+
629
+ /**
630
+ * ビューモードに応じて日付を前後に移動
631
+ *
632
+ * @param currentDate 現在の日付
633
+ * @param viewMode ビューモード(day/week/month)
634
+ * @param direction 移動方向(prev/next)
635
+ * @returns 移動後の日付
636
+ *
637
+ * @example
638
+ * ```typescript
639
+ * const nextWeek = navigateDate(new Date(), 'week', 'next');
640
+ * const prevDay = navigateDate(new Date(), 'day', 'prev');
641
+ * ```
642
+ */
643
+ export declare function navigateDate(currentDate: Date, viewMode: ViewMode, direction: "prev" | "next"): Date;
644
+
645
+ export declare function normalizeWeekStartsOn(value?: number): 0 | 1 | 2 | 3 | 4 | 5 | 6;
646
+
647
+ /**
648
+ * attendee文字列をAttendeeInfo配列にパース
649
+ * JSON形式または従来のカンマ区切り形式をサポート
650
+ */
651
+ export declare function parseAttendees(str: string): AttendeeInfo[];
652
+
653
+ export declare interface Personnel {
654
+ id: string;
655
+ name: string;
656
+ department: string;
657
+ email: string;
658
+ priority: number;
659
+ createdAt?: Date;
660
+ updatedAt?: Date;
661
+ }
662
+
663
+ export declare const PERSONNEL_COLORS: string[];
664
+
665
+ export declare function PersonnelContextMenu({ personnel, position, onClose, onSetPriority, }: PersonnelContextMenuProps): JSX.Element | null;
666
+
667
+ declare interface PersonnelContextMenuProps {
668
+ personnel: Personnel | null;
669
+ position: {
670
+ x: number;
671
+ y: number;
672
+ } | null;
673
+ onClose: () => void;
674
+ onSetPriority: (id: string, priority: number) => void;
675
+ }
676
+
677
+ export declare function PersonnelPanel({ personnel, selectedIds, onSelectionChange, onPriorityChange, className, colorMap, }: PersonnelPanelProps): JSX.Element;
678
+
679
+ declare interface PersonnelPanelProps {
680
+ personnel: Personnel[];
681
+ selectedIds: string[];
682
+ onSelectionChange: (ids: string[]) => void;
683
+ onPriorityChange: (id: string, priority: number) => void;
684
+ className?: string;
685
+ colorMap?: Map<string, string>;
686
+ }
687
+
688
+ declare interface RangeDatePickerProps extends DatePickerBaseProps {
689
+ selectsRange: true;
690
+ startDate?: Date | null;
691
+ endDate?: Date | null;
692
+ onRangeChange?: (dates: [Date | null, Date | null]) => void;
693
+ value?: never;
694
+ onChange?: never;
695
+ date?: never;
696
+ setDate?: never;
697
+ }
698
+
699
+ export declare function RegularCalendar({ events, settings, currentDate: propCurrentDate, viewMode: propViewMode, onDateChange, onViewChange, onEventClick, onTimeSlotClick, onDateClick, isLoading, className, headerLeft, headerRight, defaultView, enablePersistence, storageKey, storage, }: RegularCalendarProps): JSX.Element;
700
+
701
+ export declare interface RegularCalendarProps {
702
+ events: ScheduleEvent_2[];
703
+ settings: FacilityScheduleSettings_2;
704
+ currentDate?: Date;
705
+ viewMode?: ViewMode_2;
706
+ onDateChange?: (date: Date) => void;
707
+ onViewChange?: (view: ViewMode_2) => void;
708
+ onEventClick?: (event: ScheduleEvent_2) => void;
709
+ onTimeSlotClick?: (date: Date) => void;
710
+ onDateClick?: (date: Date) => void;
711
+ isLoading?: boolean;
712
+ className?: string;
713
+ headerLeft?: React.ReactNode;
714
+ headerRight?: React.ReactNode;
715
+ defaultView?: ViewMode_2;
716
+ enablePersistence?: boolean;
717
+ storageKey?: string;
718
+ storage?: StorageAdapter;
719
+ }
720
+
721
+ export declare function ResizablePanel({ children, defaultWidth, minWidth, maxWidth, storageKey, storage, className, }: ResizablePanelProps): JSX.Element;
722
+
723
+ declare interface ResizablePanelProps {
724
+ children: React.ReactNode;
725
+ defaultWidth?: number;
726
+ minWidth?: number;
727
+ maxWidth?: number;
728
+ storageKey?: string;
729
+ storage?: StorageAdapter;
730
+ className?: string;
731
+ }
732
+
733
+ declare type Resource = z.infer<typeof ResourceSchema>;
734
+
735
+ export declare interface ResourceAvailabilityInfo {
736
+ resourceId: string;
737
+ isAvailable: boolean;
738
+ conflictingEvents: ScheduleEvent[];
739
+ todaySchedule: ScheduleEvent[];
740
+ }
741
+
742
+ /**
743
+ * Resource availability request parameters
744
+ */
745
+ declare interface ResourceAvailabilityParams {
746
+ date: Date;
747
+ view: "day" | "week" | "month";
748
+ }
749
+
750
+ /**
751
+ * Resource availability response from API
752
+ */
753
+ declare interface ResourceAvailabilityResponse {
754
+ resourceId: string;
755
+ resourceName: string;
756
+ groupId: string;
757
+ isAvailable: boolean;
758
+ bookings: BookingData[];
759
+ }
760
+
761
+ declare type ResourceGroup = z.infer<typeof ResourceGroupSchema>;
762
+
763
+ declare const ResourceGroupSchema: z.ZodObject<{
764
+ id: z.ZodString;
765
+ name: z.ZodString;
766
+ displayMode: z.ZodEnum<["grid", "list"]>;
767
+ dimension: z.ZodNumber;
768
+ resources: z.ZodArray<z.ZodObject<{
769
+ id: z.ZodString;
770
+ name: z.ZodString;
771
+ order: z.ZodNumber;
772
+ isAvailable: z.ZodBoolean;
773
+ groupId: z.ZodString;
774
+ createdAt: z.ZodDate;
775
+ updatedAt: z.ZodDate;
776
+ deletedAt: z.ZodOptional<z.ZodDate>;
777
+ }, "strip", z.ZodTypeAny, {
778
+ name: string;
779
+ id: string;
780
+ order: number;
781
+ groupId: string;
782
+ createdAt: Date;
783
+ updatedAt: Date;
784
+ isAvailable: boolean;
785
+ deletedAt?: Date | undefined;
786
+ }, {
787
+ name: string;
788
+ id: string;
789
+ order: number;
790
+ groupId: string;
791
+ createdAt: Date;
792
+ updatedAt: Date;
793
+ isAvailable: boolean;
794
+ deletedAt?: Date | undefined;
795
+ }>, "many">;
796
+ createdAt: z.ZodDate;
797
+ updatedAt: z.ZodDate;
798
+ deletedAt: z.ZodOptional<z.ZodDate>;
799
+ }, "strip", z.ZodTypeAny, {
800
+ name: string;
801
+ id: string;
802
+ resources: {
803
+ name: string;
804
+ id: string;
805
+ order: number;
806
+ groupId: string;
807
+ createdAt: Date;
808
+ updatedAt: Date;
809
+ isAvailable: boolean;
810
+ deletedAt?: Date | undefined;
811
+ }[];
812
+ createdAt: Date;
813
+ updatedAt: Date;
814
+ displayMode: "grid" | "list";
815
+ dimension: number;
816
+ deletedAt?: Date | undefined;
817
+ }, {
818
+ name: string;
819
+ id: string;
820
+ resources: {
821
+ name: string;
822
+ id: string;
823
+ order: number;
824
+ groupId: string;
825
+ createdAt: Date;
826
+ updatedAt: Date;
827
+ isAvailable: boolean;
828
+ deletedAt?: Date | undefined;
829
+ }[];
830
+ createdAt: Date;
831
+ updatedAt: Date;
832
+ displayMode: "grid" | "list";
833
+ dimension: number;
834
+ deletedAt?: Date | undefined;
835
+ }>;
836
+
837
+ declare const ResourceSchema: z.ZodObject<{
838
+ id: z.ZodString;
839
+ name: z.ZodString;
840
+ order: z.ZodNumber;
841
+ isAvailable: z.ZodBoolean;
842
+ groupId: z.ZodString;
843
+ createdAt: z.ZodDate;
844
+ updatedAt: z.ZodDate;
845
+ deletedAt: z.ZodOptional<z.ZodDate>;
846
+ }, "strip", z.ZodTypeAny, {
847
+ name: string;
848
+ id: string;
849
+ order: number;
850
+ groupId: string;
851
+ createdAt: Date;
852
+ updatedAt: Date;
853
+ isAvailable: boolean;
854
+ deletedAt?: Date | undefined;
855
+ }, {
856
+ name: string;
857
+ id: string;
858
+ order: number;
859
+ groupId: string;
860
+ createdAt: Date;
861
+ updatedAt: Date;
862
+ isAvailable: boolean;
863
+ deletedAt?: Date | undefined;
864
+ }>;
865
+
866
+ /**
867
+ * API Client interface for schedule operations
868
+ * This interface allows for easy mocking in tests
869
+ */
870
+ declare interface ScheduleApiClient {
871
+ getConfig(): Promise<ConfigResponse>;
872
+ getEvents(personnelIds?: string[]): Promise<ScheduleEvent[]>;
873
+ createEvent(data: EventData): Promise<ScheduleEvent>;
874
+ updateEvent(id: string, data: Partial<EventData>): Promise<ScheduleEvent>;
875
+ deleteEvent(id: string): Promise<void>;
876
+ createGroup(data: Partial<ResourceGroup>): Promise<ResourceGroup>;
877
+ updateGroup(id: string, data: Partial<ResourceGroup>): Promise<ResourceGroup>;
878
+ deleteGroup(id: string): Promise<void>;
879
+ createResource(data: Partial<Resource>): Promise<Resource>;
880
+ updateResource(id: string, data: Partial<Resource>): Promise<Resource>;
881
+ deleteResource(id: string): Promise<void>;
882
+ getPersonnel(): Promise<Personnel[]>;
883
+ updatePersonnelPriority(id: string, priority: number): Promise<Personnel>;
884
+ getResourceAvailability(params: ResourceAvailabilityParams): Promise<ResourceAvailabilityResponse[]>;
885
+ }
886
+
887
+ declare interface ScheduleConflict {
888
+ resourceId: string;
889
+ existingSchedule: ScheduleEvent;
890
+ newSchedule: Partial<ScheduleEvent>;
891
+ conflictType: "double-booking" | "overlap";
892
+ }
893
+
894
+ export declare interface ScheduleContextType {
895
+ events: ScheduleEvent[];
896
+ personnelEvents: ScheduleEvent[];
897
+ resources: Resource[];
898
+ groups: ResourceGroup[];
899
+ settings: FacilityScheduleSettings | null;
900
+ personnel: Personnel[];
901
+ loading: boolean;
902
+ error: string | null;
903
+ createEvent: (data: EventData) => Promise<void>;
904
+ updateEvent: (id: string, data: Partial<EventData>) => Promise<void>;
905
+ deleteEvent: (id: string) => Promise<void>;
906
+ createGroup: (data: Partial<ResourceGroup>) => Promise<ResourceGroup>;
907
+ updateGroup: (id: string, data: Partial<ResourceGroup>) => Promise<ResourceGroup>;
908
+ deleteGroup: (id: string) => Promise<void>;
909
+ createResource: (data: Partial<Resource>) => Promise<Resource>;
910
+ updateResource: (id: string, data: Partial<Resource>) => Promise<Resource>;
911
+ deleteResource: (id: string) => Promise<void>;
912
+ updatePersonnelPriority: (id: string, priority: number) => Promise<void>;
913
+ fetchPersonnelEvents: (personnelIds: string[], append?: boolean) => Promise<void>;
914
+ fetchResourceAvailability: (date: Date, view?: "day" | "week" | "month") => Promise<ResourceAvailabilityInfo[]>;
915
+ getResourceAvailabilityFromCache: (date: Date, view?: "day" | "week" | "month") => ResourceAvailabilityInfo[] | undefined;
916
+ }
917
+
918
+ declare type ScheduleEvent = z.infer<typeof ScheduleEventSchema>;
919
+
920
+ declare type ScheduleEvent_2 = z.infer<typeof ScheduleEventSchema_2>;
921
+
922
+ declare const ScheduleEventSchema: z.ZodObject<{
923
+ id: z.ZodString;
924
+ resourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
925
+ groupId: z.ZodString;
926
+ title: z.ZodString;
927
+ attendee: z.ZodString;
928
+ startDate: z.ZodDate;
929
+ endDate: z.ZodDate;
930
+ status: z.ZodString;
931
+ description: z.ZodOptional<z.ZodString>;
932
+ note: z.ZodOptional<z.ZodString>;
933
+ color: z.ZodOptional<z.ZodString>;
934
+ isAllDay: z.ZodOptional<z.ZodBoolean>;
935
+ extendedProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
936
+ hasConflict: z.ZodOptional<z.ZodBoolean>;
937
+ createdAt: z.ZodDate;
938
+ updatedAt: z.ZodDate;
939
+ }, "strip", z.ZodTypeAny, {
940
+ id: string;
941
+ title: string;
942
+ status: string;
943
+ groupId: string;
944
+ attendee: string;
945
+ startDate: Date;
946
+ endDate: Date;
947
+ createdAt: Date;
948
+ updatedAt: Date;
949
+ color?: string | undefined;
950
+ note?: string | undefined;
951
+ resourceId?: string | null | undefined;
952
+ description?: string | undefined;
953
+ isAllDay?: boolean | undefined;
954
+ extendedProps?: Record<string, unknown> | undefined;
955
+ hasConflict?: boolean | undefined;
956
+ }, {
957
+ id: string;
958
+ title: string;
959
+ status: string;
960
+ groupId: string;
961
+ attendee: string;
962
+ startDate: Date;
963
+ endDate: Date;
964
+ createdAt: Date;
965
+ updatedAt: Date;
966
+ color?: string | undefined;
967
+ note?: string | undefined;
968
+ resourceId?: string | null | undefined;
969
+ description?: string | undefined;
970
+ isAllDay?: boolean | undefined;
971
+ extendedProps?: Record<string, unknown> | undefined;
972
+ hasConflict?: boolean | undefined;
973
+ }>;
974
+
975
+ declare const ScheduleEventSchema_2: z.ZodObject<{
976
+ id: z.ZodString;
977
+ resourceId: z.ZodString;
978
+ groupId: z.ZodString;
979
+ title: z.ZodString;
980
+ attendee: z.ZodString;
981
+ startDate: z.ZodDate;
982
+ endDate: z.ZodDate;
983
+ status: z.ZodString;
984
+ description: z.ZodOptional<z.ZodString>;
985
+ note: z.ZodOptional<z.ZodString>;
986
+ color: z.ZodOptional<z.ZodString>;
987
+ extendedProps: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
988
+ isAllDay: z.ZodOptional<z.ZodBoolean>;
989
+ hasConflict: z.ZodOptional<z.ZodBoolean>;
990
+ createdAt: z.ZodDate;
991
+ updatedAt: z.ZodDate;
992
+ }, "strip", z.ZodTypeAny, {
993
+ id: string;
994
+ title: string;
995
+ status: string;
996
+ resourceId: string;
997
+ groupId: string;
998
+ attendee: string;
999
+ startDate: Date;
1000
+ endDate: Date;
1001
+ createdAt: Date;
1002
+ updatedAt: Date;
1003
+ color?: string | undefined;
1004
+ note?: string | undefined;
1005
+ description?: string | undefined;
1006
+ isAllDay?: boolean | undefined;
1007
+ extendedProps?: Record<string, any> | undefined;
1008
+ hasConflict?: boolean | undefined;
1009
+ }, {
1010
+ id: string;
1011
+ title: string;
1012
+ status: string;
1013
+ resourceId: string;
1014
+ groupId: string;
1015
+ attendee: string;
1016
+ startDate: Date;
1017
+ endDate: Date;
1018
+ createdAt: Date;
1019
+ updatedAt: Date;
1020
+ color?: string | undefined;
1021
+ note?: string | undefined;
1022
+ description?: string | undefined;
1023
+ isAllDay?: boolean | undefined;
1024
+ extendedProps?: Record<string, any> | undefined;
1025
+ hasConflict?: boolean | undefined;
1026
+ }>;
1027
+
1028
+ export declare function ScheduleProvider({ children, apiBaseUrl, apiClient: customApiClient, }: ScheduleProviderProps): JSX.Element;
1029
+
1030
+ export declare interface ScheduleProviderProps {
1031
+ children: ReactNode;
1032
+ /** Base URL for API endpoints (default: '/api') */
1033
+ apiBaseUrl?: string;
1034
+ /** Custom API client for testing or custom implementations */
1035
+ apiClient?: ScheduleApiClient;
1036
+ }
1037
+
1038
+ export declare function SettingsModal({ isOpen, onClose, settings, onUpdateSettings, onResetSettings, }: SettingsModalProps): JSX.Element | null;
1039
+
1040
+ export declare interface SettingsModalProps {
1041
+ isOpen: boolean;
1042
+ onClose: () => void;
1043
+ settings: AppSettings;
1044
+ onUpdateSettings: (partial: Partial<AppSettings>) => void;
1045
+ onResetSettings?: () => void;
1046
+ }
1047
+
1048
+ declare interface SingleDatePickerProps extends DatePickerBaseProps {
1049
+ selectsRange?: false;
1050
+ value?: Date | null;
1051
+ onChange?: (date: Date | null) => void;
1052
+ date?: Date;
1053
+ setDate?: (date: Date | undefined) => void;
1054
+ startDate?: never;
1055
+ endDate?: never;
1056
+ onRangeChange?: never;
1057
+ }
1058
+
1059
+ export declare function sortEventsByTime(events: ScheduleEvent[]): ScheduleEvent[];
1060
+
1061
+ export declare function sortResourcesByOrder(resources: Resource[]): Resource[];
1062
+
1063
+ /**
1064
+ * Storage abstraction for testability
1065
+ *
1066
+ * Provides an interface for storage operations that can be mocked in tests.
1067
+ * This removes direct dependency on browser's localStorage API.
1068
+ */
1069
+ /**
1070
+ * Storage adapter interface
1071
+ */
1072
+ export declare interface StorageAdapter {
1073
+ /**
1074
+ * Retrieve an item from storage
1075
+ * @param key Storage key
1076
+ * @returns The stored value or null if not found
1077
+ */
1078
+ getItem(key: string): string | null;
1079
+ /**
1080
+ * Store an item in storage
1081
+ * @param key Storage key
1082
+ * @param value Value to store
1083
+ */
1084
+ setItem(key: string, value: string): void;
1085
+ /**
1086
+ * Remove an item from storage
1087
+ * @param key Storage key
1088
+ */
1089
+ removeItem(key: string): void;
1090
+ }
1091
+
1092
+ /**
1093
+ * AttendeeInfo配列をJSON文字列に変換
1094
+ */
1095
+ export declare function stringifyAttendees(attendees: AttendeeInfo[]): string;
1096
+
1097
+ /**
1098
+ * テーマ適用インターフェース
1099
+ */
1100
+ export declare interface ThemeApplier {
1101
+ /**
1102
+ * テーマ変数をDOMに適用
1103
+ * @param config テーマ設定
1104
+ */
1105
+ applyVariables(config: ThemeConfig): void;
1106
+ /**
1107
+ * 適用したテーマ変数を削除
1108
+ */
1109
+ removeVariables(): void;
1110
+ }
1111
+
1112
+ /**
1113
+ * Theme configuration options
1114
+ * All size values are in rem unless otherwise specified
1115
+ */
1116
+ export declare interface ThemeConfig {
1117
+ /** UI density preset: 'compact' | 'normal' | 'spacious' */
1118
+ density?: UIDensity;
1119
+ /** Enable tablet mode (optimized for touch) */
1120
+ tabletMode?: boolean;
1121
+ /** Border radius in rem (e.g., 0.5 = 8px) */
1122
+ radius?: number;
1123
+ /** Base font size in rem (e.g., 0.875 = 14px) */
1124
+ fontSize?: number;
1125
+ /** Component height in rem */
1126
+ componentHeight?: number;
1127
+ /** List row height in rem */
1128
+ listRowHeight?: number;
1129
+ /** Horizontal component padding in rem */
1130
+ paddingX?: number;
1131
+ /** Vertical component padding in rem */
1132
+ paddingY?: number;
1133
+ /** Button horizontal padding in rem */
1134
+ buttonPaddingX?: number;
1135
+ /** Button vertical padding in rem */
1136
+ buttonPaddingY?: number;
1137
+ /** Base gap between elements in rem */
1138
+ gap?: number;
1139
+ /** Icon size in rem */
1140
+ iconSize?: number;
1141
+ /** Table cell padding in rem */
1142
+ tableCellPadding?: number;
1143
+ /** Minimum touch target size in px (for accessibility) */
1144
+ touchTargetMin?: number;
1145
+ /** Modal padding in rem */
1146
+ modalPadding?: number;
1147
+ /** Checkbox size in rem */
1148
+ checkboxSize?: number;
1149
+ /** Badge horizontal padding in rem */
1150
+ badgePaddingX?: number;
1151
+ /** Badge vertical padding in rem */
1152
+ badgePaddingY?: number;
1153
+ /** Card padding in rem */
1154
+ cardPadding?: number;
1155
+ /** Left drawer width in px */
1156
+ drawerWidthLeft?: number;
1157
+ /** Right drawer width in px */
1158
+ drawerWidthRight?: number;
1159
+ /** Step circle size in rem */
1160
+ stepCircleSize?: number;
1161
+ /** Switch width in rem */
1162
+ switchWidth?: number;
1163
+ /** Switch height in rem */
1164
+ switchHeight?: number;
1165
+ /** Switch thumb size in rem */
1166
+ switchThumbSize?: number;
1167
+ /** Keypad button height in rem */
1168
+ keypadButtonHeight?: number;
1169
+ }
1170
+
1171
+ /**
1172
+ * ThemeProvider component for customizing UI tokens
1173
+ *
1174
+ * @example
1175
+ * ```tsx
1176
+ * <ThemeProvider config={{
1177
+ * density: 'compact',
1178
+ * radius: 0.5,
1179
+ * fontSize: 0.875,
1180
+ * }}>
1181
+ * <FacilitySchedule ... />
1182
+ * </ThemeProvider>
1183
+ * ```
1184
+ */
1185
+ export declare function ThemeProvider({ config, applier, children, }: ThemeProviderProps): JSX.Element;
1186
+
1187
+ declare interface ThemeProviderProps {
1188
+ /** Theme configuration */
1189
+ config?: ThemeConfig;
1190
+ /** Child components */
1191
+ children: ReactNode;
1192
+ /** Theme applier for DOM operations (injectable for testing) */
1193
+ applier?: ThemeApplier;
1194
+ }
1195
+
1196
+ /**
1197
+ * UI Density presets
1198
+ */
1199
+ export declare type UIDensity = "compact" | "normal" | "spacious";
1200
+
1201
+ /**
1202
+ * Attendee管理フック
1203
+ *
1204
+ * @example
1205
+ * ```tsx
1206
+ * const { parseAttendees, processAttendeesForSubmit } = useAttendeeManagement({
1207
+ * personnel,
1208
+ * currentUserId,
1209
+ * isEditMode: !!event,
1210
+ * });
1211
+ *
1212
+ * // フォーム送信時
1213
+ * const { finalAttendees, shouldDelete } = processAttendeesForSubmit(formData.attendee);
1214
+ * if (shouldDelete) {
1215
+ * onDelete();
1216
+ * } else {
1217
+ * onSubmit({ ...formData, attendee: finalAttendees });
1218
+ * }
1219
+ * ```
1220
+ */
1221
+ export declare function useAttendeeManagement({ personnel, currentUserId, isEditMode, }: UseAttendeeManagementOptions): UseAttendeeManagementResult;
1222
+
1223
+ export declare interface UseAttendeeManagementOptions {
1224
+ /** 人員リスト */
1225
+ personnel: Personnel[];
1226
+ /** 現在のユーザーID */
1227
+ currentUserId?: string;
1228
+ /** 編集モードかどうか */
1229
+ isEditMode: boolean;
1230
+ }
1231
+
1232
+ export declare interface UseAttendeeManagementResult {
1233
+ /** attendee配列をパース */
1234
+ parseAttendees: (str: string) => AttendeeInfo[];
1235
+ /** attendee配列を文字列化 */
1236
+ stringifyAttendees: (attendees: AttendeeInfo[]) => string;
1237
+ /** 送信用にattendeeを処理(自動追加ロジック含む) */
1238
+ processAttendeesForSubmit: (attendeeStr: string) => {
1239
+ finalAttendees: string;
1240
+ shouldDelete: boolean;
1241
+ };
1242
+ }
1243
+
1244
+ /**
1245
+ * リソース可用性を管理するフック
1246
+ *
1247
+ * @example
1248
+ * ```tsx
1249
+ * const { availableResources, resourceNames, getDisplayName } = useResourceAvailability({
1250
+ * resources,
1251
+ * groups,
1252
+ * events,
1253
+ * timeRange: { start, end },
1254
+ * currentEventId: event?.id,
1255
+ * });
1256
+ * ```
1257
+ */
1258
+ export declare function useResourceAvailability({ resources, groups, events, timeRange, currentEventId, externalAvailability, }: UseResourceAvailabilityOptions): UseResourceAvailabilityResult;
1259
+
1260
+ export declare interface UseResourceAvailabilityOptions {
1261
+ /** 全リソースのリスト */
1262
+ resources: Resource[];
1263
+ /** グループ情報 */
1264
+ groups: ResourceGroup[];
1265
+ /** 既存のイベント一覧 */
1266
+ events: ScheduleEvent[];
1267
+ /** チェック対象の時間範囲 */
1268
+ timeRange: {
1269
+ start: Date;
1270
+ end: Date;
1271
+ };
1272
+ /** 編集中のイベントID(競合チェックから除外) */
1273
+ currentEventId?: string;
1274
+ /** 外部から提供されたリソース可用性(オプション) */
1275
+ externalAvailability?: {
1276
+ resourceId: string;
1277
+ isAvailable: boolean;
1278
+ }[];
1279
+ }
1280
+
1281
+ export declare interface UseResourceAvailabilityResult {
1282
+ /** リソース可用性の一覧 */
1283
+ availabilityList: {
1284
+ resourceId: string;
1285
+ isAvailable: boolean;
1286
+ }[];
1287
+ /** 利用可能なリソースの一覧 */
1288
+ availableResources: Resource[];
1289
+ /** グループ名付きリソース名の一覧 */
1290
+ resourceNames: string[];
1291
+ /** リソースIDから表示名を取得 */
1292
+ getDisplayName: (resourceId: string) => string;
1293
+ }
1294
+
1295
+ /**
1296
+ * スケジュール競合をチェックするフック
1297
+ *
1298
+ * @returns 競合がある場合は競合情報、ない場合はnull
1299
+ *
1300
+ * @example
1301
+ * ```tsx
1302
+ * const conflict = useScheduleConflict({
1303
+ * startDate: '2024-01-01T10:00',
1304
+ * duration: 2,
1305
+ * resourceId: 'resource-1',
1306
+ * events,
1307
+ * currentEventId: event?.id,
1308
+ * });
1309
+ *
1310
+ * if (conflict) {
1311
+ * // 競合あり
1312
+ * }
1313
+ * ```
1314
+ */
1315
+ export declare function useScheduleConflict({ startDate, duration, resourceId, events, currentEventId, }: UseScheduleConflictOptions): ConflictInfo | null;
1316
+
1317
+ export declare interface UseScheduleConflictOptions {
1318
+ /** 開始日時(ISO形式文字列) */
1319
+ startDate: string;
1320
+ /** 予定時間(時間単位) */
1321
+ duration: number;
1322
+ /** リソースID */
1323
+ resourceId: string | undefined;
1324
+ /** 既存イベント一覧 */
1325
+ events: ScheduleEvent[];
1326
+ /** 編集中のイベントID(競合チェックから除外) */
1327
+ currentEventId?: string;
1328
+ }
1329
+
1330
+ export declare function useScheduleContext(): ScheduleContextType;
1331
+
1332
+ export declare function useScheduleData({ events, resources, groups, selectedGroupId, }: UseScheduleDataOptions): {
1333
+ effectiveGroupId: string;
1334
+ filteredResources: {
1335
+ name: string;
1336
+ id: string;
1337
+ order: number;
1338
+ groupId: string;
1339
+ createdAt: Date;
1340
+ updatedAt: Date;
1341
+ isAvailable: boolean;
1342
+ deletedAt?: Date | undefined;
1343
+ }[];
1344
+ filteredEvents: {
1345
+ id: string;
1346
+ title: string;
1347
+ status: string;
1348
+ groupId: string;
1349
+ attendee: string;
1350
+ startDate: Date;
1351
+ endDate: Date;
1352
+ createdAt: Date;
1353
+ updatedAt: Date;
1354
+ color?: string | undefined;
1355
+ note?: string | undefined;
1356
+ resourceId?: string | null | undefined;
1357
+ description?: string | undefined;
1358
+ isAllDay?: boolean | undefined;
1359
+ extendedProps?: Record<string, unknown> | undefined;
1360
+ hasConflict?: boolean | undefined;
1361
+ }[];
1362
+ };
1363
+
1364
+ declare interface UseScheduleDataOptions {
1365
+ events: ScheduleEvent[];
1366
+ resources: Resource[];
1367
+ groups: ResourceGroup[];
1368
+ selectedGroupId: string | null;
1369
+ }
1370
+
1371
+ /**
1372
+ * スケジュールイベントハンドラフック
1373
+ *
1374
+ * @example
1375
+ * ```tsx
1376
+ * const {
1377
+ * isModalOpen,
1378
+ * selectedEvent,
1379
+ * newInfo,
1380
+ * handleEventClick,
1381
+ * handleEmptySlotClick,
1382
+ * handleModalSave,
1383
+ * handleModalClose,
1384
+ * } = useScheduleEventHandlers({
1385
+ * onEventCreate,
1386
+ * onEventUpdate,
1387
+ * onEventDelete,
1388
+ * });
1389
+ * ```
1390
+ */
1391
+ export declare function useScheduleEventHandlers({ onEventCreate, onEventUpdate, onEventDelete, onDateChange, onViewChange, }: UseScheduleEventHandlersOptions): UseScheduleEventHandlersResult;
1392
+
1393
+ export declare interface UseScheduleEventHandlersOptions {
1394
+ onEventCreate?: (data: EventFormData) => void;
1395
+ onEventUpdate?: (id: string, data: EventFormData) => void;
1396
+ onEventDelete?: (id: string) => void;
1397
+ onDateChange?: (date: Date) => void;
1398
+ onViewChange?: (view: "day" | "week" | "month") => void;
1399
+ }
1400
+
1401
+ export declare interface UseScheduleEventHandlersResult {
1402
+ isModalOpen: boolean;
1403
+ selectedEvent: ScheduleEvent | undefined;
1404
+ newInfo: {
1405
+ resourceId?: string;
1406
+ startTime?: Date;
1407
+ };
1408
+ handleEventClick: (event: ScheduleEvent) => void;
1409
+ handleEmptySlotClick: (resourceId: string | null, startTime: Date) => void;
1410
+ handleDayClick: (date: Date) => void;
1411
+ handleModalSave: (data: EventFormData) => void;
1412
+ handleModalDelete: (eventId: string) => void;
1413
+ handleModalClose: () => void;
1414
+ }
1415
+
1416
+ export declare function useScheduleView({ defaultView, defaultDate, defaultGroupId, enablePersistence, storageKey, storage, onDateChange, onViewChange, onGroupChange, }: UseScheduleViewOptions): {
1417
+ currentDate: Date;
1418
+ viewMode: "day" | "week" | "month";
1419
+ selectedGroupId: string | null;
1420
+ setDate: (date: Date) => void;
1421
+ setViewMode: (mode: ViewMode) => void;
1422
+ setSelectedGroupId: (groupId: string | null) => void;
1423
+ navigate: (direction: "prev" | "next") => void;
1424
+ goToToday: () => void;
1425
+ };
1426
+
1427
+ declare interface UseScheduleViewOptions {
1428
+ defaultView?: ViewMode;
1429
+ defaultDate?: Date;
1430
+ defaultGroupId?: string | null;
1431
+ enablePersistence?: boolean;
1432
+ storageKey?: string;
1433
+ storage?: StorageAdapter;
1434
+ onDateChange?: (date: Date) => void;
1435
+ onViewChange?: (view: ViewMode) => void;
1436
+ onGroupChange?: (groupId: string | null) => void;
1437
+ }
1438
+
1439
+ export declare function useSettings(options?: UseSettingsOptions): {
1440
+ settings: AppSettings;
1441
+ updateSettings: (partial: Partial<AppSettings>) => void;
1442
+ resetSettings: () => void;
1443
+ };
1444
+
1445
+ export declare interface UseSettingsOptions {
1446
+ /** Custom storage key for localStorage */
1447
+ storageKey?: string;
1448
+ /** Storage adapter for persistence */
1449
+ storage?: StorageAdapter;
1450
+ /** Callback to handle language changes (e.g., i18n.changeLanguage) */
1451
+ onLanguageChange?: (language: string) => void;
1452
+ }
1453
+
1454
+ /**
1455
+ * Hook to access current theme configuration
1456
+ */
1457
+ export declare function useTheme(): ThemeConfig | undefined;
1458
+
1459
+ declare type ViewMode = z.infer<typeof ViewModeSchema>;
1460
+
1461
+ declare type ViewMode_2 = z.infer<typeof ViewModeSchema_2>;
1462
+
1463
+ declare const ViewModeSchema: z.ZodEnum<["day", "week", "month"]>;
1464
+
1465
+ declare const ViewModeSchema_2: z.ZodEnum<["day", "week", "month"]>;
1466
+
1467
+ export { }