@indxsearch/intrface 2.0.1 → 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 +41 -1
- package/README.md +9 -5
- package/dist/index.es.js +390 -393
- package/dist/index.umd.js +4 -4
- package/package.json +2 -1
- package/dist/components/ActiveFiltersPanel.d.ts +0 -1
- package/dist/components/RangeFilterPanel.d.ts +0 -11
- package/dist/components/ResultTitle.d.ts +0 -0
- package/dist/components/SearchErrorBoundary.d.ts +0 -45
- package/dist/components/SearchInput.d.ts +0 -8
- package/dist/components/SearchResults.d.ts +0 -7
- package/dist/components/SearchSettingsPanel.d.ts +0 -1
- package/dist/components/SortByPanel.d.ts +0 -8
- package/dist/components/ValueFilterPanel.d.ts +0 -23
- package/dist/context/SearchContext.d.ts +0 -92
- package/dist/context/useSearch.d.ts +0 -1
- package/dist/index.d.ts +0 -11
package/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var xt = Object.defineProperty;
|
|
2
|
+
var vt = (r, o, u) => o in r ? xt(r, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : r[o] = u;
|
|
3
|
+
var rt = (r, o, u) => vt(r, typeof o != "symbol" ? o + "" : o, u);
|
|
4
4
|
import "@indxsearch/systm/styles.css";
|
|
5
|
-
import
|
|
6
|
-
import { SearchField as
|
|
5
|
+
import te, { createContext as bt, useRef as he, useState as G, useEffect as ie, useCallback as ae, useContext as yt, memo as ct, useMemo as Ge, Component as jt } from "react";
|
|
6
|
+
import { SearchField as St, Button as ye, FilterPanelBase as be, ToggleSwitch as re, Checkbox as nt, Slider as ut, InputField as le, Select as Ct, RadioButton as wt } from "@indxsearch/systm";
|
|
7
7
|
var Be = { exports: {} }, Pe = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
@@ -14,14 +14,14 @@ var Be = { exports: {} }, Pe = {};
|
|
|
14
14
|
* This source code is licensed under the MIT license found in the
|
|
15
15
|
* LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
|
|
17
|
+
var st;
|
|
18
|
+
function kt() {
|
|
19
|
+
if (st) return Pe;
|
|
20
|
+
st = 1;
|
|
21
21
|
var r = Symbol.for("react.transitional.element"), o = Symbol.for("react.fragment");
|
|
22
22
|
function u(s, c, p) {
|
|
23
|
-
var
|
|
24
|
-
if (p !== void 0 && (
|
|
23
|
+
var S = null;
|
|
24
|
+
if (p !== void 0 && (S = "" + p), c.key !== void 0 && (S = "" + c.key), "key" in c) {
|
|
25
25
|
p = {};
|
|
26
26
|
for (var m in c)
|
|
27
27
|
m !== "key" && (p[m] = c[m]);
|
|
@@ -29,7 +29,7 @@ function Ct() {
|
|
|
29
29
|
return c = p.ref, {
|
|
30
30
|
$$typeof: r,
|
|
31
31
|
type: s,
|
|
32
|
-
key:
|
|
32
|
+
key: S,
|
|
33
33
|
ref: c !== void 0 ? c : null,
|
|
34
34
|
props: p
|
|
35
35
|
};
|
|
@@ -46,16 +46,16 @@ var He = {};
|
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
var
|
|
50
|
-
function
|
|
51
|
-
return
|
|
49
|
+
var ot;
|
|
50
|
+
function Rt() {
|
|
51
|
+
return ot || (ot = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
52
52
|
function r(e) {
|
|
53
53
|
if (e == null) return null;
|
|
54
54
|
if (typeof e == "function")
|
|
55
|
-
return e.$$typeof ===
|
|
55
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
56
56
|
if (typeof e == "string") return e;
|
|
57
57
|
switch (e) {
|
|
58
|
-
case
|
|
58
|
+
case x:
|
|
59
59
|
return "Fragment";
|
|
60
60
|
case g:
|
|
61
61
|
return "Profiler";
|
|
@@ -72,11 +72,11 @@ function wt() {
|
|
|
72
72
|
switch (typeof e.tag == "number" && console.error(
|
|
73
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
74
|
), e.$$typeof) {
|
|
75
|
-
case
|
|
75
|
+
case L:
|
|
76
76
|
return "Portal";
|
|
77
77
|
case W:
|
|
78
78
|
return e.displayName || "Context";
|
|
79
|
-
case
|
|
79
|
+
case v:
|
|
80
80
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
81
81
|
case h:
|
|
82
82
|
var a = e.render;
|
|
@@ -104,16 +104,16 @@ function wt() {
|
|
|
104
104
|
}
|
|
105
105
|
if (a) {
|
|
106
106
|
a = console;
|
|
107
|
-
var y = a.error,
|
|
107
|
+
var y = a.error, F = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
108
108
|
return y.call(
|
|
109
109
|
a,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
-
|
|
111
|
+
F
|
|
112
112
|
), o(e);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
function s(e) {
|
|
116
|
-
if (e ===
|
|
116
|
+
if (e === x) return "<>";
|
|
117
117
|
if (typeof e == "object" && e !== null && e.$$typeof === z)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
@@ -130,7 +130,7 @@ function wt() {
|
|
|
130
130
|
function p() {
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function S(e) {
|
|
134
134
|
if (pe.call(e, "key")) {
|
|
135
135
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
136
136
|
if (a && a.isReactWarning) return !1;
|
|
@@ -155,14 +155,14 @@ function wt() {
|
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
157
157
|
}
|
|
158
|
-
function C(e, a, y,
|
|
158
|
+
function C(e, a, y, F, ue, xe) {
|
|
159
159
|
var T = y.ref;
|
|
160
160
|
return e = {
|
|
161
161
|
$$typeof: ne,
|
|
162
162
|
type: e,
|
|
163
163
|
key: a,
|
|
164
164
|
props: y,
|
|
165
|
-
_owner:
|
|
165
|
+
_owner: F
|
|
166
166
|
}, (T !== void 0 ? T : null) !== null ? Object.defineProperty(e, "ref", {
|
|
167
167
|
enumerable: !1,
|
|
168
168
|
get: n
|
|
@@ -185,16 +185,16 @@ function wt() {
|
|
|
185
185
|
configurable: !1,
|
|
186
186
|
enumerable: !1,
|
|
187
187
|
writable: !0,
|
|
188
|
-
value:
|
|
188
|
+
value: xe
|
|
189
189
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
190
190
|
}
|
|
191
|
-
function A(e, a, y,
|
|
191
|
+
function A(e, a, y, F, ue, xe) {
|
|
192
192
|
var T = a.children;
|
|
193
193
|
if (T !== void 0)
|
|
194
|
-
if (
|
|
194
|
+
if (F)
|
|
195
195
|
if (P(T)) {
|
|
196
|
-
for (
|
|
197
|
-
k(T[
|
|
196
|
+
for (F = 0; F < T.length; F++)
|
|
197
|
+
k(T[F]);
|
|
198
198
|
Object.freeze && Object.freeze(T);
|
|
199
199
|
} else
|
|
200
200
|
console.error(
|
|
@@ -206,23 +206,23 @@ function wt() {
|
|
|
206
206
|
var de = Object.keys(a).filter(function(ke) {
|
|
207
207
|
return ke !== "key";
|
|
208
208
|
});
|
|
209
|
-
|
|
209
|
+
F = 0 < de.length ? "{key: someKey, " + de.join(": ..., ") + ": ...}" : "{key: someKey}", R[T + F] || (de = 0 < de.length ? "{" + de.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
210
210
|
`A props object containing a "key" prop is being spread into JSX:
|
|
211
211
|
let props = %s;
|
|
212
212
|
<%s {...props} />
|
|
213
213
|
React keys must be passed directly to JSX without using spread:
|
|
214
214
|
let props = %s;
|
|
215
215
|
<%s key={someKey} {...props} />`,
|
|
216
|
-
|
|
216
|
+
F,
|
|
217
217
|
T,
|
|
218
218
|
de,
|
|
219
219
|
T
|
|
220
|
-
), R[T +
|
|
220
|
+
), R[T + F] = !0);
|
|
221
221
|
}
|
|
222
|
-
if (T = null, y !== void 0 && (u(y), T = "" + y),
|
|
222
|
+
if (T = null, y !== void 0 && (u(y), T = "" + y), S(a) && (u(a.key), T = "" + a.key), "key" in a) {
|
|
223
223
|
y = {};
|
|
224
|
-
for (var
|
|
225
|
-
|
|
224
|
+
for (var ve in a)
|
|
225
|
+
ve !== "key" && (y[ve] = a[ve]);
|
|
226
226
|
} else y = a;
|
|
227
227
|
return T && m(
|
|
228
228
|
y,
|
|
@@ -233,16 +233,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
233
233
|
y,
|
|
234
234
|
c(),
|
|
235
235
|
ue,
|
|
236
|
-
|
|
236
|
+
xe
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
function k(e) {
|
|
240
|
-
|
|
240
|
+
q(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === z && (e._payload.status === "fulfilled" ? q(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function q(e) {
|
|
243
243
|
return typeof e == "object" && e !== null && e.$$typeof === ne;
|
|
244
244
|
}
|
|
245
|
-
var M =
|
|
245
|
+
var M = te, ne = Symbol.for("react.transitional.element"), L = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), W = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), X = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), O = M.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, pe = Object.prototype.hasOwnProperty, P = Array.isArray, w = console.createTask ? console.createTask : function() {
|
|
246
246
|
return null;
|
|
247
247
|
};
|
|
248
248
|
M = {
|
|
@@ -254,61 +254,68 @@ React keys must be passed directly to JSX without using spread:
|
|
|
254
254
|
M,
|
|
255
255
|
p
|
|
256
256
|
)(), f = w(s(p)), R = {};
|
|
257
|
-
He.Fragment =
|
|
258
|
-
var
|
|
257
|
+
He.Fragment = x, He.jsx = function(e, a, y) {
|
|
258
|
+
var F = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
259
259
|
return A(
|
|
260
260
|
e,
|
|
261
261
|
a,
|
|
262
262
|
y,
|
|
263
263
|
!1,
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
F ? Error("react-stack-top-frame") : fe,
|
|
265
|
+
F ? w(s(e)) : f
|
|
266
266
|
);
|
|
267
267
|
}, He.jsxs = function(e, a, y) {
|
|
268
|
-
var
|
|
268
|
+
var F = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return A(
|
|
270
270
|
e,
|
|
271
271
|
a,
|
|
272
272
|
y,
|
|
273
273
|
!0,
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
F ? Error("react-stack-top-frame") : fe,
|
|
275
|
+
F ? w(s(e)) : f
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
278
|
})()), He;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
function
|
|
282
|
-
return
|
|
280
|
+
var at;
|
|
281
|
+
function Mt() {
|
|
282
|
+
return at || (at = 1, process.env.NODE_ENV === "production" ? Be.exports = kt() : Be.exports = Rt()), Be.exports;
|
|
283
283
|
}
|
|
284
|
-
var t =
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
var t = Mt(), Le;
|
|
285
|
+
(function(r) {
|
|
286
|
+
r[r.Hibernated = -1] = "Hibernated", r[r.Created = 0] = "Created", r[r.Loading = 1] = "Loading", r[r.Loaded = 2] = "Loaded", r[r.Indexing = 3] = "Indexing", r[r.Ready = 4] = "Ready", r[r.Error = 255] = "Error";
|
|
287
|
+
})(Le || (Le = {}));
|
|
288
|
+
var it;
|
|
289
|
+
(function(r) {
|
|
290
|
+
r[r.Low = 1] = "Low", r[r.Medium = 2] = "Medium", r[r.High = 3] = "High";
|
|
291
|
+
})(it || (it = {}));
|
|
292
|
+
const dt = bt(void 0);
|
|
293
|
+
function Ft(r, o) {
|
|
287
294
|
let u;
|
|
288
295
|
const s = (...c) => {
|
|
289
296
|
clearTimeout(u), u = setTimeout(() => r(...c), o);
|
|
290
297
|
};
|
|
291
298
|
return s.cancel = () => clearTimeout(u), s;
|
|
292
299
|
}
|
|
293
|
-
const
|
|
300
|
+
const Kt = ({
|
|
294
301
|
children: r,
|
|
295
302
|
email: o,
|
|
296
303
|
password: u,
|
|
297
304
|
url: s,
|
|
298
305
|
dataset: c,
|
|
299
306
|
allowEmptySearch: p = !1,
|
|
300
|
-
maxResults:
|
|
307
|
+
maxResults: S = 10,
|
|
301
308
|
facetDebounceDelayMillis: m = 500,
|
|
302
309
|
// debounce faceted searches only
|
|
303
310
|
enableFacets: n = !0,
|
|
304
311
|
coverageDepth: C = 500,
|
|
305
312
|
removeDuplicates: A = !0,
|
|
306
313
|
enableCoverage: k = !0,
|
|
307
|
-
initialCoverageSetup:
|
|
314
|
+
initialCoverageSetup: q = {},
|
|
308
315
|
enableDebugLogs: M = !1,
|
|
309
316
|
preAuthenticatedToken: ne
|
|
310
317
|
}) => {
|
|
311
|
-
const
|
|
318
|
+
const L = he(0), x = he(void 0), _ = he(!1), g = he(!1), v = he(!1), W = he(!1), [h, b] = G({
|
|
312
319
|
query: "",
|
|
313
320
|
results: null,
|
|
314
321
|
isLoading: !1,
|
|
@@ -319,7 +326,7 @@ const Qt = ({
|
|
|
319
326
|
rangeFilters: {},
|
|
320
327
|
facetStats: {},
|
|
321
328
|
searchSettings: {
|
|
322
|
-
maxNumberOfRecordsToReturn:
|
|
329
|
+
maxNumberOfRecordsToReturn: S,
|
|
323
330
|
coverageDepth: C,
|
|
324
331
|
enableCoverage: k,
|
|
325
332
|
removeDuplicates: A,
|
|
@@ -327,20 +334,20 @@ const Qt = ({
|
|
|
327
334
|
showScore: !0,
|
|
328
335
|
placeholderText: "Type to search",
|
|
329
336
|
coverageSetup: {
|
|
330
|
-
//
|
|
331
|
-
levenshteinMaxWordSize: 20,
|
|
332
|
-
minWordSize: 2,
|
|
333
|
-
coverageMinWordHitsAbs: 1,
|
|
334
|
-
coverageMinWordHitsRelative: 0,
|
|
335
|
-
coverageQLimitForErrorTolerance: 5,
|
|
336
|
-
coverageLcsErrorToleranceRelativeq: 0.2,
|
|
337
|
+
// Default values matching Swagger specification
|
|
337
338
|
coverWholeQuery: !0,
|
|
338
339
|
coverWholeWords: !0,
|
|
339
340
|
coverFuzzyWords: !0,
|
|
340
341
|
coverJoinedWords: !0,
|
|
341
342
|
coverPrefixSuffix: !0,
|
|
342
343
|
truncate: !0,
|
|
343
|
-
|
|
344
|
+
includePatternMatches: !0,
|
|
345
|
+
minWordSize: 2,
|
|
346
|
+
levenshteinMaxWordSize: 20,
|
|
347
|
+
truncateWordHitLimit: 1,
|
|
348
|
+
truncateWordHitTolerance: 0,
|
|
349
|
+
truncationScore: 255,
|
|
350
|
+
...q
|
|
344
351
|
// Allow prop-based override
|
|
345
352
|
}
|
|
346
353
|
}
|
|
@@ -364,38 +371,38 @@ const Qt = ({
|
|
|
364
371
|
},
|
|
365
372
|
credentials: "include"
|
|
366
373
|
});
|
|
367
|
-
}, [d]), [
|
|
374
|
+
}, [d]), [Z, O] = G([]), [pe, P] = G([]), [w, U] = G([]), [ce, fe] = G(!0), [f, R] = G({}), [e, a] = G({}), [y, F] = G({}), [ue, xe] = G(""), [T, de] = G(""), [ve, ke] = G({}), $ = he(null), I = ae((l) => {
|
|
368
375
|
W.current = !1, b((i) => {
|
|
369
|
-
const
|
|
376
|
+
const j = Object.keys(i.filters).length > 0, E = Object.keys(i.rangeFilters).length > 0;
|
|
370
377
|
return {
|
|
371
378
|
...i,
|
|
372
379
|
query: l,
|
|
373
|
-
filters:
|
|
374
|
-
rangeFilters:
|
|
380
|
+
filters: j ? {} : i.filters,
|
|
381
|
+
rangeFilters: E ? {} : i.rangeFilters,
|
|
375
382
|
searchSettings: {
|
|
376
383
|
...i.searchSettings,
|
|
377
|
-
maxNumberOfRecordsToReturn:
|
|
384
|
+
maxNumberOfRecordsToReturn: S
|
|
378
385
|
}
|
|
379
386
|
};
|
|
380
387
|
});
|
|
381
|
-
}, [
|
|
388
|
+
}, [S]), J = ae((l) => {
|
|
382
389
|
b((i) => ({
|
|
383
390
|
...i,
|
|
384
391
|
facetDebounceDelayMillis: l
|
|
385
392
|
}));
|
|
386
393
|
}, []), _e = ae((l) => {
|
|
387
394
|
b((i) => {
|
|
388
|
-
const
|
|
389
|
-
return l.coverageSetup ?
|
|
395
|
+
const j = { ...i.searchSettings, ...l };
|
|
396
|
+
return l.coverageSetup ? j.coverageSetup = {
|
|
390
397
|
...i.searchSettings.coverageSetup,
|
|
391
398
|
...l.coverageSetup
|
|
392
|
-
} :
|
|
399
|
+
} : j.coverageSetup = i.searchSettings.coverageSetup, {
|
|
393
400
|
...i,
|
|
394
|
-
searchSettings:
|
|
401
|
+
searchSettings: j
|
|
395
402
|
};
|
|
396
403
|
});
|
|
397
404
|
}, []), Te = ae((l) => {
|
|
398
|
-
|
|
405
|
+
v.current = !0, b((i) => ({
|
|
399
406
|
...i,
|
|
400
407
|
searchSettings: {
|
|
401
408
|
...i.searchSettings,
|
|
@@ -403,110 +410,110 @@ const Qt = ({
|
|
|
403
410
|
}
|
|
404
411
|
}));
|
|
405
412
|
}, []), Ae = ae((l, i) => {
|
|
406
|
-
W.current = !0, b((
|
|
407
|
-
const
|
|
408
|
-
return B.length ?
|
|
409
|
-
...
|
|
410
|
-
filters:
|
|
413
|
+
W.current = !0, b((j) => {
|
|
414
|
+
const E = { ...j.filters }, H = E[l] || [], B = H.includes(i) ? H.filter((K) => K !== i) : [...H, i];
|
|
415
|
+
return B.length ? E[l] = B : delete E[l], {
|
|
416
|
+
...j,
|
|
417
|
+
filters: E
|
|
411
418
|
};
|
|
412
419
|
});
|
|
413
|
-
}, []), qe = ae((l, i,
|
|
414
|
-
W.current = !0, b((
|
|
415
|
-
...
|
|
420
|
+
}, []), qe = ae((l, i, j) => {
|
|
421
|
+
W.current = !0, b((E) => ({
|
|
422
|
+
...E,
|
|
416
423
|
rangeFilters: {
|
|
417
|
-
...
|
|
418
|
-
[l]: { min: i, max:
|
|
424
|
+
...E.rangeFilters,
|
|
425
|
+
[l]: { min: i, max: j }
|
|
419
426
|
}
|
|
420
427
|
}));
|
|
421
|
-
}, []),
|
|
428
|
+
}, []), ze = ae(() => {
|
|
422
429
|
W.current = !0, b((l) => ({
|
|
423
430
|
...l,
|
|
424
431
|
filters: {},
|
|
425
432
|
rangeFilters: {}
|
|
426
433
|
}));
|
|
427
|
-
}, []),
|
|
428
|
-
|
|
429
|
-
const H = { ...
|
|
434
|
+
}, []), ft = ae((l, i, j = !0) => {
|
|
435
|
+
j && (W.current = !0), b((E) => {
|
|
436
|
+
const H = { ...E.filters }, B = { ...E.rangeFilters };
|
|
430
437
|
if (i !== void 0) {
|
|
431
|
-
const se = (H[l] || []).filter((
|
|
438
|
+
const se = (H[l] || []).filter((Q) => Q !== i);
|
|
432
439
|
se.length > 0 ? H[l] = se : delete H[l];
|
|
433
440
|
} else
|
|
434
441
|
delete B[l];
|
|
435
442
|
return {
|
|
436
|
-
...
|
|
443
|
+
...E,
|
|
437
444
|
filters: H,
|
|
438
445
|
rangeFilters: B
|
|
439
446
|
};
|
|
440
447
|
});
|
|
441
|
-
}, []),
|
|
442
|
-
b((
|
|
443
|
-
...
|
|
448
|
+
}, []), mt = ae((l, i) => {
|
|
449
|
+
b((j) => ({
|
|
450
|
+
...j,
|
|
444
451
|
sortBy: l || void 0,
|
|
445
452
|
sortAscending: l ? i : void 0
|
|
446
453
|
}));
|
|
447
|
-
}, []),
|
|
454
|
+
}, []), Xe = ae(async (l, i, j) => {
|
|
448
455
|
if (l.length === 0) return null;
|
|
449
456
|
if (l.length === 1) return l[0];
|
|
450
|
-
let
|
|
457
|
+
let E = l[0];
|
|
451
458
|
for (let H = 1; H < l.length; H++) {
|
|
452
|
-
const B = await V(`${i}/api/CombineFilters/${
|
|
459
|
+
const B = await V(`${i}/api/CombineFilters/${j}`, {
|
|
453
460
|
// Combine the current filter with the next filter
|
|
454
461
|
method: "PUT",
|
|
455
462
|
headers: {
|
|
456
463
|
"Content-Type": "application/json"
|
|
457
464
|
},
|
|
458
|
-
body: JSON.stringify({ A:
|
|
465
|
+
body: JSON.stringify({ A: E, B: l[H], useAndOperation: !0 })
|
|
459
466
|
});
|
|
460
467
|
if (!B.ok) {
|
|
461
|
-
const
|
|
462
|
-
throw console.error("CombineFilters failed:",
|
|
468
|
+
const K = await B.json();
|
|
469
|
+
throw console.error("CombineFilters failed:", K), new Error("CombineFilters failed");
|
|
463
470
|
}
|
|
464
|
-
|
|
471
|
+
E = await B.json();
|
|
465
472
|
}
|
|
466
|
-
return
|
|
467
|
-
}, [V]),
|
|
473
|
+
return E;
|
|
474
|
+
}, [V]), Ue = h.searchSettings.maxNumberOfRecordsToReturn, Je = h.searchSettings.enableCoverage, Ye = h.searchSettings.removeDuplicates, Ze = h.searchSettings.coverageDepth, Qe = h.searchSettings.minimumScore, $e = h.sortBy, Ie = h.sortAscending, Ke = h.searchSettings.coverageSetup, et = ae(
|
|
468
475
|
async ({ enableFacets: l }) => {
|
|
469
476
|
if (!d) return;
|
|
470
|
-
const i = ++
|
|
471
|
-
b((
|
|
477
|
+
const i = ++L.current;
|
|
478
|
+
b((j) => ({ ...j, isLoading: !0 }));
|
|
472
479
|
try {
|
|
473
|
-
const
|
|
474
|
-
|
|
480
|
+
const j = Object.entries(h.filters ?? {}), H = (await Promise.all(
|
|
481
|
+
j.map(
|
|
475
482
|
async ([D, Y]) => Promise.all(
|
|
476
483
|
Y.map(
|
|
477
|
-
(
|
|
484
|
+
(ee) => V(`${s}/api/CreateValueFilter/${c}`, {
|
|
478
485
|
method: "PUT",
|
|
479
486
|
headers: {
|
|
480
487
|
"Content-Type": "application/json"
|
|
481
488
|
},
|
|
482
|
-
body: JSON.stringify({ FieldName: D, Value:
|
|
489
|
+
body: JSON.stringify({ FieldName: D, Value: ee })
|
|
483
490
|
}).then((ge) => ge.json())
|
|
484
491
|
)
|
|
485
492
|
)
|
|
486
493
|
)
|
|
487
|
-
)).flat(), B = Object.entries(h.rangeFilters ?? {}),
|
|
494
|
+
)).flat(), B = Object.entries(h.rangeFilters ?? {}), K = await Promise.all(
|
|
488
495
|
B.map(
|
|
489
|
-
([D, { min: Y, max:
|
|
496
|
+
([D, { min: Y, max: ee }]) => V(`${s}/api/CreateRangeFilter/${c}`, {
|
|
490
497
|
method: "PUT",
|
|
491
498
|
headers: {
|
|
492
499
|
"Content-Type": "application/json"
|
|
493
500
|
},
|
|
494
|
-
body: JSON.stringify({ FieldName: D, LowerLimit: Y, UpperLimit:
|
|
501
|
+
body: JSON.stringify({ FieldName: D, LowerLimit: Y, UpperLimit: ee })
|
|
495
502
|
}).then((ge) => ge.json())
|
|
496
503
|
)
|
|
497
|
-
), se = [...H, ...
|
|
504
|
+
), se = [...H, ...K].filter(
|
|
498
505
|
(D) => D && typeof D.hashString == "string"
|
|
499
|
-
),
|
|
506
|
+
), Q = await Xe(se, s, c), Se = p || h.query.trim() !== "", De = {
|
|
500
507
|
text: h.query,
|
|
501
|
-
maxNumberOfRecordsToReturn:
|
|
508
|
+
maxNumberOfRecordsToReturn: Se ? Ue : 0,
|
|
502
509
|
enableFacets: l,
|
|
503
|
-
...
|
|
510
|
+
...Q ? { filter: Q } : {},
|
|
504
511
|
...$e ? { sortBy: $e } : {},
|
|
505
512
|
...Ie !== void 0 ? { sortAscending: Ie } : {},
|
|
506
|
-
enableCoverage:
|
|
507
|
-
removeDuplicates:
|
|
508
|
-
coverageDepth:
|
|
509
|
-
coverageSetup:
|
|
513
|
+
enableCoverage: Je,
|
|
514
|
+
removeDuplicates: Ye,
|
|
515
|
+
coverageDepth: Ze,
|
|
516
|
+
coverageSetup: Ke
|
|
510
517
|
};
|
|
511
518
|
M && console.log("[performSearch] request body:", JSON.stringify(De, null, 2));
|
|
512
519
|
const Re = await (await V(`${s}/api/Search/${c}`, {
|
|
@@ -517,14 +524,14 @@ const Qt = ({
|
|
|
517
524
|
body: JSON.stringify(De)
|
|
518
525
|
})).json(), Ce = Re.truncationIndex ?? -1, we = Re.records || [], Me = we.map((D) => D.documentKey), N = we.map((D) => D.score);
|
|
519
526
|
let oe = [];
|
|
520
|
-
|
|
527
|
+
Se && Me.length > 0 && (oe = (await (await V(`${s}/api/GetJson/${c}`, {
|
|
521
528
|
method: "POST",
|
|
522
529
|
headers: {
|
|
523
530
|
"Content-Type": "application/json"
|
|
524
531
|
},
|
|
525
532
|
body: JSON.stringify(Me)
|
|
526
|
-
})).json()).map((
|
|
527
|
-
document:
|
|
533
|
+
})).json()).map((ee, ge) => ({
|
|
534
|
+
document: ee,
|
|
528
535
|
documentKey: Me[ge],
|
|
529
536
|
score: N[ge]
|
|
530
537
|
})));
|
|
@@ -532,37 +539,37 @@ const Qt = ({
|
|
|
532
539
|
if (l && Re.facets) {
|
|
533
540
|
for (const [D, Y] of Object.entries(Re.facets))
|
|
534
541
|
if (Array.isArray(Y) && Y.length > 0) {
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
min: Math.min(...
|
|
538
|
-
max: Math.max(...
|
|
542
|
+
const ee = Y.map((ge) => Number(ge.key)).filter((ge) => !isNaN(ge));
|
|
543
|
+
ee.length > 0 && (me[D] = {
|
|
544
|
+
min: Math.min(...ee),
|
|
545
|
+
max: Math.max(...ee)
|
|
539
546
|
});
|
|
540
547
|
}
|
|
541
548
|
}
|
|
542
|
-
const Ve = h.query !== ue,
|
|
549
|
+
const Ve = h.query !== ue, gt = h.query !== T;
|
|
543
550
|
let We = h.facetStats ?? {};
|
|
544
|
-
if (Ve ? (We = { ...f, ...me },
|
|
545
|
-
const D = { ...
|
|
546
|
-
for (const [Y,
|
|
547
|
-
D[Y] =
|
|
551
|
+
if (Ve ? (We = { ...f, ...me }, F(We), xe(h.query)) : We = { ...y, ...me }, gt && l) {
|
|
552
|
+
const D = { ...ve };
|
|
553
|
+
for (const [Y, ee] of Object.entries(me))
|
|
554
|
+
D[Y] = ee;
|
|
548
555
|
ke(D), de(h.query);
|
|
549
556
|
}
|
|
550
557
|
let Oe = Re.facets;
|
|
551
558
|
if (l && (!Oe || Object.keys(Oe).length === 0)) {
|
|
552
559
|
Oe = {};
|
|
553
560
|
for (const [D, Y] of Object.entries(e))
|
|
554
|
-
Oe[D] = Y.map((
|
|
561
|
+
Oe[D] = Y.map((ee) => ({ key: ee, value: null }));
|
|
555
562
|
}
|
|
556
|
-
if (i !==
|
|
563
|
+
if (i !== L.current)
|
|
557
564
|
return;
|
|
558
|
-
const
|
|
565
|
+
const pt = oe.filter((D) => {
|
|
559
566
|
const Y = h.query.trim();
|
|
560
567
|
return Y === "" || Y.length === 1 ? !0 : D.score >= Qe;
|
|
561
568
|
});
|
|
562
569
|
b((D) => ({
|
|
563
570
|
...D,
|
|
564
|
-
results:
|
|
565
|
-
resultsSuppressed: !
|
|
571
|
+
results: pt,
|
|
572
|
+
resultsSuppressed: !Se,
|
|
566
573
|
...l ? {
|
|
567
574
|
facets: Oe,
|
|
568
575
|
facetStats: We
|
|
@@ -570,15 +577,15 @@ const Qt = ({
|
|
|
570
577
|
isLoading: !1,
|
|
571
578
|
truncationIndex: Ce
|
|
572
579
|
}));
|
|
573
|
-
} catch (
|
|
574
|
-
if (console.error("[Search] ❌ Search failed:",
|
|
580
|
+
} catch (j) {
|
|
581
|
+
if (console.error("[Search] ❌ Search failed:", j), j instanceof TypeError && j.message.includes("fetch") ? (console.error("[Search] ❌ Network error - cannot reach INDX server"), console.error("[Search] 💡 Check if server is running at:", s)) : j instanceof Error && (j.message.includes("401") ? (console.error("[Search] ❌ Authentication failed"), console.error("[Search] 💡 Your token may have expired. Get a fresh token with:"), console.error('[Search] 💡 curl -X POST "' + s + `/api/Login" -H "Content-Type: application/json" -d '{"userEmail":"your@email.com","userPassWord":"yourpassword"}'`)) : j.message.includes("404") ? (console.error("[Search] ❌ Dataset not found"), console.error('[Search] 💡 Check that dataset "' + c + '" exists')) : console.error("[Search] 💡 Error:", j.message)), i !== L.current)
|
|
575
582
|
return;
|
|
576
|
-
b((
|
|
577
|
-
...
|
|
583
|
+
b((E) => ({
|
|
584
|
+
...E,
|
|
578
585
|
results: null,
|
|
579
586
|
isLoading: !1,
|
|
580
587
|
resultsSuppressed: !1,
|
|
581
|
-
error:
|
|
588
|
+
error: j instanceof Error ? j.message : "Search failed"
|
|
582
589
|
}));
|
|
583
590
|
}
|
|
584
591
|
},
|
|
@@ -588,14 +595,14 @@ const Qt = ({
|
|
|
588
595
|
h.rangeFilters,
|
|
589
596
|
$e,
|
|
590
597
|
Ie,
|
|
591
|
-
|
|
592
|
-
Xe,
|
|
598
|
+
Ue,
|
|
593
599
|
Je,
|
|
594
600
|
Ye,
|
|
595
601
|
Ze,
|
|
602
|
+
Ke,
|
|
596
603
|
Qe,
|
|
597
604
|
V,
|
|
598
|
-
|
|
605
|
+
Xe,
|
|
599
606
|
s,
|
|
600
607
|
c,
|
|
601
608
|
p,
|
|
@@ -603,38 +610,38 @@ const Qt = ({
|
|
|
603
610
|
]
|
|
604
611
|
);
|
|
605
612
|
ie(() => {
|
|
606
|
-
|
|
607
|
-
}, [
|
|
608
|
-
const
|
|
613
|
+
x.current = et;
|
|
614
|
+
}, [et]);
|
|
615
|
+
const je = he(null);
|
|
609
616
|
return ie(() => {
|
|
610
617
|
var l;
|
|
611
|
-
return (l =
|
|
618
|
+
return (l = je.current) == null || l.cancel(), je.current = Ft(() => {
|
|
612
619
|
var i;
|
|
613
|
-
M && console.log("Debounced searchWithFacets fired"), (i =
|
|
620
|
+
M && console.log("Debounced searchWithFacets fired"), (i = x.current) == null || i.call(x, { enableFacets: !0 });
|
|
614
621
|
}, h.facetDebounceDelayMillis ?? 500), () => {
|
|
615
622
|
var i;
|
|
616
|
-
(i =
|
|
623
|
+
(i = je.current) == null || i.cancel();
|
|
617
624
|
};
|
|
618
625
|
}, [h.facetDebounceDelayMillis]), ie(() => {
|
|
619
626
|
var l;
|
|
620
|
-
!ce && d && !_.current && (p && ((l =
|
|
627
|
+
!ce && d && !_.current && (p && ((l = x.current) == null || l.call(x, { enableFacets: z })), _.current = !0);
|
|
621
628
|
}, [ce, d, p, z]), ie(() => {
|
|
622
|
-
var
|
|
629
|
+
var E, H, B, K, se;
|
|
623
630
|
if (!d || !_.current) return;
|
|
624
631
|
const l = h.query.trim(), i = l === "" && p;
|
|
625
632
|
if (l === "" && !p) {
|
|
626
|
-
h.resultsSuppressed || b((
|
|
627
|
-
...
|
|
633
|
+
h.resultsSuppressed || b((Q) => ({
|
|
634
|
+
...Q,
|
|
628
635
|
resultsSuppressed: !0
|
|
629
636
|
}));
|
|
630
637
|
return;
|
|
631
638
|
}
|
|
632
|
-
return i ? ((
|
|
633
|
-
var
|
|
634
|
-
(
|
|
639
|
+
return i ? ((E = je.current) == null || E.cancel(), (H = x.current) == null || H.call(x, { enableFacets: z })) : z ? (M && console.log("Search fired"), (B = x.current) == null || B.call(x, { enableFacets: !1 }), (K = je.current) == null || K.call(je)) : (se = x.current) == null || se.call(x, { enableFacets: !1 }), () => {
|
|
640
|
+
var Q;
|
|
641
|
+
(Q = je.current) == null || Q.cancel();
|
|
635
642
|
};
|
|
636
643
|
}, [h.query, p, z]), ie(() => {
|
|
637
|
-
var
|
|
644
|
+
var E;
|
|
638
645
|
const l = W.current;
|
|
639
646
|
if (W.current = !1, !_.current || !d) return;
|
|
640
647
|
if (!g.current) {
|
|
@@ -644,16 +651,16 @@ const Qt = ({
|
|
|
644
651
|
if (!l)
|
|
645
652
|
return;
|
|
646
653
|
const i = h.query.trim();
|
|
647
|
-
z && !(!p && i === "") && ((
|
|
654
|
+
z && !(!p && i === "") && ((E = x.current) == null || E.call(x, { enableFacets: !0 }));
|
|
648
655
|
}, [h.filters, h.rangeFilters]), ie(() => {
|
|
649
|
-
var
|
|
656
|
+
var j;
|
|
650
657
|
if (!_.current || !d) return;
|
|
651
658
|
const l = h.query.trim();
|
|
652
|
-
z && !(!p && l === "") && ((
|
|
659
|
+
z && !(!p && l === "") && ((j = x.current) == null || j.call(x, { enableFacets: !0 }));
|
|
653
660
|
}, [$e, Ie]), ie(() => {
|
|
654
661
|
var l;
|
|
655
|
-
!_.current || !d ||
|
|
656
|
-
}, [
|
|
662
|
+
!_.current || !d || v.current && (v.current = !1, (l = x.current) == null || l.call(x, { enableFacets: !1 }));
|
|
663
|
+
}, [Ue, d]), ie(() => {
|
|
657
664
|
(async () => {
|
|
658
665
|
try {
|
|
659
666
|
let i;
|
|
@@ -686,7 +693,7 @@ const Qt = ({
|
|
|
686
693
|
M && console.log("[Auth] ✅ Login successful, bearer token received (length:", i.length, ")");
|
|
687
694
|
}
|
|
688
695
|
M && console.log("[Auth] 🔓 Opening dataset session...");
|
|
689
|
-
const
|
|
696
|
+
const j = await fetch(`${s}/api/CreateOrOpen/${c}/400`, {
|
|
690
697
|
method: "PUT",
|
|
691
698
|
headers: {
|
|
692
699
|
"Content-Type": "application/json",
|
|
@@ -694,10 +701,10 @@ const Qt = ({
|
|
|
694
701
|
},
|
|
695
702
|
body: '""'
|
|
696
703
|
});
|
|
697
|
-
if (!
|
|
698
|
-
throw console.error("[Auth] ❌ CreateOrOpen failed:",
|
|
704
|
+
if (!j.ok)
|
|
705
|
+
throw console.error("[Auth] ❌ CreateOrOpen failed:", j.status, await j.text()), new Error("Failed to open dataset session.");
|
|
699
706
|
X(i), M && console.log("[Auth] ✅ Dataset session established");
|
|
700
|
-
const
|
|
707
|
+
const E = (N) => fetch(N, {
|
|
701
708
|
method: "GET",
|
|
702
709
|
headers: {
|
|
703
710
|
accept: "text/plain",
|
|
@@ -706,7 +713,7 @@ const Qt = ({
|
|
|
706
713
|
credentials: "include"
|
|
707
714
|
});
|
|
708
715
|
M && console.log("[Auth] 🔍 Checking dataset status...");
|
|
709
|
-
const H = await
|
|
716
|
+
const H = await E(`${s}/api/GetStatus/${c}`);
|
|
710
717
|
if (!H.ok) {
|
|
711
718
|
if (H.status === 401)
|
|
712
719
|
throw console.error("[Auth] ❌ Authentication failed (401 Unauthorized)"), console.error("[Auth] 💡 Your token may be expired or invalid"), console.error('[Auth] 💡 Get a fresh token with: curl -X POST "' + s + `/api/Login" -H "Content-Type: application/json" -d '{"userEmail":"your@email.com","userPassWord":"yourpassword"}'`), new Error("Authentication failed (401). Token may be expired. Check console for instructions.");
|
|
@@ -718,22 +725,22 @@ const Qt = ({
|
|
|
718
725
|
}
|
|
719
726
|
}
|
|
720
727
|
const B = await H.json();
|
|
721
|
-
M && console.log("[Auth] 📊 Dataset status:", B), B.
|
|
722
|
-
const
|
|
723
|
-
|
|
724
|
-
const [se,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
+
M && console.log("[Auth] 📊 Dataset status:", B), B.systemState !== void 0 && B.systemState !== Le.Ready && (console.warn("[Auth] ⚠️ Dataset is not ready yet. Current state:", Le[B.systemState]), console.warn("[Auth] 💡 Wait for indexing to complete before searching"));
|
|
729
|
+
const K = B.documentCount ?? B.numberOfRecords ?? 0;
|
|
730
|
+
K === 0 ? (console.warn('[Auth] ⚠️ Dataset "' + c + '" is empty (0 records)'), console.warn("[Auth] 💡 Add documents to your dataset before searching"), console.warn("[Auth] 💡 Search will work but return no results")) : M && console.log("[Auth] ✅ Dataset has", K, "records");
|
|
731
|
+
const [se, Q, Se] = await Promise.all([
|
|
732
|
+
E(`${s}/api/GetFilterableFields/${c}`),
|
|
733
|
+
E(`${s}/api/GetFacetableFields/${c}`),
|
|
734
|
+
E(`${s}/api/GetSortableFields/${c}`)
|
|
728
735
|
]);
|
|
729
736
|
if (!se.ok)
|
|
730
737
|
throw console.error("[Auth] ❌ GetFilterableFields failed:", se.status, await se.text()), new Error("Failed to get filterable fields. Check console for details.");
|
|
731
|
-
if (!
|
|
732
|
-
throw console.error("[Auth] ❌ GetFacetableFields failed:",
|
|
733
|
-
if (!
|
|
734
|
-
throw console.error("[Auth] ❌ GetSortableFields failed:",
|
|
735
|
-
const De = await se.json().catch((N) => (console.error("Failed to parse GetFilterableFields response:", N), [])),
|
|
736
|
-
O(De || []), P(
|
|
738
|
+
if (!Q.ok)
|
|
739
|
+
throw console.error("[Auth] ❌ GetFacetableFields failed:", Q.status, await Q.text()), new Error("Failed to get facetable fields. Check console for details.");
|
|
740
|
+
if (!Se.ok)
|
|
741
|
+
throw console.error("[Auth] ❌ GetSortableFields failed:", Se.status, await Se.text()), new Error("Failed to get sortable fields. Check console for details.");
|
|
742
|
+
const De = await se.json().catch((N) => (console.error("Failed to parse GetFilterableFields response:", N), [])), tt = await Q.json().catch((N) => (console.error("Failed to parse GetFacetableFields response:", N), [])), Re = await Se.json().catch((N) => (console.error("Failed to parse GetSortableFields response:", N), []));
|
|
743
|
+
O(De || []), P(tt || []), U(Re || []);
|
|
737
744
|
let Ce = { facets: {} };
|
|
738
745
|
try {
|
|
739
746
|
const N = await fetch(`${s}/api/Search/${c}`, {
|
|
@@ -771,7 +778,7 @@ const Qt = ({
|
|
|
771
778
|
}, R(we), a(Me), ke(we), b((N) => ({
|
|
772
779
|
...N,
|
|
773
780
|
facetStats: we,
|
|
774
|
-
totalDocumentCount:
|
|
781
|
+
totalDocumentCount: K
|
|
775
782
|
})), M && console.log("[Auth] ✅ Initialization complete");
|
|
776
783
|
} catch (i) {
|
|
777
784
|
throw console.error("[Auth] ❌ Initialization failed:", i), (i instanceof Error || typeof i == "object" && i !== null && "message" in i) && console.error("[Auth] 💡 Error:", i.message), i instanceof TypeError && i.message.includes("fetch") && (console.error("[Auth] ❌ Network error - cannot connect to INDX server"), console.error("[Auth] 💡 Check if the server is running at:", s), console.error("[Auth] 💡 Check your NEXT_PUBLIC_INDX_URL in .env.local"), console.error("[Auth] 💡 For local development, it should be: http://localhost:5001")), i;
|
|
@@ -780,24 +787,24 @@ const Qt = ({
|
|
|
780
787
|
}
|
|
781
788
|
})();
|
|
782
789
|
}, [o, u, s, c]), /* @__PURE__ */ t.jsx(
|
|
783
|
-
|
|
790
|
+
dt.Provider,
|
|
784
791
|
{
|
|
785
792
|
value: {
|
|
786
793
|
state: {
|
|
787
794
|
...h,
|
|
788
|
-
filterableFields:
|
|
795
|
+
filterableFields: Z,
|
|
789
796
|
facetableFields: pe,
|
|
790
797
|
sortableFields: w,
|
|
791
|
-
rangeBounds:
|
|
798
|
+
rangeBounds: ve
|
|
792
799
|
},
|
|
793
800
|
isFetchingInitial: ce,
|
|
794
801
|
allowEmptySearch: p,
|
|
795
802
|
setQuery: I,
|
|
796
803
|
toggleFilter: Ae,
|
|
797
804
|
setRangeFilter: qe,
|
|
798
|
-
resetFilters:
|
|
799
|
-
resetSingleFilter:
|
|
800
|
-
setSort:
|
|
805
|
+
resetFilters: ze,
|
|
806
|
+
resetSingleFilter: ft,
|
|
807
|
+
setSort: mt,
|
|
801
808
|
setDebounceDelay: J,
|
|
802
809
|
setSearchSettings: _e,
|
|
803
810
|
fetchMoreResults: Te
|
|
@@ -806,11 +813,11 @@ const Qt = ({
|
|
|
806
813
|
}
|
|
807
814
|
);
|
|
808
815
|
}, Ne = () => {
|
|
809
|
-
const r =
|
|
816
|
+
const r = yt(dt);
|
|
810
817
|
if (!r)
|
|
811
818
|
throw new Error("useSearchContext must be used within a SearchProvider");
|
|
812
819
|
return r;
|
|
813
|
-
},
|
|
820
|
+
}, er = ({
|
|
814
821
|
className: r = "",
|
|
815
822
|
autoFocus: o = !1,
|
|
816
823
|
inputSize: u = "default",
|
|
@@ -818,15 +825,15 @@ const Qt = ({
|
|
|
818
825
|
showFocus: c = !1,
|
|
819
826
|
...p
|
|
820
827
|
}) => {
|
|
821
|
-
const { state: { query:
|
|
828
|
+
const { state: { query: S, filters: m, rangeFilters: n, searchSettings: C }, setQuery: A } = Ne();
|
|
822
829
|
Object.keys(m).length > 0 || Object.keys(n).length > 0;
|
|
823
|
-
const k =
|
|
830
|
+
const k = S.length > 0;
|
|
824
831
|
return /* @__PURE__ */ t.jsx(
|
|
825
|
-
|
|
832
|
+
St,
|
|
826
833
|
{
|
|
827
834
|
type: "text",
|
|
828
|
-
value:
|
|
829
|
-
onChange: (
|
|
835
|
+
value: S,
|
|
836
|
+
onChange: (q) => A(q.target.value),
|
|
830
837
|
placeholder: C.placeholderText,
|
|
831
838
|
autoFocus: o,
|
|
832
839
|
className: r,
|
|
@@ -846,46 +853,46 @@ const Qt = ({
|
|
|
846
853
|
)
|
|
847
854
|
}
|
|
848
855
|
);
|
|
849
|
-
},
|
|
850
|
-
placeholder:
|
|
851
|
-
invalid:
|
|
852
|
-
row:
|
|
853
|
-
indexNumber:
|
|
854
|
-
scoreNumber:
|
|
855
|
-
},
|
|
856
|
+
}, Et = "_placeholder_1k92x_1", Nt = "_invalid_1k92x_10", _t = "_row_1k92x_14", Tt = "_indexNumber_1k92x_38", At = "_scoreNumber_1k92x_45", Fe = {
|
|
857
|
+
placeholder: Et,
|
|
858
|
+
invalid: Nt,
|
|
859
|
+
row: _t,
|
|
860
|
+
indexNumber: Tt,
|
|
861
|
+
scoreNumber: At
|
|
862
|
+
}, Vt = ({ color: r = "black", size: o = 21 }) => {
|
|
856
863
|
const u = 0.7142857142857143, s = o, c = typeof o == "number" ? o * u : `calc(${o} * 0.7142857142857143)`;
|
|
857
864
|
return t.jsx("svg", { width: s, height: c, viewBox: "0 0 7 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: t.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 0H3V1V2V3H2V2H1V3H2V4H3V5H4V4H5V3H6V2H5V3H4V2V1V0ZM4 3V4H3V3H4Z", fill: r }) });
|
|
858
|
-
},
|
|
865
|
+
}, Ot = ({ color: r = "black", size: o = 21 }) => {
|
|
859
866
|
const u = 0.7142857142857143, s = o, c = typeof o == "number" ? o * u : `calc(${o} * 0.7142857142857143)`;
|
|
860
867
|
return t.jsx("svg", { width: s, height: c, viewBox: "0 0 7 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: t.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5 0H4V1H5V2H4H3H2H1V3H2H3H4H5V4H4V5H5V4H6V3H7V2H6V1H5V0ZM6 2H5V3H6V2Z", fill: r }) });
|
|
861
|
-
},
|
|
868
|
+
}, Pt = ({ color: r = "black", size: o = 21 }) => {
|
|
862
869
|
const u = 0.7142857142857143, s = o, c = typeof o == "number" ? o * u : `calc(${o} * 0.7142857142857143)`;
|
|
863
870
|
return t.jsx("svg", { width: s, height: c, viewBox: "0 0 7 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: t.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M5 0H6V1H5V0ZM6 1H7V2H6V1ZM0 1H1V2H0V1ZM1 1V0H2V1H1ZM6 3H7V4H6V3ZM6 4V5H5V4H6ZM1 4H2V5H1V4ZM1 4H0V3H1V4ZM2 2H5V3H2V2Z", fill: r }) });
|
|
864
|
-
},
|
|
871
|
+
}, ht = ({ color: r = "black", size: o = 21 }) => {
|
|
865
872
|
const u = 0.7142857142857143, s = o, c = typeof o == "number" ? o * u : `calc(${o} * 0.7142857142857143)`;
|
|
866
873
|
return t.jsx("svg", { width: s, height: c, viewBox: "0 0 7 5", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: t.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1 0H2V1H1V0ZM3 2H2V1H3V2ZM4 2H3V3H2V4H1V5H2V4H3V3H4V4H5V5H6V4H5V3H4V2ZM5 1V2H4V1H5ZM5 1V0H6V1H5Z", fill: r }) });
|
|
867
|
-
},
|
|
874
|
+
}, tr = ({ fields: r, resultsPerPage: o, children: u }) => {
|
|
868
875
|
const {
|
|
869
|
-
state: { results: s, resultsSuppressed: c, searchSettings: p, truncationIndex:
|
|
876
|
+
state: { results: s, resultsSuppressed: c, searchSettings: p, truncationIndex: S, query: m },
|
|
870
877
|
isFetchingInitial: n,
|
|
871
878
|
fetchMoreResults: C
|
|
872
|
-
} = Ne(), A = o ?? 30, [k,
|
|
879
|
+
} = Ne(), A = o ?? 30, [k, q] = G(A), M = he(0), ne = he("");
|
|
873
880
|
ie(() => {
|
|
874
881
|
const _ = m !== ne.current;
|
|
875
|
-
(!s || s.length < M.current || _) &&
|
|
882
|
+
(!s || s.length < M.current || _) && q(A), M.current = (s == null ? void 0 : s.length) ?? 0, ne.current = m;
|
|
876
883
|
}, [s, A, m]);
|
|
877
|
-
const
|
|
884
|
+
const L = s && s.length > k, x = () => {
|
|
878
885
|
const _ = k + A;
|
|
879
|
-
|
|
886
|
+
q(_), s && _ >= s.length && (!S || S === -1 || S > s.length) && C(s.length + A);
|
|
880
887
|
};
|
|
881
|
-
return n || c || s === null ? /* @__PURE__ */ t.jsx("div", { className:
|
|
882
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
883
|
-
const
|
|
888
|
+
return n || c || s === null ? /* @__PURE__ */ t.jsx("div", { className: Fe.placeholder, children: /* @__PURE__ */ t.jsx(Pt, { size: 200, color: "var(--lv5)" }) }) : s.length === 0 ? /* @__PURE__ */ t.jsx("div", { className: Fe.invalid, children: /* @__PURE__ */ t.jsx("p", { children: "No results found." }) }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
889
|
+
/* @__PURE__ */ t.jsx("div", { className: Fe.container, children: (s ?? []).slice(0, k).map((_, g) => {
|
|
890
|
+
const v = _.document, W = _.score;
|
|
884
891
|
let h;
|
|
885
892
|
try {
|
|
886
|
-
h = typeof
|
|
893
|
+
h = typeof v == "string" ? JSON.parse(v) : v;
|
|
887
894
|
} catch {
|
|
888
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
895
|
+
return /* @__PURE__ */ t.jsx("div", { className: Fe.invalid, children: /* @__PURE__ */ t.jsx("p", { children: "Invalid JSON" }) }, g);
|
|
889
896
|
}
|
|
890
897
|
let b;
|
|
891
898
|
if (r && r.length > 0) {
|
|
@@ -897,60 +904,60 @@ const Qt = ({
|
|
|
897
904
|
for (const d in b) {
|
|
898
905
|
const X = b[d];
|
|
899
906
|
if (typeof X == "string" && X.startsWith("[") && X.endsWith("]")) {
|
|
900
|
-
const V = X.replace(/^\[|\]$/g, "").split(",").map((
|
|
907
|
+
const V = X.replace(/^\[|\]$/g, "").split(",").map((Z) => Z.trim().replace(/^'|'$/g, "")).filter((Z) => Z.length > 0);
|
|
901
908
|
b[d] = V;
|
|
902
909
|
}
|
|
903
910
|
}
|
|
904
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
905
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
911
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Fe.row, children: [
|
|
912
|
+
/* @__PURE__ */ t.jsx("div", { className: Fe.indexNumber, children: g }),
|
|
906
913
|
u(b),
|
|
907
|
-
p.showScore && /* @__PURE__ */ t.jsx("div", { className:
|
|
914
|
+
p.showScore && /* @__PURE__ */ t.jsx("div", { className: Fe.scoreNumber, children: W })
|
|
908
915
|
] }, g);
|
|
909
916
|
}) }),
|
|
910
|
-
|
|
917
|
+
L && /* @__PURE__ */ t.jsx("div", { style: { textAlign: "center", marginTop: "20px" }, children: /* @__PURE__ */ t.jsx(
|
|
911
918
|
ye,
|
|
912
919
|
{
|
|
913
920
|
variant: "secondary",
|
|
914
921
|
size: "micro",
|
|
915
|
-
onClick:
|
|
916
|
-
children: m.trim() === "" ? "Load more" :
|
|
922
|
+
onClick: x,
|
|
923
|
+
children: m.trim() === "" ? "Load more" : S !== -1 && S !== void 0 && S > 0 ? `Load results ${k + 1}-${Math.min(k + A, s.length, S)} of ${S}` : "Load more"
|
|
917
924
|
}
|
|
918
925
|
) })
|
|
919
926
|
] });
|
|
920
|
-
},
|
|
921
|
-
list:
|
|
922
|
-
count:
|
|
923
|
-
grid:
|
|
924
|
-
},
|
|
927
|
+
}, Ht = "_list_mwzqq_2", $t = "_count_mwzqq_7", It = "_grid_mwzqq_16", Ee = {
|
|
928
|
+
list: Ht,
|
|
929
|
+
count: $t,
|
|
930
|
+
grid: It
|
|
931
|
+
}, rr = ({
|
|
925
932
|
field: r,
|
|
926
933
|
label: o,
|
|
927
934
|
preserveBlankFacetState: u = !1,
|
|
928
935
|
preserveBlankFacetStateOrder: s = !1,
|
|
929
936
|
sortFacetsBy: c = "histogram",
|
|
930
937
|
limit: p = 10,
|
|
931
|
-
collapsible:
|
|
938
|
+
collapsible: S = !0,
|
|
932
939
|
startCollapsed: m = !1,
|
|
933
940
|
displayType: n = "checkbox",
|
|
934
941
|
layout: C = "list",
|
|
935
942
|
showActivePanel: A = !1,
|
|
936
943
|
showCount: k = !0,
|
|
937
|
-
showNull:
|
|
944
|
+
showNull: q = !1,
|
|
938
945
|
displayIfEmptyQuery: M = !0,
|
|
939
|
-
displayCondition: ne = (
|
|
946
|
+
displayCondition: ne = (L) => !0
|
|
940
947
|
}) => {
|
|
941
948
|
const {
|
|
942
|
-
state: { facets:
|
|
949
|
+
state: { facets: L, filterableFields: x, facetableFields: _, filters: g, query: v },
|
|
943
950
|
toggleFilter: W,
|
|
944
951
|
isFetchingInitial: h,
|
|
945
952
|
allowEmptySearch: b
|
|
946
953
|
} = Ne(), d = he(null), [X, z] = G(p);
|
|
947
954
|
if (ie(() => {
|
|
948
955
|
z(p);
|
|
949
|
-
}, [
|
|
956
|
+
}, [L == null ? void 0 : L[r], p]), !b && !v || h || !L || !ne({ query: v ?? "", filters: g, facets: L }) || !M && !v && Object.keys(g).length < 1)
|
|
950
957
|
return null;
|
|
951
|
-
if (!(
|
|
958
|
+
if (!(x != null && x.includes(r)) || !(_ != null && _.includes(r))) {
|
|
952
959
|
const f = [];
|
|
953
|
-
return
|
|
960
|
+
return x != null && x.includes(r) || f.push("filterable"), _ != null && _.includes(r) || f.push("facetable"), /* @__PURE__ */ t.jsx(be, { collapsible: !1, children: /* @__PURE__ */ t.jsxs("div", { style: { color: "red", fontSize: "12px" }, children: [
|
|
954
961
|
'Cannot render filter for "',
|
|
955
962
|
r,
|
|
956
963
|
'": missing ',
|
|
@@ -958,9 +965,9 @@ const Qt = ({
|
|
|
958
965
|
"."
|
|
959
966
|
] }) });
|
|
960
967
|
}
|
|
961
|
-
const V =
|
|
968
|
+
const V = L == null ? void 0 : L[r];
|
|
962
969
|
if (!V || !Array.isArray(V)) return null;
|
|
963
|
-
const
|
|
970
|
+
const Z = (g == null ? void 0 : g[r]) ?? [];
|
|
964
971
|
u && !d.current && V.length > 0 && (d.current = V.reduce(
|
|
965
972
|
(f, R) => (f[R.key] = R.value, f),
|
|
966
973
|
{}
|
|
@@ -979,8 +986,8 @@ const Qt = ({
|
|
|
979
986
|
O.set("false", (R ?? 0) + f), O.delete("null");
|
|
980
987
|
}
|
|
981
988
|
if (n === "toggle" && !pe)
|
|
982
|
-
return /* @__PURE__ */ t.jsx(be, { collapsible: !1, children: /* @__PURE__ */ t.jsx("div", { className:
|
|
983
|
-
|
|
989
|
+
return /* @__PURE__ */ t.jsx(be, { collapsible: !1, children: /* @__PURE__ */ t.jsx("div", { className: Ee.count, children: /* @__PURE__ */ t.jsx(
|
|
990
|
+
re,
|
|
984
991
|
{
|
|
985
992
|
label: o,
|
|
986
993
|
checked: !1,
|
|
@@ -990,10 +997,10 @@ const Qt = ({
|
|
|
990
997
|
}
|
|
991
998
|
) }) });
|
|
992
999
|
if (pe) {
|
|
993
|
-
const f = O.get("true"), R = typeof f == "number" ? f : null, e =
|
|
994
|
-
return /* @__PURE__ */ t.jsx(be, { collapsible: !1, children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1000
|
+
const f = O.get("true"), R = typeof f == "number" ? f : null, e = Z.includes("true"), a = R === 0, y = k && (R ?? 0) > 0 ? `${R}` : "";
|
|
1001
|
+
return /* @__PURE__ */ t.jsx(be, { collapsible: !1, children: /* @__PURE__ */ t.jsxs("div", { className: Ee.count, children: [
|
|
995
1002
|
/* @__PURE__ */ t.jsx(
|
|
996
|
-
|
|
1003
|
+
re,
|
|
997
1004
|
{
|
|
998
1005
|
label: o,
|
|
999
1006
|
checked: e,
|
|
@@ -1006,15 +1013,15 @@ const Qt = ({
|
|
|
1006
1013
|
] }) });
|
|
1007
1014
|
}
|
|
1008
1015
|
let P = Array.from(O.entries());
|
|
1009
|
-
if (
|
|
1016
|
+
if (q || (P = P.filter(([f]) => f !== "null")), P.length === 0 && !u)
|
|
1010
1017
|
return null;
|
|
1011
1018
|
if (!s) if (c === "alphabetical") {
|
|
1012
1019
|
const f = P.filter(([, e]) => typeof e == "number" && e > 0).sort(([e], [a]) => e.localeCompare(a)), R = P.filter(([, e]) => e === 0 || e === null).sort(([e], [a]) => e.localeCompare(a));
|
|
1013
1020
|
P = [...f, ...R];
|
|
1014
1021
|
} else if (c === "numeric") {
|
|
1015
1022
|
const f = (a, y) => {
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
1023
|
+
const F = Number(a), ue = Number(y), xe = !isNaN(F), T = !isNaN(ue);
|
|
1024
|
+
return xe && T ? F - ue : a.localeCompare(y);
|
|
1018
1025
|
}, R = P.filter(([, a]) => typeof a == "number" && a > 0).sort(([a], [y]) => f(a, y)), e = P.filter(([, a]) => a === 0 || a === null).sort(([a], [y]) => f(a, y));
|
|
1019
1026
|
P = [...R, ...e];
|
|
1020
1027
|
} else {
|
|
@@ -1022,10 +1029,10 @@ const Qt = ({
|
|
|
1022
1029
|
P = [...f, ...R];
|
|
1023
1030
|
}
|
|
1024
1031
|
const w = typeof p == "number" && P.length > p, U = w ? P.slice(0, X) : P, ce = (f, R) => {
|
|
1025
|
-
const e =
|
|
1032
|
+
const e = Z.includes(f), a = R === 0, y = k && (R ?? 0) > 0 ? ` (${R})` : "", F = k && (R ?? 0) > 0 ? R : "";
|
|
1026
1033
|
switch (n) {
|
|
1027
1034
|
case "button":
|
|
1028
|
-
return C === "list" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1035
|
+
return C === "list" ? /* @__PURE__ */ t.jsxs("div", { className: Ee.count, children: [
|
|
1029
1036
|
/* @__PURE__ */ t.jsx(
|
|
1030
1037
|
ye,
|
|
1031
1038
|
{
|
|
@@ -1036,7 +1043,7 @@ const Qt = ({
|
|
|
1036
1043
|
children: f
|
|
1037
1044
|
}
|
|
1038
1045
|
),
|
|
1039
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1046
|
+
/* @__PURE__ */ t.jsx("span", { children: F })
|
|
1040
1047
|
] }) : /* @__PURE__ */ t.jsx(
|
|
1041
1048
|
ye,
|
|
1042
1049
|
{
|
|
@@ -1049,7 +1056,7 @@ const Qt = ({
|
|
|
1049
1056
|
);
|
|
1050
1057
|
case "toggle":
|
|
1051
1058
|
return /* @__PURE__ */ t.jsx(
|
|
1052
|
-
|
|
1059
|
+
re,
|
|
1053
1060
|
{
|
|
1054
1061
|
label: f,
|
|
1055
1062
|
checked: e,
|
|
@@ -1059,9 +1066,9 @@ const Qt = ({
|
|
|
1059
1066
|
);
|
|
1060
1067
|
case "checkbox":
|
|
1061
1068
|
default:
|
|
1062
|
-
return C === "list" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1069
|
+
return C === "list" ? /* @__PURE__ */ t.jsxs("div", { className: Ee.count, children: [
|
|
1063
1070
|
/* @__PURE__ */ t.jsx(
|
|
1064
|
-
|
|
1071
|
+
nt,
|
|
1065
1072
|
{
|
|
1066
1073
|
label: f,
|
|
1067
1074
|
score: "",
|
|
@@ -1070,9 +1077,9 @@ const Qt = ({
|
|
|
1070
1077
|
disabled: a
|
|
1071
1078
|
}
|
|
1072
1079
|
),
|
|
1073
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1080
|
+
/* @__PURE__ */ t.jsx("span", { children: F })
|
|
1074
1081
|
] }) : /* @__PURE__ */ t.jsx(
|
|
1075
|
-
|
|
1082
|
+
nt,
|
|
1076
1083
|
{
|
|
1077
1084
|
label: f,
|
|
1078
1085
|
score: y,
|
|
@@ -1082,23 +1089,23 @@ const Qt = ({
|
|
|
1082
1089
|
}
|
|
1083
1090
|
);
|
|
1084
1091
|
}
|
|
1085
|
-
}, fe =
|
|
1092
|
+
}, fe = S ? m : !1;
|
|
1086
1093
|
return /* @__PURE__ */ t.jsx(
|
|
1087
1094
|
be,
|
|
1088
1095
|
{
|
|
1089
1096
|
title: o,
|
|
1090
|
-
collapsible:
|
|
1097
|
+
collapsible: S,
|
|
1091
1098
|
collapsed: fe,
|
|
1092
1099
|
children: /* @__PURE__ */ t.jsxs(
|
|
1093
1100
|
"ul",
|
|
1094
1101
|
{
|
|
1095
|
-
className: C === "grid" ?
|
|
1102
|
+
className: C === "grid" ? Ee.grid : Ee.list,
|
|
1096
1103
|
style: { listStyle: "none", padding: 0, margin: 0 },
|
|
1097
1104
|
children: [
|
|
1098
1105
|
U.map(([f, R]) => /* @__PURE__ */ t.jsx("li", { children: ce(f, R) }, f)),
|
|
1099
1106
|
w && X < P.length && (() => {
|
|
1100
1107
|
const f = P.length - X, R = Math.min(50, f);
|
|
1101
|
-
return /* @__PURE__ */ t.jsx("li", { className:
|
|
1108
|
+
return /* @__PURE__ */ t.jsx("li", { className: Ee.toggleItem, children: /* @__PURE__ */ t.jsx(
|
|
1102
1109
|
ye,
|
|
1103
1110
|
{
|
|
1104
1111
|
variant: "ghost",
|
|
@@ -1113,92 +1120,92 @@ const Qt = ({
|
|
|
1113
1120
|
)
|
|
1114
1121
|
}
|
|
1115
1122
|
);
|
|
1116
|
-
},
|
|
1117
|
-
disabledMessage:
|
|
1118
|
-
},
|
|
1123
|
+
}, Dt = "_disabledMessage_o89gh_1", lt = {
|
|
1124
|
+
disabledMessage: Dt
|
|
1125
|
+
}, nr = ({
|
|
1119
1126
|
field: r,
|
|
1120
1127
|
label: o,
|
|
1121
1128
|
expectedMin: u = 0,
|
|
1122
1129
|
expectedMax: s = 1e3,
|
|
1123
1130
|
displayType: c = "input",
|
|
1124
1131
|
collapsible: p = !0,
|
|
1125
|
-
startCollapsed:
|
|
1132
|
+
startCollapsed: S = !1
|
|
1126
1133
|
}) => {
|
|
1127
1134
|
const {
|
|
1128
1135
|
state: { rangeFilters: m, rangeBounds: n, facetStats: C, query: A, facetDebounceDelayMillis: k },
|
|
1129
|
-
setRangeFilter:
|
|
1136
|
+
setRangeFilter: q,
|
|
1130
1137
|
resetSingleFilter: M,
|
|
1131
1138
|
allowEmptySearch: ne,
|
|
1132
|
-
isFetchingInitial:
|
|
1133
|
-
} = Ne(),
|
|
1134
|
-
|
|
1139
|
+
isFetchingInitial: L
|
|
1140
|
+
} = Ne(), x = (n == null ? void 0 : n[r]) !== void 0, _ = (n == null ? void 0 : n[r]) ?? { min: u, max: s }, g = _.min, v = _.max, W = (C == null ? void 0 : C[r]) ?? _, h = W.min, b = W.max, d = x && g === v, X = d ? u : g, z = d ? s : v, V = m == null ? void 0 : m[r], Z = V ? V.min : g, O = V ? V.max : v, pe = V !== void 0, P = h !== g || b !== v, [w, U] = te.useState([
|
|
1141
|
+
Z,
|
|
1135
1142
|
O
|
|
1136
|
-
]), [ce, fe] =
|
|
1137
|
-
const [$, I] = w, J = Math.max(g, Math.min(
|
|
1138
|
-
return { finalMin: Te, finalMax: Ae, isValidMin: qe, isValidMax:
|
|
1139
|
-
}, [w, g,
|
|
1140
|
-
|
|
1143
|
+
]), [ce, fe] = te.useState(!1), [f, R] = te.useState(!1), { finalMin: e, finalMax: a, isValidMin: y, isValidMax: F } = te.useMemo(() => {
|
|
1144
|
+
const [$, I] = w, J = Math.max(g, Math.min(v, $)), _e = Math.max(g, Math.min(v, I)), Te = Math.min(J, _e), Ae = Math.max(J, _e), qe = Te >= g && Te < Ae, ze = Ae <= v && Ae > Te;
|
|
1145
|
+
return { finalMin: Te, finalMax: Ae, isValidMin: qe, isValidMax: ze };
|
|
1146
|
+
}, [w, g, v]);
|
|
1147
|
+
te.useEffect(() => {
|
|
1141
1148
|
if (d)
|
|
1142
1149
|
return;
|
|
1143
|
-
if (w[0] === g && w[1] ===
|
|
1150
|
+
if (w[0] === g && w[1] === v) {
|
|
1144
1151
|
fe(!1), R(!1);
|
|
1145
1152
|
return;
|
|
1146
1153
|
}
|
|
1147
1154
|
const I = k ?? 500, J = setTimeout(() => {
|
|
1148
|
-
fe(!y), R(!
|
|
1155
|
+
fe(!y), R(!F);
|
|
1149
1156
|
}, 300), _e = setTimeout(() => {
|
|
1150
|
-
y &&
|
|
1157
|
+
y && F && (e === g && a === v ? M(r, void 0, !1) : q(r, e, a));
|
|
1151
1158
|
}, I);
|
|
1152
1159
|
return () => {
|
|
1153
1160
|
clearTimeout(J), clearTimeout(_e);
|
|
1154
1161
|
};
|
|
1155
|
-
}, [e, a, y,
|
|
1156
|
-
U([
|
|
1157
|
-
}, [
|
|
1158
|
-
const ue =
|
|
1162
|
+
}, [e, a, y, F, g, v, r, M, q, k, d]), te.useEffect(() => {
|
|
1163
|
+
U([Z, O]), fe(!1), R(!1);
|
|
1164
|
+
}, [Z, O, r]);
|
|
1165
|
+
const ue = te.useCallback(($) => {
|
|
1159
1166
|
if (d) return;
|
|
1160
|
-
const I = Math.max(g, Math.min(b, $[0])), J = Math.max(h, Math.min(
|
|
1167
|
+
const I = Math.max(g, Math.min(b, $[0])), J = Math.max(h, Math.min(v, $[1]));
|
|
1161
1168
|
U([I, J]);
|
|
1162
|
-
}, [d, g,
|
|
1169
|
+
}, [d, g, v, h, b]), xe = te.useCallback(($) => {
|
|
1163
1170
|
if (d) return;
|
|
1164
|
-
const I = Math.max(g, Math.min(b, $[0])), J = Math.max(h, Math.min(
|
|
1165
|
-
I === g && J ===
|
|
1166
|
-
}, [d, g,
|
|
1171
|
+
const I = Math.max(g, Math.min(b, $[0])), J = Math.max(h, Math.min(v, $[1]));
|
|
1172
|
+
I === g && J === v ? (U([g, v]), M(r, void 0, !0)) : U([I, J]);
|
|
1173
|
+
}, [d, g, v, h, b, r, M]), T = te.useCallback(($) => {
|
|
1167
1174
|
if (d) return;
|
|
1168
1175
|
const I = Number($.target.value);
|
|
1169
1176
|
if (!isNaN(I)) {
|
|
1170
1177
|
const J = Math.max(g, Math.min(b, I));
|
|
1171
1178
|
U([J, w[1]]);
|
|
1172
1179
|
}
|
|
1173
|
-
}, [d, w, g, b]), de =
|
|
1180
|
+
}, [d, w, g, b]), de = te.useCallback(($) => {
|
|
1174
1181
|
if (d) return;
|
|
1175
1182
|
const I = Number($.target.value);
|
|
1176
1183
|
if (!isNaN(I)) {
|
|
1177
|
-
const J = Math.max(h, Math.min(
|
|
1184
|
+
const J = Math.max(h, Math.min(v, I));
|
|
1178
1185
|
U([w[0], J]);
|
|
1179
1186
|
}
|
|
1180
|
-
}, [d, w, h,
|
|
1187
|
+
}, [d, w, h, v]), ve = te.useCallback(() => {
|
|
1181
1188
|
const $ = w[0], I = Math.max(g, Math.min(b, $));
|
|
1182
1189
|
I < w[1] ? U([I, w[1]]) : U([g, w[1]]);
|
|
1183
|
-
}, [w, g, b]), ke =
|
|
1184
|
-
const $ = w[1], I = Math.max(h, Math.min(
|
|
1185
|
-
I > w[0] ? U([w[0], I]) : U([w[0],
|
|
1186
|
-
}, [w, h,
|
|
1187
|
-
return
|
|
1188
|
-
d && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1190
|
+
}, [w, g, b]), ke = te.useCallback(() => {
|
|
1191
|
+
const $ = w[1], I = Math.max(h, Math.min(v, $));
|
|
1192
|
+
I > w[0] ? U([w[0], I]) : U([w[0], v]);
|
|
1193
|
+
}, [w, h, v]);
|
|
1194
|
+
return L || !ne && !A ? null : c === "slider" ? /* @__PURE__ */ t.jsxs(be, { title: o, collapsed: S, collapsible: p, children: [
|
|
1195
|
+
d && /* @__PURE__ */ t.jsxs("div", { className: lt.disabledMessage, children: [
|
|
1189
1196
|
"No adjustable range (all results have the same value: ",
|
|
1190
1197
|
g,
|
|
1191
1198
|
")."
|
|
1192
1199
|
] }),
|
|
1193
1200
|
/* @__PURE__ */ t.jsx("div", { style: { padding: "10px 10px 20px 10px" }, children: /* @__PURE__ */ t.jsx(
|
|
1194
|
-
|
|
1201
|
+
ut,
|
|
1195
1202
|
{
|
|
1196
1203
|
min: X,
|
|
1197
1204
|
max: z,
|
|
1198
1205
|
value: d ? [X, z] : [e, a],
|
|
1199
1206
|
isRange: !0,
|
|
1200
1207
|
onChange: ($) => ue($),
|
|
1201
|
-
onFinalChange: ($) =>
|
|
1208
|
+
onFinalChange: ($) => xe($),
|
|
1202
1209
|
disabled: d,
|
|
1203
1210
|
activeMin: h,
|
|
1204
1211
|
activeMax: b,
|
|
@@ -1219,7 +1226,7 @@ const Qt = ({
|
|
|
1219
1226
|
},
|
|
1220
1227
|
children: [
|
|
1221
1228
|
/* @__PURE__ */ t.jsx(
|
|
1222
|
-
|
|
1229
|
+
le,
|
|
1223
1230
|
{
|
|
1224
1231
|
label: "Min:",
|
|
1225
1232
|
type: "number",
|
|
@@ -1227,19 +1234,19 @@ const Qt = ({
|
|
|
1227
1234
|
min: g,
|
|
1228
1235
|
max: Math.min(b, w[1] - 1),
|
|
1229
1236
|
onChange: T,
|
|
1230
|
-
onBlur:
|
|
1237
|
+
onBlur: ve,
|
|
1231
1238
|
disabled: d,
|
|
1232
1239
|
isValid: d || !ce
|
|
1233
1240
|
}
|
|
1234
1241
|
),
|
|
1235
1242
|
/* @__PURE__ */ t.jsx(
|
|
1236
|
-
|
|
1243
|
+
le,
|
|
1237
1244
|
{
|
|
1238
1245
|
label: "Max:",
|
|
1239
1246
|
type: "number",
|
|
1240
|
-
value: d ?
|
|
1247
|
+
value: d ? v : w[1],
|
|
1241
1248
|
min: Math.max(h, w[0] + 1),
|
|
1242
|
-
max:
|
|
1249
|
+
max: v,
|
|
1243
1250
|
onChange: de,
|
|
1244
1251
|
onBlur: ke,
|
|
1245
1252
|
disabled: d,
|
|
@@ -1250,14 +1257,14 @@ const Qt = ({
|
|
|
1250
1257
|
}
|
|
1251
1258
|
)
|
|
1252
1259
|
] }) : /* @__PURE__ */ t.jsxs(be, { title: o, children: [
|
|
1253
|
-
d && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1260
|
+
d && /* @__PURE__ */ t.jsxs("div", { className: lt.disabledMessage, children: [
|
|
1254
1261
|
"No adjustable range (all results have the same value: ",
|
|
1255
1262
|
g,
|
|
1256
1263
|
")."
|
|
1257
1264
|
] }),
|
|
1258
1265
|
/* @__PURE__ */ t.jsxs("div", { style: { display: "flex", gap: "10px", alignItems: "flex-start" }, children: [
|
|
1259
1266
|
/* @__PURE__ */ t.jsx(
|
|
1260
|
-
|
|
1267
|
+
le,
|
|
1261
1268
|
{
|
|
1262
1269
|
label: "Min:",
|
|
1263
1270
|
type: "number",
|
|
@@ -1265,19 +1272,19 @@ const Qt = ({
|
|
|
1265
1272
|
min: g,
|
|
1266
1273
|
max: Math.min(b, w[1] - 1),
|
|
1267
1274
|
onChange: T,
|
|
1268
|
-
onBlur:
|
|
1275
|
+
onBlur: ve,
|
|
1269
1276
|
disabled: d,
|
|
1270
1277
|
isValid: d || !ce
|
|
1271
1278
|
}
|
|
1272
1279
|
),
|
|
1273
1280
|
/* @__PURE__ */ t.jsx(
|
|
1274
|
-
|
|
1281
|
+
le,
|
|
1275
1282
|
{
|
|
1276
1283
|
label: "Max:",
|
|
1277
1284
|
type: "number",
|
|
1278
|
-
value: d ?
|
|
1285
|
+
value: d ? v : w[1],
|
|
1279
1286
|
min: Math.max(h, w[0] + 1),
|
|
1280
|
-
max:
|
|
1287
|
+
max: v,
|
|
1281
1288
|
onChange: de,
|
|
1282
1289
|
onBlur: ke,
|
|
1283
1290
|
disabled: d,
|
|
@@ -1286,13 +1293,13 @@ const Qt = ({
|
|
|
1286
1293
|
)
|
|
1287
1294
|
] })
|
|
1288
1295
|
] });
|
|
1289
|
-
},
|
|
1290
|
-
grid:
|
|
1291
|
-
},
|
|
1296
|
+
}, Wt = "_grid_nvpmn_2", Bt = {
|
|
1297
|
+
grid: Wt
|
|
1298
|
+
}, Lt = ct(({ field: r, value: o, onReset: u }) => /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs(
|
|
1292
1299
|
ye,
|
|
1293
1300
|
{
|
|
1294
1301
|
onClick: u,
|
|
1295
|
-
iconRight: /* @__PURE__ */ t.jsx(
|
|
1302
|
+
iconRight: /* @__PURE__ */ t.jsx(ht, {}),
|
|
1296
1303
|
variant: "primary",
|
|
1297
1304
|
size: "micro",
|
|
1298
1305
|
children: [
|
|
@@ -1301,11 +1308,11 @@ const Qt = ({
|
|
|
1301
1308
|
o
|
|
1302
1309
|
]
|
|
1303
1310
|
}
|
|
1304
|
-
) })),
|
|
1311
|
+
) })), qt = ct(({ field: r, min: o, max: u, onReset: s }) => /* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsxs(
|
|
1305
1312
|
ye,
|
|
1306
1313
|
{
|
|
1307
1314
|
onClick: s,
|
|
1308
|
-
iconRight: /* @__PURE__ */ t.jsx(
|
|
1315
|
+
iconRight: /* @__PURE__ */ t.jsx(ht, {}),
|
|
1309
1316
|
variant: "primary",
|
|
1310
1317
|
size: "micro",
|
|
1311
1318
|
children: [
|
|
@@ -1317,26 +1324,26 @@ const Qt = ({
|
|
|
1317
1324
|
]
|
|
1318
1325
|
}
|
|
1319
1326
|
) }));
|
|
1320
|
-
function
|
|
1327
|
+
function sr() {
|
|
1321
1328
|
const {
|
|
1322
1329
|
state: { filters: r, rangeFilters: o },
|
|
1323
1330
|
resetFilters: u,
|
|
1324
1331
|
resetSingleFilter: s
|
|
1325
|
-
} = Ne(), c =
|
|
1332
|
+
} = Ne(), c = Ge(
|
|
1326
1333
|
() => Object.entries(r).map(
|
|
1327
1334
|
([m, n]) => n.map((C) => ({ field: m, value: C }))
|
|
1328
1335
|
).flat(),
|
|
1329
1336
|
[r]
|
|
1330
|
-
), p =
|
|
1337
|
+
), p = Ge(
|
|
1331
1338
|
() => Object.entries(o).map(([m, { min: n, max: C }]) => ({ field: m, min: n, max: C })),
|
|
1332
1339
|
[o]
|
|
1333
1340
|
);
|
|
1334
|
-
return
|
|
1341
|
+
return Ge(
|
|
1335
1342
|
() => Object.keys(r).length > 0 || Object.keys(o).length > 0,
|
|
1336
1343
|
[r, o]
|
|
1337
|
-
) ? /* @__PURE__ */ t.jsx(be, { collapsible: !1, title: "Active filters", children: /* @__PURE__ */ t.jsxs("ul", { className:
|
|
1344
|
+
) ? /* @__PURE__ */ t.jsx(be, { collapsible: !1, title: "Active filters", children: /* @__PURE__ */ t.jsxs("ul", { className: Bt.grid, children: [
|
|
1338
1345
|
c.map(({ field: m, value: n }) => /* @__PURE__ */ t.jsx(
|
|
1339
|
-
|
|
1346
|
+
Lt,
|
|
1340
1347
|
{
|
|
1341
1348
|
field: m,
|
|
1342
1349
|
value: n,
|
|
@@ -1345,7 +1352,7 @@ function rr() {
|
|
|
1345
1352
|
`${m}-${n}`
|
|
1346
1353
|
)),
|
|
1347
1354
|
p.map(({ field: m, min: n, max: C }) => /* @__PURE__ */ t.jsx(
|
|
1348
|
-
|
|
1355
|
+
qt,
|
|
1349
1356
|
{
|
|
1350
1357
|
field: m,
|
|
1351
1358
|
min: n,
|
|
@@ -1365,12 +1372,12 @@ function rr() {
|
|
|
1365
1372
|
) })
|
|
1366
1373
|
] }) }) : null;
|
|
1367
1374
|
}
|
|
1368
|
-
const
|
|
1369
|
-
radioGroup:
|
|
1370
|
-
},
|
|
1375
|
+
const zt = "_radioGroup_nwf7i_6", Ut = {
|
|
1376
|
+
radioGroup: zt
|
|
1377
|
+
}, or = ({ displayType: r = "dropdown", collapsible: o = !0, startCollapsed: u = !1 }) => {
|
|
1371
1378
|
const {
|
|
1372
1379
|
state: { sortableFields: s, sortBy: c, sortAscending: p },
|
|
1373
|
-
setSort:
|
|
1380
|
+
setSort: S
|
|
1374
1381
|
} = Ne();
|
|
1375
1382
|
if (!s || s.length === 0) return null;
|
|
1376
1383
|
const m = c ? `${c}:${p ? "asc" : "desc"}` : "none", n = [
|
|
@@ -1381,10 +1388,10 @@ const qt = "_radioGroup_nwf7i_6", Lt = {
|
|
|
1381
1388
|
])
|
|
1382
1389
|
], C = (k) => {
|
|
1383
1390
|
if (k === "none" || k === "")
|
|
1384
|
-
|
|
1391
|
+
S(null, !0);
|
|
1385
1392
|
else {
|
|
1386
|
-
const [
|
|
1387
|
-
|
|
1393
|
+
const [q, M] = k.split(":");
|
|
1394
|
+
S(q, M === "asc");
|
|
1388
1395
|
}
|
|
1389
1396
|
}, A = o ? u : !1;
|
|
1390
1397
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1394,7 +1401,7 @@ const qt = "_radioGroup_nwf7i_6", Lt = {
|
|
|
1394
1401
|
collapsible: o,
|
|
1395
1402
|
collapsed: A,
|
|
1396
1403
|
children: r === "dropdown" ? /* @__PURE__ */ t.jsx(
|
|
1397
|
-
|
|
1404
|
+
Ct,
|
|
1398
1405
|
{
|
|
1399
1406
|
value: m,
|
|
1400
1407
|
onValueChange: C,
|
|
@@ -1402,24 +1409,24 @@ const qt = "_radioGroup_nwf7i_6", Lt = {
|
|
|
1402
1409
|
placeholder: "Select sort...",
|
|
1403
1410
|
"aria-label": "Sort by"
|
|
1404
1411
|
}
|
|
1405
|
-
) : /* @__PURE__ */ t.jsx("div", { className:
|
|
1406
|
-
|
|
1412
|
+
) : /* @__PURE__ */ t.jsx("div", { className: Ut.radioGroup, children: n.map((k) => /* @__PURE__ */ t.jsx(
|
|
1413
|
+
wt,
|
|
1407
1414
|
{
|
|
1408
1415
|
id: `sort-${k.value}`,
|
|
1409
1416
|
name: "sort-by",
|
|
1410
1417
|
value: k.value,
|
|
1411
1418
|
label: k.label,
|
|
1412
1419
|
checked: m === k.value,
|
|
1413
|
-
onChange: (
|
|
1420
|
+
onChange: (q) => C(q.target.value)
|
|
1414
1421
|
},
|
|
1415
1422
|
k.value
|
|
1416
1423
|
)) })
|
|
1417
1424
|
}
|
|
1418
1425
|
);
|
|
1419
|
-
},
|
|
1420
|
-
list:
|
|
1426
|
+
}, Gt = "_list_1y4fk_1", Xt = {
|
|
1427
|
+
list: Gt
|
|
1421
1428
|
};
|
|
1422
|
-
function
|
|
1429
|
+
function ar() {
|
|
1423
1430
|
const {
|
|
1424
1431
|
state: { searchSettings: r },
|
|
1425
1432
|
setSearchSettings: o
|
|
@@ -1432,7 +1439,7 @@ function sr() {
|
|
|
1432
1439
|
o({
|
|
1433
1440
|
[n]: C
|
|
1434
1441
|
});
|
|
1435
|
-
},
|
|
1442
|
+
}, S = (n, C) => {
|
|
1436
1443
|
const A = parseInt(C, 10);
|
|
1437
1444
|
isNaN(A) || o({
|
|
1438
1445
|
coverageSetup: {
|
|
@@ -1448,9 +1455,9 @@ function sr() {
|
|
|
1448
1455
|
}
|
|
1449
1456
|
});
|
|
1450
1457
|
};
|
|
1451
|
-
return /* @__PURE__ */ t.jsx(be, { collapsed: !0, title: "Settings", children: /* @__PURE__ */ t.jsxs("ul", { className:
|
|
1458
|
+
return /* @__PURE__ */ t.jsx(be, { collapsed: !0, title: "Settings", children: /* @__PURE__ */ t.jsxs("ul", { className: Xt.list, children: [
|
|
1452
1459
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1453
|
-
|
|
1460
|
+
le,
|
|
1454
1461
|
{
|
|
1455
1462
|
label: "Max Results",
|
|
1456
1463
|
type: "number",
|
|
@@ -1459,7 +1466,7 @@ function sr() {
|
|
|
1459
1466
|
}
|
|
1460
1467
|
) }),
|
|
1461
1468
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1462
|
-
|
|
1469
|
+
le,
|
|
1463
1470
|
{
|
|
1464
1471
|
label: "Coverage Depth",
|
|
1465
1472
|
type: "number",
|
|
@@ -1469,7 +1476,7 @@ function sr() {
|
|
|
1469
1476
|
) }),
|
|
1470
1477
|
/* @__PURE__ */ t.jsxs("li", { children: [
|
|
1471
1478
|
/* @__PURE__ */ t.jsx(
|
|
1472
|
-
|
|
1479
|
+
le,
|
|
1473
1480
|
{
|
|
1474
1481
|
label: "Minimum Score",
|
|
1475
1482
|
type: "number",
|
|
@@ -1481,7 +1488,7 @@ function sr() {
|
|
|
1481
1488
|
}
|
|
1482
1489
|
),
|
|
1483
1490
|
/* @__PURE__ */ t.jsx("div", { style: { padding: "10px 10px 20px 10px" }, children: /* @__PURE__ */ t.jsx(
|
|
1484
|
-
|
|
1491
|
+
ut,
|
|
1485
1492
|
{
|
|
1486
1493
|
min: 0,
|
|
1487
1494
|
max: 255,
|
|
@@ -1495,7 +1502,7 @@ function sr() {
|
|
|
1495
1502
|
) })
|
|
1496
1503
|
] }),
|
|
1497
1504
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1498
|
-
|
|
1505
|
+
le,
|
|
1499
1506
|
{
|
|
1500
1507
|
label: "Placeholder text",
|
|
1501
1508
|
type: "text",
|
|
@@ -1506,7 +1513,7 @@ function sr() {
|
|
|
1506
1513
|
}
|
|
1507
1514
|
) }),
|
|
1508
1515
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1509
|
-
|
|
1516
|
+
re,
|
|
1510
1517
|
{
|
|
1511
1518
|
label: "Show score",
|
|
1512
1519
|
checked: r.showScore,
|
|
@@ -1514,7 +1521,7 @@ function sr() {
|
|
|
1514
1521
|
}
|
|
1515
1522
|
) }),
|
|
1516
1523
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1517
|
-
|
|
1524
|
+
re,
|
|
1518
1525
|
{
|
|
1519
1526
|
label: "Enable Coverage",
|
|
1520
1527
|
checked: r.enableCoverage,
|
|
@@ -1522,17 +1529,17 @@ function sr() {
|
|
|
1522
1529
|
}
|
|
1523
1530
|
) }),
|
|
1524
1531
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1525
|
-
|
|
1532
|
+
re,
|
|
1526
1533
|
{
|
|
1527
1534
|
label: "Remove Duplicates",
|
|
1528
1535
|
checked: r.removeDuplicates,
|
|
1529
1536
|
onChange: (n) => p("removeDuplicates", n)
|
|
1530
1537
|
}
|
|
1531
1538
|
) }),
|
|
1532
|
-
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(ye, { variant: "ghost", size: "micro", iconRight: u ? /* @__PURE__ */ t.jsx(
|
|
1539
|
+
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(ye, { variant: "ghost", size: "micro", iconRight: u ? /* @__PURE__ */ t.jsx(Vt, {}) : /* @__PURE__ */ t.jsx(Ot, {}), onClick: () => s((n) => !n), children: u ? "Hide Coverage Setup" : "Show Coverage Setup" }) }),
|
|
1533
1540
|
u && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1534
1541
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1535
|
-
|
|
1542
|
+
re,
|
|
1536
1543
|
{
|
|
1537
1544
|
label: "Cover Whole Query",
|
|
1538
1545
|
checked: r.coverageSetup.coverWholeQuery,
|
|
@@ -1540,7 +1547,7 @@ function sr() {
|
|
|
1540
1547
|
}
|
|
1541
1548
|
) }),
|
|
1542
1549
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1543
|
-
|
|
1550
|
+
re,
|
|
1544
1551
|
{
|
|
1545
1552
|
label: "Cover Whole Words",
|
|
1546
1553
|
checked: r.coverageSetup.coverWholeWords,
|
|
@@ -1548,7 +1555,7 @@ function sr() {
|
|
|
1548
1555
|
}
|
|
1549
1556
|
) }),
|
|
1550
1557
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1551
|
-
|
|
1558
|
+
re,
|
|
1552
1559
|
{
|
|
1553
1560
|
label: "Cover Fuzzy Words",
|
|
1554
1561
|
checked: r.coverageSetup.coverFuzzyWords,
|
|
@@ -1556,7 +1563,7 @@ function sr() {
|
|
|
1556
1563
|
}
|
|
1557
1564
|
) }),
|
|
1558
1565
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1559
|
-
|
|
1566
|
+
re,
|
|
1560
1567
|
{
|
|
1561
1568
|
label: "Cover Joined Words",
|
|
1562
1569
|
checked: r.coverageSetup.coverJoinedWords,
|
|
@@ -1564,7 +1571,7 @@ function sr() {
|
|
|
1564
1571
|
}
|
|
1565
1572
|
) }),
|
|
1566
1573
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1567
|
-
|
|
1574
|
+
re,
|
|
1568
1575
|
{
|
|
1569
1576
|
label: "Cover Prefix Suffix",
|
|
1570
1577
|
checked: r.coverageSetup.coverPrefixSuffix,
|
|
@@ -1572,74 +1579,64 @@ function sr() {
|
|
|
1572
1579
|
}
|
|
1573
1580
|
) }),
|
|
1574
1581
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1575
|
-
|
|
1582
|
+
re,
|
|
1576
1583
|
{
|
|
1577
|
-
label: "Truncate
|
|
1584
|
+
label: "Truncate",
|
|
1578
1585
|
checked: r.coverageSetup.truncate,
|
|
1579
1586
|
onChange: (n) => m("truncate", n)
|
|
1580
1587
|
}
|
|
1581
1588
|
) }),
|
|
1582
1589
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1583
|
-
|
|
1590
|
+
re,
|
|
1584
1591
|
{
|
|
1585
|
-
label: "
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
onChange: (n) => j("levenshteinMaxWordSize", n.target.value)
|
|
1592
|
+
label: "Include Pattern Matches",
|
|
1593
|
+
checked: r.coverageSetup.includePatternMatches,
|
|
1594
|
+
onChange: (n) => m("includePatternMatches", n)
|
|
1589
1595
|
}
|
|
1590
1596
|
) }),
|
|
1591
1597
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1592
|
-
|
|
1593
|
-
{
|
|
1594
|
-
label: "Min Word Size",
|
|
1595
|
-
type: "number",
|
|
1596
|
-
value: r.coverageSetup.minWordSize.toString(),
|
|
1597
|
-
onChange: (n) => j("minWordSize", n.target.value)
|
|
1598
|
-
}
|
|
1599
|
-
) }),
|
|
1600
|
-
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1601
|
-
K,
|
|
1598
|
+
le,
|
|
1602
1599
|
{
|
|
1603
|
-
label: "
|
|
1600
|
+
label: "Levenshtein Max Word Size",
|
|
1604
1601
|
type: "number",
|
|
1605
|
-
value: r.coverageSetup.
|
|
1606
|
-
onChange: (n) =>
|
|
1602
|
+
value: r.coverageSetup.levenshteinMaxWordSize.toString(),
|
|
1603
|
+
onChange: (n) => S("levenshteinMaxWordSize", n.target.value)
|
|
1607
1604
|
}
|
|
1608
1605
|
) }),
|
|
1609
1606
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1610
|
-
|
|
1607
|
+
le,
|
|
1611
1608
|
{
|
|
1612
|
-
label: "
|
|
1609
|
+
label: "Min Word Size",
|
|
1613
1610
|
type: "number",
|
|
1614
|
-
value: r.coverageSetup.
|
|
1615
|
-
onChange: (n) =>
|
|
1611
|
+
value: r.coverageSetup.minWordSize.toString(),
|
|
1612
|
+
onChange: (n) => S("minWordSize", n.target.value)
|
|
1616
1613
|
}
|
|
1617
1614
|
) }),
|
|
1618
1615
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1619
|
-
|
|
1616
|
+
le,
|
|
1620
1617
|
{
|
|
1621
|
-
label: "
|
|
1618
|
+
label: "Truncate Word Hit Limit",
|
|
1622
1619
|
type: "number",
|
|
1623
|
-
value: r.coverageSetup.
|
|
1624
|
-
onChange: (n) =>
|
|
1620
|
+
value: r.coverageSetup.truncateWordHitLimit.toString(),
|
|
1621
|
+
onChange: (n) => S("truncateWordHitLimit", n.target.value)
|
|
1625
1622
|
}
|
|
1626
1623
|
) }),
|
|
1627
1624
|
/* @__PURE__ */ t.jsx("li", { children: /* @__PURE__ */ t.jsx(
|
|
1628
|
-
|
|
1625
|
+
le,
|
|
1629
1626
|
{
|
|
1630
|
-
label: "
|
|
1627
|
+
label: "Truncate Word Hit Tolerance",
|
|
1631
1628
|
type: "number",
|
|
1632
|
-
value: r.coverageSetup.
|
|
1633
|
-
onChange: (n) =>
|
|
1629
|
+
value: r.coverageSetup.truncateWordHitTolerance.toString(),
|
|
1630
|
+
onChange: (n) => S("truncateWordHitTolerance", n.target.value)
|
|
1634
1631
|
}
|
|
1635
1632
|
) })
|
|
1636
1633
|
] })
|
|
1637
1634
|
] }) });
|
|
1638
1635
|
}
|
|
1639
|
-
class
|
|
1636
|
+
class ir extends jt {
|
|
1640
1637
|
constructor(u) {
|
|
1641
1638
|
super(u);
|
|
1642
|
-
|
|
1639
|
+
rt(this, "reset", () => {
|
|
1643
1640
|
this.setState({ hasError: !1, error: null });
|
|
1644
1641
|
});
|
|
1645
1642
|
this.state = { hasError: !1, error: null };
|
|
@@ -1701,15 +1698,15 @@ class or extends bt {
|
|
|
1701
1698
|
}
|
|
1702
1699
|
}
|
|
1703
1700
|
export {
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1701
|
+
sr as ActiveFiltersPanel,
|
|
1702
|
+
nr as RangeFilterPanel,
|
|
1703
|
+
ir as SearchErrorBoundary,
|
|
1704
|
+
er as SearchInput,
|
|
1705
|
+
Kt as SearchProvider,
|
|
1706
|
+
tr as SearchResults,
|
|
1707
|
+
ar as SearchSettingsPanel,
|
|
1708
|
+
or as SortByPanel,
|
|
1709
|
+
rr as ValueFilterPanel,
|
|
1713
1710
|
Ne as useSearch,
|
|
1714
1711
|
Ne as useSearchContext
|
|
1715
1712
|
};
|