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