@react-querybuilder/antd 6.5.3 → 6.5.4

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.
@@ -38,7 +38,7 @@ var require_dayjs_min = __commonJS({
38
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();
39
39
  }(exports, function() {
40
40
  "use strict";
41
- 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) {
42
42
  var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
43
43
  return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
44
44
  } }, m = function(t2, e2, n2) {
@@ -50,19 +50,19 @@ var require_dayjs_min = __commonJS({
50
50
  }, m: function t2(e2, n2) {
51
51
  if (e2.date() < n2.date())
52
52
  return -t2(n2, e2);
53
- 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);
54
54
  return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
55
55
  }, a: function(t2) {
56
56
  return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
57
57
  }, p: function(t2) {
58
- 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$/, "");
59
59
  }, u: function(t2) {
60
60
  return void 0 === t2;
61
61
  } }, g = "en", D = {};
62
62
  D[g] = M;
63
- var p = function(t2) {
64
- return t2 instanceof _;
65
- }, S = function t2(e2, n2, r2) {
63
+ var p = "$isDayjsObject", S = function(t2) {
64
+ return t2 instanceof _ || !(!t2 || !t2[p]);
65
+ }, w = function t2(e2, n2, r2) {
66
66
  var i2;
67
67
  if (!e2)
68
68
  return g;
@@ -77,18 +77,18 @@ var require_dayjs_min = __commonJS({
77
77
  D[a2] = e2, i2 = a2;
78
78
  }
79
79
  return !r2 && i2 && (g = i2), i2 || !r2 && g;
80
- }, w = function(t2, e2) {
81
- if (p(t2))
80
+ }, O = function(t2, e2) {
81
+ if (S(t2))
82
82
  return t2.clone();
83
83
  var n2 = "object" == typeof e2 ? e2 : {};
84
84
  return n2.date = t2, n2.args = arguments, new _(n2);
85
- }, O = v;
86
- O.l = S, O.i = p, O.w = function(t2, e2) {
87
- return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
85
+ }, b = v;
86
+ b.l = w, b.i = S, b.w = function(t2, e2) {
87
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
88
88
  };
89
89
  var _ = function() {
90
90
  function M2(t2) {
91
- this.$L = S(t2.locale, null, true), this.parse(t2);
91
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
92
92
  }
93
93
  var m2 = M2.prototype;
94
94
  return m2.parse = function(t2) {
@@ -96,7 +96,7 @@ var require_dayjs_min = __commonJS({
96
96
  var e2 = t3.date, n2 = t3.utc;
97
97
  if (null === e2)
98
98
  return /* @__PURE__ */ new Date(NaN);
99
- if (O.u(e2))
99
+ if (b.u(e2))
100
100
  return /* @__PURE__ */ new Date();
101
101
  if (e2 instanceof Date)
102
102
  return new Date(e2);
@@ -108,38 +108,38 @@ var require_dayjs_min = __commonJS({
108
108
  }
109
109
  }
110
110
  return new Date(e2);
111
- }(t2), this.$x = t2.x || {}, this.init();
111
+ }(t2), this.init();
112
112
  }, m2.init = function() {
113
113
  var t2 = this.$d;
114
114
  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();
115
115
  }, m2.$utils = function() {
116
- return O;
116
+ return b;
117
117
  }, m2.isValid = function() {
118
118
  return !(this.$d.toString() === l);
119
119
  }, m2.isSame = function(t2, e2) {
120
- var n2 = w(t2);
120
+ var n2 = O(t2);
121
121
  return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
122
122
  }, m2.isAfter = function(t2, e2) {
123
- return w(t2) < this.startOf(e2);
123
+ return O(t2) < this.startOf(e2);
124
124
  }, m2.isBefore = function(t2, e2) {
125
- return this.endOf(e2) < w(t2);
125
+ return this.endOf(e2) < O(t2);
126
126
  }, m2.$g = function(t2, e2, n2) {
127
- return O.u(t2) ? this[e2] : this.set(n2, t2);
127
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
128
128
  }, m2.unix = function() {
129
129
  return Math.floor(this.valueOf() / 1e3);
130
130
  }, m2.valueOf = function() {
131
131
  return this.$d.getTime();
132
132
  }, m2.startOf = function(t2, e2) {
133
- var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
134
- var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
133
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
134
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
135
135
  return r2 ? i2 : i2.endOf(a);
136
136
  }, $2 = function(t3, e3) {
137
- return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
137
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
138
138
  }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
139
- switch (h2) {
140
- case c:
139
+ switch (f2) {
140
+ case h:
141
141
  return r2 ? l2(1, 0) : l2(31, 11);
142
- case f:
142
+ case c:
143
143
  return r2 ? l2(1, M3) : l2(0, M3 + 1);
144
144
  case o:
145
145
  var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
@@ -159,8 +159,8 @@ var require_dayjs_min = __commonJS({
159
159
  }, m2.endOf = function(t2) {
160
160
  return this.startOf(t2, false);
161
161
  }, m2.$set = function(t2, e2) {
162
- 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;
163
- if (o2 === f || o2 === c) {
162
+ 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;
163
+ if (o2 === c || o2 === h) {
164
164
  var y2 = this.clone().set(d, 1);
165
165
  y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
166
166
  } else
@@ -169,57 +169,139 @@ var require_dayjs_min = __commonJS({
169
169
  }, m2.set = function(t2, e2) {
170
170
  return this.clone().$set(t2, e2);
171
171
  }, m2.get = function(t2) {
172
- return this[O.p(t2)]();
173
- }, m2.add = function(r2, h2) {
172
+ return this[b.p(t2)]();
173
+ }, m2.add = function(r2, f2) {
174
174
  var d2, l2 = this;
175
175
  r2 = Number(r2);
176
- var $2 = O.p(h2), y2 = function(t2) {
177
- var e2 = w(l2);
178
- return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
176
+ var $2 = b.p(f2), y2 = function(t2) {
177
+ var e2 = O(l2);
178
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
179
179
  };
180
- if ($2 === f)
181
- return this.set(f, this.$M + r2);
182
180
  if ($2 === c)
183
- 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);
184
184
  if ($2 === a)
185
185
  return y2(1);
186
186
  if ($2 === o)
187
187
  return y2(7);
188
188
  var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
189
- return O.w(m3, this);
189
+ return b.w(m3, this);
190
190
  }, m2.subtract = function(t2, e2) {
191
191
  return this.add(-1 * t2, e2);
192
192
  }, m2.format = function(t2) {
193
193
  var e2 = this, n2 = this.$locale();
194
194
  if (!this.isValid())
195
195
  return n2.invalidDate || l;
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, f2 = n2.months, h2 = function(t3, n3, i3, s3) {
196
+ 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) {
197
197
  return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
198
- }, c2 = function(t3) {
199
- return O.s(s2 % 12 || 12, t3, "0");
200
- }, d2 = n2.meridiem || function(t3, e3, n3) {
198
+ }, d2 = function(t3) {
199
+ return b.s(s2 % 12 || 12, t3, "0");
200
+ }, $2 = f2 || function(t3, e3, n3) {
201
201
  var r3 = t3 < 12 ? "AM" : "PM";
202
202
  return n3 ? r3.toLowerCase() : r3;
203
- }, $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 };
204
- return r2.replace(y, function(t3, e3) {
205
- 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 b.s(e2.$y, 4, "0");
211
+ case "M":
212
+ return a2 + 1;
213
+ case "MM":
214
+ return b.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 b.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 b.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 b.s(u2, 2, "0");
247
+ case "s":
248
+ return String(e2.$s);
249
+ case "ss":
250
+ return b.s(e2.$s, 2, "0");
251
+ case "SSS":
252
+ return b.s(e2.$ms, 3, "0");
253
+ case "Z":
254
+ return i2;
255
+ }
256
+ return null;
257
+ }(t3) || i2.replace(":", "");
206
258
  });
207
259
  }, m2.utcOffset = function() {
208
260
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
209
261
  }, m2.diff = function(r2, d2, l2) {
210
- var $2, y2 = O.p(d2), M3 = w(r2), m3 = (M3.utcOffset() - this.utcOffset()) * e, v2 = this - M3, g2 = O.m(this, M3);
211
- 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 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
263
+ return b.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 : b.a($2);
212
294
  }, m2.daysInMonth = function() {
213
- return this.endOf(f).$D;
295
+ return this.endOf(c).$D;
214
296
  }, m2.$locale = function() {
215
297
  return D[this.$L];
216
298
  }, m2.locale = function(t2, e2) {
217
299
  if (!t2)
218
300
  return this.$L;
219
- var n2 = this.clone(), r2 = S(t2, e2, true);
301
+ var n2 = this.clone(), r2 = w(t2, e2, true);
220
302
  return r2 && (n2.$L = r2), n2;
221
303
  }, m2.clone = function() {
222
- return O.w(this.$d, this);
304
+ return b.w(this.$d, this);
223
305
  }, m2.toDate = function() {
224
306
  return new Date(this.valueOf());
225
307
  }, m2.toJSON = function() {
@@ -229,16 +311,16 @@ var require_dayjs_min = __commonJS({
229
311
  }, m2.toString = function() {
230
312
  return this.$d.toUTCString();
231
313
  }, M2;
232
- }(), T = _.prototype;
233
- return w.prototype = T, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", f], ["$y", c], ["$D", d]].forEach(function(t2) {
234
- T[t2[1]] = function(e2) {
314
+ }(), k = _.prototype;
315
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach(function(t2) {
316
+ k[t2[1]] = function(e2) {
235
317
  return this.$g(e2, t2[0], t2[1]);
236
318
  };
237
- }), w.extend = function(t2, e2) {
238
- return t2.$i || (t2(e2, _, w), t2.$i = true), w;
239
- }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
240
- return w(1e3 * t2);
241
- }, w.en = D[g], w.Ls = D, w.p = {}, w;
319
+ }), O.extend = function(t2, e2) {
320
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
321
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
322
+ return O(1e3 * t2);
323
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
242
324
  });
243
325
  }
244
326
  });
