@react-querybuilder/bootstrap 4.5.2 → 5.0.0-alpha.3

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 CHANGED
@@ -1,7 +1,6 @@
1
- import require$$0, { forwardRef, useRef } from "react";
2
- import { useValueEditor, toArray, ValueSelector, standardClassnames, joinWith } from "react-querybuilder";
3
- var jsxRuntime = { exports: {} };
4
- var reactJsxRuntime_production_min = {};
1
+ import { useValueEditor as pr, toArray as mr, ValueSelector as oe, standardClassnames as K, joinWith as Fe, getCompatContextProvider as hr } from "react-querybuilder";
2
+ import Ie, { forwardRef as br, useRef as gr } from "react";
3
+ var ue = { exports: {} }, N = {};
5
4
  /**
6
5
  * @license React
7
6
  * react-jsx-runtime.production.min.js
@@ -11,209 +10,791 @@ var reactJsxRuntime_production_min = {};
11
10
  * This source code is licensed under the MIT license found in the
12
11
  * LICENSE file in the root directory of this source tree.
13
12
  */
14
- var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
15
- function q(c, a, g) {
16
- var b, d = {}, e = null, h = null;
17
- g !== void 0 && (e = "" + g);
18
- a.key !== void 0 && (e = "" + a.key);
19
- a.ref !== void 0 && (h = a.ref);
20
- for (b in a)
21
- m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
22
- if (c && c.defaultProps)
23
- for (b in a = c.defaultProps, a)
24
- d[b] === void 0 && (d[b] = a[b]);
25
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
13
+ var De;
14
+ function yr() {
15
+ if (De)
16
+ return N;
17
+ De = 1;
18
+ var E = Ie, h = Symbol.for("react.element"), b = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, R = E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
19
+ function _(T, l, C) {
20
+ var s, k = {}, x = null, j = null;
21
+ C !== void 0 && (x = "" + C), l.key !== void 0 && (x = "" + l.key), l.ref !== void 0 && (j = l.ref);
22
+ for (s in l)
23
+ p.call(l, s) && !v.hasOwnProperty(s) && (k[s] = l[s]);
24
+ if (T && T.defaultProps)
25
+ for (s in l = T.defaultProps, l)
26
+ k[s] === void 0 && (k[s] = l[s]);
27
+ return { $$typeof: h, type: T, key: x, ref: j, props: k, _owner: R.current };
28
+ }
29
+ return N.Fragment = b, N.jsx = _, N.jsxs = _, N;
26
30
  }
27
- reactJsxRuntime_production_min.Fragment = l;
28
- reactJsxRuntime_production_min.jsx = q;
29
- reactJsxRuntime_production_min.jsxs = q;
30
- {
31
- jsxRuntime.exports = reactJsxRuntime_production_min;
31
+ var V = {};
32
+ /**
33
+ * @license React
34
+ * react-jsx-runtime.development.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */
41
+ var $e;
42
+ function Er() {
43
+ return $e || ($e = 1, process.env.NODE_ENV !== "production" && function() {
44
+ var E = Ie, h = Symbol.for("react.element"), b = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), T = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), j = Symbol.for("react.offscreen"), L = Symbol.iterator, B = "@@iterator";
45
+ function c(e) {
46
+ if (e === null || typeof e != "object")
47
+ return null;
48
+ var r = L && e[L] || e[B];
49
+ return typeof r == "function" ? r : null;
50
+ }
51
+ var S = E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
52
+ function m(e) {
53
+ {
54
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
55
+ t[n - 1] = arguments[n];
56
+ A("error", e, t);
57
+ }
58
+ }
59
+ function A(e, r, t) {
60
+ {
61
+ var n = S.ReactDebugCurrentFrame, i = n.getStackAddendum();
62
+ i !== "" && (r += "%s", t = t.concat([i]));
63
+ var u = t.map(function(o) {
64
+ return String(o);
65
+ });
66
+ u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
67
+ }
68
+ }
69
+ var F = !1, M = !1, U = !1, Ne = !1, Ve = !1, ce;
70
+ ce = Symbol.for("react.module.reference");
71
+ function Le(e) {
72
+ return !!(typeof e == "string" || typeof e == "function" || e === p || e === v || Ve || e === R || e === C || e === s || Ne || e === j || F || M || U || typeof e == "object" && e !== null && (e.$$typeof === x || e.$$typeof === k || e.$$typeof === _ || e.$$typeof === T || e.$$typeof === l || e.$$typeof === ce || e.getModuleId !== void 0));
73
+ }
74
+ function Be(e, r, t) {
75
+ var n = e.displayName;
76
+ if (n)
77
+ return n;
78
+ var i = r.displayName || r.name || "";
79
+ return i !== "" ? t + "(" + i + ")" : t;
80
+ }
81
+ function se(e) {
82
+ return e.displayName || "Context";
83
+ }
84
+ function P(e) {
85
+ if (e == null)
86
+ return null;
87
+ if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
88
+ return e.displayName || e.name || null;
89
+ if (typeof e == "string")
90
+ return e;
91
+ switch (e) {
92
+ case p:
93
+ return "Fragment";
94
+ case b:
95
+ return "Portal";
96
+ case v:
97
+ return "Profiler";
98
+ case R:
99
+ return "StrictMode";
100
+ case C:
101
+ return "Suspense";
102
+ case s:
103
+ return "SuspenseList";
104
+ }
105
+ if (typeof e == "object")
106
+ switch (e.$$typeof) {
107
+ case T:
108
+ var r = e;
109
+ return se(r) + ".Consumer";
110
+ case _:
111
+ var t = e;
112
+ return se(t._context) + ".Provider";
113
+ case l:
114
+ return Be(e, e.render, "ForwardRef");
115
+ case k:
116
+ var n = e.displayName || null;
117
+ return n !== null ? n : P(e.type) || "Memo";
118
+ case x: {
119
+ var i = e, u = i._payload, o = i._init;
120
+ try {
121
+ return P(o(u));
122
+ } catch {
123
+ return null;
124
+ }
125
+ }
126
+ }
127
+ return null;
128
+ }
129
+ var D = Object.assign, W = 0, le, fe, de, ve, pe, me, he;
130
+ function be() {
131
+ }
132
+ be.__reactDisabledLog = !0;
133
+ function Me() {
134
+ {
135
+ if (W === 0) {
136
+ le = console.log, fe = console.info, de = console.warn, ve = console.error, pe = console.group, me = console.groupCollapsed, he = console.groupEnd;
137
+ var e = {
138
+ configurable: !0,
139
+ enumerable: !0,
140
+ value: be,
141
+ writable: !0
142
+ };
143
+ Object.defineProperties(console, {
144
+ info: e,
145
+ log: e,
146
+ warn: e,
147
+ error: e,
148
+ group: e,
149
+ groupCollapsed: e,
150
+ groupEnd: e
151
+ });
152
+ }
153
+ W++;
154
+ }
155
+ }
156
+ function Ue() {
157
+ {
158
+ if (W--, W === 0) {
159
+ var e = {
160
+ configurable: !0,
161
+ enumerable: !0,
162
+ writable: !0
163
+ };
164
+ Object.defineProperties(console, {
165
+ log: D({}, e, {
166
+ value: le
167
+ }),
168
+ info: D({}, e, {
169
+ value: fe
170
+ }),
171
+ warn: D({}, e, {
172
+ value: de
173
+ }),
174
+ error: D({}, e, {
175
+ value: ve
176
+ }),
177
+ group: D({}, e, {
178
+ value: pe
179
+ }),
180
+ groupCollapsed: D({}, e, {
181
+ value: me
182
+ }),
183
+ groupEnd: D({}, e, {
184
+ value: he
185
+ })
186
+ });
187
+ }
188
+ W < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
189
+ }
190
+ }
191
+ var X = S.ReactCurrentDispatcher, Q;
192
+ function G(e, r, t) {
193
+ {
194
+ if (Q === void 0)
195
+ try {
196
+ throw Error();
197
+ } catch (i) {
198
+ var n = i.stack.trim().match(/\n( *(at )?)/);
199
+ Q = n && n[1] || "";
200
+ }
201
+ return `
202
+ ` + Q + e;
203
+ }
204
+ }
205
+ var Z = !1, q;
206
+ {
207
+ var Ge = typeof WeakMap == "function" ? WeakMap : Map;
208
+ q = new Ge();
209
+ }
210
+ function ge(e, r) {
211
+ if (!e || Z)
212
+ return "";
213
+ {
214
+ var t = q.get(e);
215
+ if (t !== void 0)
216
+ return t;
217
+ }
218
+ var n;
219
+ Z = !0;
220
+ var i = Error.prepareStackTrace;
221
+ Error.prepareStackTrace = void 0;
222
+ var u;
223
+ u = X.current, X.current = null, Me();
224
+ try {
225
+ if (r) {
226
+ var o = function() {
227
+ throw Error();
228
+ };
229
+ if (Object.defineProperty(o.prototype, "props", {
230
+ set: function() {
231
+ throw Error();
232
+ }
233
+ }), typeof Reflect == "object" && Reflect.construct) {
234
+ try {
235
+ Reflect.construct(o, []);
236
+ } catch (O) {
237
+ n = O;
238
+ }
239
+ Reflect.construct(e, [], o);
240
+ } else {
241
+ try {
242
+ o.call();
243
+ } catch (O) {
244
+ n = O;
245
+ }
246
+ e.call(o.prototype);
247
+ }
248
+ } else {
249
+ try {
250
+ throw Error();
251
+ } catch (O) {
252
+ n = O;
253
+ }
254
+ e();
255
+ }
256
+ } catch (O) {
257
+ if (O && n && typeof O.stack == "string") {
258
+ for (var a = O.stack.split(`
259
+ `), g = n.stack.split(`
260
+ `), f = a.length - 1, d = g.length - 1; f >= 1 && d >= 0 && a[f] !== g[d]; )
261
+ d--;
262
+ for (; f >= 1 && d >= 0; f--, d--)
263
+ if (a[f] !== g[d]) {
264
+ if (f !== 1 || d !== 1)
265
+ do
266
+ if (f--, d--, d < 0 || a[f] !== g[d]) {
267
+ var w = `
268
+ ` + a[f].replace(" at new ", " at ");
269
+ return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, w), w;
270
+ }
271
+ while (f >= 1 && d >= 0);
272
+ break;
273
+ }
274
+ }
275
+ } finally {
276
+ Z = !1, X.current = u, Ue(), Error.prepareStackTrace = i;
277
+ }
278
+ var I = e ? e.displayName || e.name : "", je = I ? G(I) : "";
279
+ return typeof e == "function" && q.set(e, je), je;
280
+ }
281
+ function qe(e, r, t) {
282
+ return ge(e, !1);
283
+ }
284
+ function He(e) {
285
+ var r = e.prototype;
286
+ return !!(r && r.isReactComponent);
287
+ }
288
+ function H(e, r, t) {
289
+ if (e == null)
290
+ return "";
291
+ if (typeof e == "function")
292
+ return ge(e, He(e));
293
+ if (typeof e == "string")
294
+ return G(e);
295
+ switch (e) {
296
+ case C:
297
+ return G("Suspense");
298
+ case s:
299
+ return G("SuspenseList");
300
+ }
301
+ if (typeof e == "object")
302
+ switch (e.$$typeof) {
303
+ case l:
304
+ return qe(e.render);
305
+ case k:
306
+ return H(e.type, r, t);
307
+ case x: {
308
+ var n = e, i = n._payload, u = n._init;
309
+ try {
310
+ return H(u(i), r, t);
311
+ } catch {
312
+ }
313
+ }
314
+ }
315
+ return "";
316
+ }
317
+ var J = Object.prototype.hasOwnProperty, ye = {}, Ee = S.ReactDebugCurrentFrame;
318
+ function z(e) {
319
+ if (e) {
320
+ var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
321
+ Ee.setExtraStackFrame(t);
322
+ } else
323
+ Ee.setExtraStackFrame(null);
324
+ }
325
+ function Je(e, r, t, n, i) {
326
+ {
327
+ var u = Function.call.bind(J);
328
+ for (var o in e)
329
+ if (u(e, o)) {
330
+ var a = void 0;
331
+ try {
332
+ if (typeof e[o] != "function") {
333
+ var g = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
334
+ throw g.name = "Invariant Violation", g;
335
+ }
336
+ a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
337
+ } catch (f) {
338
+ a = f;
339
+ }
340
+ a && !(a instanceof Error) && (z(i), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), z(null)), a instanceof Error && !(a.message in ye) && (ye[a.message] = !0, z(i), m("Failed %s type: %s", t, a.message), z(null));
341
+ }
342
+ }
343
+ }
344
+ var ze = Array.isArray;
345
+ function ee(e) {
346
+ return ze(e);
347
+ }
348
+ function Ke(e) {
349
+ {
350
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
351
+ return t;
352
+ }
353
+ }
354
+ function Xe(e) {
355
+ try {
356
+ return Re(e), !1;
357
+ } catch {
358
+ return !0;
359
+ }
360
+ }
361
+ function Re(e) {
362
+ return "" + e;
363
+ }
364
+ function _e(e) {
365
+ if (Xe(e))
366
+ return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), Re(e);
367
+ }
368
+ var Y = S.ReactCurrentOwner, Qe = {
369
+ key: !0,
370
+ ref: !0,
371
+ __self: !0,
372
+ __source: !0
373
+ }, Te, Ce, re;
374
+ re = {};
375
+ function Ze(e) {
376
+ if (J.call(e, "ref")) {
377
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
378
+ if (r && r.isReactWarning)
379
+ return !1;
380
+ }
381
+ return e.ref !== void 0;
382
+ }
383
+ function er(e) {
384
+ if (J.call(e, "key")) {
385
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
386
+ if (r && r.isReactWarning)
387
+ return !1;
388
+ }
389
+ return e.key !== void 0;
390
+ }
391
+ function rr(e, r) {
392
+ if (typeof e.ref == "string" && Y.current && r && Y.current.stateNode !== r) {
393
+ var t = P(Y.current.type);
394
+ re[t] || (m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', P(Y.current.type), e.ref), re[t] = !0);
395
+ }
396
+ }
397
+ function tr(e, r) {
398
+ {
399
+ var t = function() {
400
+ Te || (Te = !0, m("%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://reactjs.org/link/special-props)", r));
401
+ };
402
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
403
+ get: t,
404
+ configurable: !0
405
+ });
406
+ }
407
+ }
408
+ function nr(e, r) {
409
+ {
410
+ var t = function() {
411
+ Ce || (Ce = !0, m("%s: `ref` 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://reactjs.org/link/special-props)", r));
412
+ };
413
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
414
+ get: t,
415
+ configurable: !0
416
+ });
417
+ }
418
+ }
419
+ var ar = function(e, r, t, n, i, u, o) {
420
+ var a = {
421
+ $$typeof: h,
422
+ type: e,
423
+ key: r,
424
+ ref: t,
425
+ props: o,
426
+ _owner: u
427
+ };
428
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
429
+ configurable: !1,
430
+ enumerable: !1,
431
+ writable: !0,
432
+ value: !1
433
+ }), Object.defineProperty(a, "_self", {
434
+ configurable: !1,
435
+ enumerable: !1,
436
+ writable: !1,
437
+ value: n
438
+ }), Object.defineProperty(a, "_source", {
439
+ configurable: !1,
440
+ enumerable: !1,
441
+ writable: !1,
442
+ value: i
443
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
444
+ };
445
+ function or(e, r, t, n, i) {
446
+ {
447
+ var u, o = {}, a = null, g = null;
448
+ t !== void 0 && (_e(t), a = "" + t), er(r) && (_e(r.key), a = "" + r.key), Ze(r) && (g = r.ref, rr(r, i));
449
+ for (u in r)
450
+ J.call(r, u) && !Qe.hasOwnProperty(u) && (o[u] = r[u]);
451
+ if (e && e.defaultProps) {
452
+ var f = e.defaultProps;
453
+ for (u in f)
454
+ o[u] === void 0 && (o[u] = f[u]);
455
+ }
456
+ if (a || g) {
457
+ var d = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
458
+ a && tr(o, d), g && nr(o, d);
459
+ }
460
+ return ar(e, a, g, i, n, Y.current, o);
461
+ }
462
+ }
463
+ var te = S.ReactCurrentOwner, we = S.ReactDebugCurrentFrame;
464
+ function $(e) {
465
+ if (e) {
466
+ var r = e._owner, t = H(e.type, e._source, r ? r.type : null);
467
+ we.setExtraStackFrame(t);
468
+ } else
469
+ we.setExtraStackFrame(null);
470
+ }
471
+ var ne;
472
+ ne = !1;
473
+ function ae(e) {
474
+ return typeof e == "object" && e !== null && e.$$typeof === h;
475
+ }
476
+ function ke() {
477
+ {
478
+ if (te.current) {
479
+ var e = P(te.current.type);
480
+ if (e)
481
+ return `
482
+
483
+ Check the render method of \`` + e + "`.";
484
+ }
485
+ return "";
486
+ }
487
+ }
488
+ function ir(e) {
489
+ {
490
+ if (e !== void 0) {
491
+ var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber;
492
+ return `
493
+
494
+ Check your code at ` + r + ":" + t + ".";
495
+ }
496
+ return "";
497
+ }
498
+ }
499
+ var xe = {};
500
+ function ur(e) {
501
+ {
502
+ var r = ke();
503
+ if (!r) {
504
+ var t = typeof e == "string" ? e : e.displayName || e.name;
505
+ t && (r = `
506
+
507
+ Check the top-level render call using <` + t + ">.");
508
+ }
509
+ return r;
510
+ }
511
+ }
512
+ function Se(e, r) {
513
+ {
514
+ if (!e._store || e._store.validated || e.key != null)
515
+ return;
516
+ e._store.validated = !0;
517
+ var t = ur(r);
518
+ if (xe[t])
519
+ return;
520
+ xe[t] = !0;
521
+ var n = "";
522
+ e && e._owner && e._owner !== te.current && (n = " It was passed a child from " + P(e._owner.type) + "."), $(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), $(null);
523
+ }
524
+ }
525
+ function Pe(e, r) {
526
+ {
527
+ if (typeof e != "object")
528
+ return;
529
+ if (ee(e))
530
+ for (var t = 0; t < e.length; t++) {
531
+ var n = e[t];
532
+ ae(n) && Se(n, r);
533
+ }
534
+ else if (ae(e))
535
+ e._store && (e._store.validated = !0);
536
+ else if (e) {
537
+ var i = c(e);
538
+ if (typeof i == "function" && i !== e.entries)
539
+ for (var u = i.call(e), o; !(o = u.next()).done; )
540
+ ae(o.value) && Se(o.value, r);
541
+ }
542
+ }
543
+ }
544
+ function cr(e) {
545
+ {
546
+ var r = e.type;
547
+ if (r == null || typeof r == "string")
548
+ return;
549
+ var t;
550
+ if (typeof r == "function")
551
+ t = r.propTypes;
552
+ else if (typeof r == "object" && (r.$$typeof === l || r.$$typeof === k))
553
+ t = r.propTypes;
554
+ else
555
+ return;
556
+ if (t) {
557
+ var n = P(r);
558
+ Je(t, e.props, "prop", n, e);
559
+ } else if (r.PropTypes !== void 0 && !ne) {
560
+ ne = !0;
561
+ var i = P(r);
562
+ m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
563
+ }
564
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
565
+ }
566
+ }
567
+ function sr(e) {
568
+ {
569
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
570
+ var n = r[t];
571
+ if (n !== "children" && n !== "key") {
572
+ $(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), $(null);
573
+ break;
574
+ }
575
+ }
576
+ e.ref !== null && ($(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), $(null));
577
+ }
578
+ }
579
+ function Oe(e, r, t, n, i, u) {
580
+ {
581
+ var o = Le(e);
582
+ if (!o) {
583
+ var a = "";
584
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
+ var g = ir(i);
586
+ g ? a += g : a += ke();
587
+ var f;
588
+ e === null ? f = "null" : ee(e) ? f = "array" : e !== void 0 && e.$$typeof === h ? (f = "<" + (P(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : f = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", f, a);
589
+ }
590
+ var d = or(e, r, t, i, u);
591
+ if (d == null)
592
+ return d;
593
+ if (o) {
594
+ var w = r.children;
595
+ if (w !== void 0)
596
+ if (n)
597
+ if (ee(w)) {
598
+ for (var I = 0; I < w.length; I++)
599
+ Pe(w[I], e);
600
+ Object.freeze && Object.freeze(w);
601
+ } else
602
+ m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
603
+ else
604
+ Pe(w, e);
605
+ }
606
+ return e === p ? sr(d) : cr(d), d;
607
+ }
608
+ }
609
+ function lr(e, r, t) {
610
+ return Oe(e, r, t, !0);
611
+ }
612
+ function fr(e, r, t) {
613
+ return Oe(e, r, t, !1);
614
+ }
615
+ var dr = fr, vr = lr;
616
+ V.Fragment = p, V.jsx = dr, V.jsxs = vr;
617
+ }()), V;
32
618
  }
