@jpahd/kalendus 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +406 -0
  3. package/custom-elements.json +4443 -0
  4. package/dist/components/Context.d.ts +9 -0
  5. package/dist/components/Context.d.ts.map +1 -0
  6. package/dist/components/Day.d.ts +11 -0
  7. package/dist/components/Day.d.ts.map +1 -0
  8. package/dist/components/Entry.d.ts +43 -0
  9. package/dist/components/Entry.d.ts.map +1 -0
  10. package/dist/components/Header.d.ts +16 -0
  11. package/dist/components/Header.d.ts.map +1 -0
  12. package/dist/components/Menu.d.ts +28 -0
  13. package/dist/components/Menu.d.ts.map +1 -0
  14. package/dist/components/Month.d.ts +21 -0
  15. package/dist/components/Month.d.ts.map +1 -0
  16. package/dist/components/Week.d.ts +36 -0
  17. package/dist/components/Week.d.ts.map +1 -0
  18. package/dist/components/Year.d.ts +20 -0
  19. package/dist/components/Year.d.ts.map +1 -0
  20. package/dist/generated/locale-codes.d.ts +14 -0
  21. package/dist/generated/locale-codes.d.ts.map +1 -0
  22. package/dist/generated/locales/ar.d.ts +33 -0
  23. package/dist/generated/locales/ar.d.ts.map +1 -0
  24. package/dist/generated/locales/bn.d.ts +33 -0
  25. package/dist/generated/locales/bn.d.ts.map +1 -0
  26. package/dist/generated/locales/de-DE.d.ts +33 -0
  27. package/dist/generated/locales/de-DE.d.ts.map +1 -0
  28. package/dist/generated/locales/de.d.ts +33 -0
  29. package/dist/generated/locales/de.d.ts.map +1 -0
  30. package/dist/generated/locales/es.d.ts +33 -0
  31. package/dist/generated/locales/es.d.ts.map +1 -0
  32. package/dist/generated/locales/fr.d.ts +33 -0
  33. package/dist/generated/locales/fr.d.ts.map +1 -0
  34. package/dist/generated/locales/hi.d.ts +33 -0
  35. package/dist/generated/locales/hi.d.ts.map +1 -0
  36. package/dist/generated/locales/id.d.ts +33 -0
  37. package/dist/generated/locales/id.d.ts.map +1 -0
  38. package/dist/generated/locales/it.d.ts +33 -0
  39. package/dist/generated/locales/it.d.ts.map +1 -0
  40. package/dist/generated/locales/ja.d.ts +33 -0
  41. package/dist/generated/locales/ja.d.ts.map +1 -0
  42. package/dist/generated/locales/ko.d.ts +33 -0
  43. package/dist/generated/locales/ko.d.ts.map +1 -0
  44. package/dist/generated/locales/nl.d.ts +33 -0
  45. package/dist/generated/locales/nl.d.ts.map +1 -0
  46. package/dist/generated/locales/pl.d.ts +33 -0
  47. package/dist/generated/locales/pl.d.ts.map +1 -0
  48. package/dist/generated/locales/pt.d.ts +33 -0
  49. package/dist/generated/locales/pt.d.ts.map +1 -0
  50. package/dist/generated/locales/ru.d.ts +33 -0
  51. package/dist/generated/locales/ru.d.ts.map +1 -0
  52. package/dist/generated/locales/th.d.ts +33 -0
  53. package/dist/generated/locales/th.d.ts.map +1 -0
  54. package/dist/generated/locales/tr.d.ts +33 -0
  55. package/dist/generated/locales/tr.d.ts.map +1 -0
  56. package/dist/generated/locales/uk.d.ts +33 -0
  57. package/dist/generated/locales/uk.d.ts.map +1 -0
  58. package/dist/generated/locales/vi.d.ts +33 -0
  59. package/dist/generated/locales/vi.d.ts.map +1 -0
  60. package/dist/generated/locales/zh-Hans.d.ts +33 -0
  61. package/dist/generated/locales/zh-Hans.d.ts.map +1 -0
  62. package/dist/kalendus.js +1806 -0
  63. package/dist/kalendus.js.map +1 -0
  64. package/dist/lib/DirectionalCalendarDateCalculator.d.ts +29 -0
  65. package/dist/lib/DirectionalCalendarDateCalculator.d.ts.map +1 -0
  66. package/dist/lib/LayoutCalculator.d.ts +47 -0
  67. package/dist/lib/LayoutCalculator.d.ts.map +1 -0
  68. package/dist/lib/SlotManager.d.ts +130 -0
  69. package/dist/lib/SlotManager.d.ts.map +1 -0
  70. package/dist/lib/ViewStateController.d.ts +22 -0
  71. package/dist/lib/ViewStateController.d.ts.map +1 -0
  72. package/dist/lib/allDayLayout.d.ts +24 -0
  73. package/dist/lib/allDayLayout.d.ts.map +1 -0
  74. package/dist/lib/catchError.d.ts +2 -0
  75. package/dist/lib/catchError.d.ts.map +1 -0
  76. package/dist/lib/getColorTextWithContrast.d.ts +8 -0
  77. package/dist/lib/getColorTextWithContrast.d.ts.map +1 -0
  78. package/dist/lib/getOverlappingEntitiesIndices.d.ts +8 -0
  79. package/dist/lib/getOverlappingEntitiesIndices.d.ts.map +1 -0
  80. package/dist/lib/getSortedGradingsByIndex.d.ts +2 -0
  81. package/dist/lib/getSortedGradingsByIndex.d.ts.map +1 -0
  82. package/dist/lib/localization.d.ts +34 -0
  83. package/dist/lib/localization.d.ts.map +1 -0
  84. package/dist/lib/messages.d.ts +4 -0
  85. package/dist/lib/messages.d.ts.map +1 -0
  86. package/dist/lib/partitionOverlappingIntervals.d.ts +6 -0
  87. package/dist/lib/partitionOverlappingIntervals.d.ts.map +1 -0
  88. package/dist/lib/weekDisplayContext.d.ts +31 -0
  89. package/dist/lib/weekDisplayContext.d.ts.map +1 -0
  90. package/dist/lib/weekStartHelper.d.ts +57 -0
  91. package/dist/lib/weekStartHelper.d.ts.map +1 -0
  92. package/dist/lms-calendar.d.ts +166 -0
  93. package/dist/lms-calendar.d.ts.map +1 -0
  94. package/package.json +118 -0
