@react-querybuilder/antd 7.0.0-alpha.2 → 7.0.0-alpha.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.
- package/dist/cjs/react-querybuilder_antd.cjs.development.d.ts +21 -61
- package/dist/cjs/react-querybuilder_antd.cjs.development.js +282 -1004
- package/dist/cjs/react-querybuilder_antd.cjs.development.js.map +1 -1
- package/dist/cjs/react-querybuilder_antd.cjs.production.d.ts +21 -61
- package/dist/cjs/react-querybuilder_antd.cjs.production.js +1 -1
- package/dist/cjs/react-querybuilder_antd.cjs.production.js.map +1 -1
- package/dist/react-querybuilder_antd.d.mts +21 -61
- package/dist/react-querybuilder_antd.legacy-esm.d.mts +21 -61
- package/dist/react-querybuilder_antd.legacy-esm.js +280 -1003
- package/dist/react-querybuilder_antd.legacy-esm.js.map +1 -1
- package/dist/react-querybuilder_antd.mjs +270 -992
- package/dist/react-querybuilder_antd.mjs.map +1 -1
- package/dist/react-querybuilder_antd.production.d.mts +21 -61
- package/dist/react-querybuilder_antd.production.mjs +1 -1
- package/dist/react-querybuilder_antd.production.mjs.map +1 -1
- package/package.json +13 -12
|
@@ -30,317 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/
|
|
34
|
-
var require_dayjs_min = __commonJS({
|
|
35
|
-
"../../node_modules/dayjs/dayjs.min.js"(exports, module2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
!function(t, e) {
|
|
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
|
-
}(exports, function() {
|
|
40
|
-
"use strict";
|
|
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
|
-
var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
|
|
43
|
-
return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
|
|
44
|
-
} }, m = function(t2, e2, n2) {
|
|
45
|
-
var r2 = String(t2);
|
|
46
|
-
return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
|
|
47
|
-
}, v = { s: m, z: function(t2) {
|
|
48
|
-
var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
|
|
49
|
-
return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
|
|
50
|
-
}, m: function t2(e2, n2) {
|
|
51
|
-
if (e2.date() < n2.date())
|
|
52
|
-
return -t2(n2, e2);
|
|
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
|
-
return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
|
|
55
|
-
}, a: function(t2) {
|
|
56
|
-
return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
|
|
57
|
-
}, p: function(t2) {
|
|
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
|
-
}, u: function(t2) {
|
|
60
|
-
return void 0 === t2;
|
|
61
|
-
} }, g = "en", D = {};
|
|
62
|
-
D[g] = M;
|
|
63
|
-
var p = "$isDayjsObject", S = function(t2) {
|
|
64
|
-
return t2 instanceof _ || !(!t2 || !t2[p]);
|
|
65
|
-
}, w = function t2(e2, n2, r2) {
|
|
66
|
-
var i2;
|
|
67
|
-
if (!e2)
|
|
68
|
-
return g;
|
|
69
|
-
if ("string" == typeof e2) {
|
|
70
|
-
var s2 = e2.toLowerCase();
|
|
71
|
-
D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
|
|
72
|
-
var u2 = e2.split("-");
|
|
73
|
-
if (!i2 && u2.length > 1)
|
|
74
|
-
return t2(u2[0]);
|
|
75
|
-
} else {
|
|
76
|
-
var a2 = e2.name;
|
|
77
|
-
D[a2] = e2, i2 = a2;
|
|
78
|
-
}
|
|
79
|
-
return !r2 && i2 && (g = i2), i2 || !r2 && g;
|
|
80
|
-
}, O = function(t2, e2) {
|
|
81
|
-
if (S(t2))
|
|
82
|
-
return t2.clone();
|
|
83
|
-
var n2 = "object" == typeof e2 ? e2 : {};
|
|
84
|
-
return n2.date = t2, n2.args = arguments, new _(n2);
|
|
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
|
-
};
|
|
89
|
-
var _ = function() {
|
|
90
|
-
function M2(t2) {
|
|
91
|
-
this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
|
|
92
|
-
}
|
|
93
|
-
var m2 = M2.prototype;
|
|
94
|
-
return m2.parse = function(t2) {
|
|
95
|
-
this.$d = function(t3) {
|
|
96
|
-
var e2 = t3.date, n2 = t3.utc;
|
|
97
|
-
if (null === e2)
|
|
98
|
-
return /* @__PURE__ */ new Date(NaN);
|
|
99
|
-
if (b.u(e2))
|
|
100
|
-
return /* @__PURE__ */ new Date();
|
|
101
|
-
if (e2 instanceof Date)
|
|
102
|
-
return new Date(e2);
|
|
103
|
-
if ("string" == typeof e2 && !/Z$/i.test(e2)) {
|
|
104
|
-
var r2 = e2.match($);
|
|
105
|
-
if (r2) {
|
|
106
|
-
var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
|
|
107
|
-
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);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return new Date(e2);
|
|
111
|
-
}(t2), this.init();
|
|
112
|
-
}, m2.init = function() {
|
|
113
|
-
var t2 = this.$d;
|
|
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
|
-
}, m2.$utils = function() {
|
|
116
|
-
return b;
|
|
117
|
-
}, m2.isValid = function() {
|
|
118
|
-
return !(this.$d.toString() === l);
|
|
119
|
-
}, m2.isSame = function(t2, e2) {
|
|
120
|
-
var n2 = O(t2);
|
|
121
|
-
return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
|
|
122
|
-
}, m2.isAfter = function(t2, e2) {
|
|
123
|
-
return O(t2) < this.startOf(e2);
|
|
124
|
-
}, m2.isBefore = function(t2, e2) {
|
|
125
|
-
return this.endOf(e2) < O(t2);
|
|
126
|
-
}, m2.$g = function(t2, e2, n2) {
|
|
127
|
-
return b.u(t2) ? this[e2] : this.set(n2, t2);
|
|
128
|
-
}, m2.unix = function() {
|
|
129
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
130
|
-
}, m2.valueOf = function() {
|
|
131
|
-
return this.$d.getTime();
|
|
132
|
-
}, m2.startOf = function(t2, e2) {
|
|
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
|
-
return r2 ? i2 : i2.endOf(a);
|
|
136
|
-
}, $2 = function(t3, e3) {
|
|
137
|
-
return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
|
|
138
|
-
}, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
|
|
139
|
-
switch (f2) {
|
|
140
|
-
case h:
|
|
141
|
-
return r2 ? l2(1, 0) : l2(31, 11);
|
|
142
|
-
case c:
|
|
143
|
-
return r2 ? l2(1, M3) : l2(0, M3 + 1);
|
|
144
|
-
case o:
|
|
145
|
-
var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
|
|
146
|
-
return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
|
|
147
|
-
case a:
|
|
148
|
-
case d:
|
|
149
|
-
return $2(v2 + "Hours", 0);
|
|
150
|
-
case u:
|
|
151
|
-
return $2(v2 + "Minutes", 1);
|
|
152
|
-
case s:
|
|
153
|
-
return $2(v2 + "Seconds", 2);
|
|
154
|
-
case i:
|
|
155
|
-
return $2(v2 + "Milliseconds", 3);
|
|
156
|
-
default:
|
|
157
|
-
return this.clone();
|
|
158
|
-
}
|
|
159
|
-
}, m2.endOf = function(t2) {
|
|
160
|
-
return this.startOf(t2, false);
|
|
161
|
-
}, m2.$set = function(t2, e2) {
|
|
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
|
-
var y2 = this.clone().set(d, 1);
|
|
165
|
-
y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
|
|
166
|
-
} else
|
|
167
|
-
l2 && this.$d[l2]($2);
|
|
168
|
-
return this.init(), this;
|
|
169
|
-
}, m2.set = function(t2, e2) {
|
|
170
|
-
return this.clone().$set(t2, e2);
|
|
171
|
-
}, m2.get = function(t2) {
|
|
172
|
-
return this[b.p(t2)]();
|
|
173
|
-
}, m2.add = function(r2, f2) {
|
|
174
|
-
var d2, l2 = this;
|
|
175
|
-
r2 = Number(r2);
|
|
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
|
-
};
|
|
180
|
-
if ($2 === c)
|
|
181
|
-
return this.set(c, this.$M + r2);
|
|
182
|
-
if ($2 === h)
|
|
183
|
-
return this.set(h, this.$y + r2);
|
|
184
|
-
if ($2 === a)
|
|
185
|
-
return y2(1);
|
|
186
|
-
if ($2 === o)
|
|
187
|
-
return y2(7);
|
|
188
|
-
var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
|
|
189
|
-
return b.w(m3, this);
|
|
190
|
-
}, m2.subtract = function(t2, e2) {
|
|
191
|
-
return this.add(-1 * t2, e2);
|
|
192
|
-
}, m2.format = function(t2) {
|
|
193
|
-
var e2 = this, n2 = this.$locale();
|
|
194
|
-
if (!this.isValid())
|
|
195
|
-
return n2.invalidDate || l;
|
|
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
|
-
return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
|
|
198
|
-
}, d2 = function(t3) {
|
|
199
|
-
return b.s(s2 % 12 || 12, t3, "0");
|
|
200
|
-
}, $2 = f2 || function(t3, e3, n3) {
|
|
201
|
-
var r3 = t3 < 12 ? "AM" : "PM";
|
|
202
|
-
return n3 ? r3.toLowerCase() : r3;
|
|
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(":", "");
|
|
258
|
-
});
|
|
259
|
-
}, m2.utcOffset = function() {
|
|
260
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
261
|
-
}, m2.diff = function(r2, d2, l2) {
|
|
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);
|
|
294
|
-
}, m2.daysInMonth = function() {
|
|
295
|
-
return this.endOf(c).$D;
|
|
296
|
-
}, m2.$locale = function() {
|
|
297
|
-
return D[this.$L];
|
|
298
|
-
}, m2.locale = function(t2, e2) {
|
|
299
|
-
if (!t2)
|
|
300
|
-
return this.$L;
|
|
301
|
-
var n2 = this.clone(), r2 = w(t2, e2, true);
|
|
302
|
-
return r2 && (n2.$L = r2), n2;
|
|
303
|
-
}, m2.clone = function() {
|
|
304
|
-
return b.w(this.$d, this);
|
|
305
|
-
}, m2.toDate = function() {
|
|
306
|
-
return new Date(this.valueOf());
|
|
307
|
-
}, m2.toJSON = function() {
|
|
308
|
-
return this.isValid() ? this.toISOString() : null;
|
|
309
|
-
}, m2.toISOString = function() {
|
|
310
|
-
return this.$d.toISOString();
|
|
311
|
-
}, m2.toString = function() {
|
|
312
|
-
return this.$d.toUTCString();
|
|
313
|
-
}, M2;
|
|
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) {
|
|
317
|
-
return this.$g(e2, t2[0], t2[1]);
|
|
318
|
-
};
|
|
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;
|
|
324
|
-
});
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
// ../../node_modules/@babel/runtime/helpers/interopRequireDefault.js
|
|
329
|
-
var require_interopRequireDefault = __commonJS({
|
|
330
|
-
"../../node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module2) {
|
|
331
|
-
"use strict";
|
|
332
|
-
function _interopRequireDefault(obj) {
|
|
333
|
-
return obj && obj.__esModule ? obj : {
|
|
334
|
-
"default": obj
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
// ../../node_modules/rc-picker/node_modules/rc-util/lib/warning.js
|
|
33
|
+
// ../../node_modules/rc-util/lib/warning.js
|
|
342
34
|
var require_warning = __commonJS({
|
|
343
|
-
"../../node_modules/rc-
|
|
35
|
+
"../../node_modules/rc-util/lib/warning.js"(exports) {
|
|
344
36
|
"use strict";
|
|
345
37
|
Object.defineProperty(exports, "__esModule", {
|
|
346
38
|
value: true
|
|
@@ -348,17 +40,16 @@ var require_warning = __commonJS({
|
|
|
348
40
|
exports.call = call;
|
|
349
41
|
exports.default = void 0;
|
|
350
42
|
exports.note = note;
|
|
351
|
-
exports.noteOnce =
|
|
43
|
+
exports.noteOnce = noteOnce2;
|
|
352
44
|
exports.preMessage = void 0;
|
|
353
45
|
exports.resetWarned = resetWarned;
|
|
354
46
|
exports.warning = warning;
|
|
355
47
|
exports.warningOnce = warningOnce;
|
|
356
48
|
var warned = {};
|
|
357
49
|
var preWarningFns = [];
|
|
358
|
-
var preMessage = function preMessage2(fn) {
|
|
50
|
+
var preMessage = exports.preMessage = function preMessage2(fn) {
|
|
359
51
|
preWarningFns.push(fn);
|
|
360
52
|
};
|
|
361
|
-
exports.preMessage = preMessage;
|
|
362
53
|
function warning(valid, message) {
|
|
363
54
|
if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
|
|
364
55
|
var finalMessage = preWarningFns.reduce(function(msg, preMessageFn) {
|
|
@@ -391,581 +82,13 @@ var require_warning = __commonJS({
|
|
|
391
82
|
function warningOnce(valid, message) {
|
|
392
83
|
call(warning, valid, message);
|
|
393
84
|
}
|
|
394
|
-
function
|
|
85
|
+
function noteOnce2(valid, message) {
|
|
395
86
|
call(note, valid, message);
|
|
396
87
|
}
|
|
397
88
|
warningOnce.preMessage = preMessage;
|
|
398
89
|
warningOnce.resetWarned = resetWarned;
|
|
399
|
-
warningOnce.noteOnce =
|
|
400
|
-
var _default = warningOnce;
|
|
401
|
-
exports.default = _default;
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
// ../../node_modules/dayjs/plugin/weekday.js
|
|
406
|
-
var require_weekday = __commonJS({
|
|
407
|
-
"../../node_modules/dayjs/plugin/weekday.js"(exports, module2) {
|
|
408
|
-
"use strict";
|
|
409
|
-
!function(e, t) {
|
|
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();
|
|
411
|
-
}(exports, function() {
|
|
412
|
-
"use strict";
|
|
413
|
-
return function(e, t) {
|
|
414
|
-
t.prototype.weekday = function(e2) {
|
|
415
|
-
var t2 = this.$locale().weekStart || 0, i = this.$W, n = (i < t2 ? i + 7 : i) - t2;
|
|
416
|
-
return this.$utils().u(e2) ? n : this.subtract(n, "day").add(e2, "day");
|
|
417
|
-
};
|
|
418
|
-
};
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
// ../../node_modules/dayjs/plugin/localeData.js
|
|
424
|
-
var require_localeData = __commonJS({
|
|
425
|
-
"../../node_modules/dayjs/plugin/localeData.js"(exports, module2) {
|
|
426
|
-
"use strict";
|
|
427
|
-
!function(n, e) {
|
|
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();
|
|
429
|
-
}(exports, function() {
|
|
430
|
-
"use strict";
|
|
431
|
-
return function(n, e, t) {
|
|
432
|
-
var r = e.prototype, o = function(n2) {
|
|
433
|
-
return n2 && (n2.indexOf ? n2 : n2.s);
|
|
434
|
-
}, u = function(n2, e2, t2, r2, u2) {
|
|
435
|
-
var i2 = n2.name ? n2 : n2.$locale(), a2 = o(i2[e2]), s2 = o(i2[t2]), f = a2 || s2.map(function(n3) {
|
|
436
|
-
return n3.slice(0, r2);
|
|
437
|
-
});
|
|
438
|
-
if (!u2)
|
|
439
|
-
return f;
|
|
440
|
-
var d = i2.weekStart;
|
|
441
|
-
return f.map(function(n3, e3) {
|
|
442
|
-
return f[(e3 + (d || 0)) % 7];
|
|
443
|
-
});
|
|
444
|
-
}, i = function() {
|
|
445
|
-
return t.Ls[t.locale()];
|
|
446
|
-
}, a = function(n2, e2) {
|
|
447
|
-
return n2.formats[e2] || function(n3) {
|
|
448
|
-
return n3.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(n4, e3, t2) {
|
|
449
|
-
return e3 || t2.slice(1);
|
|
450
|
-
});
|
|
451
|
-
}(n2.formats[e2.toUpperCase()]);
|
|
452
|
-
}, s = function() {
|
|
453
|
-
var n2 = this;
|
|
454
|
-
return { months: function(e2) {
|
|
455
|
-
return e2 ? e2.format("MMMM") : u(n2, "months");
|
|
456
|
-
}, monthsShort: function(e2) {
|
|
457
|
-
return e2 ? e2.format("MMM") : u(n2, "monthsShort", "months", 3);
|
|
458
|
-
}, firstDayOfWeek: function() {
|
|
459
|
-
return n2.$locale().weekStart || 0;
|
|
460
|
-
}, weekdays: function(e2) {
|
|
461
|
-
return e2 ? e2.format("dddd") : u(n2, "weekdays");
|
|
462
|
-
}, weekdaysMin: function(e2) {
|
|
463
|
-
return e2 ? e2.format("dd") : u(n2, "weekdaysMin", "weekdays", 2);
|
|
464
|
-
}, weekdaysShort: function(e2) {
|
|
465
|
-
return e2 ? e2.format("ddd") : u(n2, "weekdaysShort", "weekdays", 3);
|
|
466
|
-
}, longDateFormat: function(e2) {
|
|
467
|
-
return a(n2.$locale(), e2);
|
|
468
|
-
}, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
|
|
469
|
-
};
|
|
470
|
-
r.localeData = function() {
|
|
471
|
-
return s.bind(this)();
|
|
472
|
-
}, t.localeData = function() {
|
|
473
|
-
var n2 = i();
|
|
474
|
-
return { firstDayOfWeek: function() {
|
|
475
|
-
return n2.weekStart || 0;
|
|
476
|
-
}, weekdays: function() {
|
|
477
|
-
return t.weekdays();
|
|
478
|
-
}, weekdaysShort: function() {
|
|
479
|
-
return t.weekdaysShort();
|
|
480
|
-
}, weekdaysMin: function() {
|
|
481
|
-
return t.weekdaysMin();
|
|
482
|
-
}, months: function() {
|
|
483
|
-
return t.months();
|
|
484
|
-
}, monthsShort: function() {
|
|
485
|
-
return t.monthsShort();
|
|
486
|
-
}, longDateFormat: function(e2) {
|
|
487
|
-
return a(n2, e2);
|
|
488
|
-
}, meridiem: n2.meridiem, ordinal: n2.ordinal };
|
|
489
|
-
}, t.months = function() {
|
|
490
|
-
return u(i(), "months");
|
|
491
|
-
}, t.monthsShort = function() {
|
|
492
|
-
return u(i(), "monthsShort", "months", 3);
|
|
493
|
-
}, t.weekdays = function(n2) {
|
|
494
|
-
return u(i(), "weekdays", null, null, n2);
|
|
495
|
-
}, t.weekdaysShort = function(n2) {
|
|
496
|
-
return u(i(), "weekdaysShort", "weekdays", 3, n2);
|
|
497
|
-
}, t.weekdaysMin = function(n2) {
|
|
498
|
-
return u(i(), "weekdaysMin", "weekdays", 2, n2);
|
|
499
|
-
};
|
|
500
|
-
};
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
|
|
505
|
-
// ../../node_modules/dayjs/plugin/weekOfYear.js
|
|
506
|
-
var require_weekOfYear = __commonJS({
|
|
507
|
-
"../../node_modules/dayjs/plugin/weekOfYear.js"(exports, module2) {
|
|
508
|
-
"use strict";
|
|
509
|
-
!function(e, t) {
|
|
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();
|
|
511
|
-
}(exports, function() {
|
|
512
|
-
"use strict";
|
|
513
|
-
var e = "week", t = "year";
|
|
514
|
-
return function(i, n, r) {
|
|
515
|
-
var f = n.prototype;
|
|
516
|
-
f.week = function(i2) {
|
|
517
|
-
if (void 0 === i2 && (i2 = null), null !== i2)
|
|
518
|
-
return this.add(7 * (i2 - this.week()), "day");
|
|
519
|
-
var n2 = this.$locale().yearStart || 1;
|
|
520
|
-
if (11 === this.month() && this.date() > 25) {
|
|
521
|
-
var f2 = r(this).startOf(t).add(1, t).date(n2), s = r(this).endOf(e);
|
|
522
|
-
if (f2.isBefore(s))
|
|
523
|
-
return 1;
|
|
524
|
-
}
|
|
525
|
-
var a = r(this).startOf(t).date(n2).startOf(e).subtract(1, "millisecond"), o = this.diff(a, e, true);
|
|
526
|
-
return o < 0 ? r(this).startOf("week").week() : Math.ceil(o);
|
|
527
|
-
}, f.weeks = function(e2) {
|
|
528
|
-
return void 0 === e2 && (e2 = null), this.week(e2);
|
|
529
|
-
};
|
|
530
|
-
};
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
|
|
535
|
-
// ../../node_modules/dayjs/plugin/weekYear.js
|
|
536
|
-
var require_weekYear = __commonJS({
|
|
537
|
-
"../../node_modules/dayjs/plugin/weekYear.js"(exports, module2) {
|
|
538
|
-
"use strict";
|
|
539
|
-
!function(e, t) {
|
|
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();
|
|
541
|
-
}(exports, function() {
|
|
542
|
-
"use strict";
|
|
543
|
-
return function(e, t) {
|
|
544
|
-
t.prototype.weekYear = function() {
|
|
545
|
-
var e2 = this.month(), t2 = this.week(), n = this.year();
|
|
546
|
-
return 1 === t2 && 11 === e2 ? n + 1 : 0 === e2 && t2 >= 52 ? n - 1 : n;
|
|
547
|
-
};
|
|
548
|
-
};
|
|
549
|
-
});
|
|
550
|
-
}
|
|
551
|
-
});
|
|
552
|
-
|
|
553
|
-
// ../../node_modules/dayjs/plugin/advancedFormat.js
|
|
554
|
-
var require_advancedFormat = __commonJS({
|
|
555
|
-
"../../node_modules/dayjs/plugin/advancedFormat.js"(exports, module2) {
|
|
556
|
-
"use strict";
|
|
557
|
-
!function(e, t) {
|
|
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();
|
|
559
|
-
}(exports, function() {
|
|
560
|
-
"use strict";
|
|
561
|
-
return function(e, t) {
|
|
562
|
-
var r = t.prototype, n = r.format;
|
|
563
|
-
r.format = function(e2) {
|
|
564
|
-
var t2 = this, r2 = this.$locale();
|
|
565
|
-
if (!this.isValid())
|
|
566
|
-
return n.bind(this)(e2);
|
|
567
|
-
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) {
|
|
568
|
-
switch (e3) {
|
|
569
|
-
case "Q":
|
|
570
|
-
return Math.ceil((t2.$M + 1) / 3);
|
|
571
|
-
case "Do":
|
|
572
|
-
return r2.ordinal(t2.$D);
|
|
573
|
-
case "gggg":
|
|
574
|
-
return t2.weekYear();
|
|
575
|
-
case "GGGG":
|
|
576
|
-
return t2.isoWeekYear();
|
|
577
|
-
case "wo":
|
|
578
|
-
return r2.ordinal(t2.week(), "W");
|
|
579
|
-
case "w":
|
|
580
|
-
case "ww":
|
|
581
|
-
return s.s(t2.week(), "w" === e3 ? 1 : 2, "0");
|
|
582
|
-
case "W":
|
|
583
|
-
case "WW":
|
|
584
|
-
return s.s(t2.isoWeek(), "W" === e3 ? 1 : 2, "0");
|
|
585
|
-
case "k":
|
|
586
|
-
case "kk":
|
|
587
|
-
return s.s(String(0 === t2.$H ? 24 : t2.$H), "k" === e3 ? 1 : 2, "0");
|
|
588
|
-
case "X":
|
|
589
|
-
return Math.floor(t2.$d.getTime() / 1e3);
|
|
590
|
-
case "x":
|
|
591
|
-
return t2.$d.getTime();
|
|
592
|
-
case "z":
|
|
593
|
-
return "[" + t2.offsetName() + "]";
|
|
594
|
-
case "zzz":
|
|
595
|
-
return "[" + t2.offsetName("long") + "]";
|
|
596
|
-
default:
|
|
597
|
-
return e3;
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
return n.bind(this)(a);
|
|
601
|
-
};
|
|
602
|
-
};
|
|
603
|
-
});
|
|
604
|
-
}
|
|
605
|
-
});
|
|
606
|
-
|
|
607
|
-
// ../../node_modules/dayjs/plugin/customParseFormat.js
|
|
608
|
-
var require_customParseFormat = __commonJS({
|
|
609
|
-
"../../node_modules/dayjs/plugin/customParseFormat.js"(exports, module2) {
|
|
610
|
-
"use strict";
|
|
611
|
-
!function(e, t) {
|
|
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();
|
|
613
|
-
}(exports, function() {
|
|
614
|
-
"use strict";
|
|
615
|
-
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) {
|
|
616
|
-
return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3);
|
|
617
|
-
};
|
|
618
|
-
var a = function(e2) {
|
|
619
|
-
return function(t2) {
|
|
620
|
-
this[e2] = +t2;
|
|
621
|
-
};
|
|
622
|
-
}, f = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) {
|
|
623
|
-
(this.zone || (this.zone = {})).offset = function(e3) {
|
|
624
|
-
if (!e3)
|
|
625
|
-
return 0;
|
|
626
|
-
if ("Z" === e3)
|
|
627
|
-
return 0;
|
|
628
|
-
var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
|
|
629
|
-
return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
|
|
630
|
-
}(e2);
|
|
631
|
-
}], h = function(e2) {
|
|
632
|
-
var t2 = o[e2];
|
|
633
|
-
return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
|
|
634
|
-
}, u = function(e2, t2) {
|
|
635
|
-
var n2, r2 = o.meridiem;
|
|
636
|
-
if (r2) {
|
|
637
|
-
for (var i2 = 1; i2 <= 24; i2 += 1)
|
|
638
|
-
if (e2.indexOf(r2(i2, 0, t2)) > -1) {
|
|
639
|
-
n2 = i2 > 12;
|
|
640
|
-
break;
|
|
641
|
-
}
|
|
642
|
-
} else
|
|
643
|
-
n2 = e2 === (t2 ? "pm" : "PM");
|
|
644
|
-
return n2;
|
|
645
|
-
}, d = { A: [i, function(e2) {
|
|
646
|
-
this.afternoon = u(e2, false);
|
|
647
|
-
}], a: [i, function(e2) {
|
|
648
|
-
this.afternoon = u(e2, true);
|
|
649
|
-
}], S: [/\d/, function(e2) {
|
|
650
|
-
this.milliseconds = 100 * +e2;
|
|
651
|
-
}], SS: [n, function(e2) {
|
|
652
|
-
this.milliseconds = 10 * +e2;
|
|
653
|
-
}], SSS: [/\d{3}/, function(e2) {
|
|
654
|
-
this.milliseconds = +e2;
|
|
655
|
-
}], 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) {
|
|
656
|
-
var t2 = o.ordinal, n2 = e2.match(/\d+/);
|
|
657
|
-
if (this.day = n2[0], t2)
|
|
658
|
-
for (var r2 = 1; r2 <= 31; r2 += 1)
|
|
659
|
-
t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2);
|
|
660
|
-
}], M: [r, a("month")], MM: [n, a("month")], MMM: [i, function(e2) {
|
|
661
|
-
var t2 = h("months"), n2 = (h("monthsShort") || t2.map(function(e3) {
|
|
662
|
-
return e3.slice(0, 3);
|
|
663
|
-
})).indexOf(e2) + 1;
|
|
664
|
-
if (n2 < 1)
|
|
665
|
-
throw new Error();
|
|
666
|
-
this.month = n2 % 12 || n2;
|
|
667
|
-
}], MMMM: [i, function(e2) {
|
|
668
|
-
var t2 = h("months").indexOf(e2) + 1;
|
|
669
|
-
if (t2 < 1)
|
|
670
|
-
throw new Error();
|
|
671
|
-
this.month = t2 % 12 || t2;
|
|
672
|
-
}], Y: [/[+-]?\d+/, a("year")], YY: [n, function(e2) {
|
|
673
|
-
this.year = s(e2);
|
|
674
|
-
}], YYYY: [/\d{4}/, a("year")], Z: f, ZZ: f };
|
|
675
|
-
function c(n2) {
|
|
676
|
-
var r2, i2;
|
|
677
|
-
r2 = n2, i2 = o && o.formats;
|
|
678
|
-
for (var s2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r3) {
|
|
679
|
-
var o2 = r3 && r3.toUpperCase();
|
|
680
|
-
return n3 || i2[r3] || e[r3] || i2[o2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e2, t3, n4) {
|
|
681
|
-
return t3 || n4.slice(1);
|
|
682
|
-
});
|
|
683
|
-
})).match(t), a2 = s2.length, f2 = 0; f2 < a2; f2 += 1) {
|
|
684
|
-
var h2 = s2[f2], u2 = d[h2], c2 = u2 && u2[0], l = u2 && u2[1];
|
|
685
|
-
s2[f2] = l ? { regex: c2, parser: l } : h2.replace(/^\[|\]$/g, "");
|
|
686
|
-
}
|
|
687
|
-
return function(e2) {
|
|
688
|
-
for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) {
|
|
689
|
-
var i3 = s2[n3];
|
|
690
|
-
if ("string" == typeof i3)
|
|
691
|
-
r3 += i3.length;
|
|
692
|
-
else {
|
|
693
|
-
var o2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = o2.exec(h3)[0];
|
|
694
|
-
f3.call(t2, u3), e2 = e2.replace(u3, "");
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
return function(e3) {
|
|
698
|
-
var t3 = e3.afternoon;
|
|
699
|
-
if (void 0 !== t3) {
|
|
700
|
-
var n4 = e3.hours;
|
|
701
|
-
t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon;
|
|
702
|
-
}
|
|
703
|
-
}(t2), t2;
|
|
704
|
-
};
|
|
705
|
-
}
|
|
706
|
-
return function(e2, t2, n2) {
|
|
707
|
-
n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (s = e2.parseTwoDigitYear);
|
|
708
|
-
var r2 = t2.prototype, i2 = r2.parse;
|
|
709
|
-
r2.parse = function(e3) {
|
|
710
|
-
var t3 = e3.date, r3 = e3.utc, s2 = e3.args;
|
|
711
|
-
this.$u = r3;
|
|
712
|
-
var a2 = s2[1];
|
|
713
|
-
if ("string" == typeof a2) {
|
|
714
|
-
var f2 = true === s2[2], h2 = true === s2[3], u2 = f2 || h2, d2 = s2[2];
|
|
715
|
-
h2 && (d2 = s2[2]), o = this.$locale(), !f2 && d2 && (o = n2.Ls[d2]), this.$d = function(e4, t4, n3) {
|
|
716
|
-
try {
|
|
717
|
-
if (["x", "X"].indexOf(t4) > -1)
|
|
718
|
-
return new Date(("X" === t4 ? 1e3 : 1) * e4);
|
|
719
|
-
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;
|
|
720
|
-
i3 && !o2 || (Y = o2 > 0 ? o2 - 1 : l2.getMonth());
|
|
721
|
-
var p = a3 || 0, v = f3 || 0, D = h3 || 0, g = u3 || 0;
|
|
722
|
-
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);
|
|
723
|
-
} catch (e5) {
|
|
724
|
-
return /* @__PURE__ */ new Date("");
|
|
725
|
-
}
|
|
726
|
-
}(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 = {};
|
|
727
|
-
} else if (a2 instanceof Array)
|
|
728
|
-
for (var l = a2.length, m = 1; m <= l; m += 1) {
|
|
729
|
-
s2[1] = a2[m - 1];
|
|
730
|
-
var M = n2.apply(this, s2);
|
|
731
|
-
if (M.isValid()) {
|
|
732
|
-
this.$d = M.$d, this.$L = M.$L, this.init();
|
|
733
|
-
break;
|
|
734
|
-
}
|
|
735
|
-
m === l && (this.$d = /* @__PURE__ */ new Date(""));
|
|
736
|
-
}
|
|
737
|
-
else
|
|
738
|
-
i2.call(this, e3);
|
|
739
|
-
};
|
|
740
|
-
};
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
});
|
|
744
|
-
|
|
745
|
-
// ../../node_modules/rc-picker/lib/generate/dayjs.js
|
|
746
|
-
var require_dayjs = __commonJS({
|
|
747
|
-
"../../node_modules/rc-picker/lib/generate/dayjs.js"(exports) {
|
|
748
|
-
"use strict";
|
|
749
|
-
var _interopRequireDefault = require_interopRequireDefault();
|
|
750
|
-
Object.defineProperty(exports, "__esModule", {
|
|
751
|
-
value: true
|
|
752
|
-
});
|
|
753
|
-
exports.default = void 0;
|
|
754
|
-
var _dayjs = _interopRequireDefault(require_dayjs_min());
|
|
755
|
-
var _warning = require_warning();
|
|
756
|
-
var _weekday = _interopRequireDefault(require_weekday());
|
|
757
|
-
var _localeData = _interopRequireDefault(require_localeData());
|
|
758
|
-
var _weekOfYear = _interopRequireDefault(require_weekOfYear());
|
|
759
|
-
var _weekYear = _interopRequireDefault(require_weekYear());
|
|
760
|
-
var _advancedFormat = _interopRequireDefault(require_advancedFormat());
|
|
761
|
-
var _customParseFormat = _interopRequireDefault(require_customParseFormat());
|
|
762
|
-
_dayjs.default.extend(_customParseFormat.default);
|
|
763
|
-
_dayjs.default.extend(_advancedFormat.default);
|
|
764
|
-
_dayjs.default.extend(_weekday.default);
|
|
765
|
-
_dayjs.default.extend(_localeData.default);
|
|
766
|
-
_dayjs.default.extend(_weekOfYear.default);
|
|
767
|
-
_dayjs.default.extend(_weekYear.default);
|
|
768
|
-
_dayjs.default.extend(function(o, c) {
|
|
769
|
-
var proto = c.prototype;
|
|
770
|
-
var oldFormat = proto.format;
|
|
771
|
-
proto.format = function f(formatStr) {
|
|
772
|
-
var str = (formatStr || "").replace("Wo", "wo");
|
|
773
|
-
return oldFormat.bind(this)(str);
|
|
774
|
-
};
|
|
775
|
-
});
|
|
776
|
-
var localeMap = {
|
|
777
|
-
// ar_EG:
|
|
778
|
-
// az_AZ:
|
|
779
|
-
// bg_BG:
|
|
780
|
-
bn_BD: "bn-bd",
|
|
781
|
-
by_BY: "be",
|
|
782
|
-
// ca_ES:
|
|
783
|
-
// cs_CZ:
|
|
784
|
-
// da_DK:
|
|
785
|
-
// de_DE:
|
|
786
|
-
// el_GR:
|
|
787
|
-
en_GB: "en-gb",
|
|
788
|
-
en_US: "en",
|
|
789
|
-
// es_ES:
|
|
790
|
-
// et_EE:
|
|
791
|
-
// fa_IR:
|
|
792
|
-
// fi_FI:
|
|
793
|
-
fr_BE: "fr",
|
|
794
|
-
// todo: dayjs has no fr_BE locale, use fr at present
|
|
795
|
-
fr_CA: "fr-ca",
|
|
796
|
-
// fr_FR:
|
|
797
|
-
// ga_IE:
|
|
798
|
-
// gl_ES:
|
|
799
|
-
// he_IL:
|
|
800
|
-
// hi_IN:
|
|
801
|
-
// hr_HR:
|
|
802
|
-
// hu_HU:
|
|
803
|
-
hy_AM: "hy-am",
|
|
804
|
-
// id_ID:
|
|
805
|
-
// is_IS:
|
|
806
|
-
// it_IT:
|
|
807
|
-
// ja_JP:
|
|
808
|
-
// ka_GE:
|
|
809
|
-
// kk_KZ:
|
|
810
|
-
// km_KH:
|
|
811
|
-
kmr_IQ: "ku",
|
|
812
|
-
// kn_IN:
|
|
813
|
-
// ko_KR:
|
|
814
|
-
// ku_IQ: // previous ku in antd
|
|
815
|
-
// lt_LT:
|
|
816
|
-
// lv_LV:
|
|
817
|
-
// mk_MK:
|
|
818
|
-
// ml_IN:
|
|
819
|
-
// mn_MN:
|
|
820
|
-
// ms_MY:
|
|
821
|
-
// nb_NO:
|
|
822
|
-
// ne_NP:
|
|
823
|
-
nl_BE: "nl-be",
|
|
824
|
-
// nl_NL:
|
|
825
|
-
// pl_PL:
|
|
826
|
-
pt_BR: "pt-br",
|
|
827
|
-
// pt_PT:
|
|
828
|
-
// ro_RO:
|
|
829
|
-
// ru_RU:
|
|
830
|
-
// sk_SK:
|
|
831
|
-
// sl_SI:
|
|
832
|
-
// sr_RS:
|
|
833
|
-
// sv_SE:
|
|
834
|
-
// ta_IN:
|
|
835
|
-
// th_TH:
|
|
836
|
-
// tr_TR:
|
|
837
|
-
// uk_UA:
|
|
838
|
-
// ur_PK:
|
|
839
|
-
// vi_VN:
|
|
840
|
-
zh_CN: "zh-cn",
|
|
841
|
-
zh_HK: "zh-hk",
|
|
842
|
-
zh_TW: "zh-tw"
|
|
843
|
-
};
|
|
844
|
-
var parseLocale = function parseLocale2(locale) {
|
|
845
|
-
var mapLocale = localeMap[locale];
|
|
846
|
-
return mapLocale || locale.split("_")[0];
|
|
847
|
-
};
|
|
848
|
-
var parseNoMatchNotice = function parseNoMatchNotice2() {
|
|
849
|
-
(0, _warning.noteOnce)(false, "Not match any format. Please help to fire a issue about this.");
|
|
850
|
-
};
|
|
851
|
-
var generateConfig = {
|
|
852
|
-
// get
|
|
853
|
-
getNow: function getNow() {
|
|
854
|
-
return (0, _dayjs.default)();
|
|
855
|
-
},
|
|
856
|
-
getFixedDate: function getFixedDate(string) {
|
|
857
|
-
return (0, _dayjs.default)(string, ["YYYY-M-DD", "YYYY-MM-DD"]);
|
|
858
|
-
},
|
|
859
|
-
getEndDate: function getEndDate(date) {
|
|
860
|
-
return date.endOf("month");
|
|
861
|
-
},
|
|
862
|
-
getWeekDay: function getWeekDay(date) {
|
|
863
|
-
var clone = date.locale("en");
|
|
864
|
-
return clone.weekday() + clone.localeData().firstDayOfWeek();
|
|
865
|
-
},
|
|
866
|
-
getYear: function getYear(date) {
|
|
867
|
-
return date.year();
|
|
868
|
-
},
|
|
869
|
-
getMonth: function getMonth(date) {
|
|
870
|
-
return date.month();
|
|
871
|
-
},
|
|
872
|
-
getDate: function getDate(date) {
|
|
873
|
-
return date.date();
|
|
874
|
-
},
|
|
875
|
-
getHour: function getHour(date) {
|
|
876
|
-
return date.hour();
|
|
877
|
-
},
|
|
878
|
-
getMinute: function getMinute(date) {
|
|
879
|
-
return date.minute();
|
|
880
|
-
},
|
|
881
|
-
getSecond: function getSecond(date) {
|
|
882
|
-
return date.second();
|
|
883
|
-
},
|
|
884
|
-
// set
|
|
885
|
-
addYear: function addYear(date, diff) {
|
|
886
|
-
return date.add(diff, "year");
|
|
887
|
-
},
|
|
888
|
-
addMonth: function addMonth(date, diff) {
|
|
889
|
-
return date.add(diff, "month");
|
|
890
|
-
},
|
|
891
|
-
addDate: function addDate(date, diff) {
|
|
892
|
-
return date.add(diff, "day");
|
|
893
|
-
},
|
|
894
|
-
setYear: function setYear(date, year) {
|
|
895
|
-
return date.year(year);
|
|
896
|
-
},
|
|
897
|
-
setMonth: function setMonth(date, month) {
|
|
898
|
-
return date.month(month);
|
|
899
|
-
},
|
|
900
|
-
setDate: function setDate(date, num) {
|
|
901
|
-
return date.date(num);
|
|
902
|
-
},
|
|
903
|
-
setHour: function setHour(date, hour) {
|
|
904
|
-
return date.hour(hour);
|
|
905
|
-
},
|
|
906
|
-
setMinute: function setMinute(date, minute) {
|
|
907
|
-
return date.minute(minute);
|
|
908
|
-
},
|
|
909
|
-
setSecond: function setSecond(date, second) {
|
|
910
|
-
return date.second(second);
|
|
911
|
-
},
|
|
912
|
-
// Compare
|
|
913
|
-
isAfter: function isAfter(date1, date2) {
|
|
914
|
-
return date1.isAfter(date2);
|
|
915
|
-
},
|
|
916
|
-
isValidate: function isValidate(date) {
|
|
917
|
-
return date.isValid();
|
|
918
|
-
},
|
|
919
|
-
locale: {
|
|
920
|
-
getWeekFirstDay: function getWeekFirstDay(locale) {
|
|
921
|
-
return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().firstDayOfWeek();
|
|
922
|
-
},
|
|
923
|
-
getWeekFirstDate: function getWeekFirstDate(locale, date) {
|
|
924
|
-
return date.locale(parseLocale(locale)).weekday(0);
|
|
925
|
-
},
|
|
926
|
-
getWeek: function getWeek(locale, date) {
|
|
927
|
-
return date.locale(parseLocale(locale)).week();
|
|
928
|
-
},
|
|
929
|
-
getShortWeekDays: function getShortWeekDays(locale) {
|
|
930
|
-
return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().weekdaysMin();
|
|
931
|
-
},
|
|
932
|
-
getShortMonths: function getShortMonths(locale) {
|
|
933
|
-
return (0, _dayjs.default)().locale(parseLocale(locale)).localeData().monthsShort();
|
|
934
|
-
},
|
|
935
|
-
format: function format(locale, date, _format) {
|
|
936
|
-
return date.locale(parseLocale(locale)).format(_format);
|
|
937
|
-
},
|
|
938
|
-
parse: function parse(locale, text, formats) {
|
|
939
|
-
var localeStr = parseLocale(locale);
|
|
940
|
-
for (var i = 0; i < formats.length; i += 1) {
|
|
941
|
-
var format = formats[i];
|
|
942
|
-
var formatText = text;
|
|
943
|
-
if (format.includes("wo") || format.includes("Wo")) {
|
|
944
|
-
var year = formatText.split("-")[0];
|
|
945
|
-
var weekStr = formatText.split("-")[1];
|
|
946
|
-
var firstWeek = (0, _dayjs.default)(year, "YYYY").startOf("year").locale(localeStr);
|
|
947
|
-
for (var j = 0; j <= 52; j += 1) {
|
|
948
|
-
var nextWeek = firstWeek.add(j, "week");
|
|
949
|
-
if (nextWeek.format("Wo") === weekStr) {
|
|
950
|
-
return nextWeek;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
parseNoMatchNotice();
|
|
954
|
-
return null;
|
|
955
|
-
}
|
|
956
|
-
var date = (0, _dayjs.default)(formatText, format, true).locale(localeStr);
|
|
957
|
-
if (date.isValid()) {
|
|
958
|
-
return date;
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
if (text) {
|
|
962
|
-
parseNoMatchNotice();
|
|
963
|
-
}
|
|
964
|
-
return null;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
};
|
|
968
|
-
var _default = exports.default = generateConfig;
|
|
90
|
+
warningOnce.noteOnce = noteOnce2;
|
|
91
|
+
var _default = exports.default = warningOnce;
|
|
969
92
|
}
|
|
970
93
|
});
|
|
971
94
|
|
|
@@ -1114,91 +237,200 @@ var AntDShiftActions = ({
|
|
|
1114
237
|
AntDShiftActions.displayName = "AntDShiftActions";
|
|
1115
238
|
|
|
1116
239
|
// src/AntDValueEditor.tsx
|
|
1117
|
-
var import_antd6 = require("antd");
|
|
1118
|
-
var import_generatePicker = __toESM(require("antd/es/date-picker/generatePicker/index.js"));
|
|
1119
|
-
var import_dayjs = __toESM(require_dayjs_min());
|
|
1120
|
-
var import_dayjs2 = __toESM(require_dayjs());
|
|
1121
|
-
var React7 = __toESM(require("react"));
|
|
1122
|
-
var import_react_querybuilder3 = require("react-querybuilder");
|
|
1123
|
-
|
|
1124
|
-
// src/AntDValueSelector.tsx
|
|
1125
|
-
var import_antd5 = require("antd");
|
|
1126
|
-
var React6 = __toESM(require("react"));
|
|
1127
|
-
var import_react_querybuilder2 = require("react-querybuilder");
|
|
1128
|
-
|
|
1129
|
-
// src/utils.tsx
|
|
1130
240
|
var import_antd4 = require("antd");
|
|
241
|
+
var import_generatePicker = __toESM(require("antd/es/date-picker/generatePicker/index.js"));
|
|
242
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
1131
243
|
var React5 = __toESM(require("react"));
|
|
1132
244
|
var import_react_querybuilder = require("react-querybuilder");
|
|
1133
|
-
var { OptGroup, Option } = import_antd4.Select;
|
|
1134
|
-
var toOptions = (arr) => (0, import_react_querybuilder.isOptionGroupArray)(arr) ? arr.map((og) => /* @__PURE__ */ React5.createElement(OptGroup, { key: og.label, label: og.label }, og.options.map((opt) => /* @__PURE__ */ React5.createElement(Option, { key: opt.name, value: opt.name }, opt.label)))) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ React5.createElement(Option, { key: opt.name, value: opt.name }, opt.label)) : (
|
|
1135
|
-
/* istanbul ignore next */
|
|
1136
|
-
null
|
|
1137
|
-
);
|
|
1138
245
|
|
|
1139
|
-
// src/
|
|
1140
|
-
var
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
246
|
+
// src/dayjs.ts
|
|
247
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
248
|
+
var import_advancedFormat = __toESM(require("dayjs/plugin/advancedFormat.js"));
|
|
249
|
+
var import_customParseFormat = __toESM(require("dayjs/plugin/customParseFormat.js"));
|
|
250
|
+
var import_localeData = __toESM(require("dayjs/plugin/localeData.js"));
|
|
251
|
+
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear.js"));
|
|
252
|
+
var import_weekYear = __toESM(require("dayjs/plugin/weekYear.js"));
|
|
253
|
+
var import_weekday = __toESM(require("dayjs/plugin/weekday.js"));
|
|
254
|
+
var import_warning = __toESM(require_warning());
|
|
255
|
+
import_dayjs.default.extend(import_customParseFormat.default);
|
|
256
|
+
import_dayjs.default.extend(import_advancedFormat.default);
|
|
257
|
+
import_dayjs.default.extend(import_weekday.default);
|
|
258
|
+
import_dayjs.default.extend(import_localeData.default);
|
|
259
|
+
import_dayjs.default.extend(import_weekOfYear.default);
|
|
260
|
+
import_dayjs.default.extend(import_weekYear.default);
|
|
261
|
+
import_dayjs.default.extend((o, c) => {
|
|
262
|
+
const proto = c.prototype;
|
|
263
|
+
const oldFormat = proto.format;
|
|
264
|
+
proto.format = function f(formatStr) {
|
|
265
|
+
const str = (formatStr || "").replace("Wo", "wo");
|
|
266
|
+
return oldFormat.bind(this)(str);
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
var localeMap = {
|
|
270
|
+
// ar_EG:
|
|
271
|
+
// az_AZ:
|
|
272
|
+
// bg_BG:
|
|
273
|
+
bn_BD: "bn-bd",
|
|
274
|
+
by_BY: "be",
|
|
275
|
+
// ca_ES:
|
|
276
|
+
// cs_CZ:
|
|
277
|
+
// da_DK:
|
|
278
|
+
// de_DE:
|
|
279
|
+
// el_GR:
|
|
280
|
+
en_GB: "en-gb",
|
|
281
|
+
en_US: "en",
|
|
282
|
+
// es_ES:
|
|
283
|
+
// et_EE:
|
|
284
|
+
// fa_IR:
|
|
285
|
+
// fi_FI:
|
|
286
|
+
fr_BE: "fr",
|
|
287
|
+
// todo: dayjs has no fr_BE locale, use fr at present
|
|
288
|
+
fr_CA: "fr-ca",
|
|
289
|
+
// fr_FR:
|
|
290
|
+
// ga_IE:
|
|
291
|
+
// gl_ES:
|
|
292
|
+
// he_IL:
|
|
293
|
+
// hi_IN:
|
|
294
|
+
// hr_HR:
|
|
295
|
+
// hu_HU:
|
|
296
|
+
hy_AM: "hy-am",
|
|
297
|
+
// id_ID:
|
|
298
|
+
// is_IS:
|
|
299
|
+
// it_IT:
|
|
300
|
+
// ja_JP:
|
|
301
|
+
// ka_GE:
|
|
302
|
+
// kk_KZ:
|
|
303
|
+
// km_KH:
|
|
304
|
+
kmr_IQ: "ku",
|
|
305
|
+
// kn_IN:
|
|
306
|
+
// ko_KR:
|
|
307
|
+
// ku_IQ: // previous ku in antd
|
|
308
|
+
// lt_LT:
|
|
309
|
+
// lv_LV:
|
|
310
|
+
// mk_MK:
|
|
311
|
+
// ml_IN:
|
|
312
|
+
// mn_MN:
|
|
313
|
+
// ms_MY:
|
|
314
|
+
// nb_NO:
|
|
315
|
+
// ne_NP:
|
|
316
|
+
nl_BE: "nl-be",
|
|
317
|
+
// nl_NL:
|
|
318
|
+
// pl_PL:
|
|
319
|
+
pt_BR: "pt-br",
|
|
320
|
+
// pt_PT:
|
|
321
|
+
// ro_RO:
|
|
322
|
+
// ru_RU:
|
|
323
|
+
// sk_SK:
|
|
324
|
+
// sl_SI:
|
|
325
|
+
// sr_RS:
|
|
326
|
+
// sv_SE:
|
|
327
|
+
// ta_IN:
|
|
328
|
+
// th_TH:
|
|
329
|
+
// tr_TR:
|
|
330
|
+
// uk_UA:
|
|
331
|
+
// ur_PK:
|
|
332
|
+
// vi_VN:
|
|
333
|
+
zh_CN: "zh-cn",
|
|
334
|
+
zh_HK: "zh-hk",
|
|
335
|
+
zh_TW: "zh-tw"
|
|
1177
336
|
};
|
|
1178
|
-
|
|
337
|
+
var parseLocale = (locale) => {
|
|
338
|
+
const mapLocale = localeMap[locale];
|
|
339
|
+
return mapLocale || locale.split("_")[0];
|
|
340
|
+
};
|
|
341
|
+
var parseNoMatchNotice = () => {
|
|
342
|
+
(0, import_warning.noteOnce)(false, "Not match any format. Please help to fire a issue about this.");
|
|
343
|
+
};
|
|
344
|
+
var generateConfig = {
|
|
345
|
+
// get
|
|
346
|
+
getNow: () => (0, import_dayjs.default)(),
|
|
347
|
+
getFixedDate: (string) => (0, import_dayjs.default)(string, ["YYYY-M-DD", "YYYY-MM-DD"]),
|
|
348
|
+
getEndDate: (date) => date.endOf("month"),
|
|
349
|
+
getWeekDay: (date) => {
|
|
350
|
+
const clone = date.locale("en");
|
|
351
|
+
return clone.weekday() + clone.localeData().firstDayOfWeek();
|
|
352
|
+
},
|
|
353
|
+
getYear: (date) => date.year(),
|
|
354
|
+
getMonth: (date) => date.month(),
|
|
355
|
+
getDate: (date) => date.date(),
|
|
356
|
+
getHour: (date) => date.hour(),
|
|
357
|
+
getMinute: (date) => date.minute(),
|
|
358
|
+
getSecond: (date) => date.second(),
|
|
359
|
+
// set
|
|
360
|
+
addYear: (date, diff) => date.add(diff, "year"),
|
|
361
|
+
addMonth: (date, diff) => date.add(diff, "month"),
|
|
362
|
+
addDate: (date, diff) => date.add(diff, "day"),
|
|
363
|
+
setYear: (date, year) => date.year(year),
|
|
364
|
+
setMonth: (date, month) => date.month(month),
|
|
365
|
+
setDate: (date, num) => date.date(num),
|
|
366
|
+
setHour: (date, hour) => date.hour(hour),
|
|
367
|
+
setMinute: (date, minute) => date.minute(minute),
|
|
368
|
+
setSecond: (date, second) => date.second(second),
|
|
369
|
+
// Compare
|
|
370
|
+
isAfter: (date1, date2) => date1.isAfter(date2),
|
|
371
|
+
isValidate: (date) => date.isValid(),
|
|
372
|
+
locale: {
|
|
373
|
+
getWeekFirstDay: (locale) => (0, import_dayjs.default)().locale(parseLocale(locale)).localeData().firstDayOfWeek(),
|
|
374
|
+
getWeekFirstDate: (locale, date) => date.locale(parseLocale(locale)).weekday(0),
|
|
375
|
+
getWeek: (locale, date) => date.locale(parseLocale(locale)).week(),
|
|
376
|
+
getShortWeekDays: (locale) => (0, import_dayjs.default)().locale(parseLocale(locale)).localeData().weekdaysMin(),
|
|
377
|
+
getShortMonths: (locale) => (0, import_dayjs.default)().locale(parseLocale(locale)).localeData().monthsShort(),
|
|
378
|
+
format: (locale, date, format) => date.locale(parseLocale(locale)).format(format),
|
|
379
|
+
parse: (locale, text, formats) => {
|
|
380
|
+
const localeStr = parseLocale(locale);
|
|
381
|
+
for (let i = 0; i < formats.length; i += 1) {
|
|
382
|
+
const format = formats[i];
|
|
383
|
+
const formatText = text;
|
|
384
|
+
if (format.includes("wo") || format.includes("Wo")) {
|
|
385
|
+
const year = formatText.split("-")[0];
|
|
386
|
+
const weekStr = formatText.split("-")[1];
|
|
387
|
+
const firstWeek = (0, import_dayjs.default)(year, "YYYY").startOf("year").locale(localeStr);
|
|
388
|
+
for (let j = 0; j <= 52; j += 1) {
|
|
389
|
+
const nextWeek = firstWeek.add(j, "week");
|
|
390
|
+
if (nextWeek.format("Wo") === weekStr) {
|
|
391
|
+
return nextWeek;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
parseNoMatchNotice();
|
|
395
|
+
return null;
|
|
396
|
+
}
|
|
397
|
+
const date = (0, import_dayjs.default)(formatText, format, true).locale(localeStr);
|
|
398
|
+
if (date.isValid()) {
|
|
399
|
+
return date;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (text) {
|
|
403
|
+
parseNoMatchNotice();
|
|
404
|
+
}
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
var dayjs_default = generateConfig;
|
|
1179
410
|
|
|
1180
411
|
// src/AntDValueEditor.tsx
|
|
1181
|
-
var DatePicker = (0, import_generatePicker.default)(
|
|
1182
|
-
var AntDValueEditor = ({
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
412
|
+
var DatePicker = (0, import_generatePicker.default)(dayjs_default);
|
|
413
|
+
var AntDValueEditor = (allProps) => {
|
|
414
|
+
const {
|
|
415
|
+
fieldData,
|
|
416
|
+
operator,
|
|
417
|
+
value,
|
|
418
|
+
handleOnChange,
|
|
419
|
+
title,
|
|
420
|
+
className,
|
|
421
|
+
type,
|
|
422
|
+
inputType,
|
|
423
|
+
values = [],
|
|
424
|
+
listsAsArrays,
|
|
425
|
+
parseNumbers,
|
|
426
|
+
separator,
|
|
427
|
+
valueSource: _vs,
|
|
428
|
+
disabled,
|
|
429
|
+
testID,
|
|
430
|
+
selectorComponent: SelectorComponent = allProps.schema.controls.valueSelector,
|
|
431
|
+
...props
|
|
432
|
+
} = allProps;
|
|
433
|
+
const { valueAsArray, multiValueHandler } = (0, import_react_querybuilder.useValueEditor)({
|
|
1202
434
|
handleOnChange,
|
|
1203
435
|
inputType,
|
|
1204
436
|
operator,
|
|
@@ -1218,51 +450,51 @@ var AntDValueEditor = ({
|
|
|
1218
450
|
const editors = ["from", "to"].map((key, i) => {
|
|
1219
451
|
if (type === "text") {
|
|
1220
452
|
if (inputTypeCoerced === "time") {
|
|
1221
|
-
return /* @__PURE__ */
|
|
453
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1222
454
|
DatePicker.TimePicker,
|
|
1223
455
|
{
|
|
1224
456
|
key,
|
|
1225
|
-
value: valueAsArray[i] ? (0,
|
|
1226
|
-
className:
|
|
457
|
+
value: valueAsArray[i] ? (0, import_dayjs2.default)(valueAsArray[i], "HH:mm:ss") : null,
|
|
458
|
+
className: import_react_querybuilder.standardClassnames.valueListItem,
|
|
1227
459
|
disabled,
|
|
1228
460
|
placeholder: placeHolderText,
|
|
1229
461
|
onChange: (d) => multiValueHandler(d?.format("HH:mm:ss") ?? "", i)
|
|
1230
462
|
}
|
|
1231
463
|
);
|
|
1232
464
|
}
|
|
1233
|
-
return /* @__PURE__ */
|
|
1234
|
-
|
|
465
|
+
return /* @__PURE__ */ React5.createElement(
|
|
466
|
+
import_antd4.Input,
|
|
1235
467
|
{
|
|
1236
468
|
key,
|
|
1237
469
|
type: inputTypeCoerced,
|
|
1238
470
|
value: valueAsArray[i] ?? "",
|
|
1239
|
-
className:
|
|
471
|
+
className: import_react_querybuilder.standardClassnames.valueListItem,
|
|
1240
472
|
disabled,
|
|
1241
473
|
placeholder: placeHolderText,
|
|
1242
474
|
onChange: (e) => multiValueHandler(e.target.value, i)
|
|
1243
475
|
}
|
|
1244
476
|
);
|
|
1245
477
|
}
|
|
1246
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1247
479
|
SelectorComponent,
|
|
1248
480
|
{
|
|
1249
481
|
...props,
|
|
1250
482
|
key,
|
|
1251
|
-
className:
|
|
483
|
+
className: import_react_querybuilder.standardClassnames.valueListItem,
|
|
1252
484
|
handleOnChange: (v) => multiValueHandler(v, i),
|
|
1253
485
|
disabled,
|
|
1254
|
-
value: valueAsArray[i] ?? (0,
|
|
486
|
+
value: valueAsArray[i] ?? (0, import_react_querybuilder.getFirstOption)(values),
|
|
1255
487
|
options: values,
|
|
1256
488
|
listsAsArrays
|
|
1257
489
|
}
|
|
1258
490
|
);
|
|
1259
491
|
});
|
|
1260
|
-
return /* @__PURE__ */
|
|
492
|
+
return /* @__PURE__ */ React5.createElement("span", { "data-testid": testID, className, title }, editors[0], separator, editors[1]);
|
|
1261
493
|
}
|
|
1262
494
|
switch (type) {
|
|
1263
495
|
case "select":
|
|
1264
496
|
case "multiselect":
|
|
1265
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1266
498
|
SelectorComponent,
|
|
1267
499
|
{
|
|
1268
500
|
...props,
|
|
@@ -1277,8 +509,8 @@ var AntDValueEditor = ({
|
|
|
1277
509
|
}
|
|
1278
510
|
);
|
|
1279
511
|
case "textarea":
|
|
1280
|
-
return /* @__PURE__ */
|
|
1281
|
-
|
|
512
|
+
return /* @__PURE__ */ React5.createElement(
|
|
513
|
+
import_antd4.Input.TextArea,
|
|
1282
514
|
{
|
|
1283
515
|
value,
|
|
1284
516
|
title,
|
|
@@ -1289,8 +521,8 @@ var AntDValueEditor = ({
|
|
|
1289
521
|
}
|
|
1290
522
|
);
|
|
1291
523
|
case "switch":
|
|
1292
|
-
return /* @__PURE__ */
|
|
1293
|
-
|
|
524
|
+
return /* @__PURE__ */ React5.createElement(
|
|
525
|
+
import_antd4.Switch,
|
|
1294
526
|
{
|
|
1295
527
|
checked: !!value,
|
|
1296
528
|
title,
|
|
@@ -1300,8 +532,8 @@ var AntDValueEditor = ({
|
|
|
1300
532
|
}
|
|
1301
533
|
);
|
|
1302
534
|
case "checkbox":
|
|
1303
|
-
return /* @__PURE__ */
|
|
1304
|
-
|
|
535
|
+
return /* @__PURE__ */ React5.createElement("span", { title, className }, /* @__PURE__ */ React5.createElement(
|
|
536
|
+
import_antd4.Checkbox,
|
|
1305
537
|
{
|
|
1306
538
|
type: "checkbox",
|
|
1307
539
|
disabled,
|
|
@@ -1310,8 +542,8 @@ var AntDValueEditor = ({
|
|
|
1310
542
|
}
|
|
1311
543
|
));
|
|
1312
544
|
case "radio":
|
|
1313
|
-
return /* @__PURE__ */
|
|
1314
|
-
|
|
545
|
+
return /* @__PURE__ */ React5.createElement("span", { className, title }, values.map((v) => /* @__PURE__ */ React5.createElement(
|
|
546
|
+
import_antd4.Radio,
|
|
1315
547
|
{
|
|
1316
548
|
key: v.name,
|
|
1317
549
|
value: v.name,
|
|
@@ -1326,8 +558,8 @@ var AntDValueEditor = ({
|
|
|
1326
558
|
case "date":
|
|
1327
559
|
case "datetime-local": {
|
|
1328
560
|
if (operator === "between" || operator === "notBetween") {
|
|
1329
|
-
const dayjsArray = valueAsArray.slice(0, 2).map(
|
|
1330
|
-
return /* @__PURE__ */
|
|
561
|
+
const dayjsArray = valueAsArray.slice(0, 2).map(import_dayjs2.default);
|
|
562
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1331
563
|
DatePicker.RangePicker,
|
|
1332
564
|
{
|
|
1333
565
|
value: dayjsArray.every((d) => d.isValid()) ? dayjsArray : void 0,
|
|
@@ -1342,15 +574,15 @@ var AntDValueEditor = ({
|
|
|
1342
574
|
const format = `YYYY-MM-DD${timeFormat}`;
|
|
1343
575
|
const dateArray = dates?.map((d) => d?.isValid() ? d.format(format) : void 0);
|
|
1344
576
|
handleOnChange(
|
|
1345
|
-
dateArray ? listsAsArrays ? dateArray : (0,
|
|
577
|
+
dateArray ? listsAsArrays ? dateArray : (0, import_react_querybuilder.joinWith)(dateArray, ",") : dates
|
|
1346
578
|
);
|
|
1347
579
|
}
|
|
1348
580
|
)
|
|
1349
581
|
}
|
|
1350
582
|
);
|
|
1351
583
|
}
|
|
1352
|
-
const dateValue = (0,
|
|
1353
|
-
return /* @__PURE__ */
|
|
584
|
+
const dateValue = (0, import_dayjs2.default)(value);
|
|
585
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1354
586
|
DatePicker,
|
|
1355
587
|
{
|
|
1356
588
|
value: dateValue.isValid() ? dateValue : void 0,
|
|
@@ -1363,8 +595,8 @@ var AntDValueEditor = ({
|
|
|
1363
595
|
);
|
|
1364
596
|
}
|
|
1365
597
|
case "time": {
|
|
1366
|
-
const dateValue = (0,
|
|
1367
|
-
return /* @__PURE__ */
|
|
598
|
+
const dateValue = (0, import_dayjs2.default)(value, "HH:mm:ss");
|
|
599
|
+
return /* @__PURE__ */ React5.createElement(
|
|
1368
600
|
DatePicker.TimePicker,
|
|
1369
601
|
{
|
|
1370
602
|
value: dateValue.isValid() ? dateValue : void 0,
|
|
@@ -1376,8 +608,8 @@ var AntDValueEditor = ({
|
|
|
1376
608
|
);
|
|
1377
609
|
}
|
|
1378
610
|
}
|
|
1379
|
-
return /* @__PURE__ */
|
|
1380
|
-
|
|
611
|
+
return /* @__PURE__ */ React5.createElement(
|
|
612
|
+
import_antd4.Input,
|
|
1381
613
|
{
|
|
1382
614
|
type: inputTypeCoerced,
|
|
1383
615
|
value,
|
|
@@ -1391,24 +623,70 @@ var AntDValueEditor = ({
|
|
|
1391
623
|
};
|
|
1392
624
|
AntDValueEditor.displayName = "AntDValueEditor";
|
|
1393
625
|
|
|
626
|
+
// src/AntDValueSelector.tsx
|
|
627
|
+
var import_antd6 = require("antd");
|
|
628
|
+
var React7 = __toESM(require("react"));
|
|
629
|
+
var import_react_querybuilder3 = require("react-querybuilder");
|
|
630
|
+
|
|
631
|
+
// src/utils.tsx
|
|
632
|
+
var import_antd5 = require("antd");
|
|
633
|
+
var React6 = __toESM(require("react"));
|
|
634
|
+
var import_react_querybuilder2 = require("react-querybuilder");
|
|
635
|
+
var { OptGroup, Option } = import_antd5.Select;
|
|
636
|
+
var toOptions = (arr) => (0, import_react_querybuilder2.isOptionGroupArray)(arr) ? arr.map((og) => /* @__PURE__ */ React6.createElement(OptGroup, { key: og.label, label: og.label }, og.options.map((opt) => /* @__PURE__ */ React6.createElement(Option, { key: opt.name, value: opt.name }, opt.label)))) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ React6.createElement(Option, { key: opt.name, value: opt.name }, opt.label)) : (
|
|
637
|
+
/* istanbul ignore next */
|
|
638
|
+
null
|
|
639
|
+
);
|
|
640
|
+
|
|
641
|
+
// src/AntDValueSelector.tsx
|
|
642
|
+
var AntDValueSelector = ({
|
|
643
|
+
className,
|
|
644
|
+
handleOnChange,
|
|
645
|
+
options,
|
|
646
|
+
value,
|
|
647
|
+
title,
|
|
648
|
+
disabled,
|
|
649
|
+
multiple,
|
|
650
|
+
listsAsArrays,
|
|
651
|
+
// Props that should not be in extraProps
|
|
652
|
+
testID: _testID,
|
|
653
|
+
rule: _rule,
|
|
654
|
+
rules: _rules,
|
|
655
|
+
level: _level,
|
|
656
|
+
path: _path,
|
|
657
|
+
context: _context,
|
|
658
|
+
validation: _validation,
|
|
659
|
+
operator: _operator,
|
|
660
|
+
field: _field,
|
|
661
|
+
fieldData: _fieldData,
|
|
662
|
+
schema: _schema,
|
|
663
|
+
...extraProps
|
|
664
|
+
}) => {
|
|
665
|
+
const { onChange, val } = (0, import_react_querybuilder3.useValueSelector)({ handleOnChange, listsAsArrays, multiple, value });
|
|
666
|
+
const modeObj = multiple ? { mode: "multiple" } : {};
|
|
667
|
+
return /* @__PURE__ */ React7.createElement("span", { title, className }, /* @__PURE__ */ React7.createElement(
|
|
668
|
+
import_antd6.Select,
|
|
669
|
+
{
|
|
670
|
+
...modeObj,
|
|
671
|
+
popupMatchSelectWidth: false,
|
|
672
|
+
disabled,
|
|
673
|
+
value: val,
|
|
674
|
+
onChange,
|
|
675
|
+
...extraProps
|
|
676
|
+
},
|
|
677
|
+
toOptions(options)
|
|
678
|
+
));
|
|
679
|
+
};
|
|
680
|
+
AntDValueSelector.displayName = "AntDValueSelector";
|
|
681
|
+
|
|
1394
682
|
// src/index.tsx
|
|
1395
683
|
var antdControlElements = {
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
cloneGroupAction: AntDActionElement,
|
|
1399
|
-
cloneRuleAction: AntDActionElement,
|
|
1400
|
-
lockGroupAction: AntDActionElement,
|
|
1401
|
-
lockRuleAction: AntDActionElement,
|
|
1402
|
-
combinatorSelector: AntDValueSelector,
|
|
1403
|
-
fieldSelector: AntDValueSelector,
|
|
684
|
+
actionElement: AntDActionElement,
|
|
685
|
+
dragHandle: AntDDragHandle,
|
|
1404
686
|
notToggle: AntDNotToggle,
|
|
1405
|
-
|
|
1406
|
-
removeGroupAction: AntDActionElement,
|
|
1407
|
-
removeRuleAction: AntDActionElement,
|
|
687
|
+
shiftActions: AntDShiftActions,
|
|
1408
688
|
valueEditor: AntDValueEditor,
|
|
1409
|
-
|
|
1410
|
-
valueSourceSelector: AntDValueSelector,
|
|
1411
|
-
shiftActions: AntDShiftActions
|
|
689
|
+
valueSelector: AntDValueSelector
|
|
1412
690
|
};
|
|
1413
691
|
var antdTranslations = {
|
|
1414
692
|
removeGroup: { label: /* @__PURE__ */ React8.createElement(import_icons2.CloseOutlined, null) },
|