@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,2721 @@
1
+ import { Component, Input, Output, EventEmitter, InjectionToken, Injectable, ViewChild, ContentChild } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { createTheme as createTheme$1, log, extractField, formatPrice } from '@seekora-ai/ui-sdk-core';
4
+ export { mergeThemes } from '@seekora-ai/ui-sdk-core';
5
+ import { BehaviorSubject, from, Subject, Subscription } from 'rxjs';
6
+ import { map, catchError, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
7
+
8
+ /******************************************************************************
9
+ Copyright (c) Microsoft Corporation.
10
+
11
+ Permission to use, copy, modify, and/or distribute this software for any
12
+ purpose with or without fee is hereby granted.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
15
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
16
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
17
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
18
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
+ PERFORMANCE OF THIS SOFTWARE.
21
+ ***************************************************************************** */
22
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
23
+
24
+
25
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
26
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
27
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
28
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
29
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
30
+ var _, done = false;
31
+ for (var i = decorators.length - 1; i >= 0; i--) {
32
+ var context = {};
33
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
34
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
35
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
36
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
37
+ if (kind === "accessor") {
38
+ if (result === void 0) continue;
39
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
40
+ if (_ = accept(result.get)) descriptor.get = _;
41
+ if (_ = accept(result.set)) descriptor.set = _;
42
+ if (_ = accept(result.init)) initializers.unshift(_);
43
+ }
44
+ else if (_ = accept(result)) {
45
+ if (kind === "field") initializers.unshift(_);
46
+ else descriptor[key] = _;
47
+ }
48
+ }
49
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
50
+ done = true;
51
+ }
52
+ function __runInitializers(thisArg, initializers, value) {
53
+ var useValue = arguments.length > 2;
54
+ for (var i = 0; i < initializers.length; i++) {
55
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
56
+ }
57
+ return useValue ? value : void 0;
58
+ }
59
+ function __setFunctionName(f, name, prefix) {
60
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
61
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
62
+ }
63
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
64
+ var e = new Error(message);
65
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
66
+ };
67
+
68
+ let RatingDisplayComponent = (() => {
69
+ let _classDecorators = [Component({
70
+ selector: 'seekora-rating-display',
71
+ standalone: true,
72
+ imports: [CommonModule],
73
+ templateUrl: './rating-display.component.html',
74
+ styleUrls: ['./rating-display.component.css']
75
+ })];
76
+ let _classDescriptor;
77
+ let _classExtraInitializers = [];
78
+ let _classThis;
79
+ let _rating_decorators;
80
+ let _rating_initializers = [];
81
+ let _rating_extraInitializers = [];
82
+ let _reviewCount_decorators;
83
+ let _reviewCount_initializers = [];
84
+ let _reviewCount_extraInitializers = [];
85
+ let _variant_decorators;
86
+ let _variant_initializers = [];
87
+ let _variant_extraInitializers = [];
88
+ let _size_decorators;
89
+ let _size_initializers = [];
90
+ let _size_extraInitializers = [];
91
+ let _maxRating_decorators;
92
+ let _maxRating_initializers = [];
93
+ let _maxRating_extraInitializers = [];
94
+ let _showNumeric_decorators;
95
+ let _showNumeric_initializers = [];
96
+ let _showNumeric_extraInitializers = [];
97
+ let _showHalfStars_decorators;
98
+ let _showHalfStars_initializers = [];
99
+ let _showHalfStars_extraInitializers = [];
100
+ let _interactive_decorators;
101
+ let _interactive_initializers = [];
102
+ let _interactive_extraInitializers = [];
103
+ let _starColor_decorators;
104
+ let _starColor_initializers = [];
105
+ let _starColor_extraInitializers = [];
106
+ let _emptyStarColor_decorators;
107
+ let _emptyStarColor_initializers = [];
108
+ let _emptyStarColor_extraInitializers = [];
109
+ let _textColor_decorators;
110
+ let _textColor_initializers = [];
111
+ let _textColor_extraInitializers = [];
112
+ let _showReviewCount_decorators;
113
+ let _showReviewCount_initializers = [];
114
+ let _showReviewCount_extraInitializers = [];
115
+ let _reviewCountFormat_decorators;
116
+ let _reviewCountFormat_initializers = [];
117
+ let _reviewCountFormat_extraInitializers = [];
118
+ let _className_decorators;
119
+ let _className_initializers = [];
120
+ let _className_extraInitializers = [];
121
+ let _ratingChange_decorators;
122
+ let _ratingChange_initializers = [];
123
+ let _ratingChange_extraInitializers = [];
124
+ _classThis = class {
125
+ constructor() {
126
+ this.rating = __runInitializers(this, _rating_initializers, 0);
127
+ this.reviewCount = (__runInitializers(this, _rating_extraInitializers), __runInitializers(this, _reviewCount_initializers, void 0));
128
+ this.variant = (__runInitializers(this, _reviewCount_extraInitializers), __runInitializers(this, _variant_initializers, 'compact'));
129
+ this.size = (__runInitializers(this, _variant_extraInitializers), __runInitializers(this, _size_initializers, 'medium'));
130
+ this.maxRating = (__runInitializers(this, _size_extraInitializers), __runInitializers(this, _maxRating_initializers, 5));
131
+ this.showNumeric = (__runInitializers(this, _maxRating_extraInitializers), __runInitializers(this, _showNumeric_initializers, false));
132
+ this.showHalfStars = (__runInitializers(this, _showNumeric_extraInitializers), __runInitializers(this, _showHalfStars_initializers, true));
133
+ this.interactive = (__runInitializers(this, _showHalfStars_extraInitializers), __runInitializers(this, _interactive_initializers, false));
134
+ this.starColor = (__runInitializers(this, _interactive_extraInitializers), __runInitializers(this, _starColor_initializers, '#f59e0b'));
135
+ this.emptyStarColor = (__runInitializers(this, _starColor_extraInitializers), __runInitializers(this, _emptyStarColor_initializers, '#d1d5db'));
136
+ this.textColor = (__runInitializers(this, _emptyStarColor_extraInitializers), __runInitializers(this, _textColor_initializers, 'var(--seekora-text-secondary, #6b7280)'));
137
+ this.showReviewCount = (__runInitializers(this, _textColor_extraInitializers), __runInitializers(this, _showReviewCount_initializers, true));
138
+ this.reviewCountFormat = (__runInitializers(this, _showReviewCount_extraInitializers), __runInitializers(this, _reviewCountFormat_initializers, void 0));
139
+ this.className = (__runInitializers(this, _reviewCountFormat_extraInitializers), __runInitializers(this, _className_initializers, ''));
140
+ this.ratingChange = (__runInitializers(this, _className_extraInitializers), __runInitializers(this, _ratingChange_initializers, new EventEmitter()));
141
+ this.hoverRating = (__runInitializers(this, _ratingChange_extraInitializers), null);
142
+ this.sizeMap = {
143
+ small: 14,
144
+ medium: 18,
145
+ large: 24,
146
+ };
147
+ this.fontSizeMap = {
148
+ small: '0.75rem',
149
+ medium: '0.875rem',
150
+ large: '1rem',
151
+ };
152
+ }
153
+ ngOnInit() { }
154
+ get starSize() {
155
+ return this.sizeMap[this.size];
156
+ }
157
+ get fontSize() {
158
+ return this.fontSizeMap[this.size];
159
+ }
160
+ get clampedRating() {
161
+ return Math.max(0, Math.min(this.maxRating, this.rating));
162
+ }
163
+ get displayRating() {
164
+ return this.interactive && this.hoverRating !== null
165
+ ? this.hoverRating
166
+ : this.clampedRating;
167
+ }
168
+ get stars() {
169
+ return Array.from({ length: this.maxRating }, (_, i) => i + 1);
170
+ }
171
+ isStarFilled(index) {
172
+ return index <= Math.floor(this.displayRating);
173
+ }
174
+ isStarHalf(index) {
175
+ return (this.showHalfStars &&
176
+ index === Math.ceil(this.displayRating) &&
177
+ this.displayRating % 1 >= 0.25 &&
178
+ this.displayRating % 1 < 0.75);
179
+ }
180
+ formatReviewCount(count) {
181
+ if (this.reviewCountFormat) {
182
+ return this.reviewCountFormat(count);
183
+ }
184
+ if (count >= 1000000)
185
+ return `${(count / 1000000).toFixed(1)}M`;
186
+ if (count >= 1000)
187
+ return `${(count / 1000).toFixed(1)}K`;
188
+ return count.toString();
189
+ }
190
+ onStarHover(rating) {
191
+ if (this.interactive) {
192
+ this.hoverRating = rating;
193
+ }
194
+ }
195
+ onStarClick(rating) {
196
+ if (this.interactive) {
197
+ this.hoverRating = null;
198
+ this.ratingChange.emit(rating);
199
+ }
200
+ }
201
+ onMouseLeave() {
202
+ if (this.interactive) {
203
+ this.hoverRating = null;
204
+ }
205
+ }
206
+ getStarSVG(filled, half) {
207
+ if (half) {
208
+ const gradientId = `half-fill-${Math.random()}`;
209
+ return `
210
+ <svg width="${this.starSize}" height="${this.starSize}" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
211
+ <defs>
212
+ <linearGradient id="${gradientId}">
213
+ <stop offset="50%" stop-color="${this.starColor}" />
214
+ <stop offset="50%" stop-color="${this.emptyStarColor}" />
215
+ </linearGradient>
216
+ </defs>
217
+ <path
218
+ d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z"
219
+ fill="url(#${gradientId})"
220
+ stroke="${this.starColor}"
221
+ stroke-width="1"
222
+ />
223
+ </svg>
224
+ `;
225
+ }
226
+ return `
227
+ <svg width="${this.starSize}" height="${this.starSize}" viewBox="0 0 24 24" fill="${filled ? this.starColor : 'none'}" xmlns="http://www.w3.org/2000/svg">
228
+ <path
229
+ d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z"
230
+ stroke="${filled ? this.starColor : this.emptyStarColor}"
231
+ stroke-width="1.5"
232
+ stroke-linecap="round"
233
+ stroke-linejoin="round"
234
+ />
235
+ </svg>
236
+ `;
237
+ }
238
+ get containerClasses() {
239
+ return `seekora-rating-display seekora-rating-display--${this.variant} ${this.className}`;
240
+ }
241
+ get containerStyles() {
242
+ const baseStyles = {
243
+ fontSize: this.fontSize,
244
+ };
245
+ if (this.variant === 'stars-only') {
246
+ return { ...baseStyles, display: 'inline-flex', alignItems: 'center', gap: '2px' };
247
+ }
248
+ else if (this.variant === 'compact' || this.variant === 'inline') {
249
+ return {
250
+ ...baseStyles,
251
+ display: 'inline-flex',
252
+ alignItems: 'center',
253
+ gap: this.variant === 'inline' ? '6px' : '4px',
254
+ };
255
+ }
256
+ else if (this.variant === 'full') {
257
+ return { ...baseStyles, display: 'flex', flexDirection: 'column', gap: '4px' };
258
+ }
259
+ return baseStyles;
260
+ }
261
+ };
262
+ __setFunctionName(_classThis, "RatingDisplayComponent");
263
+ (() => {
264
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
265
+ _rating_decorators = [Input()];
266
+ _reviewCount_decorators = [Input()];
267
+ _variant_decorators = [Input()];
268
+ _size_decorators = [Input()];
269
+ _maxRating_decorators = [Input()];
270
+ _showNumeric_decorators = [Input()];
271
+ _showHalfStars_decorators = [Input()];
272
+ _interactive_decorators = [Input()];
273
+ _starColor_decorators = [Input()];
274
+ _emptyStarColor_decorators = [Input()];
275
+ _textColor_decorators = [Input()];
276
+ _showReviewCount_decorators = [Input()];
277
+ _reviewCountFormat_decorators = [Input()];
278
+ _className_decorators = [Input()];
279
+ _ratingChange_decorators = [Output()];
280
+ __esDecorate(null, null, _rating_decorators, { kind: "field", name: "rating", static: false, private: false, access: { has: obj => "rating" in obj, get: obj => obj.rating, set: (obj, value) => { obj.rating = value; } }, metadata: _metadata }, _rating_initializers, _rating_extraInitializers);
281
+ __esDecorate(null, null, _reviewCount_decorators, { kind: "field", name: "reviewCount", static: false, private: false, access: { has: obj => "reviewCount" in obj, get: obj => obj.reviewCount, set: (obj, value) => { obj.reviewCount = value; } }, metadata: _metadata }, _reviewCount_initializers, _reviewCount_extraInitializers);
282
+ __esDecorate(null, null, _variant_decorators, { kind: "field", name: "variant", static: false, private: false, access: { has: obj => "variant" in obj, get: obj => obj.variant, set: (obj, value) => { obj.variant = value; } }, metadata: _metadata }, _variant_initializers, _variant_extraInitializers);
283
+ __esDecorate(null, null, _size_decorators, { kind: "field", name: "size", static: false, private: false, access: { has: obj => "size" in obj, get: obj => obj.size, set: (obj, value) => { obj.size = value; } }, metadata: _metadata }, _size_initializers, _size_extraInitializers);
284
+ __esDecorate(null, null, _maxRating_decorators, { kind: "field", name: "maxRating", static: false, private: false, access: { has: obj => "maxRating" in obj, get: obj => obj.maxRating, set: (obj, value) => { obj.maxRating = value; } }, metadata: _metadata }, _maxRating_initializers, _maxRating_extraInitializers);
285
+ __esDecorate(null, null, _showNumeric_decorators, { kind: "field", name: "showNumeric", static: false, private: false, access: { has: obj => "showNumeric" in obj, get: obj => obj.showNumeric, set: (obj, value) => { obj.showNumeric = value; } }, metadata: _metadata }, _showNumeric_initializers, _showNumeric_extraInitializers);
286
+ __esDecorate(null, null, _showHalfStars_decorators, { kind: "field", name: "showHalfStars", static: false, private: false, access: { has: obj => "showHalfStars" in obj, get: obj => obj.showHalfStars, set: (obj, value) => { obj.showHalfStars = value; } }, metadata: _metadata }, _showHalfStars_initializers, _showHalfStars_extraInitializers);
287
+ __esDecorate(null, null, _interactive_decorators, { kind: "field", name: "interactive", static: false, private: false, access: { has: obj => "interactive" in obj, get: obj => obj.interactive, set: (obj, value) => { obj.interactive = value; } }, metadata: _metadata }, _interactive_initializers, _interactive_extraInitializers);
288
+ __esDecorate(null, null, _starColor_decorators, { kind: "field", name: "starColor", static: false, private: false, access: { has: obj => "starColor" in obj, get: obj => obj.starColor, set: (obj, value) => { obj.starColor = value; } }, metadata: _metadata }, _starColor_initializers, _starColor_extraInitializers);
289
+ __esDecorate(null, null, _emptyStarColor_decorators, { kind: "field", name: "emptyStarColor", static: false, private: false, access: { has: obj => "emptyStarColor" in obj, get: obj => obj.emptyStarColor, set: (obj, value) => { obj.emptyStarColor = value; } }, metadata: _metadata }, _emptyStarColor_initializers, _emptyStarColor_extraInitializers);
290
+ __esDecorate(null, null, _textColor_decorators, { kind: "field", name: "textColor", static: false, private: false, access: { has: obj => "textColor" in obj, get: obj => obj.textColor, set: (obj, value) => { obj.textColor = value; } }, metadata: _metadata }, _textColor_initializers, _textColor_extraInitializers);
291
+ __esDecorate(null, null, _showReviewCount_decorators, { kind: "field", name: "showReviewCount", static: false, private: false, access: { has: obj => "showReviewCount" in obj, get: obj => obj.showReviewCount, set: (obj, value) => { obj.showReviewCount = value; } }, metadata: _metadata }, _showReviewCount_initializers, _showReviewCount_extraInitializers);
292
+ __esDecorate(null, null, _reviewCountFormat_decorators, { kind: "field", name: "reviewCountFormat", static: false, private: false, access: { has: obj => "reviewCountFormat" in obj, get: obj => obj.reviewCountFormat, set: (obj, value) => { obj.reviewCountFormat = value; } }, metadata: _metadata }, _reviewCountFormat_initializers, _reviewCountFormat_extraInitializers);
293
+ __esDecorate(null, null, _className_decorators, { kind: "field", name: "className", static: false, private: false, access: { has: obj => "className" in obj, get: obj => obj.className, set: (obj, value) => { obj.className = value; } }, metadata: _metadata }, _className_initializers, _className_extraInitializers);
294
+ __esDecorate(null, null, _ratingChange_decorators, { kind: "field", name: "ratingChange", static: false, private: false, access: { has: obj => "ratingChange" in obj, get: obj => obj.ratingChange, set: (obj, value) => { obj.ratingChange = value; } }, metadata: _metadata }, _ratingChange_initializers, _ratingChange_extraInitializers);
295
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
296
+ _classThis = _classDescriptor.value;
297
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
298
+ __runInitializers(_classThis, _classExtraInitializers);
299
+ })();
300
+ return _classThis;
301
+ })();
302
+
303
+ /**
304
+ * Default Theme
305
+ */
306
+ const defaultTheme = {
307
+ colors: {
308
+ primary: '#007bff',
309
+ secondary: '#6c757d',
310
+ background: '#ffffff',
311
+ surface: '#f8f9fa',
312
+ text: '#212529',
313
+ textSecondary: '#6c757d',
314
+ border: '#dee2e6',
315
+ hover: '#f8f9fa',
316
+ focus: '#007bff',
317
+ error: '#dc3545',
318
+ success: '#28a745',
319
+ warning: '#ffc107',
320
+ },
321
+ typography: {
322
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
323
+ fontSize: {
324
+ small: '0.875rem',
325
+ medium: '1rem',
326
+ large: '1.25rem',
327
+ },
328
+ fontWeight: {
329
+ normal: 400,
330
+ medium: 500,
331
+ semibold: 600,
332
+ bold: 700,
333
+ },
334
+ lineHeight: {
335
+ tight: 1.25,
336
+ normal: 1.5,
337
+ relaxed: 1.75,
338
+ },
339
+ },
340
+ spacing: {
341
+ small: '0.5rem',
342
+ medium: '1rem',
343
+ large: '1.5rem',
344
+ },
345
+ borderRadius: {
346
+ none: '0',
347
+ small: '0.25rem',
348
+ medium: '0.375rem',
349
+ large: '0.5rem',
350
+ full: '9999px',
351
+ },
352
+ shadows: {
353
+ small: '0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)',
354
+ medium: '0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23)',
355
+ large: '0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23)',
356
+ },
357
+ transitions: {
358
+ fast: '150ms ease-in-out',
359
+ normal: '250ms ease-in-out',
360
+ slow: '350ms ease-in-out',
361
+ },
362
+ breakpoints: {
363
+ sm: '640px',
364
+ md: '768px',
365
+ lg: '1024px',
366
+ xl: '1280px',
367
+ },
368
+ zIndex: {
369
+ dropdown: 1000,
370
+ modal: 2000,
371
+ tooltip: 3000,
372
+ },
373
+ };
374
+
375
+ /**
376
+ * createTheme utility
377
+ *
378
+ * Creates a complete theme from a partial theme configuration
379
+ */
380
+ const createTheme = (config) => {
381
+ return createTheme$1(config, defaultTheme);
382
+ };
383
+
384
+ /**
385
+ * SearchContext Service
386
+ *
387
+ * Provides search context (client, theme, etc.) to Angular components
388
+ */
389
+ const SEEKORA_CLIENT = new InjectionToken('SEEKORA_CLIENT');
390
+ const SEEKORA_THEME_CONFIG = new InjectionToken('SEEKORA_THEME_CONFIG');
391
+ let SearchContextService = (() => {
392
+ let _classDecorators = [Injectable({
393
+ providedIn: 'root',
394
+ })];
395
+ let _classDescriptor;
396
+ let _classExtraInitializers = [];
397
+ let _classThis;
398
+ _classThis = class {
399
+ constructor(client, themeConfig, enableAnalytics = true, autoTrackSearch = true) {
400
+ log.verbose('SearchContextService: Initializing', {
401
+ hasTheme: !!themeConfig,
402
+ enableAnalytics,
403
+ autoTrackSearch,
404
+ });
405
+ this.client = client;
406
+ this.theme = themeConfig ? createTheme(themeConfig) : defaultTheme;
407
+ this.enableAnalytics = enableAnalytics;
408
+ this.autoTrackSearch = autoTrackSearch;
409
+ log.info('SearchContextService: Initialized successfully');
410
+ }
411
+ };
412
+ __setFunctionName(_classThis, "SearchContextService");
413
+ (() => {
414
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
415
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
416
+ _classThis = _classDescriptor.value;
417
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
418
+ __runInitializers(_classThis, _classExtraInitializers);
419
+ })();
420
+ return _classThis;
421
+ })();
422
+
423
+ /**
424
+ * SeekoraSearch Service
425
+ *
426
+ * Service for performing searches with the Seekora SDK
427
+ */
428
+ let SeekoraSearchService = (() => {
429
+ let _classDecorators = [Injectable({
430
+ providedIn: 'root',
431
+ })];
432
+ let _classDescriptor;
433
+ let _classExtraInitializers = [];
434
+ let _classThis;
435
+ _classThis = class {
436
+ constructor(searchContext) {
437
+ this.searchContext = searchContext;
438
+ this.searchStateSubject = new BehaviorSubject({
439
+ results: null,
440
+ loading: false,
441
+ error: null,
442
+ context: null,
443
+ });
444
+ this.searchState$ = this.searchStateSubject.asObservable();
445
+ }
446
+ search(options) {
447
+ const query = options.q || '';
448
+ log.verbose('SeekoraSearchService: Starting search', { query, options });
449
+ this.searchStateSubject.next({
450
+ ...this.searchStateSubject.value,
451
+ loading: true,
452
+ error: null,
453
+ });
454
+ const { q, ...restOptions } = options;
455
+ const searchPromise = this.searchContext.client.search(q, restOptions);
456
+ return from(searchPromise).pipe(map((response) => {
457
+ log.info('SeekoraSearchService: Search completed', {
458
+ query,
459
+ resultsCount: response?.results?.length || 0,
460
+ hasContext: !!response?.context,
461
+ });
462
+ this.searchStateSubject.next({
463
+ results: response,
464
+ loading: false,
465
+ error: null,
466
+ context: response.context || null,
467
+ });
468
+ return response;
469
+ }), catchError((err) => {
470
+ const error = err instanceof Error ? err : new Error(String(err));
471
+ log.error('SeekoraSearchService: Search failed', {
472
+ query,
473
+ error: error.message,
474
+ stack: error.stack,
475
+ });
476
+ this.searchStateSubject.next({
477
+ results: null,
478
+ loading: false,
479
+ error,
480
+ context: null,
481
+ });
482
+ throw error;
483
+ }));
484
+ }
485
+ clearResults() {
486
+ this.searchStateSubject.next({
487
+ results: null,
488
+ loading: false,
489
+ error: null,
490
+ context: null,
491
+ });
492
+ }
493
+ getCurrentState() {
494
+ return this.searchStateSubject.value;
495
+ }
496
+ };
497
+ __setFunctionName(_classThis, "SeekoraSearchService");
498
+ (() => {
499
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
500
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
501
+ _classThis = _classDescriptor.value;
502
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
503
+ __runInitializers(_classThis, _classExtraInitializers);
504
+ })();
505
+ return _classThis;
506
+ })();
507
+
508
+ /**
509
+ * QuerySuggestions Service
510
+ *
511
+ * Service for fetching query suggestions with debouncing
512
+ */
513
+ let QuerySuggestionsService = (() => {
514
+ let _classDecorators = [Injectable({
515
+ providedIn: 'root',
516
+ })];
517
+ let _classDescriptor;
518
+ let _classExtraInitializers = [];
519
+ let _classThis;
520
+ _classThis = class {
521
+ constructor(searchContext, debounceMs = 300, maxSuggestions = 10) {
522
+ this.searchContext = searchContext;
523
+ this.debounceMs = debounceMs;
524
+ this.maxSuggestions = maxSuggestions;
525
+ this.querySubject = new BehaviorSubject('');
526
+ this.suggestionsStateSubject = new BehaviorSubject({
527
+ suggestions: [],
528
+ loading: false,
529
+ error: null,
530
+ });
531
+ this.suggestionsState$ = this.suggestionsStateSubject.asObservable();
532
+ this.querySubject.pipe(debounceTime(300), distinctUntilChanged(), switchMap((query) => {
533
+ if (!query.trim()) {
534
+ this.suggestionsStateSubject.next({
535
+ suggestions: [],
536
+ loading: false,
537
+ error: null,
538
+ });
539
+ return from(Promise.resolve([]));
540
+ }
541
+ this.suggestionsStateSubject.next({
542
+ ...this.suggestionsStateSubject.value,
543
+ loading: true,
544
+ error: null,
545
+ });
546
+ return from(this.searchContext.client.getSuggestions(query, 10)).pipe(map((response) => {
547
+ const rawSuggestions = Array.isArray(response) ? response : [];
548
+ const suggestionItems = rawSuggestions.map((suggestion) => {
549
+ const suggestionQuery = suggestion.query || suggestion.text || suggestion;
550
+ const count = suggestion.popularity !== undefined
551
+ ? suggestion.popularity
552
+ : (suggestion.count !== undefined ? suggestion.count : undefined);
553
+ return {
554
+ query: typeof suggestionQuery === 'string' ? suggestionQuery : String(suggestionQuery),
555
+ count: typeof count === 'number' ? count : undefined,
556
+ metadata: suggestion,
557
+ };
558
+ });
559
+ this.suggestionsStateSubject.next({
560
+ suggestions: suggestionItems,
561
+ loading: false,
562
+ error: null,
563
+ });
564
+ log.verbose('QuerySuggestionsService: Suggestions fetched', {
565
+ query,
566
+ count: suggestionItems.length,
567
+ });
568
+ return suggestionItems;
569
+ }), catchError((err) => {
570
+ const error = err instanceof Error ? err : new Error(String(err));
571
+ log.error('QuerySuggestionsService: Failed to fetch suggestions', {
572
+ query,
573
+ error: error.message,
574
+ stack: error.stack,
575
+ });
576
+ this.suggestionsStateSubject.next({
577
+ suggestions: [],
578
+ loading: false,
579
+ error,
580
+ });
581
+ return from(Promise.resolve([]));
582
+ }));
583
+ })).subscribe();
584
+ }
585
+ setQuery(query) {
586
+ this.querySubject.next(query);
587
+ }
588
+ getCurrentState() {
589
+ return this.suggestionsStateSubject.value;
590
+ }
591
+ };
592
+ __setFunctionName(_classThis, "QuerySuggestionsService");
593
+ (() => {
594
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
595
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
596
+ _classThis = _classDescriptor.value;
597
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
598
+ __runInitializers(_classThis, _classExtraInitializers);
599
+ })();
600
+ return _classThis;
601
+ })();
602
+
603
+ /**
604
+ * SearchProvider Component
605
+ *
606
+ * Provides Seekora client and context to child components
607
+ */
608
+ let SearchProviderComponent = (() => {
609
+ let _classDecorators = [Component({
610
+ selector: 'seekora-search-provider',
611
+ template: '<ng-content></ng-content>',
612
+ providers: [
613
+ {
614
+ provide: SEEKORA_CLIENT,
615
+ useFactory: (component) => component.client,
616
+ deps: [SearchProviderComponent],
617
+ },
618
+ {
619
+ provide: SEEKORA_THEME_CONFIG,
620
+ useFactory: (component) => component.theme,
621
+ deps: [SearchProviderComponent],
622
+ },
623
+ SearchContextService,
624
+ ],
625
+ })];
626
+ let _classDescriptor;
627
+ let _classExtraInitializers = [];
628
+ let _classThis;
629
+ let _client_decorators;
630
+ let _client_initializers = [];
631
+ let _client_extraInitializers = [];
632
+ let _theme_decorators;
633
+ let _theme_initializers = [];
634
+ let _theme_extraInitializers = [];
635
+ let _enableAnalytics_decorators;
636
+ let _enableAnalytics_initializers = [];
637
+ let _enableAnalytics_extraInitializers = [];
638
+ let _autoTrackSearch_decorators;
639
+ let _autoTrackSearch_initializers = [];
640
+ let _autoTrackSearch_extraInitializers = [];
641
+ var SearchProviderComponent = _classThis = class {
642
+ constructor(injector) {
643
+ this.injector = injector;
644
+ this.client = __runInitializers(this, _client_initializers, void 0);
645
+ this.theme = (__runInitializers(this, _client_extraInitializers), __runInitializers(this, _theme_initializers, void 0));
646
+ this.enableAnalytics = (__runInitializers(this, _theme_extraInitializers), __runInitializers(this, _enableAnalytics_initializers, true));
647
+ this.autoTrackSearch = (__runInitializers(this, _enableAnalytics_extraInitializers), __runInitializers(this, _autoTrackSearch_initializers, true));
648
+ __runInitializers(this, _autoTrackSearch_extraInitializers);
649
+ this.injector = injector;
650
+ }
651
+ ngOnInit() {
652
+ if (!this.client) {
653
+ throw new Error('SearchProvider: client is required');
654
+ }
655
+ }
656
+ ngOnDestroy() {
657
+ // Cleanup if needed
658
+ }
659
+ };
660
+ __setFunctionName(_classThis, "SearchProviderComponent");
661
+ (() => {
662
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
663
+ _client_decorators = [Input()];
664
+ _theme_decorators = [Input()];
665
+ _enableAnalytics_decorators = [Input()];
666
+ _autoTrackSearch_decorators = [Input()];
667
+ __esDecorate(null, null, _client_decorators, { kind: "field", name: "client", static: false, private: false, access: { has: obj => "client" in obj, get: obj => obj.client, set: (obj, value) => { obj.client = value; } }, metadata: _metadata }, _client_initializers, _client_extraInitializers);
668
+ __esDecorate(null, null, _theme_decorators, { kind: "field", name: "theme", static: false, private: false, access: { has: obj => "theme" in obj, get: obj => obj.theme, set: (obj, value) => { obj.theme = value; } }, metadata: _metadata }, _theme_initializers, _theme_extraInitializers);
669
+ __esDecorate(null, null, _enableAnalytics_decorators, { kind: "field", name: "enableAnalytics", static: false, private: false, access: { has: obj => "enableAnalytics" in obj, get: obj => obj.enableAnalytics, set: (obj, value) => { obj.enableAnalytics = value; } }, metadata: _metadata }, _enableAnalytics_initializers, _enableAnalytics_extraInitializers);
670
+ __esDecorate(null, null, _autoTrackSearch_decorators, { kind: "field", name: "autoTrackSearch", static: false, private: false, access: { has: obj => "autoTrackSearch" in obj, get: obj => obj.autoTrackSearch, set: (obj, value) => { obj.autoTrackSearch = value; } }, metadata: _metadata }, _autoTrackSearch_initializers, _autoTrackSearch_extraInitializers);
671
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
672
+ SearchProviderComponent = _classThis = _classDescriptor.value;
673
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
674
+ __runInitializers(_classThis, _classExtraInitializers);
675
+ })();
676
+ return SearchProviderComponent = _classThis;
677
+ })();
678
+
679
+ /**
680
+ * SearchBar Component
681
+ *
682
+ * Interactive search input component with query suggestions support
683
+ */
684
+ let SearchBarComponent = (() => {
685
+ let _classDecorators = [Component({
686
+ selector: 'seekora-search-bar',
687
+ template: `
688
+ <div [style.position]="'relative'">
689
+ <input
690
+ #searchInput
691
+ type="text"
692
+ [value]="query"
693
+ (input)="onInputChange($event)"
694
+ (focus)="onFocus()"
695
+ (blur)="onBlur()"
696
+ (keydown)="onKeyDown($event)"
697
+ [placeholder]="placeholder"
698
+ [style]="getInputStyle()"
699
+ />
700
+
701
+ <div
702
+ *ngIf="showSuggestionsList"
703
+ [style]="getSuggestionsStyle()"
704
+ >
705
+ <div
706
+ *ngFor="let suggestion of displayedSuggestions; let i = index"
707
+ (click)="selectSuggestion(suggestion.query)"
708
+ (mouseenter)="selectedIndex = i"
709
+ [style]="getSuggestionStyle(i)"
710
+ >
711
+ {{ suggestion.query }}
712
+ </div>
713
+
714
+ <div *ngIf="!suggestionsLoading && displayedSuggestions.length === 0 && query.length >= minQueryLength" [style]="emptyStyle">
715
+ No suggestions found
716
+ </div>
717
+ </div>
718
+ </div>
719
+ `,
720
+ })];
721
+ let _classDescriptor;
722
+ let _classExtraInitializers = [];
723
+ let _classThis;
724
+ let _placeholder_decorators;
725
+ let _placeholder_initializers = [];
726
+ let _placeholder_extraInitializers = [];
727
+ let _showSuggestions_decorators;
728
+ let _showSuggestions_initializers = [];
729
+ let _showSuggestions_extraInitializers = [];
730
+ let _minQueryLength_decorators;
731
+ let _minQueryLength_initializers = [];
732
+ let _minQueryLength_extraInitializers = [];
733
+ let _maxSuggestions_decorators;
734
+ let _maxSuggestions_initializers = [];
735
+ let _maxSuggestions_extraInitializers = [];
736
+ let _debounceMs_decorators;
737
+ let _debounceMs_initializers = [];
738
+ let _debounceMs_extraInitializers = [];
739
+ let _searchOptions_decorators;
740
+ let _searchOptions_initializers = [];
741
+ let _searchOptions_extraInitializers = [];
742
+ let _search_decorators;
743
+ let _search_initializers = [];
744
+ let _search_extraInitializers = [];
745
+ let _suggestionSelect_decorators;
746
+ let _suggestionSelect_initializers = [];
747
+ let _suggestionSelect_extraInitializers = [];
748
+ let _queryChange_decorators;
749
+ let _queryChange_initializers = [];
750
+ let _queryChange_extraInitializers = [];
751
+ let _searchStateChange_decorators;
752
+ let _searchStateChange_initializers = [];
753
+ let _searchStateChange_extraInitializers = [];
754
+ let _searchInput_decorators;
755
+ let _searchInput_initializers = [];
756
+ let _searchInput_extraInitializers = [];
757
+ _classThis = class {
758
+ constructor(searchContext, searchService, suggestionsService) {
759
+ this.searchContext = searchContext;
760
+ this.searchService = searchService;
761
+ this.suggestionsService = suggestionsService;
762
+ this.placeholder = __runInitializers(this, _placeholder_initializers, 'Powered by Seekora');
763
+ this.showSuggestions = (__runInitializers(this, _placeholder_extraInitializers), __runInitializers(this, _showSuggestions_initializers, true));
764
+ this.minQueryLength = (__runInitializers(this, _showSuggestions_extraInitializers), __runInitializers(this, _minQueryLength_initializers, 1));
765
+ this.maxSuggestions = (__runInitializers(this, _minQueryLength_extraInitializers), __runInitializers(this, _maxSuggestions_initializers, 10));
766
+ this.debounceMs = (__runInitializers(this, _maxSuggestions_extraInitializers), __runInitializers(this, _debounceMs_initializers, 300));
767
+ this.searchOptions = (__runInitializers(this, _debounceMs_extraInitializers), __runInitializers(this, _searchOptions_initializers, void 0));
768
+ this.search = (__runInitializers(this, _searchOptions_extraInitializers), __runInitializers(this, _search_initializers, new EventEmitter()));
769
+ this.suggestionSelect = (__runInitializers(this, _search_extraInitializers), __runInitializers(this, _suggestionSelect_initializers, new EventEmitter()));
770
+ this.queryChange = (__runInitializers(this, _suggestionSelect_extraInitializers), __runInitializers(this, _queryChange_initializers, new EventEmitter()));
771
+ this.searchStateChange = (__runInitializers(this, _queryChange_extraInitializers), __runInitializers(this, _searchStateChange_initializers, new EventEmitter()));
772
+ this.searchInput = (__runInitializers(this, _searchStateChange_extraInitializers), __runInitializers(this, _searchInput_initializers, void 0));
773
+ this.query = (__runInitializers(this, _searchInput_extraInitializers), '');
774
+ this.isFocused = false;
775
+ this.selectedIndex = -1;
776
+ this.suggestions = [];
777
+ this.suggestionsLoading = false;
778
+ this.querySubject = new Subject();
779
+ this.subscriptions = new Subscription();
780
+ }
781
+ ngOnInit() {
782
+ // Subscribe to query changes for suggestions
783
+ const querySub = this.querySubject.pipe(debounceTime(this.debounceMs), distinctUntilChanged()).subscribe(query => {
784
+ if (this.showSuggestions && query.length >= this.minQueryLength) {
785
+ this.suggestionsService.setQuery(query);
786
+ }
787
+ });
788
+ // Subscribe to suggestions state
789
+ const suggestionsSub = this.suggestionsService.suggestionsState$.subscribe(state => {
790
+ this.suggestions = state.suggestions;
791
+ this.suggestionsLoading = state.loading;
792
+ });
793
+ // Subscribe to search state
794
+ const searchSub = this.searchService.searchState$.subscribe(state => {
795
+ this.searchStateChange.emit({
796
+ results: state.results,
797
+ loading: state.loading,
798
+ error: state.error,
799
+ });
800
+ });
801
+ this.subscriptions.add(querySub);
802
+ this.subscriptions.add(suggestionsSub);
803
+ this.subscriptions.add(searchSub);
804
+ }
805
+ ngOnDestroy() {
806
+ this.subscriptions.unsubscribe();
807
+ }
808
+ get displayedSuggestions() {
809
+ return this.suggestions.slice(0, this.maxSuggestions);
810
+ }
811
+ get showSuggestionsList() {
812
+ return this.isFocused && this.showSuggestions && this.query.length >= this.minQueryLength;
813
+ }
814
+ onInputChange(event) {
815
+ const target = event.target;
816
+ this.query = target.value;
817
+ this.selectedIndex = -1;
818
+ this.querySubject.next(this.query);
819
+ this.queryChange.emit(this.query);
820
+ }
821
+ onFocus() {
822
+ this.isFocused = true;
823
+ }
824
+ onBlur() {
825
+ setTimeout(() => {
826
+ this.isFocused = false;
827
+ this.selectedIndex = -1;
828
+ }, 100);
829
+ }
830
+ onKeyDown(event) {
831
+ switch (event.key) {
832
+ case 'ArrowDown':
833
+ event.preventDefault();
834
+ if (this.showSuggestions && this.displayedSuggestions.length > 0) {
835
+ this.selectedIndex = this.selectedIndex < this.displayedSuggestions.length - 1
836
+ ? this.selectedIndex + 1
837
+ : this.selectedIndex;
838
+ }
839
+ break;
840
+ case 'ArrowUp':
841
+ event.preventDefault();
842
+ if (this.showSuggestions && this.displayedSuggestions.length > 0) {
843
+ this.selectedIndex = this.selectedIndex > 0 ? this.selectedIndex - 1 : -1;
844
+ }
845
+ break;
846
+ case 'Enter':
847
+ event.preventDefault();
848
+ if (this.showSuggestions && this.displayedSuggestions.length > 0 &&
849
+ this.selectedIndex >= 0 && this.selectedIndex < this.displayedSuggestions.length) {
850
+ this.selectSuggestion(this.displayedSuggestions[this.selectedIndex].query);
851
+ }
852
+ else {
853
+ // Search with "*" if query is empty
854
+ this.performSearch();
855
+ }
856
+ break;
857
+ case 'Escape':
858
+ this.isFocused = false;
859
+ this.selectedIndex = -1;
860
+ this.searchInput?.nativeElement.blur();
861
+ break;
862
+ }
863
+ }
864
+ selectSuggestion(suggestion) {
865
+ log.verbose('SearchBar: Suggestion selected', { suggestion });
866
+ this.query = suggestion;
867
+ this.selectedIndex = -1;
868
+ this.isFocused = false;
869
+ this.searchInput?.nativeElement.blur();
870
+ this.suggestionSelect.emit(suggestion);
871
+ this.performSearch();
872
+ }
873
+ performSearch() {
874
+ const query = this.query.trim() || '';
875
+ if (!query) {
876
+ log.verbose('SearchBar: Empty query, skipping search');
877
+ return;
878
+ }
879
+ log.info('SearchBar: Performing search', { query });
880
+ this.searchService.search({
881
+ q: query,
882
+ ...this.searchOptions,
883
+ }).subscribe({
884
+ next: (results) => {
885
+ if (results) {
886
+ this.search.emit({ query, results });
887
+ }
888
+ },
889
+ error: (err) => {
890
+ const error = err instanceof Error ? err : new Error(String(err));
891
+ log.error('SearchBar: Search failed', {
892
+ query,
893
+ error: error.message,
894
+ });
895
+ // Error is handled by searchStateChange
896
+ },
897
+ });
898
+ }
899
+ getInputStyle() {
900
+ const theme = this.searchContext.theme;
901
+ return {
902
+ width: '100%',
903
+ padding: theme.spacing.medium,
904
+ fontSize: theme.typography.fontSize.medium,
905
+ borderWidth: '1px',
906
+ borderStyle: 'solid',
907
+ borderColor: this.isFocused ? theme.colors.focus : theme.colors.border,
908
+ borderRadius: typeof theme.borderRadius === 'string'
909
+ ? theme.borderRadius
910
+ : theme.borderRadius.medium,
911
+ outline: 'none',
912
+ ...(this.isFocused && {
913
+ boxShadow: theme.shadows.small,
914
+ }),
915
+ };
916
+ }
917
+ getSuggestionsStyle() {
918
+ const theme = this.searchContext.theme;
919
+ return {
920
+ position: 'absolute',
921
+ top: '100%',
922
+ left: 0,
923
+ right: 0,
924
+ marginTop: theme.spacing.small,
925
+ backgroundColor: theme.colors.background,
926
+ border: `1px solid ${theme.colors.border}`,
927
+ borderRadius: typeof theme.borderRadius === 'string'
928
+ ? theme.borderRadius
929
+ : theme.borderRadius.medium,
930
+ boxShadow: theme.shadows.medium,
931
+ maxHeight: '400px',
932
+ overflowY: 'auto',
933
+ zIndex: 1000,
934
+ };
935
+ }
936
+ get emptyStyle() {
937
+ const theme = this.searchContext.theme;
938
+ return {
939
+ padding: theme.spacing.medium,
940
+ textAlign: 'center',
941
+ color: theme.colors.text,
942
+ };
943
+ }
944
+ getSuggestionStyle(index) {
945
+ const theme = this.searchContext.theme;
946
+ return {
947
+ padding: theme.spacing.medium,
948
+ cursor: 'pointer',
949
+ backgroundColor: index === this.selectedIndex ? theme.colors.hover : 'transparent',
950
+ };
951
+ }
952
+ };
953
+ __setFunctionName(_classThis, "SearchBarComponent");
954
+ (() => {
955
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
956
+ _placeholder_decorators = [Input()];
957
+ _showSuggestions_decorators = [Input()];
958
+ _minQueryLength_decorators = [Input()];
959
+ _maxSuggestions_decorators = [Input()];
960
+ _debounceMs_decorators = [Input()];
961
+ _searchOptions_decorators = [Input()];
962
+ _search_decorators = [Output()];
963
+ _suggestionSelect_decorators = [Output()];
964
+ _queryChange_decorators = [Output()];
965
+ _searchStateChange_decorators = [Output()];
966
+ _searchInput_decorators = [ViewChild('searchInput')];
967
+ __esDecorate(null, null, _placeholder_decorators, { kind: "field", name: "placeholder", static: false, private: false, access: { has: obj => "placeholder" in obj, get: obj => obj.placeholder, set: (obj, value) => { obj.placeholder = value; } }, metadata: _metadata }, _placeholder_initializers, _placeholder_extraInitializers);
968
+ __esDecorate(null, null, _showSuggestions_decorators, { kind: "field", name: "showSuggestions", static: false, private: false, access: { has: obj => "showSuggestions" in obj, get: obj => obj.showSuggestions, set: (obj, value) => { obj.showSuggestions = value; } }, metadata: _metadata }, _showSuggestions_initializers, _showSuggestions_extraInitializers);
969
+ __esDecorate(null, null, _minQueryLength_decorators, { kind: "field", name: "minQueryLength", static: false, private: false, access: { has: obj => "minQueryLength" in obj, get: obj => obj.minQueryLength, set: (obj, value) => { obj.minQueryLength = value; } }, metadata: _metadata }, _minQueryLength_initializers, _minQueryLength_extraInitializers);
970
+ __esDecorate(null, null, _maxSuggestions_decorators, { kind: "field", name: "maxSuggestions", static: false, private: false, access: { has: obj => "maxSuggestions" in obj, get: obj => obj.maxSuggestions, set: (obj, value) => { obj.maxSuggestions = value; } }, metadata: _metadata }, _maxSuggestions_initializers, _maxSuggestions_extraInitializers);
971
+ __esDecorate(null, null, _debounceMs_decorators, { kind: "field", name: "debounceMs", static: false, private: false, access: { has: obj => "debounceMs" in obj, get: obj => obj.debounceMs, set: (obj, value) => { obj.debounceMs = value; } }, metadata: _metadata }, _debounceMs_initializers, _debounceMs_extraInitializers);
972
+ __esDecorate(null, null, _searchOptions_decorators, { kind: "field", name: "searchOptions", static: false, private: false, access: { has: obj => "searchOptions" in obj, get: obj => obj.searchOptions, set: (obj, value) => { obj.searchOptions = value; } }, metadata: _metadata }, _searchOptions_initializers, _searchOptions_extraInitializers);
973
+ __esDecorate(null, null, _search_decorators, { kind: "field", name: "search", static: false, private: false, access: { has: obj => "search" in obj, get: obj => obj.search, set: (obj, value) => { obj.search = value; } }, metadata: _metadata }, _search_initializers, _search_extraInitializers);
974
+ __esDecorate(null, null, _suggestionSelect_decorators, { kind: "field", name: "suggestionSelect", static: false, private: false, access: { has: obj => "suggestionSelect" in obj, get: obj => obj.suggestionSelect, set: (obj, value) => { obj.suggestionSelect = value; } }, metadata: _metadata }, _suggestionSelect_initializers, _suggestionSelect_extraInitializers);
975
+ __esDecorate(null, null, _queryChange_decorators, { kind: "field", name: "queryChange", static: false, private: false, access: { has: obj => "queryChange" in obj, get: obj => obj.queryChange, set: (obj, value) => { obj.queryChange = value; } }, metadata: _metadata }, _queryChange_initializers, _queryChange_extraInitializers);
976
+ __esDecorate(null, null, _searchStateChange_decorators, { kind: "field", name: "searchStateChange", static: false, private: false, access: { has: obj => "searchStateChange" in obj, get: obj => obj.searchStateChange, set: (obj, value) => { obj.searchStateChange = value; } }, metadata: _metadata }, _searchStateChange_initializers, _searchStateChange_extraInitializers);
977
+ __esDecorate(null, null, _searchInput_decorators, { kind: "field", name: "searchInput", static: false, private: false, access: { has: obj => "searchInput" in obj, get: obj => obj.searchInput, set: (obj, value) => { obj.searchInput = value; } }, metadata: _metadata }, _searchInput_initializers, _searchInput_extraInitializers);
978
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
979
+ _classThis = _classDescriptor.value;
980
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
981
+ __runInitializers(_classThis, _classExtraInitializers);
982
+ })();
983
+ return _classThis;
984
+ })();
985
+
986
+ /**
987
+ * SearchResults Component
988
+ *
989
+ * Displays search results with customizable rendering
990
+ */
991
+ let SearchResultsComponent = (() => {
992
+ let _classDecorators = [Component({
993
+ selector: 'seekora-search-results',
994
+ template: `
995
+ <div *ngIf="error && !loading" [style]="containerStyle">
996
+ <div [style]="errorStyle">Error: {{ error.message }}</div>
997
+ </div>
998
+
999
+ <div *ngIf="!loading && !error && displayedResults.length === 0" [style]="containerStyle">
1000
+ <div [style]="emptyStyle">No results found</div>
1001
+ </div>
1002
+
1003
+ <div *ngIf="!loading && !error && displayedResults.length > 0" [style]="getContainerStyle()">
1004
+ <div
1005
+ *ngFor="let result of displayedResults; let i = index"
1006
+ (click)="onResultClick(result, i)"
1007
+ [style]="getResultStyle()"
1008
+ >
1009
+ <div *ngIf="extractedFields(result).image" [style]="imageStyle">
1010
+ <img [src]="extractedFields(result).image" [alt]="extractedFields(result).title" [style]="imageImgStyle" />
1011
+ </div>
1012
+ <div>
1013
+ <h3 [style]="titleStyle">{{ extractedFields(result).title }}</h3>
1014
+ <p *ngIf="extractedFields(result).description" [style]="descriptionStyle">
1015
+ {{ extractedFields(result).description }}
1016
+ </p>
1017
+ <div *ngIf="extractedFields(result).price" [style]="priceStyle">
1018
+ {{ extractedFields(result).price }}
1019
+ </div>
1020
+ </div>
1021
+ </div>
1022
+ </div>
1023
+ `,
1024
+ })];
1025
+ let _classDescriptor;
1026
+ let _classExtraInitializers = [];
1027
+ let _classThis;
1028
+ let _results_decorators;
1029
+ let _results_initializers = [];
1030
+ let _results_extraInitializers = [];
1031
+ let _loading_decorators;
1032
+ let _loading_initializers = [];
1033
+ let _loading_extraInitializers = [];
1034
+ let _error_decorators;
1035
+ let _error_initializers = [];
1036
+ let _error_extraInitializers = [];
1037
+ let _viewMode_decorators;
1038
+ let _viewMode_initializers = [];
1039
+ let _viewMode_extraInitializers = [];
1040
+ let _fieldMapping_decorators;
1041
+ let _fieldMapping_initializers = [];
1042
+ let _fieldMapping_extraInitializers = [];
1043
+ let _itemsPerPage_decorators;
1044
+ let _itemsPerPage_initializers = [];
1045
+ let _itemsPerPage_extraInitializers = [];
1046
+ let _resultClick_decorators;
1047
+ let _resultClick_initializers = [];
1048
+ let _resultClick_extraInitializers = [];
1049
+ _classThis = class {
1050
+ constructor(searchContext, searchService) {
1051
+ this.searchContext = searchContext;
1052
+ this.searchService = searchService;
1053
+ this.results = __runInitializers(this, _results_initializers, void 0);
1054
+ this.loading = (__runInitializers(this, _results_extraInitializers), __runInitializers(this, _loading_initializers, false));
1055
+ this.error = (__runInitializers(this, _loading_extraInitializers), __runInitializers(this, _error_initializers, void 0));
1056
+ this.viewMode = (__runInitializers(this, _error_extraInitializers), __runInitializers(this, _viewMode_initializers, 'list'));
1057
+ this.fieldMapping = (__runInitializers(this, _viewMode_extraInitializers), __runInitializers(this, _fieldMapping_initializers, void 0));
1058
+ this.itemsPerPage = (__runInitializers(this, _fieldMapping_extraInitializers), __runInitializers(this, _itemsPerPage_initializers, 10));
1059
+ this.resultClick = (__runInitializers(this, _itemsPerPage_extraInitializers), __runInitializers(this, _resultClick_initializers, new EventEmitter()));
1060
+ this.subscriptions = (__runInitializers(this, _resultClick_extraInitializers), new Subscription());
1061
+ }
1062
+ ngOnInit() {
1063
+ const searchSub = this.searchService.searchState$.subscribe(state => {
1064
+ // Component can react to search state changes if needed
1065
+ });
1066
+ this.subscriptions.add(searchSub);
1067
+ }
1068
+ ngOnDestroy() {
1069
+ this.subscriptions.unsubscribe();
1070
+ }
1071
+ extractResults(results) {
1072
+ if (!results)
1073
+ return [];
1074
+ if (Array.isArray(results))
1075
+ return results;
1076
+ if (results.results && Array.isArray(results.results))
1077
+ return results.results;
1078
+ if (results.data) {
1079
+ if (Array.isArray(results.data))
1080
+ return results.data;
1081
+ if (results.data.results && Array.isArray(results.data.results))
1082
+ return results.data.results;
1083
+ if (results.data.data?.results && Array.isArray(results.data.data.results)) {
1084
+ return results.data.data.results;
1085
+ }
1086
+ }
1087
+ return [];
1088
+ }
1089
+ get displayedResults() {
1090
+ const allResults = this.extractResults(this.results);
1091
+ return this.itemsPerPage > 0 ? allResults.slice(0, this.itemsPerPage) : allResults;
1092
+ }
1093
+ extractedFields(item) {
1094
+ const mapping = this.fieldMapping || {};
1095
+ return {
1096
+ id: extractField(item, mapping.id) || String(item.id || ''),
1097
+ title: extractField(item, mapping.title) || extractField(item, mapping.primaryText) || 'Untitled',
1098
+ description: extractField(item, mapping.description) || extractField(item, mapping.secondaryText),
1099
+ image: extractField(item, mapping.image) || extractField(item, mapping.imageUrl),
1100
+ price: mapping.price ? formatPrice(extractField(item, mapping.price)) : undefined,
1101
+ url: extractField(item, mapping.url),
1102
+ metadata: item,
1103
+ };
1104
+ }
1105
+ onResultClick(result, index) {
1106
+ this.resultClick.emit({ result, index });
1107
+ }
1108
+ get containerStyle() {
1109
+ return {};
1110
+ }
1111
+ get errorStyle() {
1112
+ const theme = this.searchContext.theme;
1113
+ return {
1114
+ padding: theme.spacing.large,
1115
+ textAlign: 'center',
1116
+ color: theme.colors.error,
1117
+ };
1118
+ }
1119
+ get emptyStyle() {
1120
+ const theme = this.searchContext.theme;
1121
+ return {
1122
+ padding: theme.spacing.large,
1123
+ textAlign: 'center',
1124
+ color: theme.colors.textSecondary || theme.colors.text,
1125
+ };
1126
+ }
1127
+ getContainerStyle() {
1128
+ return {};
1129
+ }
1130
+ getResultStyle() {
1131
+ const theme = this.searchContext.theme;
1132
+ const baseStyle = {
1133
+ cursor: 'pointer',
1134
+ };
1135
+ if (this.viewMode === 'list') {
1136
+ return {
1137
+ ...baseStyle,
1138
+ padding: theme.spacing.medium,
1139
+ borderBottom: `1px solid ${theme.colors.border}`,
1140
+ };
1141
+ }
1142
+ else if (this.viewMode === 'card') {
1143
+ return {
1144
+ ...baseStyle,
1145
+ padding: theme.spacing.medium,
1146
+ border: `1px solid ${theme.colors.border}`,
1147
+ borderRadius: typeof theme.borderRadius === 'string'
1148
+ ? theme.borderRadius
1149
+ : theme.borderRadius.medium,
1150
+ marginBottom: theme.spacing.medium,
1151
+ boxShadow: theme.shadows.small,
1152
+ };
1153
+ }
1154
+ return baseStyle;
1155
+ }
1156
+ get imageStyle() {
1157
+ return {
1158
+ float: 'left',
1159
+ marginRight: this.searchContext.theme.spacing.medium,
1160
+ };
1161
+ }
1162
+ get imageImgStyle() {
1163
+ const theme = this.searchContext.theme;
1164
+ return {
1165
+ width: '100px',
1166
+ height: '100px',
1167
+ objectFit: 'cover',
1168
+ borderRadius: typeof theme.borderRadius === 'string'
1169
+ ? theme.borderRadius
1170
+ : theme.borderRadius.medium,
1171
+ };
1172
+ }
1173
+ get titleStyle() {
1174
+ const theme = this.searchContext.theme;
1175
+ return {
1176
+ fontSize: theme.typography.fontSize.large,
1177
+ fontWeight: 'bold',
1178
+ margin: 0,
1179
+ marginBottom: theme.spacing.small,
1180
+ color: theme.colors.text,
1181
+ };
1182
+ }
1183
+ get descriptionStyle() {
1184
+ const theme = this.searchContext.theme;
1185
+ return {
1186
+ fontSize: theme.typography.fontSize.medium,
1187
+ color: theme.colors.text,
1188
+ margin: 0,
1189
+ marginBottom: theme.spacing.small,
1190
+ opacity: 0.8,
1191
+ };
1192
+ }
1193
+ get priceStyle() {
1194
+ const theme = this.searchContext.theme;
1195
+ return {
1196
+ fontSize: theme.typography.fontSize.medium,
1197
+ fontWeight: 'bold',
1198
+ color: theme.colors.primary,
1199
+ };
1200
+ }
1201
+ };
1202
+ __setFunctionName(_classThis, "SearchResultsComponent");
1203
+ (() => {
1204
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
1205
+ _results_decorators = [Input()];
1206
+ _loading_decorators = [Input()];
1207
+ _error_decorators = [Input()];
1208
+ _viewMode_decorators = [Input()];
1209
+ _fieldMapping_decorators = [Input()];
1210
+ _itemsPerPage_decorators = [Input()];
1211
+ _resultClick_decorators = [Output()];
1212
+ __esDecorate(null, null, _results_decorators, { kind: "field", name: "results", static: false, private: false, access: { has: obj => "results" in obj, get: obj => obj.results, set: (obj, value) => { obj.results = value; } }, metadata: _metadata }, _results_initializers, _results_extraInitializers);
1213
+ __esDecorate(null, null, _loading_decorators, { kind: "field", name: "loading", static: false, private: false, access: { has: obj => "loading" in obj, get: obj => obj.loading, set: (obj, value) => { obj.loading = value; } }, metadata: _metadata }, _loading_initializers, _loading_extraInitializers);
1214
+ __esDecorate(null, null, _error_decorators, { kind: "field", name: "error", static: false, private: false, access: { has: obj => "error" in obj, get: obj => obj.error, set: (obj, value) => { obj.error = value; } }, metadata: _metadata }, _error_initializers, _error_extraInitializers);
1215
+ __esDecorate(null, null, _viewMode_decorators, { kind: "field", name: "viewMode", static: false, private: false, access: { has: obj => "viewMode" in obj, get: obj => obj.viewMode, set: (obj, value) => { obj.viewMode = value; } }, metadata: _metadata }, _viewMode_initializers, _viewMode_extraInitializers);
1216
+ __esDecorate(null, null, _fieldMapping_decorators, { kind: "field", name: "fieldMapping", static: false, private: false, access: { has: obj => "fieldMapping" in obj, get: obj => obj.fieldMapping, set: (obj, value) => { obj.fieldMapping = value; } }, metadata: _metadata }, _fieldMapping_initializers, _fieldMapping_extraInitializers);
1217
+ __esDecorate(null, null, _itemsPerPage_decorators, { kind: "field", name: "itemsPerPage", static: false, private: false, access: { has: obj => "itemsPerPage" in obj, get: obj => obj.itemsPerPage, set: (obj, value) => { obj.itemsPerPage = value; } }, metadata: _metadata }, _itemsPerPage_initializers, _itemsPerPage_extraInitializers);
1218
+ __esDecorate(null, null, _resultClick_decorators, { kind: "field", name: "resultClick", static: false, private: false, access: { has: obj => "resultClick" in obj, get: obj => obj.resultClick, set: (obj, value) => { obj.resultClick = value; } }, metadata: _metadata }, _resultClick_initializers, _resultClick_extraInitializers);
1219
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1220
+ _classThis = _classDescriptor.value;
1221
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1222
+ __runInitializers(_classThis, _classExtraInitializers);
1223
+ })();
1224
+ return _classThis;
1225
+ })();
1226
+
1227
+ /**
1228
+ * QuerySuggestions Component
1229
+ *
1230
+ * Standalone component for displaying query suggestions
1231
+ */
1232
+ let QuerySuggestionsComponent = (() => {
1233
+ let _classDecorators = [Component({
1234
+ selector: 'seekora-query-suggestions',
1235
+ template: `
1236
+ <div
1237
+ *ngIf="query.length >= minQueryLength"
1238
+ [style]="getContainerStyle()"
1239
+ >
1240
+ <div
1241
+ *ngIf="showTitle"
1242
+ [style]="getTitleStyle()"
1243
+ >
1244
+ {{ title }}
1245
+ </div>
1246
+
1247
+ <div *ngIf="!suggestionsLoading && (error || displayedSuggestions.length === 0)">
1248
+ <ng-content select="[empty]">
1249
+ <div [style]="getEmptyStyle()">
1250
+ No suggestions available
1251
+ </div>
1252
+ </ng-content>
1253
+ </div>
1254
+
1255
+ <div *ngIf="!suggestionsLoading && !error && displayedSuggestions.length > 0">
1256
+ <div
1257
+ *ngFor="let suggestion of displayedSuggestions; let i = index"
1258
+ [style]="getSuggestionStyle(i)"
1259
+ (click)="onSuggestionClick(suggestion)"
1260
+ (mouseenter)="selectedIndex = i"
1261
+ (mouseleave)="selectedIndex = -1"
1262
+ >
1263
+ <ng-content select="[suggestion]">
1264
+ <span>{{ suggestion.query }}</span>
1265
+ <span *ngIf="suggestion.count !== undefined" [style]="getCountStyle()">
1266
+ ({{ suggestion.count }})
1267
+ </span>
1268
+ </ng-content>
1269
+ </div>
1270
+ </div>
1271
+ </div>
1272
+ `,
1273
+ })];
1274
+ let _classDescriptor;
1275
+ let _classExtraInitializers = [];
1276
+ let _classThis;
1277
+ let _query_decorators;
1278
+ let _query_initializers = [];
1279
+ let _query_extraInitializers = [];
1280
+ let _maxSuggestions_decorators;
1281
+ let _maxSuggestions_initializers = [];
1282
+ let _maxSuggestions_extraInitializers = [];
1283
+ let _debounceMs_decorators;
1284
+ let _debounceMs_initializers = [];
1285
+ let _debounceMs_extraInitializers = [];
1286
+ let _minQueryLength_decorators;
1287
+ let _minQueryLength_initializers = [];
1288
+ let _minQueryLength_extraInitializers = [];
1289
+ let _showTitle_decorators;
1290
+ let _showTitle_initializers = [];
1291
+ let _showTitle_extraInitializers = [];
1292
+ let _title_decorators;
1293
+ let _title_initializers = [];
1294
+ let _title_extraInitializers = [];
1295
+ let _className_decorators;
1296
+ let _className_initializers = [];
1297
+ let _className_extraInitializers = [];
1298
+ let _style_decorators;
1299
+ let _style_initializers = [];
1300
+ let _style_extraInitializers = [];
1301
+ let _suggestionClick_decorators;
1302
+ let _suggestionClick_initializers = [];
1303
+ let _suggestionClick_extraInitializers = [];
1304
+ _classThis = class {
1305
+ constructor(searchContext) {
1306
+ this.searchContext = searchContext;
1307
+ this.query = __runInitializers(this, _query_initializers, '');
1308
+ this.maxSuggestions = (__runInitializers(this, _query_extraInitializers), __runInitializers(this, _maxSuggestions_initializers, 10));
1309
+ this.debounceMs = (__runInitializers(this, _maxSuggestions_extraInitializers), __runInitializers(this, _debounceMs_initializers, 300));
1310
+ this.minQueryLength = (__runInitializers(this, _debounceMs_extraInitializers), __runInitializers(this, _minQueryLength_initializers, 2));
1311
+ this.showTitle = (__runInitializers(this, _minQueryLength_extraInitializers), __runInitializers(this, _showTitle_initializers, false));
1312
+ this.title = (__runInitializers(this, _showTitle_extraInitializers), __runInitializers(this, _title_initializers, 'Suggestions'));
1313
+ this.className = (__runInitializers(this, _title_extraInitializers), __runInitializers(this, _className_initializers, void 0));
1314
+ this.style = (__runInitializers(this, _className_extraInitializers), __runInitializers(this, _style_initializers, void 0));
1315
+ this.suggestionClick = (__runInitializers(this, _style_extraInitializers), __runInitializers(this, _suggestionClick_initializers, new EventEmitter()));
1316
+ this.displayedSuggestions = (__runInitializers(this, _suggestionClick_extraInitializers), []);
1317
+ this.suggestionsLoading = false;
1318
+ this.error = null;
1319
+ this.selectedIndex = -1;
1320
+ this.querySubject = new Subject();
1321
+ }
1322
+ ngOnInit() {
1323
+ // Debounce query changes
1324
+ this.subscription = this.querySubject
1325
+ .pipe(debounceTime(this.debounceMs), distinctUntilChanged())
1326
+ .subscribe(query => {
1327
+ if (query.length >= this.minQueryLength) {
1328
+ this.loadSuggestions(query);
1329
+ }
1330
+ else {
1331
+ this.displayedSuggestions = [];
1332
+ this.suggestionsLoading = false;
1333
+ this.error = null;
1334
+ }
1335
+ });
1336
+ // Initial load if query is provided
1337
+ if (this.query.length >= this.minQueryLength) {
1338
+ this.querySubject.next(this.query);
1339
+ }
1340
+ }
1341
+ ngOnDestroy() {
1342
+ this.subscription?.unsubscribe();
1343
+ this.suggestionsSubscription?.unsubscribe();
1344
+ }
1345
+ ngOnChanges() {
1346
+ if (this.query !== undefined) {
1347
+ this.querySubject.next(this.query);
1348
+ }
1349
+ }
1350
+ loadSuggestions(query) {
1351
+ this.suggestionsLoading = true;
1352
+ this.error = null;
1353
+ this.suggestionsSubscription = this.searchContext.client
1354
+ .getSuggestions(query, this.maxSuggestions)
1355
+ .then((response) => {
1356
+ const rawSuggestions = Array.isArray(response) ? response : [];
1357
+ const suggestionItems = rawSuggestions.map((suggestion) => {
1358
+ const suggestionQuery = suggestion.query || suggestion.text || suggestion;
1359
+ const count = suggestion.popularity !== undefined
1360
+ ? suggestion.popularity
1361
+ : (suggestion.count !== undefined ? suggestion.count : undefined);
1362
+ return {
1363
+ query: typeof suggestionQuery === 'string' ? suggestionQuery : String(suggestionQuery),
1364
+ count: typeof count === 'number' ? count : undefined,
1365
+ metadata: suggestion,
1366
+ };
1367
+ });
1368
+ this.displayedSuggestions = suggestionItems.slice(0, this.maxSuggestions);
1369
+ this.suggestionsLoading = false;
1370
+ })
1371
+ .catch((err) => {
1372
+ this.error = err instanceof Error ? err : new Error(String(err));
1373
+ this.suggestionsLoading = false;
1374
+ });
1375
+ }
1376
+ onSuggestionClick(suggestion) {
1377
+ this.suggestionClick.emit(suggestion.query);
1378
+ }
1379
+ get theme() {
1380
+ return this.searchContext.theme;
1381
+ }
1382
+ getContainerStyle() {
1383
+ return {
1384
+ ...this.style,
1385
+ };
1386
+ }
1387
+ getTitleStyle() {
1388
+ return {
1389
+ fontSize: this.theme.typography.fontSize.large,
1390
+ fontWeight: 'bold',
1391
+ marginBottom: this.theme.spacing.medium,
1392
+ color: this.theme.colors.text,
1393
+ };
1394
+ }
1395
+ getEmptyStyle() {
1396
+ return {
1397
+ padding: this.theme.spacing.medium,
1398
+ textAlign: 'center',
1399
+ color: this.theme.colors.text,
1400
+ opacity: 0.6,
1401
+ };
1402
+ }
1403
+ getSuggestionStyle(index) {
1404
+ const borderRadius = typeof this.theme.borderRadius === 'string'
1405
+ ? this.theme.borderRadius
1406
+ : this.theme.borderRadius.medium;
1407
+ return {
1408
+ padding: this.theme.spacing.medium,
1409
+ cursor: 'pointer',
1410
+ borderRadius,
1411
+ transition: this.theme.transitions?.fast || '150ms ease-in-out',
1412
+ backgroundColor: index === this.selectedIndex ? this.theme.colors.hover : 'transparent',
1413
+ marginBottom: index < this.displayedSuggestions.length - 1 ? this.theme.spacing.small : 0,
1414
+ };
1415
+ }
1416
+ getCountStyle() {
1417
+ return {
1418
+ opacity: 0.6,
1419
+ marginLeft: this.theme.spacing.small,
1420
+ };
1421
+ }
1422
+ };
1423
+ __setFunctionName(_classThis, "QuerySuggestionsComponent");
1424
+ (() => {
1425
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
1426
+ _query_decorators = [Input()];
1427
+ _maxSuggestions_decorators = [Input()];
1428
+ _debounceMs_decorators = [Input()];
1429
+ _minQueryLength_decorators = [Input()];
1430
+ _showTitle_decorators = [Input()];
1431
+ _title_decorators = [Input()];
1432
+ _className_decorators = [Input()];
1433
+ _style_decorators = [Input()];
1434
+ _suggestionClick_decorators = [Output()];
1435
+ __esDecorate(null, null, _query_decorators, { kind: "field", name: "query", static: false, private: false, access: { has: obj => "query" in obj, get: obj => obj.query, set: (obj, value) => { obj.query = value; } }, metadata: _metadata }, _query_initializers, _query_extraInitializers);
1436
+ __esDecorate(null, null, _maxSuggestions_decorators, { kind: "field", name: "maxSuggestions", static: false, private: false, access: { has: obj => "maxSuggestions" in obj, get: obj => obj.maxSuggestions, set: (obj, value) => { obj.maxSuggestions = value; } }, metadata: _metadata }, _maxSuggestions_initializers, _maxSuggestions_extraInitializers);
1437
+ __esDecorate(null, null, _debounceMs_decorators, { kind: "field", name: "debounceMs", static: false, private: false, access: { has: obj => "debounceMs" in obj, get: obj => obj.debounceMs, set: (obj, value) => { obj.debounceMs = value; } }, metadata: _metadata }, _debounceMs_initializers, _debounceMs_extraInitializers);
1438
+ __esDecorate(null, null, _minQueryLength_decorators, { kind: "field", name: "minQueryLength", static: false, private: false, access: { has: obj => "minQueryLength" in obj, get: obj => obj.minQueryLength, set: (obj, value) => { obj.minQueryLength = value; } }, metadata: _metadata }, _minQueryLength_initializers, _minQueryLength_extraInitializers);
1439
+ __esDecorate(null, null, _showTitle_decorators, { kind: "field", name: "showTitle", static: false, private: false, access: { has: obj => "showTitle" in obj, get: obj => obj.showTitle, set: (obj, value) => { obj.showTitle = value; } }, metadata: _metadata }, _showTitle_initializers, _showTitle_extraInitializers);
1440
+ __esDecorate(null, null, _title_decorators, { kind: "field", name: "title", static: false, private: false, access: { has: obj => "title" in obj, get: obj => obj.title, set: (obj, value) => { obj.title = value; } }, metadata: _metadata }, _title_initializers, _title_extraInitializers);
1441
+ __esDecorate(null, null, _className_decorators, { kind: "field", name: "className", static: false, private: false, access: { has: obj => "className" in obj, get: obj => obj.className, set: (obj, value) => { obj.className = value; } }, metadata: _metadata }, _className_initializers, _className_extraInitializers);
1442
+ __esDecorate(null, null, _style_decorators, { kind: "field", name: "style", static: false, private: false, access: { has: obj => "style" in obj, get: obj => obj.style, set: (obj, value) => { obj.style = value; } }, metadata: _metadata }, _style_initializers, _style_extraInitializers);
1443
+ __esDecorate(null, null, _suggestionClick_decorators, { kind: "field", name: "suggestionClick", static: false, private: false, access: { has: obj => "suggestionClick" in obj, get: obj => obj.suggestionClick, set: (obj, value) => { obj.suggestionClick = value; } }, metadata: _metadata }, _suggestionClick_initializers, _suggestionClick_extraInitializers);
1444
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1445
+ _classThis = _classDescriptor.value;
1446
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1447
+ __runInitializers(_classThis, _classExtraInitializers);
1448
+ })();
1449
+ return _classThis;
1450
+ })();
1451
+
1452
+ /**
1453
+ * Stats Component
1454
+ *
1455
+ * Displays search statistics
1456
+ */
1457
+ let StatsComponent = (() => {
1458
+ let _classDecorators = [Component({
1459
+ selector: 'seekora-stats',
1460
+ template: `
1461
+ <div *ngIf="!loading && hasResults" [style]="containerStyle">
1462
+ <span [style]="textStyle">
1463
+ {{ resultsText }}
1464
+ <span *ngIf="showProcessingTime && processingTime !== undefined">
1465
+ {{ processingTimeText }}
1466
+ </span>
1467
+ </span>
1468
+ </div>
1469
+ `,
1470
+ })];
1471
+ let _classDescriptor;
1472
+ let _classExtraInitializers = [];
1473
+ let _classThis;
1474
+ let _results_decorators;
1475
+ let _results_initializers = [];
1476
+ let _results_extraInitializers = [];
1477
+ let _loading_decorators;
1478
+ let _loading_initializers = [];
1479
+ let _loading_extraInitializers = [];
1480
+ let _showProcessingTime_decorators;
1481
+ let _showProcessingTime_initializers = [];
1482
+ let _showProcessingTime_extraInitializers = [];
1483
+ let _showQuery_decorators;
1484
+ let _showQuery_initializers = [];
1485
+ let _showQuery_extraInitializers = [];
1486
+ let _labels_decorators;
1487
+ let _labels_initializers = [];
1488
+ let _labels_extraInitializers = [];
1489
+ _classThis = class {
1490
+ constructor(searchContext) {
1491
+ this.searchContext = searchContext;
1492
+ this.results = __runInitializers(this, _results_initializers, void 0);
1493
+ this.loading = (__runInitializers(this, _results_extraInitializers), __runInitializers(this, _loading_initializers, false));
1494
+ this.showProcessingTime = (__runInitializers(this, _loading_extraInitializers), __runInitializers(this, _showProcessingTime_initializers, true));
1495
+ this.showQuery = (__runInitializers(this, _showProcessingTime_extraInitializers), __runInitializers(this, _showQuery_initializers, false));
1496
+ this.labels = (__runInitializers(this, _showQuery_extraInitializers), __runInitializers(this, _labels_initializers, void 0));
1497
+ __runInitializers(this, _labels_extraInitializers);
1498
+ this.searchContext = searchContext;
1499
+ }
1500
+ get totalResults() {
1501
+ if (!this.results)
1502
+ return 0;
1503
+ return this.results.totalResults || this.results.data?.total_results || 0;
1504
+ }
1505
+ get processingTime() {
1506
+ if (!this.results)
1507
+ return undefined;
1508
+ return this.results.processingTimeMs || this.results.data?.processing_time_ms;
1509
+ }
1510
+ get hasResults() {
1511
+ return this.totalResults > 0;
1512
+ }
1513
+ get resultsText() {
1514
+ const defaultLabel = (total) => `${total} results found`;
1515
+ const labelFn = this.labels?.resultsFound || defaultLabel;
1516
+ return labelFn(this.totalResults);
1517
+ }
1518
+ get processingTimeText() {
1519
+ if (this.processingTime === undefined)
1520
+ return '';
1521
+ const defaultLabel = (time) => `in ${time} ms`;
1522
+ const labelFn = this.labels?.processingTime || defaultLabel;
1523
+ return ` ${labelFn(this.processingTime)}`;
1524
+ }
1525
+ get containerStyle() {
1526
+ return {};
1527
+ }
1528
+ get textStyle() {
1529
+ const theme = this.searchContext.theme;
1530
+ return {
1531
+ color: theme.colors.text,
1532
+ fontSize: theme.typography.fontSize.medium,
1533
+ };
1534
+ }
1535
+ };
1536
+ __setFunctionName(_classThis, "StatsComponent");
1537
+ (() => {
1538
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
1539
+ _results_decorators = [Input()];
1540
+ _loading_decorators = [Input()];
1541
+ _showProcessingTime_decorators = [Input()];
1542
+ _showQuery_decorators = [Input()];
1543
+ _labels_decorators = [Input()];
1544
+ __esDecorate(null, null, _results_decorators, { kind: "field", name: "results", static: false, private: false, access: { has: obj => "results" in obj, get: obj => obj.results, set: (obj, value) => { obj.results = value; } }, metadata: _metadata }, _results_initializers, _results_extraInitializers);
1545
+ __esDecorate(null, null, _loading_decorators, { kind: "field", name: "loading", static: false, private: false, access: { has: obj => "loading" in obj, get: obj => obj.loading, set: (obj, value) => { obj.loading = value; } }, metadata: _metadata }, _loading_initializers, _loading_extraInitializers);
1546
+ __esDecorate(null, null, _showProcessingTime_decorators, { kind: "field", name: "showProcessingTime", static: false, private: false, access: { has: obj => "showProcessingTime" in obj, get: obj => obj.showProcessingTime, set: (obj, value) => { obj.showProcessingTime = value; } }, metadata: _metadata }, _showProcessingTime_initializers, _showProcessingTime_extraInitializers);
1547
+ __esDecorate(null, null, _showQuery_decorators, { kind: "field", name: "showQuery", static: false, private: false, access: { has: obj => "showQuery" in obj, get: obj => obj.showQuery, set: (obj, value) => { obj.showQuery = value; } }, metadata: _metadata }, _showQuery_initializers, _showQuery_extraInitializers);
1548
+ __esDecorate(null, null, _labels_decorators, { kind: "field", name: "labels", static: false, private: false, access: { has: obj => "labels" in obj, get: obj => obj.labels, set: (obj, value) => { obj.labels = value; } }, metadata: _metadata }, _labels_initializers, _labels_extraInitializers);
1549
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1550
+ _classThis = _classDescriptor.value;
1551
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1552
+ __runInitializers(_classThis, _classExtraInitializers);
1553
+ })();
1554
+ return _classThis;
1555
+ })();
1556
+
1557
+ /**
1558
+ * Pagination Component
1559
+ *
1560
+ * Displays pagination controls for search results
1561
+ */
1562
+ let PaginationComponent = (() => {
1563
+ let _classDecorators = [Component({
1564
+ selector: 'seekora-pagination',
1565
+ template: `
1566
+ <div *ngIf="totalPages > 1" [style]="containerStyle">
1567
+ <button
1568
+ *ngIf="showFirstLast"
1569
+ [disabled]="currentPage === 1"
1570
+ (click)="handlePageChange(1)"
1571
+ [style]="getButtonStyle(1)"
1572
+ >
1573
+ First
1574
+ </button>
1575
+
1576
+ <button
1577
+ *ngIf="showPrevNext"
1578
+ [disabled]="currentPage === 1"
1579
+ (click)="handlePageChange(currentPage - 1)"
1580
+ [style]="getButtonStyle(currentPage - 1)"
1581
+ >
1582
+ Previous
1583
+ </button>
1584
+
1585
+ <button
1586
+ *ngFor="let page of visiblePages"
1587
+ [disabled]="page === currentPage"
1588
+ (click)="handlePageChange(page)"
1589
+ [style]="getButtonStyle(page, page === currentPage)"
1590
+ >
1591
+ {{ page }}
1592
+ </button>
1593
+
1594
+ <button
1595
+ *ngIf="showPrevNext"
1596
+ [disabled]="currentPage === totalPages"
1597
+ (click)="handlePageChange(currentPage + 1)"
1598
+ [style]="getButtonStyle(currentPage + 1)"
1599
+ >
1600
+ Next
1601
+ </button>
1602
+
1603
+ <button
1604
+ *ngIf="showFirstLast"
1605
+ [disabled]="currentPage === totalPages"
1606
+ (click)="handlePageChange(totalPages)"
1607
+ [style]="getButtonStyle(totalPages)"
1608
+ >
1609
+ Last
1610
+ </button>
1611
+ </div>
1612
+ `,
1613
+ })];
1614
+ let _classDescriptor;
1615
+ let _classExtraInitializers = [];
1616
+ let _classThis;
1617
+ let _results_decorators;
1618
+ let _results_initializers = [];
1619
+ let _results_extraInitializers = [];
1620
+ let _currentPage_decorators;
1621
+ let _currentPage_initializers = [];
1622
+ let _currentPage_extraInitializers = [];
1623
+ let _itemsPerPage_decorators;
1624
+ let _itemsPerPage_initializers = [];
1625
+ let _itemsPerPage_extraInitializers = [];
1626
+ let _maxVisiblePages_decorators;
1627
+ let _maxVisiblePages_initializers = [];
1628
+ let _maxVisiblePages_extraInitializers = [];
1629
+ let _showFirstLast_decorators;
1630
+ let _showFirstLast_initializers = [];
1631
+ let _showFirstLast_extraInitializers = [];
1632
+ let _showPrevNext_decorators;
1633
+ let _showPrevNext_initializers = [];
1634
+ let _showPrevNext_extraInitializers = [];
1635
+ let _pageChange_decorators;
1636
+ let _pageChange_initializers = [];
1637
+ let _pageChange_extraInitializers = [];
1638
+ _classThis = class {
1639
+ constructor(searchContext) {
1640
+ this.searchContext = searchContext;
1641
+ this.results = __runInitializers(this, _results_initializers, void 0);
1642
+ this.currentPage = (__runInitializers(this, _results_extraInitializers), __runInitializers(this, _currentPage_initializers, 1));
1643
+ this.itemsPerPage = (__runInitializers(this, _currentPage_extraInitializers), __runInitializers(this, _itemsPerPage_initializers, 10));
1644
+ this.maxVisiblePages = (__runInitializers(this, _itemsPerPage_extraInitializers), __runInitializers(this, _maxVisiblePages_initializers, 5));
1645
+ this.showFirstLast = (__runInitializers(this, _maxVisiblePages_extraInitializers), __runInitializers(this, _showFirstLast_initializers, false));
1646
+ this.showPrevNext = (__runInitializers(this, _showFirstLast_extraInitializers), __runInitializers(this, _showPrevNext_initializers, true));
1647
+ this.pageChange = (__runInitializers(this, _showPrevNext_extraInitializers), __runInitializers(this, _pageChange_initializers, new EventEmitter()));
1648
+ __runInitializers(this, _pageChange_extraInitializers);
1649
+ this.searchContext = searchContext;
1650
+ }
1651
+ get totalResults() {
1652
+ if (!this.results)
1653
+ return 0;
1654
+ return this.results.totalResults || this.results.data?.total_results || 0;
1655
+ }
1656
+ get totalPages() {
1657
+ return Math.ceil(this.totalResults / this.itemsPerPage);
1658
+ }
1659
+ get visiblePages() {
1660
+ const pages = [];
1661
+ const maxVisible = this.maxVisiblePages || 5;
1662
+ const half = Math.floor(maxVisible / 2);
1663
+ let start = Math.max(1, this.currentPage - half);
1664
+ let end = Math.min(this.totalPages, start + maxVisible - 1);
1665
+ if (end - start < maxVisible - 1) {
1666
+ start = Math.max(1, end - maxVisible + 1);
1667
+ }
1668
+ for (let i = start; i <= end; i++) {
1669
+ pages.push(i);
1670
+ }
1671
+ return pages;
1672
+ }
1673
+ handlePageChange(page) {
1674
+ if (page < 1 || page > this.totalPages)
1675
+ return;
1676
+ this.pageChange.emit(page);
1677
+ }
1678
+ get containerStyle() {
1679
+ const theme = this.searchContext.theme;
1680
+ return {
1681
+ display: 'flex',
1682
+ gap: theme.spacing.small,
1683
+ justifyContent: 'center',
1684
+ alignItems: 'center',
1685
+ };
1686
+ }
1687
+ getButtonStyle(page, isActive = false) {
1688
+ const theme = this.searchContext.theme;
1689
+ return {
1690
+ padding: `${theme.spacing.small} ${theme.spacing.medium}`,
1691
+ border: `1px solid ${theme.colors.border}`,
1692
+ borderRadius: typeof theme.borderRadius === 'string'
1693
+ ? theme.borderRadius
1694
+ : theme.borderRadius.medium,
1695
+ backgroundColor: isActive ? theme.colors.primary : theme.colors.background,
1696
+ color: isActive ? '#fff' : theme.colors.text,
1697
+ cursor: 'pointer',
1698
+ fontSize: theme.typography.fontSize.small,
1699
+ };
1700
+ }
1701
+ };
1702
+ __setFunctionName(_classThis, "PaginationComponent");
1703
+ (() => {
1704
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
1705
+ _results_decorators = [Input()];
1706
+ _currentPage_decorators = [Input()];
1707
+ _itemsPerPage_decorators = [Input()];
1708
+ _maxVisiblePages_decorators = [Input()];
1709
+ _showFirstLast_decorators = [Input()];
1710
+ _showPrevNext_decorators = [Input()];
1711
+ _pageChange_decorators = [Output()];
1712
+ __esDecorate(null, null, _results_decorators, { kind: "field", name: "results", static: false, private: false, access: { has: obj => "results" in obj, get: obj => obj.results, set: (obj, value) => { obj.results = value; } }, metadata: _metadata }, _results_initializers, _results_extraInitializers);
1713
+ __esDecorate(null, null, _currentPage_decorators, { kind: "field", name: "currentPage", static: false, private: false, access: { has: obj => "currentPage" in obj, get: obj => obj.currentPage, set: (obj, value) => { obj.currentPage = value; } }, metadata: _metadata }, _currentPage_initializers, _currentPage_extraInitializers);
1714
+ __esDecorate(null, null, _itemsPerPage_decorators, { kind: "field", name: "itemsPerPage", static: false, private: false, access: { has: obj => "itemsPerPage" in obj, get: obj => obj.itemsPerPage, set: (obj, value) => { obj.itemsPerPage = value; } }, metadata: _metadata }, _itemsPerPage_initializers, _itemsPerPage_extraInitializers);
1715
+ __esDecorate(null, null, _maxVisiblePages_decorators, { kind: "field", name: "maxVisiblePages", static: false, private: false, access: { has: obj => "maxVisiblePages" in obj, get: obj => obj.maxVisiblePages, set: (obj, value) => { obj.maxVisiblePages = value; } }, metadata: _metadata }, _maxVisiblePages_initializers, _maxVisiblePages_extraInitializers);
1716
+ __esDecorate(null, null, _showFirstLast_decorators, { kind: "field", name: "showFirstLast", static: false, private: false, access: { has: obj => "showFirstLast" in obj, get: obj => obj.showFirstLast, set: (obj, value) => { obj.showFirstLast = value; } }, metadata: _metadata }, _showFirstLast_initializers, _showFirstLast_extraInitializers);
1717
+ __esDecorate(null, null, _showPrevNext_decorators, { kind: "field", name: "showPrevNext", static: false, private: false, access: { has: obj => "showPrevNext" in obj, get: obj => obj.showPrevNext, set: (obj, value) => { obj.showPrevNext = value; } }, metadata: _metadata }, _showPrevNext_initializers, _showPrevNext_extraInitializers);
1718
+ __esDecorate(null, null, _pageChange_decorators, { kind: "field", name: "pageChange", static: false, private: false, access: { has: obj => "pageChange" in obj, get: obj => obj.pageChange, set: (obj, value) => { obj.pageChange = value; } }, metadata: _metadata }, _pageChange_initializers, _pageChange_extraInitializers);
1719
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1720
+ _classThis = _classDescriptor.value;
1721
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1722
+ __runInitializers(_classThis, _classExtraInitializers);
1723
+ })();
1724
+ return _classThis;
1725
+ })();
1726
+
1727
+ /**
1728
+ * SortBy Component
1729
+ *
1730
+ * Displays sort options for search results
1731
+ */
1732
+ let SortByComponent = (() => {
1733
+ let _classDecorators = [Component({
1734
+ selector: 'seekora-sort-by',
1735
+ template: `
1736
+ <div [style]="containerStyle">
1737
+ <label *ngIf="label" [style]="labelStyle">{{ label }}</label>
1738
+ <select
1739
+ [value]="value"
1740
+ (change)="handleChange($event)"
1741
+ [style]="selectStyle"
1742
+ >
1743
+ <option
1744
+ *ngFor="let option of options"
1745
+ [value]="option.value"
1746
+ >
1747
+ {{ option.label }}
1748
+ </option>
1749
+ </select>
1750
+ </div>
1751
+ `,
1752
+ })];
1753
+ let _classDescriptor;
1754
+ let _classExtraInitializers = [];
1755
+ let _classThis;
1756
+ let _options_decorators;
1757
+ let _options_initializers = [];
1758
+ let _options_extraInitializers = [];
1759
+ let _value_decorators;
1760
+ let _value_initializers = [];
1761
+ let _value_extraInitializers = [];
1762
+ let _label_decorators;
1763
+ let _label_initializers = [];
1764
+ let _label_extraInitializers = [];
1765
+ let _sortChange_decorators;
1766
+ let _sortChange_initializers = [];
1767
+ let _sortChange_extraInitializers = [];
1768
+ _classThis = class {
1769
+ constructor(searchContext) {
1770
+ this.searchContext = searchContext;
1771
+ this.options = __runInitializers(this, _options_initializers, []);
1772
+ this.value = (__runInitializers(this, _options_extraInitializers), __runInitializers(this, _value_initializers, ''));
1773
+ this.label = (__runInitializers(this, _value_extraInitializers), __runInitializers(this, _label_initializers, void 0));
1774
+ this.sortChange = (__runInitializers(this, _label_extraInitializers), __runInitializers(this, _sortChange_initializers, new EventEmitter()));
1775
+ __runInitializers(this, _sortChange_extraInitializers);
1776
+ this.searchContext = searchContext;
1777
+ }
1778
+ handleChange(event) {
1779
+ const target = event.target;
1780
+ this.sortChange.emit(target.value);
1781
+ }
1782
+ get containerStyle() {
1783
+ const theme = this.searchContext.theme;
1784
+ return {
1785
+ display: 'flex',
1786
+ alignItems: 'center',
1787
+ gap: theme.spacing.small,
1788
+ };
1789
+ }
1790
+ get labelStyle() {
1791
+ const theme = this.searchContext.theme;
1792
+ return {
1793
+ fontSize: theme.typography.fontSize.medium,
1794
+ color: theme.colors.text,
1795
+ fontWeight: theme.typography.fontWeight?.medium || 500,
1796
+ };
1797
+ }
1798
+ get selectStyle() {
1799
+ const theme = this.searchContext.theme;
1800
+ return {
1801
+ padding: theme.spacing.small,
1802
+ fontSize: theme.typography.fontSize.medium,
1803
+ border: `1px solid ${theme.colors.border}`,
1804
+ borderRadius: typeof theme.borderRadius === 'string'
1805
+ ? theme.borderRadius
1806
+ : theme.borderRadius.medium,
1807
+ backgroundColor: theme.colors.background,
1808
+ color: theme.colors.text,
1809
+ cursor: 'pointer',
1810
+ outline: 'none',
1811
+ };
1812
+ }
1813
+ };
1814
+ __setFunctionName(_classThis, "SortByComponent");
1815
+ (() => {
1816
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
1817
+ _options_decorators = [Input()];
1818
+ _value_decorators = [Input()];
1819
+ _label_decorators = [Input()];
1820
+ _sortChange_decorators = [Output()];
1821
+ __esDecorate(null, null, _options_decorators, { kind: "field", name: "options", static: false, private: false, access: { has: obj => "options" in obj, get: obj => obj.options, set: (obj, value) => { obj.options = value; } }, metadata: _metadata }, _options_initializers, _options_extraInitializers);
1822
+ __esDecorate(null, null, _value_decorators, { kind: "field", name: "value", static: false, private: false, access: { has: obj => "value" in obj, get: obj => obj.value, set: (obj, value) => { obj.value = value; } }, metadata: _metadata }, _value_initializers, _value_extraInitializers);
1823
+ __esDecorate(null, null, _label_decorators, { kind: "field", name: "label", static: false, private: false, access: { has: obj => "label" in obj, get: obj => obj.label, set: (obj, value) => { obj.label = value; } }, metadata: _metadata }, _label_initializers, _label_extraInitializers);
1824
+ __esDecorate(null, null, _sortChange_decorators, { kind: "field", name: "sortChange", static: false, private: false, access: { has: obj => "sortChange" in obj, get: obj => obj.sortChange, set: (obj, value) => { obj.sortChange = value; } }, metadata: _metadata }, _sortChange_initializers, _sortChange_extraInitializers);
1825
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1826
+ _classThis = _classDescriptor.value;
1827
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1828
+ __runInitializers(_classThis, _classExtraInitializers);
1829
+ })();
1830
+ return _classThis;
1831
+ })();
1832
+
1833
+ /**
1834
+ * Facets Component
1835
+ *
1836
+ * Displays facet filters for search results
1837
+ */
1838
+ let FacetsComponent = (() => {
1839
+ let _classDecorators = [Component({
1840
+ selector: 'seekora-facets',
1841
+ template: `
1842
+ <div
1843
+ *ngFor="let facet of facets"
1844
+ [style]="containerStyle"
1845
+ >
1846
+ <h3 [style]="titleStyle">{{ facet.field_name }}</h3>
1847
+ <div
1848
+ *ngFor="let count of visibleCounts(facet); let i = index"
1849
+ [style]="getFacetItemStyle(facet.field_name, count.value)"
1850
+ (click)="handleFacetClick(facet.field_name, count.value)"
1851
+ >
1852
+ <input
1853
+ type="checkbox"
1854
+ [checked]="isSelected(facet.field_name, count.value)"
1855
+ (change)="handleFacetChange(facet.field_name, count.value, !isSelected(facet.field_name, count.value))"
1856
+ [style]="checkboxStyle"
1857
+ />
1858
+ <span [style]="labelStyle">{{ count.value }}</span>
1859
+ <span [style]="countStyle">({{ count.count }})</span>
1860
+ </div>
1861
+ <button
1862
+ *ngIf="facet.counts.length > maxItems"
1863
+ (click)="toggleShowMore(facet.field_name)"
1864
+ [style]="showMoreStyle"
1865
+ >
1866
+ {{ getShowMoreLabel(facet) }}
1867
+ </button>
1868
+ </div>
1869
+ `,
1870
+ })];
1871
+ let _classDescriptor;
1872
+ let _classExtraInitializers = [];
1873
+ let _classThis;
1874
+ let _results_decorators;
1875
+ let _results_initializers = [];
1876
+ let _results_extraInitializers = [];
1877
+ let _maxItems_decorators;
1878
+ let _maxItems_initializers = [];
1879
+ let _maxItems_extraInitializers = [];
1880
+ let _showMore_decorators;
1881
+ let _showMore_initializers = [];
1882
+ let _showMore_extraInitializers = [];
1883
+ let _selectedFacets_decorators;
1884
+ let _selectedFacets_initializers = [];
1885
+ let _selectedFacets_extraInitializers = [];
1886
+ let _facetChange_decorators;
1887
+ let _facetChange_initializers = [];
1888
+ let _facetChange_extraInitializers = [];
1889
+ _classThis = class {
1890
+ constructor(searchContext) {
1891
+ this.searchContext = searchContext;
1892
+ this.results = __runInitializers(this, _results_initializers, void 0);
1893
+ this.maxItems = (__runInitializers(this, _results_extraInitializers), __runInitializers(this, _maxItems_initializers, 5));
1894
+ this.showMore = (__runInitializers(this, _maxItems_extraInitializers), __runInitializers(this, _showMore_initializers, true));
1895
+ this.selectedFacets = (__runInitializers(this, _showMore_extraInitializers), __runInitializers(this, _selectedFacets_initializers, {}));
1896
+ this.facetChange = (__runInitializers(this, _selectedFacets_extraInitializers), __runInitializers(this, _facetChange_initializers, new EventEmitter()));
1897
+ this.expandedFacets = (__runInitializers(this, _facetChange_extraInitializers), {});
1898
+ }
1899
+ get facets() {
1900
+ if (!this.results)
1901
+ return [];
1902
+ const facetsData = this.results.facets || this.results.data?.facets || [];
1903
+ return Array.isArray(facetsData) ? facetsData : [];
1904
+ }
1905
+ visibleCounts(facet) {
1906
+ const isExpanded = this.expandedFacets[facet.field_name];
1907
+ if (isExpanded || !this.showMore) {
1908
+ return facet.counts;
1909
+ }
1910
+ return facet.counts.slice(0, this.maxItems);
1911
+ }
1912
+ isSelected(field, value) {
1913
+ const selected = this.selectedFacets?.[field] || [];
1914
+ return selected.includes(value);
1915
+ }
1916
+ toggleShowMore(field) {
1917
+ this.expandedFacets[field] = !this.expandedFacets[field];
1918
+ }
1919
+ handleFacetClick(field, value) {
1920
+ this.handleFacetChange(field, value, !this.isSelected(field, value));
1921
+ }
1922
+ handleFacetChange(field, value, selected) {
1923
+ this.facetChange.emit({ field, value, selected });
1924
+ }
1925
+ get containerStyle() {
1926
+ const theme = this.searchContext.theme;
1927
+ return {
1928
+ marginBottom: theme.spacing.large,
1929
+ };
1930
+ }
1931
+ get titleStyle() {
1932
+ const theme = this.searchContext.theme;
1933
+ return {
1934
+ fontSize: theme.typography.fontSize.medium,
1935
+ fontWeight: theme.typography.fontWeight?.bold || 700,
1936
+ marginBottom: theme.spacing.small,
1937
+ color: theme.colors.text,
1938
+ };
1939
+ }
1940
+ getFacetItemStyle(field, value) {
1941
+ const theme = this.searchContext.theme;
1942
+ return {
1943
+ display: 'flex',
1944
+ alignItems: 'center',
1945
+ gap: theme.spacing.small,
1946
+ padding: theme.spacing.small,
1947
+ cursor: 'pointer',
1948
+ backgroundColor: this.isSelected(field, value) ? theme.colors.hover : 'transparent',
1949
+ borderRadius: typeof theme.borderRadius === 'string'
1950
+ ? theme.borderRadius
1951
+ : theme.borderRadius.small,
1952
+ };
1953
+ }
1954
+ get checkboxStyle() {
1955
+ return {
1956
+ cursor: 'pointer',
1957
+ };
1958
+ }
1959
+ get labelStyle() {
1960
+ const theme = this.searchContext.theme;
1961
+ return {
1962
+ flex: 1,
1963
+ fontSize: theme.typography.fontSize.small,
1964
+ color: theme.colors.text,
1965
+ };
1966
+ }
1967
+ get countStyle() {
1968
+ const theme = this.searchContext.theme;
1969
+ return {
1970
+ fontSize: theme.typography.fontSize.small,
1971
+ color: theme.colors.textSecondary || theme.colors.text,
1972
+ opacity: 0.7,
1973
+ };
1974
+ }
1975
+ get showMoreStyle() {
1976
+ const theme = this.searchContext.theme;
1977
+ return {
1978
+ marginTop: theme.spacing.small,
1979
+ padding: theme.spacing.small,
1980
+ backgroundColor: 'transparent',
1981
+ border: 'none',
1982
+ color: theme.colors.primary,
1983
+ cursor: 'pointer',
1984
+ fontSize: theme.typography.fontSize.small,
1985
+ textDecoration: 'underline',
1986
+ };
1987
+ }
1988
+ isExpanded(field) {
1989
+ return this.expandedFacets[field] || false;
1990
+ }
1991
+ getShowMoreLabel(facet) {
1992
+ if (this.isExpanded(facet.field_name)) {
1993
+ return 'Show Less';
1994
+ }
1995
+ return `Show More (${facet.counts.length - this.maxItems})`;
1996
+ }
1997
+ };
1998
+ __setFunctionName(_classThis, "FacetsComponent");
1999
+ (() => {
2000
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
2001
+ _results_decorators = [Input()];
2002
+ _maxItems_decorators = [Input()];
2003
+ _showMore_decorators = [Input()];
2004
+ _selectedFacets_decorators = [Input()];
2005
+ _facetChange_decorators = [Output()];
2006
+ __esDecorate(null, null, _results_decorators, { kind: "field", name: "results", static: false, private: false, access: { has: obj => "results" in obj, get: obj => obj.results, set: (obj, value) => { obj.results = value; } }, metadata: _metadata }, _results_initializers, _results_extraInitializers);
2007
+ __esDecorate(null, null, _maxItems_decorators, { kind: "field", name: "maxItems", static: false, private: false, access: { has: obj => "maxItems" in obj, get: obj => obj.maxItems, set: (obj, value) => { obj.maxItems = value; } }, metadata: _metadata }, _maxItems_initializers, _maxItems_extraInitializers);
2008
+ __esDecorate(null, null, _showMore_decorators, { kind: "field", name: "showMore", static: false, private: false, access: { has: obj => "showMore" in obj, get: obj => obj.showMore, set: (obj, value) => { obj.showMore = value; } }, metadata: _metadata }, _showMore_initializers, _showMore_extraInitializers);
2009
+ __esDecorate(null, null, _selectedFacets_decorators, { kind: "field", name: "selectedFacets", static: false, private: false, access: { has: obj => "selectedFacets" in obj, get: obj => obj.selectedFacets, set: (obj, value) => { obj.selectedFacets = value; } }, metadata: _metadata }, _selectedFacets_initializers, _selectedFacets_extraInitializers);
2010
+ __esDecorate(null, null, _facetChange_decorators, { kind: "field", name: "facetChange", static: false, private: false, access: { has: obj => "facetChange" in obj, get: obj => obj.facetChange, set: (obj, value) => { obj.facetChange = value; } }, metadata: _metadata }, _facetChange_initializers, _facetChange_extraInitializers);
2011
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2012
+ _classThis = _classDescriptor.value;
2013
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2014
+ __runInitializers(_classThis, _classExtraInitializers);
2015
+ })();
2016
+ return _classThis;
2017
+ })();
2018
+
2019
+ /**
2020
+ * CurrentRefinements Component
2021
+ *
2022
+ * Displays currently active filters/refinements with ability to clear them
2023
+ */
2024
+ let CurrentRefinementsComponent = (() => {
2025
+ let _classDecorators = [Component({
2026
+ selector: 'seekora-current-refinements',
2027
+ template: `
2028
+ <div *ngIf="refinements.length > 0" [style]="containerStyle">
2029
+ <div *ngIf="showLabel" [style]="labelStyle">{{ label }}</div>
2030
+ <div [style]="refinementsStyle">
2031
+ <div
2032
+ *ngFor="let refinement of refinements; let i = index"
2033
+ [style]="refinementStyle"
2034
+ >
2035
+ <span [style]="refinementTextStyle">
2036
+ {{ getRefinementLabel(refinement) }}
2037
+ </span>
2038
+ <button
2039
+ (click)="handleClear(refinement.field, refinement.value)"
2040
+ [style]="clearButtonStyle"
2041
+ >
2042
+ ×
2043
+ </button>
2044
+ </div>
2045
+ <button
2046
+ *ngIf="showClearAll"
2047
+ (click)="handleClearAll()"
2048
+ [style]="clearAllStyle"
2049
+ >
2050
+ Clear All
2051
+ </button>
2052
+ </div>
2053
+ </div>
2054
+ `,
2055
+ })];
2056
+ let _classDescriptor;
2057
+ let _classExtraInitializers = [];
2058
+ let _classThis;
2059
+ let _refinements_decorators;
2060
+ let _refinements_initializers = [];
2061
+ let _refinements_extraInitializers = [];
2062
+ let _showLabel_decorators;
2063
+ let _showLabel_initializers = [];
2064
+ let _showLabel_extraInitializers = [];
2065
+ let _label_decorators;
2066
+ let _label_initializers = [];
2067
+ let _label_extraInitializers = [];
2068
+ let _showClearAll_decorators;
2069
+ let _showClearAll_initializers = [];
2070
+ let _showClearAll_extraInitializers = [];
2071
+ let _refinementClear_decorators;
2072
+ let _refinementClear_initializers = [];
2073
+ let _refinementClear_extraInitializers = [];
2074
+ let _clearAll_decorators;
2075
+ let _clearAll_initializers = [];
2076
+ let _clearAll_extraInitializers = [];
2077
+ _classThis = class {
2078
+ constructor(searchContext) {
2079
+ this.searchContext = searchContext;
2080
+ this.refinements = __runInitializers(this, _refinements_initializers, []);
2081
+ this.showLabel = (__runInitializers(this, _refinements_extraInitializers), __runInitializers(this, _showLabel_initializers, true));
2082
+ this.label = (__runInitializers(this, _showLabel_extraInitializers), __runInitializers(this, _label_initializers, 'Active Filters'));
2083
+ this.showClearAll = (__runInitializers(this, _label_extraInitializers), __runInitializers(this, _showClearAll_initializers, true));
2084
+ this.refinementClear = (__runInitializers(this, _showClearAll_extraInitializers), __runInitializers(this, _refinementClear_initializers, new EventEmitter()));
2085
+ this.clearAll = (__runInitializers(this, _refinementClear_extraInitializers), __runInitializers(this, _clearAll_initializers, new EventEmitter()));
2086
+ __runInitializers(this, _clearAll_extraInitializers);
2087
+ this.searchContext = searchContext;
2088
+ }
2089
+ getRefinementLabel(refinement) {
2090
+ if (refinement.label)
2091
+ return refinement.label;
2092
+ return `${refinement.field}: ${refinement.value}`;
2093
+ }
2094
+ handleClear(field, value) {
2095
+ this.refinementClear.emit({ field, value });
2096
+ }
2097
+ handleClearAll() {
2098
+ this.clearAll.emit();
2099
+ }
2100
+ get containerStyle() {
2101
+ const theme = this.searchContext.theme;
2102
+ return {
2103
+ marginBottom: theme.spacing.medium,
2104
+ };
2105
+ }
2106
+ get labelStyle() {
2107
+ const theme = this.searchContext.theme;
2108
+ return {
2109
+ fontSize: theme.typography.fontSize.medium,
2110
+ fontWeight: theme.typography.fontWeight?.semibold || 600,
2111
+ marginBottom: theme.spacing.small,
2112
+ color: theme.colors.text,
2113
+ };
2114
+ }
2115
+ get refinementsStyle() {
2116
+ const theme = this.searchContext.theme;
2117
+ return {
2118
+ display: 'flex',
2119
+ flexWrap: 'wrap',
2120
+ gap: theme.spacing.small,
2121
+ alignItems: 'center',
2122
+ };
2123
+ }
2124
+ get refinementStyle() {
2125
+ const theme = this.searchContext.theme;
2126
+ return {
2127
+ display: 'flex',
2128
+ alignItems: 'center',
2129
+ gap: theme.spacing.small,
2130
+ padding: `${theme.spacing.small} ${theme.spacing.medium}`,
2131
+ backgroundColor: theme.colors.hover,
2132
+ border: `1px solid ${theme.colors.border}`,
2133
+ borderRadius: typeof theme.borderRadius === 'string'
2134
+ ? theme.borderRadius
2135
+ : theme.borderRadius.medium,
2136
+ };
2137
+ }
2138
+ get refinementTextStyle() {
2139
+ const theme = this.searchContext.theme;
2140
+ return {
2141
+ fontSize: theme.typography.fontSize.small,
2142
+ color: theme.colors.text,
2143
+ };
2144
+ }
2145
+ get clearButtonStyle() {
2146
+ const theme = this.searchContext.theme;
2147
+ return {
2148
+ backgroundColor: 'transparent',
2149
+ border: 'none',
2150
+ color: theme.colors.text,
2151
+ cursor: 'pointer',
2152
+ fontSize: theme.typography.fontSize.large,
2153
+ lineHeight: 1,
2154
+ padding: 0,
2155
+ marginLeft: theme.spacing.small,
2156
+ };
2157
+ }
2158
+ get clearAllStyle() {
2159
+ const theme = this.searchContext.theme;
2160
+ return {
2161
+ padding: `${theme.spacing.small} ${theme.spacing.medium}`,
2162
+ backgroundColor: theme.colors.primary,
2163
+ color: '#fff',
2164
+ border: 'none',
2165
+ borderRadius: typeof theme.borderRadius === 'string'
2166
+ ? theme.borderRadius
2167
+ : theme.borderRadius.medium,
2168
+ cursor: 'pointer',
2169
+ fontSize: theme.typography.fontSize.small,
2170
+ fontWeight: theme.typography.fontWeight?.medium || 500,
2171
+ };
2172
+ }
2173
+ };
2174
+ __setFunctionName(_classThis, "CurrentRefinementsComponent");
2175
+ (() => {
2176
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
2177
+ _refinements_decorators = [Input()];
2178
+ _showLabel_decorators = [Input()];
2179
+ _label_decorators = [Input()];
2180
+ _showClearAll_decorators = [Input()];
2181
+ _refinementClear_decorators = [Output()];
2182
+ _clearAll_decorators = [Output()];
2183
+ __esDecorate(null, null, _refinements_decorators, { kind: "field", name: "refinements", static: false, private: false, access: { has: obj => "refinements" in obj, get: obj => obj.refinements, set: (obj, value) => { obj.refinements = value; } }, metadata: _metadata }, _refinements_initializers, _refinements_extraInitializers);
2184
+ __esDecorate(null, null, _showLabel_decorators, { kind: "field", name: "showLabel", static: false, private: false, access: { has: obj => "showLabel" in obj, get: obj => obj.showLabel, set: (obj, value) => { obj.showLabel = value; } }, metadata: _metadata }, _showLabel_initializers, _showLabel_extraInitializers);
2185
+ __esDecorate(null, null, _label_decorators, { kind: "field", name: "label", static: false, private: false, access: { has: obj => "label" in obj, get: obj => obj.label, set: (obj, value) => { obj.label = value; } }, metadata: _metadata }, _label_initializers, _label_extraInitializers);
2186
+ __esDecorate(null, null, _showClearAll_decorators, { kind: "field", name: "showClearAll", static: false, private: false, access: { has: obj => "showClearAll" in obj, get: obj => obj.showClearAll, set: (obj, value) => { obj.showClearAll = value; } }, metadata: _metadata }, _showClearAll_initializers, _showClearAll_extraInitializers);
2187
+ __esDecorate(null, null, _refinementClear_decorators, { kind: "field", name: "refinementClear", static: false, private: false, access: { has: obj => "refinementClear" in obj, get: obj => obj.refinementClear, set: (obj, value) => { obj.refinementClear = value; } }, metadata: _metadata }, _refinementClear_initializers, _refinementClear_extraInitializers);
2188
+ __esDecorate(null, null, _clearAll_decorators, { kind: "field", name: "clearAll", static: false, private: false, access: { has: obj => "clearAll" in obj, get: obj => obj.clearAll, set: (obj, value) => { obj.clearAll = value; } }, metadata: _metadata }, _clearAll_initializers, _clearAll_extraInitializers);
2189
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2190
+ _classThis = _classDescriptor.value;
2191
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2192
+ __runInitializers(_classThis, _classExtraInitializers);
2193
+ })();
2194
+ return _classThis;
2195
+ })();
2196
+
2197
+ /**
2198
+ * RangeInput Component
2199
+ *
2200
+ * Displays a range input for filtering numeric values (e.g., price range)
2201
+ */
2202
+ let RangeInputComponent = (() => {
2203
+ let _classDecorators = [Component({
2204
+ selector: 'seekora-range-input',
2205
+ template: `
2206
+ <div [style]="getContainerStyle()">
2207
+ <label *ngIf="label" [style]="getLabelStyle()">
2208
+ {{ label }}
2209
+ </label>
2210
+ <div [style]="getInputGroupStyle()">
2211
+ <input
2212
+ type="number"
2213
+ [min]="min"
2214
+ [max]="max"
2215
+ [step]="step"
2216
+ [value]="currentMin !== undefined ? currentMin : ''"
2217
+ (input)="onMinChange($event)"
2218
+ [placeholder]="placeholder?.min || 'Min'"
2219
+ [style]="getInputStyle()"
2220
+ />
2221
+ <span [style]="getSeparatorStyle()">to</span>
2222
+ <input
2223
+ type="number"
2224
+ [min]="min"
2225
+ [max]="max"
2226
+ [step]="step"
2227
+ [value]="currentMax !== undefined ? currentMax : ''"
2228
+ (input)="onMaxChange($event)"
2229
+ [placeholder]="placeholder?.max || 'Max'"
2230
+ [style]="getInputStyle()"
2231
+ />
2232
+ <button
2233
+ *ngIf="showApplyButton"
2234
+ type="button"
2235
+ (click)="onApply()"
2236
+ [style]="getApplyButtonStyle()"
2237
+ >
2238
+ Apply
2239
+ </button>
2240
+ <button
2241
+ *ngIf="hasValue()"
2242
+ type="button"
2243
+ (click)="onReset()"
2244
+ [style]="getResetButtonStyle()"
2245
+ >
2246
+ Reset
2247
+ </button>
2248
+ </div>
2249
+ </div>
2250
+ `,
2251
+ })];
2252
+ let _classDescriptor;
2253
+ let _classExtraInitializers = [];
2254
+ let _classThis;
2255
+ let _field_decorators;
2256
+ let _field_initializers = [];
2257
+ let _field_extraInitializers = [];
2258
+ let _label_decorators;
2259
+ let _label_initializers = [];
2260
+ let _label_extraInitializers = [];
2261
+ let _min_decorators;
2262
+ let _min_initializers = [];
2263
+ let _min_extraInitializers = [];
2264
+ let _max_decorators;
2265
+ let _max_initializers = [];
2266
+ let _max_extraInitializers = [];
2267
+ let _step_decorators;
2268
+ let _step_initializers = [];
2269
+ let _step_extraInitializers = [];
2270
+ let _currentMin_decorators;
2271
+ let _currentMin_initializers = [];
2272
+ let _currentMin_extraInitializers = [];
2273
+ let _currentMax_decorators;
2274
+ let _currentMax_initializers = [];
2275
+ let _currentMax_extraInitializers = [];
2276
+ let _showApplyButton_decorators;
2277
+ let _showApplyButton_initializers = [];
2278
+ let _showApplyButton_extraInitializers = [];
2279
+ let _placeholder_decorators;
2280
+ let _placeholder_initializers = [];
2281
+ let _placeholder_extraInitializers = [];
2282
+ let _className_decorators;
2283
+ let _className_initializers = [];
2284
+ let _className_extraInitializers = [];
2285
+ let _style_decorators;
2286
+ let _style_initializers = [];
2287
+ let _style_extraInitializers = [];
2288
+ let _rangeChange_decorators;
2289
+ let _rangeChange_initializers = [];
2290
+ let _rangeChange_extraInitializers = [];
2291
+ _classThis = class {
2292
+ constructor(searchContext) {
2293
+ this.searchContext = searchContext;
2294
+ this.field = __runInitializers(this, _field_initializers, void 0);
2295
+ this.label = (__runInitializers(this, _field_extraInitializers), __runInitializers(this, _label_initializers, void 0));
2296
+ this.min = (__runInitializers(this, _label_extraInitializers), __runInitializers(this, _min_initializers, void 0));
2297
+ this.max = (__runInitializers(this, _min_extraInitializers), __runInitializers(this, _max_initializers, void 0));
2298
+ this.step = (__runInitializers(this, _max_extraInitializers), __runInitializers(this, _step_initializers, 1));
2299
+ this.currentMin = (__runInitializers(this, _step_extraInitializers), __runInitializers(this, _currentMin_initializers, void 0));
2300
+ this.currentMax = (__runInitializers(this, _currentMin_extraInitializers), __runInitializers(this, _currentMax_initializers, void 0));
2301
+ this.showApplyButton = (__runInitializers(this, _currentMax_extraInitializers), __runInitializers(this, _showApplyButton_initializers, true));
2302
+ this.placeholder = (__runInitializers(this, _showApplyButton_extraInitializers), __runInitializers(this, _placeholder_initializers, void 0));
2303
+ this.className = (__runInitializers(this, _placeholder_extraInitializers), __runInitializers(this, _className_initializers, void 0));
2304
+ this.style = (__runInitializers(this, _className_extraInitializers), __runInitializers(this, _style_initializers, void 0));
2305
+ this.rangeChange = (__runInitializers(this, _style_extraInitializers), __runInitializers(this, _rangeChange_initializers, new EventEmitter()));
2306
+ this.internalMin = __runInitializers(this, _rangeChange_extraInitializers);
2307
+ }
2308
+ ngOnInit() {
2309
+ this.internalMin = this.currentMin;
2310
+ this.internalMax = this.currentMax;
2311
+ this.appliedMin = this.currentMin;
2312
+ this.appliedMax = this.currentMax;
2313
+ }
2314
+ get theme() {
2315
+ return this.searchContext.theme;
2316
+ }
2317
+ get effectiveMin() {
2318
+ return this.currentMin !== undefined ? this.currentMin : this.internalMin;
2319
+ }
2320
+ get effectiveMax() {
2321
+ return this.currentMax !== undefined ? this.currentMax : this.internalMax;
2322
+ }
2323
+ hasValue() {
2324
+ return this.effectiveMin !== undefined || this.effectiveMax !== undefined;
2325
+ }
2326
+ onMinChange(event) {
2327
+ const target = event.target;
2328
+ const value = target.value === '' ? undefined : parseFloat(target.value);
2329
+ this.internalMin = value;
2330
+ if (!this.showApplyButton) {
2331
+ this.rangeChange.emit({ min: value, max: this.effectiveMax });
2332
+ }
2333
+ }
2334
+ onMaxChange(event) {
2335
+ const target = event.target;
2336
+ const value = target.value === '' ? undefined : parseFloat(target.value);
2337
+ this.internalMax = value;
2338
+ if (!this.showApplyButton) {
2339
+ this.rangeChange.emit({ min: this.effectiveMin, max: value });
2340
+ }
2341
+ }
2342
+ onApply() {
2343
+ this.appliedMin = this.internalMin;
2344
+ this.appliedMax = this.internalMax;
2345
+ this.rangeChange.emit({ min: this.internalMin, max: this.internalMax });
2346
+ }
2347
+ onReset() {
2348
+ this.internalMin = undefined;
2349
+ this.internalMax = undefined;
2350
+ this.appliedMin = undefined;
2351
+ this.appliedMax = undefined;
2352
+ this.rangeChange.emit({ min: undefined, max: undefined });
2353
+ }
2354
+ getContainerStyle() {
2355
+ return {
2356
+ ...this.style,
2357
+ };
2358
+ }
2359
+ getLabelStyle() {
2360
+ return {
2361
+ fontSize: this.theme.typography.fontSize.medium,
2362
+ color: this.theme.colors.text,
2363
+ fontWeight: this.theme.typography.fontWeight?.medium || 500,
2364
+ marginBottom: this.theme.spacing.small,
2365
+ display: 'block',
2366
+ };
2367
+ }
2368
+ getInputGroupStyle() {
2369
+ return {
2370
+ display: 'flex',
2371
+ alignItems: 'center',
2372
+ gap: this.theme.spacing.small,
2373
+ flexWrap: 'wrap',
2374
+ };
2375
+ }
2376
+ getInputStyle() {
2377
+ const borderRadius = typeof this.theme.borderRadius === 'string'
2378
+ ? this.theme.borderRadius
2379
+ : this.theme.borderRadius.medium;
2380
+ return {
2381
+ padding: this.theme.spacing.small,
2382
+ fontSize: this.theme.typography.fontSize.medium,
2383
+ border: `1px solid ${this.theme.colors.border}`,
2384
+ borderRadius,
2385
+ backgroundColor: this.theme.colors.background,
2386
+ color: this.theme.colors.text,
2387
+ outline: 'none',
2388
+ flex: 1,
2389
+ minWidth: '80px',
2390
+ };
2391
+ }
2392
+ getSeparatorStyle() {
2393
+ return {
2394
+ color: this.theme.colors.textSecondary || this.theme.colors.text,
2395
+ fontSize: this.theme.typography.fontSize.medium,
2396
+ };
2397
+ }
2398
+ getApplyButtonStyle() {
2399
+ const borderRadius = typeof this.theme.borderRadius === 'string'
2400
+ ? this.theme.borderRadius
2401
+ : this.theme.borderRadius.medium;
2402
+ return {
2403
+ padding: `${this.theme.spacing.small} ${this.theme.spacing.medium}`,
2404
+ fontSize: this.theme.typography.fontSize.medium,
2405
+ backgroundColor: this.theme.colors.primary,
2406
+ color: '#ffffff',
2407
+ border: 'none',
2408
+ borderRadius,
2409
+ cursor: 'pointer',
2410
+ transition: this.theme.transitions?.fast || '150ms ease-in-out',
2411
+ };
2412
+ }
2413
+ getResetButtonStyle() {
2414
+ const borderRadius = typeof this.theme.borderRadius === 'string'
2415
+ ? this.theme.borderRadius
2416
+ : this.theme.borderRadius.medium;
2417
+ return {
2418
+ padding: `${this.theme.spacing.small} ${this.theme.spacing.medium}`,
2419
+ fontSize: this.theme.typography.fontSize.medium,
2420
+ backgroundColor: 'transparent',
2421
+ color: this.theme.colors.text,
2422
+ border: `1px solid ${this.theme.colors.border}`,
2423
+ borderRadius,
2424
+ cursor: 'pointer',
2425
+ transition: this.theme.transitions?.fast || '150ms ease-in-out',
2426
+ };
2427
+ }
2428
+ };
2429
+ __setFunctionName(_classThis, "RangeInputComponent");
2430
+ (() => {
2431
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
2432
+ _field_decorators = [Input()];
2433
+ _label_decorators = [Input()];
2434
+ _min_decorators = [Input()];
2435
+ _max_decorators = [Input()];
2436
+ _step_decorators = [Input()];
2437
+ _currentMin_decorators = [Input()];
2438
+ _currentMax_decorators = [Input()];
2439
+ _showApplyButton_decorators = [Input()];
2440
+ _placeholder_decorators = [Input()];
2441
+ _className_decorators = [Input()];
2442
+ _style_decorators = [Input()];
2443
+ _rangeChange_decorators = [Output()];
2444
+ __esDecorate(null, null, _field_decorators, { kind: "field", name: "field", static: false, private: false, access: { has: obj => "field" in obj, get: obj => obj.field, set: (obj, value) => { obj.field = value; } }, metadata: _metadata }, _field_initializers, _field_extraInitializers);
2445
+ __esDecorate(null, null, _label_decorators, { kind: "field", name: "label", static: false, private: false, access: { has: obj => "label" in obj, get: obj => obj.label, set: (obj, value) => { obj.label = value; } }, metadata: _metadata }, _label_initializers, _label_extraInitializers);
2446
+ __esDecorate(null, null, _min_decorators, { kind: "field", name: "min", static: false, private: false, access: { has: obj => "min" in obj, get: obj => obj.min, set: (obj, value) => { obj.min = value; } }, metadata: _metadata }, _min_initializers, _min_extraInitializers);
2447
+ __esDecorate(null, null, _max_decorators, { kind: "field", name: "max", static: false, private: false, access: { has: obj => "max" in obj, get: obj => obj.max, set: (obj, value) => { obj.max = value; } }, metadata: _metadata }, _max_initializers, _max_extraInitializers);
2448
+ __esDecorate(null, null, _step_decorators, { kind: "field", name: "step", static: false, private: false, access: { has: obj => "step" in obj, get: obj => obj.step, set: (obj, value) => { obj.step = value; } }, metadata: _metadata }, _step_initializers, _step_extraInitializers);
2449
+ __esDecorate(null, null, _currentMin_decorators, { kind: "field", name: "currentMin", static: false, private: false, access: { has: obj => "currentMin" in obj, get: obj => obj.currentMin, set: (obj, value) => { obj.currentMin = value; } }, metadata: _metadata }, _currentMin_initializers, _currentMin_extraInitializers);
2450
+ __esDecorate(null, null, _currentMax_decorators, { kind: "field", name: "currentMax", static: false, private: false, access: { has: obj => "currentMax" in obj, get: obj => obj.currentMax, set: (obj, value) => { obj.currentMax = value; } }, metadata: _metadata }, _currentMax_initializers, _currentMax_extraInitializers);
2451
+ __esDecorate(null, null, _showApplyButton_decorators, { kind: "field", name: "showApplyButton", static: false, private: false, access: { has: obj => "showApplyButton" in obj, get: obj => obj.showApplyButton, set: (obj, value) => { obj.showApplyButton = value; } }, metadata: _metadata }, _showApplyButton_initializers, _showApplyButton_extraInitializers);
2452
+ __esDecorate(null, null, _placeholder_decorators, { kind: "field", name: "placeholder", static: false, private: false, access: { has: obj => "placeholder" in obj, get: obj => obj.placeholder, set: (obj, value) => { obj.placeholder = value; } }, metadata: _metadata }, _placeholder_initializers, _placeholder_extraInitializers);
2453
+ __esDecorate(null, null, _className_decorators, { kind: "field", name: "className", static: false, private: false, access: { has: obj => "className" in obj, get: obj => obj.className, set: (obj, value) => { obj.className = value; } }, metadata: _metadata }, _className_initializers, _className_extraInitializers);
2454
+ __esDecorate(null, null, _style_decorators, { kind: "field", name: "style", static: false, private: false, access: { has: obj => "style" in obj, get: obj => obj.style, set: (obj, value) => { obj.style = value; } }, metadata: _metadata }, _style_initializers, _style_extraInitializers);
2455
+ __esDecorate(null, null, _rangeChange_decorators, { kind: "field", name: "rangeChange", static: false, private: false, access: { has: obj => "rangeChange" in obj, get: obj => obj.rangeChange, set: (obj, value) => { obj.rangeChange = value; } }, metadata: _metadata }, _rangeChange_initializers, _rangeChange_extraInitializers);
2456
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2457
+ _classThis = _classDescriptor.value;
2458
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2459
+ __runInitializers(_classThis, _classExtraInitializers);
2460
+ })();
2461
+ return _classThis;
2462
+ })();
2463
+
2464
+ /**
2465
+ * SearchLayout Component
2466
+ *
2467
+ * Provides a layout structure for search interfaces with sidebar and main content
2468
+ */
2469
+ let SearchLayoutComponent = (() => {
2470
+ let _classDecorators = [Component({
2471
+ selector: 'seekora-search-layout',
2472
+ template: `
2473
+ <div [style]="getContainerStyle()">
2474
+ <header
2475
+ *ngIf="header || headerTemplate"
2476
+ [style]="getHeaderStyle()"
2477
+ >
2478
+ <ng-container *ngTemplateOutlet="headerTemplate || defaultHeaderTemplate"></ng-container>
2479
+ <ng-template #defaultHeaderTemplate>
2480
+ <ng-content select="[header]"></ng-content>
2481
+ </ng-template>
2482
+ </header>
2483
+
2484
+ <div [style]="getContentStyle()">
2485
+ <aside
2486
+ *ngIf="sidebar || sidebarTemplate"
2487
+ [style]="getSidebarStyle()"
2488
+ [class]="getSidebarClass()"
2489
+ >
2490
+ <ng-container *ngTemplateOutlet="sidebarTemplate || defaultSidebarTemplate"></ng-container>
2491
+ <ng-template #defaultSidebarTemplate>
2492
+ <ng-content select="[sidebar]"></ng-content>
2493
+ </ng-template>
2494
+ </aside>
2495
+
2496
+ <main [style]="getMainStyle()">
2497
+ <ng-content></ng-content>
2498
+ </main>
2499
+ </div>
2500
+
2501
+ <footer
2502
+ *ngIf="footer || footerTemplate"
2503
+ [style]="getFooterStyle()"
2504
+ >
2505
+ <ng-container *ngTemplateOutlet="footerTemplate || defaultFooterTemplate"></ng-container>
2506
+ <ng-template #defaultFooterTemplate>
2507
+ <ng-content select="[footer]"></ng-content>
2508
+ </ng-template>
2509
+ </footer>
2510
+ </div>
2511
+ `,
2512
+ styles: [`
2513
+ @media (max-width: 768px) {
2514
+ .search-layout-sidebar-hidden-mobile {
2515
+ display: none;
2516
+ }
2517
+ }
2518
+ `]
2519
+ })];
2520
+ let _classDescriptor;
2521
+ let _classExtraInitializers = [];
2522
+ let _classThis;
2523
+ let _sidebar_decorators;
2524
+ let _sidebar_initializers = [];
2525
+ let _sidebar_extraInitializers = [];
2526
+ let _header_decorators;
2527
+ let _header_initializers = [];
2528
+ let _header_extraInitializers = [];
2529
+ let _footer_decorators;
2530
+ let _footer_initializers = [];
2531
+ let _footer_extraInitializers = [];
2532
+ let _sidebarWidth_decorators;
2533
+ let _sidebarWidth_initializers = [];
2534
+ let _sidebarWidth_extraInitializers = [];
2535
+ let _showSidebarOnMobile_decorators;
2536
+ let _showSidebarOnMobile_initializers = [];
2537
+ let _showSidebarOnMobile_extraInitializers = [];
2538
+ let _className_decorators;
2539
+ let _className_initializers = [];
2540
+ let _className_extraInitializers = [];
2541
+ let _style_decorators;
2542
+ let _style_initializers = [];
2543
+ let _style_extraInitializers = [];
2544
+ let _headerTemplate_decorators;
2545
+ let _headerTemplate_initializers = [];
2546
+ let _headerTemplate_extraInitializers = [];
2547
+ let _sidebarTemplate_decorators;
2548
+ let _sidebarTemplate_initializers = [];
2549
+ let _sidebarTemplate_extraInitializers = [];
2550
+ let _footerTemplate_decorators;
2551
+ let _footerTemplate_initializers = [];
2552
+ let _footerTemplate_extraInitializers = [];
2553
+ _classThis = class {
2554
+ constructor(searchContext) {
2555
+ this.searchContext = searchContext;
2556
+ this.sidebar = __runInitializers(this, _sidebar_initializers, void 0);
2557
+ this.header = (__runInitializers(this, _sidebar_extraInitializers), __runInitializers(this, _header_initializers, void 0));
2558
+ this.footer = (__runInitializers(this, _header_extraInitializers), __runInitializers(this, _footer_initializers, void 0));
2559
+ this.sidebarWidth = (__runInitializers(this, _footer_extraInitializers), __runInitializers(this, _sidebarWidth_initializers, '300px'));
2560
+ this.showSidebarOnMobile = (__runInitializers(this, _sidebarWidth_extraInitializers), __runInitializers(this, _showSidebarOnMobile_initializers, false));
2561
+ this.className = (__runInitializers(this, _showSidebarOnMobile_extraInitializers), __runInitializers(this, _className_initializers, void 0));
2562
+ this.style = (__runInitializers(this, _className_extraInitializers), __runInitializers(this, _style_initializers, void 0));
2563
+ this.headerTemplate = (__runInitializers(this, _style_extraInitializers), __runInitializers(this, _headerTemplate_initializers, void 0));
2564
+ this.sidebarTemplate = (__runInitializers(this, _headerTemplate_extraInitializers), __runInitializers(this, _sidebarTemplate_initializers, void 0));
2565
+ this.footerTemplate = (__runInitializers(this, _sidebarTemplate_extraInitializers), __runInitializers(this, _footerTemplate_initializers, void 0));
2566
+ __runInitializers(this, _footerTemplate_extraInitializers);
2567
+ this.searchContext = searchContext;
2568
+ }
2569
+ get theme() {
2570
+ return this.searchContext.theme;
2571
+ }
2572
+ getContainerStyle() {
2573
+ return {
2574
+ display: 'flex',
2575
+ flexDirection: 'column',
2576
+ minHeight: '100vh',
2577
+ backgroundColor: this.theme.colors.background,
2578
+ ...this.style,
2579
+ };
2580
+ }
2581
+ getHeaderStyle() {
2582
+ return {
2583
+ padding: this.theme.spacing.medium,
2584
+ borderBottom: `1px solid ${this.theme.colors.border}`,
2585
+ backgroundColor: this.theme.colors.background,
2586
+ };
2587
+ }
2588
+ getContentStyle() {
2589
+ return {
2590
+ display: 'flex',
2591
+ flex: 1,
2592
+ gap: this.theme.spacing.large,
2593
+ padding: this.theme.spacing.medium,
2594
+ };
2595
+ }
2596
+ getSidebarStyle() {
2597
+ return {
2598
+ width: this.sidebarWidth,
2599
+ minWidth: this.sidebarWidth,
2600
+ };
2601
+ }
2602
+ getSidebarClass() {
2603
+ return this.showSidebarOnMobile ? '' : 'search-layout-sidebar-hidden-mobile';
2604
+ }
2605
+ getMainStyle() {
2606
+ return {
2607
+ flex: 1,
2608
+ minWidth: 0,
2609
+ };
2610
+ }
2611
+ getFooterStyle() {
2612
+ return {
2613
+ padding: this.theme.spacing.medium,
2614
+ borderTop: `1px solid ${this.theme.colors.border}`,
2615
+ backgroundColor: this.theme.colors.background,
2616
+ };
2617
+ }
2618
+ };
2619
+ __setFunctionName(_classThis, "SearchLayoutComponent");
2620
+ (() => {
2621
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
2622
+ _sidebar_decorators = [Input()];
2623
+ _header_decorators = [Input()];
2624
+ _footer_decorators = [Input()];
2625
+ _sidebarWidth_decorators = [Input()];
2626
+ _showSidebarOnMobile_decorators = [Input()];
2627
+ _className_decorators = [Input()];
2628
+ _style_decorators = [Input()];
2629
+ _headerTemplate_decorators = [ContentChild('headerTemplate')];
2630
+ _sidebarTemplate_decorators = [ContentChild('sidebarTemplate')];
2631
+ _footerTemplate_decorators = [ContentChild('footerTemplate')];
2632
+ __esDecorate(null, null, _sidebar_decorators, { kind: "field", name: "sidebar", static: false, private: false, access: { has: obj => "sidebar" in obj, get: obj => obj.sidebar, set: (obj, value) => { obj.sidebar = value; } }, metadata: _metadata }, _sidebar_initializers, _sidebar_extraInitializers);
2633
+ __esDecorate(null, null, _header_decorators, { kind: "field", name: "header", static: false, private: false, access: { has: obj => "header" in obj, get: obj => obj.header, set: (obj, value) => { obj.header = value; } }, metadata: _metadata }, _header_initializers, _header_extraInitializers);
2634
+ __esDecorate(null, null, _footer_decorators, { kind: "field", name: "footer", static: false, private: false, access: { has: obj => "footer" in obj, get: obj => obj.footer, set: (obj, value) => { obj.footer = value; } }, metadata: _metadata }, _footer_initializers, _footer_extraInitializers);
2635
+ __esDecorate(null, null, _sidebarWidth_decorators, { kind: "field", name: "sidebarWidth", static: false, private: false, access: { has: obj => "sidebarWidth" in obj, get: obj => obj.sidebarWidth, set: (obj, value) => { obj.sidebarWidth = value; } }, metadata: _metadata }, _sidebarWidth_initializers, _sidebarWidth_extraInitializers);
2636
+ __esDecorate(null, null, _showSidebarOnMobile_decorators, { kind: "field", name: "showSidebarOnMobile", static: false, private: false, access: { has: obj => "showSidebarOnMobile" in obj, get: obj => obj.showSidebarOnMobile, set: (obj, value) => { obj.showSidebarOnMobile = value; } }, metadata: _metadata }, _showSidebarOnMobile_initializers, _showSidebarOnMobile_extraInitializers);
2637
+ __esDecorate(null, null, _className_decorators, { kind: "field", name: "className", static: false, private: false, access: { has: obj => "className" in obj, get: obj => obj.className, set: (obj, value) => { obj.className = value; } }, metadata: _metadata }, _className_initializers, _className_extraInitializers);
2638
+ __esDecorate(null, null, _style_decorators, { kind: "field", name: "style", static: false, private: false, access: { has: obj => "style" in obj, get: obj => obj.style, set: (obj, value) => { obj.style = value; } }, metadata: _metadata }, _style_initializers, _style_extraInitializers);
2639
+ __esDecorate(null, null, _headerTemplate_decorators, { kind: "field", name: "headerTemplate", static: false, private: false, access: { has: obj => "headerTemplate" in obj, get: obj => obj.headerTemplate, set: (obj, value) => { obj.headerTemplate = value; } }, metadata: _metadata }, _headerTemplate_initializers, _headerTemplate_extraInitializers);
2640
+ __esDecorate(null, null, _sidebarTemplate_decorators, { kind: "field", name: "sidebarTemplate", static: false, private: false, access: { has: obj => "sidebarTemplate" in obj, get: obj => obj.sidebarTemplate, set: (obj, value) => { obj.sidebarTemplate = value; } }, metadata: _metadata }, _sidebarTemplate_initializers, _sidebarTemplate_extraInitializers);
2641
+ __esDecorate(null, null, _footerTemplate_decorators, { kind: "field", name: "footerTemplate", static: false, private: false, access: { has: obj => "footerTemplate" in obj, get: obj => obj.footerTemplate, set: (obj, value) => { obj.footerTemplate = value; } }, metadata: _metadata }, _footerTemplate_initializers, _footerTemplate_extraInitializers);
2642
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
2643
+ _classThis = _classDescriptor.value;
2644
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
2645
+ __runInitializers(_classThis, _classExtraInitializers);
2646
+ })();
2647
+ return _classThis;
2648
+ })();
2649
+
2650
+ /**
2651
+ * Dark Theme
2652
+ */
2653
+ const darkTheme = {
2654
+ colors: {
2655
+ primary: '#0d6efd',
2656
+ secondary: '#6c757d',
2657
+ background: '#1a1a1a',
2658
+ text: '#ffffff',
2659
+ border: '#333333',
2660
+ hover: '#2a2a2a',
2661
+ focus: '#0d6efd',
2662
+ error: '#dc3545',
2663
+ },
2664
+ typography: {
2665
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
2666
+ fontSize: {
2667
+ small: '0.875rem',
2668
+ medium: '1rem',
2669
+ large: '1.25rem',
2670
+ },
2671
+ },
2672
+ spacing: {
2673
+ small: '0.5rem',
2674
+ medium: '1rem',
2675
+ large: '1.5rem',
2676
+ },
2677
+ borderRadius: '0.25rem',
2678
+ shadows: {
2679
+ small: '0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7)',
2680
+ medium: '0 3px 6px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.8)',
2681
+ large: '0 10px 20px rgba(0, 0, 0, 0.7), 0 6px 6px rgba(0, 0, 0, 0.9)',
2682
+ },
2683
+ };
2684
+
2685
+ /**
2686
+ * Minimal Theme
2687
+ */
2688
+ const minimalTheme = {
2689
+ colors: {
2690
+ primary: '#000000',
2691
+ secondary: '#666666',
2692
+ background: '#ffffff',
2693
+ text: '#000000',
2694
+ border: '#e0e0e0',
2695
+ hover: '#f5f5f5',
2696
+ focus: '#000000',
2697
+ error: '#cc0000',
2698
+ },
2699
+ typography: {
2700
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
2701
+ fontSize: {
2702
+ small: '0.875rem',
2703
+ medium: '1rem',
2704
+ large: '1.125rem',
2705
+ },
2706
+ },
2707
+ spacing: {
2708
+ small: '0.5rem',
2709
+ medium: '0.75rem',
2710
+ large: '1rem',
2711
+ },
2712
+ borderRadius: '0',
2713
+ shadows: {
2714
+ small: 'none',
2715
+ medium: 'none',
2716
+ large: 'none',
2717
+ },
2718
+ };
2719
+
2720
+ 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 };
2721
+ //# sourceMappingURL=index.esm.js.map