@react-querybuilder/antd 6.1.3 → 6.2.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.
Files changed (34) hide show
  1. package/dist/cjs/index.js +6 -0
  2. package/dist/cjs/react-querybuilder_antd.cjs.development.js +1269 -0
  3. package/dist/cjs/react-querybuilder_antd.cjs.development.js.map +1 -0
  4. package/dist/cjs/react-querybuilder_antd.cjs.production.js +2 -0
  5. package/dist/cjs/react-querybuilder_antd.cjs.production.js.map +1 -0
  6. package/dist/react-querybuilder_antd.d.ts +41 -0
  7. package/dist/react-querybuilder_antd.legacy-esm.js +1369 -0
  8. package/dist/react-querybuilder_antd.legacy-esm.js.map +1 -0
  9. package/dist/react-querybuilder_antd.mjs +1256 -0
  10. package/dist/react-querybuilder_antd.mjs.map +1 -0
  11. package/dist/react-querybuilder_antd.production.mjs +2 -0
  12. package/dist/react-querybuilder_antd.production.mjs.map +1 -0
  13. package/package.json +20 -26
  14. package/dist/index.cjs +0 -234
  15. package/dist/index.cjs.map +0 -1
  16. package/dist/index.mjs +0 -15043
  17. package/dist/index.mjs.map +0 -1
  18. package/dist/types/AntD.test.d.ts +0 -5
  19. package/dist/types/AntD.test.d.ts.map +0 -1
  20. package/dist/types/AntDActionElement.d.ts +0 -10
  21. package/dist/types/AntDActionElement.d.ts.map +0 -1
  22. package/dist/types/AntDDragHandle.d.ts +0 -7
  23. package/dist/types/AntDDragHandle.d.ts.map +0 -1
  24. package/dist/types/AntDNotToggle.d.ts +0 -10
  25. package/dist/types/AntDNotToggle.d.ts.map +0 -1
  26. package/dist/types/AntDValueEditor.d.ts +0 -6
  27. package/dist/types/AntDValueEditor.d.ts.map +0 -1
  28. package/dist/types/AntDValueSelector.d.ts +0 -10
  29. package/dist/types/AntDValueSelector.d.ts.map +0 -1
  30. package/dist/types/index.d.ts +0 -10
  31. package/dist/types/index.d.ts.map +0 -1
  32. package/dist/types/utils.d.ts +0 -5
  33. package/dist/types/utils.d.ts.map +0 -1
  34. package/index.d.mts +0 -4
