1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | export declare type HorizontalConnectionPos = 'start' | 'center' | 'end';
|
---|
9 | /** Vertical dimension of a connection point on the perimeter of the origin or overlay element. */
|
---|
10 | export declare type VerticalConnectionPos = 'top' | 'center' | 'bottom';
|
---|
11 | /** A connection point on the origin element. */
|
---|
12 | export interface OriginConnectionPosition {
|
---|
13 | originX: HorizontalConnectionPos;
|
---|
14 | originY: VerticalConnectionPos;
|
---|
15 | }
|
---|
16 | /** A connection point on the overlay element. */
|
---|
17 | export interface OverlayConnectionPosition {
|
---|
18 | overlayX: HorizontalConnectionPos;
|
---|
19 | overlayY: VerticalConnectionPos;
|
---|
20 | }
|
---|
21 | /** The points of the origin element and the overlay element to connect. */
|
---|
22 | export declare class ConnectionPositionPair {
|
---|
23 | /** Offset along the X axis. */
|
---|
24 | offsetX?: number | undefined;
|
---|
25 | /** Offset along the Y axis. */
|
---|
26 | offsetY?: number | undefined;
|
---|
27 | /** Class(es) to be applied to the panel while this position is active. */
|
---|
28 | panelClass?: string | string[] | undefined;
|
---|
29 | /** X-axis attachment point for connected overlay origin. Can be 'start', 'end', or 'center'. */
|
---|
30 | originX: HorizontalConnectionPos;
|
---|
31 | /** Y-axis attachment point for connected overlay origin. Can be 'top', 'bottom', or 'center'. */
|
---|
32 | originY: VerticalConnectionPos;
|
---|
33 | /** X-axis attachment point for connected overlay. Can be 'start', 'end', or 'center'. */
|
---|
34 | overlayX: HorizontalConnectionPos;
|
---|
35 | /** Y-axis attachment point for connected overlay. Can be 'top', 'bottom', or 'center'. */
|
---|
36 | overlayY: VerticalConnectionPos;
|
---|
37 | constructor(origin: OriginConnectionPosition, overlay: OverlayConnectionPosition,
|
---|
38 | /** Offset along the X axis. */
|
---|
39 | offsetX?: number | undefined,
|
---|
40 | /** Offset along the Y axis. */
|
---|
41 | offsetY?: number | undefined,
|
---|
42 | /** Class(es) to be applied to the panel while this position is active. */
|
---|
43 | panelClass?: string | string[] | undefined);
|
---|
44 | }
|
---|
45 | /**
|
---|
46 | * Set of properties regarding the position of the origin and overlay relative to the viewport
|
---|
47 | * with respect to the containing Scrollable elements.
|
---|
48 | *
|
---|
49 | * The overlay and origin are clipped if any part of their bounding client rectangle exceeds the
|
---|
50 | * bounds of any one of the strategy's Scrollable's bounding client rectangle.
|
---|
51 | *
|
---|
52 | * The overlay and origin are outside view if there is no overlap between their bounding client
|
---|
53 | * rectangle and any one of the strategy's Scrollable's bounding client rectangle.
|
---|
54 | *
|
---|
55 | * ----------- -----------
|
---|
56 | * | outside | | clipped |
|
---|
57 | * | view | --------------------------
|
---|
58 | * | | | | | |
|
---|
59 | * ---------- | ----------- |
|
---|
60 | * -------------------------- | |
|
---|
61 | * | | | Scrollable |
|
---|
62 | * | | | |
|
---|
63 | * | | --------------------------
|
---|
64 | * | Scrollable |
|
---|
65 | * | |
|
---|
66 | * --------------------------
|
---|
67 | *
|
---|
68 | * @docs-private
|
---|
69 | */
|
---|
70 | export declare class ScrollingVisibility {
|
---|
71 | isOriginClipped: boolean;
|
---|
72 | isOriginOutsideView: boolean;
|
---|
73 | isOverlayClipped: boolean;
|
---|
74 | isOverlayOutsideView: boolean;
|
---|
75 | }
|
---|
76 | /** The change event emitted by the strategy when a fallback position is used. */
|
---|
77 | export declare class ConnectedOverlayPositionChange {
|
---|
78 | /** The position used as a result of this change. */
|
---|
79 | connectionPair: ConnectionPositionPair;
|
---|
80 | /** @docs-private */
|
---|
81 | scrollableViewProperties: ScrollingVisibility;
|
---|
82 | constructor(
|
---|
83 | /** The position used as a result of this change. */
|
---|
84 | connectionPair: ConnectionPositionPair,
|
---|
85 | /** @docs-private */
|
---|
86 | scrollableViewProperties: ScrollingVisibility);
|
---|
87 | }
|
---|
88 | /**
|
---|
89 | * Validates whether a vertical position property matches the expected values.
|
---|
90 | * @param property Name of the property being validated.
|
---|
91 | * @param value Value of the property being validated.
|
---|
92 | * @docs-private
|
---|
93 | */
|
---|
94 | export declare function validateVerticalPosition(property: string, value: VerticalConnectionPos): void;
|
---|
95 | /**
|
---|
96 | * Validates whether a horizontal position property matches the expected values.
|
---|
97 | * @param property Name of the property being validated.
|
---|
98 | * @param value Value of the property being validated.
|
---|
99 | * @docs-private
|
---|
100 | */
|
---|
101 | export declare function validateHorizontalPosition(property: string, value: HorizontalConnectionPos): void;
|
---|