@cqa-lib/cqa-ui 1.1.356 → 1.1.357
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-case-details/condition-step/condition-step.component.mjs +13 -5
- package/fesm2015/cqa-lib-cqa-ui.mjs +14 -4
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +12 -4
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/test-case-details/condition-step/condition-step.component.d.ts +9 -2
- package/package.json +1 -1
|
@@ -24317,6 +24317,7 @@ class TestCaseConditionStepComponent {
|
|
|
24317
24317
|
this.addBranch = new EventEmitter();
|
|
24318
24318
|
/** Emitted when user clicks "Add Else" so the parent can call POST test_steps with conditionType CONDITION_ELSE */
|
|
24319
24319
|
this.addElse = new EventEmitter();
|
|
24320
|
+
/** Payload can be branch only (legacy) or { branch, stepNumber } for delete modal label e.g. "Step 5 ELSE". */
|
|
24320
24321
|
this.deleteBranch = new EventEmitter();
|
|
24321
24322
|
this.duplicate = new EventEmitter();
|
|
24322
24323
|
this.delete = new EventEmitter();
|
|
@@ -24926,7 +24927,10 @@ class TestCaseConditionStepComponent {
|
|
|
24926
24927
|
this.addBranch.emit();
|
|
24927
24928
|
}
|
|
24928
24929
|
onDeleteBranch(branch) {
|
|
24929
|
-
|
|
24930
|
+
var _a, _b;
|
|
24931
|
+
const branchIndex = (_b = (_a = this.branches) === null || _a === void 0 ? void 0 : _a.indexOf(branch)) !== null && _b !== void 0 ? _b : 0;
|
|
24932
|
+
const displayNumber = this.getBranchDisplayNumber(branchIndex);
|
|
24933
|
+
this.deleteBranch.emit({ branch, stepNumber: displayNumber });
|
|
24930
24934
|
}
|
|
24931
24935
|
onNestedConditionAddBranch(nestedStep) {
|
|
24932
24936
|
// Add a new branch to the nested condition step
|
|
@@ -24941,10 +24945,16 @@ class TestCaseConditionStepComponent {
|
|
|
24941
24945
|
};
|
|
24942
24946
|
nestedStep.branches.push(newBranch);
|
|
24943
24947
|
}
|
|
24944
|
-
onNestedConditionDeleteBranch(nestedStep,
|
|
24948
|
+
onNestedConditionDeleteBranch(nestedStep, payload) {
|
|
24949
|
+
var _a, _b, _c;
|
|
24945
24950
|
// Re-emit deleteBranch so step-list can open delete modal and call API.
|
|
24946
|
-
|
|
24947
|
-
this.
|
|
24951
|
+
const branch = payload && typeof payload === 'object' && 'branch' in payload ? payload.branch : payload;
|
|
24952
|
+
const branchIndex = (_b = (_a = this.branches) === null || _a === void 0 ? void 0 : _a.indexOf(branch)) !== null && _b !== void 0 ? _b : 0;
|
|
24953
|
+
const displayNumber = this.getBranchDisplayNumber(branchIndex);
|
|
24954
|
+
const toEmit = payload && typeof payload === 'object' && 'branch' in payload
|
|
24955
|
+
? { branch: payload.branch, stepNumber: (_c = payload.stepNumber) !== null && _c !== void 0 ? _c : displayNumber }
|
|
24956
|
+
: { branch: payload, stepNumber: displayNumber };
|
|
24957
|
+
this.deleteBranch.emit(toEmit);
|
|
24948
24958
|
}
|
|
24949
24959
|
isNormalStep(step) {
|
|
24950
24960
|
return 'eventType' in step;
|