@@ -0,0 +1,1269 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __commonJS = (cb, mod) => function __require() {
9
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/dayjs/dayjs.min.js
34
+ var require_dayjs_min = __commonJS({
35
+ "../../node_modules/dayjs/dayjs.min.js"(exports, module2) {
36
+ !function(t, e) {
37
+ "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
+ }(exports, function() {
39
+ "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 e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
42
+ return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
43
+ } }, m = function(t2, e2, n2) {
44
+ var r2 = String(t2);
45
+ return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
46
+ }, v = { s: m, z: function(t2) {
47
+ var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
48
+ return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
49
+ }, m: function t2(e2, n2) {
50
+ if (e2.date() < n2.date())
51
+ 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
+ return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
54
+ }, a: function(t2) {
55
+ return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
56
+ }, 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
+ }, u: function(t2) {
59
+ return void 0 === t2;
60
+ } }, g = "en", D = {};
61
+ D[g] = M;
62
+ var p = function(t2) {
63
+ return t2 instanceof _;
64
+ }, S = function t2(e2, n2, r2) {
65
+ var i2;
66
+ if (!e2)
67
+ return g;
68
+ if ("string" == typeof e2) {
69
+ var s2 = e2.toLowerCase();
70
+ D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
71
+ var u2 = e2.split("-");
72
+ if (!i2 && u2.length > 1)
73
+ return t2(u2[0]);
74
+ } else {
75
+ var a2 = e2.name;
76
+ D[a2] = e2, i2 = a2;
77
+ }
78
+ return !r2 && i2 && (g = i2), i2 || !r2 && g;
79
+ }, w = function(t2, e2) {
80
+ if (p(t2))
81
+ return t2.clone();
82
+ var n2 = "object" == typeof e2 ? e2 : {};
83
+ return n2.date = t2, n2.args = arguments, new _(n2);
84
+ }, O = v;
85
+ O.l = S, O.i = p, O.w = function(t2, e2) {
86
+ return w(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
87
+ };
88
+ var _ = function() {
89
+ function M2(t2) {
90
+ this.$L = S(t2.locale, null, true), this.parse(t2);
91
+ }
92
+ var m2 = M2.prototype;
93
+ return m2.parse = function(t2) {
94
+ this.$d = function(t3) {
95
+ var e2 = t3.date, n2 = t3.utc;
96
+ if (null === e2)
97
+ return /* @__PURE__ */ new Date(NaN);
98
+ if (O.u(e2))
99
+ return /* @__PURE__ */ new Date();
100
+ if (e2 instanceof Date)
101
+ return new Date(e2);
102
+ if ("string" == typeof e2 && !/Z$/i.test(e2)) {
103
+ var r2 = e2.match($);
104
+ if (r2) {
105
+ var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
106
+ return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
107
+ }
108
+ }
109
+ return new Date(e2);
110
+ }(t2), this.$x = t2.x || {}, this.init();
111
+ }, m2.init = function() {
112
+ var t2 = this.$d;
113
+ 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();
114
+ }, m2.$utils = function() {
115
+ return O;
116
+ }, m2.isValid = function() {
117
+ return !(this.$d.toString() === l);
118
+ }, m2.isSame = function(t2, e2) {
119
+ var n2 = w(t2);
120
+ return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
121
+ }, m2.isAfter = function(t2, e2) {
122
+ return w(t2) < this.startOf(e2);
123
+ }, m2.isBefore = function(t2, e2) {
124
+ return this.endOf(e2) < w(t2);
125
+ }, m2.$g = function(t2, e2, n2) {
126
+ return O.u(t2) ? this[e2] : this.set(n2, t2);
127
+ }, m2.unix = function() {
128
+ return Math.floor(this.valueOf() / 1e3);
129
+ }, m2.valueOf = function() {
130
+ return this.$d.getTime();
131
+ }, m2.startOf = function(t2, e2) {
132
+ var n2 = this, r2 = !!O.u(e2) || e2, h2 = O.p(t2), l2 = function(t3, e3) {
133
+ var i2 = O.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
134
+ return r2 ? i2 : i2.endOf(a);
135
+ }, $2 = function(t3, e3) {
136
+ return O.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
137
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
138
+ switch (h2) {
139
+ case c:
140
+ return r2 ? l2(1, 0) : l2(31, 11);
141
+ case f:
142
+ return r2 ? l2(1, M3) : l2(0, M3 + 1);
143
+ case o:
144
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
145
+ return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
146
+ case a:
147
+ case d:
148
+ return $2(v2 + "Hours", 0);
149
+ case u:
150
+ return $2(v2 + "Minutes", 1);
151
+ case s:
152
+ return $2(v2 + "Seconds", 2);
153
+ case i:
154
+ return $2(v2 + "Milliseconds", 3);
155
+ default:
156
+ return this.clone();
157
+ }
158
+ }, m2.endOf = function(t2) {
159
+ return this.startOf(t2, false);
160
+ }, 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) {
163
+ var y2 = this.clone().set(d, 1);
164
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
165
+ } else
166
+ l2 && this.$d[l2]($2);
167
+ return this.init(), this;
168
+ }, m2.set = function(t2, e2) {
169
+ return this.clone().$set(t2, e2);
170
+ }, m2.get = function(t2) {
171
+ return this[O.p(t2)]();
172
+ }, m2.add = function(r2, h2) {
173
+ var d2, l2 = this;
174
+ r2 = Number(r2);
175
+ var $2 = O.p(h2), y2 = function(t2) {
176
+ var e2 = w(l2);
177
+ return O.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
178
+ };
179
+ if ($2 === f)
180
+ return this.set(f, this.$M + r2);
181
+ if ($2 === c)
182
+ return this.set(c, this.$y + r2);
183
+ if ($2 === a)
184
+ return y2(1);
185
+ if ($2 === o)
186
+ return y2(7);
187
+ var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
188
+ return O.w(m3, this);
189
+ }, m2.subtract = function(t2, e2) {
190
+ return this.add(-1 * t2, e2);
191
+ }, m2.format = function(t2) {
192
+ var e2 = this, n2 = this.$locale();
193
+ if (!this.isValid())
194
+ 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
+ return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
197
+ }, c2 = function(t3) {
198
+ return O.s(s2 % 12 || 12, t3, "0");
199
+ }, d2 = n2.meridiem || function(t3, e3, n3) {
200
+ var r3 = t3 < 12 ? "AM" : "PM";
201
+ return n3 ? r3.toLowerCase() : r3;
202
+ }, $2 = { YY: String(this.$y).slice(-2), YYYY: this.$y, 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(":", "");
205
+ });
206
+ }, m2.utcOffset = function() {
207
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
208
+ }, 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);
211
+ }, m2.daysInMonth = function() {
212
+ return this.endOf(f).$D;
213
+ }, m2.$locale = function() {
214
+ return D[this.$L];
215
+ }, m2.locale = function(t2, e2) {
216
+ if (!t2)
217
+ return this.$L;
218
+ var n2 = this.clone(), r2 = S(t2, e2, true);
219
+ return r2 && (n2.$L = r2), n2;
220
+ }, m2.clone = function() {
221
+ return O.w(this.$d, this);
222
+ }, m2.toDate = function() {
223
+ return new Date(this.valueOf());
224
+ }, m2.toJSON = function() {
225
+ return this.isValid() ? this.toISOString() : null;
226
+ }, m2.toISOString = function() {
227
+ return this.$d.toISOString();
228
+ }, m2.toString = function() {
229
+ return this.$d.toUTCString();
230
+ }, 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) {
234
+ return this.$g(e2, t2[0], t2[1]);
235
+ };
236
+ }), w.extend = function(t2, e2) {
237
+ return t2.$i || (t2(e2, _, w), t2.$i = true), w;
238
+ }, w.locale = S, w.isDayjs = p, w.unix = function(t2) {
239
+ return w(1e3 * t2);
240
+ }, w.en = D[g], w.Ls = D, w.p = {}, w;
241
+ });
242
+ }
243
+ });
244
+
245
+ // ../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
246
+ var require_interopRequireDefault = __commonJS({
247
+ "../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) {
248
+ function _interopRequireDefault(obj) {
249
+ return obj && obj.__esModule ? obj : {
250
+ "default": obj
251
+ };
252
+ }
253
+ module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
254
+ }
255
+ });
256
+
257
+ // ../../node_modules/rc-picker/node_modules/rc-util/lib/warning.js
258
+ var require_warning = __commonJS({
259
+ "../../node_modules/rc-picker/node_modules/rc-util/lib/warning.js"(exports) {
260
+ "use strict";
261
+ Object.defineProperty(exports, "__esModule", {
262
+ value: true
263
+ });
264
+ exports.call = call;
265
+ exports.default = void 0;
266
+ exports.note = note;
267
+ exports.noteOnce = noteOnce;
268
+ exports.resetWarned = resetWarned;
269
+ exports.warning = warning;
270
+ exports.warningOnce = warningOnce;
271
+ var warned = {};
272
+ function warning(valid, message) {
273
+ if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
274
+ console.error("Warning: ".concat(message));
275
+ }
276
+ }
277
+ function note(valid, message) {
278
+ if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
279
+ console.warn("Note: ".concat(message));
280
+ }
281
+ }
282
+ function resetWarned() {
283
+ warned = {};
284
+ }
285
+ function call(method, valid, message) {
286
+ if (!valid && !warned[message]) {
287
+ method(false, message);
288
+ warned[message] = true;
289
+ }
290
+ }
291
+ function warningOnce(valid, message) {
292
+ call(warning, valid, message);
293
+ }
294
+ function noteOnce(valid, message) {
295
+ call(note, valid, message);
296
+ }
297
+ var _default = warningOnce;
298
+ exports.default = _default;
299
+ }
300
+ });
301
+
302
+ // ../../node_modules/dayjs/plugin/weekday.js
303
+ var require_weekday = __commonJS({
304
+ "../../node_modules/dayjs/plugin/weekday.js"(exports, module2) {
305
+ !function(e, t) {
306
+ "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();
307
+ }(exports, function() {
308
+ "use strict";
309
+ return function(e, t) {
310
+ t.prototype.weekday = function(e2) {
311
+ var t2 = this.$locale().weekStart || 0, i = this.$W, n = (i < t2 ? i + 7 : i) - t2;
312
+ return this.$utils().u(e2) ? n : this.subtract(n, "day").add(e2, "day");
313
+ };
314
+ };
315
+ });
316
+ }
317
+ });
318
+
319
+ // ../../node_modules/dayjs/plugin/localeData.js
320
+ var require_localeData = __commonJS({
321
+ "../../node_modules/dayjs/plugin/localeData.js"(exports, module2) {
322
+ !function(n, e) {
323
+ "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();
324
+ }(exports, function() {
325
+ "use strict";
326
+ return function(n, e, t) {
327
+ var r = e.prototype, o = function(n2) {
328
+ return n2 && (n2.indexOf ? n2 : n2.s);
329
+ }, u = function(n2, e2, t2, r2, u2) {
330
+ var i2 = n2.name ? n2 : n2.$locale(), a2 = o(i2[e2]), s2 = o(i2[t2]), f = a2 || s2.map(function(n3) {
331
+ return n3.slice(0, r2);
332
+ });
333
+ if (!u2)
334
+ return f;
335
+ var d = i2.weekStart;
336
+ return f.map(function(n3, e3) {
337
+ return f[(e3 + (d || 0)) % 7];
338
+ });
339
+ }, i = function() {
340
+ return t.Ls[t.locale()];
341
+ }, a = function(n2, e2) {
342
+ return n2.formats[e2] || function(n3) {
343
+ return n3.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n4, e3, t2) {
344
+ return e3 || t2.slice(1);
345
+ });
346
+ }(n2.formats[e2.toUpperCase()]);
347
+ }, s = function() {
348
+ var n2 = this;
349
+ return { months: function(e2) {
350
+ return e2 ? e2.format("MMMM") : u(n2, "months");
351
+ }, monthsShort: function(e2) {
352
+ return e2 ? e2.format("MMM") : u(n2, "monthsShort", "months", 3);
353
+ }, firstDayOfWeek: function() {
354
+ return n2.$locale().weekStart || 0;
355
+ }, weekdays: function(e2) {
356
+ return e2 ? e2.format("dddd") : u(n2, "weekdays");
357
+ }, weekdaysMin: function(e2) {
358
+ return e2 ? e2.format("dd") : u(n2, "weekdaysMin", "weekdays", 2);
359
+ }, weekdaysShort: function(e2) {
360
+ return e2 ? e2.format("ddd") : u(n2, "weekdaysShort", "weekdays", 3);
361
+ }, longDateFormat: function(e2) {
362
+ return a(n2.$locale(), e2);
363
+ }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
364
+ };
365
+ r.localeData = function() {
366
+ return s.bind(this)();
367
+ }, t.localeData = function() {
368
+ var n2 = i();
369
+ return { firstDayOfWeek: function() {
370
+ return n2.weekStart || 0;
371
+ }, weekdays: function() {
372
+ return t.weekdays();
373
+ }, weekdaysShort: function() {
374
+ return t.weekdaysShort();
375
+ }, weekdaysMin: function() {
376
+ return t.weekdaysMin();
377
+ }, months: function() {
378
+ return t.months();
379
+ }, monthsShort: function() {
380
+ return t.monthsShort();
381
+ }, longDateFormat: function(e2) {
382
+ return a(n2, e2);
383
+ }, meridiem: n2.meridiem, ordinal: n2.ordinal };
384
+ }, t.months = function() {
385
+ return u(i(), "months");
386
+ }, t.monthsShort = function() {
387
+ return u(i(), "monthsShort", "months", 3);
388
+ }, t.weekdays = function(n2) {
389
+ return u(i(), "weekdays", null, null, n2);
390
+ }, t.weekdaysShort = function(n2) {
391
+ return u(i(), "weekdaysShort", "weekdays", 3, n2);
392
+ }, t.weekdaysMin = function(n2) {
393
+ return u(i(), "weekdaysMin", "weekdays", 2, n2);
394
+ };
395
+ };
396
+ });
397
+ }
398
+ });
399
+
400
+ // ../../node_modules/dayjs/plugin/weekOfYear.js
401
+ var require_weekOfYear = __commonJS({
402
+ "../../node_modules/dayjs/plugin/weekOfYear.js"(exports, module2) {
403
+ !function(e, t) {
404
+ "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();
405
+ }(exports, function() {
406
+ "use strict";
407
+ var e = "week", t = "year";
408
+ return function(i, n, r) {
409
+ var f = n.prototype;
410
+ f.week = function(i2) {
411
+ if (void 0 === i2 && (i2 = null), null !== i2)
412
+ return this.add(7 * (i2 - this.week()), "day");
413
+ var n2 = this.$locale().yearStart || 1;
414
+ if (11 === this.month() && this.date() > 25) {
415
+ var f2 = r(this).startOf(t).add(1, t).date(n2), s = r(this).endOf(e);
416
+ if (f2.isBefore(s))
417
+ return 1;
418
+ }
419
+ var a = r(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, true);
420
+ return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
421
+ }, f.weeks = function(e2) {
422
+ return void 0 === e2 && (e2 = null), this.week(e2);
423
+ };
424
+ };
425
+ });
426
+ }
427
+ });
428
+
429
+ // ../../node_modules/dayjs/plugin/weekYear.js
430
+ var require_weekYear = __commonJS({
431
+ "../../node_modules/dayjs/plugin/weekYear.js"(exports, module2) {
432
+ !function(e, t) {
433
+ "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();
434
+ }(exports, function() {
435
+ "use strict";
436
+ return function(e, t) {
437
+ t.prototype.weekYear = function() {
438
+ var e2 = this.month(), t2 = this.week(), n = this.year();
439
+ return 1 === t2 && 11 === e2 ? n + 1 : 0 === e2 && t2 >= 52 ? n - 1 : n;
440
+ };
441
+ };
442
+ });
443
+ }
444
+ });
445
+
446
+ // ../../node_modules/dayjs/plugin/advancedFormat.js
447
+ var require_advancedFormat = __commonJS({
448
+ "../../node_modules/dayjs/plugin/advancedFormat.js"(exports, module2) {
449
+ !function(e, t) {
450
+ "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();
451
+ }(exports, function() {
452
+ "use strict";
453
+ return function(e, t) {
454
+ var r = t.prototype, n = r.format;
455
+ r.format = function(e2) {
456
+ var t2 = this, r2 = this.$locale();
457
+ if (!this.isValid())
458
+ return n.bind(this)(e2);
459
+ var s = this.$utils(), a = (e2 || "YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function(e3) {
460
+ switch (e3) {
461
+ case "Q":
462
+ return Math.ceil((t2.$M + 1) / 3);
463
+ case "Do":
464
+ return r2.ordinal(t2.$D);
465
+ case "gggg":
466
+ return t2.weekYear();
467
+ case "GGGG":
468
+ return t2.isoWeekYear();
469
+ case "wo":
470
+ return r2.ordinal(t2.week(), "W");
471
+ case "w":
472
+ case "ww":
473
+ return s.s(t2.week(), "w" === e3 ? 1 : 2, "0");
474
+ case "W":
475
+ case "WW":
476
+ return s.s(t2.isoWeek(), "W" === e3 ? 1 : 2, "0");
477
+ case "k":
478
+ case "kk":
479
+ return s.s(String(0 === t2.$H ? 24 : t2.$H), "k" === e3 ? 1 : 2, "0");
480
+ case "X":
481
+ return Math.floor(t2.$d.getTime() / 1e3);
482
+ case "x":
483
+ return t2.$d.getTime();
484
+ case "z":
485
+ return "[" + t2.offsetName() + "]";
486
+ case "zzz":
487
+ return "[" + t2.offsetName("long") + "]";
488
+ default:
489
+ return e3;
490
+ }
491
+ });
492
+ return n.bind(this)(a);
493
+ };
494
+ };
495
+ });
496
+ }
497
+ });
498
+
499
+ // ../../node_modules/dayjs/plugin/customParseFormat.js
500
+ var require_customParseFormat = __commonJS({
501
+ "../../node_modules/dayjs/plugin/customParseFormat.js"(exports, module2) {
502
+ !function(e, t) {
503
+ "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();
504
+ }(exports, function() {
505
+ "use strict";
506
+ var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d\d/, r = /\d\d?/, i = /\d*[^-_:/,()\s\d]+/, o = {}, s = function(e2) {
507
+ return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
508
+ };
509
+ var a = function(e2) {
510
+ return function(t2) {
511
+ this[e2] = +t2;
512
+ };
513
+ }, f = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
514
+ (this.zone || (this.zone = {})).offset = function(e3) {
515
+ if (!e3)
516
+ return 0;
517
+ if ("Z" === e3)
518
+ return 0;
519
+ var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
520
+ return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
521
+ }(e2);
522
+ }], h = function(e2) {
523
+ var t2 = o[e2];
524
+ return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
525
+ }, u = function(e2, t2) {
526
+ var n2, r2 = o.meridiem;
527
+ if (r2) {
528
+ for (var i2 = 1; i2 <= 24; i2 += 1)
529
+ if (e2.indexOf(r2(i2, 0, t2)) > -1) {
530
+ n2 = i2 > 12;
531
+ break;
532
+ }
533
+ } else
534
+ n2 = e2 === (t2 ? "pm" : "PM");
535
+ return n2;
536
+ }, d = { A: [i, function(e2) {
537
+ this.afternoon = u(e2, false);
538
+ }], a: [i, function(e2) {
539
+ this.afternoon = u(e2, true);
540
+ }], S: [/\d/, function(e2) {
541
+ this.milliseconds = 100 * +e2;
542
+ }], SS: [n, function(e2) {
543
+ this.milliseconds = 10 * +e2;
544
+ }], SSS: [/\d{3}/, function(e2) {
545
+ this.milliseconds = +e2;
546
+ }], s: [r, a("seconds")], ss: [r, a("seconds")], m: [r, a("minutes")], mm: [r, a("minutes")], H: [r, a("hours")], h: [r, a("hours")], HH: [r, a("hours")], hh: [r, a("hours")], D: [r, a("day")], DD: [n, a("day")], Do: [i, function(e2) {
547
+ var t2 = o.ordinal, n2 = e2.match(/\d+/);
548
+ if (this.day = n2[0], t2)
549
+ for (var r2 = 1; r2 <= 31; r2 += 1)
550
+ t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
551
+ }], M: [r, a("month")], MM: [n, a("month")], MMM: [i, function(e2) {
552
+ var t2 = h("months"), n2 = (h("monthsShort") || t2.map(function(e3) {
553
+ return e3.slice(0, 3);
554
+ })).indexOf(e2) + 1;
555
+ if (n2 < 1)
556
+ throw new Error();
557
+ this.month = n2 % 12 || n2;
558
+ }], MMMM: [i, function(e2) {
559
+ var t2 = h("months").indexOf(e2) + 1;
560
+ if (t2 < 1)
561
+ throw new Error();
562
+ this.month = t2 % 12 || t2;
563
+ }], Y: [/[+-]?\d+/, a("year")], YY: [n, function(e2) {
564
+ this.year = s(e2);
565
+ }], YYYY: [/\d{4}/, a("year")], Z: f, ZZ: f };
566
+ function c(n2) {
567
+ var r2, i2;
568
+ r2 = n2, i2 = o && o.formats;
569
+ for (var s2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
570
+ var o2 = r3 && r3.toUpperCase();
571
+ return n3 || i2[r3] || e[r3] || i2[o2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
572
+ return t3 || n4.slice(1);
573
+ });
574
+ })).match(t), a2 = s2.length, f2 = 0; f2 < a2; f2 += 1) {
575
+ var h2 = s2[f2], u2 = d[h2], c2 = u2 && u2[0], l = u2 && u2[1];
576
+ s2[f2] = l ? { regex: c2, parser: l } : h2.replace(/^\[|\]$/g, "");
577
+ }
578
+ return function(e2) {
579
+ for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
580
+ var i3 = s2[n3];
581
+ if ("string" == typeof i3)
582
+ r3 += i3.length;
583
+ else {
584
+ var o2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = o2.exec(h3)[0];
585
+ f3.call(t2, u3), e2 = e2.replace(u3, "");
586
+ }
587
+ }
588
+ return function(e3) {
589
+ var t3 = e3.afternoon;
590
+ if (void 0 !== t3) {
591
+ var n4 = e3.hours;
592
+ t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
593
+ }
594
+ }(t2), t2;
595
+ };
596
+ }
597
+ return function(e2, t2, n2) {
598
+ n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (s = e2.parseTwoDigitYear);
599
+ var r2 = t2.prototype, i2 = r2.parse;
600
+ r2.parse = function(e3) {
601
+ var t3 = e3.date, r3 = e3.utc, s2 = e3.args;
602
+ this.$u = r3;
603
+ var a2 = s2[1];
604
+ if ("string" == typeof a2) {
605
+ var f2 = true === s2[2], h2 = true === s2[3], u2 = f2 || h2, d2 = s2[2];
606
+ h2 && (d2 = s2[2]), o = this.$locale(), !f2 && d2 && (o = n2.Ls[d2]), this.$d = function(e4, t4, n3) {
607
+ try {
608
+ if (["x", "X"].indexOf(t4) > -1)
609
+ return new Date(("X" === t4 ? 1e3 : 1) * e4);
610
+ var r4 = c(t4)(e4), i3 = r4.year, o2 = r4.month, s3 = r4.day, a3 = r4.hours, f3 = r4.minutes, h3 = r4.seconds, u3 = r4.milliseconds, d3 = r4.zone, l2 = /* @__PURE__ */ new Date(), m2 = s3 || (i3 || o2 ? 1 : l2.getDate()), M2 = i3 || l2.getFullYear(), Y = 0;
611
+ i3 && !o2 || (Y = o2 > 0 ? o2 - 1 : l2.getMonth());
612
+ var p = a3 || 0, v = f3 || 0, D = h3 || 0, g = u3 || 0;
613
+ return d3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g + 60 * d3.offset * 1e3)) : n3 ? new Date(Date.UTC(M2, Y, m2, p, v, D, g)) : new Date(M2, Y, m2, p, v, D, g);
614
+ } catch (e5) {
615
+ return /* @__PURE__ */ new Date("");
616
+ }
617
+ }(t3, a2, r3), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), o = {};
618
+ } else if (a2 instanceof Array)
619
+ for (var l = a2.length, m = 1; m <= l; m += 1) {
620
+ s2[1] = a2[m - 1];
621
+ var M = n2.apply(this, s2);
622
+ if (M.isValid()) {
623
+ this.$d = M.$d, this.$L = M.$L, this.init();
624
+ break;
625
+ }
626
+ m === l && (this.$d = /* @__PURE__ */ new Date(""));
627
+ }
628
+ else
629
+ i2.call(this, e3);
630
+ };
631
+ };
632
+ });
633
+ }
634
+ });
635
+
636
+ // ../../node_modules/rc-picker/lib/generate/dayjs.js
637
+ var require_dayjs = __commonJS({
638
+ "../../node_modules/rc-picker/lib/generate/dayjs.js"(exports) {
639
+ "use strict";
640
+ var _interopRequireDefault = require_interopRequireDefault();
641
+ Object.defineProperty(exports, "__esModule", {
642
+ value: true
643
+ });
644
+ exports.default = void 0;
645
+ var _dayjs = _interopRequireDefault(require_dayjs_min());
646
+ var _warning = require_warning();
647
+ var _weekday = _interopRequireDefault(require_weekday());
648
+ var _localeData = _interopRequireDefault(require_localeData());
649
+ var _weekOfYear = _interopRequireDefault(require_weekOfYear());
650
+ var _weekYear = _interopRequireDefault(require_weekYear());
651
+ var _advancedFormat = _interopRequireDefault(require_advancedFormat());
652
+ var _customParseFormat = _interopRequireDefault(require_customParseFormat());
653
+ _dayjs.default.extend(_customParseFormat.default);
654
+ _dayjs.default.extend(_advancedFormat.default);
655
+ _dayjs.default.extend(_weekday.default);
656
+ _dayjs.default.extend(_localeData.default);
657
+ _dayjs.default.extend(_weekOfYear.default);
658
+ _dayjs.default.extend(_weekYear.default);
659
+ _dayjs.default.extend(function(o, c) {
660
+ var proto = c.prototype;
661
+ var oldFormat = proto.format;
662
+ proto.format = function f(formatStr) {
663
+ var str = (formatStr || "").replace("Wo", "wo");
664
+ return oldFormat.bind(this)(str);
665
+ };
666
+ });
667
+ var localeMap = {
668
+ // ar_EG:
669
+ // az_AZ:
670
+ // bg_BG:
671
+ bn_BD: "bn-bd",
672
+ by_BY: "be",
673
+ // ca_ES:
674
+ // cs_CZ:
675
+ // da_DK:
676
+ // de_DE:
677
+ // el_GR:
678
+ en_GB: "en-gb",
679
+ en_US: "en",
680
+ // es_ES:
681
+ // et_EE:
682
+ // fa_IR:
683
+ // fi_FI:
684
+ fr_BE: "fr",
685
+ // todo: dayjs has no fr_BE locale, use fr at present
686
+ fr_CA: "fr-ca",
687
+ // fr_FR:
688
+ // ga_IE:
689
+ // gl_ES:
690
+ // he_IL:
691
+ // hi_IN:
692
+ // hr_HR:
693
+ // hu_HU:
694
+ hy_AM: "hy-am",
695
+ // id_ID:
696
+ // is_IS:
697
+ // it_IT:
698
+ // ja_JP:
699
+ // ka_GE:
700
+ // kk_KZ:
701
+ // km_KH:
702
+ kmr_IQ: "ku",
703
+ // kn_IN:
704
+ // ko_KR:
705
+ // ku_IQ: // previous ku in antd
706
+ // lt_LT:
707
+ // lv_LV:
708
+ // mk_MK:
709
+ // ml_IN:
710
+ // mn_MN:
711
+ // ms_MY:
712
+ // nb_NO:
713
+ // ne_NP:
714
+ nl_BE: "nl-be",
715
+ // nl_NL:
716
+ // pl_PL:
717
+ pt_BR: "pt-br",
718
+ // pt_PT:
719
+ // ro_RO:
720
+ // ru_RU:
721
+ // sk_SK:
722
+ // sl_SI:
723
+ // sr_RS:
724
+ // sv_SE:
725
+ // ta_IN:
726
+ // th_TH:
727
+ // tr_TR:
728
+ // uk_UA:
729
+ // ur_PK:
730
+ // vi_VN:
731
+ zh_CN: "zh-cn",
732
+ zh_HK: "zh-hk",
733
+ zh_TW: "zh-tw"
734
+ };
735
+ var parseLocale = function parseLocale2(locale) {
736
+ var mapLocale = localeMap[locale];
737
+ return mapLocale || locale.split("_")[0];
738
+ };
739
+ var parseNoMatchNotice = function parseNoMatchNotice2() {
740
+ (0, _warning.noteOnce)(false, "Not match any format. Please help to fire a issue about this.");
741
+ };
742
+ var generateConfig = {
743
+ // get
744
+ getNow: function getNow() {
745
+ return (0, _dayjs.default)();
746
+ },
747
+ getFixedDate: function getFixedDate(string) {
748
+ return (0, _dayjs.default)(string, ["YYYY-M-DD", "YYYY-MM-DD"]);
749
+ },
750
+ getEndDate: function getEndDate(date) {
751
+ return date.endOf("month");
752
+ },
753
+ getWeekDay: function getWeekDay(date) {
754
+ var clone = date.locale("en");
755
+ return clone.weekday() + clone.localeData().firstDayOfWeek();
756
+ },
757
+ getYear: function getYear(date) {
758
+ return date.year();
759
+ },
760
+ getMonth: function getMonth(date) {
761
+ return date.month();
762
+ },
763
+ getDate: function getDate(date) {
764
+ return date.date();
765
+ },
766
+ getHour: function getHour(date) {
767
+ return date.hour();
768
+ },
769
+ getMinute: function getMinute(date) {
770
+ return date.minute();
771
+ },
772
+ getSecond: function getSecond(date) {
773
+ return date.second();
774
+ },
775
+ // set
776
+ addYear: function addYear(date, diff) {
777
+ return date.add(diff, "year");
778
+ },
779
+ addMonth: function addMonth(date, diff) {
780
+ return date.add(diff, "month");
781
+ },
782
+ addDate: function addDate(date, diff) {
783
+ return date.add(diff, "day");
784
+ },
785
+ setYear: function setYear(date, year) {
786
+ return date.year(year);
787
+ },
788
+ setMonth: function setMonth(date, month) {
789
+ return date.month(month);
790
+ },
791
+ setDate: function setDate(date, num) {
792
+ return date.date(num);
793
+ },
794
+ setHour: function setHour(date, hour) {
795
+ return date.hour(hour);
796
+ },
797
+ setMinute: function setMinute(date, minute) {
798
+ return date.minute(minute);
799
+ },
800
+ setSecond: function setSecond(date, second) {
801
+ return date.second(second);
802
+ },
803
+ // Compare
804
+ isAfter: function isAfter(date1, date2) {
805
+ return date1.isAfter(date2);
806
+ },
807
+ isValidate: function isValidate(date) {
808
+ return date.isValid();
809
+ },
810
+ locale: {
811
+ getWeekFirstDay: function getWeekFirstDay(locale) {
812
+ return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().firstDayOfWeek();
813
+ },
814
+ getWeekFirstDate: function getWeekFirstDate(locale, date) {
815
+ return date.locale(parseLocale(locale)).weekday(0);
816
+ },
817
+ getWeek: function getWeek(locale, date) {
818
+ return date.locale(parseLocale(locale)).week();
819
+ },
820
+ getShortWeekDays: function getShortWeekDays(locale) {
821
+ return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().weekdaysMin();
822
+ },
823
+ getShortMonths: function getShortMonths(locale) {
824
+ return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().monthsShort();
825
+ },
826
+ format: function format(locale, date, _format) {
827
+ return date.locale(parseLocale(locale)).format(_format);
828
+ },
829
+ parse: function parse(locale, text, formats) {
830
+ var localeStr = parseLocale(locale);
831
+ for (var i = 0; i < formats.length; i += 1) {
832
+ var format = formats[i];
833
+ var formatText = text;
834
+ if (format.includes("wo") || format.includes("Wo")) {
835
+ var year = formatText.split("-")[0];
836
+ var weekStr = formatText.split("-")[1];
837
+ var firstWeek = (0, _dayjs.default)(year, "YYYY").startOf("year").locale(localeStr);
838
+ for (var j = 0; j <= 52; j += 1) {
839
+ var nextWeek = firstWeek.add(j, "week");
840
+ if (nextWeek.format("Wo") === weekStr) {
841
+ return nextWeek;
842
+ }
843
+ }
844
+ parseNoMatchNotice();
845
+ return null;
846
+ }
847
+ var date = (0, _dayjs.default)(formatText, format, true).locale(localeStr);
848
+ if (date.isValid()) {
849
+ return date;
850
+ }
851
+ }
852
+ if (text) {
853
+ parseNoMatchNotice();
854
+ }
855
+ return null;
856
+ }
857
+ }
858
+ };
859
+ var _default = generateConfig;
860
+ exports.default = _default;
861
+ }
862
+ });
863
+
864
+ // src/index.ts
865
+ var src_exports = {};
866
+ __export(src_exports, {
867
+ AntDActionElement: () => AntDActionElement,
868
+ AntDDragHandle: () => AntDDragHandle,
869
+ AntDNotToggle: () => AntDNotToggle,
870
+ AntDValueEditor: () => AntDValueEditor,
871
+ AntDValueSelector: () => AntDValueSelector,
872
+ QueryBuilderAntD: () => QueryBuilderAntD,
873
+ antdControlElements: () => antdControlElements
874
+ });
875
+ module.exports = __toCommonJS(src_exports);
876
+ var import_react_querybuilder4 = require("react-querybuilder");
877
+
878
+ // src/AntDActionElement.tsx
879
+ var import_antd = require("antd");
880
+ var import_jsx_runtime = require("react/jsx-runtime");
881
+ var AntDActionElement = ({
882
+ className,
883
+ handleOnClick,
884
+ label,
885
+ title,
886
+ disabled,
887
+ disabledTranslation,
888
+ // Props that should not be in extraProps
889
+ testID: _testID,
890
+ rules: _rules,
891
+ level: _level,
892
+ path: _path,
893
+ context: _context,
894
+ validation: _validation,
895
+ ruleOrGroup: _ruleOrGroup,
896
+ schema: _schema,
897
+ ...extraProps
898
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
899
+ import_antd.Button,
900
+ {
901
+ type: "primary",
902
+ className,
903
+ title: disabledTranslation && disabled ? disabledTranslation.title : title,
904
+ onClick: (e) => handleOnClick(e),
905
+ disabled: disabled && !disabledTranslation,
906
+ ...extraProps,
907
+ children: disabledTranslation && disabled ? disabledTranslation.label : label
908
+ }
909
+ );
910
+ AntDActionElement.displayName = "AntDActionElement";
911
+
912
+ // src/AntDDragHandle.tsx
913
+ var import_icons = require("@ant-design/icons");
914
+ var import_react = require("react");
915
+ var import_jsx_runtime2 = require("react/jsx-runtime");
916
+ var AntDDragHandle = (0, import_react.forwardRef)(
917
+ ({
918
+ className,
919
+ title,
920
+ // Props that should not be in extraProps
921
+ testID: _testID,
922
+ level: _level,
923
+ path: _path,
924
+ label: _label,
925
+ disabled: _disabled,
926
+ context: _context,
927
+ validation: _validation,
928
+ schema: _schema,
929
+ ...extraProps
930
+ }, dragRef) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons.HolderOutlined, { ref: dragRef, className, title, ...extraProps })
931
+ );
932
+ AntDDragHandle.displayName = "AntDDragHandle";
933
+
934
+ // src/AntDNotToggle.tsx
935
+ var import_antd2 = require("antd");
936
+ var import_jsx_runtime3 = require("react/jsx-runtime");
937
+ var AntDNotToggle = ({
938
+ className,
939
+ handleOnChange,
940
+ label,
941
+ checked,
942
+ title,
943
+ disabled,
944
+ // Props that should not be in extraProps
945
+ path: _path,
946
+ context: _context,
947
+ validation: _validation,
948
+ testID: _testID,
949
+ schema: _schema,
950
+ ...extraProps
951
+ }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
952
+ import_antd2.Switch,
953
+ {
954
+ title,
955
+ className,
956
+ onChange: (v) => handleOnChange(v),
957
+ checked: !!checked,
958
+ disabled,
959
+ checkedChildren: label,
960
+ unCheckedChildren: "=",
961
+ ...extraProps
962
+ }
963
+ );
964
+ AntDNotToggle.displayName = "AntDNotToggle";
965
+
966
+ // src/AntDValueEditor.tsx
967
+ var import_antd5 = require("antd");
968
+ var import_generatePicker = __toESM(require("antd/es/date-picker/generatePicker/index.js"));
969
+ var import_dayjs = __toESM(require_dayjs_min());
970
+ var import_dayjs2 = __toESM(require_dayjs());
971
+ var import_react_querybuilder3 = require("react-querybuilder");
972
+
973
+ // src/AntDValueSelector.tsx
974
+ var import_antd4 = require("antd");
975
+ var import_react_querybuilder2 = require("react-querybuilder");
976
+
977
+ // src/utils.tsx
978
+ var import_antd3 = require("antd");
979
+ var import_react_querybuilder = require("react-querybuilder");
980
+ var import_jsx_runtime4 = require("react/jsx-runtime");
981
+ var { OptGroup, Option } = import_antd3.Select;
982
+ var toOptions = (arr) => (0, import_react_querybuilder.isOptionGroupArray)(arr) ? arr.map((og) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(OptGroup, { label: og.label, children: og.options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Option, { value: opt.name, children: opt.label }, opt.name)) }, og.label)) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Option, { value: opt.name, children: opt.label }, opt.name)) : (
983
+ /* istanbul ignore next */
984
+ null
985
+ );
986
+
987
+ // src/AntDValueSelector.tsx
988
+ var import_jsx_runtime5 = require("react/jsx-runtime");
989
+ var AntDValueSelector = ({
990
+ className,
991
+ handleOnChange,
992
+ options,
993
+ value,
994
+ title,
995
+ disabled,
996
+ multiple,
997
+ listsAsArrays,
998
+ // Props that should not be in extraProps
999
+ testID: _testID,
1000
+ rules: _rules,
1001
+ level: _level,
1002
+ path: _path,
1003
+ context: _context,
1004
+ validation: _validation,
1005
+ operator: _operator,
1006
+ field: _field,
1007
+ fieldData: _fieldData,
1008
+ schema: _schema,
1009
+ ...extraProps
1010
+ }) => {
1011
+ const { onChange, val } = (0, import_react_querybuilder2.useValueSelector)({ handleOnChange, listsAsArrays, multiple, value });
1012
+ const modeObj = multiple ? { mode: "multiple" } : {};
1013
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { title, className, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1014
+ import_antd4.Select,
1015
+ {
1016
+ ...modeObj,
1017
+ dropdownMatchSelectWidth: false,
1018
+ disabled,
1019
+ value: val,
1020
+ onChange,
1021
+ ...extraProps,
1022
+ children: toOptions(options)
1023
+ }
1024
+ ) });
1025
+ };
1026
+ AntDValueSelector.displayName = "AntDValueSelector";
1027
+
1028
+ // src/AntDValueEditor.tsx
1029
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1030
+ var import_react2 = require("react");
1031
+ var DatePicker = (0, import_generatePicker.default)(import_dayjs2.default);
1032
+ var AntDValueEditor = ({
1033
+ fieldData,
1034
+ operator,
1035
+ value,
1036
+ handleOnChange,
1037
+ title,
1038
+ className,
1039
+ type,
1040
+ inputType,
1041
+ values = [],
1042
+ listsAsArrays,
1043
+ parseNumbers,
1044
+ separator,
1045
+ valueSource: _vs,
1046
+ disabled,
1047
+ testID,
1048
+ selectorComponent: SelectorComponent = AntDValueSelector,
1049
+ ...props
1050
+ }) => {
1051
+ const { valueAsArray, multiValueHandler } = (0, import_react_querybuilder3.useValueEditor)({
1052
+ handleOnChange,
1053
+ inputType,
1054
+ operator,
1055
+ value,
1056
+ type,
1057
+ listsAsArrays,
1058
+ parseNumbers,
1059
+ values
1060
+ });
1061
+ if (operator === "null" || operator === "notNull") {
1062
+ return null;
1063
+ }
1064
+ const placeHolderText = fieldData?.placeholder ?? "";
1065
+ const inputTypeCoerced = ["in", "notIn"].includes(operator) ? "text" : inputType || "text";
1066
+ if ((operator === "between" || operator === "notBetween") && (type === "select" || type === "text") && // Date ranges are handled differently in AntD--see below
1067
+ inputTypeCoerced !== "date" && inputTypeCoerced !== "datetime-local") {
1068
+ const editors = ["from", "to"].map((key, i) => {
1069
+ if (type === "text") {
1070
+ if (inputTypeCoerced === "time") {
1071
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1072
+ import_antd5.TimePicker,
1073
+ {
1074
+ value: valueAsArray[i] ? (0, import_dayjs.default)(valueAsArray[i], "HH:mm:ss") : null,
1075
+ className: import_react_querybuilder3.standardClassnames.valueListItem,
1076
+ disabled,
1077
+ placeholder: placeHolderText,
1078
+ onChange: (d) => multiValueHandler(d?.format("HH:mm:ss") ?? "", i)
1079
+ },
1080
+ key
1081
+ );
1082
+ }
1083
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1084
+ import_antd5.Input,
1085
+ {
1086
+ type: inputTypeCoerced,
1087
+ value: valueAsArray[i] ?? "",
1088
+ className: import_react_querybuilder3.standardClassnames.valueListItem,
1089
+ disabled,
1090
+ placeholder: placeHolderText,
1091
+ onChange: (e) => multiValueHandler(e.target.value, i)
1092
+ },
1093
+ key
1094
+ );
1095
+ }
1096
+ return /* @__PURE__ */ (0, import_react2.createElement)(
1097
+ SelectorComponent,
1098
+ {
1099
+ ...props,
1100
+ key,
1101
+ className: import_react_querybuilder3.standardClassnames.valueListItem,
1102
+ handleOnChange: (v) => multiValueHandler(v, i),
1103
+ disabled,
1104
+ value: valueAsArray[i] ?? (0, import_react_querybuilder3.getFirstOption)(values),
1105
+ options: values,
1106
+ listsAsArrays
1107
+ }
1108
+ );
1109
+ });
1110
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { "data-testid": testID, className, title, children: [
1111
+ editors[0],
1112
+ separator,
1113
+ editors[1]
1114
+ ] });
1115
+ }
1116
+ switch (type) {
1117
+ case "select":
1118
+ case "multiselect":
1119
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1120
+ SelectorComponent,
1121
+ {
1122
+ ...props,
1123
+ className,
1124
+ handleOnChange,
1125
+ options: values,
1126
+ value,
1127
+ title,
1128
+ disabled,
1129
+ multiple: type === "multiselect",
1130
+ listsAsArrays
1131
+ }
1132
+ );
1133
+ case "textarea":
1134
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1135
+ import_antd5.Input.TextArea,
1136
+ {
1137
+ value,
1138
+ title,
1139
+ className,
1140
+ disabled,
1141
+ placeholder: placeHolderText,
1142
+ onChange: (e) => handleOnChange(e.target.value)
1143
+ }
1144
+ );
1145
+ case "switch":
1146
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1147
+ import_antd5.Switch,
1148
+ {
1149
+ checked: !!value,
1150
+ title,
1151
+ className,
1152
+ disabled,
1153
+ onChange: (v) => handleOnChange(v)
1154
+ }
1155
+ );
1156
+ case "checkbox":
1157
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { title, className, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1158
+ import_antd5.Checkbox,
1159
+ {
1160
+ type: "checkbox",
1161
+ disabled,
1162
+ onChange: (e) => handleOnChange(e.target.checked),
1163
+ checked: !!value
1164
+ }
1165
+ ) });
1166
+ case "radio":
1167
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className, title, children: values.map((v) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1168
+ import_antd5.Radio,
1169
+ {
1170
+ value: v.name,
1171
+ checked: value === v.name,
1172
+ disabled,
1173
+ onChange: (e) => handleOnChange(e.target.value),
1174
+ children: v.label
1175
+ },
1176
+ v.name
1177
+ )) });
1178
+ }
1179
+ switch (inputTypeCoerced) {
1180
+ case "date":
1181
+ case "datetime-local":
1182
+ return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1183
+ DatePicker.RangePicker,
1184
+ {
1185
+ value: (0, import_react_querybuilder3.toArray)(value)?.length >= 2 ? (0, import_react_querybuilder3.toArray)(value).map((v) => (0, import_dayjs.default)(v)) : void 0,
1186
+ showTime: inputTypeCoerced === "datetime-local",
1187
+ className,
1188
+ disabled,
1189
+ placeholder: [placeHolderText, placeHolderText],
1190
+ onChange: (
1191
+ /* istanbul ignore next */
1192
+ (dates) => {
1193
+ const format = `YYYY-MM-DD${inputTypeCoerced === "datetime-local" ? "THH:mm:ss" : ""}`;
1194
+ const dateArray = dates?.map((d) => d?.format(format));
1195
+ handleOnChange(dateArray ? listsAsArrays ? dateArray : dateArray.join(",") : dates);
1196
+ }
1197
+ )
1198
+ }
1199
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1200
+ DatePicker,
1201
+ {
1202
+ value: value ? (0, import_dayjs.default)(value) : null,
1203
+ showTime: inputTypeCoerced === "datetime-local",
1204
+ className,
1205
+ disabled,
1206
+ placeholder: placeHolderText,
1207
+ onChange: (_d, dateString) => handleOnChange(dateString)
1208
+ }
1209
+ );
1210
+ case "time":
1211
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1212
+ import_antd5.TimePicker,
1213
+ {
1214
+ value: value ? (0, import_dayjs.default)(value, "HH:mm:ss") : null,
1215
+ className,
1216
+ disabled,
1217
+ placeholder: placeHolderText,
1218
+ onChange: (d) => handleOnChange(d?.format("HH:mm:ss") ?? "")
1219
+ }
1220
+ );
1221
+ }
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1223
+ import_antd5.Input,
1224
+ {
1225
+ type: inputTypeCoerced,
1226
+ value,
1227
+ title,
1228
+ className,
1229
+ disabled,
1230
+ placeholder: placeHolderText,
1231
+ onChange: (e) => handleOnChange(e.target.value)
1232
+ }
1233
+ );
1234
+ };
1235
+ AntDValueEditor.displayName = "AntDValueEditor";
1236
+
1237
+ // src/index.ts
1238
+ var antdControlElements = {
1239
+ addGroupAction: AntDActionElement,
1240
+ addRuleAction: AntDActionElement,
1241
+ cloneGroupAction: AntDActionElement,
1242
+ cloneRuleAction: AntDActionElement,
1243
+ lockGroupAction: AntDActionElement,
1244
+ lockRuleAction: AntDActionElement,
1245
+ combinatorSelector: AntDValueSelector,
1246
+ fieldSelector: AntDValueSelector,
1247
+ notToggle: AntDNotToggle,
1248
+ operatorSelector: AntDValueSelector,
1249
+ removeGroupAction: AntDActionElement,
1250
+ removeRuleAction: AntDActionElement,
1251
+ valueEditor: AntDValueEditor,
1252
+ dragHandle: AntDDragHandle,
1253
+ valueSourceSelector: AntDValueSelector
1254
+ };
1255
+ var QueryBuilderAntD = (0, import_react_querybuilder4.getCompatContextProvider)({
1256
+ key: "antd",
1257
+ controlElements: antdControlElements
1258
+ });
1259
+ // Annotate the CommonJS export names for ESM import in node:
1260
+ 0 && (module.exports = {
1261
+ AntDActionElement,
1262
+ AntDDragHandle,
1263
+ AntDNotToggle,
1264
+ AntDValueEditor,
1265
+ AntDValueSelector,
1266
+ QueryBuilderAntD,
1267
+ antdControlElements
1268
+ });
1269
+ //# sourceMappingURL=react-querybuilder_antd.cjs.development.js.map