@cqa-lib/cqa-ui 1.1.270 → 1.1.272

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.
Files changed (28) hide show
  1. package/esm2020/lib/badge/badge.component.mjs +25 -3
  2. package/esm2020/lib/dashboards/dashboard-header/dashboard-header.component.mjs +38 -19
  3. package/esm2020/lib/dashboards/insight-card/insight-card.component.mjs +1 -1
  4. package/esm2020/lib/dashboards/workspace-selector/workspace-selector.component.mjs +499 -0
  5. package/esm2020/lib/execution-screen/db-query-execution-item/db-query-execution-item.component.mjs +1 -1
  6. package/esm2020/lib/execution-screen/db-verification-step/db-verification-step.component.mjs +1 -1
  7. package/esm2020/lib/run-history-card/run-history-card.component.mjs +1 -1
  8. package/esm2020/lib/step-builder/step-builder-database/step-builder-database.component.mjs +1 -1
  9. package/esm2020/lib/test-case-details/api-edit-step/api-edit-step.component.mjs +303 -72
  10. package/esm2020/lib/test-case-details/element-popup/element-popup.component.mjs +1 -1
  11. package/esm2020/lib/test-case-details/test-case-details-edit/test-case-details-edit.component.mjs +40 -13
  12. package/esm2020/lib/test-case-details/test-case-details.component.mjs +7 -3
  13. package/esm2020/lib/ui-kit.module.mjs +6 -1
  14. package/esm2020/public-api.mjs +2 -1
  15. package/fesm2015/cqa-lib-cqa-ui.mjs +975 -146
  16. package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
  17. package/fesm2020/cqa-lib-cqa-ui.mjs +935 -135
  18. package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
  19. package/lib/badge/badge.component.d.ts +6 -1
  20. package/lib/dashboards/dashboard-header/dashboard-header.component.d.ts +20 -6
  21. package/lib/dashboards/workspace-selector/workspace-selector.component.d.ts +118 -0
  22. package/lib/test-case-details/api-edit-step/api-edit-step.component.d.ts +12 -1
  23. package/lib/test-case-details/test-case-details-edit/test-case-details-edit.component.d.ts +4 -1
  24. package/lib/test-case-details/test-case-details.component.d.ts +3 -1
  25. package/lib/ui-kit.module.d.ts +130 -129
  26. package/package.json +1 -1
  27. package/public-api.d.ts +1 -0
  28. package/styles.css +1 -1
