@quadrel-enterprise-ui/framework 20.27.0 → 20.27.1
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/index.d.ts
CHANGED
|
@@ -5196,6 +5196,7 @@ interface QdPopoverSizeConstraints {
|
|
|
5196
5196
|
* - The returned Observable emits `true` once initial sizing is applied and overlay is visible.
|
|
5197
5197
|
* - Even if autosize is turned off, the minimum and maximum width or height constraints are always enforced as hard limits.
|
|
5198
5198
|
* - This means the popover can never be smaller or larger than the values you set, no matter what content it contains.
|
|
5199
|
+
* - The width is also capped to the current screen width, so the popover never reaches past the screen edge — even if a larger maxWidth is set.
|
|
5199
5200
|
*
|
|
5200
5201
|
* #### For the hidden-content measuring
|
|
5201
5202
|
* @see https://stackoverflow.com/questions/1841124/find-the-potential-width-of-a-hidden-element
|
|
@@ -5215,6 +5216,7 @@ declare class QdPopoverSizingService {
|
|
|
5215
5216
|
observe(host: HTMLElement, popover: HTMLElement, overlayRef: OverlayRef, autoSize: QdPopoverAutoSizeConfig, constraints: QdPopoverSizeConstraints): Observable<boolean>;
|
|
5216
5217
|
private showOverlay;
|
|
5217
5218
|
private hideOverlay;
|
|
5219
|
+
private resolveWidthLimits;
|
|
5218
5220
|
private applySize;
|
|
5219
5221
|
private measureContentSize;
|
|
5220
5222
|
disconnect(): void;
|
|
@@ -5229,6 +5231,26 @@ declare class QdPopoverParentService {
|
|
|
5229
5231
|
static ɵprov: i0.ɵɵInjectableDeclaration<QdPopoverParentService>;
|
|
5230
5232
|
}
|
|
5231
5233
|
|
|
5234
|
+
/**
|
|
5235
|
+
* **QdPopoverOnClickDirective**
|
|
5236
|
+
*
|
|
5237
|
+
* Shows a popover next to its host element and opens or closes it on host click.
|
|
5238
|
+
*
|
|
5239
|
+
* It is an internal building block. Quadrel components such as dropdowns, menu buttons and
|
|
5240
|
+
* filters build on it; consumers do not use it directly.
|
|
5241
|
+
*
|
|
5242
|
+
* #### Features:
|
|
5243
|
+
* - Opens the popover on click and closes it on the next click or an outside click.
|
|
5244
|
+
* - With `qdPopoverEnableKeyControl`, Enter and Space open it, Escape and Tab close it.
|
|
5245
|
+
* - Sizes the popover to its host or content within the min/max limits, and never wider than the screen.
|
|
5246
|
+
* - Places it with the Angular CDK; with `qdPopoverFlipIntoViewport` it opens to the side that has room instead of off the screen edge.
|
|
5247
|
+
* - Keeps only one popover open: opening one closes the others, but a nested popover keeps its parents open.
|
|
5248
|
+
*
|
|
5249
|
+
* #### Notes & Best Practices
|
|
5250
|
+
* - Emits `opened` and `closed` so consumers can react.
|
|
5251
|
+
* - The flip is opt-in, so popovers that already sit correctly stay as they are.
|
|
5252
|
+
* - Not part of the public API; use the higher-level components like `qd-dropdown` or `qd-menu-button` instead.
|
|
5253
|
+
*/
|
|
5232
5254
|
declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
|
|
5233
5255
|
protected hostRef: ElementRef<HTMLElement>;
|
|
5234
5256
|
protected overlayPositionBuilder: OverlayPositionBuilder;
|
|
@@ -5247,6 +5269,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
|
|
|
5247
5269
|
qdPopoverMaxWidth: number | 'none';
|
|
5248
5270
|
qdPopoverAutoSize: QdPopoverAutoSizeConfig;
|
|
5249
5271
|
qdPopoverEnableKeyControl: boolean;
|
|
5272
|
+
qdPopoverFlipIntoViewport: boolean;
|
|
5250
5273
|
readonly opened: EventEmitter<any>;
|
|
5251
5274
|
readonly closed: EventEmitter<any>;
|
|
5252
5275
|
handleClick(event: MouseEvent): void;
|
|
@@ -5257,6 +5280,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
|
|
|
5257
5280
|
private _host;
|
|
5258
5281
|
private _popoverRef;
|
|
5259
5282
|
private _positionStrategyInstance;
|
|
5283
|
+
private _resolvedPositions;
|
|
5260
5284
|
private _subscriptions;
|
|
5261
5285
|
constructor();
|
|
5262
5286
|
ngOnInit(): void;
|
|
@@ -5275,6 +5299,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
|
|
|
5275
5299
|
close(): void;
|
|
5276
5300
|
private popoverInstance;
|
|
5277
5301
|
private initPositionStrategy;
|
|
5302
|
+
private withHorizontalFallbacks;
|
|
5278
5303
|
private createOverlay;
|
|
5279
5304
|
private runSizingAndOpen;
|
|
5280
5305
|
private setPopoverContent;
|
|
@@ -5284,7 +5309,7 @@ declare class QdPopoverOnClickDirective implements OnInit, OnDestroy {
|
|
|
5284
5309
|
private unsubscribeAll;
|
|
5285
5310
|
private cleanup;
|
|
5286
5311
|
static ɵfac: i0.ɵɵFactoryDeclaration<QdPopoverOnClickDirective, never>;
|
|
5287
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<QdPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; "qdPopoverBackgroundColor": { "alias": "qdPopoverBackgroundColor"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverAutoSize": { "alias": "qdPopoverAutoSize"; "required": false; }; "qdPopoverEnableKeyControl": { "alias": "qdPopoverEnableKeyControl"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
|
|
5312
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QdPopoverOnClickDirective, "[qdPopoverOnClick]", ["qdPopoverOnClick"], { "qdPopoverOnClick": { "alias": "qdPopoverOnClick"; "required": false; }; "positionStrategy": { "alias": "positionStrategy"; "required": false; }; "qdPopoverCloseStrategy": { "alias": "qdPopoverCloseStrategy"; "required": false; }; "qdPopoverDisabled": { "alias": "qdPopoverDisabled"; "required": false; }; "qdPopoverStopPropagation": { "alias": "qdPopoverStopPropagation"; "required": false; }; "qdPopoverBackgroundColor": { "alias": "qdPopoverBackgroundColor"; "required": false; }; "qdPopoverMaxHeight": { "alias": "qdPopoverMaxHeight"; "required": false; }; "qdPopoverMinWidth": { "alias": "qdPopoverMinWidth"; "required": false; }; "qdPopoverMaxWidth": { "alias": "qdPopoverMaxWidth"; "required": false; }; "qdPopoverAutoSize": { "alias": "qdPopoverAutoSize"; "required": false; }; "qdPopoverEnableKeyControl": { "alias": "qdPopoverEnableKeyControl"; "required": false; }; "qdPopoverFlipIntoViewport": { "alias": "qdPopoverFlipIntoViewport"; "required": false; }; }, { "opened": "opened"; "closed": "closed"; }, never, never, false, never>;
|
|
5288
5313
|
}
|
|
5289
5314
|
|
|
5290
5315
|
/**
|