@indxsearch/intrface 2.0.0 → 2.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,103 @@
1
+ # Changelog
2
+
3
+ All notable changes to @indxsearch/intrface will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.1.0] - 2026-01-21
9
+
10
+ ### Added
11
+ - Added dependency on `@indxsearch/indx-types` for centralized API type definitions
12
+ - Added `RequiredCoverageSetup` type for internal use (all properties guaranteed present)
13
+ - Added new CoverageSetup properties: `truncateWordHitLimit`, `truncateWordHitTolerance`, `includePatternMatches`
14
+ - Added "Include Pattern Matches" toggle to SearchSettingsPanel
15
+
16
+ ### Fixed
17
+ - **BREAKING FIX**: Fixed `SystemStatus.state` → `systemStatus.systemState` to match actual API response
18
+ - **BREAKING FIX**: Fixed `SearchResult.documentKey` type from `string` to `number` (Int32) to match API
19
+ - Fixed SystemState enum usage with proper numeric comparisons
20
+ - Updated CoverageSetup defaults to match IndxCloudApi v1.0.2 specification
21
+ - Fixed `truncationScore` default value: 254 → 255
22
+
23
+ ### Changed
24
+ - **BREAKING**: Updated CoverageSetup interface to match IndxCloudApi v1.0.2
25
+ - Removed obsolete properties: `coverageMinWordHitsAbs`, `coverageMinWordHitsRelative`, `coverageLcsErrorToleranceRelativeq`, `coverageQLimitForErrorTolerance`
26
+ - These properties no longer exist in the API specification
27
+ - Updated SearchSettingsPanel UI to reflect new CoverageSetup parameters
28
+ - Removed `truncationScore` input from SearchSettingsPanel UI (still sent to API with default value)
29
+ - Now imports `CoverageSetup` and `ScoreEntry` types from `@indxsearch/indx-types`
30
+ - Imports `SystemState` enum as value (not just type) for runtime comparisons
31
+
32
+ ### Technical Details
33
+ This release aligns `@indxsearch/intrface` with the official IndxCloudApi v1.0.2 Swagger specification. The breaking changes fix discrepancies between the package and the actual API that could cause runtime errors or unexpected behavior.
34
+
35
+ ### Migration Guide
36
+ If upgrading from 2.0.x:
37
+
38
+ 1. **SystemStatus access**: Change `statusData.state` to `statusData.systemState`
39
+ 2. **DocumentKey**: If you're manipulating `documentKey` values, they are now numbers instead of strings
40
+ 3. **CoverageSetup**: Remove any usage of the deleted properties listed above
41
+
42
+ ### Compatibility
43
+ - Requires IndxCloudApi v1.0.2
44
+ - Requires `@indxsearch/indx-types` ^1.0.0
45
+ - React ^19.0.0
46
+ - React DOM ^19.0.0
47
+
48
+ ## [2.0.1] - 2026-01-16
49
+
50
+ ### Fixed
51
+ - Fixed search firing 3 times per keystroke instead of 2 (immediate + debounced)
52
+ - Fixed reset filters not triggering new search when user clicks "Reset" button
53
+ - Fixed filter effect race conditions with automatic range filter cleanups
54
+ - Fixed range filter panel automatically triggering searches when cleaning up full-range filters
55
+
56
+ ### Changed
57
+ - Added optional `isUserAction` parameter to `resetSingleFilter` method to distinguish between user-initiated actions and automatic code cleanups
58
+ - Optimized `coverageSetup` reference preservation in `setSearchSettings` to prevent unnecessary re-renders
59
+ - Removed verbose `useMemo` dependencies for `coverageSetup` (replaced with stable reference approach)
60
+
61
+ ### Technical Details
62
+ The root cause of the 3-search bug was `RangeFilterPanel` automatically calling `resetSingleFilter` after every search to clean up full-range filters. This was setting the `filtersChangedByUser` flag, causing the filter effect to fire an extra search. The fix distinguishes between user-initiated resets (should trigger search) and automatic cleanups (should not trigger search).
63
+
64
+ ### Compatibility
65
+ - Requires IndxCloudApi 1.0.0
66
+ - React ^19.0.0
67
+ - React DOM ^19.0.0
68
+
69
+ ## [2.0.0] - [Previous Date]
70
+
71
+ ### Added
72
+ - Initial public release with major architectural improvements
73
+ - Full TypeScript support
74
+ - Comprehensive authentication system (bearer token + email/password)
75
+ - Error boundary component with fallback UI
76
+ - Active filters panel for displaying and managing applied filters
77
+ - Range filter panel for numeric filtering
78
+ - Value filter panel with checkbox and button display modes
79
+ - Sort by panel with dropdown and radio display modes
80
+ - Debounced faceted search with optimized performance
81
+ - Real-time facet counts and aggregations
82
+ - Mobile-responsive design
83
+
84
+ ### Compatibility
85
+ - Requires IndxCloudApi 1.0.0
86
+ - React ^19.0.0
87
+ - React DOM ^19.0.0
88
+
89
+ ---
90
+
91
+ ## How to Update
92
+
93
+ To update to the latest version:
94
+
95
+ ```bash
96
+ npm install @indxsearch/intrface@latest
97
+ ```
98
+
99
+ Or with a specific version:
100
+
101
+ ```bash
102
+ npm install @indxsearch/intrface@2.1.0
103
+ ```
package/LICENSE CHANGED
@@ -175,7 +175,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
175
175
 