33
- const jsx = jsxRuntime.exports.jsx;
34
- const jsxs = jsxRuntime.exports.jsxs;
35
- const BootstrapDragHandle = forwardRef(({
36
- className,
37
- title
38
- }, dragRef) => /* @__PURE__ */ jsx("span", {
39
- ref: dragRef,
40
- className,
41
- title,
42
- children: /* @__PURE__ */ jsx("i", {
619
+ (function(E) {
620
+ process.env.NODE_ENV === "production" ? E.exports = yr() : E.exports = Er();
621
+ })(ue);
622
+ const y = ue.exports.jsx, ie = ue.exports.jsxs, Ae = br(({
623
+ className: E,
624
+ title: h
625
+ }, b) => /* @__PURE__ */ y("span", {
626
+ ref: b,
627
+ className: E,
628
+ title: h,
629
+ children: /* @__PURE__ */ y("i", {
43
630
  className: "bi bi-grip-vertical"
44
631
  })
45
632
  }));
46
- BootstrapDragHandle.displayName = "BootstrapDragHandle";
47
- const BootstrapNotToggle = ({
48
- className,
49
- handleOnChange,
50
- title,
51
- label,
52
- checked,
53
- disabled
633
+ Ae.displayName = "BootstrapDragHandle";
634
+ const We = ({
635
+ className: E,
636
+ handleOnChange: h,
637
+ title: b,
638
+ label: p,
639
+ checked: R,
640
+ disabled: v
54
641
  }) => {
55
- const id = useRef(`notToggle-${Math.random()}`);
56
- return /* @__PURE__ */ jsxs("div", {
57
- className: `form-check-inline form-switch ${className}`,
58
- children: [/* @__PURE__ */ jsx("input", {
59
- id: id.current,
642
+ const _ = gr(`notToggle-${Math.random()}`);
643
+ return /* @__PURE__ */ ie("div", {
644
+ className: `form-check-inline form-switch ${E}`,
645
+ children: [/* @__PURE__ */ y("input", {
646
+ id: _.current,
60
647
  className: "form-check-input",
61
648
  type: "checkbox",
62
- onChange: (e) => handleOnChange(e.target.checked),
63
- checked: !!checked,
64
- disabled
65
- }), /* @__PURE__ */ jsx("label", {
66
- title,
67
- htmlFor: id.current,
649
+ onChange: (T) => h(T.target.checked),
650
+ checked: !!R,
651
+ disabled: v
652
+ }), /* @__PURE__ */ y("label", {
653
+ title: b,
654
+ htmlFor: _.current,
68
655
  className: "form-check-label",
69
- children: label
656
+ children: p
70
657
  })]
71
658
  });
72
659
  };
73
- BootstrapNotToggle.displayName = "BootstrapNotToggle";
74
- const BootstrapValueEditor = ({
75
- fieldData,
76
- operator,
77
- value,
78
- handleOnChange,
79
- title,
80
- className,
81
- type,
82
- inputType,
83
- values = [],
84
- listsAsArrays,
85
- disabled,
86
- testID,
87
- ...props
660
+ We.displayName = "BootstrapNotToggle";
661
+ const Ye = ({
662
+ fieldData: E,
663
+ operator: h,
664
+ value: b,
665
+ handleOnChange: p,
666
+ title: R,
667
+ className: v,
668
+ type: _,
669
+ inputType: T,
670
+ values: l = [],
671
+ listsAsArrays: C,
672
+ disabled: s,
673
+ testID: k,
674
+ ...x
88
675
  }) => {
89
- var _a;
90
- useValueEditor({
91
- handleOnChange,
92
- inputType,
93
- operator,
94
- value
95
- });
96
- if (operator === "null" || operator === "notNull") {
676
+ var B;
677
+ if (pr({
678
+ handleOnChange: p,
679
+ inputType: T,
680
+ operator: h,
681
+ value: b
682
+ }), h === "null" || h === "notNull")
97
683
  return null;
98
- }
99
- const placeHolderText = (_a = fieldData == null ? void 0 : fieldData.placeholder) != null ? _a : "";
100
- const inputTypeCoerced = ["between", "notBetween", "in", "notIn"].includes(operator) ? "text" : inputType || "text";
101
- if ((operator === "between" || operator === "notBetween") && type === "select") {
102
- const valArray = toArray(value);
103
- const selector1handler = (v) => {
104
- var _a2, _b;
105
- const val = [v, (_b = valArray[1]) != null ? _b : (_a2 = values[0]) == null ? void 0 : _a2.name, ...valArray.slice(2)];
106
- handleOnChange(listsAsArrays ? val : joinWith(val, ","));
107
- };
108
- const selector2handler = (v) => {
109
- const val = [valArray[0], v, ...valArray.slice(2)];
110
- handleOnChange(listsAsArrays ? val : joinWith(val, ","));
684
+ const j = (B = E == null ? void 0 : E.placeholder) != null ? B : "", L = ["between", "notBetween", "in", "notIn"].includes(h) ? "text" : T || "text";
685
+ if ((h === "between" || h === "notBetween") && _ === "select") {
686
+ const c = mr(b), S = (A) => {
687
+ var M, U;
688
+ const F = [A, (U = c[1]) != null ? U : (M = l[0]) == null ? void 0 : M.name, ...c.slice(2)];
689
+ p(C ? F : Fe(F, ","));
690
+ }, m = (A) => {
691
+ const F = [c[0], A, ...c.slice(2)];
692
+ p(C ? F : Fe(F, ","));
111
693
  };
112
- return /* @__PURE__ */ jsxs("span", {
113
- "data-testid": testID,
114
- className,
115
- title,
116
- children: [/* @__PURE__ */ jsx(ValueSelector, {
117
- ...props,
118
- className: `${standardClassnames.valueListItem} ${className == null ? void 0 : className.replaceAll(standardClassnames.value, "")}`,
119
- handleOnChange: selector1handler,
120
- disabled,
121
- value: valArray[0],
122
- options: values,
123
- listsAsArrays
124
- }), /* @__PURE__ */ jsx(ValueSelector, {
125
- ...props,
126
- className: `${standardClassnames.valueListItem} ${className == null ? void 0 : className.replaceAll(standardClassnames.value, "")}`,
127
- handleOnChange: selector2handler,
128
- disabled,
129
- value: valArray[1],
130
- options: values,
131
- listsAsArrays
694
+ return /* @__PURE__ */ ie("span", {
695
+ "data-testid": k,
696
+ className: v,
697
+ title: R,
698
+ children: [/* @__PURE__ */ y(oe, {
699
+ ...x,
700
+ className: `${K.valueListItem} ${v == null ? void 0 : v.replaceAll(K.value, "")}`,
701
+ handleOnChange: S,
702
+ disabled: s,
703
+ value: c[0],
704
+ options: l,
705
+ listsAsArrays: C
706
+ }), /* @__PURE__ */ y(oe, {
707
+ ...x,
708
+ className: `${K.valueListItem} ${v == null ? void 0 : v.replaceAll(K.value, "")}`,
709
+ handleOnChange: m,
710
+ disabled: s,
711
+ value: c[1],
712
+ options: l,
713
+ listsAsArrays: C
132
714
  })]
133
715
  });
134
716
  }
135
- switch (type) {
717
+ switch (_) {
136
718
  case "select":
137
719
  case "multiselect":
138
- return /* @__PURE__ */ jsx(ValueSelector, {
139
- ...props,
140
- className: `${className} form-select form-select-sm`,
141
- title,
142
- handleOnChange,
143
- value,
144
- disabled,
145
- multiple: type === "multiselect",
146
- listsAsArrays,
147
- options: values
720
+ return /* @__PURE__ */ y(oe, {
721
+ ...x,
722
+ className: `${v} form-select form-select-sm`,
723
+ title: R,
724
+ handleOnChange: p,
725
+ value: b,
726
+ disabled: s,
727
+ multiple: _ === "multiselect",
728
+ listsAsArrays: C,
729
+ options: l
148
730
  });
149
731
  case "textarea":
150
- return /* @__PURE__ */ jsx("textarea", {
151
- value,
152
- title,
153
- className,
154
- disabled,
155
- placeholder: placeHolderText,
156
- onChange: (e) => handleOnChange(e.target.value)
732
+ return /* @__PURE__ */ y("textarea", {
733
+ value: b,
734
+ title: R,
735
+ className: v,
736
+ disabled: s,
737
+ placeholder: j,
738
+ onChange: (c) => p(c.target.value)
157
739
  });
158
740
  case "switch":
159
- return /* @__PURE__ */ jsx("span", {
160
- className: `custom-control custom-switch ${className}`,
161
- children: /* @__PURE__ */ jsx("input", {
741
+ return /* @__PURE__ */ y("span", {
742
+ className: `custom-control custom-switch ${v}`,
743
+ children: /* @__PURE__ */ y("input", {
162
744
  type: "checkbox",
163
- className: `form-check-input custom-control-input`,
164
- title,
165
- disabled,
166
- onChange: (e) => handleOnChange(e.target.checked),
167
- checked: !!value
745
+ className: "form-check-input custom-control-input",
746
+ title: R,
747
+ disabled: s,
748
+ onChange: (c) => p(c.target.checked),
749
+ checked: !!b
168
750
  })
169
751
  });
170
752
  case "checkbox":
171
- return /* @__PURE__ */ jsx("input", {
753
+ return /* @__PURE__ */ y("input", {
172
754
  type: "checkbox",
173
- className: `form-check-input ${className}`,
174
- title,
175
- disabled,
176
- onChange: (e) => handleOnChange(e.target.checked),
177
- checked: !!value
755
+ className: `form-check-input ${v}`,
756
+ title: R,
757
+ disabled: s,
758
+ onChange: (c) => p(c.target.checked),
759
+ checked: !!b
178
760
  });
179
761
  case "radio":
180
- return /* @__PURE__ */ jsx("span", {
181
- title,
182
- children: values.map((v) => /* @__PURE__ */ jsxs("div", {
762
+ return /* @__PURE__ */ y("span", {
763
+ title: R,
764
+ children: l.map((c) => /* @__PURE__ */ ie("div", {
183
765
  className: "form-check form-check-inline",
184
- children: [/* @__PURE__ */ jsx("input", {
766
+ children: [/* @__PURE__ */ y("input", {
185
767
  className: "form-check-input",
186
768
  type: "radio",
187
- id: v.name,
188
- value: v.name,
189
- checked: value === v.name,
190
- disabled,
191
- onChange: (e) => handleOnChange(e.target.value)
192
- }), /* @__PURE__ */ jsx("label", {
769
+ id: c.name,
770
+ value: c.name,
771
+ checked: b === c.name,
772
+ disabled: s,
773
+ onChange: (S) => p(S.target.value)
774
+ }), /* @__PURE__ */ y("label", {
193
775
  className: "form-check-label",
194
- htmlFor: v.name,
195
- children: v.label
776
+ htmlFor: c.name,
777
+ children: c.label
196
778
  })]
197
- }, v.name))
779
+ }, c.name))
198
780
  });
199
781
  }
200
- return /* @__PURE__ */ jsx("input", {
201
- type: inputTypeCoerced,
202
- value,
203
- title,
204
- className,
205
- disabled,
206
- placeholder: placeHolderText,
207
- onChange: (e) => handleOnChange(e.target.value)
782
+ return /* @__PURE__ */ y("input", {
783
+ type: L,
784
+ value: b,
785
+ title: R,
786
+ className: v,
787
+ disabled: s,
788
+ placeholder: j,
789
+ onChange: (c) => p(c.target.value)
208
790
  });
209
791
  };
210
- BootstrapValueEditor.displayName = "BootstrapValueEditor";
211
- const bootstrapControlElements = {
212
- dragHandle: BootstrapDragHandle,
213
- notToggle: BootstrapNotToggle,
214
- valueEditor: BootstrapValueEditor
215
- };
216
- const bootstrapControlClassnames = {
792
+ Ye.displayName = "BootstrapValueEditor";
793
+ const wr = "5.0.0-alpha.3", Rr = {
794
+ dragHandle: Ae,
795
+ notToggle: We,
796
+ valueEditor: Ye
797
+ }, _r = {
217
798
  addGroup: "btn btn-secondary btn-sm",
218
799
  addRule: "btn btn-primary btn-sm",
219
800
  cloneGroup: "btn btn-secondary btn-sm",
@@ -227,6 +808,18 @@ const bootstrapControlClassnames = {
227
808
  operators: "form-select form-select-sm",
228
809
  value: "form-control form-control-sm",
229
810
  valueSource: "form-select form-select-sm"
811
+ }, kr = hr({
812
+ key: "bootstrap",
813
+ controlClassnames: _r,
814
+ controlElements: Rr
815
+ });
816
+ export {
817
+ Ae as BootstrapDragHandle,
818
+ We as BootstrapNotToggle,
819
+ Ye as BootstrapValueEditor,
820
+ kr as QueryBuilderBootstrap,
821
+ _r as bootstrapControlClassnames,
822
+ Rr as bootstrapControlElements,
823
+ wr as version
230
824
  };
231
- export { BootstrapDragHandle, BootstrapNotToggle, BootstrapValueEditor, bootstrapControlClassnames, bootstrapControlElements };
232
825
  //# sourceMappingURL=index.es.js.map