@seekora-ai/ui-sdk-angular 0.0.0-stage-20260517092419

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.
@@ -0,0 +1,470 @@
1
+ import { OnInit, OnDestroy, Injector, ElementRef, OnChanges, TemplateRef } from '@angular/core';
2
+ import { SeekoraClient, SearchResponse, SearchContext, SearchOptions } from '@seekora-ai/search-sdk';
3
+ import * as _seekora_ai_ui_sdk_types from '@seekora-ai/ui-sdk-types';
4
+ import { Theme, ThemeConfig, SuggestionItem, ViewMode, FieldMapping, ResultItem } from '@seekora-ai/ui-sdk-types';
5
+ export { FieldMapping, ResultItem, SuggestionItem, Theme, ThemeConfig, ViewMode } from '@seekora-ai/ui-sdk-types';
6
+ import { Observable } from 'rxjs';
7
+ export { mergeThemes } from '@seekora-ai/ui-sdk-core';
8
+
9
+ type RatingVariant = 'stars-only' | 'compact' | 'full' | 'inline';
10
+ type RatingSize = 'small' | 'medium' | 'large';
11
+ declare class RatingDisplayComponent implements OnInit {
12
+ rating: number;
13
+ reviewCount?: number;
14
+ variant: RatingVariant;
15
+ size: RatingSize;
16
+ maxRating: number;
17
+ showNumeric: boolean;
18
+ showHalfStars: boolean;
19
+ interactive: boolean;
20
+ starColor: string;
21
+ emptyStarColor: string;
22
+ textColor: string;
23
+ showReviewCount: boolean;
24
+ reviewCountFormat?: (count: number) => string;
25
+ className: string;
26
+ ratingChange: any;
27
+ hoverRating: number | null;
28
+ private sizeMap;
29
+ private fontSizeMap;
30
+ ngOnInit(): void;
31
+ get starSize(): number;
32
+ get fontSize(): string;
33
+ get clampedRating(): number;
34
+ get displayRating(): number;
35
+ get stars(): number[];
36
+ isStarFilled(index: number): boolean;
37
+ isStarHalf(index: number): boolean;
38
+ formatReviewCount(count: number): string;
39
+ onStarHover(rating: number): void;
40
+ onStarClick(rating: number): void;
41
+ onMouseLeave(): void;
42
+ getStarSVG(filled: boolean, half: boolean): string;
43
+ get containerClasses(): string;
44
+ get containerStyles(): {
45
+ [key: string]: string;
46
+ };
47
+ }
48
+
49
+ /**
50
+ * SearchContext Service
51
+ *
52
+ * Provides search context (client, theme, etc.) to Angular components
53
+ */
54
+
55
+ declare const SEEKORA_CLIENT: any;
56
+ declare const SEEKORA_THEME_CONFIG: any;
57
+ declare class SearchContextService {
58
+ readonly client: SeekoraClient;
59
+ readonly theme: Theme;
60
+ readonly enableAnalytics: boolean;
61
+ readonly autoTrackSearch: boolean;
62
+ constructor(client: SeekoraClient, themeConfig?: ThemeConfig, enableAnalytics?: boolean, autoTrackSearch?: boolean);
63
+ }
64
+
65
+ /**
66
+ * SeekoraSearch Service
67
+ *
68
+ * Service for performing searches with the Seekora SDK
69
+ */
70
+
71
+ interface SearchState {
72
+ results: SearchResponse | null;
73
+ loading: boolean;
74
+ error: Error | null;
75
+ context: SearchContext | null;
76
+ }
77
+ declare class SeekoraSearchService {
78
+ private searchContext;
79
+ private searchStateSubject;
80
+ readonly searchState$: Observable<SearchState>;
81
+ constructor(searchContext: SearchContextService);
82
+ search(options: SearchOptions): Observable<SearchResponse | null>;
83
+ clearResults(): void;
84
+ getCurrentState(): SearchState;
85
+ }
86
+
87
+ /**
88
+ * QuerySuggestions Service
89
+ *
90
+ * Service for fetching query suggestions with debouncing
91
+ */
92
+
93
+ interface SuggestionsState {
94
+ suggestions: SuggestionItem[];
95
+ loading: boolean;
96
+ error: Error | null;
97
+ }
98
+ declare class QuerySuggestionsService {
99
+ private searchContext;
100
+ private debounceMs;
101
+ private maxSuggestions;
102
+ private querySubject;
103
+ private suggestionsStateSubject;
104
+ readonly suggestionsState$: Observable<SuggestionsState>;
105
+ constructor(searchContext: SearchContextService, debounceMs?: number, maxSuggestions?: number);
106
+ setQuery(query: string): void;
107
+ getCurrentState(): SuggestionsState;
108
+ }
109
+
110
+ /**
111
+ * SearchProvider Component
112
+ *
113
+ * Provides Seekora client and context to child components
114
+ */
115
+
116
+ declare class SearchProviderComponent implements OnInit, OnDestroy {
117
+ private injector;
118
+ client: SeekoraClient;
119
+ theme?: ThemeConfig;
120
+ enableAnalytics: boolean;
121
+ autoTrackSearch: boolean;
122
+ constructor(injector: Injector);
123
+ ngOnInit(): void;
124
+ ngOnDestroy(): void;
125
+ }
126
+
127
+ /**
128
+ * SearchBar Component
129
+ *
130
+ * Interactive search input component with query suggestions support
131
+ */
132
+
133
+ declare class SearchBarComponent implements OnInit, OnDestroy {
134
+ private searchContext;
135
+ private searchService;
136
+ private suggestionsService;
137
+ placeholder: string;
138
+ showSuggestions: boolean;
139
+ minQueryLength: number;
140
+ maxSuggestions: number;
141
+ debounceMs: number;
142
+ searchOptions?: Partial<SearchOptions>;
143
+ search: any;
144
+ suggestionSelect: any;
145
+ queryChange: any;
146
+ searchStateChange: any;
147
+ searchInput?: ElementRef<HTMLInputElement>;
148
+ query: string;
149
+ isFocused: boolean;
150
+ selectedIndex: number;
151
+ suggestions: SuggestionItem[];
152
+ suggestionsLoading: boolean;
153
+ private querySubject;
154
+ private subscriptions;
155
+ constructor(searchContext: SearchContextService, searchService: SeekoraSearchService, suggestionsService: QuerySuggestionsService);
156
+ ngOnInit(): void;
157
+ ngOnDestroy(): void;
158
+ get displayedSuggestions(): SuggestionItem[];
159
+ get showSuggestionsList(): boolean;
160
+ onInputChange(event: Event): void;
161
+ onFocus(): void;
162
+ onBlur(): void;
163
+ onKeyDown(event: KeyboardEvent): void;
164
+ selectSuggestion(suggestion: string): void;
165
+ performSearch(): void;
166
+ getInputStyle(): Record<string, any>;
167
+ getSuggestionsStyle(): Record<string, any>;
168
+ get emptyStyle(): Record<string, any>;
169
+ getSuggestionStyle(index: number): Record<string, any>;
170
+ }
171
+
172
+ /**
173
+ * SearchResults Component
174
+ *
175
+ * Displays search results with customizable rendering
176
+ */
177
+
178
+ declare class SearchResultsComponent implements OnInit, OnDestroy {
179
+ private searchContext;
180
+ private searchService;
181
+ results?: any;
182
+ loading: boolean;
183
+ error?: Error | null;
184
+ viewMode: ViewMode;
185
+ fieldMapping?: FieldMapping;
186
+ itemsPerPage: number;
187
+ resultClick: any;
188
+ private subscriptions;
189
+ constructor(searchContext: SearchContextService, searchService: SeekoraSearchService);
190
+ ngOnInit(): void;
191
+ ngOnDestroy(): void;
192
+ extractResults(results: any): any[];
193
+ get displayedResults(): any[];
194
+ extractedFields(item: any): ResultItem;
195
+ onResultClick(result: any, index: number): void;
196
+ get containerStyle(): Record<string, any>;
197
+ get errorStyle(): Record<string, any>;
198
+ get emptyStyle(): Record<string, any>;
199
+ getContainerStyle(): Record<string, any>;
200
+ getResultStyle(): Record<string, any>;
201
+ get imageStyle(): Record<string, any>;
202
+ get imageImgStyle(): Record<string, any>;
203
+ get titleStyle(): Record<string, any>;
204
+ get descriptionStyle(): Record<string, any>;
205
+ get priceStyle(): Record<string, any>;
206
+ }
207
+
208
+ declare class QuerySuggestionsComponent implements OnInit, OnDestroy, OnChanges {
209
+ searchContext: SearchContextService;
210
+ query: string;
211
+ maxSuggestions: number;
212
+ debounceMs: number;
213
+ minQueryLength: number;
214
+ showTitle: boolean;
215
+ title: string;
216
+ className?: string;
217
+ style?: Record<string, any>;
218
+ suggestionClick: any;
219
+ displayedSuggestions: SuggestionItem[];
220
+ suggestionsLoading: boolean;
221
+ error: Error | null;
222
+ selectedIndex: number;
223
+ private querySubject;
224
+ private subscription?;
225
+ private suggestionsSubscription?;
226
+ constructor(searchContext: SearchContextService);
227
+ ngOnInit(): void;
228
+ ngOnDestroy(): void;
229
+ ngOnChanges(): void;
230
+ private loadSuggestions;
231
+ onSuggestionClick(suggestion: SuggestionItem): void;
232
+ get theme(): _seekora_ai_ui_sdk_types.Theme;
233
+ getContainerStyle(): Record<string, any>;
234
+ getTitleStyle(): Record<string, any>;
235
+ getEmptyStyle(): Record<string, any>;
236
+ getSuggestionStyle(index: number): Record<string, any>;
237
+ getCountStyle(): Record<string, any>;
238
+ }
239
+
240
+ /**
241
+ * Stats Component
242
+ *
243
+ * Displays search statistics
244
+ */
245
+
246
+ declare class StatsComponent {
247
+ private searchContext;
248
+ results?: any;
249
+ loading: boolean;
250
+ showProcessingTime: boolean;
251
+ showQuery: boolean;
252
+ labels?: {
253
+ resultsFound?: (total: number) => string;
254
+ processingTime?: (time: number) => string;
255
+ };
256
+ constructor(searchContext: SearchContextService);
257
+ get totalResults(): number;
258
+ get processingTime(): number | undefined;
259
+ get hasResults(): boolean;
260
+ get resultsText(): string;
261
+ get processingTimeText(): string;
262
+ get containerStyle(): Record<string, any>;
263
+ get textStyle(): Record<string, any>;
264
+ }
265
+
266
+ /**
267
+ * Pagination Component
268
+ *
269
+ * Displays pagination controls for search results
270
+ */
271
+
272
+ declare class PaginationComponent {
273
+ private searchContext;
274
+ results?: any;
275
+ currentPage: number;
276
+ itemsPerPage: number;
277
+ maxVisiblePages: number;
278
+ showFirstLast: boolean;
279
+ showPrevNext: boolean;
280
+ pageChange: any;
281
+ constructor(searchContext: SearchContextService);
282
+ get totalResults(): number;
283
+ get totalPages(): number;
284
+ get visiblePages(): number[];
285
+ handlePageChange(page: number): void;
286
+ get containerStyle(): Record<string, any>;
287
+ getButtonStyle(page: number, isActive?: boolean): Record<string, any>;
288
+ }
289
+
290
+ /**
291
+ * SortBy Component
292
+ *
293
+ * Displays sort options for search results
294
+ */
295
+
296
+ interface SortOption {
297
+ value: string;
298
+ label: string;
299
+ }
300
+ declare class SortByComponent {
301
+ private searchContext;
302
+ options: SortOption[];
303
+ value: string;
304
+ label?: string;
305
+ sortChange: any;
306
+ constructor(searchContext: SearchContextService);
307
+ handleChange(event: Event): void;
308
+ get containerStyle(): Record<string, any>;
309
+ get labelStyle(): Record<string, any>;
310
+ get selectStyle(): Record<string, any>;
311
+ }
312
+
313
+ /**
314
+ * Facets Component
315
+ *
316
+ * Displays facet filters for search results
317
+ */
318
+
319
+ interface FacetCount {
320
+ value: string;
321
+ count: number;
322
+ }
323
+ interface Facet {
324
+ field_name: string;
325
+ counts: FacetCount[];
326
+ stats?: Record<string, any>;
327
+ }
328
+ declare class FacetsComponent {
329
+ private searchContext;
330
+ results?: any;
331
+ maxItems: number;
332
+ showMore: boolean;
333
+ selectedFacets: Record<string, string[]>;
334
+ facetChange: any;
335
+ expandedFacets: Record<string, boolean>;
336
+ constructor(searchContext: SearchContextService);
337
+ get facets(): Facet[];
338
+ visibleCounts(facet: Facet): FacetCount[];
339
+ isSelected(field: string, value: string): boolean;
340
+ toggleShowMore(field: string): void;
341
+ handleFacetClick(field: string, value: string): void;
342
+ handleFacetChange(field: string, value: string, selected: boolean): void;
343
+ get containerStyle(): Record<string, any>;
344
+ get titleStyle(): Record<string, any>;
345
+ getFacetItemStyle(field: string, value: string): Record<string, any>;
346
+ get checkboxStyle(): Record<string, any>;
347
+ get labelStyle(): Record<string, any>;
348
+ get countStyle(): Record<string, any>;
349
+ get showMoreStyle(): Record<string, any>;
350
+ isExpanded(field: string): boolean;
351
+ getShowMoreLabel(facet: Facet): string;
352
+ }
353
+
354
+ /**
355
+ * CurrentRefinements Component
356
+ *
357
+ * Displays currently active filters/refinements with ability to clear them
358
+ */
359
+
360
+ interface Refinement {
361
+ field: string;
362
+ value: string;
363
+ label?: string;
364
+ }
365
+ declare class CurrentRefinementsComponent {
366
+ private searchContext;
367
+ refinements: Refinement[];
368
+ showLabel: boolean;
369
+ label: string;
370
+ showClearAll: boolean;
371
+ refinementClear: any;
372
+ clearAll: any;
373
+ constructor(searchContext: SearchContextService);
374
+ getRefinementLabel(refinement: Refinement): string;
375
+ handleClear(field: string, value: string): void;
376
+ handleClearAll(): void;
377
+ get containerStyle(): Record<string, any>;
378
+ get labelStyle(): Record<string, any>;
379
+ get refinementsStyle(): Record<string, any>;
380
+ get refinementStyle(): Record<string, any>;
381
+ get refinementTextStyle(): Record<string, any>;
382
+ get clearButtonStyle(): Record<string, any>;
383
+ get clearAllStyle(): Record<string, any>;
384
+ }
385
+
386
+ declare class RangeInputComponent implements OnInit {
387
+ searchContext: SearchContextService;
388
+ field: string;
389
+ label?: string;
390
+ min?: number;
391
+ max?: number;
392
+ step: number;
393
+ currentMin?: number;
394
+ currentMax?: number;
395
+ showApplyButton: boolean;
396
+ placeholder?: {
397
+ min?: string;
398
+ max?: string;
399
+ };
400
+ className?: string;
401
+ style?: Record<string, any>;
402
+ rangeChange: any;
403
+ private internalMin?;
404
+ private internalMax?;
405
+ private appliedMin?;
406
+ private appliedMax?;
407
+ constructor(searchContext: SearchContextService);
408
+ ngOnInit(): void;
409
+ get theme(): _seekora_ai_ui_sdk_types.Theme;
410
+ get effectiveMin(): number | undefined;
411
+ get effectiveMax(): number | undefined;
412
+ hasValue(): boolean;
413
+ onMinChange(event: Event): void;
414
+ onMaxChange(event: Event): void;
415
+ onApply(): void;
416
+ onReset(): void;
417
+ getContainerStyle(): Record<string, any>;
418
+ getLabelStyle(): Record<string, any>;
419
+ getInputGroupStyle(): Record<string, any>;
420
+ getInputStyle(): Record<string, any>;
421
+ getSeparatorStyle(): Record<string, any>;
422
+ getApplyButtonStyle(): Record<string, any>;
423
+ getResetButtonStyle(): Record<string, any>;
424
+ }
425
+
426
+ declare class SearchLayoutComponent {
427
+ searchContext: SearchContextService;
428
+ sidebar?: any;
429
+ header?: any;
430
+ footer?: any;
431
+ sidebarWidth: string;
432
+ showSidebarOnMobile: boolean;
433
+ className?: string;
434
+ style?: Record<string, any>;
435
+ headerTemplate?: TemplateRef<any>;
436
+ sidebarTemplate?: TemplateRef<any>;
437
+ footerTemplate?: TemplateRef<any>;
438
+ constructor(searchContext: SearchContextService);
439
+ get theme(): _seekora_ai_ui_sdk_types.Theme;
440
+ getContainerStyle(): Record<string, any>;
441
+ getHeaderStyle(): Record<string, any>;
442
+ getContentStyle(): Record<string, any>;
443
+ getSidebarStyle(): Record<string, any>;
444
+ getSidebarClass(): string;
445
+ getMainStyle(): Record<string, any>;
446
+ getFooterStyle(): Record<string, any>;
447
+ }
448
+
449
+ /**
450
+ * Default Theme
451
+ */
452
+
453
+ declare const defaultTheme: Theme;
454
+
455
+ /**
456
+ * Dark Theme
457
+ */
458
+
459
+ declare const darkTheme: Theme;
460
+
461
+ /**
462
+ * Minimal Theme
463
+ */
464
+
465
+ declare const minimalTheme: Theme;
466
+
467
+ declare const createTheme: (config: ThemeConfig) => _seekora_ai_ui_sdk_types.Theme;
468
+
469
+ export { CurrentRefinementsComponent, FacetsComponent, PaginationComponent, QuerySuggestionsComponent, QuerySuggestionsService, RangeInputComponent, RatingDisplayComponent, SEEKORA_CLIENT, SEEKORA_THEME_CONFIG, SearchBarComponent, SearchContextService, SearchLayoutComponent, SearchProviderComponent, SearchResultsComponent, SeekoraSearchService, SortByComponent, StatsComponent, createTheme, darkTheme, defaultTheme, minimalTheme };
470
+ export type { Facet, FacetCount, RatingSize, RatingVariant, Refinement, SearchState, SortOption, SuggestionsState };