@@ -883,8 +965,7 @@ var require_dayjs = __commonJS({
883
965
  }
884
966
  }
885
967
  };
886
- var _default = generateConfig;
887
- exports.default = _default;
968
+ var _default = exports.default = generateConfig;
888
969
  }
889
970
  });
890
971
 
@@ -994,6 +1075,7 @@ AntDNotToggle.displayName = "AntDNotToggle";
994
1075
 
995
1076
  // src/AntDValueEditor.tsx
996
1077
  var import_antd5 = require("antd");
1078
+ var import_generatePicker = __toESM(require("antd/es/date-picker/generatePicker/index.js"));
997
1079
  var import_dayjs = __toESM(require_dayjs_min());
998
1080
  var import_dayjs2 = __toESM(require_dayjs());
999
1081
  var React6 = __toESM(require("react"));
@@ -1043,7 +1125,7 @@ var AntDValueSelector = ({
1043
1125
  import_antd4.Select,
1044
1126
  {
1045
1127
  ...modeObj,
1046
- dropdownMatchSelectWidth: false,
1128
+ popupMatchSelectWidth: false,
1047
1129
  disabled,
1048
1130
  value: val,
1049
1131
  onChange,
@@ -1055,7 +1137,7 @@ var AntDValueSelector = ({
1055
1137
  AntDValueSelector.displayName = "AntDValueSelector";
1056
1138
 
1057
1139
  // src/AntDValueEditor.tsx
1058
- var DatePicker = import_antd5.DatePicker.generatePicker(import_dayjs2.default);
1140
+ var DatePicker = (0, import_generatePicker.default)(import_dayjs2.default);
1059
1141
  var AntDValueEditor = ({
1060
1142
  fieldData,
1061
1143
  operator,
@@ -1096,7 +1178,7 @@ var AntDValueEditor = ({
1096
1178
  if (type === "text") {
1097
1179
  if (inputTypeCoerced === "time") {
1098
1180
  return /* @__PURE__ */ React6.createElement(
1099
- import_antd5.TimePicker,
1181
+ DatePicker.TimePicker,
1100
1182
  {
1101
1183
  key,
1102
1184
  value: valueAsArray[i] ? (0, import_dayjs.default)(valueAsArray[i], "HH:mm:ss") : null,
@@ -1201,28 +1283,36 @@ var AntDValueEditor = ({
1201
1283
  }
1202
1284
  switch (inputTypeCoerced) {
1203
1285
  case "date":
1204
- case "datetime-local":
1205
- return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React6.createElement(
1206
- DatePicker.RangePicker,
1207
- {
1208
- value: (0, import_react_querybuilder3.toArray)(value)?.length >= 2 ? (0, import_react_querybuilder3.toArray)(value).map((v) => (0, import_dayjs.default)(v)) : void 0,
1209
- showTime: inputTypeCoerced === "datetime-local",
1210
- className,
1211
- disabled,
1212
- placeholder: [placeHolderText, placeHolderText],
1213
- onChange: (
1214
- /* istanbul ignore next */
1215
- (dates) => {
1216
- const format = `YYYY-MM-DD${inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : ""}`;
1217
- const dateArray = dates?.map((d) => d?.format(format));
1218
- handleOnChange(dateArray ? listsAsArrays ? dateArray : dateArray.join(",") : dates);
1219
- }
1220
- )
1221
- }
1222
- ) : /* @__PURE__ */ React6.createElement(
1286
+ case "datetime-local": {
1287
+ if (operator === "between" || operator === "notBetween") {
1288
+ const dayjsArray = valueAsArray.slice(0, 2).map(import_dayjs.default);
1289
+ return /* @__PURE__ */ React6.createElement(
1290
+ DatePicker.RangePicker,
1291
+ {
1292
+ value: dayjsArray.every((d) => d.isValid()) ? dayjsArray : void 0,
1293
+ showTime: inputTypeCoerced === "datetime-local",
1294
+ className,
1295
+ disabled,
1296
+ placeholder: [placeHolderText, placeHolderText],
1297
+ onChange: (
1298
+ /* istanbul ignore next */
1299
+ (dates) => {
1300
+ const timeFormat = inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : "";
1301
+ const format = `YYYY-MM-DD${timeFormat}`;
1302
+ const dateArray = dates?.map((d) => d?.isValid() ? d.format(format) : void 0);
1303
+ handleOnChange(
1304
+ dateArray ? listsAsArrays ? dateArray : (0, import_react_querybuilder3.joinWith)(dateArray, ",") : dates
1305
+ );
1306
+ }
1307
+ )
1308
+ }
1309
+ );
1310
+ }
1311
+ const dateValue = (0, import_dayjs.default)(value);
1312
+ return /* @__PURE__ */ React6.createElement(
1223
1313
  DatePicker,
1224
1314
  {
1225
- value: value ? (0, import_dayjs.default)(value) : null,
1315
+ value: dateValue.isValid() ? dateValue : void 0,
1226
1316
  showTime: inputTypeCoerced === "datetime-local",
1227
1317
  className,
1228
1318
  disabled,
@@ -1230,17 +1320,20 @@ var AntDValueEditor = ({
1230
1320
  onChange: (_d, dateString) => handleOnChange(dateString)
1231
1321
  }
1232
1322
  );
1233
- case "time":
1323
+ }
1324
+ case "time": {
1325
+ const dateValue = (0, import_dayjs.default)(value, "HH:mm:ss");
1234
1326
  return /* @__PURE__ */ React6.createElement(
1235
- import_antd5.TimePicker,
1327
+ DatePicker.TimePicker,
1236
1328
  {
1237
- value: value ? (0, import_dayjs.default)(value, "HH:mm:ss") : null,
1329
+ value: dateValue.isValid() ? dateValue : void 0,
1238
1330
  className,
1239
1331
  disabled,
1240
1332
  placeholder: placeHolderText,
1241
1333
  onChange: (d) => handleOnChange(d?.format("HH:mm:ss") ?? "")
1242
1334
  }
1243
1335
  );
1336
+ }
1244
1337
  }
1245
1338
  return /* @__PURE__ */ React6.createElement(
1246
1339
  import_antd5.Input,