@@ -22,6 +22,11 @@ export declare class BadgeComponent {
22
22
  keyTextColor?: string;
23
23
  valueTextColor?: string;
24
24
  isLoading: boolean;
25
+ fullWidth: boolean;
26
+ centerContent: boolean;
27
+ get containerStyles(): {
28
+ [key: string]: string;
29
+ };
25
30
  get badgeClasses(): string;
26
31
  get badgeStyles(): {
27
32
  [key: string]: string;
@@ -35,5 +40,5 @@ export declare class BadgeComponent {
35
40
  [key: string]: string;
36
41
  };
37
42
  static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "cqa-badge", never, { "type": "type"; "label": "label"; "icon": "icon"; "iconLibrary": "iconLibrary"; "variant": "variant"; "size": "size"; "backgroundColor": "backgroundColor"; "textColor": "textColor"; "borderColor": "borderColor"; "iconBackgroundColor": "iconBackgroundColor"; "iconColor": "iconColor"; "iconSize": "iconSize"; "inlineStyles": "inlineStyles"; "key": "key"; "value": "value"; "keyTextColor": "keyTextColor"; "valueTextColor": "valueTextColor"; "isLoading": "isLoading"; }, {}, never, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "cqa-badge", never, { "type": "type"; "label": "label"; "icon": "icon"; "iconLibrary": "iconLibrary"; "variant": "variant"; "size": "size"; "backgroundColor": "backgroundColor"; "textColor": "textColor"; "borderColor": "borderColor"; "iconBackgroundColor": "iconBackgroundColor"; "iconColor": "iconColor"; "iconSize": "iconSize"; "inlineStyles": "inlineStyles"; "key": "key"; "value": "value"; "keyTextColor": "keyTextColor"; "valueTextColor": "valueTextColor"; "isLoading": "isLoading"; "fullWidth": "fullWidth"; "centerContent": "centerContent"; }, {}, never, never>;
39
44
  }
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { FormGroup } from '@angular/forms';
3
- import { DynamicSelectFieldConfig } from '../../dynamic-select/dynamic-select-field.component';
3
+ import { WorkspaceSelectorConfig } from '../workspace-selector/workspace-selector.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export interface HeaderSelectOption {
6
6
  id?: any;
@@ -25,16 +25,16 @@ export declare class DashboardHeaderComponent {
25
25
  workspacePlaceholder: string;
26
26
  workspaceDisabled: boolean;
27
27
  workspaceValue?: any;
28
- workspaceMultiple: boolean;
29
28
  workspaceSearchable: boolean;
30
29
  workspaceServerSearch: boolean;
31
30
  workspaceHasMore: boolean;
32
31
  workspaceIsLoading: boolean;
33
- workspaceOptionStyle: 'checkmark' | 'checkbox';
34
- workspaceShowSelectAll: boolean;
35
32
  workspaceCloseOnSelect: boolean;
36
33
  workspaceOnSearch?: (query: string) => void;
37
34
  workspaceOnLoadMore?: (query?: string) => void;
35
+ workspaceItemSize?: number;
36
+ workspaceValueBy?: string;
37
+ workspaceViewportHeight?: number;
38
38
  workspaceSearch: EventEmitter<string>;
39
39
  workspaceLoadMore: EventEmitter<string>;
40
40
  showWorkspaceSelector: boolean;
@@ -43,8 +43,22 @@ export declare class DashboardHeaderComponent {
43
43
  workspaceForm: FormGroup;
44
44
  ngOnInit(): void;
45
45
  ngOnChanges(_changes: SimpleChanges): void;
46
- get workspaceConfig(): DynamicSelectFieldConfig;
46
+ get workspaceConfig(): WorkspaceSelectorConfig;
47
47
  private syncFormFromInput;
48
+ onWorkspaceValueChange(value: any): void;
49
+ onWorkspaceSelectionChange(event: {
50
+ key: string;
51
+ value: any;
52
+ option?: any;
53
+ }): void;
54
+ onWorkspaceSearchChange(event: {
55
+ key: string;
56
+ query: string;
57
+ }): void;
58
+ onWorkspaceLoadMore(event: {
59
+ key: string;
60
+ query: string;
61
+ }): void;
48
62
  static ɵfac: i0.ɵɵFactoryDeclaration<DashboardHeaderComponent, never>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<DashboardHeaderComponent, "cqa-dashboard-header", never, { "title": "title"; "badgeText": "badgeText"; "badgeClass": "badgeClass"; "headerClass": "headerClass"; "showHeader": "showHeader"; "showLogo": "showLogo"; "logoUrl": "logoUrl"; "showHelpIcon": "showHelpIcon"; "helpIconTooltip": "helpIconTooltip"; "showPlusIcon": "showPlusIcon"; "workspaceOptions": "workspaceOptions"; "workspacePlaceholder": "workspacePlaceholder"; "workspaceDisabled": "workspaceDisabled"; "workspaceValue": "workspaceValue"; "workspaceMultiple": "workspaceMultiple"; "workspaceSearchable": "workspaceSearchable"; "workspaceServerSearch": "workspaceServerSearch"; "workspaceHasMore": "workspaceHasMore"; "workspaceIsLoading": "workspaceIsLoading"; "workspaceOptionStyle": "workspaceOptionStyle"; "workspaceShowSelectAll": "workspaceShowSelectAll"; "workspaceCloseOnSelect": "workspaceCloseOnSelect"; "workspaceOnSearch": "workspaceOnSearch"; "workspaceOnLoadMore": "workspaceOnLoadMore"; "showWorkspaceSelector": "showWorkspaceSelector"; }, { "helpIconClick": "helpIconClick"; "plusIconClick": "plusIconClick"; "workspaceSearch": "workspaceSearch"; "workspaceLoadMore": "workspaceLoadMore"; "workspaceValueChange": "workspaceValueChange"; "workspaceSelectClick": "workspaceSelectClick"; }, never, ["*"]>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<DashboardHeaderComponent, "cqa-dashboard-header", never, { "title": "title"; "badgeText": "badgeText"; "badgeClass": "badgeClass"; "headerClass": "headerClass"; "showHeader": "showHeader"; "showLogo": "showLogo"; "logoUrl": "logoUrl"; "showHelpIcon": "showHelpIcon"; "helpIconTooltip": "helpIconTooltip"; "showPlusIcon": "showPlusIcon"; "workspaceOptions": "workspaceOptions"; "workspacePlaceholder": "workspacePlaceholder"; "workspaceDisabled": "workspaceDisabled"; "workspaceValue": "workspaceValue"; "workspaceSearchable": "workspaceSearchable"; "workspaceServerSearch": "workspaceServerSearch"; "workspaceHasMore": "workspaceHasMore"; "workspaceIsLoading": "workspaceIsLoading"; "workspaceCloseOnSelect": "workspaceCloseOnSelect"; "workspaceOnSearch": "workspaceOnSearch"; "workspaceOnLoadMore": "workspaceOnLoadMore"; "workspaceItemSize": "workspaceItemSize"; "workspaceValueBy": "workspaceValueBy"; "workspaceViewportHeight": "workspaceViewportHeight"; "showWorkspaceSelector": "showWorkspaceSelector"; }, { "helpIconClick": "helpIconClick"; "plusIconClick": "plusIconClick"; "workspaceSearch": "workspaceSearch"; "workspaceLoadMore": "workspaceLoadMore"; "workspaceValueChange": "workspaceValueChange"; "workspaceSelectClick": "workspaceSelectClick"; }, never, ["*"]>;
50
64
  }
@@ -0,0 +1,118 @@
1
+ import { OnInit, OnChanges, SimpleChanges, ElementRef, EventEmitter } from '@angular/core';
2
+ import { FormGroup, FormControl } from '@angular/forms';
3
+ import { SelectOption } from '../../dynamic-select/dynamic-select-field.component';
4
+ import * as i0 from "@angular/core";
5
+ export interface WorkspaceSelectorConfig {
6
+ key?: string;
7
+ label?: string;
8
+ placeholder?: string;
9
+ disabled?: boolean;
10
+ searchable?: boolean;
11
+ /** If true, close the panel when an option is selected. */
12
+ closeOnSelect?: boolean;
13
+ /** Provide a default selected value if the control has no value yet. */
14
+ selectedValue?: any;
15
+ /** Optional callback invoked whenever the selection changes. */
16
+ onChange?: (value: any) => void;
17
+ /** Enable server-side search mode; component will emit search instead of local filtering. */
18
+ serverSearch?: boolean;
19
+ /**
20
+ * When true, triggers an initial search emit on panel open (serverSearch mode only).
21
+ * Defaults to false so opening the dropdown does NOT call the API.
22
+ */
23
+ initialFetchOnOpen?: boolean;
24
+ /** Indicates more results are available for infinite scroll. */
25
+ hasMore?: boolean;
26
+ /** Optional loading flag controlled by consumer to show loading state. */
27
+ isLoading?: boolean;
28
+ /** Optional callback for server-side search when query changes. */
29
+ onSearch?: (query: string) => void;
30
+ /** Optional callback when more data is requested (infinite scroll). */
31
+ onLoadMore?: (query?: string) => void;
32
+ /** Optional regex pattern or function to highlight parts of option text. */
33
+ highlightPattern?: RegExp | string | ((text: string) => string);
34
+ options: SelectOption[];
35
+ valueBy?: string;
36
+ /** Item size for virtual scroll (default: 48) */
37
+ itemSize?: number;
38
+ /** Viewport height for virtual scroll in pixels (default: 300) */
39
+ viewportHeight?: number;
40
+ }
41
+ export declare class WorkspaceSelectorComponent implements OnInit, OnChanges {
42
+ form?: FormGroup;
43
+ config: WorkspaceSelectorConfig;
44
+ /** Direct value binding - selected workspace object. Use this instead of form control. */
45
+ value?: any;
46
+ /** Emits the selected workspace object when selection changes */
47
+ valueChange: EventEmitter<any>;
48
+ selectionChange: EventEmitter<{
49
+ key: string;
50
+ value: any;
51
+ option?: SelectOption;
52
+ }>;
53
+ selectClick: EventEmitter<void>;
54
+ /** Emits when user types in search box (useful for server search) */
55
+ searchChange: EventEmitter<{
56
+ key: string;
57
+ query: string;
58
+ }>;
59
+ /** Emits when the component requests more data for the current query */
60
+ loadMore: EventEmitter<{
61
+ key: string;
62
+ query: string;
63
+ }>;
64
+ hostEl?: ElementRef<HTMLElement>;
65
+ dropdownPanel?: ElementRef<HTMLElement>;
66
+ viewport?: any;
67
+ internalForm: FormGroup;
68
+ internalControl: FormControl;
69
+ searchText: string;
70
+ isOpen: boolean;
71
+ loadingMore: boolean;
72
+ private lastOptionsLength;
73
+ private hasScrolledSinceOpen;
74
+ private panelScrollEl?;
75
+ private onPanelScroll;
76
+ constructor();
77
+ ngOnInit(): void;
78
+ ngOnChanges(changes: SimpleChanges): void;
79
+ private syncValueFromInput;
80
+ get currentForm(): FormGroup;
81
+ get controlKey(): string;
82
+ get currentControl(): FormControl;
83
+ /** Get current value - from form control if form provided, otherwise from direct value binding */
84
+ get currentValue(): any;
85
+ /** Set current value - to form control if form provided, otherwise update direct value */
86
+ set currentValue(val: any);
87
+ get isDisabled(): boolean;
88
+ get displayPlaceholder(): string | undefined;
89
+ get displayValue(): string;
90
+ get itemSize(): number;
91
+ get viewportHeight(): number;
92
+ get displayedOptions(): SelectOption[];
93
+ private toBoolean;
94
+ getOptionValue(opt: SelectOption | null | undefined): any;
95
+ getOptionLabel(opt: SelectOption): string;
96
+ private syncDisabledState;
97
+ private syncControlValueForMultipleMode;
98
+ private applySelectedValueIfNeeded;
99
+ private hasExistingValue;
100
+ isOptionSelected(opt: SelectOption): boolean;
101
+ filteredOptions(): SelectOption[];
102
+ private getSelectedIds;
103
+ onOptionClick(opt: SelectOption): void;
104
+ onSelectionChange(newValue?: any, selectedOption?: SelectOption): void;
105
+ onSearchInput(value: string): void;
106
+ toggleDropdown(): void;
107
+ openDropdown(): void;
108
+ closeDropdown(): void;
109
+ private setupScrollListener;
110
+ onScrolledIndexChange(index: number): void;
111
+ trackByOption: (index: number, opt: SelectOption | null | undefined) => any;
112
+ highlightText(text: string): string;
113
+ private escapeHtml;
114
+ get hasHighlighting(): boolean;
115
+ handleDocumentClick(event: MouseEvent): void;
116
+ static ɵfac: i0.ɵɵFactoryDeclaration<WorkspaceSelectorComponent, never>;
117
+ static ɵcmp: i0.ɵɵComponentDeclaration<WorkspaceSelectorComponent, "cqa-workspace-selector", never, { "form": "form"; "config": "config"; "value": "value"; }, { "valueChange": "valueChange"; "selectionChange": "selectionChange"; "selectClick": "selectClick"; "searchChange": "searchChange"; "loadMore": "loadMore"; }, never, never>;
118
+ }
@@ -99,6 +99,12 @@ export interface ParsedCurl {
99
99
  url: string;
100
100
  headers: ApiEditHeaderRow[];
101
101
  body: string;
102
+ /** Entries from -F / --form flags (multipart/form-data). */
103
+ formData: {
104
+ key: string;
105
+ type: 'text' | 'file';
106
+ value: string;
107
+ }[];
102
108
  }
103
109
  export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
104
110
  private readonly fb;
@@ -361,6 +367,11 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
361
367
  private parseQueryParamsFromUrl;
362
368
  /** Get base URL (without query/fragment) for building URL from params. Preserves relative URLs. */
363
369
  private getBaseUrl;
370
+ /**
371
+ * Set the payload format dropdown using the Content-Type header first, then
372
+ * fall back to inspecting the body content (JSON braces, XML tags, HTML doctype).
373
+ */
374
+ private applyBodyFormat;
364
375
  /** Parse application/x-www-form-urlencoded body (key=value&...) into key-value rows. */
365
376
  private parseFormUrlEncodedBody;
366
377
  /**
@@ -381,7 +392,7 @@ export declare class ApiEditStepComponent implements OnChanges, OnInit, AfterVie
381
392
  openImportCurlPanel(): void;
382
393
  /** Reset URL, method, headers, body, and params to empty/default before applying imported cURL. */
383
394
  private resetRequestFieldsBeforeCurlImport;
384
- /** Handler: parse cURL from control, bind to form fields, emit and close panel. Called when user clicks Import button. */
395
+ /** Handler: parse cURL from control, bind to form fields, emit and close panel. */
385
396
  onImportCurlConfirm(): void;
386
397
  /** Handler: emit cancel and close panel. Called when user clicks Cancel in import cURL panel. */
387
398
  onCancelImportCurl(): void;
@@ -65,6 +65,7 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
65
65
  configTitle: string;
66
66
  configSections: TestCaseDetailsConfigSection[];
67
67
  configSectionsRow2: TestCaseDetailsConfigSection[];
68
+ isSaving: boolean;
68
69
  /** Optional list of prerequisite test case options for the multi-select. If not provided, uses default sample options. */
69
70
  prerequisiteCaseOptions: {
70
71
  value: string;
@@ -182,6 +183,8 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
182
183
  /** Get value from Waits section - supports both 'Wait and retries' and 'Waits & Retries' titles */
183
184
  private getWaitsRetriesValue;
184
185
  private getPrerequisiteCasesFromConfig;
186
+ /** Edit mode should show placeholder when dataset is not selected. */
187
+ private normalizeTestDataSetRawValue;
185
188
  get hasPrerequisiteCaseConfig(): boolean;
186
189
  ngOnInit(): void;
187
190
  private resolveToOptionValue;
@@ -203,5 +206,5 @@ export declare class TestCaseDetailsEditComponent implements OnInit, OnChanges {
203
206
  };
204
207
  getLabelCloseIconColor(_label: string): string;
205
208
  static ɵfac: i0.ɵɵFactoryDeclaration<TestCaseDetailsEditComponent, never>;
206
- static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsEditComponent, "cqa-test-case-details-edit", never, { "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "prerequisiteCaseOptions": "prerequisiteCaseOptions"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; }, { "save": "save"; "cancel": "cancel"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; }, never, never>;
209
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsEditComponent, "cqa-test-case-details-edit", never, { "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "isSaving": "isSaving"; "prerequisiteCaseOptions": "prerequisiteCaseOptions"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; }, { "save": "save"; "cancel": "cancel"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; }, never, never>;
207
210
  }
@@ -38,6 +38,8 @@ export declare class TestCaseDetailsComponent implements OnInit {
38
38
  isStepGroup: boolean;
39
39
  /** Override config per select for API-driven options, server search, load more. */
40
40
  selectConfigOverrides: SelectConfigOverrides;
41
+ /** True while parent is saving changes. */
42
+ isSaving: boolean;
41
43
  /** Labels to filter out from metadata for step groups */
42
44
  private readonly stepGroupExcludedMetadataLabels;
43
45
  /** Filtered metadata items - excludes Priority and Type for step groups */
@@ -72,5 +74,5 @@ export declare class TestCaseDetailsComponent implements OnInit {
72
74
  /** Text color for metadata value (e.g. red for critical priority) */
73
75
  getValueTextClass(item: TestCaseDetailsMetadataItem): string;
74
76
  static ɵfac: i0.ɵɵFactoryDeclaration<TestCaseDetailsComponent, never>;
75
- static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsComponent, "cqa-test-case-details", never, { "editing": "editing"; "startInEditMode": "startInEditMode"; "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "showEditButton": "showEditButton"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; }, { "editDescription": "editDescription"; "cancel": "cancel"; "saveChanges": "saveChanges"; "metadataLinkClick": "metadataLinkClick"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; }, never, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<TestCaseDetailsComponent, "cqa-test-case-details", never, { "editing": "editing"; "startInEditMode": "startInEditMode"; "descriptionTitle": "descriptionTitle"; "descriptionContent": "descriptionContent"; "enableMarkdown": "enableMarkdown"; "showEditButton": "showEditButton"; "metadataItems": "metadataItems"; "labels": "labels"; "configTitle": "configTitle"; "configSections": "configSections"; "configSectionsRow2": "configSectionsRow2"; "platform": "platform"; "isStepGroup": "isStepGroup"; "selectConfigOverrides": "selectConfigOverrides"; "isSaving": "isSaving"; }, { "editDescription": "editDescription"; "cancel": "cancel"; "saveChanges": "saveChanges"; "metadataLinkClick": "metadataLinkClick"; "selectSearch": "selectSearch"; "selectLoadMore": "selectLoadMore"; "selectOpened": "selectOpened"; "selectionChange": "selectionChange"; "labelAdded": "labelAdded"; }, never, never>;
76
78
  }