@cqa-lib/cqa-ui 1.0.121 → 1.0.123
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/dynamic-select/dynamic-select-field.component.mjs +50 -3
- package/fesm2015/cqa-lib-cqa-ui.mjs +51 -2
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +49 -2
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/dynamic-select/dynamic-select-field.component.d.ts +15 -0
- package/package.json +1 -1
|
@@ -42,6 +42,8 @@ export interface DynamicSelectFieldConfig {
|
|
|
42
42
|
onSearch?: (query: string) => void;
|
|
43
43
|
/** Optional callback when more data is requested (infinite scroll). */
|
|
44
44
|
onLoadMore?: (query?: string) => void;
|
|
45
|
+
/** Optional regex pattern or function to highlight parts of option text. */
|
|
46
|
+
highlightPattern?: RegExp | string | ((text: string) => string);
|
|
45
47
|
options: SelectOption[];
|
|
46
48
|
}
|
|
47
49
|
export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
@@ -104,6 +106,19 @@ export declare class DynamicSelectFieldComponent implements OnInit, OnChanges {
|
|
|
104
106
|
filteredOptions(c: DynamicSelectFieldConfig): SelectOption[];
|
|
105
107
|
onSelectionChange(event: MatSelectChange, select: MatSelect): void;
|
|
106
108
|
handleDocumentClick(event: MouseEvent): void;
|
|
109
|
+
/**
|
|
110
|
+
* Highlights text based on the configured highlightPattern.
|
|
111
|
+
* Returns HTML string with highlighted portions wrapped in <span class="highlight">.
|
|
112
|
+
*/
|
|
113
|
+
highlightText(text: string): string;
|
|
114
|
+
/**
|
|
115
|
+
* Escapes HTML special characters to prevent XSS.
|
|
116
|
+
*/
|
|
117
|
+
private escapeHtml;
|
|
118
|
+
/**
|
|
119
|
+
* Checks if highlighting is enabled for this component.
|
|
120
|
+
*/
|
|
121
|
+
get hasHighlighting(): boolean;
|
|
107
122
|
private setupLoadMoreObserver;
|
|
108
123
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicSelectFieldComponent, never>;
|
|
109
124
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicSelectFieldComponent, "cqa-dynamic-select", never, { "form": "form"; "config": "config"; }, { "selectionChange": "selectionChange"; "selectClick": "selectClick"; "searchChange": "searchChange"; "loadMore": "loadMore"; }, never, never>;
|