@burdenoff/microfe-calendar 2026.1123.2 → 2026.1124.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/dist/components/AgendaView.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +596 -0
- package/dist/generated/wspace-operations.js +190 -85
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/translations/en.d.ts +292 -0
- package/dist/v2/CalendarPageV2.js +87 -14
- package/dist/v2/CalendarPageV2.js.map +1 -1
- package/dist/v2/colors.d.ts +23 -0
- package/dist/v2/colors.js +92 -0
- package/dist/v2/colors.js.map +1 -0
- package/dist/v2/data/enums.d.ts +6 -0
- package/dist/v2/data/enums.js +10 -0
- package/dist/v2/data/enums.js.map +1 -0
- package/dist/v2/data/errors.d.ts +4 -0
- package/dist/v2/data/errors.js +17 -0
- package/dist/v2/data/errors.js.map +1 -0
- package/dist/v2/data/invalidation.js +19 -0
- package/dist/v2/data/invalidation.js.map +1 -0
- package/dist/v2/data/normalize.js +181 -16
- package/dist/v2/data/normalize.js.map +1 -1
- package/dist/v2/data/serialWrites.d.ts +17 -0
- package/dist/v2/data/serialWrites.js +21 -0
- package/dist/v2/data/serialWrites.js.map +1 -0
- package/dist/v2/data/useCalendarsV2.d.ts +10 -1
- package/dist/v2/data/useCalendarsV2.js +68 -16
- package/dist/v2/data/useCalendarsV2.js.map +1 -1
- package/dist/v2/data/useEventActions.d.ts +49 -0
- package/dist/v2/data/useEventActions.js +399 -0
- package/dist/v2/data/useEventActions.js.map +1 -0
- package/dist/v2/data/useEventForPeek.d.ts +17 -0
- package/dist/v2/data/useEventForPeek.js +29 -0
- package/dist/v2/data/useEventForPeek.js.map +1 -0
- package/dist/v2/data/useEventSearchV2.d.ts +15 -0
- package/dist/v2/data/useEventSearchV2.js +80 -0
- package/dist/v2/data/useEventSearchV2.js.map +1 -0
- package/dist/v2/data/useEventsInRangeV2.js +78 -0
- package/dist/v2/data/useEventsInRangeV2.js.map +1 -0
- package/dist/v2/data/useFreeBusy.d.ts +5 -0
- package/dist/v2/data/useFreeBusy.js +83 -0
- package/dist/v2/data/useFreeBusy.js.map +1 -0
- package/dist/v2/data/useKeyedLoad.js +47 -0
- package/dist/v2/data/useKeyedLoad.js.map +1 -0
- package/dist/v2/data/useRoomsV2.d.ts +28 -0
- package/dist/v2/data/useRoomsV2.js +45 -0
- package/dist/v2/data/useRoomsV2.js.map +1 -0
- package/dist/v2/day/DayPanel.d.ts +6 -0
- package/dist/v2/day/DayPanel.js +215 -0
- package/dist/v2/day/DayPanel.js.map +1 -0
- package/dist/v2/day/daySummary.d.ts +37 -0
- package/dist/v2/day/daySummary.js +37 -0
- package/dist/v2/day/daySummary.js.map +1 -0
- package/dist/v2/dialogs/CalendarDialogsV2.d.ts +1 -0
- package/dist/v2/dialogs/CalendarDialogsV2.js +17 -0
- package/dist/v2/dialogs/CalendarDialogsV2.js.map +1 -0
- package/dist/v2/dialogs/ShortcutsDialog.d.ts +4 -0
- package/dist/v2/dialogs/ShortcutsDialog.js +42 -0
- package/dist/v2/dialogs/ShortcutsDialog.js.map +1 -0
- package/dist/v2/events/eventLook.d.ts +46 -0
- package/dist/v2/events/eventLook.js +35 -0
- package/dist/v2/events/eventLook.js.map +1 -0
- package/dist/v2/events/eventModel.d.ts +92 -0
- package/dist/v2/events/eventModel.js +116 -0
- package/dist/v2/events/eventModel.js.map +1 -0
- package/dist/v2/events/localChanges.d.ts +4 -0
- package/dist/v2/events/localChanges.js +23 -0
- package/dist/v2/events/localChanges.js.map +1 -0
- package/dist/v2/format.d.ts +67 -0
- package/dist/v2/format.js +112 -0
- package/dist/v2/format.js.map +1 -0
- package/dist/v2/grid/AllDayRow.d.ts +20 -0
- package/dist/v2/grid/AllDayRow.js +94 -0
- package/dist/v2/grid/AllDayRow.js.map +1 -0
- package/dist/v2/grid/EventBlock.d.ts +21 -0
- package/dist/v2/grid/EventBlock.js +112 -0
- package/dist/v2/grid/EventBlock.js.map +1 -0
- package/dist/v2/grid/GridParts.d.ts +40 -0
- package/dist/v2/grid/GridParts.js +204 -0
- package/dist/v2/grid/GridParts.js.map +1 -0
- package/dist/v2/grid/QuickCreate.d.ts +1 -0
- package/dist/v2/grid/QuickCreate.js +175 -0
- package/dist/v2/grid/QuickCreate.js.map +1 -0
- package/dist/v2/grid/TimeGrid.d.ts +1 -0
- package/dist/v2/grid/TimeGrid.js +179 -0
- package/dist/v2/grid/TimeGrid.js.map +1 -0
- package/dist/v2/grid/geometry.d.ts +72 -0
- package/dist/v2/grid/geometry.js +85 -0
- package/dist/v2/grid/geometry.js.map +1 -0
- package/dist/v2/grid/layout.d.ts +24 -0
- package/dist/v2/grid/layout.js +77 -0
- package/dist/v2/grid/layout.js.map +1 -0
- package/dist/v2/grid/useGridDrag.d.ts +42 -0
- package/dist/v2/grid/useGridDrag.js +181 -0
- package/dist/v2/grid/useGridDrag.js.map +1 -0
- package/dist/v2/grid/useSlotCursor.d.ts +32 -0
- package/dist/v2/grid/useSlotCursor.js +57 -0
- package/dist/v2/grid/useSlotCursor.js.map +1 -0
- package/dist/v2/grid/workingHours.d.ts +21 -0
- package/dist/v2/grid/workingHours.js +101 -0
- package/dist/v2/grid/workingHours.js.map +1 -0
- package/dist/v2/hooks/useAvailableHeight.d.ts +2 -0
- package/dist/v2/hooks/useAvailableHeight.js +25 -0
- package/dist/v2/hooks/useAvailableHeight.js.map +1 -0
- package/dist/v2/hooks/useCalendarShortcuts.d.ts +9 -0
- package/dist/v2/hooks/useCalendarShortcuts.js +60 -0
- package/dist/v2/hooks/useCalendarShortcuts.js.map +1 -0
- package/dist/v2/hooks/useDebouncedValue.d.ts +1 -0
- package/dist/v2/hooks/useDebouncedValue.js +12 -0
- package/dist/v2/hooks/useDebouncedValue.js.map +1 -0
- package/dist/v2/hooks/useMediaQuery.d.ts +5 -0
- package/dist/v2/hooks/useMediaQuery.js +17 -0
- package/dist/v2/hooks/useMediaQuery.js.map +1 -0
- package/dist/v2/hooks/useNow.d.ts +2 -0
- package/dist/v2/hooks/useNow.js +31 -0
- package/dist/v2/hooks/useNow.js.map +1 -0
- package/dist/v2/limits.d.ts +6 -0
- package/dist/v2/limits.js +5 -0
- package/dist/v2/limits.js.map +1 -0
- package/dist/v2/list/EventListRow.d.ts +10 -0
- package/dist/v2/list/EventListRow.js +109 -0
- package/dist/v2/list/EventListRow.js.map +1 -0
- package/dist/v2/list/ListViewV2.d.ts +12 -0
- package/dist/v2/list/ListViewV2.js +90 -0
- package/dist/v2/list/ListViewV2.js.map +1 -0
- package/dist/v2/month/MonthView.d.ts +1 -0
- package/dist/v2/month/MonthView.js +324 -0
- package/dist/v2/month/MonthView.js.map +1 -0
- package/dist/v2/month/monthLayout.d.ts +39 -0
- package/dist/v2/month/monthLayout.js +29 -0
- package/dist/v2/month/monthLayout.js.map +1 -0
- package/dist/v2/page/CalendarChrome.d.ts +2 -0
- package/dist/v2/page/CalendarChrome.js +295 -0
- package/dist/v2/page/CalendarChrome.js.map +1 -0
- package/dist/v2/page/CalendarPageContext.d.ts +92 -0
- package/dist/v2/page/CalendarPageContext.js +11 -0
- package/dist/v2/page/CalendarPageContext.js.map +1 -0
- package/dist/v2/page/pageHelpers.d.ts +19 -0
- package/dist/v2/page/pageHelpers.js +39 -0
- package/dist/v2/page/pageHelpers.js.map +1 -0
- package/dist/v2/page/useCalendarPageModel.d.ts +2 -0
- package/dist/v2/page/useCalendarPageModel.js +198 -0
- package/dist/v2/page/useCalendarPageModel.js.map +1 -0
- package/dist/v2/page/viewState.d.ts +70 -0
- package/dist/v2/page/viewState.js +47 -0
- package/dist/v2/page/viewState.js.map +1 -0
- package/dist/v2/peek/EventPeek.d.ts +2 -0
- package/dist/v2/peek/EventPeek.js +92 -0
- package/dist/v2/peek/EventPeek.js.map +1 -0
- package/dist/v2/peek/PeekEvent.d.ts +4 -0
- package/dist/v2/peek/PeekEvent.js +443 -0
- package/dist/v2/peek/PeekEvent.js.map +1 -0
- package/dist/v2/peek/PeekParts.d.ts +14 -0
- package/dist/v2/peek/PeekParts.js +75 -0
- package/dist/v2/peek/PeekParts.js.map +1 -0
- package/dist/v2/prefs/calendarPrefs.d.ts +2 -2
- package/dist/v2/prefs/calendarPrefs.js +35 -34
- package/dist/v2/prefs/calendarPrefs.js.map +1 -1
- package/dist/v2/rail/CalendarRail.d.ts +3 -0
- package/dist/v2/rail/CalendarRail.js +284 -0
- package/dist/v2/rail/CalendarRail.js.map +1 -0
- package/dist/v2/rail/railStatus.d.ts +54 -0
- package/dist/v2/rail/railStatus.js +84 -0
- package/dist/v2/rail/railStatus.js.map +1 -0
- package/dist/v2/rail/syncWords.d.ts +10 -0
- package/dist/v2/rail/syncWords.js +75 -0
- package/dist/v2/rail/syncWords.js.map +1 -0
- package/dist/v2/rail/useMonthEventDates.d.ts +4 -0
- package/dist/v2/rail/useMonthEventDates.js +30 -0
- package/dist/v2/rail/useMonthEventDates.js.map +1 -0
- package/dist/v2/routes.js +4 -1
- package/dist/v2/routes.js.map +1 -1
- package/dist/v2/search/SearchResults.d.ts +1 -0
- package/dist/v2/search/SearchResults.js +88 -0
- package/dist/v2/search/SearchResults.js.map +1 -0
- package/dist/v2/search/searchModel.d.ts +20 -0
- package/dist/v2/search/searchModel.js +22 -0
- package/dist/v2/search/searchModel.js.map +1 -0
- package/dist/v2/state/calendarV2Store.d.ts +4 -1
- package/dist/v2/state/calendarV2Store.js +3 -1
- package/dist/v2/state/calendarV2Store.js.map +1 -1
- package/dist/v2/state/useCalendarV2Navigation.d.ts +1 -0
- package/dist/v2/state/useCalendarV2Navigation.js +4 -1
- package/dist/v2/state/useCalendarV2Navigation.js.map +1 -1
- package/dist/v2/states/CalendarStates.d.ts +18 -0
- package/dist/v2/states/CalendarStates.js +122 -0
- package/dist/v2/states/CalendarStates.js.map +1 -0
- package/dist/v2/styles.d.ts +32 -0
- package/dist/v2/styles.js +10 -0
- package/dist/v2/styles.js.map +1 -0
- package/dist/v2/time/calendarTime.js +121 -35
- package/dist/v2/time/calendarTime.js.map +1 -1
- package/dist/v2/types.d.ts +22 -2
- package/package.json +1 -1
|
@@ -338,9 +338,301 @@ export declare const enTranslations: {
|
|
|
338
338
|
unknownShareTarget: string;
|
|
339
339
|
updateEvent: string;
|
|
340
340
|
v2: {
|
|
341
|
+
aCalendar: string;
|
|
342
|
+
actionForbidden: string;
|
|
343
|
+
actionGone: string;
|
|
344
|
+
actionRetry: string;
|
|
345
|
+
add: string;
|
|
346
|
+
addCalendar: string;
|
|
347
|
+
addInGap: string;
|
|
348
|
+
addOnDay: string;
|
|
349
|
+
addTitle: string;
|
|
350
|
+
allDay: string;
|
|
351
|
+
allDayLower: string;
|
|
352
|
+
allDayOf: string;
|
|
353
|
+
allDayUntil: string;
|
|
354
|
+
allHidden: string;
|
|
355
|
+
allHiddenBody: string;
|
|
356
|
+
alsoShow: string;
|
|
357
|
+
andMore: string;
|
|
358
|
+
answeredMaybe: string;
|
|
359
|
+
answeredNo: string;
|
|
360
|
+
answeredYes: string;
|
|
361
|
+
answerFailed: string;
|
|
362
|
+
answerUndone: string;
|
|
363
|
+
busy: string;
|
|
364
|
+
busyOnlyLabel: string;
|
|
365
|
+
calendars: string;
|
|
366
|
+
calendarsAndRooms: string;
|
|
367
|
+
calendarSettings: string;
|
|
368
|
+
calendarsFailed: string;
|
|
369
|
+
calendarsShown: string;
|
|
370
|
+
calendarsShownOne: string;
|
|
371
|
+
channelEmail: string;
|
|
372
|
+
channelInApp: string;
|
|
373
|
+
channelSms: string;
|
|
374
|
+
checked: string;
|
|
375
|
+
checkFailed: string;
|
|
376
|
+
checkNow: string;
|
|
377
|
+
checkNowShort: string;
|
|
378
|
+
clearSearch: string;
|
|
379
|
+
close: string;
|
|
380
|
+
copyEventLink: string;
|
|
381
|
+
copyFailed: string;
|
|
382
|
+
copyMeetingLink: string;
|
|
383
|
+
copyRemoved: string;
|
|
384
|
+
countGoing: string;
|
|
385
|
+
countMaybe: string;
|
|
386
|
+
countNotGoing: string;
|
|
387
|
+
countWaiting: string;
|
|
388
|
+
created: string;
|
|
389
|
+
createFailed: string;
|
|
390
|
+
createUndone: string;
|
|
391
|
+
day: string;
|
|
392
|
+
dayColumn: string;
|
|
393
|
+
dayEvents: string;
|
|
394
|
+
declinedHidden: string;
|
|
395
|
+
delete: string;
|
|
396
|
+
deleted: string;
|
|
397
|
+
deletedSeries: string;
|
|
398
|
+
deletedTellMany: string;
|
|
399
|
+
deletedTellOne: string;
|
|
400
|
+
deleteFailed: string;
|
|
401
|
+
deleteSeries: string;
|
|
402
|
+
deleteSeriesBody: string;
|
|
403
|
+
deleteSeriesMenu: string;
|
|
404
|
+
deleteSeriesTitle: string;
|
|
405
|
+
downloadEvent: string;
|
|
406
|
+
downloadIcs: string;
|
|
407
|
+
draft: string;
|
|
408
|
+
duplicate: string;
|
|
409
|
+
duplicated: string;
|
|
410
|
+
duplicatedHint: string;
|
|
411
|
+
duplicateFailed: string;
|
|
412
|
+
durationHours: string;
|
|
413
|
+
durationHoursMinutes: string;
|
|
414
|
+
durationMinutes: string;
|
|
415
|
+
edit: string;
|
|
416
|
+
editLocked: string;
|
|
417
|
+
emptyDays: string;
|
|
418
|
+
emptyDaysDesktop: string;
|
|
419
|
+
emptyDaysPhone: string;
|
|
420
|
+
emptyList: string;
|
|
421
|
+
emptyListBody: string;
|
|
422
|
+
eventsFailed: string;
|
|
423
|
+
eventTitle: string;
|
|
424
|
+
everyDay: string;
|
|
425
|
+
everyHour: string;
|
|
426
|
+
failedBody: string;
|
|
427
|
+
findBetterTime: string;
|
|
428
|
+
findTime: string;
|
|
429
|
+
firstOccurrenceNote: string;
|
|
430
|
+
freeLeftToday: string;
|
|
431
|
+
freeTime: string;
|
|
432
|
+
fromTo: string;
|
|
433
|
+
going: string;
|
|
434
|
+
goingQuestion: string;
|
|
435
|
+
gridLabel: string;
|
|
436
|
+
guest: string;
|
|
437
|
+
hideMessage: string;
|
|
438
|
+
hideRail: string;
|
|
439
|
+
hoursFailed: string;
|
|
440
|
+
hoursLoading: string;
|
|
441
|
+
icsFailed: string;
|
|
442
|
+
importIcs: string;
|
|
443
|
+
inItsZone: string;
|
|
444
|
+
inTime: string;
|
|
445
|
+
join: string;
|
|
446
|
+
joinCall: string;
|
|
447
|
+
joinTitle: string;
|
|
448
|
+
keep: string;
|
|
449
|
+
keyArrowsGrid: string;
|
|
450
|
+
keyArrowsGridDo: string;
|
|
451
|
+
keyDelete: string;
|
|
452
|
+
keyDeleteDo: string;
|
|
453
|
+
keyEscape: string;
|
|
454
|
+
keyEscapeDo: string;
|
|
455
|
+
keyHelp: string;
|
|
456
|
+
keyNew: string;
|
|
457
|
+
keyPeriods: string;
|
|
458
|
+
keySearch: string;
|
|
459
|
+
keyShiftArrows: string;
|
|
460
|
+
keyShiftArrowsDo: string;
|
|
461
|
+
keyTabEvents: string;
|
|
462
|
+
keyTabEventsDo: string;
|
|
463
|
+
keyToday: string;
|
|
464
|
+
keyViews: string;
|
|
465
|
+
kindProject: string;
|
|
466
|
+
kindTeam: string;
|
|
467
|
+
kindWorkspace: string;
|
|
468
|
+
kindYours: string;
|
|
469
|
+
linkCopied: string;
|
|
470
|
+
linkPersonal: string;
|
|
471
|
+
linkWorkspace: string;
|
|
472
|
+
list: string;
|
|
473
|
+
listLabel: string;
|
|
474
|
+
loadingRooms: string;
|
|
475
|
+
lockedFollowed: string;
|
|
476
|
+
lockedOrganiser: string;
|
|
477
|
+
markerDeclined: string;
|
|
478
|
+
markerInvitation: string;
|
|
479
|
+
markerMaybe: string;
|
|
480
|
+
markerNow: string;
|
|
481
|
+
markerRepeats: string;
|
|
482
|
+
markerRoomPending: string;
|
|
483
|
+
markerRoomRefused: string;
|
|
484
|
+
matchMany: string;
|
|
485
|
+
matchOne: string;
|
|
486
|
+
matchQuery: string;
|
|
487
|
+
matchTruncated: string;
|
|
488
|
+
maybe: string;
|
|
489
|
+
meetingLinkCopied: string;
|
|
490
|
+
month: string;
|
|
491
|
+
moreActions: string;
|
|
492
|
+
moreCount: string;
|
|
493
|
+
moreForEvent: string;
|
|
494
|
+
moreOptions: string;
|
|
495
|
+
moveBackFailed: string;
|
|
496
|
+
moved: string;
|
|
497
|
+
movedBack: string;
|
|
498
|
+
moveFailed: string;
|
|
499
|
+
myCalendars: string;
|
|
500
|
+
newCalendar: string;
|
|
501
|
+
newEvent: string;
|
|
502
|
+
newEventTitle: string;
|
|
503
|
+
next: string;
|
|
504
|
+
no: string;
|
|
505
|
+
noCalendars: string;
|
|
506
|
+
noFreeTime: string;
|
|
507
|
+
noResults: string;
|
|
508
|
+
noResultsBody: string;
|
|
509
|
+
noResultsHidden: string;
|
|
510
|
+
noRooms: string;
|
|
511
|
+
notAnswered: string;
|
|
512
|
+
notGoing: string;
|
|
513
|
+
nothingThisDay: string;
|
|
514
|
+
now: string;
|
|
515
|
+
nowEnds: string;
|
|
516
|
+
noWritableCalendar: string;
|
|
517
|
+
openDay: string;
|
|
518
|
+
openDayShort: string;
|
|
341
519
|
openingCalendar: string;
|
|
342
520
|
openingEvent: string;
|
|
521
|
+
optionsFor: string;
|
|
522
|
+
organisedBy: string;
|
|
523
|
+
organiser: string;
|
|
524
|
+
otherCalendars: string;
|
|
525
|
+
otherEmpty: string;
|
|
526
|
+
partialMany: string;
|
|
527
|
+
partialNames: string;
|
|
528
|
+
partialNothing: string;
|
|
529
|
+
partialOne: string;
|
|
530
|
+
peekFailed: string;
|
|
531
|
+
peekFailedBody: string;
|
|
532
|
+
peekLoading: string;
|
|
533
|
+
peekMissing: string;
|
|
534
|
+
peekMissingBody: string;
|
|
535
|
+
peopleMany: string;
|
|
536
|
+
peopleOne: string;
|
|
537
|
+
pickCalendar: string;
|
|
538
|
+
previous: string;
|
|
539
|
+
private: string;
|
|
540
|
+
privateDetails: string;
|
|
541
|
+
purpose: string;
|
|
542
|
+
readOnlyNote: string;
|
|
543
|
+
reminderAtStart: string;
|
|
544
|
+
reminderBefore: string;
|
|
545
|
+
reminderMissed: string;
|
|
546
|
+
repeats: string;
|
|
547
|
+
resized: string;
|
|
548
|
+
resizeFailed: string;
|
|
549
|
+
restored: string;
|
|
550
|
+
restoreFailed: string;
|
|
551
|
+
roomBusyUntil: string;
|
|
552
|
+
roomFreeAllDay: string;
|
|
553
|
+
roomFreeUntil: string;
|
|
554
|
+
roomPaused: string;
|
|
555
|
+
roomPending: string;
|
|
556
|
+
roomPendingBody: string;
|
|
557
|
+
roomRefused: string;
|
|
558
|
+
roomRefusedBody: string;
|
|
559
|
+
roomRefusedTitle: string;
|
|
560
|
+
rooms: string;
|
|
561
|
+
roomsFailed: string;
|
|
562
|
+
roomsNow: string;
|
|
563
|
+
roomsResources: string;
|
|
564
|
+
save: string;
|
|
565
|
+
search: string;
|
|
566
|
+
searchEvents: string;
|
|
567
|
+
searchFailed: string;
|
|
568
|
+
searching: string;
|
|
569
|
+
searchResults: string;
|
|
570
|
+
searchTooShort: string;
|
|
571
|
+
seats: string;
|
|
572
|
+
seeAll: string;
|
|
573
|
+
seeRooms: string;
|
|
574
|
+
sharedWithYou: string;
|
|
575
|
+
shareMenu: string;
|
|
576
|
+
shortcuts: string;
|
|
577
|
+
shortcutsBody: string;
|
|
578
|
+
showAll: string;
|
|
579
|
+
showOnly: string;
|
|
580
|
+
showRail: string;
|
|
581
|
+
startsNow: string;
|
|
582
|
+
statBooked: string;
|
|
583
|
+
statFree: string;
|
|
584
|
+
statMeetings: string;
|
|
585
|
+
subscribeShare: string;
|
|
586
|
+
syncedGoogle: string;
|
|
587
|
+
syncedOutlook: string;
|
|
588
|
+
syncLinkGone: string;
|
|
589
|
+
syncNeedsSignIn: string;
|
|
590
|
+
syncNotCalendar: string;
|
|
591
|
+
syncOther: string;
|
|
592
|
+
syncPaused: string;
|
|
593
|
+
syncRetrying: string;
|
|
594
|
+
syncRetryingAt: string;
|
|
595
|
+
syncSlow: string;
|
|
596
|
+
syncStopped: string;
|
|
597
|
+
syncStoppedBody: string;
|
|
598
|
+
syncStoppedTitle: string;
|
|
599
|
+
syncTooLarge: string;
|
|
600
|
+
syncUnreachable: string;
|
|
601
|
+
theOrganiser: string;
|
|
602
|
+
theRoom: string;
|
|
603
|
+
threeDays: string;
|
|
604
|
+
timeZoneButton: string;
|
|
343
605
|
title: string;
|
|
606
|
+
toAnswer: string;
|
|
607
|
+
toAnswerTitle: string;
|
|
608
|
+
today: string;
|
|
609
|
+
todayKey: string;
|
|
610
|
+
tomorrow: string;
|
|
611
|
+
tryAgain: string;
|
|
612
|
+
unitDay: string;
|
|
613
|
+
unitList: string;
|
|
614
|
+
unitMonth: string;
|
|
615
|
+
unitThreeDays: string;
|
|
616
|
+
unitWeek: string;
|
|
617
|
+
until: string;
|
|
618
|
+
untitled: string;
|
|
619
|
+
upNext: string;
|
|
620
|
+
videoCall: string;
|
|
621
|
+
view: string;
|
|
622
|
+
waitingForReply: string;
|
|
623
|
+
waitingReply: string;
|
|
624
|
+
week: string;
|
|
625
|
+
whenAllDay: string;
|
|
626
|
+
whenAllDays: string;
|
|
627
|
+
workflowRuns: string;
|
|
628
|
+
workflowRunsSoon: string;
|
|
629
|
+
yes: string;
|
|
630
|
+
yesterday: string;
|
|
631
|
+
youOrganise: string;
|
|
632
|
+
youOrganiseThis: string;
|
|
633
|
+
yourAnswer: string;
|
|
634
|
+
yourDay: string;
|
|
635
|
+
youSuffix: string;
|
|
344
636
|
};
|
|
345
637
|
vehicle: string;
|
|
346
638
|
videoCall: string;
|
|
@@ -1,19 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { CalendarDialogsV2 as e } from "./dialogs/CalendarDialogsV2.js";
|
|
2
|
+
import { DayPanel as t } from "./day/DayPanel.js";
|
|
3
|
+
import { QuickCreateHost as n } from "./grid/QuickCreate.js";
|
|
4
|
+
import { TimeGrid as r } from "./grid/TimeGrid.js";
|
|
5
|
+
import { useAvailableHeight as i } from "./hooks/useAvailableHeight.js";
|
|
6
|
+
import { useCalendarShortcuts as a } from "./hooks/useCalendarShortcuts.js";
|
|
7
|
+
import { ListViewV2 as o } from "./list/ListViewV2.js";
|
|
8
|
+
import { MonthView as s } from "./month/MonthView.js";
|
|
9
|
+
import { CalendarHeaderV2 as c, CalendarToolbarV2 as l } from "./page/CalendarChrome.js";
|
|
10
|
+
import { CalendarPageContext as u, useCalendarPage as d } from "./page/CalendarPageContext.js";
|
|
11
|
+
import { useCalendarPageModel as f } from "./page/useCalendarPageModel.js";
|
|
12
|
+
import { EventPeekHost as p } from "./peek/EventPeek.js";
|
|
13
|
+
import { CalendarRail as m, RailSheet as h } from "./rail/CalendarRail.js";
|
|
14
|
+
import { SearchResults as g } from "./search/SearchResults.js";
|
|
15
|
+
import { useCalendarV2Store as _ } from "./state/calendarV2Store.js";
|
|
16
|
+
import { AllHiddenState as v, LoadErrorState as y, PartialFailureNotice as b, SyncStoppedNotices as x } from "./states/CalendarStates.js";
|
|
17
|
+
import { useRef as S } from "react";
|
|
18
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
19
|
+
import { WorkspacePage as E } from "@burdenoff/fe-libs/ui";
|
|
4
20
|
// src/v2/CalendarPageV2.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
var D = 420;
|
|
22
|
+
function O() {
|
|
23
|
+
let t = f();
|
|
24
|
+
return a(t), /* @__PURE__ */ T(u, {
|
|
25
|
+
value: t,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ w("div", {
|
|
28
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col bg-bg-canvas",
|
|
29
|
+
"data-calendar-view": t.nav.view,
|
|
30
|
+
"data-calendar-date": t.nav.date,
|
|
31
|
+
children: /* @__PURE__ */ T(E, {
|
|
32
|
+
className: "pb-0 max-md:pb-0",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ w(c, {}),
|
|
35
|
+
/* @__PURE__ */ w(l, {}),
|
|
36
|
+
/* @__PURE__ */ w(k, {})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ w(p, {}),
|
|
41
|
+
/* @__PURE__ */ w(n, {}),
|
|
42
|
+
/* @__PURE__ */ w(h, {}),
|
|
43
|
+
/* @__PURE__ */ w(e, {})
|
|
44
|
+
]
|
|
15
45
|
});
|
|
16
46
|
}
|
|
17
|
-
|
|
47
|
+
function k() {
|
|
48
|
+
let e = d(), t = S(null), n = i(t, D), r = _((e) => e.railOpen), a = !e.compact && r;
|
|
49
|
+
return /* @__PURE__ */ T("div", {
|
|
50
|
+
ref: t,
|
|
51
|
+
className: "flex min-h-0 gap-3.5",
|
|
52
|
+
style: {
|
|
53
|
+
height: n ?? void 0,
|
|
54
|
+
minHeight: D
|
|
55
|
+
},
|
|
56
|
+
children: [a ? /* @__PURE__ */ w("aside", {
|
|
57
|
+
id: "calendar-v2-rail",
|
|
58
|
+
"aria-label": e.tr("calendar.v2.calendars", "Calendars"),
|
|
59
|
+
className: "w-[232px] shrink-0 overflow-y-auto pe-1 max-lg:w-[208px]",
|
|
60
|
+
children: /* @__PURE__ */ w(m, {})
|
|
61
|
+
}) : null, /* @__PURE__ */ w("div", {
|
|
62
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col gap-2.5",
|
|
63
|
+
children: /* @__PURE__ */ w(A, {})
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function A() {
|
|
68
|
+
let e = d();
|
|
69
|
+
if (_((e) => e.search).trim() !== "") return /* @__PURE__ */ w(g, {});
|
|
70
|
+
let { state: n } = e;
|
|
71
|
+
if (n.kind === "error") return /* @__PURE__ */ w(y, {
|
|
72
|
+
failed: n.failed,
|
|
73
|
+
error: n.failed === "events" ? e.eventsError : e.calendarsError,
|
|
74
|
+
onRetry: n.failed === "calendars" ? e.refetchCalendars : e.refetchEvents
|
|
75
|
+
});
|
|
76
|
+
if (n.kind === "all-hidden") return /* @__PURE__ */ w(v, {});
|
|
77
|
+
let i = e.nav.view === "month" ? /* @__PURE__ */ w(s, {}) : e.nav.view === "list" ? /* @__PURE__ */ w(o, {}) : e.nav.view === "day" && !e.compact ? /* @__PURE__ */ T("div", {
|
|
78
|
+
className: "flex min-h-0 flex-1 gap-3.5",
|
|
79
|
+
children: [/* @__PURE__ */ w(r, {}), /* @__PURE__ */ w(t, {})]
|
|
80
|
+
}) : /* @__PURE__ */ w(r, {});
|
|
81
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
82
|
+
/* @__PURE__ */ w(x, {}),
|
|
83
|
+
n.kind === "ready" ? /* @__PURE__ */ w(b, {
|
|
84
|
+
calendarIds: n.failedCalendarIds,
|
|
85
|
+
onRetry: e.refetchEvents
|
|
86
|
+
}) : null,
|
|
87
|
+
i
|
|
88
|
+
] });
|
|
89
|
+
}
|
|
90
|
+
export { O as CalendarPageV2 };
|
|
18
91
|
|
|
19
92
|
//# sourceMappingURL=CalendarPageV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarPageV2.js","names":["CalendarPageV2","
|
|
1
|
+
{"version":3,"file":"CalendarPageV2.js","names":["_Fragment","MIN_BODY_HEIGHT","CalendarPageV2","model","useCalendarPageModel","useCalendarShortcuts","CalendarPageContext","WorkspacePage","CalendarHeaderV2","CalendarToolbarV2","CalendarBody","EventPeekHost","QuickCreateHost","RailSheet","CalendarDialogsV2","page","useCalendarPage","bodyRef","useRef","height","useAvailableHeight","railOpen","useCalendarV2Store","state","showRail","CalendarRail","MainArea","SearchResults","LoadErrorState","AllHiddenState","view","MonthView","ListViewV2","TimeGrid","DayPanel","Fragment","SyncStoppedNotices","PartialFailureNotice"],"sources":["../../src/v2/CalendarPageV2.tsx"],"sourcesContent":["/**\n * The redesigned calendar page (BOFF-15698 A1): the header and toolbar, the rail, and the Day ·\n * Week · Month · List views with the peek, quick create, search and their states. The address\n * says which view and day (`useCalendarV2Navigation`); the shared model\n * (`useCalendarPageModel`) holds the calendars, the view's events and what can be done to them.\n *\n * The page fills the window and scrolls inside itself. No product shows it yet: FluidGrids\n * passes `calendarRedesign` once A1–A3 have shipped (§7).\n */\nimport { useRef } from 'react';\nimport { WorkspacePage } from '@burdenoff/fe-libs/ui';\nimport { CalendarDialogsV2 } from './dialogs/CalendarDialogsV2';\nimport { DayPanel } from './day/DayPanel';\nimport { QuickCreateHost } from './grid/QuickCreate';\nimport { TimeGrid } from './grid/TimeGrid';\nimport { useAvailableHeight } from './hooks/useAvailableHeight';\nimport { useCalendarShortcuts } from './hooks/useCalendarShortcuts';\nimport { ListViewV2 } from './list/ListViewV2';\nimport { MonthView } from './month/MonthView';\nimport { CalendarHeaderV2, CalendarToolbarV2 } from './page/CalendarChrome';\nimport { CalendarPageContext, useCalendarPage } from './page/CalendarPageContext';\nimport { useCalendarPageModel } from './page/useCalendarPageModel';\nimport { EventPeekHost } from './peek/EventPeek';\nimport { CalendarRail, RailSheet } from './rail/CalendarRail';\nimport { SearchResults } from './search/SearchResults';\nimport { useCalendarV2Store } from './state/calendarV2Store';\nimport {\n AllHiddenState,\n LoadErrorState,\n PartialFailureNotice,\n SyncStoppedNotices,\n} from './states/CalendarStates';\n\n/** The calendar never gets shorter than this; a shorter window scrolls the page. */\nconst MIN_BODY_HEIGHT = 420;\n\nexport function CalendarPageV2() {\n const model = useCalendarPageModel();\n useCalendarShortcuts(model);\n return (\n <CalendarPageContext value={model}>\n <div\n className=\"flex min-h-0 min-w-0 flex-1 flex-col bg-bg-canvas\"\n data-calendar-view={model.nav.view}\n data-calendar-date={model.nav.date}\n >\n <WorkspacePage className=\"pb-0 max-md:pb-0\">\n <CalendarHeaderV2 />\n <CalendarToolbarV2 />\n <CalendarBody />\n </WorkspacePage>\n </div>\n <EventPeekHost />\n <QuickCreateHost />\n <RailSheet />\n <CalendarDialogsV2 />\n </CalendarPageContext>\n );\n}\n\nfunction CalendarBody() {\n const page = useCalendarPage();\n const bodyRef = useRef<HTMLDivElement>(null);\n const height = useAvailableHeight(bodyRef, MIN_BODY_HEIGHT);\n const railOpen = useCalendarV2Store((state) => state.railOpen);\n const showRail = !page.compact && railOpen;\n return (\n <div\n ref={bodyRef}\n className=\"flex min-h-0 gap-3.5\"\n style={{ height: height ?? undefined, minHeight: MIN_BODY_HEIGHT }}\n >\n {showRail ? (\n <aside\n id=\"calendar-v2-rail\"\n aria-label={page.tr('calendar.v2.calendars', 'Calendars')}\n className=\"w-[232px] shrink-0 overflow-y-auto pe-1 max-lg:w-[208px]\"\n >\n <CalendarRail />\n </aside>\n ) : null}\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col gap-2.5\">\n <MainArea />\n </div>\n </div>\n );\n}\n\nfunction MainArea() {\n const page = useCalendarPage();\n const search = useCalendarV2Store((state) => state.search);\n if (search.trim() !== '') return <SearchResults />;\n const { state } = page;\n if (state.kind === 'error') {\n return (\n <LoadErrorState\n failed={state.failed}\n error={state.failed === 'events' ? page.eventsError : page.calendarsError}\n onRetry={state.failed === 'calendars' ? page.refetchCalendars : page.refetchEvents}\n />\n );\n }\n if (state.kind === 'all-hidden') return <AllHiddenState />;\n const view =\n page.nav.view === 'month' ? (\n <MonthView />\n ) : page.nav.view === 'list' ? (\n <ListViewV2 />\n ) : page.nav.view === 'day' && !page.compact ? (\n <div className=\"flex min-h-0 flex-1 gap-3.5\">\n <TimeGrid />\n <DayPanel />\n </div>\n ) : (\n <TimeGrid />\n );\n return (\n <>\n <SyncStoppedNotices />\n {state.kind === 'ready' ? (\n <PartialFailureNotice calendarIds={state.failedCalendarIds} onRetry={page.refetchEvents} />\n ) : null}\n {view}\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAkCA,IAAMC,IAAkB;AAExB,SAAgBC,IAAiB;CAC/B,IAAMC,IAAQC,EAAqB;CAEnC,OADAC,EAAqBF,CAAK,GAExB,kBAACG,GAAD;EAAqB,OAAOH;EAA5B,UAAA;GACE,kBAAC,OAAD;IACE,WAAU;IACV,sBAAoBA,EAAM,IAAI;IAC9B,sBAAoBA,EAAM,IAAI;IAE9B,UAAA,kBAACI,GAAD;KAAe,WAAU;KAAzB,UAAA;MACE,kBAACC,GAAD,CAAmB,CAAA;MACnB,kBAACC,GAAD,CAAoB,CAAA;MACpB,kBAACC,GAAD,CAAe,CAAA;KACF;;GACZ,CAAA;GACL,kBAACC,GAAD,CAAgB,CAAA;GAChB,kBAACC,GAAD,CAAkB,CAAA;GAClB,kBAACC,GAAD,CAAY,CAAA;GACZ,kBAACC,GAAD,CAAoB,CAAA;EACD;;AAEzB;AAEA,SAASJ,IAAe;CACtB,IAAMK,IAAOC,EAAgB,GACvBC,IAAUC,EAAuB,IAAI,GACrCC,IAASC,EAAmBH,GAAShB,CAAe,GACpDoB,IAAWC,GAAoB,MAAUC,EAAM,QAAQ,GACvDC,IAAW,CAACT,EAAK,WAAWM;CAClC,OACE,kBAAC,OAAD;EACE,KAAKJ;EACL,WAAU;EACV,OAAO;GAAE,QAAQE,KAAU,KAAA;GAAW,WAAWlB;EAAgB;EAHnE,UAAA,CAKGuB,IACC,kBAAC,SAAD;GACE,IAAG;GACH,cAAYT,EAAK,GAAG,yBAAyB,WAAW;GACxD,WAAU;GAEV,UAAA,kBAACU,GAAD,CAAe,CAAA;EACV,CAAA,IACL,MACJ,kBAAC,OAAD;GAAK,WAAU;GACb,UAAA,kBAACC,GAAD,CAAW,CAAA;EACR,CAAA,CACF;;AAET;AAEA,SAASA,IAAW;CAClB,IAAMX,IAAOC,EAAgB;CAE7B,IADeM,GAAoB,MAAUC,EAAM,MAC/C,CAAA,CAAO,KAAK,MAAM,IAAI,OAAO,kBAACI,GAAD,CAAgB,CAAA;CACjD,IAAM,EAAE,aAAUZ;CAClB,IAAIQ,EAAM,SAAS,SACjB,OACE,kBAACK,GAAD;EACE,QAAQL,EAAM;EACd,OAAOA,EAAM,WAAW,WAAWR,EAAK,cAAcA,EAAK;EAC3D,SAASQ,EAAM,WAAW,cAAcR,EAAK,mBAAmBA,EAAK;CACtE,CAAA;CAGL,IAAIQ,EAAM,SAAS,cAAc,OAAO,kBAACM,GAAD,CAAiB,CAAA;CACzD,IAAMC,IACJf,EAAK,IAAI,SAAS,UAChB,kBAACgB,GAAD,CAAY,CAAA,IACVhB,EAAK,IAAI,SAAS,SACpB,kBAACiB,GAAD,CAAa,CAAA,IACXjB,EAAK,IAAI,SAAS,SAAS,CAACA,EAAK,UACnC,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,kBAACkB,GAAD,CAAW,CAAA,GACX,kBAACC,GAAD,CAAW,CAAA,CACR;CAEL,CAAA,IAAA,kBAACD,GAAD,CAAW,CAAA;CAEf,OACE,kBAAAjC,GAAA,EAAA,UAAA;EACE,kBAACoC,GAAD,CAAqB,CAAA;EACpBb,EAAM,SAAS,UACd,kBAACc,GAAD;GAAsB,aAAad,EAAM;GAAmB,SAASR,EAAK;EAAgB,CAAA,IACxF;EACHe;CACD,EAAA,CAAA;AAEN"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export type CalendarHue = 'blue' | 'teal' | 'violet' | 'rose' | 'amber' | 'green' | 'indigo' | 'slate';
|
|
3
|
+
interface HueDefinition {
|
|
4
|
+
hue: CalendarHue;
|
|
5
|
+
/** The theme token the hue is drawn with. */
|
|
6
|
+
token: string;
|
|
7
|
+
/** Its place on the colour wheel, in degrees; null for the grey. */
|
|
8
|
+
angle: number | null;
|
|
9
|
+
}
|
|
10
|
+
/** The hues, in the order a calendar without a colour is given them. */
|
|
11
|
+
export declare const CALENDAR_HUES: readonly HueDefinition[];
|
|
12
|
+
/** The hue angle (0–360) and saturation (0–1) of a hex colour; null when it isn't one. */
|
|
13
|
+
export declare function hexHue(value: string): {
|
|
14
|
+
angle: number;
|
|
15
|
+
saturation: number;
|
|
16
|
+
} | null;
|
|
17
|
+
/** The hue a calendar is drawn in. */
|
|
18
|
+
export declare function calendarHue(color: string | null | undefined, calendarId: string): CalendarHue;
|
|
19
|
+
/** The token a hue is drawn with. */
|
|
20
|
+
export declare function hueToken(hue: CalendarHue): string;
|
|
21
|
+
/** Sets `--cal-hue` for the element and everything in it. */
|
|
22
|
+
export declare function calendarHueStyle(hue: CalendarHue): CSSProperties;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// src/v2/colors.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
hue: "blue",
|
|
5
|
+
token: "--color-accent-blue",
|
|
6
|
+
angle: 217
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
hue: "teal",
|
|
10
|
+
token: "--color-accent-teal",
|
|
11
|
+
angle: 175
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
hue: "violet",
|
|
15
|
+
token: "--color-accent-purple",
|
|
16
|
+
angle: 271
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
hue: "amber",
|
|
20
|
+
token: "--color-chart-4",
|
|
21
|
+
angle: 45
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
hue: "rose",
|
|
25
|
+
token: "--color-chart-5",
|
|
26
|
+
angle: 0
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
hue: "green",
|
|
30
|
+
token: "--color-chart-7",
|
|
31
|
+
angle: 142
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
hue: "indigo",
|
|
35
|
+
token: "--color-accent-indigo",
|
|
36
|
+
angle: 243
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
hue: "slate",
|
|
40
|
+
token: "--color-text-secondary",
|
|
41
|
+
angle: null
|
|
42
|
+
}
|
|
43
|
+
], t = new Map(e.map((e) => [e.hue, e])), n = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i, r = .2;
|
|
44
|
+
function i(e) {
|
|
45
|
+
let t = n.exec(e.trim());
|
|
46
|
+
if (!t?.[1]) return null;
|
|
47
|
+
let r = t[1].length === 3 ? [...t[1]].map((e) => e + e).join("") : t[1], [i, a, o] = [
|
|
48
|
+
0,
|
|
49
|
+
2,
|
|
50
|
+
4
|
|
51
|
+
].map((e) => parseInt(r.slice(e, e + 2), 16) / 255), s = Math.max(i, a, o), c = Math.min(i, a, o), l = s - c, u = (s + c) / 2;
|
|
52
|
+
if (l === 0) return {
|
|
53
|
+
angle: 0,
|
|
54
|
+
saturation: 0
|
|
55
|
+
};
|
|
56
|
+
let d = l / (1 - Math.abs(2 * u - 1)), f;
|
|
57
|
+
return f = s === i ? (a - o) / l % 6 : s === a ? (o - i) / l + 2 : (i - a) / l + 4, {
|
|
58
|
+
angle: (f * 60 + 360) % 360,
|
|
59
|
+
saturation: d
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function a(e, t) {
|
|
63
|
+
let n = Math.abs(e - t) % 360;
|
|
64
|
+
return n > 180 ? 360 - n : n;
|
|
65
|
+
}
|
|
66
|
+
function o(e) {
|
|
67
|
+
let t = 0;
|
|
68
|
+
for (let n of e) t = t * 31 + (n.codePointAt(0) ?? 0) >>> 0;
|
|
69
|
+
return t;
|
|
70
|
+
}
|
|
71
|
+
function s(n, s) {
|
|
72
|
+
let c = n ? t.get(n.trim().toLowerCase()) : void 0;
|
|
73
|
+
if (c) return c.hue;
|
|
74
|
+
let l = n ? i(n) : null;
|
|
75
|
+
if (l) {
|
|
76
|
+
if (l.saturation < r) return "slate";
|
|
77
|
+
let t = null;
|
|
78
|
+
for (let n of e) n.angle !== null && (!t || t.angle === null || a(l.angle, n.angle) < a(l.angle, t.angle)) && (t = n);
|
|
79
|
+
if (t) return t.hue;
|
|
80
|
+
}
|
|
81
|
+
let u = e.filter((e) => e.angle !== null);
|
|
82
|
+
return u[o(s) % u.length]?.hue ?? "blue";
|
|
83
|
+
}
|
|
84
|
+
function c(e) {
|
|
85
|
+
return t.get(e)?.token ?? "--color-accent-blue";
|
|
86
|
+
}
|
|
87
|
+
function l(e) {
|
|
88
|
+
return { "--cal-hue": `var(${c(e)})` };
|
|
89
|
+
}
|
|
90
|
+
export { e as CALENDAR_HUES, s as calendarHue, l as calendarHueStyle, i as hexHue, c as hueToken };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","names":["CALENDAR_HUES","BY_NAME","definition","HEX","GREY_SATURATION","hexHue","match","value","digits","d","r","g","b","at","max","min","delta","lightness","saturation","angle","angleDistance","a","idHash","hash","char","id","calendarHue","named","color","parsed","best","chromatic","calendarId","hueToken","hue","calendarHueStyle"],"sources":["../../src/v2/colors.ts"],"sourcesContent":["/**\n * Calendar colours for the redesigned calendar (BOFF-15698 A1). A calendar's stored colour is\n * never used as it is: it picks one of eight hues, each a theme token, so every calendar reads\n * well in light and dark on every palette (the way fe-libs' avatars are tinted).\n *\n * A stored colour may be a hue's name (\"teal\") or a hex colour from today's pages (\"#3B82F6\",\n * read for its hue only). Anything else, and no colour, gets a hue from the calendar's id: the\n * same calendar keeps the same hue everywhere.\n *\n * The views set `--cal-hue` on an element (`calendarHueStyle`) and mix it with the surface for\n * fills (`styles.ts`), so only tokens reach the page.\n */\nimport type { CSSProperties } from 'react';\n\nexport type CalendarHue =\n 'blue' | 'teal' | 'violet' | 'rose' | 'amber' | 'green' | 'indigo' | 'slate';\n\ninterface HueDefinition {\n hue: CalendarHue;\n /** The theme token the hue is drawn with. */\n token: string;\n /** Its place on the colour wheel, in degrees; null for the grey. */\n angle: number | null;\n}\n\n/** The hues, in the order a calendar without a colour is given them. */\nexport const CALENDAR_HUES: readonly HueDefinition[] = [\n { hue: 'blue', token: '--color-accent-blue', angle: 217 },\n { hue: 'teal', token: '--color-accent-teal', angle: 175 },\n { hue: 'violet', token: '--color-accent-purple', angle: 271 },\n { hue: 'amber', token: '--color-chart-4', angle: 45 },\n { hue: 'rose', token: '--color-chart-5', angle: 0 },\n { hue: 'green', token: '--color-chart-7', angle: 142 },\n { hue: 'indigo', token: '--color-accent-indigo', angle: 243 },\n { hue: 'slate', token: '--color-text-secondary', angle: null },\n];\n\nconst BY_NAME: ReadonlyMap<string, HueDefinition> = new Map(\n CALENDAR_HUES.map((definition) => [definition.hue, definition])\n);\n\nconst HEX = /^#?([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;\n\n/** Saturation below which a colour reads as grey. */\nconst GREY_SATURATION = 0.2;\n\n/** The hue angle (0–360) and saturation (0–1) of a hex colour; null when it isn't one. */\nexport function hexHue(value: string): { angle: number; saturation: number } | null {\n const match = HEX.exec(value.trim());\n if (!match?.[1]) return null;\n const digits = match[1].length === 3 ? [...match[1]].map((d) => d + d).join('') : match[1];\n const [r, g, b] = [0, 2, 4].map((at) => parseInt(digits.slice(at, at + 2), 16) / 255) as [\n number,\n number,\n number,\n ];\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const delta = max - min;\n const lightness = (max + min) / 2;\n if (delta === 0) return { angle: 0, saturation: 0 };\n const saturation = delta / (1 - Math.abs(2 * lightness - 1));\n let angle: number;\n if (max === r) angle = ((g - b) / delta) % 6;\n else if (max === g) angle = (b - r) / delta + 2;\n else angle = (r - g) / delta + 4;\n return { angle: (angle * 60 + 360) % 360, saturation };\n}\n\nfunction angleDistance(a: number, b: number): number {\n const d = Math.abs(a - b) % 360;\n return d > 180 ? 360 - d : d;\n}\n\n/** A stable small number from an id. */\nfunction idHash(id: string): number {\n let hash = 0;\n for (const char of id) hash = (hash * 31 + (char.codePointAt(0) ?? 0)) >>> 0;\n return hash;\n}\n\n/** The hue a calendar is drawn in. */\nexport function calendarHue(color: string | null | undefined, calendarId: string): CalendarHue {\n const named = color ? BY_NAME.get(color.trim().toLowerCase()) : undefined;\n if (named) return named.hue;\n const parsed = color ? hexHue(color) : null;\n if (parsed) {\n if (parsed.saturation < GREY_SATURATION) return 'slate';\n let best: HueDefinition | null = null;\n for (const definition of CALENDAR_HUES) {\n if (definition.angle === null) continue;\n if (\n !best ||\n best.angle === null ||\n angleDistance(parsed.angle, definition.angle) < angleDistance(parsed.angle, best.angle)\n ) {\n best = definition;\n }\n }\n if (best) return best.hue;\n }\n const chromatic = CALENDAR_HUES.filter((definition) => definition.angle !== null);\n return chromatic[idHash(calendarId) % chromatic.length]?.hue ?? 'blue';\n}\n\n/** The token a hue is drawn with. */\nexport function hueToken(hue: CalendarHue): string {\n return BY_NAME.get(hue)?.token ?? '--color-accent-blue';\n}\n\n/** Sets `--cal-hue` for the element and everything in it. */\nexport function calendarHueStyle(hue: CalendarHue): CSSProperties {\n // React's style type lists no custom properties; `--cal-hue` is one, set to a token.\n return { '--cal-hue': `var(${hueToken(hue)})` } as CSSProperties;\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { EventType, ReminderChannel, RsvpStatus, UpdateScope } from '../../generated/wspace-types';
|
|
2
|
+
import { EventResponseV2 } from '../types';
|
|
3
|
+
export declare const RSVP_STATUS: Readonly<Record<EventResponseV2, RsvpStatus>>;
|
|
4
|
+
export declare const SCOPE_ALL_EVENTS: UpdateScope;
|
|
5
|
+
export declare const EVENT_TYPE_MEETING: EventType;
|
|
6
|
+
export declare const REMINDER_IN_APP: ReminderChannel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/v2/data/enums.ts
|
|
2
|
+
var e = {
|
|
3
|
+
ACCEPTED: "ACCEPTED",
|
|
4
|
+
TENTATIVE: "TENTATIVE",
|
|
5
|
+
DECLINED: "DECLINED",
|
|
6
|
+
NO_RESPONSE: "NO_RESPONSE"
|
|
7
|
+
}, t = "ALL_EVENTS", n = "MEETING", r = "IN_APP";
|
|
8
|
+
export { n as EVENT_TYPE_MEETING, r as REMINDER_IN_APP, e as RSVP_STATUS, t as SCOPE_ALL_EVENTS };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=enums.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.js","names":["RSVP_STATUS","SCOPE_ALL_EVENTS","EVENT_TYPE_MEETING","REMINDER_IN_APP"],"sources":["../../../src/v2/data/enums.ts"],"sourcesContent":["/**\n * The schema's enum values the redesign sends (BOFF-15698 A1). The generated enums are string\n * enums whose values are the schema's names; importing them at run time would bundle every enum\n * of the workspace schema (over two thousand), so the few values sent are written here as the\n * strings they are. Each cast is exact: the string is the enum member's value.\n */\nimport type {\n EventType,\n ReminderChannel,\n RsvpStatus,\n UpdateScope,\n} from '../../generated/wspace-types';\nimport type { EventResponseV2 } from '../types';\n\nexport const RSVP_STATUS: Readonly<Record<EventResponseV2, RsvpStatus>> = {\n ACCEPTED: 'ACCEPTED' as RsvpStatus,\n TENTATIVE: 'TENTATIVE' as RsvpStatus,\n DECLINED: 'DECLINED' as RsvpStatus,\n NO_RESPONSE: 'NO_RESPONSE' as RsvpStatus,\n};\n\nexport const SCOPE_ALL_EVENTS = 'ALL_EVENTS' as UpdateScope;\n\nexport const EVENT_TYPE_MEETING = 'MEETING' as EventType;\n\nexport const REMINDER_IN_APP = 'IN_APP' as ReminderChannel;\n"],"mappings":";AAcA,IAAaA,IAA6D;CACxE,UAAU;CACV,WAAW;CACX,UAAU;CACV,aAAa;AACf,GAEaC,IAAmB,cAEnBC,IAAqB,WAErBC,IAAkB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** The error's code, e.g. `NOT_FOUND`; null for a network failure or no code. */
|
|
2
|
+
export declare function graphQLErrorCode(error: unknown): string | null;
|
|
3
|
+
/** The text to show under "Show technical details": the service's own message. */
|
|
4
|
+
export declare function technicalDetails(error: unknown): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CombinedGraphQLErrors as e } from "@apollo/client";
|
|
2
|
+
// src/v2/data/errors.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
if (!e.is(t)) return null;
|
|
5
|
+
let n = t.errors[0]?.extensions;
|
|
6
|
+
return n && typeof n == "object" ? n : null;
|
|
7
|
+
}
|
|
8
|
+
function n(e) {
|
|
9
|
+
let n = t(e)?.code;
|
|
10
|
+
return typeof n == "string" ? n : null;
|
|
11
|
+
}
|
|
12
|
+
function r(t) {
|
|
13
|
+
return e.is(t) ? t.errors.map((e) => e.message).join("\n") : t instanceof Error ? t.message : String(t);
|
|
14
|
+
}
|
|
15
|
+
export { n as graphQLErrorCode, r as technicalDetails };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","names":["firstExtensions","CombinedGraphQLErrors","error","extensions","graphQLErrorCode","code","technicalDetails","item"],"sources":["../../../src/v2/data/errors.ts"],"sourcesContent":["/**\n * Reading the service's errors (BOFF-15698 A1): the code a GraphQL error carries in its\n * extensions (`NOT_FOUND`, `FORBIDDEN`, …), so the page can say what happened instead of a\n * generic failure, and the service's own words for \"Show technical details\".\n */\nimport { CombinedGraphQLErrors } from '@apollo/client';\n\nfunction firstExtensions(error: unknown): Record<string, unknown> | null {\n if (!CombinedGraphQLErrors.is(error)) return null;\n const extensions = error.errors[0]?.extensions;\n return extensions && typeof extensions === 'object' ? extensions : null;\n}\n\n/** The error's code, e.g. `NOT_FOUND`; null for a network failure or no code. */\nexport function graphQLErrorCode(error: unknown): string | null {\n const code = firstExtensions(error)?.code;\n return typeof code === 'string' ? code : null;\n}\n\n/** The text to show under \"Show technical details\": the service's own message. */\nexport function technicalDetails(error: unknown): string {\n if (CombinedGraphQLErrors.is(error)) {\n return error.errors.map((item) => item.message).join('\\n');\n }\n return error instanceof Error ? error.message : String(error);\n}\n"],"mappings":";;AAOA,SAASA,EAAgB,GAAgD;CACvE,IAAI,CAACC,EAAsB,GAAGC,CAAK,GAAG,OAAO;CAC7C,IAAMC,IAAaD,EAAM,OAAO,EAAE,EAAE;CACpC,OAAOC,KAAc,OAAOA,KAAe,WAAWA,IAAa;AACrE;AAGA,SAAgBC,EAAiB,GAA+B;CAC9D,IAAMC,IAAOL,EAAgBE,CAAK,CAAC,EAAE;CACrC,OAAO,OAAOG,KAAS,WAAWA,IAAO;AAC3C;AAGA,SAAgBC,EAAiB,GAAwB;CAIvD,OAHIL,EAAsB,GAAGC,CAAK,IACzBA,EAAM,OAAO,KAAK,MAASK,EAAK,OAAO,CAAC,CAAC,KAAK,IAAI,IAEpDL,aAAiB,QAAQA,EAAM,UAAU,OAAOA,CAAK;AAC9D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useSyncExternalStore as e } from "react";
|
|
2
|
+
// src/v2/data/invalidation.ts
|
|
3
|
+
var t = 0, n = /* @__PURE__ */ new Set();
|
|
4
|
+
function r() {
|
|
5
|
+
t += 1;
|
|
6
|
+
for (let e of n) e();
|
|
7
|
+
}
|
|
8
|
+
function i(e) {
|
|
9
|
+
return n.add(e), () => {
|
|
10
|
+
n.delete(e);
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
var a = () => t;
|
|
14
|
+
function o() {
|
|
15
|
+
return e(i, a, a);
|
|
16
|
+
}
|
|
17
|
+
export { r as invalidateCalendarEvents, o as useCalendarEventsRevision };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=invalidation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalidation.js","names":["revision","listeners","invalidateCalendarEvents","listener","subscribe","read","useCalendarEventsRevision","useSyncExternalStore"],"sources":["../../../src/v2/data/invalidation.ts"],"sourcesContent":["/**\n * \"Events changed\": after a write (create, move, delete, answer), the dialog or view that made\n * it calls `invalidateCalendarEvents()`, and every `useEventsInRangeV2` and `useFreeBusy` on\n * the page loads again, wherever it is mounted (BOFF-15698 A0).\n */\nimport { useSyncExternalStore } from 'react';\n\nlet revision = 0;\nconst listeners = new Set<() => void>();\n\n/** Reload every mounted events and free/busy hook. */\nexport function invalidateCalendarEvents(): void {\n revision += 1;\n for (const listener of listeners) listener();\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nconst read = () => revision;\n\n/** A number that changes whenever events are invalidated. */\nexport function useCalendarEventsRevision(): number {\n return useSyncExternalStore(subscribe, read, read);\n}\n"],"mappings":";;AAOA,IAAIA,IAAW,GACTC,oBAAY,IAAI,IAAgB;AAGtC,SAAgBC,IAAiC;CAC/C,KAAY;CACZ,KAAK,IAAMC,KAAYF,GAAW,EAAS;AAC7C;AAEA,SAASG,EAAU,GAAkC;CAEnD,OADAH,EAAU,IAAIE,CAAQ,SACT;EACX,EAAU,OAAOA,CAAQ;CAC3B;AACF;AAEA,IAAME,UAAaL;AAGnB,SAAgBM,IAAoC;CAClD,OAAOC,EAAqBH,GAAWC,GAAMA,CAAI;AACnD"}
|