@react-querybuilder/antd 6.5.0 → 6.6.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.
@@ -37,4 +37,4 @@ declare const AntDValueSelector: {
37
37
  declare const antdControlElements: Partial<Controls>;
38
38
  declare const QueryBuilderAntD: react_querybuilder.QueryBuilderContextProvider<Record<string, any>>;
39
39
 
40
- export { AntDActionElement, AntDDragHandle, AntDNotToggle, AntDValueEditor, AntDValueSelector, QueryBuilderAntD, antdControlElements };
40
+ export { AntDActionElement, AntDActionProps, AntDDragHandle, AntDDragHandleProps, AntDNotToggle, AntDNotToggleProps, AntDValueEditor, AntDValueSelector, AntDValueSelectorProps, QueryBuilderAntD, antdControlElements };
@@ -33,11 +33,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
33
33
  // ../../node_modules/dayjs/dayjs.min.js
34
34
  var require_dayjs_min = __commonJS({
35
35
  "../../node_modules/dayjs/dayjs.min.js"(exports, module2) {
36
+ "use strict";
36
37
  !function(t, e) {
37
38
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
38
39
  }(exports, function() {
39
40
  "use strict";
40
- 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) {
41
+ 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) {
41
42
  var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
42
43
  return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
43
44
  } }, m = function(t2, e2, n2) {
@@ -49,18 +50,18 @@ var require_dayjs_min = __commonJS({
49
50
  }, m: function t2(e2, n2) {
50
51
  if (e2.date() < n2.date())
51
52
  return -t2(n2, e2);
52
- 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);
53
+ 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);
53
54
  return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
54
55
  }, a: function(t2) {
55
56
  return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
56
57
  }, p: function(t2) {
57
- 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$/, "");
58
+ 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$/, "");
58
59
  }, u: function(t2) {
59
60
  return void 0 === t2;
60
61
  } }, g = "en", D = {};
61
62
  D[g] = M;
62
63
  var p = function(t2) {
63
- return t2 instanceof _;
64
+ return t2 instanceof b;
64
65
  }, S = function t2(e2, n2, r2) {
65
66
  var i2;
66
67
  if (!e2)
@@ -80,12 +81,12 @@ var require_dayjs_min = __commonJS({
80
81
  if (p(t2))
81
82
  return t2.clone();
82
83
  var n2 = "object" == typeof e2 ? e2 : {};
83
- return n2.date = t2, n2.args = arguments, new _(n2);
84
+ return n2.date = t2, n2.args = arguments, new b(n2);
84
85
  }, O = v;
85
86
  O.l = S, O.i = p, O.w = function(t2, e2) {
86
87
  return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
87
88
  };
88
- var _ = function() {
89
+ var b = function() {
89
90
  function M2(t2) {
90
91
  this.$L = S(t2.locale, null, true), this.parse(t2);
91
92
  }
@@ -129,16 +130,16 @@ var require_dayjs_min = __commonJS({
129
130
  }, m2.valueOf = function() {
130
131
  return this.$d.getTime();
131
132
  }, m2.startOf = function(t2, e2) {
132
- var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
133
+ var n2 = this, r2 = !!O.u(e2) || e2, f2 = O.p(t2), l2 = function(t3, e3) {
133
134
  var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
134
135
  return r2 ? i2 : i2.endOf(a);
135
136
  }, $2 = function(t3, e3) {
136
137
  return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
137
138
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
138
- switch (h2) {
139
- case c:
139
+ switch (f2) {
140
+ case h:
140
141
  return r2 ? l2(1, 0) : l2(31, 11);
141
- case f:
142
+ case c:
142
143
  return r2 ? l2(1, M3) : l2(0, M3 + 1);
143
144
  case o:
144
145
  var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
@@ -158,8 +159,8 @@ var require_dayjs_min = __commonJS({
158
159
  }, m2.endOf = function(t2) {
159
160
  return this.startOf(t2, false);
160
161
  }, m2.$set = function(t2, e2) {
161
- 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;
162
- if (o2 === f || o2 === c) {
162
+ var n2, o2 = O.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;
163
+ if (o2 === c || o2 === h) {
163
164
  var y2 = this.clone().set(d, 1);
164
165
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
165
166
  } else
@@ -169,17 +170,17 @@ var require_dayjs_min = __commonJS({
169
170
  return this.clone().$set(t2, e2);
170
171
  }, m2.get = function(t2) {
171
172
  return this[O.p(t2)]();
172
- }, m2.add = function(r2, h2) {
173
+ }, m2.add = function(r2, f2) {
173
174
  var d2, l2 = this;
174
175
  r2 = Number(r2);
175
- var $2 = O.p(h2), y2 = function(t2) {
176
+ var $2 = O.p(f2), y2 = function(t2) {
176
177
  var e2 = w(l2);
177
178
  return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
178
179
  };
179
- if ($2 === f)
180
- return this.set(f, this.$M + r2);
181
180
  if ($2 === c)
182
- return this.set(c, this.$y + r2);
181
+ return this.set(c, this.$M + r2);
182
+ if ($2 === h)
183
+ return this.set(h, this.$y + r2);
183
184
  if ($2 === a)
184
185
  return y2(1);
185
186
  if ($2 === o)
@@ -192,24 +193,106 @@ var require_dayjs_min = __commonJS({
192
193
  var e2 = this, n2 = this.$locale();
193
194
  if (!this.isValid())
194
195
  return n2.invalidDate || l;
195
- 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) {
196
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = O.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) {
196
197
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
197
- }, c2 = function(t3) {
198
+ }, d2 = function(t3) {
198
199
  return O.s(s2 % 12 || 12, t3, "0");
199
- }, d2 = n2.meridiem || function(t3, e3, n3) {
200
+ }, $2 = f2 || function(t3, e3, n3) {
200
201
  var r3 = t3 < 12 ? "AM" : "PM";
201
202
  return n3 ? r3.toLowerCase() : r3;
202
- }, $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 };
203
- return r2.replace(y, function(t3, e3) {
204
- return e3 || $2[t3] || i2.replace(":", "");
203
+ };
204
+ return r2.replace(y, function(t3, r3) {
205
+ return r3 || function(t4) {
206
+ switch (t4) {
207
+ case "YY":
208
+ return String(e2.$y).slice(-2);
209
+ case "YYYY":
210
+ return O.s(e2.$y, 4, "0");
211
+ case "M":
212
+ return a2 + 1;
213
+ case "MM":
214
+ return O.s(a2 + 1, 2, "0");
215
+ case "MMM":
216
+ return h2(n2.monthsShort, a2, c2, 3);
217
+ case "MMMM":
218
+ return h2(c2, a2);
219
+ case "D":
220
+ return e2.$D;
221
+ case "DD":
222
+ return O.s(e2.$D, 2, "0");
223
+ case "d":
224
+ return String(e2.$W);
225
+ case "dd":
226
+ return h2(n2.weekdaysMin, e2.$W, o2, 2);
227
+ case "ddd":
228
+ return h2(n2.weekdaysShort, e2.$W, o2, 3);
229
+ case "dddd":
230
+ return o2[e2.$W];
231
+ case "H":
232
+ return String(s2);
233
+ case "HH":
234
+ return O.s(s2, 2, "0");
235
+ case "h":
236
+ return d2(1);
237
+ case "hh":
238
+ return d2(2);
239
+ case "a":
240
+ return $2(s2, u2, true);
241
+ case "A":
242
+ return $2(s2, u2, false);
243
+ case "m":
244
+ return String(u2);
245
+ case "mm":
246
+ return O.s(u2, 2, "0");
247
+ case "s":
248
+ return String(e2.$s);
249
+ case "ss":
250
+ return O.s(e2.$s, 2, "0");
251
+ case "SSS":
252
+ return O.s(e2.$ms, 3, "0");
253
+ case "Z":
254
+ return i2;
255
+ }
256
+ return null;
257
+ }(t3) || i2.replace(":", "");
205
258
  });
206
259
  }, m2.utcOffset = function() {
207
260
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
208
261
  }, m2.diff = function(r2, d2, l2) {
209
- var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
210
- 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);
262
+ var $2, y2 = this, M3 = O.p(d2), m3 = w(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
263
+ return O.m(y2, m3);
264
+ };
265
+ switch (M3) {
266
+ case h:
267
+ $2 = D2() / 12;
268
+ break;
269
+ case c:
270
+ $2 = D2();
271
+ break;
272
+ case f:
273
+ $2 = D2() / 3;
274
+ break;
275
+ case o:
276
+ $2 = (g2 - v2) / 6048e5;
277
+ break;
278
+ case a:
279
+ $2 = (g2 - v2) / 864e5;
280
+ break;
281
+ case u:
282
+ $2 = g2 / n;
283
+ break;
284
+ case s:
285
+ $2 = g2 / e;
286
+ break;
287
+ case i:
288
+ $2 = g2 / t;
289
+ break;
290
+ default:
291
+ $2 = g2;
292
+ }
293
+ return l2 ? $2 : O.a($2);
211
294
  }, m2.daysInMonth = function() {
212
- return this.endOf(f).$D;
295
+ return this.endOf(c).$D;
213
296
  }, m2.$locale = function() {
214
297
  return D[this.$L];
215
298
  }, m2.locale = function(t2, e2) {
@@ -228,13 +311,13 @@ var require_dayjs_min = __commonJS({
228
311
  }, m2.toString = function() {
229
312
  return this.$d.toUTCString();
230
313
  }, M2;
231
- }(), T = _.prototype;
232
- return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
233
- T[t2[1]] = function(e2) {
314
+ }(), _ = b.prototype;
315
+ return w.prototype = _, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
316
+ _[t2[1]] = function(e2) {
234
317
  return this.$g(e2, t2[0], t2[1]);
235
318
  };
236
319
  }), w.extend = function(t2, e2) {
237
- return t2.$i || (t2(e2, _, w), t2.$i = true), w;
320
+ return t2.$i || (t2(e2, b, w), t2.$i = true), w;
238
321
  }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
239
322
  return w(1e3 * t2);
240
323
  }, w.en = D[g], w.Ls = D, w.p = {}, w;
@@ -245,6 +328,7 @@ var require_dayjs_min = __commonJS({
245
328
  // ../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
246
329
  var require_interopRequireDefault = __commonJS({
247
330
  "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) {
331
+ "use strict";
248
332
  function _interopRequireDefault(obj) {
249
333
  return obj && obj.__esModule ? obj : {
250
334
  "default": obj
@@ -254,9 +338,9 @@ var require_interopRequireDefault = __commonJS({
254
338
  }
255
339
  });
256
340
 
257
- // ../../node_modules/rc-picker/node_modules/rc-util/lib/warning.js
341
+ // ../../node_modules/rc-util/lib/warning.js
258
342
  var require_warning = __commonJS({
259
- "../../node_modules/rc-picker/node_modules/rc-util/lib/warning.js"(exports) {
343
+ "../../node_modules/rc-util/lib/warning.js"(exports) {
260
344
  "use strict";
261
345
  Object.defineProperty(exports, "__esModule", {
262
346
  value: true
@@ -321,6 +405,7 @@ var require_warning = __commonJS({
321
405
  // ../../node_modules/dayjs/plugin/weekday.js
322
406
  var require_weekday = __commonJS({
323
407
  "../../node_modules/dayjs/plugin/weekday.js"(exports, module2) {
408
+ "use strict";
324
409
  !function(e, t) {
325
410
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekday = t();
326
411
  }(exports, function() {
@@ -338,6 +423,7 @@ var require_weekday = __commonJS({
338
423
  // ../../node_modules/dayjs/plugin/localeData.js
339
424
  var require_localeData = __commonJS({
340
425
  "../../node_modules/dayjs/plugin/localeData.js"(exports, module2) {
426
+ "use strict";
341
427
  !function(n, e) {
342
428
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (n = "undefined" != typeof globalThis ? globalThis : n || self).dayjs_plugin_localeData = e();
343
429
  }(exports, function() {
@@ -419,6 +505,7 @@ var require_localeData = __commonJS({
419
505
  // ../../node_modules/dayjs/plugin/weekOfYear.js
420
506
  var require_weekOfYear = __commonJS({
421
507
  "../../node_modules/dayjs/plugin/weekOfYear.js"(exports, module2) {
508
+ "use strict";
422
509
  !function(e, t) {
423
510
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekOfYear = t();
424
511
  }(exports, function() {
@@ -448,6 +535,7 @@ var require_weekOfYear = __commonJS({
448
535
  // ../../node_modules/dayjs/plugin/weekYear.js
449
536
  var require_weekYear = __commonJS({
450
537
  "../../node_modules/dayjs/plugin/weekYear.js"(exports, module2) {
538
+ "use strict";
451
539
  !function(e, t) {
452
540
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_weekYear = t();
453
541
  }(exports, function() {
@@ -465,6 +553,7 @@ var require_weekYear = __commonJS({
465
553
  // ../../node_modules/dayjs/plugin/advancedFormat.js
466
554
  var require_advancedFormat = __commonJS({
467
555
  "../../node_modules/dayjs/plugin/advancedFormat.js"(exports, module2) {
556
+ "use strict";
468
557
  !function(e, t) {
469
558
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_advancedFormat = t();
470
559
  }(exports, function() {
@@ -518,6 +607,7 @@ var require_advancedFormat = __commonJS({
518
607
  // ../../node_modules/dayjs/plugin/customParseFormat.js
519
608
  var require_customParseFormat = __commonJS({
520
609
  "../../node_modules/dayjs/plugin/customParseFormat.js"(exports, module2) {
610
+ "use strict";
521
611
  !function(e, t) {
522
612
  "object" == typeof exports && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t();
523
613
  }(exports, function() {
@@ -986,7 +1076,6 @@ AntDNotToggle.displayName = "AntDNotToggle";
986
1076
 
987
1077
  // src/AntDValueEditor.tsx
988
1078
  var import_antd5 = require("antd");
989
- var import_generatePicker = __toESM(require("antd/es/date-picker/generatePicker/index.js"));
990
1079
  var import_dayjs = __toESM(require_dayjs_min());
991
1080
  var import_dayjs2 = __toESM(require_dayjs());
992
1081
  var React6 = __toESM(require("react"));
@@ -1036,7 +1125,7 @@ var AntDValueSelector = ({
1036
1125
  import_antd4.Select,
1037
1126
  {
1038
1127
  ...modeObj,
1039
- dropdownMatchSelectWidth: false,
1128
+ popupMatchSelectWidth: false,
1040
1129
  disabled,
1041
1130
  value: val,
1042
1131
  onChange,
@@ -1048,7 +1137,7 @@ var AntDValueSelector = ({
1048
1137
  AntDValueSelector.displayName = "AntDValueSelector";
1049
1138
 
1050
1139
  // src/AntDValueEditor.tsx
1051
- var DatePicker = (0, import_generatePicker.default)(import_dayjs2.default);
1140
+ var DatePicker = import_antd5.DatePicker.generatePicker(import_dayjs2.default);
1052
1141
  var AntDValueEditor = ({
1053
1142
  fieldData,
1054
1143
  operator,