ud-components 0.6.2 → 0.7.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.
@@ -0,0 +1,13 @@
1
+ export declare function isIsoDate(value: string | null | undefined): value is string;
2
+ /** Days since 1970-01-01 for a YYYY-MM-DD string. Throws on anything else. */
3
+ export declare function epochDay(iso: string): number;
4
+ /** `b - a` in whole days. Positive when b is after a. */
5
+ export declare function daysBetween(a: string, b: string): number;
6
+ export declare function addDays(iso: string, days: number): string;
7
+ /** 0 = Sunday … 6 = Saturday, for the calendar date itself. */
8
+ export declare function weekday(iso: string): number;
9
+ export declare function monthOf(iso: string): number;
10
+ export declare function yearOf(iso: string): number;
11
+ export declare function dayOfMonth(iso: string): number;
12
+ export declare function maxIso(a: string, b: string): string;
13
+ export declare function minIso(a: string, b: string): string;
@@ -0,0 +1,236 @@
1
+ import { DestroyRef } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { OccupancyBar, OccupancyBarClick, OccupancyBarMove, OccupancyBarResize, OccupancyCellClick, OccupancyClosure, OccupancyClosureClick, OccupancyRoom } from './occupancy-grid.interface';
4
+ import { BarGeometry, GridRow, LaneBar, PositionedRow, RoomRow } from './occupancy-grid.layout';
5
+ import * as i0 from "@angular/core";
6
+ export declare const OCCUPANCY_GRID_HEADER_HEIGHT = 52;
7
+ /**
8
+ * Rooms as rows, days as columns, one bar per stay (UC-11). It never writes
9
+ * anywhere — `rooms` is the only source of truth and this component never
10
+ * mutates it — but it is not read-only in the sense of being inert: a bar's
11
+ * edge can be dragged (or, on a focused bar, Shift + arrow-keyed) to propose
12
+ * a new date, reported via `barResize`; a bar's body can be dragged to a new
13
+ * date, a different room, or both, reported via `barMove`. Every other
14
+ * gesture (clicks, the nav buttons) works the same way: report what
15
+ * happened, apply nothing.
16
+ *
17
+ * Owns its own row virtualization: rows have different heights (one lane per
18
+ * overlapping stay), which the CDK's stable fixed-size strategy cannot do, and
19
+ * the autosize strategy is still experimental. Rows are positioned from a
20
+ * prefix sum of heights and only those intersecting the viewport are rendered.
21
+ *
22
+ * Every date is a YYYY-MM-DD string and every column is computed by
23
+ * local-date.ts; `new Date(string)` is never used, so a column can never be
24
+ * off by one west of Greenwich.
25
+ */
26
+ export declare class OccupancyGridComponent {
27
+ private readonly translate;
28
+ rooms: import("@angular/core").InputSignal<OccupancyRoom[]>;
29
+ dormName: import("@angular/core").InputSignal<string>;
30
+ from: import("@angular/core").InputSignal<string>;
31
+ to: import("@angular/core").InputSignal<string>;
32
+ today: import("@angular/core").InputSignal<string | null>;
33
+ dayWidth: import("@angular/core").InputSignal<number>;
34
+ leftColumnWidth: import("@angular/core").InputSignal<number>;
35
+ laneHeight: import("@angular/core").InputSignal<number>;
36
+ loading: import("@angular/core").InputSignal<boolean>;
37
+ /** Days the ‹ / › nav buttons and the ArrowLeft/ArrowRight keys shift the window by. */
38
+ navStepDays: import("@angular/core").InputSignal<number>;
39
+ /**
40
+ * When true, a resize or whole-bar move drag is never allowed to leave
41
+ * two bars in the same room overlapping in time. The default (false)
42
+ * lets bars in different lanes of the same room legitimately overlap —
43
+ * an outgoing stay's last few nights next to an incoming one's first, say
44
+ * — which is exactly what the lane system exists to display. A strict
45
+ * room grid, where a room can hold only one booking at a time, sets this
46
+ * so a drag simply cannot propose a second one over it: a resize clamps
47
+ * at the nearest other bar in the room (not just its own lane), and a
48
+ * move drag ignores any candidate date/room that would overlap, sticking
49
+ * to the last placement that did not.
50
+ */
51
+ preventOverlap: import("@angular/core").InputSignal<boolean>;
52
+ barClick: import("@angular/core").OutputEmitterRef<OccupancyBarClick>;
53
+ closureClick: import("@angular/core").OutputEmitterRef<OccupancyClosureClick>;
54
+ roomClick: import("@angular/core").OutputEmitterRef<OccupancyRoom>;
55
+ /** An empty day cell was clicked: the room and the date under the pointer. */
56
+ cellClick: import("@angular/core").OutputEmitterRef<OccupancyCellClick>;
57
+ reachedEnd: import("@angular/core").OutputEmitterRef<string>;
58
+ /**
59
+ * The nav buttons or an arrow key asked to move the window. The component
60
+ * does not own `from`/`to` (the consumer does, same as every other input
61
+ * here), so it reports the signed day delta — negative for earlier,
62
+ * positive for later — rather than computing new dates itself. A consumer
63
+ * that wants the shift applied does
64
+ * `from = addDays(from, delta); to = addDays(to, delta)`.
65
+ */
66
+ windowShift: import("@angular/core").OutputEmitterRef<number>;
67
+ /**
68
+ * A bar's edge was dragged, or Shift + arrow-keyed, to a new date. See
69
+ * `OccupancyBarResize` — this reports the proposal; it never applies it.
70
+ */
71
+ barResize: import("@angular/core").OutputEmitterRef<OccupancyBarResize>;
72
+ /**
73
+ * A bar's body was dragged to new dates, a different room, or both. See
74
+ * `OccupancyBarMove` — this reports the proposal; it never applies it.
75
+ */
76
+ barMove: import("@angular/core").OutputEmitterRef<OccupancyBarMove>;
77
+ protected readonly headerHeight = 52;
78
+ private readonly scroller;
79
+ private readonly collapsed;
80
+ private readonly scrollTop;
81
+ private readonly viewportHeight;
82
+ private lastEndEmittedFor;
83
+ /**
84
+ * The in-progress drag, if any — null the rest of the time. `geometryOf`
85
+ * and `barTitle` read the preview dates for whichever bar this names so
86
+ * the drag renders live; nothing else about `rooms` changes, since the
87
+ * component does not own that input.
88
+ */
89
+ protected readonly resize: import("@angular/core").WritableSignal<{
90
+ room: OccupancyRoom;
91
+ bar: OccupancyBar;
92
+ edge: "start" | "end";
93
+ previewStart: string;
94
+ previewEnd: string;
95
+ minBound: string | null;
96
+ maxBound: string | null;
97
+ } | null>;
98
+ private dragMoveListener;
99
+ private dragUpListener;
100
+ private dragKeyListener;
101
+ /**
102
+ * The in-progress whole-bar drag, if any — null the rest of the time.
103
+ * `dragging` only flips true once the pointer clears a small threshold, so
104
+ * a plain click (mousedown + mouseup with no real movement) still opens
105
+ * the drawer as `barClick` instead of being swallowed as a zero-distance
106
+ * move. `targetRoom` starts as `fromRoom` and is re-resolved on every
107
+ * mousemove from whatever `.occ__row--room` is actually under the
108
+ * pointer — see `roomUnderPoint` — so dragging vertically onto another
109
+ * room's row is exactly the gesture `roomUnderPoint` is built to read.
110
+ */
111
+ protected readonly move: import("@angular/core").WritableSignal<{
112
+ bar: OccupancyBar;
113
+ fromRoom: OccupancyRoom;
114
+ startClientX: number;
115
+ startClientY: number;
116
+ originalStartDate: string;
117
+ originalEndDate: string;
118
+ previewStartDate: string;
119
+ previewEndDate: string;
120
+ targetRoom: OccupancyRoom;
121
+ dragging: boolean;
122
+ } | null>;
123
+ private moveMoveListener;
124
+ private moveUpListener;
125
+ private moveKeyListener;
126
+ private suppressNextClick;
127
+ private suppressNextClickTimer;
128
+ constructor(translate: TranslateService, destroyRef: DestroyRef);
129
+ protected readonly dayCount: import("@angular/core").Signal<number>;
130
+ protected readonly canvasWidth: import("@angular/core").Signal<number>;
131
+ protected readonly rows: import("@angular/core").Signal<GridRow[]>;
132
+ protected readonly positioned: import("@angular/core").Signal<PositionedRow[]>;
133
+ protected readonly bodyHeight: import("@angular/core").Signal<number>;
134
+ protected readonly visible: import("@angular/core").Signal<PositionedRow[]>;
135
+ protected readonly days: import("@angular/core").Signal<import("ud-components").DayColumn[]>;
136
+ protected readonly months: import("@angular/core").Signal<import("ud-components").MonthSegment[]>;
137
+ protected readonly weekendOffsetPx: import("@angular/core").Signal<number>;
138
+ protected readonly todayLeft: import("@angular/core").Signal<number | null>;
139
+ private readonly roomsById;
140
+ /**
141
+ * The floating copy of a bar being dragged by its body — null unless a
142
+ * move drag has cleared the click threshold. Positioned in canvas
143
+ * coordinates (like `.occ__today`) rather than inside a room's own lane,
144
+ * because a move can target a room other than the one the drag started
145
+ * in; `positioned()` already has every visible row's pixel `top`, so no
146
+ * separate DOM lookup is needed to place it. Always drawn at lane 0 of the
147
+ * target room — a simplification the consumer's own re-lane on save
148
+ * supersedes anyway, same as the rest of this component's "report the
149
+ * gesture, never own the data" contract.
150
+ */
151
+ protected readonly moveGhost: import("@angular/core").Signal<{
152
+ left: number;
153
+ top: number;
154
+ width: number;
155
+ height: number;
156
+ label: string;
157
+ state: import("ud-components").OccupancyBarState;
158
+ } | null>;
159
+ private monthLabels;
160
+ protected geometryOf(bar: OccupancyBar): BarGeometry | null;
161
+ /** The in-progress drag's proposed dates for this bar, or null if it is not the one being dragged. */
162
+ private previewDatesOf;
163
+ protected isResizing(bookingId: string): boolean;
164
+ /** True once a whole-bar drag on this booking has cleared the click threshold — see `move`. */
165
+ protected isBeingMoved(bookingId: string): boolean;
166
+ /** True while a whole-bar drag is hovering this room as its drop target. */
167
+ protected isMoveTarget(roomId: string): boolean;
168
+ protected closureGeometryOf(closure: OccupancyClosure): BarGeometry | null;
169
+ protected takenOn(room: OccupancyRoom): number | null;
170
+ protected isCollapsed(key: string): boolean;
171
+ protected toggleGroup(key: string): void;
172
+ protected barTitle(bar: OccupancyBar): string;
173
+ protected closureTitle(closure: OccupancyClosure): string;
174
+ protected onScroll(): void;
175
+ protected trackRow(_: number, p: PositionedRow): string;
176
+ protected asRoomRow(row: GridRow): RoomRow;
177
+ /** ‹ / › nav buttons. Emits the signed day delta; see `windowShift`. */
178
+ protected shiftWindow(direction: -1 | 1): void;
179
+ /**
180
+ * ArrowLeft/ArrowRight anywhere in the grid page the window, the same as
181
+ * the nav buttons — a keyboard user reaching a bar via Tab should not have
182
+ * to find the buttons to keep moving through time. Left alone otherwise:
183
+ * a bar, room cell or group header's own Enter handling is untouched.
184
+ */
185
+ protected onGridKeydown(event: KeyboardEvent): void;
186
+ /**
187
+ * A click inside a room's lane that landed on neither a bar nor a closure
188
+ * (both stop propagation before this fires) — the room and the date under
189
+ * the pointer. See `OccupancyCellClick`.
190
+ */
191
+ protected onLaneClick(event: MouseEvent, room: OccupancyRoom): void;
192
+ /** The bar's own click handler routes through here so it shares the same resize-click guard as `onLaneClick`. */
193
+ protected onBarClick(bar: OccupancyBar, room: OccupancyRoom): void;
194
+ /**
195
+ * Mousedown on a bar's edge handle starts a drag. Listeners go on
196
+ * `window`, not the handle, because the pointer will move well outside
197
+ * an 8px-wide handle the instant the drag starts; `stopPropagation` keeps
198
+ * this from also being read as a click on the bar (which would open the
199
+ * drawer) or on the lane underneath it (a `cellClick`).
200
+ */
201
+ protected startResize(event: MouseEvent, room: OccupancyRoom, bar: OccupancyBar, edge: 'start' | 'end', laneBars: LaneBar[]): void;
202
+ private onDragMove;
203
+ /** Mouseup (commit) or Escape (cancel). Emits `barResize` only on commit with an actual change. */
204
+ private endResize;
205
+ private removeDragListeners;
206
+ /**
207
+ * Mousedown on a bar's own body (never the edge handles — those stop
208
+ * propagation before this fires) arms a possible whole-bar move, but does
209
+ * not yet commit to one: `dragging` stays false, and nothing is rendered
210
+ * differently, until `onBarDragMove` sees the pointer clear a small
211
+ * threshold. That is what lets a plain click still fall through to
212
+ * `onBarClick` unchanged.
213
+ */
214
+ protected startBarMove(event: MouseEvent, room: OccupancyRoom, bar: OccupancyBar): void;
215
+ private onBarDragMove;
216
+ /** Mouseup (commit) or Escape (cancel). Emits `barMove` only on commit with an actual change. */
217
+ private endBarMove;
218
+ private removeMoveListeners;
219
+ /** Whatever room row (if any) is actually rendered under this point — see `.occ__row--room`'s `data-room-id`. */
220
+ private roomUnderPoint;
221
+ private armSuppressNextClick;
222
+ private consumeSuppressNextClick;
223
+ private clientXToDate;
224
+ /**
225
+ * The keyboard equivalent of dragging the departure edge: Shift+ArrowRight
226
+ * extends by a night, Shift+ArrowLeft shortens by one, each key press
227
+ * committing immediately (there is nothing to "release" the way a mouse
228
+ * drag has). Scoped to the departure edge only — the more common "extend a
229
+ * stay" gesture — so one binding covers the primary case without a second
230
+ * modifier combination to document; the arrival edge is still reachable by
231
+ * dragging its handle with a mouse.
232
+ */
233
+ protected onBarKeydownResize(event: KeyboardEvent, room: OccupancyRoom, bar: OccupancyBar, laneBars: LaneBar[]): void;
234
+ static ɵfac: i0.ɵɵFactoryDeclaration<OccupancyGridComponent, never>;
235
+ static ɵcmp: i0.ɵɵComponentDeclaration<OccupancyGridComponent, "ud-occupancy-grid", never, { "rooms": { "alias": "rooms"; "required": false; "isSignal": true; }; "dormName": { "alias": "dormName"; "required": false; "isSignal": true; }; "from": { "alias": "from"; "required": true; "isSignal": true; }; "to": { "alias": "to"; "required": true; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "dayWidth": { "alias": "dayWidth"; "required": false; "isSignal": true; }; "leftColumnWidth": { "alias": "leftColumnWidth"; "required": false; "isSignal": true; }; "laneHeight": { "alias": "laneHeight"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "navStepDays": { "alias": "navStepDays"; "required": false; "isSignal": true; }; "preventOverlap": { "alias": "preventOverlap"; "required": false; "isSignal": true; }; }, { "barClick": "barClick"; "closureClick": "closureClick"; "roomClick": "roomClick"; "cellClick": "cellClick"; "reachedEnd": "reachedEnd"; "windowShift": "windowShift"; "barResize": "barResize"; "barMove": "barMove"; }, never, never, true, never>;
236
+ }
@@ -0,0 +1,105 @@
1
+ export type OccupancyBarState = 'tentative' | 'reserved' | 'in_room' | 'history';
2
+ export interface OccupancyBar {
3
+ bookingId: string;
4
+ registrationId: string;
5
+ studentId: string;
6
+ studentName: string;
7
+ studentEmail: string | null;
8
+ /** YYYY-MM-DD, first night. */
9
+ startDate: string;
10
+ /** YYYY-MM-DD, departure morning, EXCLUSIVE. */
11
+ endDate: string;
12
+ continuesBefore: boolean;
13
+ continuesAfter: boolean;
14
+ status: string;
15
+ state: OccupancyBarState;
16
+ stayTermId: string | null;
17
+ stayTermName: string | null;
18
+ registrationStayTermIds: string[];
19
+ }
20
+ export interface OccupancyClosure {
21
+ closureId: string;
22
+ startDate: string;
23
+ endDate: string;
24
+ reason: string;
25
+ continuesBefore: boolean;
26
+ continuesAfter: boolean;
27
+ }
28
+ export interface OccupancyRoom {
29
+ roomId: string;
30
+ number: string;
31
+ type: string;
32
+ capacity: number;
33
+ active: boolean;
34
+ floorId: string;
35
+ floorLevel: string;
36
+ floorGender: string | null;
37
+ bars: OccupancyBar[];
38
+ closures: OccupancyClosure[];
39
+ }
40
+ export interface OccupancyWindow {
41
+ dormId: string;
42
+ dormName: string;
43
+ from: string;
44
+ to: string;
45
+ today: string;
46
+ rooms: OccupancyRoom[];
47
+ }
48
+ export interface OccupancyBarClick {
49
+ bar: OccupancyBar;
50
+ room: OccupancyRoom;
51
+ }
52
+ export interface OccupancyClosureClick {
53
+ closure: OccupancyClosure;
54
+ room: OccupancyRoom;
55
+ }
56
+ /**
57
+ * An empty day cell was clicked — the room and the calendar date under the
58
+ * pointer, YYYY-MM-DD. Distinct from `roomClick` (which names the room only,
59
+ * for "go to this room") and `barClick` (an existing stay): this is the one
60
+ * that carries what "book this room on this date" needs. The component does
61
+ * not act on it — it only reports what was clicked.
62
+ */
63
+ export interface OccupancyCellClick {
64
+ room: OccupancyRoom;
65
+ date: string;
66
+ }
67
+ /**
68
+ * A stay's edge was dragged (or, on a focused bar, adjusted with Shift +
69
+ * arrow keys) to a new date — extending or shortening it. Emitted once, when
70
+ * the gesture ends with a date that actually differs from where it started;
71
+ * a drag released back where it began, or cancelled with Escape, emits
72
+ * nothing. The component only *renders* the drag live and reports the
73
+ * result — it never writes to `rooms` itself, so the bar's real position
74
+ * does not change until the consumer applies the proposal (typically after
75
+ * confirming it against whatever the server allows) and passes updated
76
+ * rooms back in.
77
+ */
78
+ export interface OccupancyBarResize {
79
+ bar: OccupancyBar;
80
+ room: OccupancyRoom;
81
+ /** Which end moved: the arrival (`'start'`) or the departure (`'end'`). */
82
+ edge: 'start' | 'end';
83
+ previousStartDate: string;
84
+ previousEndDate: string;
85
+ proposedStartDate: string;
86
+ proposedEndDate: string;
87
+ }
88
+ /**
89
+ * A whole stay was picked up by its body and dropped somewhere else —
90
+ * shifted to different dates (dragged left/right), moved to a different room
91
+ * (dragged up/down onto another room's row), or both at once. Emitted once,
92
+ * when the drop actually differs from where the drag started; a drag
93
+ * released back where it began, or cancelled with Escape, emits nothing.
94
+ * Same contract as `OccupancyBarResize`: this only reports the proposal, it
95
+ * never writes to `rooms` itself.
96
+ */
97
+ export interface OccupancyBarMove {
98
+ bar: OccupancyBar;
99
+ fromRoom: OccupancyRoom;
100
+ toRoom: OccupancyRoom;
101
+ previousStartDate: string;
102
+ previousEndDate: string;
103
+ proposedStartDate: string;
104
+ proposedEndDate: string;
105
+ }
@@ -0,0 +1,98 @@
1
+ import { OccupancyBar, OccupancyClosure, OccupancyRoom } from './occupancy-grid.interface';
2
+ export interface GroupRow {
3
+ kind: 'group';
4
+ key: string;
5
+ depth: 0 | 1 | 2;
6
+ label: string;
7
+ roomCount: number;
8
+ }
9
+ export interface LaneBar {
10
+ bar: OccupancyBar;
11
+ lane: number;
12
+ }
13
+ export interface RoomRow {
14
+ kind: 'room';
15
+ key: string;
16
+ room: OccupancyRoom;
17
+ lanes: number;
18
+ bars: LaneBar[];
19
+ }
20
+ export type GridRow = GroupRow | RoomRow;
21
+ export interface PositionedRow {
22
+ row: GridRow;
23
+ top: number;
24
+ height: number;
25
+ }
26
+ export interface BarGeometry {
27
+ left: number;
28
+ width: number;
29
+ cutLeft: boolean;
30
+ cutRight: boolean;
31
+ }
32
+ export interface MonthSegment {
33
+ label: string;
34
+ year: number;
35
+ month: number;
36
+ left: number;
37
+ width: number;
38
+ }
39
+ export interface DayColumn {
40
+ iso: string;
41
+ left: number;
42
+ dayOfMonth: number;
43
+ weekday: number;
44
+ isWeekend: boolean;
45
+ }
46
+ /** Greedy interval packing. Half-open, so a bar starting the day another ends shares its lane. */
47
+ export declare function assignLanes(bars: OccupancyBar[]): LaneBar[];
48
+ /** dorm › floor › type › rooms, as a flat list with group headers. Collapsed groups hide their rooms. */
49
+ export declare function buildRows(rooms: OccupancyRoom[], dormName: string, collapsed: ReadonlySet<string>): GridRow[];
50
+ export declare const GROUP_ROW_HEIGHT = 28;
51
+ export declare function rowHeight(row: GridRow, laneHeight: number): number;
52
+ export declare function positionRows(rows: GridRow[], laneHeight: number): PositionedRow[];
53
+ export declare function totalHeight(positioned: PositionedRow[]): number;
54
+ /** Indices [first, last] of rows intersecting the viewport, with overscan. Binary search on top. */
55
+ export declare function visibleRange(positioned: PositionedRow[], scrollTop: number, viewportHeight: number, overscan?: number): {
56
+ first: number;
57
+ last: number;
58
+ };
59
+ /** Clip to the window and convert to pixels. Returns null when the bar is entirely outside. */
60
+ export declare function barGeometry(bar: {
61
+ startDate: string;
62
+ endDate: string;
63
+ continuesBefore?: boolean;
64
+ continuesAfter?: boolean;
65
+ }, from: string, to: string, dayWidth: number): BarGeometry | null;
66
+ export declare function dayColumns(from: string, to: string, dayWidth: number): DayColumn[];
67
+ export declare function monthSegments(from: string, to: string, dayWidth: number, monthLabels: string[]): MonthSegment[];
68
+ /** Offset in days from `from` to the first Saturday on or after it (0..6). */
69
+ export declare function weekendOffsetDays(from: string): number;
70
+ /** Bars whose nights include `today`. */
71
+ export declare function takenOn(room: OccupancyRoom, today: string | null): number | null;
72
+ export declare function closureGeometry(closure: OccupancyClosure, from: string, to: string, dayWidth: number): BarGeometry | null;
73
+ /** The calendar date under a pixel offset inside the day canvas (an empty-cell click). */
74
+ export declare function dateAtOffset(offsetX: number, from: string, dayWidth: number): string;
75
+ /**
76
+ * The nearest neighboring bar's boundary on the given edge — the local
77
+ * limit a drag on that edge must not cross without visually overlapping
78
+ * another bar. By default only bars in the same lane count (the rule
79
+ * `assignLanes` used to decide they belong in that slot in the first
80
+ * place); pass `allLanes: true` (see the grid's `preventOverlap` input) to
81
+ * widen that to every other bar in the room, so a resize can never create
82
+ * an overlap even across lanes that are normally allowed to overlap. Not a
83
+ * capacity or closure check: this component knows nothing about either,
84
+ * and the consumer's own save is still the real gate — this only stops the
85
+ * drag from proposing something the grid's own rendering model already
86
+ * knows is wrong.
87
+ */
88
+ export declare function laneNeighborBound(laneBars: LaneBar[], bookingId: string, edge: 'start' | 'end', allLanes?: boolean): string | null;
89
+ /**
90
+ * Whether `[start, end)` would overlap any OTHER bar already in the room
91
+ * (half-open ranges, so a stay starting the day another ends does not
92
+ * count). Used by a whole-bar move when `preventOverlap` is set — unlike
93
+ * `laneNeighborBound`, a move can jump to any date or any room in one
94
+ * gesture, so there is no adjacent "boundary" to clamp to; the drag either
95
+ * lands clear of every other bar in the target room or it does not move
96
+ * there at all.
97
+ */
98
+ export declare function overlapsRoom(room: OccupancyRoom, bookingId: string, start: string, end: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",
@@ -21,30 +21,6 @@
21
21
  ".": {
22
22
  "types": "./index.d.ts",
23
23
  "default": "./fesm2022/ud-components.mjs"
24
- },
25
- "./enums/role.enum": {
26
- "types": "./enums/role.enum.d.ts",
27
- "default": "./enums/role.enum.js"
28
- },
29
- "./lib/kpi/kpi.enum": {
30
- "types": "./lib/kpi/kpi.enum.d.ts",
31
- "default": "./lib/kpi/kpi.enum.js"
32
- },
33
- "./lib/edit-view/edit-view-section.directive": {
34
- "types": "./lib/edit-view/edit-view-section.directive.d.ts",
35
- "default": "./lib/edit-view/edit-view-section.directive.js"
36
- },
37
- "./interfaces/page-request.interface": {
38
- "types": "./interfaces/page-request.interface.d.ts",
39
- "default": "./interfaces/page-request.interface.js"
40
- },
41
- "./interfaces/table.interface": {
42
- "types": "./interfaces/table.interface.d.ts",
43
- "default": "./interfaces/table.interface.js"
44
- },
45
- "./interfaces/table-display-column.interface": {
46
- "types": "./interfaces/table-display-column.interface.d.ts",
47
- "default": "./interfaces/table-display-column.interface.js"
48
24
  }
49
25
  }
50
- }
26
+ }
package/public-api.d.ts CHANGED
@@ -9,6 +9,10 @@ export * from './lib/edit-view/edit-view-section.directive';
9
9
  export * from './lib/file-input/file-input.component';
10
10
  export * from './lib/kpi/kpi.component';
11
11
  export * from './lib/modal/modal.component';
12
+ export * from './lib/occupancy-grid/occupancy-grid.component';
13
+ export * from './lib/occupancy-grid/occupancy-grid.interface';
14
+ export * from './lib/occupancy-grid/occupancy-grid.layout';
15
+ export * from './lib/occupancy-grid/local-date';
12
16
  export * from './lib/pill/pill.component';
13
17
  export * from './lib/progress-bar/progress-bar.component';
14
18
  export * from './lib/summary-view/summary-view.component';