@@ -0,0 +1,29 @@
1
+ import { CalendarDate } from '../lms-calendar';
2
+ /**
3
+ * This class handles calculations and adjustments for CalendarDate objects based on a specified direction.
4
+ *
5
+ * @example
6
+ * ```javascript
7
+ * const dateCalculator = new DirectionalCalendarDateCalculator({
8
+ * date: { year: 2023, month: 8, day: 15 },
9
+ * direction: 'next'
10
+ * });
11
+ *
12
+ * const newDate = dateCalculator.getDateByMonthInDirection();
13
+ * // newDate would be { year: 2023, month: 9, day: 15 }
14
+ * ```
15
+ */
16
+ export default class DirectionalCalendarDateCalculator {
17
+ private _date?;
18
+ private _direction?;
19
+ constructor({ date, direction }: {
20
+ date?: CalendarDate;
21
+ direction?: 'previous' | 'next';
22
+ });
23
+ set date(date: CalendarDate);
24
+ set direction(direction: 'previous' | 'next');
25
+ private _toCalendarDate;
26
+ getDateByDayInDirection(): CalendarDate;
27
+ getDateByMonthInDirection(): CalendarDate;
28
+ }
29
+ //# sourceMappingURL=DirectionalCalendarDateCalculator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DirectionalCalendarDateCalculator.d.ts","sourceRoot":"","sources":["../../src/lib/DirectionalCalendarDateCalculator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,iCAAiC;IAClD,OAAO,CAAC,KAAK,CAAC,CAAW;IACzB,OAAO,CAAC,UAAU,CAAC,CAAS;gBAEhB,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;QAAE,IAAI,CAAC,EAAE,YAAY,CAAC;QAAC,SAAS,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;KAAE;IAOzF,IAAI,IAAI,CAAC,IAAI,EAAE,YAAY,EAM1B;IAED,IAAI,SAAS,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,EAE3C;IAED,OAAO,CAAC,eAAe;IAQhB,uBAAuB;IAqBvB,yBAAyB;CAoBnC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Deterministic layout calculation engine for overlapping calendar events
3
+ * Separates layout logic from rendering concerns
4
+ */
5
+ interface CalendarEvent {
6
+ id: string;
7
+ heading: string;
8
+ startTime: {
9
+ hour: number;
10
+ minute: number;
11
+ };
12
+ endTime: {
13
+ hour: number;
14
+ minute: number;
15
+ };
16
+ color: string;
17
+ }
18
+ interface GridConfig {
19
+ minuteHeight: number;
20
+ eventMinHeight: number;
21
+ }
22
+ export interface LayoutBox {
23
+ id: string;
24
+ x: number;
25
+ y: number;
26
+ width: number;
27
+ height: number;
28
+ depth: number;
29
+ group: number;
30
+ opacity: number;
31
+ zIndex: number;
32
+ }
33
+ export interface LayoutResult {
34
+ boxes: LayoutBox[];
35
+ }
36
+ export declare class LayoutCalculator {
37
+ private config;
38
+ constructor(config?: Partial<GridConfig & Record<string, number>>);
39
+ calculateLayout(events: CalendarEvent[]): LayoutResult;
40
+ private eventsToIntervals;
41
+ private calculateGrading;
42
+ private findOverlapGroups;
43
+ private intervalsOverlap;
44
+ private calculateBoxes;
45
+ }
46
+ export {};
47
+ //# sourceMappingURL=LayoutCalculator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutCalculator.d.ts","sourceRoot":"","sources":["../../src/lib/LayoutCalculator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,UAAU,aAAa;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,UAAU;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAa;gBAEf,MAAM,GAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAM;IAOrE,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,YAAY;IAQtD,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;IA2CxB,OAAO,CAAC,iBAAiB;IAkCzB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,cAAc;CAiEzB"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * SlotManager - Centralized abstraction for calendar entry positioning
3
+ *
4
+ * This class handles all the complexity of positioning calendar entries across different views:
5
+ * - Day view: uses slots for time-based positioning
6
+ * - Week view: uses slots for day+time positioning
7
+ * - Month view: uses slots for date-based positioning
8
+ *
9
+ * It provides a clean, deterministic API that abstracts away the underlying slot mechanism
10
+ * and grid positioning complexities.
11
+ */
12
+ import type { ViewMode } from './ViewStateController.js';
13
+ import { type FirstDayOfWeek } from './weekStartHelper.js';
14
+ declare global {
15
+ type CalendarDate = {
16
+ day: number;
17
+ month: number;
18
+ year: number;
19
+ };
20
+ type CalendarTimeInterval = {
21
+ start: {
22
+ hour: number;
23
+ minute: number;
24
+ };
25
+ end: {
26
+ hour: number;
27
+ minute: number;
28
+ };
29
+ };
30
+ }
31
+ export type { ViewMode };
32
+ export type { FirstDayOfWeek };
33
+ export interface PositionConfig {
34
+ viewMode: ViewMode;
35
+ date: CalendarDate;
36
+ time?: CalendarTimeInterval;
37
+ isAllDay?: boolean;
38
+ activeDate?: CalendarDate;
39
+ firstDayOfWeek?: FirstDayOfWeek;
40
+ weekDates?: CalendarDate[];
41
+ }
42
+ export interface LayoutDimensions {
43
+ width: number;
44
+ x: number;
45
+ zIndex: number;
46
+ opacity: number;
47
+ height?: number;
48
+ }
49
+ export interface AccessibilityInfo {
50
+ tabIndex: number;
51
+ role: 'button';
52
+ ariaLabel: string;
53
+ }
54
+ export interface SlotPosition {
55
+ slotName: string;
56
+ gridColumn?: number;
57
+ gridRow?: string;
58
+ useDirectGrid: boolean;
59
+ useAbsolutePosition?: boolean;
60
+ isAllDay?: boolean;
61
+ dayIndex?: number;
62
+ isMultiDay?: boolean;
63
+ }
64
+ export declare class SlotManager {
65
+ /** Cached week-date→index map, keyed by (activeDate + firstDayOfWeek). */
66
+ private _weekIndexCache;
67
+ /**
68
+ * Calculate the slot name and positioning for an entry
69
+ */
70
+ calculatePosition(config: PositionConfig): SlotPosition;
71
+ /**
72
+ * Generate CSS styles for positioning an entry based on layout dimensions
73
+ */
74
+ generatePositionCSS(position: SlotPosition, layout: LayoutDimensions, time?: CalendarTimeInterval): string;
75
+ /**
76
+ * Day view positioning: uses absolute positioning for timed entries
77
+ */
78
+ private _calculateDayPosition;
79
+ /**
80
+ * Week view positioning: uses absolute positioning within per-day slot containers
81
+ */
82
+ private _calculateWeekPosition;
83
+ /**
84
+ * Month view positioning: uses date-based slots
85
+ */
86
+ private _calculateMonthPosition;
87
+ /**
88
+ * Convert a pixel offset within a time column to a time object.
89
+ * Reads --minute-height from the host element. For future drag/resize interactions.
90
+ */
91
+ pxToTime(px: number, hostEl: Element): {
92
+ hour: number;
93
+ minute: number;
94
+ };
95
+ /**
96
+ * Calculate which day of the week an entry belongs to (0-6, where 0 is the first day).
97
+ * Internally caches the week-date→index map so repeated calls for the same
98
+ * (activeDate, firstDayOfWeek) avoid re-allocating 7 Date objects and scanning.
99
+ */
100
+ getWeekDayIndex(entryDate: CalendarDate, activeDate: CalendarDate, firstDayOfWeek?: FirstDayOfWeek): number;
101
+ /**
102
+ * Look up a date's index within a provided date array (for condensed views).
103
+ */
104
+ getIndexInDates(date: CalendarDate, dates: CalendarDate[]): number;
105
+ /**
106
+ * Convert time interval to CSS grid row specification
107
+ */
108
+ private _getGridSlotByTime;
109
+ /**
110
+ * Calculate accessibility information including logical tab order
111
+ */
112
+ calculateAccessibility(config: PositionConfig): AccessibilityInfo;
113
+ /**
114
+ * Generate comprehensive ARIA label for screen readers
115
+ */
116
+ private _generateAriaLabel;
117
+ /**
118
+ * Get human-readable description of position (for debugging)
119
+ */
120
+ getPositionDescription(config: PositionConfig): string;
121
+ /**
122
+ * Validate that a position configuration is valid
123
+ */
124
+ validatePosition(config: PositionConfig): {
125
+ valid: boolean;
126
+ error?: string;
127
+ };
128
+ }
129
+ export declare const slotManager: SlotManager;
130
+ //# sourceMappingURL=SlotManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SlotManager.d.ts","sourceRoot":"","sources":["../../src/lib/SlotManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AAGzE,OAAO,CAAC,MAAM,CAAC;IACX,KAAK,YAAY,GAAG;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KAChB,CAAC;IAEF,KAAK,oBAAoB,GAAG;QACxB,KAAK,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QACxC,GAAG,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KACzC,CAAC;CACL;AAED,YAAY,EAAE,QAAQ,EAAE,CAAC;AACzB,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,qBAAa,WAAW;IACpB,0EAA0E;IAC1E,OAAO,CAAC,eAAe,CAGP;IAEhB;;OAEG;IACI,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY;IAe9D;;OAEG;IACI,mBAAmB,CACtB,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,gBAAgB,EACxB,IAAI,CAAC,EAAE,oBAAoB,GAC5B,MAAM;IA8BT;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAuB7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsC9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAO/B;;;OAGG;IACI,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;IAS9E;;;;OAIG;IACI,eAAe,CAClB,SAAS,EAAE,YAAY,EACvB,UAAU,EAAE,YAAY,EACxB,cAAc,GAAE,cAAkB,GACnC,MAAM;IAeT;;OAEG;IACI,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,MAAM;IAOzE;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACI,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB;IA0BxE;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAqB1B;;OAEG;IACI,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;IAU7D;;OAEG;IACI,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG;QAC7C,KAAK,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAClB;CAWJ;AAGD,eAAO,MAAM,WAAW,aAAoB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ export type ViewMode = 'month' | 'week' | 'day' | 'year';
3
+ export declare class ViewStateController implements ReactiveController {
4
+ private _host;
5
+ private _viewMode;
6
+ private _activeDate;
7
+ constructor(host: ReactiveControllerHost);
8
+ hostConnected(): void;
9
+ get viewMode(): ViewMode;
10
+ get activeDate(): CalendarDate;
11
+ get expandedDate(): CalendarDate | undefined;
12
+ setViewMode(mode: ViewMode): void;
13
+ setActiveDate(date: CalendarDate): void;
14
+ navigateNext(): void;
15
+ navigatePrevious(): void;
16
+ jumpToToday(): void;
17
+ switchToMonthView(): void;
18
+ switchToWeekView(): void;
19
+ switchToDayView(): void;
20
+ switchToYearView(): void;
21
+ }
22
+ //# sourceMappingURL=ViewStateController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewStateController.d.ts","sourceRoot":"","sources":["../../src/lib/ViewStateController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,KAAK,CAAC;AAEtE,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzD,qBAAa,mBAAoB,YAAW,kBAAkB;IAC1D,OAAO,CAAC,KAAK,CAAyB;IACtC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,WAAW,CAAe;gBAEtB,IAAI,EAAE,sBAAsB;IAYxC,aAAa,IAAI,IAAI;IAErB,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,IAAI,UAAU,IAAI,YAAY,CAE7B;IAED,IAAI,YAAY,IAAI,YAAY,GAAG,SAAS,CAE3C;IAED,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAKjC,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI;IAKvC,YAAY,IAAI,IAAI;IAwCpB,gBAAgB,IAAI,IAAI;IAwCxB,WAAW,IAAI,IAAI;IASnB,iBAAiB,IAAI,IAAI;IAIzB,gBAAgB,IAAI,IAAI;IAIxB,eAAe,IAAI,IAAI;IAIvB,gBAAgB,IAAI,IAAI;CAG3B"}
@@ -0,0 +1,24 @@
1
+ export interface AllDayEvent {
2
+ id: string;
3
+ days: number[];
4
+ isMultiDay: boolean;
5
+ }
6
+ export interface AllDayLayoutResult {
7
+ rowAssignments: Map<string, number>;
8
+ totalRows: number;
9
+ }
10
+ /**
11
+ * Allocate row positions for all-day events so they don't overlap.
12
+ * Multi-day events are placed first, then single-day events fill remaining slots.
13
+ */
14
+ export declare function allocateAllDayRows(events: AllDayEvent[]): AllDayLayoutResult;
15
+ /**
16
+ * Determine the span class for an all-day entry based on its position within a multi-day span.
17
+ */
18
+ export declare function computeSpanClass(entry: {
19
+ continuationIndex: number;
20
+ totalDays: number;
21
+ visibleStartIndex: number;
22
+ visibleEndIndex: number;
23
+ }): 'first-day' | 'middle-day' | 'last-day' | 'single-day';
24
+ //# sourceMappingURL=allDayLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"allDayLayout.d.ts","sourceRoot":"","sources":["../../src/lib/allDayLayout.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,kBAAkB;IAC/B,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,kBAAkB,CAqF5E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CAC3B,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,CAoBzD"}
@@ -0,0 +1,2 @@
1
+ export declare function catchError<T>(promise: Promise<T>): Promise<[undefined, T] | [Error]>;
2
+ //# sourceMappingURL=catchError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catchError.d.ts","sourceRoot":"","sources":["../../src/lib/catchError.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAIpF"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Calculates the text color and background color based on the given color.
3
+ *
4
+ * @param {string} color - The color to process.
5
+ * @returns {[string, string]} An array containing the text color and background color.
6
+ */
7
+ export default function getColorTextWithContrast(color?: string): [string, string];
8
+ //# sourceMappingURL=getColorTextWithContrast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getColorTextWithContrast.d.ts","sourceRoot":"","sources":["../../src/lib/getColorTextWithContrast.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CA8CjF"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Calculates the indices and depths of overlapping entities within a set of partitions.
3
+ *
4
+ * @param {Array<Interval[]>} partitions - An array of partitions, where each partition is an array of intervals.
5
+ * @returns {Array<Grading>} An array of grading objects, representing indices and depths of overlapping entities.
6
+ */
7
+ export default function getOverlappingEntitiesIndices(partitions: Array<Interval[]>): Array<Grading>;
8
+ //# sourceMappingURL=getOverlappingEntitiesIndices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getOverlappingEntitiesIndices.d.ts","sourceRoot":"","sources":["../../src/lib/getOverlappingEntitiesIndices.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACjD,UAAU,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,GAC9B,KAAK,CAAC,OAAO,CAAC,CAYhB"}
@@ -0,0 +1,2 @@
1
+ export default function rearrangeDepths(gradings: Grading[]): Grading[];
2
+ //# sourceMappingURL=getSortedGradingsByIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSortedGradingsByIndex.d.ts","sourceRoot":"","sources":["../../src/lib/getSortedGradingsByIndex.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,aAoB1D"}
@@ -0,0 +1,34 @@
1
+ import { DateTime } from 'luxon';
2
+ /**
3
+ * Format a DateTime with the given locale
4
+ */
5
+ export declare function formatDateTime(dateTime: DateTime, format: string, locale?: string): string;
6
+ /**
7
+ * Get localized month name (abbreviated)
8
+ */
9
+ export declare function getLocalizedMonth(month: number, locale?: string): string;
10
+ /**
11
+ * Format day + abbreviated month using the locale's natural ordering.
12
+ * e.g., "1. Feb." (de), "1 feb" (es), "2月1日" (zh/ja)
13
+ */
14
+ export declare function getLocalizedDayMonth(day: number, month: number, year: number, locale?: string): string;
15
+ /**
16
+ * Get localized weekday name (abbreviated for calendar headers)
17
+ */
18
+ export declare function getLocalizedWeekdayShort(weekday: number, locale?: string): string;
19
+ /**
20
+ * Format a time (hour + minute) using the locale's preferred notation.
21
+ * e.g., "3:30 PM" (en), "15:30" (de), "下午3:30" (zh-CN)
22
+ */
23
+ export declare function formatLocalizedTime(hour: number, minute: number, locale?: string): string;
24
+ /**
25
+ * Format a time range with an en-dash separator.
26
+ * e.g., "9:00 AM – 5:00 PM" (en), "09:00 – 17:00" (de)
27
+ */
28
+ export declare function formatLocalizedTimeRange(startHour: number, startMinute: number, endHour: number, endMinute: number, locale?: string): string;
29
+ /**
30
+ * Format a full date (day + month + year) using the locale's natural ordering.
31
+ * e.g., "Feb 1, 2026" (en), "1. Feb. 2026" (de), "2026年2月1日" (ja)
32
+ */
33
+ export declare function formatLocalizedDate(day: number, month: number, year: number, locale?: string): string;
34
+ //# sourceMappingURL=localization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"localization.d.ts","sourceRoot":"","sources":["../../src/lib/localization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAwEjC;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAExF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAGpG;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAE/E;AAeD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAO,GAAG,MAAM,CAGvF;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACpC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,MAAM,SAAO,GACd,MAAM,CAIR;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAC/B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,SAAO,GACd,MAAM,CAQR"}
@@ -0,0 +1,4 @@
1
+ export type MessageKey = 'day' | 'week' | 'month' | 'currentMonth' | 'allDay' | 'today' | 'noTitle' | 'noContent' | 'noTime' | 'eventDetails' | 'exportAsICS' | 'title' | 'time' | 'date' | 'notes' | 'close' | 'calendarWeek' | 'year' | 'previous' | 'next' | 'events' | 'calendarEvent' | 'pressToOpen' | 'to' | 'switchToDayView' | 'showEarlierDays' | 'showLaterDays' | 'more' | 'calendarView' | 'viewLabel';
2
+ export type ResolvedMessages = Readonly<Record<MessageKey, string>>;
3
+ export declare function getMessages(locale: string): ResolvedMessages;
4
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/lib/messages.ts"],"names":[],"mappings":"AA8CA,MAAM,MAAM,UAAU,GAChB,KAAK,GACL,MAAM,GACN,OAAO,GACP,cAAc,GACd,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,OAAO,GACP,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,cAAc,GACd,MAAM,GACN,UAAU,GACV,MAAM,GACN,QAAQ,GACR,eAAe,GACf,aAAa,GACb,IAAI,GACJ,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,MAAM,GACN,cAAc,GACd,WAAW,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;AA2CpE,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAY5D"}
@@ -0,0 +1,6 @@
1
+ /** This is an implementation of the sweep-line algorithm
2
+ * Ref: https://www.baeldung.com/cs/finding-all-overlapping-intervals \
3
+ * Example: https://stackoverflow.com/questions/30472556/how-to-find-all-overlapping-ranges-and-partition-them-into-chunks
4
+ */
5
+ export default function partitionOverlappingIntervals(intervals: Array<Interval>): Array<Interval[]>;
6
+ //# sourceMappingURL=partitionOverlappingIntervals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"partitionOverlappingIntervals.d.ts","sourceRoot":"","sources":["../../src/lib/partitionOverlappingIntervals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,CACjD,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,GAC3B,KAAK,CAAC,QAAQ,EAAE,CAAC,CA8BnB"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Week display context — computes the visible day subset for condensed week views.
3
+ *
4
+ * Pure function (apart from a single `getComputedStyle` read for CSS tokens).
5
+ * Designed for easy unit testing by passing a mock host element.
6
+ */
7
+ import { type FirstDayOfWeek } from './weekStartHelper.js';
8
+ export interface WeekDisplayContext {
9
+ /** Full 7-day week dates. */
10
+ weekDates: CalendarDate[];
11
+ /** Subset actually shown (same as weekDates when not condensed). */
12
+ visibleDates: CalendarDate[];
13
+ /** Offset into weekDates where visibleDates starts. */
14
+ visibleStartIndex: number;
15
+ /** How many columns are visible. */
16
+ visibleLength: number;
17
+ /** True when showing fewer than 7 days. */
18
+ isCondensed: boolean;
19
+ /** CSS grid-template-columns value for the week grid. */
20
+ gridColumns: string;
21
+ }
22
+ /**
23
+ * Compute the week display context based on CSS custom properties and viewport width.
24
+ *
25
+ * Reads three tokens from `hostEl`:
26
+ * - `--week-day-count` (default 7): full-width column count
27
+ * - `--week-mobile-day-count` (default 3): condensed column count below breakpoint
28
+ * - `--week-mobile-breakpoint` (default 768px): width threshold
29
+ */
30
+ export declare function computeWeekDisplayContext(activeDate: CalendarDate, firstDayOfWeek: FirstDayOfWeek, calendarWidth: number, hostEl: Element): WeekDisplayContext;
31
+ //# sourceMappingURL=weekDisplayContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weekDisplayContext.d.ts","sourceRoot":"","sources":["../../src/lib/weekDisplayContext.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IAC/B,6BAA6B;IAC7B,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,oEAAoE;IACpE,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,uDAAuD;IACvD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;CACvB;AAoCD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACrC,UAAU,EAAE,YAAY,EACxB,cAAc,EAAE,cAAc,EAC9B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,OAAO,GAChB,kBAAkB,CAwCpB"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Week-start helpers — centralizes the "first day of week" offset math
3
+ * that was previously duplicated across lms-calendar.ts, Week.ts, Month.ts,
4
+ * and SlotManager.ts.
5
+ *
6
+ * All functions are pure and dependency-free (only JS Date + CalendarDate).
7
+ */
8
+ /**
9
+ * Supported first-day-of-week values (JS Date convention).
10
+ * 0 = Sunday, 1 = Monday (ISO 8601 default), 6 = Saturday
11
+ */
12
+ export type FirstDayOfWeek = 0 | 1 | 2 | 3 | 4 | 5 | 6;
13
+ /**
14
+ * How many days to subtract from `jsDayOfWeek` to reach `firstDay`.
15
+ *
16
+ * JS Date.getDay(): 0 = Sun, 1 = Mon, ..., 6 = Sat
17
+ *
18
+ * @example getWeekStartOffset(0, 1) // Sunday when Monday-first → 6
19
+ * @example getWeekStartOffset(1, 1) // Monday when Monday-first → 0
20
+ * @example getWeekStartOffset(0, 0) // Sunday when Sunday-first → 0
21
+ */
22
+ export declare function getWeekStartOffset(jsDayOfWeek: number, firstDay: FirstDayOfWeek): number;
23
+ /**
24
+ * Return the 7 CalendarDate values of the week containing `activeDate`,
25
+ * starting from `firstDay`.
26
+ */
27
+ export declare function getWeekDates(activeDate: CalendarDate, firstDay: FirstDayOfWeek): CalendarDate[];
28
+ /**
29
+ * Column offset for the 1st of a month in a week-start-aware grid.
30
+ *
31
+ * @example getFirstDayOffset({ year: 2026, month: 1, day: 1 }, 1) // Thu → 3
32
+ * @example getFirstDayOffset({ year: 2026, month: 1, day: 1 }, 0) // Thu → 4
33
+ */
34
+ export declare function getFirstDayOffset(date: CalendarDate, firstDay: FirstDayOfWeek): number;
35
+ /**
36
+ * Map Luxon weekday numbers to display order for a given firstDay.
37
+ * Returns an array of 7 Luxon weekday numbers (1 = Mon ... 7 = Sun).
38
+ *
39
+ * @example getWeekdayOrder(1) // Monday-first → [1, 2, 3, 4, 5, 6, 7]
40
+ * @example getWeekdayOrder(0) // Sunday-first → [7, 1, 2, 3, 4, 5, 6]
41
+ */
42
+ export declare function getWeekdayOrder(firstDay: FirstDayOfWeek): number[];
43
+ /**
44
+ * Look up the conventional first day of week for a given locale tag.
45
+ *
46
+ * Resolution order:
47
+ * 1. Exact match (e.g., "en-US")
48
+ * 2. Language-only fallback (e.g., "en")
49
+ * 3. Default to Monday (ISO 8601)
50
+ *
51
+ * @example getFirstDayForLocale('en-US') // 0 (Sunday)
52
+ * @example getFirstDayForLocale('de') // 1 (Monday)
53
+ * @example getFirstDayForLocale('ar') // 6 (Saturday)
54
+ * @example getFirstDayForLocale('xx') // 1 (Monday, default)
55
+ */
56
+ export declare function getFirstDayForLocale(locale: string): FirstDayOfWeek;
57
+ //# sourceMappingURL=weekStartHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"weekStartHelper.d.ts","sourceRoot":"","sources":["../../src/lib/weekStartHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,CAExF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,GAAG,YAAY,EAAE,CAW/F;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,CAGtF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,EAAE,CAKlE;AAgDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAcnE"}
@@ -0,0 +1,166 @@
1
+ import { LitElement, PropertyValueMap } from 'lit';
2
+ import { Interval } from 'luxon';
3
+ import LMSCalendarContext from './components/Context';
4
+ import './components/Context.js';
5
+ import LMSCalendarDay from './components/Day';
6
+ import './components/Day.js';
7
+ import LMSCalendarEntry from './components/Entry';
8
+ import './components/Entry.js';
9
+ import LMSCalendarHeader from './components/Header';
10
+ import './components/Header.js';
11
+ import LMSCalendarMenu from './components/Menu';
12
+ import './components/Menu.js';
13
+ import LMSCalendarMonth from './components/Month';
14
+ import './components/Month.js';
15
+ import LMSCalendarWeek from './components/Week';
16
+ import './components/Week.js';
17
+ import LMSCalendarYear from './components/Year';
18
+ import './components/Year.js';
19
+ import type { DensityMode, DrillTarget } from './components/Year.js';
20
+ import { type FirstDayOfWeek } from './lib/SlotManager.js';
21
+ export default class LMSCalendar extends LitElement {
22
+ heading?: string;
23
+ firstDayOfWeek: FirstDayOfWeek;
24
+ locale: string;
25
+ yearDrillTarget: DrillTarget;
26
+ yearDensityMode: DensityMode;
27
+ private _viewState;
28
+ get activeDate(): CalendarDate;
29
+ set activeDate(value: CalendarDate);
30
+ entries: CalendarEntry[];
31
+ color: string;
32
+ get _expandedDate(): CalendarDate | undefined;
33
+ _calendarWidth: number;
34
+ _menuOpen: boolean;
35
+ _menuEventDetails?: {
36
+ heading: string;
37
+ content: string;
38
+ time?: CalendarTimeInterval;
39
+ displayTime: string;
40
+ date?: CalendarDate;
41
+ anchorRect?: DOMRect;
42
+ };
43
+ private _menuTriggerEntry?;
44
+ private _processedEntries;
45
+ /** All entries expanded across their date spans (shared by every view). */
46
+ private _expandedEntries;
47
+ /** Month view: sorted + color-annotated, ready for _renderEntries. */
48
+ private _monthViewSorted;
49
+ /** Mobile badge view: per-day event counts, ready for _renderEntriesSumByDay. */
50
+ private _entrySumByDay;
51
+ /** Day/week view: expanded entries grouped by ISO date for O(1) lookup. */
52
+ private _expandedByISODate;
53
+ /** Day/week view: cached LayoutCalculator results keyed by ISO date. */
54
+ private _layoutCache;
55
+ /** Day/week view: cached all-day row assignments keyed by week/day key. */
56
+ private _allDayLayoutCache;
57
+ private _layoutCalculator;
58
+ private _handleResize;
59
+ private _resizeController;
60
+ static styles: import("lit").CSSResult;
61
+ disconnectedCallback(): void;
62
+ protected updated(changedProperties: PropertyValueMap<never> | Map<PropertyKey, unknown>): void;
63
+ private _handleClickOutside;
64
+ private _handleEscape;
65
+ private _closeMenuAndClearSelections;
66
+ private _returnFocusToTrigger;
67
+ protected firstUpdated(_changedProperties: PropertyValueMap<never> | Map<PropertyKey, unknown>): void;
68
+ /** We filter invalid entries in the willUpdate hook, so be prepared:
69
+ * - This will not be shown
70
+ * ```json
71
+ * { date: ..., time: { start: { hour: 10, minute: 30 }, end: { hour: 10, minute: 00 } } }
72
+ * ```
73
+ * - The same goes for invalid dates meaning the end date being before the start date.
74
+ *
75
+ * We then sort the entries inplace.
76
+ */
77
+ protected willUpdate(changedProperties: PropertyValueMap<never> | Map<PropertyKey, unknown>): void;
78
+ private _clearEntryCaches;
79
+ private _computeEntryCaches;
80
+ render(): import("lit").TemplateResult<1>;
81
+ private _handleSwitchDate;
82
+ private _handleSwitchView;
83
+ private _handleJumpToday;
84
+ private _handlePeekNavigate;
85
+ private _handleExpand;
86
+ private _handleOpenMenu;
87
+ private _handleClearOtherSelections;
88
+ private _handleMenuClose;
89
+ openMenu(eventDetails: {
90
+ heading: string;
91
+ content: string;
92
+ time?: CalendarTimeInterval;
93
+ displayTime: string;
94
+ date?: CalendarDate;
95
+ anchorRect?: DOMRect;
96
+ }): void;
97
+ private _composeEntry;
98
+ private _determineDensity;
99
+ /** Create an array of <lms-calendar-entry> elements for each day the entry spans
100
+ * and add them to the entries array. */
101
+ private _expandEntryMaybe;
102
+ private _createConsistentEventId;
103
+ private _renderEntries;
104
+ private _renderEntriesByDate;
105
+ private _renderEntriesWithSlotManager;
106
+ private _renderDayEntriesWithSlotManager;
107
+ private _renderEntriesSumByDay;
108
+ private _getSmartLayout;
109
+ private _getDaysRange;
110
+ private _isEffectivelyAllDay;
111
+ private _isAllDayEvent;
112
+ }
113
+ declare global {
114
+ interface HTMLElementTagNameMap {
115
+ 'lms-calendar': LMSCalendar;
116
+ 'lms-calendar-header': LMSCalendarHeader;
117
+ 'lms-calendar-month': LMSCalendarMonth;
118
+ 'lms-calendar-week': LMSCalendarWeek;
119
+ 'lms-calendar-day': LMSCalendarDay;
120
+ 'lms-calendar-context': LMSCalendarContext;
121
+ 'lms-calendar-entry': LMSCalendarEntry;
122
+ 'lms-calendar-menu': LMSCalendarMenu;
123
+ 'lms-calendar-year': LMSCalendarYear;
124
+ }
125
+ type CalendarTime = {
126
+ hour: number;
127
+ minute: number;
128
+ };
129
+ type CalendarDateInterval = {
130
+ start: CalendarDate;
131
+ end: CalendarDate;
132
+ };
133
+ type CalendarEntry = {
134
+ date: CalendarDateInterval;
135
+ time: CalendarTimeInterval;
136
+ heading: string;
137
+ content: string;
138
+ color: string;
139
+ isContinuation: boolean;
140
+ continuation?: Continuation;
141
+ };
142
+ type Continuation = {
143
+ has: boolean;
144
+ is: boolean;
145
+ index: number;
146
+ total: number;
147
+ };
148
+ type Interval = {
149
+ start: number;
150
+ end: number;
151
+ };
152
+ type Grading = {
153
+ index: number;
154
+ depth: number;
155
+ group: number;
156
+ };
157
+ type Partition = {
158
+ index?: number;
159
+ depth?: number;
160
+ group?: number;
161
+ start: number;
162
+ end: number;
163
+ };
164
+ }
165
+ export { CalendarDate, CalendarDateInterval, CalendarEntry, CalendarTime, CalendarTimeInterval, Continuation, Grading, Interval, Partition, };
166
+ //# sourceMappingURL=lms-calendar.d.ts.map