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