@timelinekit/core 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +200 -0
- package/dist/__tests__/calendar/sidebar/calendar-list.test.d.ts +1 -0
- package/dist/__tests__/calendar/sidebar/mini-calendar.test.d.ts +1 -0
- package/dist/__tests__/calendar/test-helpers.d.ts +169 -0
- package/dist/__tests__/calendar/tooltip/calendar-tooltip-renderer.test.d.ts +1 -0
- package/dist/__tests__/calendar/validation.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/agenda-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/day-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/drag-handlers.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/keyboard-navigation.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/month-view.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/swipe-navigation-handler.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/time-grid-helper.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/view-utils.test.d.ts +1 -0
- package/dist/__tests__/calendar/views/week-view.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/dependency-evaluator.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/task-filters.test.d.ts +1 -0
- package/dist/__tests__/ganttchart/model/task-link.test.d.ts +1 -0
- package/dist/calendar/clipboard/calendar-clipboard.d.ts +19 -0
- package/dist/calendar/eventcalendar-context.d.ts +157 -0
- package/dist/calendar/eventcalendar-engine.d.ts +80 -0
- package/dist/calendar/eventcalendar-events.d.ts +40 -0
- package/dist/calendar/eventcalendar-settings.d.ts +30 -0
- package/dist/calendar/export/calendar-data-exporter.d.ts +32 -0
- package/dist/calendar/export/calendar-icalendar-exporter.d.ts +24 -0
- package/dist/calendar/export/calendar-image-exporter.d.ts +17 -0
- package/dist/calendar/export/calendar-pdf-exporter.d.ts +30 -0
- package/dist/calendar/import/calendar-icalendar-importer.d.ts +30 -0
- package/dist/calendar/model/calendar-data.d.ts +34 -0
- package/dist/calendar/model/calendar-entry.d.ts +44 -0
- package/dist/calendar/model/calendar-item.d.ts +151 -0
- package/dist/calendar/model/calendar.d.ts +29 -0
- package/dist/calendar/model/recurrence-editor.d.ts +25 -0
- package/dist/calendar/model/recurrence-exception.d.ts +34 -0
- package/dist/calendar/model/recurrence-expander.d.ts +17 -0
- package/dist/calendar/model/recurrence-rule.d.ts +42 -0
- package/dist/calendar/sidebar/calendar-list.d.ts +13 -0
- package/dist/calendar/sidebar/mini-calendar.d.ts +20 -0
- package/dist/calendar/themes/dark-theme.d.ts +4 -0
- package/dist/calendar/themes/eventcalendar-theme.d.ts +156 -0
- package/dist/calendar/themes/light-theme.d.ts +4 -0
- package/dist/calendar/tooltip/calendar-tooltip-renderer.d.ts +8 -0
- package/dist/calendar/views/agenda-view.d.ts +12 -0
- package/dist/calendar/views/base-view.d.ts +23 -0
- package/dist/calendar/views/day-view.d.ts +11 -0
- package/dist/calendar/views/handlers/allday-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/allday-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/handlers/month-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/month-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/handlers/swipe-navigation-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/time-grid-drag-handler.d.ts +14 -0
- package/dist/calendar/views/handlers/time-grid-entry-drag-handler.d.ts +18 -0
- package/dist/calendar/views/month-view.d.ts +13 -0
- package/dist/calendar/views/time-grid-helper.d.ts +36 -0
- package/dist/calendar/views/view-utils.d.ts +38 -0
- package/dist/calendar/views/week-view.d.ts +16 -0
- package/dist/common/base-background-renderer.d.ts +9 -6
- package/dist/common/base-chart-handler.d.ts +19 -13
- package/dist/common/base-chart-handlers.d.ts +34 -0
- package/dist/common/base-chart-scroll-handler.d.ts +5 -3
- package/dist/common/base-chart.d.ts +98 -0
- package/dist/common/base-divider.d.ts +2 -0
- package/dist/common/base-engine.d.ts +112 -0
- package/dist/common/base-export-renderer.d.ts +26 -0
- package/dist/common/base-header-renderer.d.ts +8 -6
- package/dist/common/base-markers-renderer.d.ts +9 -6
- package/dist/common/base-theme.d.ts +107 -0
- package/dist/common/base-tooltip-renderer.d.ts +7 -0
- package/dist/common/chart-time-axis.d.ts +32 -0
- package/dist/common/common.d.ts +12 -2
- package/dist/common/custom-properties-container.d.ts +14 -0
- package/dist/common/drawing.d.ts +8 -2
- package/dist/common/export-utils.d.ts +34 -7
- package/dist/common/functions.d.ts +1 -1
- package/dist/common/locale.d.ts +101 -0
- package/dist/common/marker.d.ts +13 -0
- package/dist/common/subscription-manager.d.ts +17 -0
- package/dist/common/text.d.ts +9 -9
- package/dist/common/theme-utils.d.ts +5 -0
- package/dist/common/timeline-theme.d.ts +107 -0
- package/dist/common/undo-manager.d.ts +22 -0
- package/dist/common/working-calendar.d.ts +57 -0
- package/dist/ganttchart/chart/chart-scroll-handler.d.ts +1 -1
- package/dist/ganttchart/chart/chart-time-axis.d.ts +2 -32
- package/dist/ganttchart/chart/chart.d.ts +10 -4
- package/dist/ganttchart/chart/handlers/add-task-part.d.ts +14 -7
- package/dist/ganttchart/chart/handlers/connector-dots-handler.d.ts +10 -8
- package/dist/ganttchart/chart/handlers/gantt-drag-handler.d.ts +32 -0
- package/dist/ganttchart/chart/handlers/handler.d.ts +7 -4
- package/dist/ganttchart/chart/handlers/handlers.d.ts +5 -10
- package/dist/ganttchart/chart/handlers/move-milestone.d.ts +9 -7
- package/dist/ganttchart/chart/handlers/move-task-part.d.ts +9 -7
- package/dist/ganttchart/chart/handlers/resize-task-part.d.ts +18 -7
- package/dist/ganttchart/chart/handlers/select-link.d.ts +8 -6
- package/dist/ganttchart/chart/handlers/select-task.d.ts +13 -11
- package/dist/ganttchart/chart/handlers/set-task-progress.d.ts +14 -7
- package/dist/ganttchart/chart/renderers/chart-background-renderer.d.ts +3 -2
- package/dist/ganttchart/chart/renderers/chart-header-renderer.d.ts +2 -2
- package/dist/ganttchart/chart/renderers/chart-links-renderer.d.ts +4 -3
- package/dist/ganttchart/chart/renderers/chart-markers-renderer.d.ts +2 -2
- package/dist/ganttchart/chart/renderers/chart-tasks-renderer.d.ts +9 -9
- package/dist/ganttchart/chart/renderers/renderer-base.d.ts +2 -1
- package/dist/ganttchart/chart/tooltip/chart-tooltip-renderer.d.ts +4 -6
- package/dist/ganttchart/clipboard.d.ts +10 -3
- package/dist/ganttchart/divider/divider.d.ts +1 -1
- package/dist/ganttchart/export/data-exporter.d.ts +12 -7
- package/dist/ganttchart/export/export-common.d.ts +16 -16
- package/dist/ganttchart/export/image-exporter.d.ts +5 -4
- package/dist/ganttchart/export/pdf-exporter.d.ts +7 -6
- package/dist/ganttchart/ganttchart-engine.d.ts +134 -40
- package/dist/ganttchart/locale.d.ts +2 -66
- package/dist/ganttchart/model/dependency-evaluator.d.ts +16 -0
- package/dist/ganttchart/model/lag.d.ts +11 -0
- package/dist/ganttchart/model/length.d.ts +13 -2
- package/dist/ganttchart/model/marker.d.ts +1 -7
- package/dist/ganttchart/model/rate.d.ts +7 -1
- package/dist/ganttchart/model/resource-list.d.ts +11 -0
- package/dist/ganttchart/model/resource.d.ts +15 -1
- package/dist/ganttchart/model/task-filters.d.ts +10 -0
- package/dist/ganttchart/model/task-link.d.ts +15 -2
- package/dist/ganttchart/model/task-list-adapter.d.ts +22 -0
- package/dist/ganttchart/model/task-list.d.ts +55 -2
- package/dist/ganttchart/model/task-part.d.ts +20 -0
- package/dist/ganttchart/model/task-parts-manager.d.ts +44 -0
- package/dist/ganttchart/model/task-resource.d.ts +11 -0
- package/dist/ganttchart/model/task-serializer.d.ts +5 -0
- package/dist/ganttchart/model/task-warnings.d.ts +4 -0
- package/dist/ganttchart/model/task.d.ts +92 -19
- package/dist/ganttchart/model/work.d.ts +14 -1
- package/dist/ganttchart/model/working-calendar.d.ts +2 -32
- package/dist/ganttchart/sheet/renderers/sheet-icons-cell-renderer.d.ts +2 -0
- package/dist/ganttchart/sheet/sheet.d.ts +12 -7
- package/dist/ganttchart/themes/theme.d.ts +63 -108
- package/dist/ganttchart/undo-manager.d.ts +1 -13
- package/dist/index.d.ts +77 -8
- package/dist/index.js +6 -1
- package/dist/licensing/features.d.ts +3 -1
- package/dist/licensing/license-key.d.ts +1 -0
- package/dist/licensing/license-manager.d.ts +4 -1
- package/dist/licensing/watermark.d.ts +1 -0
- package/dist/locales/cs.d.ts +1 -1
- package/dist/locales/cs.js +1 -0
- package/dist/locales/de.d.ts +1 -1
- package/dist/locales/de.js +1 -0
- package/dist/locales/es.d.ts +1 -1
- package/dist/locales/es.js +1 -0
- package/dist/locales/fr.d.ts +1 -1
- package/dist/locales/fr.js +1 -0
- package/dist/locales/it.d.ts +1 -1
- package/dist/locales/it.js +1 -0
- package/dist/locales/ja.d.ts +1 -1
- package/dist/locales/ja.js +1 -0
- package/dist/locales/ko.d.ts +1 -1
- package/dist/locales/ko.js +1 -0
- package/dist/locales/nl.d.ts +1 -1
- package/dist/locales/nl.js +1 -0
- package/dist/locales/pl.d.ts +1 -1
- package/dist/locales/pl.js +1 -0
- package/dist/locales/pt.d.ts +1 -1
- package/dist/locales/pt.js +1 -0
- package/dist/locales/ru.d.ts +1 -1
- package/dist/locales/ru.js +1 -0
- package/dist/locales/sv.d.ts +1 -1
- package/dist/locales/sv.js +1 -0
- package/dist/locales/zh.d.ts +1 -1
- package/dist/locales/zh.js +1 -0
- package/dist/resourcescheduler/chart/handlers/add-event.d.ts +15 -8
- package/dist/resourcescheduler/chart/handlers/move-event.d.ts +10 -8
- package/dist/resourcescheduler/chart/handlers/resize-event.d.ts +21 -8
- package/dist/resourcescheduler/chart/handlers/scheduler-drag-handler.d.ts +32 -0
- package/dist/resourcescheduler/chart/handlers/scheduler-handler.d.ts +5 -3
- package/dist/resourcescheduler/chart/handlers/scheduler-handlers.d.ts +9 -10
- package/dist/resourcescheduler/chart/handlers/select-event.d.ts +10 -8
- package/dist/resourcescheduler/chart/renderers/scheduler-background-renderer.d.ts +2 -1
- package/dist/resourcescheduler/chart/renderers/scheduler-events-renderer.d.ts +2 -1
- package/dist/resourcescheduler/chart/renderers/scheduler-renderer-base.d.ts +1 -0
- package/dist/resourcescheduler/chart/scheduler-chart.d.ts +9 -4
- package/dist/resourcescheduler/chart/tooltip/scheduler-tooltip-renderer.d.ts +2 -4
- package/dist/resourcescheduler/clipboard.d.ts +8 -0
- package/dist/resourcescheduler/export/scheduler-data-exporter.d.ts +5 -0
- package/dist/resourcescheduler/export/scheduler-export-common.d.ts +12 -7
- package/dist/resourcescheduler/export/scheduler-image-exporter.d.ts +2 -1
- package/dist/resourcescheduler/export/scheduler-pdf-exporter.d.ts +3 -1
- package/dist/resourcescheduler/model/scheduler-data-adapter.d.ts +1 -0
- package/dist/resourcescheduler/model/scheduler-data.d.ts +45 -2
- package/dist/resourcescheduler/model/scheduler-event.d.ts +22 -2
- package/dist/resourcescheduler/model/scheduler-layout-calculator.d.ts +18 -0
- package/dist/resourcescheduler/model/scheduler-resource.d.ts +21 -2
- package/dist/resourcescheduler/resourcescheduler-engine.d.ts +134 -42
- package/dist/resourcescheduler/sheet/renderers/scheduler-icon-cell-renderer.d.ts +2 -0
- package/dist/resourcescheduler/sheet/scheduler-sheet.d.ts +11 -6
- package/dist/resourcescheduler/themes/scheduler-themes.d.ts +13 -0
- package/dist/styles/ec.css +1 -0
- package/dist/styles/gc.css +1 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/rs.css +1 -0
- package/dist/table/editors/input-editor.d.ts +1 -0
- package/dist/table/table-column.d.ts +7 -1
- package/dist/table/table-data-source.d.ts +2 -0
- package/dist/table/table-rows-selection.d.ts +1 -0
- package/dist/table/table.d.ts +11 -0
- package/dist/table/tree-table.d.ts +2 -0
- package/package.json +17 -6
- package/styles/_common.scss +12 -1
- package/styles/ec.scss +1225 -0
- package/styles/index.scss +3 -0
- package/dist/ganttchart/model/sheet-column.d.ts +0 -27
- package/dist/ganttchart/sheet/editors/cell-editor.d.ts +0 -23
- package/dist/ganttchart/sheet/editors/currency-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/date-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/decimal-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/dialog-editor.d.ts +0 -17
- package/dist/ganttchart/sheet/editors/input-editor.d.ts +0 -19
- package/dist/ganttchart/sheet/editors/integer-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/percent-editor.d.ts +0 -6
- package/dist/ganttchart/sheet/editors/text-editor.d.ts +0 -5
- package/dist/ganttchart/sheet/sheet-keyboard-navigation.d.ts +0 -26
- package/dist/ganttchart/sheet/sheet-rows-selection.d.ts +0 -24
- /package/dist/__tests__/{critical-path-calculator.test.d.ts → calendar/calendar-clipboard.test.d.ts} +0 -0
- /package/dist/__tests__/{model/lag.test.d.ts → calendar/eventcalendar-engine.test.d.ts} +0 -0
- /package/dist/__tests__/{model/length.test.d.ts → calendar/export/calendar-data-export.test.d.ts} +0 -0
- /package/dist/__tests__/{model/resource-list.test.d.ts → calendar/export/calendar-export.test.d.ts} +0 -0
- /package/dist/__tests__/{model/resource.test.d.ts → calendar/export/calendar-icalendar.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-list.test.d.ts → calendar/model/calendar-data.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-part.test.d.ts → calendar/model/calendar-item-recurrence.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-resource.test.d.ts → calendar/model/calendar-item-types.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task-warnings.test.d.ts → calendar/model/calendar-occurrence.test.d.ts} +0 -0
- /package/dist/__tests__/{model/task.test.d.ts → calendar/model/calendar.test.d.ts} +0 -0
- /package/dist/__tests__/{model/work.test.d.ts → calendar/model/recurrence-editor.test.d.ts} +0 -0
- /package/dist/__tests__/{model/working-calendar.test.d.ts → calendar/model/recurrence-expander.test.d.ts} +0 -0
- /package/dist/__tests__/{undo-manager.test.d.ts → calendar/model/recurrence-rule.test.d.ts} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type RecurrenceFrequency = 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
2
|
+
export type Weekday = 'mo' | 'tu' | 'we' | 'th' | 'fr' | 'sa' | 'su';
|
|
3
|
+
export interface WeekdayOrdinal {
|
|
4
|
+
day: Weekday;
|
|
5
|
+
ordinal?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface RecurrenceRuleInit {
|
|
8
|
+
frequency: RecurrenceFrequency;
|
|
9
|
+
interval?: number;
|
|
10
|
+
until?: Date | null;
|
|
11
|
+
count?: number | null;
|
|
12
|
+
byDay?: WeekdayOrdinal[];
|
|
13
|
+
byMonthDay?: number[];
|
|
14
|
+
byMonth?: number[];
|
|
15
|
+
bySetPos?: number[];
|
|
16
|
+
weekStart?: Weekday;
|
|
17
|
+
}
|
|
18
|
+
export declare class RecurrenceRule {
|
|
19
|
+
#private;
|
|
20
|
+
readonly frequency: RecurrenceFrequency;
|
|
21
|
+
readonly interval: number;
|
|
22
|
+
readonly until: Date | null;
|
|
23
|
+
readonly count: number | null;
|
|
24
|
+
readonly byDay: readonly WeekdayOrdinal[];
|
|
25
|
+
readonly byMonthDay: readonly number[];
|
|
26
|
+
readonly byMonth: readonly number[];
|
|
27
|
+
readonly bySetPos: readonly number[];
|
|
28
|
+
readonly weekStart: Weekday;
|
|
29
|
+
constructor(init: RecurrenceRuleInit);
|
|
30
|
+
static fromString(rrule: string): RecurrenceRule;
|
|
31
|
+
toString(): string;
|
|
32
|
+
toAny(): any;
|
|
33
|
+
static fromAny(data: any): RecurrenceRule;
|
|
34
|
+
/**
|
|
35
|
+
* Generates occurrence dates within a time range.
|
|
36
|
+
* @param dtStart - master event start time (first occurrence)
|
|
37
|
+
* @param rangeStart - beginning of the visible window
|
|
38
|
+
* @param rangeEnd - end of the visible window
|
|
39
|
+
* @returns sorted array of occurrence start dates
|
|
40
|
+
*/
|
|
41
|
+
expandBetween(dtStart: Date, rangeStart: Date, rangeEnd: Date): Date[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
2
|
+
/**
|
|
3
|
+
* Calendar list widget for the sidebar.
|
|
4
|
+
*
|
|
5
|
+
* Renders a checklist of all calendars with color indicators, visibility
|
|
6
|
+
* toggles, remove buttons, and an "Add calendar" action.
|
|
7
|
+
*/
|
|
8
|
+
export declare class CalendarList {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
11
|
+
render(): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
2
|
+
/**
|
|
3
|
+
* Compact month calendar for the sidebar.
|
|
4
|
+
*
|
|
5
|
+
* Two display modes:
|
|
6
|
+
* 1. Day grid — 6×7 grid of day numbers with selection highlight.
|
|
7
|
+
* 2. Month picker — 4×3 grid of month names (activated by clicking the year).
|
|
8
|
+
*
|
|
9
|
+
* Selection highlight adapts to the current viewMode:
|
|
10
|
+
* - day → single day circled
|
|
11
|
+
* - week → full week row highlighted
|
|
12
|
+
* - month → all days of the current month highlighted
|
|
13
|
+
*/
|
|
14
|
+
export declare class MiniCalendar {
|
|
15
|
+
#private;
|
|
16
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
17
|
+
render(): void;
|
|
18
|
+
navigateToMonth(year: number, month: number): void;
|
|
19
|
+
destroy(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Font } from "../../common/common";
|
|
2
|
+
import { BaseTaskColor } from "../../common/base-theme";
|
|
3
|
+
export type { ColorDefinition, ColorValue } from "../../common/base-theme";
|
|
4
|
+
/** Color palette for a single calendar entry color. */
|
|
5
|
+
export declare class EventCalendarEntryColor extends BaseTaskColor {
|
|
6
|
+
/** Background color for compact "chip" display (single-line entries in month view). */
|
|
7
|
+
chipBackgroundColor: string;
|
|
8
|
+
/** Text color for compact "chip" display. */
|
|
9
|
+
chipTextColor: string;
|
|
10
|
+
/** Text color for full-block entries (multi-day bars, timed blocks). */
|
|
11
|
+
textColor: string;
|
|
12
|
+
}
|
|
13
|
+
/** Style settings for the calendar toolbar area. */
|
|
14
|
+
export declare class EventCalendarToolbarStyle {
|
|
15
|
+
backgroundColor: string;
|
|
16
|
+
textColor: string;
|
|
17
|
+
borderColor: string;
|
|
18
|
+
buttonColor: string;
|
|
19
|
+
buttonHoverBackgroundColor: string;
|
|
20
|
+
activeViewButtonBackgroundColor: string;
|
|
21
|
+
activeViewButtonTextColor: string;
|
|
22
|
+
height: number;
|
|
23
|
+
}
|
|
24
|
+
/** Style settings for the calendar header (day names in month view, day headers in week/day view). */
|
|
25
|
+
export declare class EventCalendarHeaderStyle {
|
|
26
|
+
backgroundColor: string;
|
|
27
|
+
textColor: string;
|
|
28
|
+
borderColor: string;
|
|
29
|
+
todayTextColor: string;
|
|
30
|
+
todayBackgroundColor: string;
|
|
31
|
+
weekendTextColor: string;
|
|
32
|
+
}
|
|
33
|
+
/** Style settings for the main calendar content area. */
|
|
34
|
+
export declare class EventCalendarContentStyle {
|
|
35
|
+
backgroundColor: string;
|
|
36
|
+
textColor: string;
|
|
37
|
+
gridLineColor: string;
|
|
38
|
+
/** Background color for the entire today cell/column. */
|
|
39
|
+
todayBackgroundColor: string;
|
|
40
|
+
/** Background color for weekend cells/columns. */
|
|
41
|
+
weekendBackgroundColor: string;
|
|
42
|
+
/** Background color for days belonging to a different month (month view only). */
|
|
43
|
+
otherMonthBackgroundColor: string;
|
|
44
|
+
/** Text color for day numbers of a different month. */
|
|
45
|
+
otherMonthTextColor: string;
|
|
46
|
+
/** Color of the horizontal hour separator lines (week/day view). */
|
|
47
|
+
hourLineColor: string;
|
|
48
|
+
/** Color of the half-hour separator lines (week/day view). */
|
|
49
|
+
halfHourLineColor: string;
|
|
50
|
+
/** Color of the current time indicator line and dot (week/day view). */
|
|
51
|
+
currentTimeLineColor: string;
|
|
52
|
+
/** Thickness of the current time indicator line in pixels (week/day view). */
|
|
53
|
+
currentTimeLineHeight: number;
|
|
54
|
+
/** Height of one time slot in pixels (week/day view). Each slot = slotDuration minutes. */
|
|
55
|
+
slotHeight: number;
|
|
56
|
+
/** Height of the day number header inside each day cell (month view). */
|
|
57
|
+
dayHeaderHeight: number;
|
|
58
|
+
/** Height of an entry bar/chip in month view. */
|
|
59
|
+
entryHeight: number;
|
|
60
|
+
/** Vertical gap between entries. */
|
|
61
|
+
entryGap: number;
|
|
62
|
+
/** Border radius for entry elements. */
|
|
63
|
+
entryBorderRadius: number;
|
|
64
|
+
/** Width of the left accent border on entries. */
|
|
65
|
+
entryAccentBorderWidth: number;
|
|
66
|
+
/** Minimum height of an entry in week/day view. */
|
|
67
|
+
entryMinHeight: number;
|
|
68
|
+
/** Opacity for declined meetings. */
|
|
69
|
+
declinedOpacity: number;
|
|
70
|
+
/** Color of the "+N more" text in month view when entries overflow. */
|
|
71
|
+
moreTextColor: string;
|
|
72
|
+
/** Color palette for entry colors. Entries reference these by index or custom ColorDefinition. */
|
|
73
|
+
entryColors: EventCalendarEntryColor[];
|
|
74
|
+
/** Color of the hover overlay on day cells. */
|
|
75
|
+
hoverBackgroundColor: string;
|
|
76
|
+
/** Background color for the selected entry. */
|
|
77
|
+
selectedEntryOutlineColor: string;
|
|
78
|
+
/** Background overlay during drag-to-create. */
|
|
79
|
+
dragHighlightColor: string;
|
|
80
|
+
/** Scrollbar colors for the scrollable content area. */
|
|
81
|
+
scrollbarThumbColor: string;
|
|
82
|
+
scrollbarTrackColor: string;
|
|
83
|
+
/** Background color for day headers in agenda view. */
|
|
84
|
+
agendaDayHeaderBackgroundColor: string;
|
|
85
|
+
/** Text color for day headers in agenda view. */
|
|
86
|
+
agendaDayHeaderTextColor: string;
|
|
87
|
+
/** Height of each entry row in agenda view (px). */
|
|
88
|
+
agendaEntryHeight: number;
|
|
89
|
+
/** Vertical gap between entry rows in agenda view (px). */
|
|
90
|
+
agendaEntryGap: number;
|
|
91
|
+
/** Hover background color for entries in agenda view. */
|
|
92
|
+
agendaEntryHoverBackgroundColor: string;
|
|
93
|
+
/** Text color for the empty state message in agenda view. */
|
|
94
|
+
agendaEmptyTextColor: string;
|
|
95
|
+
/** Width of the time column in agenda view (px). */
|
|
96
|
+
agendaTimeWidth: number;
|
|
97
|
+
/** Color of the focus ring when an entry or interactive element is focused via keyboard. */
|
|
98
|
+
focusOutlineColor: string;
|
|
99
|
+
/** Width of the focus ring in pixels. */
|
|
100
|
+
focusOutlineWidth: number;
|
|
101
|
+
/** Offset of the focus ring from the element edge in pixels. */
|
|
102
|
+
focusOutlineOffset: number;
|
|
103
|
+
constructor();
|
|
104
|
+
}
|
|
105
|
+
/** Style settings for the sidebar (mini calendar + calendar list). */
|
|
106
|
+
export declare class EventCalendarSidebarStyle {
|
|
107
|
+
backgroundColor: string;
|
|
108
|
+
textColor: string;
|
|
109
|
+
borderColor: string;
|
|
110
|
+
width: number;
|
|
111
|
+
/** Mini-calendar styles. */
|
|
112
|
+
miniCalendarTodayTextColor: string;
|
|
113
|
+
miniCalendarTodayBackgroundColor: string;
|
|
114
|
+
miniCalendarTodayDotColor: string;
|
|
115
|
+
miniCalendarSelectedBackgroundColor: string;
|
|
116
|
+
miniCalendarSelectedTextColor: string;
|
|
117
|
+
miniCalendarOtherMonthTextColor: string;
|
|
118
|
+
miniCalendarWeekendTextColor: string;
|
|
119
|
+
miniCalendarHoverBackgroundColor: string;
|
|
120
|
+
miniCalendarDayWithEventsColor: string;
|
|
121
|
+
/** Calendar list styles. */
|
|
122
|
+
calendarListHeaderTextColor: string;
|
|
123
|
+
calendarListCheckboxColor: string;
|
|
124
|
+
}
|
|
125
|
+
/** Style settings for the all-day section (week/day view). */
|
|
126
|
+
export declare class EventCalendarAllDayStyle {
|
|
127
|
+
backgroundColor: string;
|
|
128
|
+
borderColor: string;
|
|
129
|
+
textColor: string;
|
|
130
|
+
minHeight: number;
|
|
131
|
+
maxHeight: number;
|
|
132
|
+
maxVisibleRows: number;
|
|
133
|
+
rowHeight: number;
|
|
134
|
+
}
|
|
135
|
+
/** Style settings for the time gutter (week/day view). */
|
|
136
|
+
export declare class EventCalendarTimeGutterStyle {
|
|
137
|
+
backgroundColor: string;
|
|
138
|
+
textColor: string;
|
|
139
|
+
borderColor: string;
|
|
140
|
+
width: number;
|
|
141
|
+
fontSize: number;
|
|
142
|
+
}
|
|
143
|
+
/** Base class for EventCalendar visual themes. Extend to create custom themes. */
|
|
144
|
+
export declare abstract class EventCalendarTheme {
|
|
145
|
+
/** Default font used throughout the component. */
|
|
146
|
+
font: Font;
|
|
147
|
+
/** Color scheme hint for browser-native elements (scrollbars, inputs). */
|
|
148
|
+
colorScheme: 'light' | 'dark';
|
|
149
|
+
toolbar: EventCalendarToolbarStyle;
|
|
150
|
+
header: EventCalendarHeaderStyle;
|
|
151
|
+
content: EventCalendarContentStyle;
|
|
152
|
+
sidebar: EventCalendarSidebarStyle;
|
|
153
|
+
allDay: EventCalendarAllDayStyle;
|
|
154
|
+
timeGutter: EventCalendarTimeGutterStyle;
|
|
155
|
+
constructor();
|
|
156
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
2
|
+
/** DOM-based tooltip renderer for EventCalendar entries. */
|
|
3
|
+
export declare class CalendarTooltipRenderer {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
6
|
+
hide(): void;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCalendarView } from "./base-view";
|
|
2
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
3
|
+
/** Agenda/list view — chronological list of entries grouped by day. */
|
|
4
|
+
export declare class AgendaView extends BaseCalendarView {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
7
|
+
getVisibleRange(currentDate: Date): {
|
|
8
|
+
start: Date;
|
|
9
|
+
end: Date;
|
|
10
|
+
};
|
|
11
|
+
render(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Subscription } from "rxjs";
|
|
2
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
3
|
+
/** Base class for all calendar views (month, week, day). */
|
|
4
|
+
export declare abstract class BaseCalendarView {
|
|
5
|
+
protected ec: EventCalendarContext;
|
|
6
|
+
protected element: HTMLElement;
|
|
7
|
+
protected subscriptions: Subscription;
|
|
8
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
9
|
+
/** Show this view and trigger rendering. */
|
|
10
|
+
show(): void;
|
|
11
|
+
/** Hide this view. */
|
|
12
|
+
hide(): void;
|
|
13
|
+
/** Whether this view is currently visible. */
|
|
14
|
+
get isVisible(): boolean;
|
|
15
|
+
/** Full re-render of the view content. */
|
|
16
|
+
abstract render(): void;
|
|
17
|
+
/** Returns the visible date range for this view given the current date. */
|
|
18
|
+
abstract getVisibleRange(currentDate: Date): {
|
|
19
|
+
start: Date;
|
|
20
|
+
end: Date;
|
|
21
|
+
};
|
|
22
|
+
destroy(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WeekView } from "./week-view";
|
|
2
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
3
|
+
/** Day calendar view — single day column with time slots. */
|
|
4
|
+
export declare class DayView extends WeekView {
|
|
5
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
6
|
+
protected get dayCount(): number;
|
|
7
|
+
getVisibleRange(currentDate: Date): {
|
|
8
|
+
start: Date;
|
|
9
|
+
end: Date;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
/** Handles drag-to-create interaction on the all-day section of week/day views. */
|
|
3
|
+
export declare class AllDayDragHandler {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(ec: EventCalendarContext);
|
|
6
|
+
/** Whether the last pointerdown resulted in a drag (moved to a different cell). */
|
|
7
|
+
get didDrag(): boolean;
|
|
8
|
+
/** Attach drag-to-create to the all-day row. Call during render. */
|
|
9
|
+
attach(allDayRow: HTMLElement, days: Date[]): void;
|
|
10
|
+
/** Cancel any active drag. Call before re-render. */
|
|
11
|
+
cancel(): void;
|
|
12
|
+
/** Full cleanup. */
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
import type { CalendarEntry } from "../../model/calendar-entry";
|
|
3
|
+
/**
|
|
4
|
+
* Handles drag-to-move interaction on existing all-day entries
|
|
5
|
+
* in the week/day views.
|
|
6
|
+
*/
|
|
7
|
+
export declare class AllDayEntryDragHandler {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(ec: EventCalendarContext);
|
|
10
|
+
get didDrag(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Start dragging an all-day entry.
|
|
13
|
+
* Call from the entry's pointerdown handler.
|
|
14
|
+
*/
|
|
15
|
+
startDrag(e: PointerEvent, entry: CalendarEntry, entryEl: HTMLElement, allDayRow: HTMLElement, days: Date[]): void;
|
|
16
|
+
cancel(): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
/** Handles drag-to-create interaction on month view day cells. */
|
|
3
|
+
export declare class MonthDragHandler {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(ec: EventCalendarContext);
|
|
6
|
+
/** Whether the last pointerdown resulted in a drag (moved to a different cell). */
|
|
7
|
+
get didDrag(): boolean;
|
|
8
|
+
/** Attach drag-to-create to the month grid. Call during render. */
|
|
9
|
+
attach(gridElement: HTMLElement, gridStartDate: Date): void;
|
|
10
|
+
/** Cancel any active drag. Call before re-render. */
|
|
11
|
+
cancel(): void;
|
|
12
|
+
/** Full cleanup. */
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
import type { CalendarEntry } from "../../model/calendar-entry";
|
|
3
|
+
/**
|
|
4
|
+
* Handles drag-to-move interaction on existing entries in the month view.
|
|
5
|
+
* Drags an entry from one day cell to another.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MonthEntryDragHandler {
|
|
8
|
+
#private;
|
|
9
|
+
constructor(ec: EventCalendarContext);
|
|
10
|
+
get didDrag(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Start dragging an entry from a specific cell.
|
|
13
|
+
* Call from the entry's pointerdown handler.
|
|
14
|
+
*/
|
|
15
|
+
startDrag(e: PointerEvent, entry: CalendarEntry, entryEl: HTMLElement, cells: HTMLElement[], gridStartDate: Date): void;
|
|
16
|
+
cancel(): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Handles horizontal swipe gestures for view navigation on touch devices. */
|
|
2
|
+
export declare class SwipeNavigationHandler {
|
|
3
|
+
#private;
|
|
4
|
+
/** Minimum horizontal distance (px) to recognize a swipe. */
|
|
5
|
+
static SWIPE_THRESHOLD: number;
|
|
6
|
+
/** Maximum |deltaY| / |deltaX| ratio — rejects diagonal/vertical gestures. */
|
|
7
|
+
static MAX_VERTICAL_RATIO: number;
|
|
8
|
+
/** Maximum gesture duration (ms). */
|
|
9
|
+
static MAX_DURATION: number;
|
|
10
|
+
/** Maximum visual translate offset (px) during swipe. */
|
|
11
|
+
static PEEK_MAX: number;
|
|
12
|
+
constructor(element: HTMLElement, onSwipeLeft: () => void, onSwipeRight: () => void);
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
/** Handles drag-to-create interaction on time grid day columns. */
|
|
3
|
+
export declare class TimeGridDragHandler {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(ec: EventCalendarContext);
|
|
6
|
+
/** Whether the last pointerdown resulted in a drag (moved at least one slot). */
|
|
7
|
+
get didDrag(): boolean;
|
|
8
|
+
/** Attach drag-to-create to a day column. Call for each column during render. */
|
|
9
|
+
attach(column: HTMLElement, day: Date, pxPerMinute: number, slotDuration: number): void;
|
|
10
|
+
/** Cancel any active drag. Call before re-render. */
|
|
11
|
+
cancel(): void;
|
|
12
|
+
/** Full cleanup. */
|
|
13
|
+
destroy(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { EventCalendarContext } from "../../eventcalendar-context";
|
|
2
|
+
import type { CalendarEntry } from "../../model/calendar-entry";
|
|
3
|
+
export type EntryDragMode = 'move' | 'resize-start' | 'resize-end';
|
|
4
|
+
/**
|
|
5
|
+
* Handles drag-to-move and drag-to-resize interactions on existing entries
|
|
6
|
+
* in the time grid (week/day views).
|
|
7
|
+
*/
|
|
8
|
+
export declare class TimeGridEntryDragHandler {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(ec: EventCalendarContext);
|
|
11
|
+
/**
|
|
12
|
+
* Attach move/resize handling to an entry element.
|
|
13
|
+
* Call for each rendered timed entry during render.
|
|
14
|
+
*/
|
|
15
|
+
attach(entryEl: HTMLElement, entry: CalendarEntry, column: HTMLElement, day: Date, pxPerMinute: number, slotDuration: number, allColumns?: HTMLElement[], allDays?: Date[]): void;
|
|
16
|
+
cancel(): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseCalendarView } from "./base-view";
|
|
2
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
3
|
+
/** Monthly calendar view — 6-row × 7-column grid of day cells. */
|
|
4
|
+
export declare class MonthView extends BaseCalendarView {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
7
|
+
getVisibleRange(currentDate: Date): {
|
|
8
|
+
start: Date;
|
|
9
|
+
end: Date;
|
|
10
|
+
};
|
|
11
|
+
render(): void;
|
|
12
|
+
destroy(): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { CalendarEntry } from "../model/calendar-entry";
|
|
2
|
+
/** Layout info for a single timed entry after overlap resolution. */
|
|
3
|
+
export interface EntryLayout {
|
|
4
|
+
entry: CalendarEntry;
|
|
5
|
+
/** 0-based column index within the overlap group. */
|
|
6
|
+
column: number;
|
|
7
|
+
/** Total number of columns in this overlap group. */
|
|
8
|
+
totalColumns: number;
|
|
9
|
+
}
|
|
10
|
+
/** An entry assigned to a specific day column. */
|
|
11
|
+
export interface DayEntries {
|
|
12
|
+
date: Date;
|
|
13
|
+
allDay: CalendarEntry[];
|
|
14
|
+
timed: CalendarEntry[];
|
|
15
|
+
}
|
|
16
|
+
/** Static helpers shared by WeekView and DayView. */
|
|
17
|
+
export declare class TimeGridHelper {
|
|
18
|
+
/** Returns hour labels for the gutter (0–23 full range). */
|
|
19
|
+
static getHourLabels(locale: string): string[];
|
|
20
|
+
/** Converts a time to a vertical pixel offset from midnight. */
|
|
21
|
+
static timeToY(time: Date, pxPerMinute: number): number;
|
|
22
|
+
/** Returns the pixel height for a duration. */
|
|
23
|
+
static durationToHeight(startTime: Date, endTime: Date, pxPerMinute: number): number;
|
|
24
|
+
/**
|
|
25
|
+
* Splits entries into per-day buckets, separating all-day from timed entries.
|
|
26
|
+
* An entry is considered all-day if isAllDay is true OR if it spans more than 24 hours.
|
|
27
|
+
*/
|
|
28
|
+
static splitByDay(entries: CalendarEntry[], days: Date[]): DayEntries[];
|
|
29
|
+
/**
|
|
30
|
+
* Resolves overlapping timed entries into side-by-side columns.
|
|
31
|
+
*
|
|
32
|
+
* Algorithm: sweep-line grouping → greedy column assignment.
|
|
33
|
+
* Returns entries with their column index and total column count.
|
|
34
|
+
*/
|
|
35
|
+
static resolveOverlaps(entries: CalendarEntry[]): EntryLayout[];
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CalendarEntry } from "../model/calendar-entry";
|
|
2
|
+
import type { CalendarData } from "../model/calendar-data";
|
|
3
|
+
import type { EventCalendarEntryColor } from "../themes/eventcalendar-theme";
|
|
4
|
+
import type { EventCalendarTheme } from "../themes/eventcalendar-theme";
|
|
5
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
6
|
+
/** Resolves an entry's effective color from theme palette. */
|
|
7
|
+
export declare function resolveEntryColor(entry: CalendarEntry, data: CalendarData, theme: EventCalendarTheme): EventCalendarEntryColor;
|
|
8
|
+
/**
|
|
9
|
+
* Applies responseStatus-based visual styling to an entry element.
|
|
10
|
+
*
|
|
11
|
+
* Only affects meetings. Non-meeting types always get the default (accepted) look.
|
|
12
|
+
*
|
|
13
|
+
* - accepted: solid fill (default)
|
|
14
|
+
* - tentative: diagonal stripes
|
|
15
|
+
* - needsAction: outline only (transparent background)
|
|
16
|
+
* - declined: outline only, muted, strikethrough text
|
|
17
|
+
*/
|
|
18
|
+
export declare function applyResponseStatusStyle(entryEl: HTMLElement, entry: CalendarEntry, color: EventCalendarEntryColor): void;
|
|
19
|
+
/**
|
|
20
|
+
* Invokes the custom entry rendering callback if set.
|
|
21
|
+
* If the callback returns true, the element's default content is replaced.
|
|
22
|
+
*/
|
|
23
|
+
export declare function applyEntryRendering(entryEl: HTMLElement, entry: CalendarEntry, isAllDay: boolean, ec: EventCalendarContext): void;
|
|
24
|
+
/**
|
|
25
|
+
* Appends type/recurring icons to an entry element and then the title text.
|
|
26
|
+
* Replaces direct `textContent` assignment for entry elements.
|
|
27
|
+
*/
|
|
28
|
+
export declare function appendEntryContent(el: HTMLElement, entry: CalendarEntry): void;
|
|
29
|
+
/**
|
|
30
|
+
* Attaches focus/blur listeners that show a keyboard focus ring via CSS custom properties.
|
|
31
|
+
* The ring is suppressed during mouse interaction to avoid visual noise.
|
|
32
|
+
*/
|
|
33
|
+
export declare function applyFocusRing(el: HTMLElement): void;
|
|
34
|
+
/**
|
|
35
|
+
* Updates aria-selected and visual outline on entry elements to reflect current selection.
|
|
36
|
+
* Call from selectedEntries$ subscription in each view.
|
|
37
|
+
*/
|
|
38
|
+
export declare function updateSelectionVisuals(container: HTMLElement, selectedEntries: CalendarEntry[]): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCalendarView } from "./base-view";
|
|
2
|
+
import type { EventCalendarContext } from "../eventcalendar-context";
|
|
3
|
+
/** Weekly calendar view — 7 day columns with time slots. */
|
|
4
|
+
export declare class WeekView extends BaseCalendarView {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(ec: EventCalendarContext, container: HTMLElement);
|
|
7
|
+
protected get dayCount(): number;
|
|
8
|
+
protected getDays(currentDate: Date): Date[];
|
|
9
|
+
show(): void;
|
|
10
|
+
getVisibleRange(currentDate: Date): {
|
|
11
|
+
start: Date;
|
|
12
|
+
end: Date;
|
|
13
|
+
};
|
|
14
|
+
render(): void;
|
|
15
|
+
destroy(): void;
|
|
16
|
+
}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { BehaviorSubject } from "rxjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { CanvasLike } from "./common";
|
|
3
|
+
import { ChartTimeline } from "./chart-time-axis";
|
|
4
|
+
import { BaseTheme } from "./base-theme";
|
|
5
|
+
import { WorkingCalendar } from "./working-calendar";
|
|
5
6
|
export interface BackgroundRendererContext {
|
|
6
7
|
timeline: ChartTimeline;
|
|
7
|
-
theme$:
|
|
8
|
+
theme$: {
|
|
9
|
+
getValue(): BaseTheme;
|
|
10
|
+
};
|
|
8
11
|
showGridLines$: BehaviorSubject<boolean>;
|
|
9
12
|
calendar: WorkingCalendar;
|
|
10
13
|
}
|
|
11
14
|
export declare abstract class BaseBackgroundRenderer {
|
|
12
15
|
#private;
|
|
13
16
|
constructor(ctx: BackgroundRendererContext);
|
|
14
|
-
render(canvas:
|
|
17
|
+
render(canvas: CanvasLike): void;
|
|
15
18
|
protected abstract getContentBottom(canvasHeight: number): number;
|
|
16
|
-
protected abstract drawHorizontalGridLines(canvas:
|
|
19
|
+
protected abstract drawHorizontalGridLines(canvas: CanvasLike, ctx: CanvasRenderingContext2D): void;
|
|
17
20
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
2
|
import { Cursor, Point } from "./common";
|
|
3
3
|
import { ChartHandlerResult } from "./handler-result";
|
|
4
|
-
import { ChartTimeline } from "
|
|
5
|
-
import { WorkingCalendar } from "
|
|
4
|
+
import { ChartTimeline } from "./chart-time-axis";
|
|
5
|
+
import { WorkingCalendar } from "./working-calendar";
|
|
6
|
+
/** Pixel tolerance for snapping to edges during resize/progress operations. */
|
|
7
|
+
export declare const SNAP_WIDTH = 6;
|
|
6
8
|
/**
|
|
7
9
|
* Interface for the context needed by chart handlers.
|
|
8
10
|
* Both GanttChartContext and ResourceSchedulerContext satisfy this.
|
|
@@ -27,27 +29,31 @@ export declare abstract class BaseChartHandlerBase {
|
|
|
27
29
|
ignoreRightButton: boolean;
|
|
28
30
|
ignoreWhenCannotEdit: boolean;
|
|
29
31
|
alwaysHandleEvents: boolean;
|
|
30
|
-
protected canvas:
|
|
32
|
+
protected canvas: HTMLCanvasElement;
|
|
31
33
|
operationComplete$: Subject<void>;
|
|
32
34
|
get canEdit(): boolean;
|
|
33
35
|
constructor(ctx: ChartHandlerContext);
|
|
34
36
|
set isInOperation(value: boolean);
|
|
35
37
|
get isInOperation(): boolean;
|
|
36
|
-
onMouseMove(p: Point, event:
|
|
37
|
-
onMouseDown(p: Point, ctrl: boolean, event:
|
|
38
|
-
onMouseUp(p: Point, ctrl: boolean, event:
|
|
39
|
-
onKeyDown(key: string, event:
|
|
40
|
-
onMouseLeave(p: Point, event:
|
|
41
|
-
onContextMenu(p: Point, event:
|
|
42
|
-
onDblClick(p: Point, event:
|
|
43
|
-
onDocumentMouseMove(p: Point, event:
|
|
44
|
-
onDocumentMouseUp(p: Point, event:
|
|
38
|
+
onMouseMove(p: Point, event: MouseEvent): Promise<ChartHandlerResult>;
|
|
39
|
+
onMouseDown(p: Point, ctrl: boolean, event: MouseEvent): Promise<ChartHandlerResult>;
|
|
40
|
+
onMouseUp(p: Point, ctrl: boolean, event: MouseEvent): Promise<ChartHandlerResult>;
|
|
41
|
+
onKeyDown(key: string, event: KeyboardEvent): Promise<ChartHandlerResult>;
|
|
42
|
+
onMouseLeave(p: Point, event: MouseEvent): Promise<ChartHandlerResult>;
|
|
43
|
+
onContextMenu(p: Point, event: MouseEvent): ChartHandlerResult;
|
|
44
|
+
onDblClick(p: Point, event: MouseEvent): ChartHandlerResult;
|
|
45
|
+
onDocumentMouseMove(p: Point, event: MouseEvent): ChartHandlerResult;
|
|
46
|
+
onDocumentMouseUp(p: Point, event: MouseEvent): ChartHandlerResult;
|
|
45
47
|
clear(): void;
|
|
46
|
-
init(canvas:
|
|
48
|
+
init(canvas: HTMLCanvasElement): void;
|
|
47
49
|
onRedrawn(): void;
|
|
48
50
|
onBackgroundRedrawn(): void;
|
|
51
|
+
/** Converts a date to an X pixel coordinate (floored) relative to the current visible start. */
|
|
52
|
+
protected dateToX(date: Date): number;
|
|
49
53
|
protected getCellAt(p: Point): number;
|
|
50
54
|
protected getCellEndAligned(p: Point): number;
|
|
51
55
|
protected getEndTimeAligned(cellEndAligned: number): Date;
|
|
56
|
+
/** Converts a rounded cell index to a Date via the current timeline axis. */
|
|
57
|
+
protected cellToDate(cell: number): Date;
|
|
52
58
|
protected setCursor(cursor: Cursor): void;
|
|
53
59
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Subject } from "rxjs";
|
|
2
|
+
import { Point } from "./common";
|
|
3
|
+
import { BaseChartHandlerBase } from "./base-chart-handler";
|
|
4
|
+
import { ClassWithListeners } from "./class-with-listeners";
|
|
5
|
+
import { AutoScrollHelper } from "./auto-scroll";
|
|
6
|
+
import { ChartTimeline } from "./chart-time-axis";
|
|
7
|
+
export interface BaseHandlersContext {
|
|
8
|
+
timeline: ChartTimeline;
|
|
9
|
+
canEdit: boolean;
|
|
10
|
+
autoScrolling: boolean;
|
|
11
|
+
chartRedrawn$: Subject<void>;
|
|
12
|
+
chartBackgroundRedrawn$: Subject<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare abstract class BaseChartHandlers<THandler extends BaseChartHandlerBase> extends ClassWithListeners {
|
|
15
|
+
#private;
|
|
16
|
+
operationComplete$: Subject<void>;
|
|
17
|
+
redraw$: Subject<void>;
|
|
18
|
+
constructor(ctx: BaseHandlersContext, chartElement: HTMLElement);
|
|
19
|
+
protected get chartElement(): HTMLElement;
|
|
20
|
+
protected addHandler(handler: THandler): void;
|
|
21
|
+
protected addSubscription(sub: any): void;
|
|
22
|
+
/** Call from subclass constructor after all handlers are registered. */
|
|
23
|
+
protected wireHandlers(): void;
|
|
24
|
+
getMousePosition(event: MouseEvent): Point;
|
|
25
|
+
init(chartElement: HTMLElement, canvas: HTMLCanvasElement): void;
|
|
26
|
+
protected createAutoScroll(chartElement: HTMLElement): AutoScrollHelper;
|
|
27
|
+
protected onAutoScroll(dx: number, dy: number): void;
|
|
28
|
+
protected registerKeydownListener(_chartElement: HTMLElement): void;
|
|
29
|
+
protected handleKeyDown(event: KeyboardEvent): Promise<void>;
|
|
30
|
+
protected onBeforeMouseDown(): void;
|
|
31
|
+
protected onAfterContextMenu(p: Point, event: MouseEvent): void;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
clear(): void;
|
|
34
|
+
}
|