ud-components 0.7.3 → 0.7.6
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/enums/feature-flag-key.enum.d.ts +2 -1
- package/fesm2022/ud-components.mjs +441 -27
- package/fesm2022/ud-components.mjs.map +1 -1
- package/lib/checkbox/checkbox.component.d.ts +36 -0
- package/lib/form-fields/multi-select/multi-select.component.d.ts +3 -4
- package/lib/occupancy-grid/occupancy-grid.component.d.ts +13 -0
- package/lib/tooltip/tooltip.component.d.ts +17 -0
- package/lib/tooltip/tooltip.directive.d.ts +45 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CheckboxComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
5
|
+
/** Key of the control inside the parent FormGroup (alternative to ngModel/formControl) */
|
|
6
|
+
controlName?: string;
|
|
7
|
+
size: 'sm' | 'md' | 'lg';
|
|
8
|
+
label?: string;
|
|
9
|
+
labelPosition: 'left' | 'right';
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
/** Shows a dash instead of a tick, e.g. a "select all" when only some rows are selected. Cleared by a click. */
|
|
12
|
+
indeterminate: boolean;
|
|
13
|
+
/** For use without a form, e.g. bound to a SelectionModel. A form control's value wins when there is one. */
|
|
14
|
+
set checked(value: boolean);
|
|
15
|
+
set disabled(value: boolean);
|
|
16
|
+
get isSm(): boolean;
|
|
17
|
+
get isMd(): boolean;
|
|
18
|
+
get isLg(): boolean;
|
|
19
|
+
isChecked: boolean;
|
|
20
|
+
isDisabled: boolean;
|
|
21
|
+
private controlContainer;
|
|
22
|
+
private destroy$;
|
|
23
|
+
onChange: EventEmitter<boolean>;
|
|
24
|
+
private _onChange;
|
|
25
|
+
private onTouched;
|
|
26
|
+
private get formControl();
|
|
27
|
+
ngOnInit(): void;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
toggle(): void;
|
|
30
|
+
writeValue(value: boolean): void;
|
|
31
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
32
|
+
registerOnTouched(fn: () => void): void;
|
|
33
|
+
setDisabledState(isDisabled: boolean): void;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "ud-checkbox", never, { "controlName": { "alias": "controlName"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
|
|
36
|
+
}
|
|
@@ -94,10 +94,9 @@ export declare class MultiSelectComponent implements OnInit, OnChanges, OnDestro
|
|
|
94
94
|
/**
|
|
95
95
|
* Measures once the panel opens, rather than when a row is hovered.
|
|
96
96
|
*
|
|
97
|
-
* Hover is too late
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* inform. Every option is laid out the moment the panel opens, which is well
|
|
97
|
+
* Hover is too late: the tooltip reads udTooltipDisabled when it shows, and
|
|
98
|
+
* anything computed from a hover event can land a change-detection tick after
|
|
99
|
+
* that decision. Every option is laid out the moment the panel opens, which is well
|
|
101
100
|
* before any pointer arrives — so measuring there has no race to lose.
|
|
102
101
|
*
|
|
103
102
|
* Measured per opening, so a viewport resized while the panel is still open
|
|
@@ -173,6 +173,13 @@ export declare class OccupancyGridComponent {
|
|
|
173
173
|
roomId: string;
|
|
174
174
|
date: string;
|
|
175
175
|
} | null>;
|
|
176
|
+
/**
|
|
177
|
+
* The day column under the pointer anywhere on the canvas (header, lanes,
|
|
178
|
+
* bars), as an index into days(), or null. Drawn as a full-height band in
|
|
179
|
+
* every visible row and a tinted header cell, so together with the row wash
|
|
180
|
+
* the pointer reads as a crosshair: which room, which night.
|
|
181
|
+
*/
|
|
182
|
+
protected readonly hoverDay: import("@angular/core").WritableSignal<number | null>;
|
|
176
183
|
/**
|
|
177
184
|
* The empty cell the mouse is currently over, if any — the pointer
|
|
178
185
|
* equivalent of `laneFocus`, so a mouse user gets the same "here's what
|
|
@@ -256,6 +263,11 @@ export declare class OccupancyGridComponent {
|
|
|
256
263
|
/** True while a whole-bar drag is hovering this room as its drop target. */
|
|
257
264
|
protected isMoveTarget(roomId: string): boolean;
|
|
258
265
|
protected closureGeometryOf(closure: OccupancyClosure): BarGeometry | null;
|
|
266
|
+
/**
|
|
267
|
+
* Beds taken on the first day shown, not today (UC-18). The consumer loads
|
|
268
|
+
* only the bars overlapping the window, so today's count was 0 whenever the
|
|
269
|
+
* window did not include today; the first day shown is always loaded.
|
|
270
|
+
*/
|
|
259
271
|
protected takenOn(room: OccupancyRoom): number | null;
|
|
260
272
|
protected isCollapsed(key: string): boolean;
|
|
261
273
|
protected toggleGroup(key: string): void;
|
|
@@ -340,6 +352,7 @@ export declare class OccupancyGridComponent {
|
|
|
340
352
|
* not also outline the empty-cell cursor underneath it.
|
|
341
353
|
*/
|
|
342
354
|
protected onLaneMouseMove(event: MouseEvent, room: OccupancyRoom, lane?: number): void;
|
|
355
|
+
protected onCanvasMouseMove(event: MouseEvent): void;
|
|
343
356
|
protected onLaneMouseLeave(room: OccupancyRoom): void;
|
|
344
357
|
protected onLaneBlur(): void;
|
|
345
358
|
private defaultCursorDate;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/** Which side of its host the tooltip ended up on, after any flip. */
|
|
4
|
+
export type UdTooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
/**
|
|
6
|
+
* The panel `udTooltip` attaches to the overlay. Not meant to be used on its
|
|
7
|
+
* own. Unencapsulated so the `.ud-tooltip-title` / `.ud-tooltip-meta` helper
|
|
8
|
+
* classes reach rich content that comes from the consumer's template.
|
|
9
|
+
*/
|
|
10
|
+
export declare class UdTooltipComponent {
|
|
11
|
+
readonly content: import("@angular/core").InputSignal<string | TemplateRef<unknown> | null>;
|
|
12
|
+
readonly tooltipId: import("@angular/core").InputSignal<string>;
|
|
13
|
+
readonly placement: import("@angular/core").InputSignal<UdTooltipPlacement>;
|
|
14
|
+
protected readonly template: import("@angular/core").Signal<TemplateRef<unknown> | null>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UdTooltipComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UdTooltipComponent, "ud-tooltip", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "tooltipId": { "alias": "tooltipId"; "required": true; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
2
|
+
import { UdTooltipPlacement } from './tooltip.component';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* The library's tooltip (UC-19), replacing both native `title` hints and
|
|
6
|
+
* `matTooltip`: `<ud-button udTooltip="Export as CSV">`.
|
|
7
|
+
*
|
|
8
|
+
* Shows on hover, on keyboard focus (focus-visible only, so a mouse click does
|
|
9
|
+
* not leave one hanging) and on a long press; hides on leave, blur, Escape,
|
|
10
|
+
* press, and scroll. Flips to the opposite side when there is no room. While
|
|
11
|
+
* shown, the host's `aria-describedby` names it.
|
|
12
|
+
*/
|
|
13
|
+
export declare class UdTooltipDirective implements OnDestroy {
|
|
14
|
+
/** Text, or a template for rich content. Empty shows nothing. */
|
|
15
|
+
readonly udTooltip: import("@angular/core").InputSignal<string | TemplateRef<unknown> | null | undefined>;
|
|
16
|
+
readonly udTooltipPosition: import("@angular/core").InputSignal<UdTooltipPlacement>;
|
|
17
|
+
readonly udTooltipDisabled: import("@angular/core").InputSignal<boolean>;
|
|
18
|
+
readonly udTooltipShowDelay: import("@angular/core").InputSignal<number>;
|
|
19
|
+
private readonly overlay;
|
|
20
|
+
private readonly host;
|
|
21
|
+
private readonly viewContainerRef;
|
|
22
|
+
private readonly document;
|
|
23
|
+
private readonly id;
|
|
24
|
+
private overlayRef;
|
|
25
|
+
private panel;
|
|
26
|
+
private positionSub;
|
|
27
|
+
private showTimer;
|
|
28
|
+
private touchTimer;
|
|
29
|
+
private readonly onEscape;
|
|
30
|
+
constructor();
|
|
31
|
+
protected scheduleShow(): void;
|
|
32
|
+
protected onFocusIn(): void;
|
|
33
|
+
protected onTouchStart(): void;
|
|
34
|
+
protected onTouchEnd(): void;
|
|
35
|
+
show(): void;
|
|
36
|
+
hide(): void;
|
|
37
|
+
ngOnDestroy(): void;
|
|
38
|
+
/** Tear-down for every way a tooltip goes away, including the scroll strategy closing it. */
|
|
39
|
+
private dispose;
|
|
40
|
+
/** Adds or removes this tooltip's id in the host's aria-describedby, keeping any other ids. */
|
|
41
|
+
private describe;
|
|
42
|
+
private clearTimers;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UdTooltipDirective, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UdTooltipDirective, "[udTooltip]", never, { "udTooltip": { "alias": "udTooltip"; "required": false; "isSignal": true; }; "udTooltipPosition": { "alias": "udTooltipPosition"; "required": false; "isSignal": true; }; "udTooltipDisabled": { "alias": "udTooltipDisabled"; "required": false; "isSignal": true; }; "udTooltipShowDelay": { "alias": "udTooltipShowDelay"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
45
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './lib/carousel/carousel.component';
|
|
2
|
+
export * from './lib/checkbox/checkbox.component';
|
|
2
3
|
export * from './lib/custom-input/custom-input.component';
|
|
3
4
|
export * from './lib/custom-snackbar/custom-snackbar.component';
|
|
4
5
|
export * from './lib/custom-table/custom-table.component';
|
|
@@ -32,6 +33,8 @@ export * from './lib/form-fields/textarea/textarea.component';
|
|
|
32
33
|
export * from './lib/form-fields/phone-input/phone-input.component';
|
|
33
34
|
export * from './lib/form-fields/chip-input/chip-input.component';
|
|
34
35
|
export * from './lib/calendar/calendar.component';
|
|
36
|
+
export * from './lib/tooltip/tooltip.component';
|
|
37
|
+
export * from './lib/tooltip/tooltip.directive';
|
|
35
38
|
export * from './lib/calendar/calendar.interface';
|
|
36
39
|
export * from './lib/button/button.component';
|
|
37
40
|
export * from './lib/button-toggle/button-toggle.component';
|