@react-querybuilder/antd 6.5.3 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,7 +61,7 @@ var require_dayjs_min = __commonJS({
61
61
  "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
62
62
  }(exports, function() {
63
63
  "use strict";
64
- var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", f = "month", h = "quarter", c = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
64
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
65
65
  var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
66
66
  return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
67
67
  } }, m = function(t2, e2, n2) {
@@ -73,19 +73,19 @@ var require_dayjs_min = __commonJS({
73
73
  }, m: function t2(e2, n2) {
74
74
  if (e2.date() < n2.date())
75
75
  return -t2(n2, e2);
76
- var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, f), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), f);
76
+ var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
77
77
  return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
78
78
  }, a: function(t2) {
79
79
  return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
80
80
  }, p: function(t2) {
81
- return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
81
+ return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
82
82
  }, u: function(t2) {
83
83
  return void 0 === t2;
84
84
  } }, g = "en", D = {};
85
85
  D[g] = M;
86
- var p = function(t2) {
87
- return t2 instanceof _;
88
- }, S = function t2(e2, n2, r2) {
86
+ var p = "$isDayjsObject", S = function(t2) {
87
+ return t2 instanceof _ || !(!t2 || !t2[p]);
88
+ }, w = function t2(e2, n2, r2) {
89
89
  var i2;
90
90
  if (!e2)
91
91
  return g;
@@ -100,18 +100,18 @@ var require_dayjs_min = __commonJS({
100
100
  D[a2] = e2, i2 = a2;
101
101
  }
102
102
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
103
- }, w = function(t2, e2) {
104
- if (p(t2))
103
+ }, O = function(t2, e2) {
104
+ if (S(t2))
105
105
  return t2.clone();
106
106
  var n2 = "object" == typeof e2 ? e2 : {};
107
107
  return n2.date = t2, n2.args = arguments, new _(n2);
108
- }, O = v;
109
- O.l = S, O.i = p, O.w = function(t2, e2) {
110
- return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
108
+ }, b = v;
109
+ b.l = w, b.i = S, b.w = function(t2, e2) {
110
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
111
111
  };
112
112
  var _ = function() {
113
113
  function M2(t2) {
114
- this.$L = S(t2.locale, null, true), this.parse(t2);
114
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
115
115
  }
116
116
  var m2 = M2.prototype;
117
117
  return m2.parse = function(t2) {
@@ -119,7 +119,7 @@ var require_dayjs_min = __commonJS({
119
119
  var e2 = t3.date, n2 = t3.utc;
120
120
  if (null === e2)
121
121
  return /* @__PURE__ */ new Date(NaN);
122
- if (O.u(e2))
122
+ if (b.u(e2))
123
123
  return /* @__PURE__ */ new Date();
124
124
  if (e2 instanceof Date)
125
125
  return new Date(e2);
@@ -131,38 +131,38 @@ var require_dayjs_min = __commonJS({
131
131
  }
132
132
  }
133
133
  return new Date(e2);
134
- }(t2), this.$x = t2.x || {}, this.init();
134
+ }(t2), this.init();
135
135
  }, m2.init = function() {
136
136
  var t2 = this.$d;
137
137
  this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
138
138
  }, m2.$utils = function() {
139
- return O;
139
+ return b;
140
140
  }, m2.isValid = function() {
141
141
  return !(this.$d.toString() === l);
142
142
  }, m2.isSame = function(t2, e2) {
143
- var n2 = w(t2);
143
+ var n2 = O(t2);
144
144
  return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
145
145
  }, m2.isAfter = function(t2, e2) {
146
- return w(t2) < this.startOf(e2);
146
+ return O(t2) < this.startOf(e2);
147
147
  }, m2.isBefore = function(t2, e2) {
148
- return this.endOf(e2) < w(t2);
148
+ return this.endOf(e2) < O(t2);
149
149
  }, m2.$g = function(t2, e2, n2) {
150
- return O.u(t2) ? this[e2] : this.set(n2, t2);
150
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
151
151
  }, m2.unix = function() {
152
152
  return Math.floor(this.valueOf() / 1e3);
153
153
  }, m2.valueOf = function() {
154
154
  return this.$d.getTime();
155
155
  }, m2.startOf = function(t2, e2) {
156
- var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
157
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
156
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
157
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
158
158
  return r2 ? i2 : i2.endOf(a);
159
159
  }, $2 = function(t3, e3) {
160
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
160
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
161
161
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
162
- switch (h2) {
163
- case c:
162
+ switch (f2) {
163
+ case h:
164
164
  return r2 ? l2(1, 0) : l2(31, 11);
165
- case f:
165
+ case c:
166
166
  return r2 ? l2(1, M3) : l2(0, M3 + 1);
167
167
  case o:
168
168
  var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
@@ -182,8 +182,8 @@ var require_dayjs_min = __commonJS({
182
182
  }, m2.endOf = function(t2) {
183
183
  return this.startOf(t2, false);
184
184
  }, m2.$set = function(t2, e2) {
185
- var n2, o2 = O.p(t2), h2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = h2 + "Date", n2[d] = h2 + "Date", n2[f] = h2 + "Month", n2[c] = h2 + "FullYear", n2[u] = h2 + "Hours", n2[s] = h2 + "Minutes", n2[i] = h2 + "Seconds", n2[r] = h2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
186
- if (o2 === f || o2 === c) {
185
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
186
+ if (o2 === c || o2 === h) {
187
187
  var y2 = this.clone().set(d, 1);
188
188
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
189
189
  } else
@@ -192,57 +192,139 @@ var require_dayjs_min = __commonJS({
192
192
  }, m2.set = function(t2, e2) {
193
193
  return this.clone().$set(t2, e2);
194
194
  }, m2.get = function(t2) {
195
- return this[O.p(t2)]();
196
- }, m2.add = function(r2, h2) {
195
+ return this[b.p(t2)]();
196
+ }, m2.add = function(r2, f2) {
197
197
  var d2, l2 = this;
198
198
  r2 = Number(r2);
199
- var $2 = O.p(h2), y2 = function(t2) {
200
- var e2 = w(l2);
201
- return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
199
+ var $2 = b.p(f2), y2 = function(t2) {
200
+ var e2 = O(l2);
201
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
202
202
  };
203
- if ($2 === f)
204
- return this.set(f, this.$M + r2);
205
203
  if ($2 === c)
206
- return this.set(c, this.$y + r2);
204
+ return this.set(c, this.$M + r2);
205
+ if ($2 === h)
206
+ return this.set(h, this.$y + r2);
207
207
  if ($2 === a)
208
208
  return y2(1);
209
209
  if ($2 === o)
210
210
  return y2(7);
211
211
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
212
- return O.w(m3, this);
212
+ return b.w(m3, this);
213
213
  }, m2.subtract = function(t2, e2) {
214
214
  return this.add(-1 * t2, e2);
215
215
  }, m2.format = function(t2) {
216
216
  var e2 = this, n2 = this.$locale();
217
217
  if (!this.isValid())
218
218
  return n2.invalidDate || l;
219
- var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, f2 = n2.months, h2 = function(t3, n3, i3, s3) {
219
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
220
220
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
221
- }, c2 = function(t3) {
222
- return O.s(s2 % 12 || 12, t3, "0");
223
- }, d2 = n2.meridiem || function(t3, e3, n3) {
221
+ }, d2 = function(t3) {
222
+ return b.s(s2 % 12 || 12, t3, "0");
223
+ }, $2 = f2 || function(t3, e3, n3) {
224
224
  var r3 = t3 < 12 ? "AM" : "PM";
225
225
  return n3 ? r3.toLowerCase() : r3;
226
- }, $2 = { YY: String(this.$y).slice(-2), YYYY: O.s(this.$y, 4, "0"), M: a2 + 1, MM: O.s(a2 + 1, 2, "0"), MMM: h2(n2.monthsShort, a2, f2, 3), MMMM: h2(f2, a2), D: this.$D, DD: O.s(this.$D, 2, "0"), d: String(this.$W), dd: h2(n2.weekdaysMin, this.$W, o2, 2), ddd: h2(n2.weekdaysShort, this.$W, o2, 3), dddd: o2[this.$W], H: String(s2), HH: O.s(s2, 2, "0"), h: c2(1), hh: c2(2), a: d2(s2, u2, true), A: d2(s2, u2, false), m: String(u2), mm: O.s(u2, 2, "0"), s: String(this.$s), ss: O.s(this.$s, 2, "0"), SSS: O.s(this.$ms, 3, "0"), Z: i2 };
227
- return r2.replace(y, function(t3, e3) {
228
- return e3 || $2[t3] || i2.replace(":", "");
226
+ };
227
+ return r2.replace(y, function(t3, r3) {
228
+ return r3 || function(t4) {
229
+ switch (t4) {
230
+ case "YY":
231
+ return String(e2.$y).slice(-2);
232
+ case "YYYY":
233
+ return b.s(e2.$y, 4, "0");
234
+ case "M":
235
+ return a2 + 1;
236
+ case "MM":
237
+ return b.s(a2 + 1, 2, "0");
238
+ case "MMM":
239
+ return h2(n2.monthsShort, a2, c2, 3);
240
+ case "MMMM":
241
+ return h2(c2, a2);
242
+ case "D":
243
+ return e2.$D;
244
+ case "DD":
245
+ return b.s(e2.$D, 2, "0");
246
+ case "d":
247
+ return String(e2.$W);
248
+ case "dd":
249
+ return h2(n2.weekdaysMin, e2.$W, o2, 2);
250
+ case "ddd":
251
+ return h2(n2.weekdaysShort, e2.$W, o2, 3);
252
+ case "dddd":
253
+ return o2[e2.$W];
254
+ case "H":
255
+ return String(s2);
256
+ case "HH":
257
+ return b.s(s2, 2, "0");
258
+ case "h":
259
+ return d2(1);
260
+ case "hh":
261
+ return d2(2);
262
+ case "a":
263
+ return $2(s2, u2, true);
264
+ case "A":
265
+ return $2(s2, u2, false);
266
+ case "m":
267
+ return String(u2);
268
+ case "mm":
269
+ return b.s(u2, 2, "0");
270
+ case "s":
271
+ return String(e2.$s);
272
+ case "ss":
273
+ return b.s(e2.$s, 2, "0");
274
+ case "SSS":
275
+ return b.s(e2.$ms, 3, "0");
276
+ case "Z":
277
+ return i2;
278
+ }
279
+ return null;
280
+ }(t3) || i2.replace(":", "");
229
281
  });
230
282
  }, m2.utcOffset = function() {
231
283
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
232
284
  }, m2.diff = function(r2, d2, l2) {
233
- var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
234
- return g2 = ($2 = {}, $2[c] = g2 / 12, $2[f] = g2, $2[h] = g2 / 3, $2[o] = (v2 - m3) / 6048e5, $2[a] = (v2 - m3) / 864e5, $2[u] = v2 / n, $2[s] = v2 / e, $2[i] = v2 / t, $2)[y2] || v2, l2 ? g2 : O.a(g2);
285
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
286
+ return b.m(y2, m3);
287
+ };
288
+ switch (M3) {
289
+ case h:
290
+ $2 = D2() / 12;
291
+ break;
292
+ case c:
293
+ $2 = D2();
294
+ break;
295
+ case f:
296
+ $2 = D2() / 3;
297
+ break;
298
+ case o:
299
+ $2 = (g2 - v2) / 6048e5;
300
+ break;
301
+ case a:
302
+ $2 = (g2 - v2) / 864e5;
303
+ break;
304
+ case u:
305
+ $2 = g2 / n;
306
+ break;
307
+ case s:
308
+ $2 = g2 / e;
309
+ break;
310
+ case i:
311
+ $2 = g2 / t;
312
+ break;
313
+ default:
314
+ $2 = g2;
315
+ }
316
+ return l2 ? $2 : b.a($2);
235
317
  }, m2.daysInMonth = function() {
236
- return this.endOf(f).$D;
318
+ return this.endOf(c).$D;
237
319
  }, m2.$locale = function() {
238
320
  return D[this.$L];
239
321
  }, m2.locale = function(t2, e2) {
240
322
  if (!t2)
241
323
  return this.$L;
242
- var n2 = this.clone(), r2 = S(t2, e2, true);
324
+ var n2 = this.clone(), r2 = w(t2, e2, true);
243
325
  return r2 && (n2.$L = r2), n2;
244
326
  }, m2.clone = function() {
245
- return O.w(this.$d, this);
327
+ return b.w(this.$d, this);
246
328
  }, m2.toDate = function() {
247
329
  return new Date(this.valueOf());
248
330
  }, m2.toJSON = function() {
@@ -252,16 +334,16 @@ var require_dayjs_min = __commonJS({
252
334
  }, m2.toString = function() {
253
335
  return this.$d.toUTCString();
254
336
  }, M2;
255
- }(), T = _.prototype;
256
- return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
257
- T[t2[1]] = function(e2) {
337
+ }(), k = _.prototype;
338
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
339
+ k[t2[1]] = function(e2) {
258
340
  return this.$g(e2, t2[0], t2[1]);
259
341
  };
260
- }), w.extend = function(t2, e2) {
261
- return t2.$i || (t2(e2, _, w), t2.$i = true), w;
262
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
263
- return w(1e3 * t2);
264
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
342
+ }), O.extend = function(t2, e2) {
343
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
344
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
345
+ return O(1e3 * t2);
346
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
265
347
  });
266
348
  }
267
349
  });
@@ -1048,11 +1130,58 @@ var AntDNotToggle = (_a) => {
1048
1130
  };
1049
1131
  AntDNotToggle.displayName = "AntDNotToggle";
1050
1132
 
1133
+ // src/AntDShiftActions.tsx
1134
+ import { CaretDownOutlined, CaretUpOutlined } from "@ant-design/icons";
1135
+ import { Button as Button2 } from "antd";
1136
+ import * as React4 from "react";
1137
+ import { useShiftActions } from "react-querybuilder";
1138
+ var AntDShiftActions = ({
1139
+ path,
1140
+ disabled,
1141
+ className,
1142
+ // labels, // Labels are hard-coded in this component
1143
+ titles,
1144
+ testID,
1145
+ lastInGroup,
1146
+ schema: { combinators, dispatchQuery, getQuery }
1147
+ }) => {
1148
+ const { shiftUp, shiftUpDisabled, shiftDown, shiftDownDisabled } = useShiftActions({
1149
+ combinators,
1150
+ disabled,
1151
+ dispatchQuery,
1152
+ getQuery,
1153
+ lastInGroup,
1154
+ path
1155
+ });
1156
+ return /* @__PURE__ */ React4.createElement("div", { "data-testid": testID, className }, /* @__PURE__ */ React4.createElement(
1157
+ Button2,
1158
+ {
1159
+ type: "primary",
1160
+ size: "small",
1161
+ title: titles == null ? void 0 : titles.shiftUp,
1162
+ onClick: shiftUp,
1163
+ disabled: shiftUpDisabled
1164
+ },
1165
+ /* @__PURE__ */ React4.createElement(CaretUpOutlined, null)
1166
+ ), /* @__PURE__ */ React4.createElement(
1167
+ Button2,
1168
+ {
1169
+ type: "primary",
1170
+ size: "small",
1171
+ title: titles == null ? void 0 : titles.shiftDown,
1172
+ onClick: shiftDown,
1173
+ disabled: shiftDownDisabled
1174
+ },
1175
+ /* @__PURE__ */ React4.createElement(CaretDownOutlined, null)
1176
+ ));
1177
+ };
1178
+ AntDShiftActions.displayName = "AntDShiftActions";
1179
+
1051
1180
  // src/AntDValueEditor.tsx
1052
1181
  var import_dayjs = __toESM(require_dayjs_min());
1053
1182
  var import_dayjs2 = __toESM(require_dayjs());
1054
1183
  import { DatePicker as AntdDatePicker, Checkbox, Input, Radio, Switch as Switch2, TimePicker } from "antd";
1055
- import * as React6 from "react";
1184
+ import * as React7 from "react";
1056
1185
  import {
1057
1186
  getFirstOption,
1058
1187
  standardClassnames,
@@ -1062,15 +1191,15 @@ import {
1062
1191
 
1063
1192
  // src/AntDValueSelector.tsx
1064
1193
  import { Select as Select2 } from "antd";
1065
- import * as React5 from "react";
1194
+ import * as React6 from "react";
1066
1195
  import { useValueSelector } from "react-querybuilder";
1067
1196
 
1068
1197
  // src/utils.tsx
1069
1198
  import { Select } from "antd";
1070
- import * as React4 from "react";
1199
+ import * as React5 from "react";
1071
1200
  import { isOptionGroupArray } from "react-querybuilder";
1072
1201
  var { OptGroup, Option } = Select;
1073
- var toOptions = (arr) => isOptionGroupArray(arr) ? arr.map((og) => /* @__PURE__ */ React4.createElement(OptGroup, { key: og.label, label: og.label }, og.options.map((opt) => /* @__PURE__ */ React4.createElement(Option, { key: opt.name, value: opt.name }, opt.label)))) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ React4.createElement(Option, { key: opt.name, value: opt.name }, opt.label)) : (
1202
+ var toOptions = (arr) => isOptionGroupArray(arr) ? arr.map((og) => /* @__PURE__ */ React5.createElement(OptGroup, { key: og.label, label: og.label }, og.options.map((opt) => /* @__PURE__ */ React5.createElement(Option, { key: opt.name, value: opt.name }, opt.label)))) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ React5.createElement(Option, { key: opt.name, value: opt.name }, opt.label)) : (
1074
1203
  /* istanbul ignore next */
1075
1204
  null
1076
1205
  );
@@ -1087,6 +1216,7 @@ var AntDValueSelector = (_a) => {
1087
1216
  multiple,
1088
1217
  listsAsArrays,
1089
1218
  testID: _testID,
1219
+ rule: _rule,
1090
1220
  rules: _rules,
1091
1221
  level: _level,
1092
1222
  path: _path,
@@ -1107,6 +1237,7 @@ var AntDValueSelector = (_a) => {
1107
1237
  "listsAsArrays",
1108
1238
  // Props that should not be in extraProps
1109
1239
  "testID",
1240
+ "rule",
1110
1241
  "rules",
1111
1242
  "level",
1112
1243
  "path",
@@ -1119,10 +1250,10 @@ var AntDValueSelector = (_a) => {
1119
1250
  ]);
1120
1251
  const { onChange, val } = useValueSelector({ handleOnChange, listsAsArrays, multiple, value });
1121
1252
  const modeObj = multiple ? { mode: "multiple" } : {};
1122
- return /* @__PURE__ */ React5.createElement("span", { title, className }, /* @__PURE__ */ React5.createElement(
1253
+ return /* @__PURE__ */ React6.createElement("span", { title, className }, /* @__PURE__ */ React6.createElement(
1123
1254
  Select2,
1124
1255
  __spreadValues(__spreadProps(__spreadValues({}, modeObj), {
1125
- dropdownMatchSelectWidth: false,
1256
+ popupMatchSelectWidth: false,
1126
1257
  disabled,
1127
1258
  value: val,
1128
1259
  onChange
@@ -1192,7 +1323,7 @@ var AntDValueEditor = (_a) => {
1192
1323
  var _a3, _b3;
1193
1324
  if (type === "text") {
1194
1325
  if (inputTypeCoerced === "time") {
1195
- return /* @__PURE__ */ React6.createElement(
1326
+ return /* @__PURE__ */ React7.createElement(
1196
1327
  TimePicker,
1197
1328
  {
1198
1329
  key,
@@ -1207,7 +1338,7 @@ var AntDValueEditor = (_a) => {
1207
1338
  }
1208
1339
  );
1209
1340
  }
1210
- return /* @__PURE__ */ React6.createElement(
1341
+ return /* @__PURE__ */ React7.createElement(
1211
1342
  Input,
1212
1343
  {
1213
1344
  key,
@@ -1220,7 +1351,7 @@ var AntDValueEditor = (_a) => {
1220
1351
  }
1221
1352
  );
1222
1353
  }
1223
- return /* @__PURE__ */ React6.createElement(
1354
+ return /* @__PURE__ */ React7.createElement(
1224
1355
  SelectorComponent,
1225
1356
  __spreadProps(__spreadValues({}, props), {
1226
1357
  key,
@@ -1233,12 +1364,12 @@ var AntDValueEditor = (_a) => {
1233
1364
  })
1234
1365
  );
1235
1366
  });
1236
- return /* @__PURE__ */ React6.createElement("span", { "data-testid": testID, className, title }, editors[0], separator, editors[1]);
1367
+ return /* @__PURE__ */ React7.createElement("span", { "data-testid": testID, className, title }, editors[0], separator, editors[1]);
1237
1368
  }
1238
1369
  switch (type) {
1239
1370
  case "select":
1240
1371
  case "multiselect":
1241
- return /* @__PURE__ */ React6.createElement(
1372
+ return /* @__PURE__ */ React7.createElement(
1242
1373
  SelectorComponent,
1243
1374
  __spreadProps(__spreadValues({}, props), {
1244
1375
  className,
@@ -1252,7 +1383,7 @@ var AntDValueEditor = (_a) => {
1252
1383
  })
1253
1384
  );
1254
1385
  case "textarea":
1255
- return /* @__PURE__ */ React6.createElement(
1386
+ return /* @__PURE__ */ React7.createElement(
1256
1387
  Input.TextArea,
1257
1388
  {
1258
1389
  value,
@@ -1264,7 +1395,7 @@ var AntDValueEditor = (_a) => {
1264
1395
  }
1265
1396
  );
1266
1397
  case "switch":
1267
- return /* @__PURE__ */ React6.createElement(
1398
+ return /* @__PURE__ */ React7.createElement(
1268
1399
  Switch2,
1269
1400
  {
1270
1401
  checked: !!value,
@@ -1275,7 +1406,7 @@ var AntDValueEditor = (_a) => {
1275
1406
  }
1276
1407
  );
1277
1408
  case "checkbox":
1278
- return /* @__PURE__ */ React6.createElement("span", { title, className }, /* @__PURE__ */ React6.createElement(
1409
+ return /* @__PURE__ */ React7.createElement("span", { title, className }, /* @__PURE__ */ React7.createElement(
1279
1410
  Checkbox,
1280
1411
  {
1281
1412
  type: "checkbox",
@@ -1285,7 +1416,7 @@ var AntDValueEditor = (_a) => {
1285
1416
  }
1286
1417
  ));
1287
1418
  case "radio":
1288
- return /* @__PURE__ */ React6.createElement("span", { className, title }, values.map((v) => /* @__PURE__ */ React6.createElement(
1419
+ return /* @__PURE__ */ React7.createElement("span", { className, title }, values.map((v) => /* @__PURE__ */ React7.createElement(
1289
1420
  Radio,
1290
1421
  {
1291
1422
  key: v.name,
@@ -1300,7 +1431,7 @@ var AntDValueEditor = (_a) => {
1300
1431
  switch (inputTypeCoerced) {
1301
1432
  case "date":
1302
1433
  case "datetime-local":
1303
- return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React6.createElement(
1434
+ return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React7.createElement(
1304
1435
  DatePicker.RangePicker,
1305
1436
  {
1306
1437
  value: ((_b2 = toArray(value)) == null ? void 0 : _b2.length) >= 2 ? toArray(value).map((v) => (0, import_dayjs.default)(v)) : void 0,
@@ -1317,7 +1448,7 @@ var AntDValueEditor = (_a) => {
1317
1448
  }
1318
1449
  )
1319
1450
  }
1320
- ) : /* @__PURE__ */ React6.createElement(
1451
+ ) : /* @__PURE__ */ React7.createElement(
1321
1452
  DatePicker,
1322
1453
  {
1323
1454
  value: value ? (0, import_dayjs.default)(value) : null,
@@ -1329,7 +1460,7 @@ var AntDValueEditor = (_a) => {
1329
1460
  }
1330
1461
  );
1331
1462
  case "time":
1332
- return /* @__PURE__ */ React6.createElement(
1463
+ return /* @__PURE__ */ React7.createElement(
1333
1464
  TimePicker,
1334
1465
  {
1335
1466
  value: value ? (0, import_dayjs.default)(value, "HH:mm:ss") : null,
@@ -1343,7 +1474,7 @@ var AntDValueEditor = (_a) => {
1343
1474
  }
1344
1475
  );
1345
1476
  }
1346
- return /* @__PURE__ */ React6.createElement(
1477
+ return /* @__PURE__ */ React7.createElement(
1347
1478
  Input,
1348
1479
  {
1349
1480
  type: inputTypeCoerced,
@@ -1374,7 +1505,8 @@ var antdControlElements = {
1374
1505
  removeRuleAction: AntDActionElement,
1375
1506
  valueEditor: AntDValueEditor,
1376
1507
  dragHandle: AntDDragHandle,
1377
- valueSourceSelector: AntDValueSelector
1508
+ valueSourceSelector: AntDValueSelector,
1509
+ shiftActions: AntDShiftActions
1378
1510
  };
1379
1511
  var QueryBuilderAntD = getCompatContextProvider({
1380
1512
  key: "antd",
@@ -1384,6 +1516,7 @@ export {
1384
1516
  AntDActionElement,
1385
1517
  AntDDragHandle,
1386
1518
  AntDNotToggle,
1519
+ AntDShiftActions,
1387
1520
  AntDValueEditor,
1388
1521
  AntDValueSelector,
1389
1522
  QueryBuilderAntD,