@cqa-lib/cqa-ui 1.1.555 → 1.1.556
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/test-suite/move-test-suite-dialog/move-test-suite-dialog.component.mjs +278 -30
- package/fesm2015/cqa-lib-cqa-ui.mjs +277 -28
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +276 -28
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-suite/move-test-suite-dialog/move-test-suite-dialog.component.d.ts +44 -4
- package/package.json +1 -1
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import { ChangeDetectorRef, EventEmitter } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { FolderNode, ModularLabels } from '../../templates/modular-table-template/modular-table-template.models';
|
|
3
3
|
import { TestSuiteLabels } from '../test-suite.models';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
interface FlatFolderRow {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
depth: number;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
hasChildren: boolean;
|
|
11
|
+
expanded: boolean;
|
|
12
|
+
childrenLoading: boolean;
|
|
13
|
+
showLoadingPlaceholder: boolean;
|
|
14
|
+
}
|
|
5
15
|
/**
|
|
6
16
|
* Body of the "Move Test Suite" dialog.
|
|
7
17
|
*
|
|
@@ -20,7 +30,7 @@ import * as i0 from "@angular/core";
|
|
|
20
30
|
* 2. **Host-driven** — host renders `<cqa-move-test-suite-dialog>` inside its
|
|
21
31
|
* own modal and listens to `(submitted)` / `(cancelled)` / `(pickedFolderIdChange)`.
|
|
22
32
|
*/
|
|
23
|
-
export declare class MoveTestSuiteDialogComponent {
|
|
33
|
+
export declare class MoveTestSuiteDialogComponent implements OnInit, OnChanges {
|
|
24
34
|
private cdr;
|
|
25
35
|
private _folders;
|
|
26
36
|
set folders(value: FolderNode[]);
|
|
@@ -60,6 +70,12 @@ export declare class MoveTestSuiteDialogComponent {
|
|
|
60
70
|
targetFolderId: number | null;
|
|
61
71
|
}>;
|
|
62
72
|
cancelled: EventEmitter<void>;
|
|
73
|
+
/** Fires when a folder needs its children fetched. Emitted by `pick` (row
|
|
74
|
+
* click) and `toggleExpanded` (chevron click) when the target node has
|
|
75
|
+
* `hasChildren = true` but `loadedPages == null` and is not already fetching.
|
|
76
|
+
* Hosts subscribe and call their paginated fetch, mutating the FolderNode
|
|
77
|
+
* in place (set `children`, `loadedPages`, `childrenLoading`). */
|
|
78
|
+
folderChildrenRequested: EventEmitter<number>;
|
|
63
79
|
/** Bubble cqa-custom-input focus/blur events up to hosts. Useful when
|
|
64
80
|
* `fieldsDisabled = false` and the host wants to react to interaction. */
|
|
65
81
|
currentFieldFocus: EventEmitter<FocusEvent>;
|
|
@@ -71,8 +87,27 @@ export declare class MoveTestSuiteDialogComponent {
|
|
|
71
87
|
* suite starts in Unorganized (`currentFolderId = null`) so a fresh dialog
|
|
72
88
|
* doesn't appear valid just because `pickedFolderId` also defaults to null. */
|
|
73
89
|
private pickedTouched;
|
|
90
|
+
/** Folder ids currently expanded in the inlined picker. Managed entirely
|
|
91
|
+
* inside this component (no external Input) so it survives the host pushing
|
|
92
|
+
* a new `folders` reference after each lazy-fetch resolves. */
|
|
93
|
+
private expandedIds;
|
|
74
94
|
constructor(cdr: ChangeDetectorRef);
|
|
75
|
-
|
|
95
|
+
ngOnInit(): void;
|
|
96
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
97
|
+
/** Folder-row click handler. Selects the folder as the destination and, when
|
|
98
|
+
* the folder has unloaded children, auto-expands it and asks the host to
|
|
99
|
+
* fetch its children. */
|
|
100
|
+
pick(id: number | null): void;
|
|
101
|
+
/** Chevron click handler. Toggles expansion locally; on expand path, asks
|
|
102
|
+
* the host to fetch children when not already loaded. */
|
|
103
|
+
toggleExpanded(id: number, event: Event): void;
|
|
104
|
+
isPicked(id: number | null): boolean;
|
|
105
|
+
/** "Unorganized" row is disabled when the suite is already in Unorganized. */
|
|
106
|
+
get isUnorganizedDisabled(): boolean;
|
|
107
|
+
/** Flattened, depth-indented row descriptors fed into the template `*ngFor`.
|
|
108
|
+
* Walks `_folders`, derives chevron / loading / expanded state per node. */
|
|
109
|
+
get flatRows(): FlatFolderRow[];
|
|
110
|
+
trackById: (_: number, row: FlatFolderRow) => number;
|
|
76
111
|
/** True once the user has picked a destination via the embedded tree. Drives
|
|
77
112
|
* the destination-readout styling (indigo when picked, muted when not). */
|
|
78
113
|
get hasPick(): boolean;
|
|
@@ -100,7 +135,12 @@ export declare class MoveTestSuiteDialogComponent {
|
|
|
100
135
|
onDestinationFieldValueChange(_value: string): void;
|
|
101
136
|
onDestinationFieldFocused(event: FocusEvent): void;
|
|
102
137
|
onDestinationFieldBlurred(event: FocusEvent): void;
|
|
138
|
+
private requestChildrenIfMissing;
|
|
139
|
+
private seedExpandedIds;
|
|
140
|
+
private collectAncestors;
|
|
141
|
+
private findNode;
|
|
103
142
|
private findFolderName;
|
|
104
143
|
static ɵfac: i0.ɵɵFactoryDeclaration<MoveTestSuiteDialogComponent, never>;
|
|
105
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MoveTestSuiteDialogComponent, "cqa-move-test-suite-dialog", never, { "folders": "folders"; "labels": "labels"; "testSuiteLabels": "testSuiteLabels"; "currentFolderId": "currentFolderId"; "currentFolderName": "currentFolderName"; "suiteName": "suiteName"; "pickedFolderId": "pickedFolderId"; "pickerHeight": "pickerHeight"; "fieldsDisabled": "fieldsDisabled"; }, { "pickedFolderIdChange": "pickedFolderIdChange"; "submitted": "submitted"; "cancelled": "cancelled"; "currentFieldFocus": "currentFieldFocus"; "currentFieldBlur": "currentFieldBlur"; "destinationFieldFocus": "destinationFieldFocus"; "destinationFieldBlur": "destinationFieldBlur"; }, never, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MoveTestSuiteDialogComponent, "cqa-move-test-suite-dialog", never, { "folders": "folders"; "labels": "labels"; "testSuiteLabels": "testSuiteLabels"; "currentFolderId": "currentFolderId"; "currentFolderName": "currentFolderName"; "suiteName": "suiteName"; "pickedFolderId": "pickedFolderId"; "pickerHeight": "pickerHeight"; "fieldsDisabled": "fieldsDisabled"; }, { "pickedFolderIdChange": "pickedFolderIdChange"; "submitted": "submitted"; "cancelled": "cancelled"; "folderChildrenRequested": "folderChildrenRequested"; "currentFieldFocus": "currentFieldFocus"; "currentFieldBlur": "currentFieldBlur"; "destinationFieldFocus": "destinationFieldFocus"; "destinationFieldBlur": "destinationFieldBlur"; }, never, never>;
|
|
106
145
|
}
|
|
146
|
+
export {};
|