@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.
@@ -32,7 +32,7 @@ var require_dayjs_min = __commonJS({
32
32
  "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();
33
33
  }(exports, function() {
34
34
  "use strict";
35
- 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) {
35
+ 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) {
36
36
  var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
37
37
  return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
38
38
  } }, m = function(t2, e2, n2) {
@@ -44,19 +44,19 @@ var require_dayjs_min = __commonJS({
44
44
  }, m: function t2(e2, n2) {
45
45
  if (e2.date() < n2.date())
46
46
  return -t2(n2, e2);
47
- 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);
47
+ 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);
48
48
  return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
49
49
  }, a: function(t2) {
50
50
  return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
51
51
  }, p: function(t2) {
52
- 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$/, "");
52
+ 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$/, "");
53
53
  }, u: function(t2) {
54
54
  return void 0 === t2;
55
55
  } }, g = "en", D = {};
56
56
  D[g] = M;
57
- var p = function(t2) {
58
- return t2 instanceof _;
59
- }, S = function t2(e2, n2, r2) {
57
+ var p = "$isDayjsObject", S = function(t2) {
58
+ return t2 instanceof _ || !(!t2 || !t2[p]);
59
+ }, w = function t2(e2, n2, r2) {
60
60
  var i2;
61
61
  if (!e2)
62
62
  return g;
@@ -71,18 +71,18 @@ var require_dayjs_min = __commonJS({
71
71
  D[a2] = e2, i2 = a2;
72
72
  }
73
73
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
74
- }, w = function(t2, e2) {
75
- if (p(t2))
74
+ }, O = function(t2, e2) {
75
+ if (S(t2))
76
76
  return t2.clone();
77
77
  var n2 = "object" == typeof e2 ? e2 : {};
78
78
  return n2.date = t2, n2.args = arguments, new _(n2);
79
- }, O = v;
80
- O.l = S, O.i = p, O.w = function(t2, e2) {
81
- return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
79
+ }, b = v;
80
+ b.l = w, b.i = S, b.w = function(t2, e2) {
81
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
82
82
  };
83
83
  var _ = function() {
84
84
  function M2(t2) {
85
- this.$L = S(t2.locale, null, true), this.parse(t2);
85
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
86
86
  }
87
87
  var m2 = M2.prototype;
88
88
  return m2.parse = function(t2) {
@@ -90,7 +90,7 @@ var require_dayjs_min = __commonJS({
90
90
  var e2 = t3.date, n2 = t3.utc;
91
91
  if (null === e2)
92
92
  return /* @__PURE__ */ new Date(NaN);
93
- if (O.u(e2))
93
+ if (b.u(e2))
94
94
  return /* @__PURE__ */ new Date();
95
95
  if (e2 instanceof Date)
96
96
  return new Date(e2);
@@ -102,38 +102,38 @@ var require_dayjs_min = __commonJS({
102
102
  }
103
103
  }
104
104
  return new Date(e2);
105
- }(t2), this.$x = t2.x || {}, this.init();
105
+ }(t2), this.init();
106
106
  }, m2.init = function() {
107
107
  var t2 = this.$d;
108
108
  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();
109
109
  }, m2.$utils = function() {
110
- return O;
110
+ return b;
111
111
  }, m2.isValid = function() {
112
112
  return !(this.$d.toString() === l);
113
113
  }, m2.isSame = function(t2, e2) {
114
- var n2 = w(t2);
114
+ var n2 = O(t2);
115
115
  return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
116
116
  }, m2.isAfter = function(t2, e2) {
117
- return w(t2) < this.startOf(e2);
117
+ return O(t2) < this.startOf(e2);
118
118
  }, m2.isBefore = function(t2, e2) {
119
- return this.endOf(e2) < w(t2);
119
+ return this.endOf(e2) < O(t2);
120
120
  }, m2.$g = function(t2, e2, n2) {
121
- return O.u(t2) ? this[e2] : this.set(n2, t2);
121
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
122
122
  }, m2.unix = function() {
123
123
  return Math.floor(this.valueOf() / 1e3);
124
124
  }, m2.valueOf = function() {
125
125
  return this.$d.getTime();
126
126
  }, m2.startOf = function(t2, e2) {
127
- var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
128
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
127
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
128
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
129
129
  return r2 ? i2 : i2.endOf(a);
130
130
  }, $2 = function(t3, e3) {
131
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
131
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
132
132
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
133
- switch (h2) {
134
- case c:
133
+ switch (f2) {
134
+ case h:
135
135
  return r2 ? l2(1, 0) : l2(31, 11);
136
- case f:
136
+ case c:
137
137
  return r2 ? l2(1, M3) : l2(0, M3 + 1);
138
138
  case o:
139
139
  var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
@@ -153,8 +153,8 @@ var require_dayjs_min = __commonJS({
153
153
  }, m2.endOf = function(t2) {
154
154
  return this.startOf(t2, false);
155
155
  }, m2.$set = function(t2, e2) {
156
- 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;
157
- if (o2 === f || o2 === c) {
156
+ 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;
157
+ if (o2 === c || o2 === h) {
158
158
  var y2 = this.clone().set(d, 1);
159
159
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
160
160
  } else
@@ -163,57 +163,139 @@ var require_dayjs_min = __commonJS({
163
163
  }, m2.set = function(t2, e2) {
164
164
  return this.clone().$set(t2, e2);
165
165
  }, m2.get = function(t2) {
166
- return this[O.p(t2)]();
167
- }, m2.add = function(r2, h2) {
166
+ return this[b.p(t2)]();
167
+ }, m2.add = function(r2, f2) {
168
168
  var d2, l2 = this;
169
169
  r2 = Number(r2);
170
- var $2 = O.p(h2), y2 = function(t2) {
171
- var e2 = w(l2);
172
- return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
170
+ var $2 = b.p(f2), y2 = function(t2) {
171
+ var e2 = O(l2);
172
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
173
173
  };
174
- if ($2 === f)
175
- return this.set(f, this.$M + r2);
176
174
  if ($2 === c)
177
- return this.set(c, this.$y + r2);
175
+ return this.set(c, this.$M + r2);
176
+ if ($2 === h)
177
+ return this.set(h, this.$y + r2);
178
178
  if ($2 === a)
179
179
  return y2(1);
180
180
  if ($2 === o)
181
181
  return y2(7);
182
182
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
183
- return O.w(m3, this);
183
+ return b.w(m3, this);
184
184
  }, m2.subtract = function(t2, e2) {
185
185
  return this.add(-1 * t2, e2);
186
186
  }, m2.format = function(t2) {
187
187
  var e2 = this, n2 = this.$locale();
188
188
  if (!this.isValid())
189
189
  return n2.invalidDate || l;
190
- 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) {
190
+ 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) {
191
191
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
192
- }, c2 = function(t3) {
193
- return O.s(s2 % 12 || 12, t3, "0");
194
- }, d2 = n2.meridiem || function(t3, e3, n3) {
192
+ }, d2 = function(t3) {
193
+ return b.s(s2 % 12 || 12, t3, "0");
194
+ }, $2 = f2 || function(t3, e3, n3) {
195
195
  var r3 = t3 < 12 ? "AM" : "PM";
196
196
  return n3 ? r3.toLowerCase() : r3;
197
- }, $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 };
198
- return r2.replace(y, function(t3, e3) {
199
- return e3 || $2[t3] || i2.replace(":", "");
197
+ };
198
+ return r2.replace(y, function(t3, r3) {
199
+ return r3 || function(t4) {
200
+ switch (t4) {
201
+ case "YY":
202
+ return String(e2.$y).slice(-2);
203
+ case "YYYY":
204
+ return b.s(e2.$y, 4, "0");
205
+ case "M":
206
+ return a2 + 1;
207
+ case "MM":
208
+ return b.s(a2 + 1, 2, "0");
209
+ case "MMM":
210
+ return h2(n2.monthsShort, a2, c2, 3);
211
+ case "MMMM":
212
+ return h2(c2, a2);
213
+ case "D":
214
+ return e2.$D;
215
+ case "DD":
216
+ return b.s(e2.$D, 2, "0");
217
+ case "d":
218
+ return String(e2.$W);
219
+ case "dd":
220
+ return h2(n2.weekdaysMin, e2.$W, o2, 2);
221
+ case "ddd":
222
+ return h2(n2.weekdaysShort, e2.$W, o2, 3);
223
+ case "dddd":
224
+ return o2[e2.$W];
225
+ case "H":
226
+ return String(s2);
227
+ case "HH":
228
+ return b.s(s2, 2, "0");
229
+ case "h":
230
+ return d2(1);
231
+ case "hh":
232
+ return d2(2);
233
+ case "a":
234
+ return $2(s2, u2, true);
235
+ case "A":
236
+ return $2(s2, u2, false);
237
+ case "m":
238
+ return String(u2);
239
+ case "mm":
240
+ return b.s(u2, 2, "0");
241
+ case "s":
242
+ return String(e2.$s);
243
+ case "ss":
244
+ return b.s(e2.$s, 2, "0");
245
+ case "SSS":
246
+ return b.s(e2.$ms, 3, "0");
247
+ case "Z":
248
+ return i2;
249
+ }
250
+ return null;
251
+ }(t3) || i2.replace(":", "");
200
252
  });
201
253
  }, m2.utcOffset = function() {
202
254
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
203
255
  }, m2.diff = function(r2, d2, l2) {
204
- var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
205
- 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);
256
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
257
+ return b.m(y2, m3);
258
+ };
259
+ switch (M3) {
260
+ case h:
261
+ $2 = D2() / 12;
262
+ break;
263
+ case c:
264
+ $2 = D2();
265
+ break;
266
+ case f:
267
+ $2 = D2() / 3;
268
+ break;
269
+ case o:
270
+ $2 = (g2 - v2) / 6048e5;
271
+ break;
272
+ case a:
273
+ $2 = (g2 - v2) / 864e5;
274
+ break;
275
+ case u:
276
+ $2 = g2 / n;
277
+ break;
278
+ case s:
279
+ $2 = g2 / e;
280
+ break;
281
+ case i:
282
+ $2 = g2 / t;
283
+ break;
284
+ default:
285
+ $2 = g2;
286
+ }
287
+ return l2 ? $2 : b.a($2);
206
288
  }, m2.daysInMonth = function() {
207
- return this.endOf(f).$D;
289
+ return this.endOf(c).$D;
208
290
  }, m2.$locale = function() {
209
291
  return D[this.$L];
210
292
  }, m2.locale = function(t2, e2) {
211
293
  if (!t2)
212
294
  return this.$L;
213
- var n2 = this.clone(), r2 = S(t2, e2, true);
295
+ var n2 = this.clone(), r2 = w(t2, e2, true);
214
296
  return r2 && (n2.$L = r2), n2;
215
297
  }, m2.clone = function() {
216
- return O.w(this.$d, this);
298
+ return b.w(this.$d, this);
217
299
  }, m2.toDate = function() {
218
300
  return new Date(this.valueOf());
219
301
  }, m2.toJSON = function() {
@@ -223,16 +305,16 @@ var require_dayjs_min = __commonJS({
223
305
  }, m2.toString = function() {
224
306
  return this.$d.toUTCString();
225
307
  }, M2;
226
- }(), T = _.prototype;
227
- return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
228
- T[t2[1]] = function(e2) {
308
+ }(), k = _.prototype;
309
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
310
+ k[t2[1]] = function(e2) {
229
311
  return this.$g(e2, t2[0], t2[1]);
230
312
  };
231
- }), w.extend = function(t2, e2) {
232
- return t2.$i || (t2(e2, _, w), t2.$i = true), w;
233
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
234
- return w(1e3 * t2);
235
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
313
+ }), O.extend = function(t2, e2) {
314
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
315
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
316
+ return O(1e3 * t2);
317
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
236
318
  });
237
319
  }
238
320
  });
@@ -975,11 +1057,58 @@ var AntDNotToggle = ({
975
1057
  );
976
1058
  AntDNotToggle.displayName = "AntDNotToggle";
977
1059
 
1060
+ // src/AntDShiftActions.tsx
1061
+ import { CaretDownOutlined, CaretUpOutlined } from "@ant-design/icons";
1062
+ import { Button as Button2 } from "antd";
1063
+ import * as React4 from "react";
1064
+ import { useShiftActions } from "react-querybuilder";
1065
+ var AntDShiftActions = ({
1066
+ path,
1067
+ disabled,
1068
+ className,
1069
+ // labels, // Labels are hard-coded in this component
1070
+ titles,
1071
+ testID,
1072
+ lastInGroup,
1073
+ schema: { combinators, dispatchQuery, getQuery }
1074
+ }) => {
1075
+ const { shiftUp, shiftUpDisabled, shiftDown, shiftDownDisabled } = useShiftActions({
1076
+ combinators,
1077
+ disabled,
1078
+ dispatchQuery,
1079
+ getQuery,
1080
+ lastInGroup,
1081
+ path
1082
+ });
1083
+ return /* @__PURE__ */ React4.createElement("div", { "data-testid": testID, className }, /* @__PURE__ */ React4.createElement(
1084
+ Button2,
1085
+ {
1086
+ type: "primary",
1087
+ size: "small",
1088
+ title: titles?.shiftUp,
1089
+ onClick: shiftUp,
1090
+ disabled: shiftUpDisabled
1091
+ },
1092
+ /* @__PURE__ */ React4.createElement(CaretUpOutlined, null)
1093
+ ), /* @__PURE__ */ React4.createElement(
1094
+ Button2,
1095
+ {
1096
+ type: "primary",
1097
+ size: "small",
1098
+ title: titles?.shiftDown,
1099
+ onClick: shiftDown,
1100
+ disabled: shiftDownDisabled
1101
+ },
1102
+ /* @__PURE__ */ React4.createElement(CaretDownOutlined, null)
1103
+ ));
1104
+ };
1105
+ AntDShiftActions.displayName = "AntDShiftActions";
1106
+
978
1107
  // src/AntDValueEditor.tsx
979
1108
  var import_dayjs = __toESM(require_dayjs_min());
980
1109
  var import_dayjs2 = __toESM(require_dayjs());
981
1110
  import { DatePicker as AntdDatePicker, Checkbox, Input, Radio, Switch as Switch2, TimePicker } from "antd";
982
- import * as React6 from "react";
1111
+ import * as React7 from "react";
983
1112
  import {
984
1113
  getFirstOption,
985
1114
  standardClassnames,
@@ -989,15 +1118,15 @@ import {
989
1118
 
990
1119
  // src/AntDValueSelector.tsx
991
1120
  import { Select as Select2 } from "antd";
992
- import * as React5 from "react";
1121
+ import * as React6 from "react";
993
1122
  import { useValueSelector } from "react-querybuilder";
994
1123
 
995
1124
  // src/utils.tsx
996
1125
  import { Select } from "antd";
997
- import * as React4 from "react";
1126
+ import * as React5 from "react";
998
1127
  import { isOptionGroupArray } from "react-querybuilder";
999
1128
  var { OptGroup, Option } = Select;
1000
- 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)) : (
1129
+ 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)) : (
1001
1130
  /* istanbul ignore next */
1002
1131
  null
1003
1132
  );
@@ -1014,6 +1143,7 @@ var AntDValueSelector = ({
1014
1143
  listsAsArrays,
1015
1144
  // Props that should not be in extraProps
1016
1145
  testID: _testID,
1146
+ rule: _rule,
1017
1147
  rules: _rules,
1018
1148
  level: _level,
1019
1149
  path: _path,
@@ -1027,11 +1157,11 @@ var AntDValueSelector = ({
1027
1157
  }) => {
1028
1158
  const { onChange, val } = useValueSelector({ handleOnChange, listsAsArrays, multiple, value });
1029
1159
  const modeObj = multiple ? { mode: "multiple" } : {};
1030
- return /* @__PURE__ */ React5.createElement("span", { title, className }, /* @__PURE__ */ React5.createElement(
1160
+ return /* @__PURE__ */ React6.createElement("span", { title, className }, /* @__PURE__ */ React6.createElement(
1031
1161
  Select2,
1032
1162
  {
1033
1163
  ...modeObj,
1034
- dropdownMatchSelectWidth: false,
1164
+ popupMatchSelectWidth: false,
1035
1165
  disabled,
1036
1166
  value: val,
1037
1167
  onChange,
@@ -1083,7 +1213,7 @@ var AntDValueEditor = ({
1083
1213
  const editors = ["from", "to"].map((key, i) => {
1084
1214
  if (type === "text") {
1085
1215
  if (inputTypeCoerced === "time") {
1086
- return /* @__PURE__ */ React6.createElement(
1216
+ return /* @__PURE__ */ React7.createElement(
1087
1217
  TimePicker,
1088
1218
  {
1089
1219
  key,
@@ -1095,7 +1225,7 @@ var AntDValueEditor = ({
1095
1225
  }
1096
1226
  );
1097
1227
  }
1098
- return /* @__PURE__ */ React6.createElement(
1228
+ return /* @__PURE__ */ React7.createElement(
1099
1229
  Input,
1100
1230
  {
1101
1231
  key,
@@ -1108,7 +1238,7 @@ var AntDValueEditor = ({
1108
1238
  }
1109
1239
  );
1110
1240
  }
1111
- return /* @__PURE__ */ React6.createElement(
1241
+ return /* @__PURE__ */ React7.createElement(
1112
1242
  SelectorComponent,
1113
1243
  {
1114
1244
  ...props,
@@ -1122,12 +1252,12 @@ var AntDValueEditor = ({
1122
1252
  }
1123
1253
  );
1124
1254
  });
1125
- return /* @__PURE__ */ React6.createElement("span", { "data-testid": testID, className, title }, editors[0], separator, editors[1]);
1255
+ return /* @__PURE__ */ React7.createElement("span", { "data-testid": testID, className, title }, editors[0], separator, editors[1]);
1126
1256
  }
1127
1257
  switch (type) {
1128
1258
  case "select":
1129
1259
  case "multiselect":
1130
- return /* @__PURE__ */ React6.createElement(
1260
+ return /* @__PURE__ */ React7.createElement(
1131
1261
  SelectorComponent,
1132
1262
  {
1133
1263
  ...props,
@@ -1142,7 +1272,7 @@ var AntDValueEditor = ({
1142
1272
  }
1143
1273
  );
1144
1274
  case "textarea":
1145
- return /* @__PURE__ */ React6.createElement(
1275
+ return /* @__PURE__ */ React7.createElement(
1146
1276
  Input.TextArea,
1147
1277
  {
1148
1278
  value,
@@ -1154,7 +1284,7 @@ var AntDValueEditor = ({
1154
1284
  }
1155
1285
  );
1156
1286
  case "switch":
1157
- return /* @__PURE__ */ React6.createElement(
1287
+ return /* @__PURE__ */ React7.createElement(
1158
1288
  Switch2,
1159
1289
  {
1160
1290
  checked: !!value,
@@ -1165,7 +1295,7 @@ var AntDValueEditor = ({
1165
1295
  }
1166
1296
  );
1167
1297
  case "checkbox":
1168
- return /* @__PURE__ */ React6.createElement("span", { title, className }, /* @__PURE__ */ React6.createElement(
1298
+ return /* @__PURE__ */ React7.createElement("span", { title, className }, /* @__PURE__ */ React7.createElement(
1169
1299
  Checkbox,
1170
1300
  {
1171
1301
  type: "checkbox",
@@ -1175,7 +1305,7 @@ var AntDValueEditor = ({
1175
1305
  }
1176
1306
  ));
1177
1307
  case "radio":
1178
- return /* @__PURE__ */ React6.createElement("span", { className, title }, values.map((v) => /* @__PURE__ */ React6.createElement(
1308
+ return /* @__PURE__ */ React7.createElement("span", { className, title }, values.map((v) => /* @__PURE__ */ React7.createElement(
1179
1309
  Radio,
1180
1310
  {
1181
1311
  key: v.name,
@@ -1190,7 +1320,7 @@ var AntDValueEditor = ({
1190
1320
  switch (inputTypeCoerced) {
1191
1321
  case "date":
1192
1322
  case "datetime-local":
1193
- return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React6.createElement(
1323
+ return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React7.createElement(
1194
1324
  DatePicker.RangePicker,
1195
1325
  {
1196
1326
  value: toArray(value)?.length >= 2 ? toArray(value).map((v) => (0, import_dayjs.default)(v)) : void 0,
@@ -1207,7 +1337,7 @@ var AntDValueEditor = ({
1207
1337
  }
1208
1338
  )
1209
1339
  }
1210
- ) : /* @__PURE__ */ React6.createElement(
1340
+ ) : /* @__PURE__ */ React7.createElement(
1211
1341
  DatePicker,
1212
1342
  {
1213
1343
  value: value ? (0, import_dayjs.default)(value) : null,
@@ -1219,7 +1349,7 @@ var AntDValueEditor = ({
1219
1349
  }
1220
1350
  );
1221
1351
  case "time":
1222
- return /* @__PURE__ */ React6.createElement(
1352
+ return /* @__PURE__ */ React7.createElement(
1223
1353
  TimePicker,
1224
1354
  {
1225
1355
  value: value ? (0, import_dayjs.default)(value, "HH:mm:ss") : null,
@@ -1230,7 +1360,7 @@ var AntDValueEditor = ({
1230
1360
  }
1231
1361
  );
1232
1362
  }
1233
- return /* @__PURE__ */ React6.createElement(
1363
+ return /* @__PURE__ */ React7.createElement(
1234
1364
  Input,
1235
1365
  {
1236
1366
  type: inputTypeCoerced,
@@ -1261,7 +1391,8 @@ var antdControlElements = {
1261
1391
  removeRuleAction: AntDActionElement,
1262
1392
  valueEditor: AntDValueEditor,
1263
1393
  dragHandle: AntDDragHandle,
1264
- valueSourceSelector: AntDValueSelector
1394
+ valueSourceSelector: AntDValueSelector,
1395
+ shiftActions: AntDShiftActions
1265
1396
  };
1266
1397
  var QueryBuilderAntD = getCompatContextProvider({
1267
1398
  key: "antd",
@@ -1271,6 +1402,7 @@ export {
1271
1402
  AntDActionElement,
1272
1403
  AntDDragHandle,
1273
1404
  AntDNotToggle,
1405
+ AntDShiftActions,
1274
1406
  AntDValueEditor,
1275
1407
  AntDValueSelector,
1276
1408
  QueryBuilderAntD,