ud-components 0.5.20 → 0.5.22
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.
|
@@ -20,10 +20,31 @@ export declare class CalendarComponent implements OnDestroy {
|
|
|
20
20
|
* free-text input.
|
|
21
21
|
*/
|
|
22
22
|
bookableUsers: import("@angular/core").InputSignal<CalendarUser[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional cutoff: any cell whose start is strictly before this Date is
|
|
25
|
+
* visually disabled (grey, no hover, no cursor) and click-blocked. The
|
|
26
|
+
* "Add slot" toolbar button pre-fills the modal with this timestamp
|
|
27
|
+
* (rounded up to the next `slotDuration` increment) instead of `new Date()`.
|
|
28
|
+
* The modal's save handler also refuses to emit if a hand-edited time
|
|
29
|
+
* lands before the cutoff. Applies to both admin and student modes.
|
|
30
|
+
*/
|
|
31
|
+
minSlotStart: import("@angular/core").InputSignal<Date | null>;
|
|
32
|
+
/**
|
|
33
|
+
* Optional initial calendar position. Overrides the internal `navDate`
|
|
34
|
+
* which otherwise defaults to "today / now". Useful for reschedule flows
|
|
35
|
+
* or deep links that should land on a specific day.
|
|
36
|
+
*/
|
|
37
|
+
defaultDate: import("@angular/core").InputSignal<Date | null>;
|
|
23
38
|
slotAdded: import("@angular/core").OutputEmitterRef<CalendarSlot>;
|
|
24
39
|
slotUpdated: import("@angular/core").OutputEmitterRef<CalendarSlot>;
|
|
25
40
|
slotRemoved: import("@angular/core").OutputEmitterRef<string>;
|
|
26
41
|
slotBooked: import("@angular/core").OutputEmitterRef<CalendarSlot>;
|
|
42
|
+
/** Fired when a user attempts to interact with a cell before `minSlotStart`. */
|
|
43
|
+
slotBlocked: import("@angular/core").OutputEmitterRef<{
|
|
44
|
+
start: Date;
|
|
45
|
+
end: Date;
|
|
46
|
+
reason: "before-min";
|
|
47
|
+
}>;
|
|
27
48
|
activeView: import("@angular/core").WritableSignal<CalendarView>;
|
|
28
49
|
navDate: import("@angular/core").WritableSignal<Date>;
|
|
29
50
|
readonly viewOptions: {
|
|
@@ -92,6 +113,15 @@ export declare class CalendarComponent implements OnDestroy {
|
|
|
92
113
|
dayLabel(day: Date): string;
|
|
93
114
|
dayNum(day: Date): number;
|
|
94
115
|
onCellClick(day: Date, hour: number, minute: number): void;
|
|
116
|
+
/**
|
|
117
|
+
* True when the cell at (day, hour, minute) starts before `minSlotStart`.
|
|
118
|
+
* Templates bind a CSS class on this to grey out past cells; the click
|
|
119
|
+
* handler also bails so consumers don't see invalid `slotAdded` events.
|
|
120
|
+
*/
|
|
121
|
+
isCellDisabled(day: Date, hour: number, minute: number): boolean;
|
|
122
|
+
/** True when `day` is fully before `minSlotStart` (used by month view). */
|
|
123
|
+
isDayDisabled(day: Date): boolean;
|
|
124
|
+
private combineDayTime;
|
|
95
125
|
onSlotMouseDown(e: MouseEvent, slot: CalendarSlot): void;
|
|
96
126
|
onDocMouseMove(e: MouseEvent): void;
|
|
97
127
|
onDocMouseUp(e: MouseEvent): void;
|
|
@@ -102,6 +132,8 @@ export declare class CalendarComponent implements OnDestroy {
|
|
|
102
132
|
previewHeight(): number;
|
|
103
133
|
private getGridTarget;
|
|
104
134
|
openAddModal(day?: Date, hour?: number, minute?: number): void;
|
|
135
|
+
/** Round a Date up to the next `slotDuration` increment (minute-aligned). */
|
|
136
|
+
private roundUpToSlot;
|
|
105
137
|
openEditModal(slot: CalendarSlot): void;
|
|
106
138
|
private get slotFormErrors();
|
|
107
139
|
private slotTimeValidator;
|
|
@@ -116,5 +148,5 @@ export declare class CalendarComponent implements OnDestroy {
|
|
|
116
148
|
private formatTime;
|
|
117
149
|
private hexToRgba;
|
|
118
150
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent, never>;
|
|
119
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ud-calendar", never, { "slots": { "alias": "slots"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "defaultView": { "alias": "defaultView"; "required": false; "isSignal": true; }; "slotDuration": { "alias": "slotDuration"; "required": false; "isSignal": true; }; "minHour": { "alias": "minHour"; "required": false; "isSignal": true; }; "maxHour": { "alias": "maxHour"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "bookableUsers": { "alias": "bookableUsers"; "required": false; "isSignal": true; }; }, { "slotAdded": "slotAdded"; "slotUpdated": "slotUpdated"; "slotRemoved": "slotRemoved"; "slotBooked": "slotBooked"; }, never, never, true, never>;
|
|
151
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent, "ud-calendar", never, { "slots": { "alias": "slots"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "defaultView": { "alias": "defaultView"; "required": false; "isSignal": true; }; "slotDuration": { "alias": "slotDuration"; "required": false; "isSignal": true; }; "minHour": { "alias": "minHour"; "required": false; "isSignal": true; }; "maxHour": { "alias": "maxHour"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "bookableUsers": { "alias": "bookableUsers"; "required": false; "isSignal": true; }; "minSlotStart": { "alias": "minSlotStart"; "required": false; "isSignal": true; }; "defaultDate": { "alias": "defaultDate"; "required": false; "isSignal": true; }; }, { "slotAdded": "slotAdded"; "slotUpdated": "slotUpdated"; "slotRemoved": "slotRemoved"; "slotBooked": "slotBooked"; "slotBlocked": "slotBlocked"; }, never, never, true, never>;
|
|
120
152
|
}
|
|
@@ -3,6 +3,9 @@ export declare class UdPreviewContainerComponent {
|
|
|
3
3
|
title: string;
|
|
4
4
|
icon?: string;
|
|
5
5
|
padding: string;
|
|
6
|
+
/** Whether the panel starts collapsed. */
|
|
7
|
+
collapsed: boolean;
|
|
8
|
+
toggle(): void;
|
|
6
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<UdPreviewContainerComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UdPreviewContainerComponent, "ud-preview-container", never, { "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UdPreviewContainerComponent, "ud-preview-container", never, { "title": { "alias": "title"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "padding": { "alias": "padding"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
8
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ud-components",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.22",
|
|
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
|
+
}
|