@cqa-lib/cqa-ui 1.1.470 → 1.1.472

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.
@@ -1646,6 +1646,7 @@ class PaginationComponent {
1646
1646
  this.paginate = new EventEmitter();
1647
1647
  // Local UI state for custom page-size dropdown
1648
1648
  this.pageSizeOpen = false;
1649
+ this.pageSizeMenuPosition = 'down';
1649
1650
  this.pagesOption = {
1650
1651
  placeholder: 'Choose page',
1651
1652
  disabled: false,
@@ -1686,6 +1687,29 @@ class PaginationComponent {
1686
1687
  }
1687
1688
  togglePageSizeMenu() {
1688
1689
  this.pageSizeOpen = !this.pageSizeOpen;
1690
+ if (this.pageSizeOpen) {
1691
+ this.updatePageSizeMenuPosition();
1692
+ }
1693
+ }
1694
+ updatePageSizeMenuPosition() {
1695
+ var _a;
1696
+ if (!((_a = this.pageSizeDropdownContainer) === null || _a === void 0 ? void 0 : _a.nativeElement)) {
1697
+ this.pageSizeMenuPosition = 'down';
1698
+ return;
1699
+ }
1700
+ const triggerRect = this.pageSizeDropdownContainer.nativeElement.getBoundingClientRect();
1701
+ const viewportHeight = window.innerHeight || document.documentElement.clientHeight || 0;
1702
+ const estimatedOptionHeight = 32;
1703
+ const estimatedMenuHeight = Math.min(170, this.pageSizeOptions.length * estimatedOptionHeight + 10);
1704
+ const gap = 8;
1705
+ const requiredSpace = estimatedMenuHeight + gap;
1706
+ const spaceBelow = viewportHeight - triggerRect.bottom;
1707
+ this.pageSizeMenuPosition = spaceBelow >= requiredSpace ? 'down' : 'up';
1708
+ }
1709
+ onWindowResize() {
1710
+ if (this.pageSizeOpen) {
1711
+ this.updatePageSizeMenuPosition();
1712
+ }
1689
1713
  }
1690
1714
  onDocumentClick(event) {
1691
1715
  var _a;
@@ -1726,10 +1750,10 @@ class PaginationComponent {
1726
1750
  }
1727
1751
  }
1728
1752
  PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1729
- PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: PaginationComponent, selector: "cqa-pagination", inputs: { totalElements: "totalElements", totalPages: "totalPages", pageIndex: "pageIndex", pageSize: "pageSize", pageItemCount: "pageItemCount", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange", paginate: "paginate" }, host: { listeners: { "document:click": "onDocumentClick($event)" }, classAttribute: "cqa-ui-root" }, viewQueries: [{ propertyName: "pageSizeDropdownContainer", first: true, predicate: ["pageSizeDropdownContainer"], descendants: true }], ngImport: i0, template: "<!-- Bottom Pagination -->\n<div class=\"cqa-ui-root\" >\n <div class=\"table-footer-pagination cqa-text-grey-300 cqa-text-[12.3px] cqa-leading-[17.5px] cqa-flex cqa-items-center cqa-justify-between cqa-gap-2 cqa-flex-wrap cqa-bg-surface-default cqa-px-[21px] cqa-py-[15px]\" *ngIf=\"pageItemCount && totalElements\">\n <div class=\"pagination-info cqa-flex cqa-items-center cqa-gap-[7px] cqa-relative\">\n <span class=\"rows-label\">Rows per page</span>\n <div class=\"cqa-relative\" #pageSizeDropdownContainer>\n <!-- Custom Select Trigger -->\n <button\n type=\"button\"\n class=\"cqa-inline-flex cqa-items-center cqa-gap-[19px] cqa-bg-white cqa-text-black-100 cqa-rounded-[5px] cqa-px-[11.5px] cqa-py-[6.75px]\"\n (click)=\"togglePageSizeMenu()\"\n [attr.aria-expanded]=\"pageSizeOpen\"\n aria-haspopup=\"listbox\"\n >\n {{ pageSize }}\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g opacity=\"0.5\"><path d=\"M3.5 5.25L7 8.75L10.5 5.25\" stroke=\"#717182\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></g></svg>\n </button>\n <!-- Dropdown Menu -->\n <div\n *ngIf=\"pageSizeOpen\"\n class=\"cqa-absolute cqa-z-[100] cqa-bottom-[calc(100%+8px)] cqa-left-0 cqa-w-[75px] cqa-max-h-[170px] cqa-overflow-auto cqa-rounded-lg cqa-border cqa-border-[#E5E7EB] cqa-bg-white cqa-shadow-[0px_4px_6px_-1px_rgba(0,0,0,0.1)] cqa-p-[5px]\"\n role=\"listbox\"\n [attr.aria-activedescendant]=\"'pagesize-' + pageSize\"\n >\n <button\n *ngFor=\"let size of pageSizeOptions\"\n type=\"button\"\n class=\"cqa-w-full cqa-px-2 cqa-py-[6px] hover:cqa-bg-[#F7F8FA] cqa-text-left cqa-rounded-md cqa-text-black-100\"\n [attr.id]=\"'pagesize-' + size\"\n role=\"option\"\n [attr.aria-selected]=\"pageSize === size\"\n (click)=\"selectPageSize(size)\"\n >\n {{ size }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"pagination-right cqa-flex cqa-items-center cqa-gap-[21px]\" *ngIf=\"showRangeAndControls\">\n <div class=\"pagination-range\">\n {{ getStartItem() }}&ndash;{{ getEndItem() }} of {{ totalElements }}\n </div>\n <div class=\"pagination-controls cqa-flex cqa-items-stretch cqa-gap-[3.5px]\">\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex === 0\" (click)=\"goToPage(pageIndex - 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.75 10.5L5.25 7L8.75 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex >= computedTotalPages - 1\" (click)=\"goToPage(pageIndex + 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.25 10.5L8.75 7L5.25 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n </div>\n </div>\n </div>\n</div>", directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1753
+ PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: PaginationComponent, selector: "cqa-pagination", inputs: { totalElements: "totalElements", totalPages: "totalPages", pageIndex: "pageIndex", pageSize: "pageSize", pageItemCount: "pageItemCount", pageSizeOptions: "pageSizeOptions" }, outputs: { pageIndexChange: "pageIndexChange", pageSizeChange: "pageSizeChange", paginate: "paginate" }, host: { listeners: { "window:resize": "onWindowResize()", "document:click": "onDocumentClick($event)" }, classAttribute: "cqa-ui-root" }, viewQueries: [{ propertyName: "pageSizeDropdownContainer", first: true, predicate: ["pageSizeDropdownContainer"], descendants: true }], ngImport: i0, template: "<!-- Bottom Pagination -->\n<div class=\"cqa-ui-root\" >\n <div class=\"table-footer-pagination cqa-text-grey-300 cqa-text-[12.3px] cqa-leading-[17.5px] cqa-flex cqa-items-center cqa-justify-between cqa-gap-2 cqa-flex-wrap cqa-bg-surface-default cqa-px-[21px] cqa-py-[15px]\" *ngIf=\"pageItemCount && totalElements\">\n <div class=\"pagination-info cqa-flex cqa-items-center cqa-gap-[7px] cqa-relative\">\n <span class=\"rows-label\">Rows per page</span>\n <div class=\"cqa-relative\" #pageSizeDropdownContainer>\n <!-- Custom Select Trigger -->\n <button\n type=\"button\"\n class=\"cqa-inline-flex cqa-items-center cqa-gap-[19px] cqa-bg-white cqa-text-black-100 cqa-rounded-[5px] cqa-px-[11.5px] cqa-py-[6.75px]\"\n (click)=\"togglePageSizeMenu()\"\n [attr.aria-expanded]=\"pageSizeOpen\"\n aria-haspopup=\"listbox\"\n >\n {{ pageSize }}\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g opacity=\"0.5\"><path d=\"M3.5 5.25L7 8.75L10.5 5.25\" stroke=\"#717182\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></g></svg>\n </button>\n <!-- Dropdown Menu -->\n <div\n *ngIf=\"pageSizeOpen\"\n class=\"cqa-absolute cqa-z-[100] cqa-left-0 cqa-w-[75px] cqa-max-h-[170px] cqa-overflow-auto cqa-rounded-lg cqa-border cqa-border-[#E5E7EB] cqa-bg-white cqa-shadow-[0px_4px_6px_-1px_rgba(0,0,0,0.1)] cqa-p-[5px]\"\n [style.top]=\"pageSizeMenuPosition === 'down' ? 'calc(100% + 8px)' : null\"\n [style.bottom]=\"pageSizeMenuPosition === 'up' ? 'calc(100% + 8px)' : null\"\n role=\"listbox\"\n [attr.aria-activedescendant]=\"'pagesize-' + pageSize\"\n >\n <button\n *ngFor=\"let size of pageSizeOptions\"\n type=\"button\"\n class=\"cqa-w-full cqa-px-2 cqa-py-[6px] hover:cqa-bg-[#F7F8FA] cqa-text-left cqa-rounded-md cqa-text-black-100\"\n [attr.id]=\"'pagesize-' + size\"\n role=\"option\"\n [attr.aria-selected]=\"pageSize === size\"\n (click)=\"selectPageSize(size)\"\n >\n {{ size }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"pagination-right cqa-flex cqa-items-center cqa-gap-[21px]\" *ngIf=\"showRangeAndControls\">\n <div class=\"pagination-range\">\n {{ getStartItem() }}&ndash;{{ getEndItem() }} of {{ totalElements }}\n </div>\n <div class=\"pagination-controls cqa-flex cqa-items-stretch cqa-gap-[3.5px]\">\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex === 0\" (click)=\"goToPage(pageIndex - 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.75 10.5L5.25 7L8.75 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex >= computedTotalPages - 1\" (click)=\"goToPage(pageIndex + 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.25 10.5L8.75 7L5.25 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n </div>\n </div>\n </div>\n</div>", directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1730
1754
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: PaginationComponent, decorators: [{
1731
1755
  type: Component,
1732
- args: [{ selector: 'cqa-pagination', host: { class: 'cqa-ui-root' }, template: "<!-- Bottom Pagination -->\n<div class=\"cqa-ui-root\" >\n <div class=\"table-footer-pagination cqa-text-grey-300 cqa-text-[12.3px] cqa-leading-[17.5px] cqa-flex cqa-items-center cqa-justify-between cqa-gap-2 cqa-flex-wrap cqa-bg-surface-default cqa-px-[21px] cqa-py-[15px]\" *ngIf=\"pageItemCount && totalElements\">\n <div class=\"pagination-info cqa-flex cqa-items-center cqa-gap-[7px] cqa-relative\">\n <span class=\"rows-label\">Rows per page</span>\n <div class=\"cqa-relative\" #pageSizeDropdownContainer>\n <!-- Custom Select Trigger -->\n <button\n type=\"button\"\n class=\"cqa-inline-flex cqa-items-center cqa-gap-[19px] cqa-bg-white cqa-text-black-100 cqa-rounded-[5px] cqa-px-[11.5px] cqa-py-[6.75px]\"\n (click)=\"togglePageSizeMenu()\"\n [attr.aria-expanded]=\"pageSizeOpen\"\n aria-haspopup=\"listbox\"\n >\n {{ pageSize }}\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g opacity=\"0.5\"><path d=\"M3.5 5.25L7 8.75L10.5 5.25\" stroke=\"#717182\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></g></svg>\n </button>\n <!-- Dropdown Menu -->\n <div\n *ngIf=\"pageSizeOpen\"\n class=\"cqa-absolute cqa-z-[100] cqa-bottom-[calc(100%+8px)] cqa-left-0 cqa-w-[75px] cqa-max-h-[170px] cqa-overflow-auto cqa-rounded-lg cqa-border cqa-border-[#E5E7EB] cqa-bg-white cqa-shadow-[0px_4px_6px_-1px_rgba(0,0,0,0.1)] cqa-p-[5px]\"\n role=\"listbox\"\n [attr.aria-activedescendant]=\"'pagesize-' + pageSize\"\n >\n <button\n *ngFor=\"let size of pageSizeOptions\"\n type=\"button\"\n class=\"cqa-w-full cqa-px-2 cqa-py-[6px] hover:cqa-bg-[#F7F8FA] cqa-text-left cqa-rounded-md cqa-text-black-100\"\n [attr.id]=\"'pagesize-' + size\"\n role=\"option\"\n [attr.aria-selected]=\"pageSize === size\"\n (click)=\"selectPageSize(size)\"\n >\n {{ size }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"pagination-right cqa-flex cqa-items-center cqa-gap-[21px]\" *ngIf=\"showRangeAndControls\">\n <div class=\"pagination-range\">\n {{ getStartItem() }}&ndash;{{ getEndItem() }} of {{ totalElements }}\n </div>\n <div class=\"pagination-controls cqa-flex cqa-items-stretch cqa-gap-[3.5px]\">\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex === 0\" (click)=\"goToPage(pageIndex - 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.75 10.5L5.25 7L8.75 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex >= computedTotalPages - 1\" (click)=\"goToPage(pageIndex + 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.25 10.5L8.75 7L5.25 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [] }]
1756
+ args: [{ selector: 'cqa-pagination', host: { class: 'cqa-ui-root' }, template: "<!-- Bottom Pagination -->\n<div class=\"cqa-ui-root\" >\n <div class=\"table-footer-pagination cqa-text-grey-300 cqa-text-[12.3px] cqa-leading-[17.5px] cqa-flex cqa-items-center cqa-justify-between cqa-gap-2 cqa-flex-wrap cqa-bg-surface-default cqa-px-[21px] cqa-py-[15px]\" *ngIf=\"pageItemCount && totalElements\">\n <div class=\"pagination-info cqa-flex cqa-items-center cqa-gap-[7px] cqa-relative\">\n <span class=\"rows-label\">Rows per page</span>\n <div class=\"cqa-relative\" #pageSizeDropdownContainer>\n <!-- Custom Select Trigger -->\n <button\n type=\"button\"\n class=\"cqa-inline-flex cqa-items-center cqa-gap-[19px] cqa-bg-white cqa-text-black-100 cqa-rounded-[5px] cqa-px-[11.5px] cqa-py-[6.75px]\"\n (click)=\"togglePageSizeMenu()\"\n [attr.aria-expanded]=\"pageSizeOpen\"\n aria-haspopup=\"listbox\"\n >\n {{ pageSize }}\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g opacity=\"0.5\"><path d=\"M3.5 5.25L7 8.75L10.5 5.25\" stroke=\"#717182\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></g></svg>\n </button>\n <!-- Dropdown Menu -->\n <div\n *ngIf=\"pageSizeOpen\"\n class=\"cqa-absolute cqa-z-[100] cqa-left-0 cqa-w-[75px] cqa-max-h-[170px] cqa-overflow-auto cqa-rounded-lg cqa-border cqa-border-[#E5E7EB] cqa-bg-white cqa-shadow-[0px_4px_6px_-1px_rgba(0,0,0,0.1)] cqa-p-[5px]\"\n [style.top]=\"pageSizeMenuPosition === 'down' ? 'calc(100% + 8px)' : null\"\n [style.bottom]=\"pageSizeMenuPosition === 'up' ? 'calc(100% + 8px)' : null\"\n role=\"listbox\"\n [attr.aria-activedescendant]=\"'pagesize-' + pageSize\"\n >\n <button\n *ngFor=\"let size of pageSizeOptions\"\n type=\"button\"\n class=\"cqa-w-full cqa-px-2 cqa-py-[6px] hover:cqa-bg-[#F7F8FA] cqa-text-left cqa-rounded-md cqa-text-black-100\"\n [attr.id]=\"'pagesize-' + size\"\n role=\"option\"\n [attr.aria-selected]=\"pageSize === size\"\n (click)=\"selectPageSize(size)\"\n >\n {{ size }}\n </button>\n </div>\n </div>\n </div>\n\n <div class=\"pagination-right cqa-flex cqa-items-center cqa-gap-[21px]\" *ngIf=\"showRangeAndControls\">\n <div class=\"pagination-range\">\n {{ getStartItem() }}&ndash;{{ getEndItem() }} of {{ totalElements }}\n </div>\n <div class=\"pagination-controls cqa-flex cqa-items-stretch cqa-gap-[3.5px]\">\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex === 0\" (click)=\"goToPage(pageIndex - 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.75 10.5L5.25 7L8.75 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n <button class=\"pagination-btn cqa-w-[28px] cqa-h-[28px] cqa-min-w-[28px] cqa-rounded-[5px] cqa-border cqa-border-[#E5E7EB] cqa-bg-[#F7F8FA] cqa-flex cqa-items-center cqa-justify-center\" [disabled]=\"pageIndex >= computedTotalPages - 1\" (click)=\"goToPage(pageIndex + 1)\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.25 10.5L8.75 7L5.25 3.5\" stroke=\"#838384\" stroke-width=\"1.16667\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </button>\n </div>\n </div>\n </div>\n</div>", styles: [] }]
1733
1757
  }], propDecorators: { totalElements: [{
1734
1758
  type: Input
1735
1759
  }], totalPages: [{
@@ -1751,6 +1775,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
1751
1775
  }], pageSizeDropdownContainer: [{
1752
1776
  type: ViewChild,
1753
1777
  args: ['pageSizeDropdownContainer', { static: false }]
1778
+ }], onWindowResize: [{
1779
+ type: HostListener,
1780
+ args: ['window:resize']
1754
1781
  }], onDocumentClick: [{
1755
1782
  type: HostListener,
1756
1783
  args: ['document:click', ['$event']]
@@ -40116,7 +40143,7 @@ class TestCaseDetailsEditComponent {
40116
40143
  return !!((_a = section === null || section === void 0 ? void 0 : section.items) === null || _a === void 0 ? void 0 : _a.some((i) => i.label === 'Prerequisite Case'));
40117
40144
  }
40118
40145
  ngOnInit() {
40119
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
40146
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
40120
40147
  this.editDescription = this.descriptionContent;
40121
40148
  this.editStatus = (_b = (_a = this.statusItem) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
40122
40149
  this.editPriority = (_d = (_c = this.priorityItem) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : '';
@@ -40137,7 +40164,8 @@ class TestCaseDetailsEditComponent {
40137
40164
  this.dataDrivenEnabled = !!this.getConfigItemValue('Key Flags', 'Data Driven');
40138
40165
  const enableAiSmartness = this.getConfigItemValue('AI Configuration', 'Enable AI Smartness');
40139
40166
  const defaultAiAction = this.getConfigItemValue('AI Configuration', 'Default AI Action');
40140
- const knowledgeBaseDefaultTestCase = this.getConfigItemValue('AI Configuration', 'Knowledge Base Default Test Case');
40167
+ const knowledgeBaseDefaultTestCaseRaw = this.getConfigItemValue('AI Configuration', 'Knowledge Base Default Test Case');
40168
+ const knowledgeBaseDefaultTestCase = (_v = this.resolveToOptionValue(knowledgeBaseDefaultTestCaseRaw, (_u = (_t = this.selectConfigOverrides) === null || _t === void 0 ? void 0 : _t['knowledgeBaseDefaultTestCase']) === null || _u === void 0 ? void 0 : _u.options)) !== null && _v !== void 0 ? _v : knowledgeBaseDefaultTestCaseRaw;
40141
40169
  const useAiMetadataRaw = this.getConfigItemValue('AI Configuration', 'Enable AI metadata collection');
40142
40170
  const useAiMetadata = this.normalizeBooleanSelectValue(useAiMetadataRaw);
40143
40171
  const prerequisiteCases = this.getPrerequisiteCasesFromConfig();
@@ -40236,7 +40264,7 @@ class TestCaseDetailsEditComponent {
40236
40264
  return val && String(val).trim() ? String(val) : '';
40237
40265
  }
40238
40266
  ngOnChanges(changes) {
40239
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
40267
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
40240
40268
  if (changes['labels'] || changes['selectConfigOverrides']) {
40241
40269
  this._labelsSelectConfigDirty = true;
40242
40270
  if (changes['selectConfigOverrides'] && ((_a = this.editForm) === null || _a === void 0 ? void 0 : _a.get('type'))) {
@@ -40273,6 +40301,13 @@ class TestCaseDetailsEditComponent {
40273
40301
  if (defaultAiRaw)
40274
40302
  patch['defaultAiAction'] = defaultAiRaw;
40275
40303
  }
40304
+ const kbCtrl = this.editForm.get('knowledgeBaseDefaultTestCase');
40305
+ if (kbCtrl && !kbCtrl.dirty) {
40306
+ const kbRaw = this.getConfigItemValue('AI Configuration', 'Knowledge Base Default Test Case');
40307
+ const kbResolved = (_t = this.resolveToOptionValue(kbRaw, (_s = (_r = this.selectConfigOverrides) === null || _r === void 0 ? void 0 : _r['knowledgeBaseDefaultTestCase']) === null || _s === void 0 ? void 0 : _s.options)) !== null && _t !== void 0 ? _t : kbRaw;
40308
+ if (kbResolved)
40309
+ patch['knowledgeBaseDefaultTestCase'] = kbResolved;
40310
+ }
40276
40311
  if (Object.keys(patch).length) {
40277
40312
  this.editForm.patchValue(patch, { emitEvent: false });
40278
40313
  }
@@ -40281,9 +40316,9 @@ class TestCaseDetailsEditComponent {
40281
40316
  if (changes['descriptionContent'] || changes['labels'] || changes['metadataItems']) {
40282
40317
  this.editDescription = this.descriptionContent;
40283
40318
  this.editLabels = [...this.labels];
40284
- this.editStatus = (_s = (_r = this.statusItem) === null || _r === void 0 ? void 0 : _r.value) !== null && _s !== void 0 ? _s : '';
40285
- this.editPriority = (_u = (_t = this.priorityItem) === null || _t === void 0 ? void 0 : _t.value) !== null && _u !== void 0 ? _u : '';
40286
- const typeVal = (_w = (this.getConfigItemValue('Execution', 'Type') || ((_v = this.typeItem) === null || _v === void 0 ? void 0 : _v.value))) !== null && _w !== void 0 ? _w : '';
40319
+ this.editStatus = (_v = (_u = this.statusItem) === null || _u === void 0 ? void 0 : _u.value) !== null && _v !== void 0 ? _v : '';
40320
+ this.editPriority = (_x = (_w = this.priorityItem) === null || _w === void 0 ? void 0 : _w.value) !== null && _x !== void 0 ? _x : '';
40321
+ const typeVal = (_z = (this.getConfigItemValue('Execution', 'Type') || ((_y = this.typeItem) === null || _y === void 0 ? void 0 : _y.value))) !== null && _z !== void 0 ? _z : '';
40287
40322
  const statusControl = this.editForm.get('status');
40288
40323
  const priorityControl = this.editForm.get('priority');
40289
40324
  const typeControl = this.editForm.get('type');
@@ -40300,14 +40335,15 @@ class TestCaseDetailsEditComponent {
40300
40335
  if (changes['configSections'] || changes['configSectionsRow2']) {
40301
40336
  const enableAiSmartness = this.getConfigItemValue('AI Configuration', 'Enable AI Smartness');
40302
40337
  const defaultAiAction = this.getConfigItemValue('AI Configuration', 'Default AI Action');
40303
- const knowledgeBaseDefaultTestCase = this.getConfigItemValue('AI Configuration', 'Knowledge Base Default Test Case');
40338
+ const knowledgeBaseDefaultTestCaseRaw = this.getConfigItemValue('AI Configuration', 'Knowledge Base Default Test Case');
40339
+ const knowledgeBaseDefaultTestCase = (_2 = this.resolveToOptionValue(knowledgeBaseDefaultTestCaseRaw, (_1 = (_0 = this.selectConfigOverrides) === null || _0 === void 0 ? void 0 : _0['knowledgeBaseDefaultTestCase']) === null || _1 === void 0 ? void 0 : _1.options)) !== null && _2 !== void 0 ? _2 : knowledgeBaseDefaultTestCaseRaw;
40304
40340
  const prerequisiteCases = this.getPrerequisiteCasesFromConfig();
40305
- const typeRaw = (_y = (this.getConfigItemValue('Execution', 'Type') || ((_x = this.typeItem) === null || _x === void 0 ? void 0 : _x.value))) !== null && _y !== void 0 ? _y : '';
40306
- const testDataProfileRaw = (_z = this.getConfigItemValue('Execution', 'Test Data Profile')) !== null && _z !== void 0 ? _z : '';
40307
- const testDataSetRaw = this.normalizeTestDataSetRawValue((_0 = this.getConfigItemValue('Execution', 'Test Data Set')) !== null && _0 !== void 0 ? _0 : '');
40308
- const typeVal = (_3 = this.resolveToOptionValue(typeRaw, (_2 = (_1 = this.selectConfigOverrides) === null || _1 === void 0 ? void 0 : _1['type']) === null || _2 === void 0 ? void 0 : _2.options)) !== null && _3 !== void 0 ? _3 : typeRaw;
40309
- const testDataProfileVal = (_6 = this.resolveToOptionValue(testDataProfileRaw, (_5 = (_4 = this.selectConfigOverrides) === null || _4 === void 0 ? void 0 : _4['testDataProfile']) === null || _5 === void 0 ? void 0 : _5.options)) !== null && _6 !== void 0 ? _6 : testDataProfileRaw;
40310
- const testDataSetVal = (_9 = this.resolveToOptionValue(testDataSetRaw, (_8 = (_7 = this.selectConfigOverrides) === null || _7 === void 0 ? void 0 : _7['testDataSet']) === null || _8 === void 0 ? void 0 : _8.options)) !== null && _9 !== void 0 ? _9 : testDataSetRaw;
40341
+ const typeRaw = (_4 = (this.getConfigItemValue('Execution', 'Type') || ((_3 = this.typeItem) === null || _3 === void 0 ? void 0 : _3.value))) !== null && _4 !== void 0 ? _4 : '';
40342
+ const testDataProfileRaw = (_5 = this.getConfigItemValue('Execution', 'Test Data Profile')) !== null && _5 !== void 0 ? _5 : '';
40343
+ const testDataSetRaw = this.normalizeTestDataSetRawValue((_6 = this.getConfigItemValue('Execution', 'Test Data Set')) !== null && _6 !== void 0 ? _6 : '');
40344
+ const typeVal = (_9 = this.resolveToOptionValue(typeRaw, (_8 = (_7 = this.selectConfigOverrides) === null || _7 === void 0 ? void 0 : _7['type']) === null || _8 === void 0 ? void 0 : _8.options)) !== null && _9 !== void 0 ? _9 : typeRaw;
40345
+ const testDataProfileVal = (_12 = this.resolveToOptionValue(testDataProfileRaw, (_11 = (_10 = this.selectConfigOverrides) === null || _10 === void 0 ? void 0 : _10['testDataProfile']) === null || _11 === void 0 ? void 0 : _11.options)) !== null && _12 !== void 0 ? _12 : testDataProfileRaw;
40346
+ const testDataSetVal = (_15 = this.resolveToOptionValue(testDataSetRaw, (_14 = (_13 = this.selectConfigOverrides) === null || _13 === void 0 ? void 0 : _13['testDataSet']) === null || _14 === void 0 ? void 0 : _14.options)) !== null && _15 !== void 0 ? _15 : testDataSetRaw;
40311
40347
  const defaultBrowser = this.getConfigItemValue('Execution', 'Default Browser');
40312
40348
  const videoRecordingRaw = this.getConfigItemValue('Execution', 'Video Recording');
40313
40349
  const videoRecording = this.normalizeBooleanSelectValue(videoRecordingRaw);