@cqa-lib/cqa-ui 1.1.532 → 1.1.533
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/esm2020/lib/templates/modular-table-template/folder-sidebar/folder-sidebar.component.mjs +20 -5
- package/fesm2015/cqa-lib-cqa-ui.mjs +18 -4
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +18 -4
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/templates/modular-table-template/folder-sidebar/folder-sidebar.component.d.ts +12 -2
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import { ConnectedPosition } from '@angular/cdk/overlay';
|
|
2
3
|
import { FolderNode, FolderRenamedPayload, ModularLabels } from '../modular-table-template.models';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
interface RenderNode {
|
|
@@ -72,11 +73,17 @@ export declare class FolderSidebarComponent implements OnDestroy {
|
|
|
72
73
|
private static readonly RENAME_LIMIT_FLASH_MS;
|
|
73
74
|
/** Id of the folder whose context menu is open, or null when closed. */
|
|
74
75
|
contextMenuFolderId: number | null;
|
|
75
|
-
/** Viewport-anchored position (client coordinates) for the floating menu.
|
|
76
|
+
/** Viewport-anchored position (client coordinates) for the floating menu.
|
|
77
|
+
* Drives the invisible cdkOverlayOrigin anchor; CDK Overlay then picks the
|
|
78
|
+
* best of `contextMenuPositions` so the menu never overflows the viewport. */
|
|
76
79
|
contextMenuPosition: {
|
|
77
80
|
x: number;
|
|
78
81
|
y: number;
|
|
79
82
|
};
|
|
83
|
+
/** Position priority for the CDK-overlay-rendered context menu. CDK tries each
|
|
84
|
+
* in order and uses the first one that fits — so the menu opens downward by
|
|
85
|
+
* default and flips up / left when too close to the bottom or right edge. */
|
|
86
|
+
readonly contextMenuPositions: ConnectedPosition[];
|
|
80
87
|
/** Pending auto-expand timers while a folder drag is hovered over collapsed rows. */
|
|
81
88
|
private dragExpandTimers;
|
|
82
89
|
private readonly DRAG_EXPAND_DELAY_MS;
|
|
@@ -105,7 +112,10 @@ export declare class FolderSidebarComponent implements OnDestroy {
|
|
|
105
112
|
/**
|
|
106
113
|
* Opens the folder context menu anchored at the given client coordinates.
|
|
107
114
|
* Called from both (contextmenu) on the row and (click) on the ellipsis button.
|
|
108
|
-
*
|
|
115
|
+
* The template renders the menu via cdkConnectedOverlay anchored on an
|
|
116
|
+
* invisible 0×0 origin at `contextMenuPosition`; CDK's flexible-connected
|
|
117
|
+
* positioning auto-flips up/left when the preferred placement would overflow
|
|
118
|
+
* the viewport (e.g. right-clicking the last folder near the bottom edge).
|
|
109
119
|
*/
|
|
110
120
|
openContextMenu(n: FolderNode, event: MouseEvent): void;
|
|
111
121
|
closeContextMenu(): void;
|