@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.
@@ -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
  });
@@ -877,8 +959,7 @@ var require_dayjs = __commonJS({
877
959
  }
878
960
  }
879
961
  };
880
- var _default = generateConfig;
881
- exports.default = _default;
962
+ var _default = exports.default = generateConfig;
882
963
  }
883
964
  });
884
965
 
@@ -978,14 +1059,10 @@ AntDNotToggle.displayName = "AntDNotToggle";
978
1059
  // src/AntDValueEditor.tsx
979
1060
  var import_dayjs = __toESM(require_dayjs_min());
980
1061
  var import_dayjs2 = __toESM(require_dayjs());
981
- import { DatePicker as AntdDatePicker, Checkbox, Input, Radio, Switch as Switch2, TimePicker } from "antd";
1062
+ import { Checkbox, Input, Radio, Switch as Switch2 } from "antd";
1063
+ import generatePicker from "antd/es/date-picker/generatePicker/index.js";
982
1064
  import * as React6 from "react";
983
- import {
984
- getFirstOption,
985
- standardClassnames,
986
- toArray,
987
- useValueEditor
988
- } from "react-querybuilder";
1065
+ import { getFirstOption, joinWith, standardClassnames, useValueEditor } from "react-querybuilder";
989
1066
 
990
1067
  // src/AntDValueSelector.tsx
991
1068
  import { Select as Select2 } from "antd";
@@ -1031,7 +1108,7 @@ var AntDValueSelector = ({
1031
1108
  Select2,
1032
1109
  {
1033
1110
  ...modeObj,
1034
- dropdownMatchSelectWidth: false,
1111
+ popupMatchSelectWidth: false,
1035
1112
  disabled,
1036
1113
  value: val,
1037
1114
  onChange,
@@ -1043,7 +1120,7 @@ var AntDValueSelector = ({
1043
1120
  AntDValueSelector.displayName = "AntDValueSelector";
1044
1121
 
1045
1122
  // src/AntDValueEditor.tsx
1046
- var DatePicker = AntdDatePicker.generatePicker(import_dayjs2.default);
1123
+ var DatePicker = generatePicker(import_dayjs2.default);
1047
1124
  var AntDValueEditor = ({
1048
1125
  fieldData,
1049
1126
  operator,
@@ -1084,7 +1161,7 @@ var AntDValueEditor = ({
1084
1161
  if (type === "text") {
1085
1162
  if (inputTypeCoerced === "time") {
1086
1163
  return /* @__PURE__ */ React6.createElement(
1087
- TimePicker,
1164
+ DatePicker.TimePicker,
1088
1165
  {
1089
1166
  key,
1090
1167
  value: valueAsArray[i] ? (0, import_dayjs.default)(valueAsArray[i], "HH:mm:ss") : null,
@@ -1189,28 +1266,36 @@ var AntDValueEditor = ({
1189
1266
  }
1190
1267
  switch (inputTypeCoerced) {
1191
1268
  case "date":
1192
- case "datetime-local":
1193
- return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ React6.createElement(
1194
- DatePicker.RangePicker,
1195
- {
1196
- value: toArray(value)?.length >= 2 ? toArray(value).map((v) => (0, import_dayjs.default)(v)) : void 0,
1197
- showTime: inputTypeCoerced === "datetime-local",
1198
- className,
1199
- disabled,
1200
- placeholder: [placeHolderText, placeHolderText],
1201
- onChange: (
1202
- /* istanbul ignore next */
1203
- (dates) => {
1204
- const format = `YYYY-MM-DD${inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : ""}`;
1205
- const dateArray = dates?.map((d) => d?.format(format));
1206
- handleOnChange(dateArray ? listsAsArrays ? dateArray : dateArray.join(",") : dates);
1207
- }
1208
- )
1209
- }
1210
- ) : /* @__PURE__ */ React6.createElement(
1269
+ case "datetime-local": {
1270
+ if (operator === "between" || operator === "notBetween") {
1271
+ const dayjsArray = valueAsArray.slice(0, 2).map(import_dayjs.default);
1272
+ return /* @__PURE__ */ React6.createElement(
1273
+ DatePicker.RangePicker,
1274
+ {
1275
+ value: dayjsArray.every((d) => d.isValid()) ? dayjsArray : void 0,
1276
+ showTime: inputTypeCoerced === "datetime-local",
1277
+ className,
1278
+ disabled,
1279
+ placeholder: [placeHolderText, placeHolderText],
1280
+ onChange: (
1281
+ /* istanbul ignore next */
1282
+ (dates) => {
1283
+ const timeFormat = inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : "";
1284
+ const format = `YYYY-MM-DD${timeFormat}`;
1285
+ const dateArray = dates?.map((d) => d?.isValid() ? d.format(format) : void 0);
1286
+ handleOnChange(
1287
+ dateArray ? listsAsArrays ? dateArray : joinWith(dateArray, ",") : dates
1288
+ );
1289
+ }
1290
+ )
1291
+ }
1292
+ );
1293
+ }
1294
+ const dateValue = (0, import_dayjs.default)(value);
1295
+ return /* @__PURE__ */ React6.createElement(
1211
1296
  DatePicker,
1212
1297
  {
1213
- value: value ? (0, import_dayjs.default)(value) : null,
1298
+ value: dateValue.isValid() ? dateValue : void 0,
1214
1299
  showTime: inputTypeCoerced === "datetime-local",
1215
1300
  className,
1216
1301
  disabled,
@@ -1218,17 +1303,20 @@ var AntDValueEditor = ({
1218
1303
  onChange: (_d, dateString) => handleOnChange(dateString)
1219
1304
  }
1220
1305
  );
1221
- case "time":
1306
+ }
1307
+ case "time": {
1308
+ const dateValue = (0, import_dayjs.default)(value, "HH:mm:ss");
1222
1309
  return /* @__PURE__ */ React6.createElement(
1223
- TimePicker,
1310
+ DatePicker.TimePicker,
1224
1311
  {
1225
- value: value ? (0, import_dayjs.default)(value, "HH:mm:ss") : null,
1312
+ value: dateValue.isValid() ? dateValue : void 0,
1226
1313
  className,
1227
1314
  disabled,
1228
1315
  placeholder: placeHolderText,
1229
1316
  onChange: (d) => handleOnChange(d?.format("HH:mm:ss") ?? "")
1230
1317
  }
1231
1318
  );
1319
+ }
1232
1320
  }
1233
1321
  return /* @__PURE__ */ React6.createElement(
1234
1322
  Input,