176
176
  END OF TERMS AND CONDITIONS
177
177
 
178
- Copyright 2025 Indx Search
178
+ Copyright 2026 Indx Search (Bionic AS)
179
179
 
180
180
  Licensed under the Apache License, Version 2.0 (the "License");
181
181
  you may not use this file except in compliance with the License.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @indxsearch/intrface
2
2
 
3
- A powerful, flexible React search UI library for INDX Search API.
3
+ A powerful, flexible React search UI library for Indx Search with [IndxCloudApi](https://github.com/indxSearch/IndxCloudApi).
4
4
 
5
5
  ## Features
6
6
 
@@ -12,12 +12,25 @@ A powerful, flexible React search UI library for INDX Search API.
12
12
  - 🎨 **Customizable rendering** - Full control over result display
13
13
  - 🔒 **Secure authentication** - Session-based authentication with automatic login
14
14
 
15
+ ## Compatibility
16
+
17
+ | Package | Version |
18
+ |---------|---------|
19
+ | **IndxCloudApi** | `1.0.2` |
20
+ | **React** | `^19.0.0` |
21
+ | **React DOM** | `^19.0.0` |
22
+ | **Node.js** | `>=16.0.0` |
23
+
24
+ > **Note:** This library is designed specifically for IndxCloudApi version 1.0.2. Different API versions may have incompatible changes.
25
+
15
26
  ## Installation
16
27
 
17
28
  ```bash
18
29
  npm install @indxsearch/intrface @indxsearch/systm @indxsearch/pixl
19
30
  ```
20
31
 
32
+ > **Note:** TypeScript type definitions for IndxCloudApi are automatically included via the `@indxsearch/indx-types` dependency.
33
+
21
34
  ## Quick Start
22
35
 
23
36
  ### 1. Set Up Environment Variables
@@ -362,10 +375,12 @@ export default function AdvancedSearch() {
362
375
  | `dataset` | `string` | ✅ | - | Dataset name |
363
376
  | `allowEmptySearch` | `boolean` | ❌ | `false` | Show results without query |
364
377
  | `enableFacets` | `boolean` | ❌ | `true` | Enable faceted search |
378
+ | `enableCoverage` | `boolean` | ❌ | `true` | Enable coverage-based fuzzy matching |
365
379
  | `maxResults` | `number` | ❌ | `10` | Max results per search |
366
- | `facetDebounceDelayMillis` | `number` | ❌ | `500` | Debounce delay for facet updates |
380
+ | `facetDebounceDelayMillis` | `number` | ❌ | `500` | Debounce delay for facet updates (ms) |
367
381
  | `coverageDepth` | `number` | ❌ | `500` | Search depth for fuzzy matching |
368
- | `removeDuplicates` | `boolean` | ❌ | `false` | Remove duplicate results |
382
+ | `removeDuplicates` | `boolean` | ❌ | `true` | Remove duplicate results |
383
+ | `initialCoverageSetup` | `Partial<CoverageSetup>` | ❌ | `{}` | Override default coverage settings |
369
384
  | `enableDebugLogs` | `boolean` | ❌ | `false` | Enable detailed console logging |
370
385
 
371
386
  ### SearchInput Props