@react-querybuilder/antd 4.2.3 → 4.3.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.
- package/README.md +3 -3
- package/dist/index.cjs.js +14 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +360 -226
- package/dist/index.es.js.map +1 -1
- package/dist/types/AntDActionElement.d.ts +6 -3
- package/dist/types/AntDDragHandle.d.ts +5 -2
- package/dist/types/AntDNotToggle.d.ts +5 -2
- package/dist/types/AntDValueEditor.d.ts +1 -1
- package/dist/types/AntDValueSelector.d.ts +6 -3
- package/package.json +7 -5
package/dist/index.es.js
CHANGED
|
@@ -29,49 +29,139 @@ var __objRest = (source, exclude) => {
|
|
|
29
29
|
}
|
|
30
30
|
return target;
|
|
31
31
|
};
|
|
32
|
-
import React, { forwardRef, useMemo, useEffect } from "react";
|
|
33
32
|
import { Button, Switch, Select, Radio, Checkbox, Input, TimePicker, DatePicker } from "antd";
|
|
33
|
+
import require$$0, { forwardRef, useMemo, useEffect } from "react";
|
|
34
34
|
import { HolderOutlined } from "@ant-design/icons";
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
35
|
+
var jsxRuntime = { exports: {} };
|
|
36
|
+
var reactJsxRuntime_production_min = {};
|
|
37
|
+
/**
|
|
38
|
+
* @license React
|
|
39
|
+
* react-jsx-runtime.production.min.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
var f = require$$0, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
|
|
47
|
+
function q(c, a, g) {
|
|
48
|
+
var b, d = {}, e = null, h = null;
|
|
49
|
+
g !== void 0 && (e = "" + g);
|
|
50
|
+
a.key !== void 0 && (e = "" + a.key);
|
|
51
|
+
a.ref !== void 0 && (h = a.ref);
|
|
52
|
+
for (b in a)
|
|
53
|
+
m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
|
|
54
|
+
if (c && c.defaultProps)
|
|
55
|
+
for (b in a = c.defaultProps, a)
|
|
56
|
+
d[b] === void 0 && (d[b] = a[b]);
|
|
57
|
+
return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
|
|
58
|
+
}
|
|
59
|
+
reactJsxRuntime_production_min.Fragment = l;
|
|
60
|
+
reactJsxRuntime_production_min.jsx = q;
|
|
61
|
+
reactJsxRuntime_production_min.jsxs = q;
|
|
62
|
+
{
|
|
63
|
+
jsxRuntime.exports = reactJsxRuntime_production_min;
|
|
64
|
+
}
|
|
65
|
+
const jsx = jsxRuntime.exports.jsx;
|
|
66
|
+
const AntDActionElement = (_a) => {
|
|
67
|
+
var _b = _a, {
|
|
68
|
+
className,
|
|
69
|
+
handleOnClick,
|
|
70
|
+
label,
|
|
71
|
+
title,
|
|
72
|
+
disabled,
|
|
73
|
+
disabledTranslation,
|
|
74
|
+
testID: _testID,
|
|
75
|
+
rules: _rules,
|
|
76
|
+
level: _level,
|
|
77
|
+
path: _path,
|
|
78
|
+
context: _context,
|
|
79
|
+
validation: _validation
|
|
80
|
+
} = _b, extraProps = __objRest(_b, [
|
|
81
|
+
"className",
|
|
82
|
+
"handleOnClick",
|
|
83
|
+
"label",
|
|
84
|
+
"title",
|
|
85
|
+
"disabled",
|
|
86
|
+
"disabledTranslation",
|
|
87
|
+
"testID",
|
|
88
|
+
"rules",
|
|
89
|
+
"level",
|
|
90
|
+
"path",
|
|
91
|
+
"context",
|
|
92
|
+
"validation"
|
|
93
|
+
]);
|
|
94
|
+
return /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({
|
|
95
|
+
type: "primary",
|
|
96
|
+
className,
|
|
97
|
+
title: disabledTranslation && disabled ? disabledTranslation.title : title,
|
|
98
|
+
onClick: (e) => handleOnClick(e),
|
|
99
|
+
disabled: disabled && !disabledTranslation
|
|
100
|
+
}, extraProps), {
|
|
101
|
+
children: disabledTranslation && disabled ? disabledTranslation.label : label
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
49
104
|
AntDActionElement.displayName = "AntDActionElement";
|
|
50
|
-
const AntDDragHandle = forwardRef((
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
105
|
+
const AntDDragHandle = forwardRef((_c, dragRef) => {
|
|
106
|
+
var _d = _c, {
|
|
107
|
+
className,
|
|
108
|
+
title,
|
|
109
|
+
testID: _testID,
|
|
110
|
+
ref: _ref,
|
|
111
|
+
level: _level,
|
|
112
|
+
path: _path,
|
|
113
|
+
label: _label,
|
|
114
|
+
disabled: _disabled,
|
|
115
|
+
context: _context,
|
|
116
|
+
validation: _validation
|
|
117
|
+
} = _d, extraProps = __objRest(_d, [
|
|
118
|
+
"className",
|
|
119
|
+
"title",
|
|
120
|
+
"testID",
|
|
121
|
+
"ref",
|
|
122
|
+
"level",
|
|
123
|
+
"path",
|
|
124
|
+
"label",
|
|
125
|
+
"disabled",
|
|
126
|
+
"context",
|
|
127
|
+
"validation"
|
|
128
|
+
]);
|
|
129
|
+
return /* @__PURE__ */ jsx(HolderOutlined, __spreadValues({
|
|
130
|
+
ref: dragRef,
|
|
131
|
+
className,
|
|
132
|
+
title
|
|
133
|
+
}, extraProps));
|
|
71
134
|
});
|
|
135
|
+
AntDDragHandle.displayName = "AntDDragHandle";
|
|
136
|
+
const AntDNotToggle = (_e) => {
|
|
137
|
+
var _f = _e, {
|
|
138
|
+
className,
|
|
139
|
+
handleOnChange,
|
|
140
|
+
label,
|
|
141
|
+
checked,
|
|
142
|
+
title,
|
|
143
|
+
disabled
|
|
144
|
+
} = _f, extraProps = __objRest(_f, [
|
|
145
|
+
"className",
|
|
146
|
+
"handleOnChange",
|
|
147
|
+
"label",
|
|
148
|
+
"checked",
|
|
149
|
+
"title",
|
|
150
|
+
"disabled"
|
|
151
|
+
]);
|
|
152
|
+
return /* @__PURE__ */ jsx(Switch, __spreadValues({
|
|
153
|
+
title,
|
|
154
|
+
className,
|
|
155
|
+
onChange: (v) => handleOnChange(v),
|
|
156
|
+
checked: !!checked,
|
|
157
|
+
disabled,
|
|
158
|
+
checkedChildren: label,
|
|
159
|
+
unCheckedChildren: "="
|
|
160
|
+
}, extraProps));
|
|
161
|
+
};
|
|
72
162
|
AntDNotToggle.displayName = "AntDNotToggle";
|
|
73
163
|
//! moment.js
|
|
74
|
-
//! version : 2.29.
|
|
164
|
+
//! version : 2.29.3
|
|
75
165
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
76
166
|
//! license : MIT
|
|
77
167
|
//! momentjs.com
|
|
@@ -95,9 +185,9 @@ function isObjectEmpty(obj) {
|
|
|
95
185
|
if (Object.getOwnPropertyNames) {
|
|
96
186
|
return Object.getOwnPropertyNames(obj).length === 0;
|
|
97
187
|
} else {
|
|
98
|
-
var
|
|
99
|
-
for (
|
|
100
|
-
if (hasOwnProp(obj,
|
|
188
|
+
var k2;
|
|
189
|
+
for (k2 in obj) {
|
|
190
|
+
if (hasOwnProp(obj, k2)) {
|
|
101
191
|
return false;
|
|
102
192
|
}
|
|
103
193
|
}
|
|
@@ -114,8 +204,8 @@ function isDate(input) {
|
|
|
114
204
|
return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
|
|
115
205
|
}
|
|
116
206
|
function map(arr, fn) {
|
|
117
|
-
var res = [], i;
|
|
118
|
-
for (i = 0; i <
|
|
207
|
+
var res = [], i, arrLen = arr.length;
|
|
208
|
+
for (i = 0; i < arrLen; ++i) {
|
|
119
209
|
res.push(fn(arr[i], i));
|
|
120
210
|
}
|
|
121
211
|
return res;
|
|
@@ -157,11 +247,11 @@ function defaultParsingFlags() {
|
|
|
157
247
|
weekdayMismatch: false
|
|
158
248
|
};
|
|
159
249
|
}
|
|
160
|
-
function getParsingFlags(
|
|
161
|
-
if (
|
|
162
|
-
|
|
250
|
+
function getParsingFlags(m2) {
|
|
251
|
+
if (m2._pf == null) {
|
|
252
|
+
m2._pf = defaultParsingFlags();
|
|
163
253
|
}
|
|
164
|
-
return
|
|
254
|
+
return m2._pf;
|
|
165
255
|
}
|
|
166
256
|
var some;
|
|
167
257
|
if (Array.prototype.some) {
|
|
@@ -177,34 +267,34 @@ if (Array.prototype.some) {
|
|
|
177
267
|
return false;
|
|
178
268
|
};
|
|
179
269
|
}
|
|
180
|
-
function isValid(
|
|
181
|
-
if (
|
|
182
|
-
var flags = getParsingFlags(
|
|
270
|
+
function isValid(m2) {
|
|
271
|
+
if (m2._isValid == null) {
|
|
272
|
+
var flags = getParsingFlags(m2), parsedParts = some.call(flags.parsedDateParts, function(i) {
|
|
183
273
|
return i != null;
|
|
184
|
-
}), isNowValid = !isNaN(
|
|
185
|
-
if (
|
|
274
|
+
}), isNowValid = !isNaN(m2._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
|
|
275
|
+
if (m2._strict) {
|
|
186
276
|
isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0;
|
|
187
277
|
}
|
|
188
|
-
if (Object.isFrozen == null || !Object.isFrozen(
|
|
189
|
-
|
|
278
|
+
if (Object.isFrozen == null || !Object.isFrozen(m2)) {
|
|
279
|
+
m2._isValid = isNowValid;
|
|
190
280
|
} else {
|
|
191
281
|
return isNowValid;
|
|
192
282
|
}
|
|
193
283
|
}
|
|
194
|
-
return
|
|
284
|
+
return m2._isValid;
|
|
195
285
|
}
|
|
196
286
|
function createInvalid(flags) {
|
|
197
|
-
var
|
|
287
|
+
var m2 = createUTC(NaN);
|
|
198
288
|
if (flags != null) {
|
|
199
|
-
extend(getParsingFlags(
|
|
289
|
+
extend(getParsingFlags(m2), flags);
|
|
200
290
|
} else {
|
|
201
|
-
getParsingFlags(
|
|
291
|
+
getParsingFlags(m2).userInvalidated = true;
|
|
202
292
|
}
|
|
203
|
-
return
|
|
293
|
+
return m2;
|
|
204
294
|
}
|
|
205
295
|
var momentProperties = hooks.momentProperties = [], updateInProgress = false;
|
|
206
296
|
function copyConfig(to2, from2) {
|
|
207
|
-
var i, prop, val;
|
|
297
|
+
var i, prop, val, momentPropertiesLen = momentProperties.length;
|
|
208
298
|
if (!isUndefined(from2._isAMomentObject)) {
|
|
209
299
|
to2._isAMomentObject = from2._isAMomentObject;
|
|
210
300
|
}
|
|
@@ -235,8 +325,8 @@ function copyConfig(to2, from2) {
|
|
|
235
325
|
if (!isUndefined(from2._locale)) {
|
|
236
326
|
to2._locale = from2._locale;
|
|
237
327
|
}
|
|
238
|
-
if (
|
|
239
|
-
for (i = 0; i <
|
|
328
|
+
if (momentPropertiesLen > 0) {
|
|
329
|
+
for (i = 0; i < momentPropertiesLen; i++) {
|
|
240
330
|
prop = momentProperties[i];
|
|
241
331
|
val = from2[prop];
|
|
242
332
|
if (!isUndefined(val)) {
|
|
@@ -273,8 +363,8 @@ function deprecate(msg, fn) {
|
|
|
273
363
|
hooks.deprecationHandler(null, msg);
|
|
274
364
|
}
|
|
275
365
|
if (firstTime) {
|
|
276
|
-
var args = [], arg, i, key;
|
|
277
|
-
for (i = 0; i <
|
|
366
|
+
var args = [], arg, i, key, argLen = arguments.length;
|
|
367
|
+
for (i = 0; i < argLen; i++) {
|
|
278
368
|
arg = "";
|
|
279
369
|
if (typeof arguments[i] === "object") {
|
|
280
370
|
arg += "\n[" + i + "] ";
|
|
@@ -427,13 +517,13 @@ function makeFormatFunction(format2) {
|
|
|
427
517
|
return output;
|
|
428
518
|
};
|
|
429
519
|
}
|
|
430
|
-
function formatMoment(
|
|
431
|
-
if (!
|
|
432
|
-
return
|
|
520
|
+
function formatMoment(m2, format2) {
|
|
521
|
+
if (!m2.isValid()) {
|
|
522
|
+
return m2.localeData().invalidDate();
|
|
433
523
|
}
|
|
434
|
-
format2 = expandFormat(format2,
|
|
524
|
+
format2 = expandFormat(format2, m2.localeData());
|
|
435
525
|
formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2);
|
|
436
|
-
return formatFunctions[format2](
|
|
526
|
+
return formatFunctions[format2](m2);
|
|
437
527
|
}
|
|
438
528
|
function expandFormat(format2, locale2) {
|
|
439
529
|
var i = 5;
|
|
@@ -590,8 +680,8 @@ function stringGet(units) {
|
|
|
590
680
|
function stringSet(units, value) {
|
|
591
681
|
if (typeof units === "object") {
|
|
592
682
|
units = normalizeObjectUnits(units);
|
|
593
|
-
var prioritized = getPrioritizedUnits(units), i;
|
|
594
|
-
for (i = 0; i <
|
|
683
|
+
var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
|
|
684
|
+
for (i = 0; i < prioritizedLen; i++) {
|
|
595
685
|
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
596
686
|
}
|
|
597
687
|
} else {
|
|
@@ -625,7 +715,7 @@ function regexEscape(s) {
|
|
|
625
715
|
}
|
|
626
716
|
var tokens = {};
|
|
627
717
|
function addParseToken(token2, callback) {
|
|
628
|
-
var i, func = callback;
|
|
718
|
+
var i, func = callback, tokenLen;
|
|
629
719
|
if (typeof token2 === "string") {
|
|
630
720
|
token2 = [token2];
|
|
631
721
|
}
|
|
@@ -634,7 +724,8 @@ function addParseToken(token2, callback) {
|
|
|
634
724
|
array[callback] = toInt(input);
|
|
635
725
|
};
|
|
636
726
|
}
|
|
637
|
-
|
|
727
|
+
tokenLen = token2.length;
|
|
728
|
+
for (i = 0; i < tokenLen; i++) {
|
|
638
729
|
tokens[token2[i]] = func;
|
|
639
730
|
}
|
|
640
731
|
}
|
|
@@ -650,8 +741,8 @@ function addTimeToArrayFromToken(token2, input, config) {
|
|
|
650
741
|
}
|
|
651
742
|
}
|
|
652
743
|
var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8;
|
|
653
|
-
function mod(
|
|
654
|
-
return (
|
|
744
|
+
function mod(n2, x) {
|
|
745
|
+
return (n2 % x + x) % x;
|
|
655
746
|
}
|
|
656
747
|
var indexOf;
|
|
657
748
|
if (Array.prototype.indexOf) {
|
|
@@ -706,17 +797,17 @@ addParseToken(["MMM", "MMMM"], function(input, array, config, token2) {
|
|
|
706
797
|
}
|
|
707
798
|
});
|
|
708
799
|
var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
|
|
709
|
-
function localeMonths(
|
|
710
|
-
if (!
|
|
800
|
+
function localeMonths(m2, format2) {
|
|
801
|
+
if (!m2) {
|
|
711
802
|
return isArray(this._months) ? this._months : this._months["standalone"];
|
|
712
803
|
}
|
|
713
|
-
return isArray(this._months) ? this._months[
|
|
804
|
+
return isArray(this._months) ? this._months[m2.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m2.month()];
|
|
714
805
|
}
|
|
715
|
-
function localeMonthsShort(
|
|
716
|
-
if (!
|
|
806
|
+
function localeMonthsShort(m2, format2) {
|
|
807
|
+
if (!m2) {
|
|
717
808
|
return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"];
|
|
718
809
|
}
|
|
719
|
-
return isArray(this._monthsShort) ? this._monthsShort[
|
|
810
|
+
return isArray(this._monthsShort) ? this._monthsShort[m2.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m2.month()];
|
|
720
811
|
}
|
|
721
812
|
function handleStrictParse(monthName, format2, strict) {
|
|
722
813
|
var i, ii, mom, llc = monthName.toLocaleLowerCase();
|
|
@@ -914,15 +1005,15 @@ var getSetYear = makeGetSet("FullYear", true);
|
|
|
914
1005
|
function getIsLeapYear() {
|
|
915
1006
|
return isLeapYear(this.year());
|
|
916
1007
|
}
|
|
917
|
-
function createDate(y,
|
|
1008
|
+
function createDate(y, m2, d, h, M, s, ms) {
|
|
918
1009
|
var date;
|
|
919
1010
|
if (y < 100 && y >= 0) {
|
|
920
|
-
date = new Date(y + 400,
|
|
1011
|
+
date = new Date(y + 400, m2, d, h, M, s, ms);
|
|
921
1012
|
if (isFinite(date.getFullYear())) {
|
|
922
1013
|
date.setFullYear(y);
|
|
923
1014
|
}
|
|
924
1015
|
} else {
|
|
925
|
-
date = new Date(y,
|
|
1016
|
+
date = new Date(y, m2, d, h, M, s, ms);
|
|
926
1017
|
}
|
|
927
1018
|
return date;
|
|
928
1019
|
}
|
|
@@ -1076,19 +1167,19 @@ function parseIsoWeekday(input, locale2) {
|
|
|
1076
1167
|
}
|
|
1077
1168
|
return isNaN(input) ? null : input;
|
|
1078
1169
|
}
|
|
1079
|
-
function shiftWeekdays(ws,
|
|
1080
|
-
return ws.slice(
|
|
1170
|
+
function shiftWeekdays(ws, n2) {
|
|
1171
|
+
return ws.slice(n2, 7).concat(ws.slice(0, n2));
|
|
1081
1172
|
}
|
|
1082
1173
|
var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
|
|
1083
|
-
function localeWeekdays(
|
|
1084
|
-
var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[
|
|
1085
|
-
return
|
|
1174
|
+
function localeWeekdays(m2, format2) {
|
|
1175
|
+
var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m2 && m2 !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"];
|
|
1176
|
+
return m2 === true ? shiftWeekdays(weekdays, this._week.dow) : m2 ? weekdays[m2.day()] : weekdays;
|
|
1086
1177
|
}
|
|
1087
|
-
function localeWeekdaysShort(
|
|
1088
|
-
return
|
|
1178
|
+
function localeWeekdaysShort(m2) {
|
|
1179
|
+
return m2 === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m2 ? this._weekdaysShort[m2.day()] : this._weekdaysShort;
|
|
1089
1180
|
}
|
|
1090
|
-
function localeWeekdaysMin(
|
|
1091
|
-
return
|
|
1181
|
+
function localeWeekdaysMin(m2) {
|
|
1182
|
+
return m2 === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m2 ? this._weekdaysMin[m2.day()] : this._weekdaysMin;
|
|
1092
1183
|
}
|
|
1093
1184
|
function handleStrictParse$1(weekdayName, format2, strict) {
|
|
1094
1185
|
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
|
|
@@ -1435,9 +1526,12 @@ function chooseLocale(names) {
|
|
|
1435
1526
|
}
|
|
1436
1527
|
return globalLocale;
|
|
1437
1528
|
}
|
|
1529
|
+
function isLocaleNameSane(name) {
|
|
1530
|
+
return name.match("^[^/\\\\]*$") != null;
|
|
1531
|
+
}
|
|
1438
1532
|
function loadLocale(name) {
|
|
1439
1533
|
var oldLocale = null, aliasedRequire;
|
|
1440
|
-
if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports) {
|
|
1534
|
+
if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports && isLocaleNameSane(name)) {
|
|
1441
1535
|
try {
|
|
1442
1536
|
oldLocale = globalLocale._abbr;
|
|
1443
1537
|
aliasedRequire = require;
|
|
@@ -1559,22 +1653,22 @@ function getLocale(key) {
|
|
|
1559
1653
|
function listLocales() {
|
|
1560
1654
|
return keys(locales);
|
|
1561
1655
|
}
|
|
1562
|
-
function checkOverflow(
|
|
1563
|
-
var overflow, a =
|
|
1564
|
-
if (a && getParsingFlags(
|
|
1656
|
+
function checkOverflow(m2) {
|
|
1657
|
+
var overflow, a = m2._a;
|
|
1658
|
+
if (a && getParsingFlags(m2).overflow === -2) {
|
|
1565
1659
|
overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
|
|
1566
|
-
if (getParsingFlags(
|
|
1660
|
+
if (getParsingFlags(m2)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
|
|
1567
1661
|
overflow = DATE;
|
|
1568
1662
|
}
|
|
1569
|
-
if (getParsingFlags(
|
|
1663
|
+
if (getParsingFlags(m2)._overflowWeeks && overflow === -1) {
|
|
1570
1664
|
overflow = WEEK;
|
|
1571
1665
|
}
|
|
1572
|
-
if (getParsingFlags(
|
|
1666
|
+
if (getParsingFlags(m2)._overflowWeekday && overflow === -1) {
|
|
1573
1667
|
overflow = WEEKDAY;
|
|
1574
1668
|
}
|
|
1575
|
-
getParsingFlags(
|
|
1669
|
+
getParsingFlags(m2).overflow = overflow;
|
|
1576
1670
|
}
|
|
1577
|
-
return
|
|
1671
|
+
return m2;
|
|
1578
1672
|
}
|
|
1579
1673
|
var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [
|
|
1580
1674
|
["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
|
|
@@ -1613,10 +1707,10 @@ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\
|
|
|
1613
1707
|
PST: -8 * 60
|
|
1614
1708
|
};
|
|
1615
1709
|
function configFromISO(config) {
|
|
1616
|
-
var i,
|
|
1710
|
+
var i, l2, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
|
|
1617
1711
|
if (match) {
|
|
1618
1712
|
getParsingFlags(config).iso = true;
|
|
1619
|
-
for (i = 0,
|
|
1713
|
+
for (i = 0, l2 = isoDatesLen; i < l2; i++) {
|
|
1620
1714
|
if (isoDates[i][1].exec(match[1])) {
|
|
1621
1715
|
dateFormat = isoDates[i][0];
|
|
1622
1716
|
allowTime = isoDates[i][2] !== false;
|
|
@@ -1628,7 +1722,7 @@ function configFromISO(config) {
|
|
|
1628
1722
|
return;
|
|
1629
1723
|
}
|
|
1630
1724
|
if (match[3]) {
|
|
1631
|
-
for (i = 0,
|
|
1725
|
+
for (i = 0, l2 = isoTimesLen; i < l2; i++) {
|
|
1632
1726
|
if (isoTimes[i][1].exec(match[3])) {
|
|
1633
1727
|
timeFormat = (match[2] || " ") + isoTimes[i][0];
|
|
1634
1728
|
break;
|
|
@@ -1699,8 +1793,8 @@ function calculateOffset(obsOffset, militaryOffset, numOffset) {
|
|
|
1699
1793
|
} else if (militaryOffset) {
|
|
1700
1794
|
return 0;
|
|
1701
1795
|
} else {
|
|
1702
|
-
var hm = parseInt(numOffset, 10),
|
|
1703
|
-
return h * 60 +
|
|
1796
|
+
var hm = parseInt(numOffset, 10), m2 = hm % 100, h = (hm - m2) / 100;
|
|
1797
|
+
return h * 60 + m2;
|
|
1704
1798
|
}
|
|
1705
1799
|
}
|
|
1706
1800
|
function configFromRFC2822(config) {
|
|
@@ -1863,9 +1957,10 @@ function configFromStringAndFormat(config) {
|
|
|
1863
1957
|
}
|
|
1864
1958
|
config._a = [];
|
|
1865
1959
|
getParsingFlags(config).empty = true;
|
|
1866
|
-
var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era;
|
|
1960
|
+
var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen;
|
|
1867
1961
|
tokens2 = expandFormat(config._f, config._locale).match(formattingTokens) || [];
|
|
1868
|
-
|
|
1962
|
+
tokenLen = tokens2.length;
|
|
1963
|
+
for (i = 0; i < tokenLen; i++) {
|
|
1869
1964
|
token2 = tokens2[i];
|
|
1870
1965
|
parsedInput = (string.match(getParseRegexForToken(token2, config)) || [])[0];
|
|
1871
1966
|
if (parsedInput) {
|
|
@@ -1925,13 +2020,13 @@ function meridiemFixWrap(locale2, hour, meridiem2) {
|
|
|
1925
2020
|
}
|
|
1926
2021
|
}
|
|
1927
2022
|
function configFromStringAndArray(config) {
|
|
1928
|
-
var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false;
|
|
1929
|
-
if (
|
|
2023
|
+
var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length;
|
|
2024
|
+
if (configfLen === 0) {
|
|
1930
2025
|
getParsingFlags(config).invalidFormat = true;
|
|
1931
2026
|
config._d = new Date(NaN);
|
|
1932
2027
|
return;
|
|
1933
2028
|
}
|
|
1934
|
-
for (i = 0; i <
|
|
2029
|
+
for (i = 0; i < configfLen; i++) {
|
|
1935
2030
|
currentScore = 0;
|
|
1936
2031
|
validFormatFound = false;
|
|
1937
2032
|
tempConfig = copyConfig({}, config);
|
|
@@ -2104,19 +2199,19 @@ var ordering = [
|
|
|
2104
2199
|
"second",
|
|
2105
2200
|
"millisecond"
|
|
2106
2201
|
];
|
|
2107
|
-
function isDurationValid(
|
|
2108
|
-
var key, unitHasDecimal = false, i;
|
|
2109
|
-
for (key in
|
|
2110
|
-
if (hasOwnProp(
|
|
2202
|
+
function isDurationValid(m2) {
|
|
2203
|
+
var key, unitHasDecimal = false, i, orderLen = ordering.length;
|
|
2204
|
+
for (key in m2) {
|
|
2205
|
+
if (hasOwnProp(m2, key) && !(indexOf.call(ordering, key) !== -1 && (m2[key] == null || !isNaN(m2[key])))) {
|
|
2111
2206
|
return false;
|
|
2112
2207
|
}
|
|
2113
2208
|
}
|
|
2114
|
-
for (i = 0; i <
|
|
2115
|
-
if (
|
|
2209
|
+
for (i = 0; i < orderLen; ++i) {
|
|
2210
|
+
if (m2[ordering[i]]) {
|
|
2116
2211
|
if (unitHasDecimal) {
|
|
2117
2212
|
return false;
|
|
2118
2213
|
}
|
|
2119
|
-
if (parseFloat(
|
|
2214
|
+
if (parseFloat(m2[ordering[i]]) !== toInt(m2[ordering[i]])) {
|
|
2120
2215
|
unitHasDecimal = true;
|
|
2121
2216
|
}
|
|
2122
2217
|
}
|
|
@@ -2199,8 +2294,8 @@ function cloneWithOffset(input, model) {
|
|
|
2199
2294
|
return createLocal(input).local();
|
|
2200
2295
|
}
|
|
2201
2296
|
}
|
|
2202
|
-
function getDateOffset(
|
|
2203
|
-
return -Math.round(
|
|
2297
|
+
function getDateOffset(m2) {
|
|
2298
|
+
return -Math.round(m2._d.getTimezoneOffset());
|
|
2204
2299
|
}
|
|
2205
2300
|
hooks.updateOffset = function() {
|
|
2206
2301
|
};
|
|
@@ -2461,8 +2556,8 @@ function isMomentInputObject(input) {
|
|
|
2461
2556
|
"milliseconds",
|
|
2462
2557
|
"millisecond",
|
|
2463
2558
|
"ms"
|
|
2464
|
-
], i, property;
|
|
2465
|
-
for (i = 0; i <
|
|
2559
|
+
], i, property, propertyLen = properties.length;
|
|
2560
|
+
for (i = 0; i < propertyLen; i += 1) {
|
|
2466
2561
|
property = properties[i];
|
|
2467
2562
|
propertyTest = propertyTest || hasOwnProp(input, property);
|
|
2468
2563
|
}
|
|
@@ -2630,18 +2725,18 @@ function toISOString(keepOffset) {
|
|
|
2630
2725
|
if (!this.isValid()) {
|
|
2631
2726
|
return null;
|
|
2632
2727
|
}
|
|
2633
|
-
var utc = keepOffset !== true,
|
|
2634
|
-
if (
|
|
2635
|
-
return formatMoment(
|
|
2728
|
+
var utc = keepOffset !== true, m2 = utc ? this.clone().utc() : this;
|
|
2729
|
+
if (m2.year() < 0 || m2.year() > 9999) {
|
|
2730
|
+
return formatMoment(m2, utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ");
|
|
2636
2731
|
}
|
|
2637
2732
|
if (isFunction(Date.prototype.toISOString)) {
|
|
2638
2733
|
if (utc) {
|
|
2639
2734
|
return this.toDate().toISOString();
|
|
2640
2735
|
} else {
|
|
2641
|
-
return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(
|
|
2736
|
+
return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m2, "Z"));
|
|
2642
2737
|
}
|
|
2643
2738
|
}
|
|
2644
|
-
return formatMoment(
|
|
2739
|
+
return formatMoment(m2, utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ");
|
|
2645
2740
|
}
|
|
2646
2741
|
function inspect() {
|
|
2647
2742
|
if (!this.isValid()) {
|
|
@@ -2711,18 +2806,18 @@ var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 *
|
|
|
2711
2806
|
function mod$1(dividend, divisor) {
|
|
2712
2807
|
return (dividend % divisor + divisor) % divisor;
|
|
2713
2808
|
}
|
|
2714
|
-
function localStartOfDate(y,
|
|
2809
|
+
function localStartOfDate(y, m2, d) {
|
|
2715
2810
|
if (y < 100 && y >= 0) {
|
|
2716
|
-
return new Date(y + 400,
|
|
2811
|
+
return new Date(y + 400, m2, d) - MS_PER_400_YEARS;
|
|
2717
2812
|
} else {
|
|
2718
|
-
return new Date(y,
|
|
2813
|
+
return new Date(y, m2, d).valueOf();
|
|
2719
2814
|
}
|
|
2720
2815
|
}
|
|
2721
|
-
function utcStartOfDate(y,
|
|
2816
|
+
function utcStartOfDate(y, m2, d) {
|
|
2722
2817
|
if (y < 100 && y >= 0) {
|
|
2723
|
-
return Date.UTC(y + 400,
|
|
2818
|
+
return Date.UTC(y + 400, m2, d) - MS_PER_400_YEARS;
|
|
2724
2819
|
} else {
|
|
2725
|
-
return Date.UTC(y,
|
|
2820
|
+
return Date.UTC(y, m2, d);
|
|
2726
2821
|
}
|
|
2727
2822
|
}
|
|
2728
2823
|
function startOf(units) {
|
|
@@ -2823,27 +2918,27 @@ function toDate() {
|
|
|
2823
2918
|
return new Date(this.valueOf());
|
|
2824
2919
|
}
|
|
2825
2920
|
function toArray() {
|
|
2826
|
-
var
|
|
2921
|
+
var m2 = this;
|
|
2827
2922
|
return [
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2923
|
+
m2.year(),
|
|
2924
|
+
m2.month(),
|
|
2925
|
+
m2.date(),
|
|
2926
|
+
m2.hour(),
|
|
2927
|
+
m2.minute(),
|
|
2928
|
+
m2.second(),
|
|
2929
|
+
m2.millisecond()
|
|
2835
2930
|
];
|
|
2836
2931
|
}
|
|
2837
2932
|
function toObject() {
|
|
2838
|
-
var
|
|
2933
|
+
var m2 = this;
|
|
2839
2934
|
return {
|
|
2840
|
-
years:
|
|
2841
|
-
months:
|
|
2842
|
-
date:
|
|
2843
|
-
hours:
|
|
2844
|
-
minutes:
|
|
2845
|
-
seconds:
|
|
2846
|
-
milliseconds:
|
|
2935
|
+
years: m2.year(),
|
|
2936
|
+
months: m2.month(),
|
|
2937
|
+
date: m2.date(),
|
|
2938
|
+
hours: m2.hours(),
|
|
2939
|
+
minutes: m2.minutes(),
|
|
2940
|
+
seconds: m2.seconds(),
|
|
2941
|
+
milliseconds: m2.milliseconds()
|
|
2847
2942
|
};
|
|
2848
2943
|
}
|
|
2849
2944
|
function toJSON() {
|
|
@@ -2906,9 +3001,9 @@ addParseToken(["yo"], function(input, array, config, token2) {
|
|
|
2906
3001
|
array[YEAR] = parseInt(input, 10);
|
|
2907
3002
|
}
|
|
2908
3003
|
});
|
|
2909
|
-
function localeEras(
|
|
2910
|
-
var i,
|
|
2911
|
-
for (i = 0,
|
|
3004
|
+
function localeEras(m2, format2) {
|
|
3005
|
+
var i, l2, date, eras = this._eras || getLocale("en")._eras;
|
|
3006
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
2912
3007
|
switch (typeof eras[i].since) {
|
|
2913
3008
|
case "string":
|
|
2914
3009
|
date = hooks(eras[i].since).startOf("day");
|
|
@@ -2928,9 +3023,9 @@ function localeEras(m, format2) {
|
|
|
2928
3023
|
return eras;
|
|
2929
3024
|
}
|
|
2930
3025
|
function localeErasParse(eraName, format2, strict) {
|
|
2931
|
-
var i,
|
|
3026
|
+
var i, l2, eras = this.eras(), name, abbr, narrow;
|
|
2932
3027
|
eraName = eraName.toUpperCase();
|
|
2933
|
-
for (i = 0,
|
|
3028
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
2934
3029
|
name = eras[i].name.toUpperCase();
|
|
2935
3030
|
abbr = eras[i].abbr.toUpperCase();
|
|
2936
3031
|
narrow = eras[i].narrow.toUpperCase();
|
|
@@ -2968,8 +3063,8 @@ function localeErasConvertYear(era, year) {
|
|
|
2968
3063
|
}
|
|
2969
3064
|
}
|
|
2970
3065
|
function getEraName() {
|
|
2971
|
-
var i,
|
|
2972
|
-
for (i = 0,
|
|
3066
|
+
var i, l2, val, eras = this.localeData().eras();
|
|
3067
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
2973
3068
|
val = this.clone().startOf("day").valueOf();
|
|
2974
3069
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
2975
3070
|
return eras[i].name;
|
|
@@ -2981,8 +3076,8 @@ function getEraName() {
|
|
|
2981
3076
|
return "";
|
|
2982
3077
|
}
|
|
2983
3078
|
function getEraNarrow() {
|
|
2984
|
-
var i,
|
|
2985
|
-
for (i = 0,
|
|
3079
|
+
var i, l2, val, eras = this.localeData().eras();
|
|
3080
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
2986
3081
|
val = this.clone().startOf("day").valueOf();
|
|
2987
3082
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
2988
3083
|
return eras[i].narrow;
|
|
@@ -2994,8 +3089,8 @@ function getEraNarrow() {
|
|
|
2994
3089
|
return "";
|
|
2995
3090
|
}
|
|
2996
3091
|
function getEraAbbr() {
|
|
2997
|
-
var i,
|
|
2998
|
-
for (i = 0,
|
|
3092
|
+
var i, l2, val, eras = this.localeData().eras();
|
|
3093
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
2999
3094
|
val = this.clone().startOf("day").valueOf();
|
|
3000
3095
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
3001
3096
|
return eras[i].abbr;
|
|
@@ -3007,8 +3102,8 @@ function getEraAbbr() {
|
|
|
3007
3102
|
return "";
|
|
3008
3103
|
}
|
|
3009
3104
|
function getEraYear() {
|
|
3010
|
-
var i,
|
|
3011
|
-
for (i = 0,
|
|
3105
|
+
var i, l2, dir, val, eras = this.localeData().eras();
|
|
3106
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
3012
3107
|
dir = eras[i].since <= eras[i].until ? 1 : -1;
|
|
3013
3108
|
val = this.clone().startOf("day").valueOf();
|
|
3014
3109
|
if (eras[i].since <= val && val <= eras[i].until || eras[i].until <= val && val <= eras[i].since) {
|
|
@@ -3048,8 +3143,8 @@ function matchEraYearOrdinal(isStrict, locale2) {
|
|
|
3048
3143
|
return locale2._eraYearOrdinalRegex || matchUnsigned;
|
|
3049
3144
|
}
|
|
3050
3145
|
function computeErasParse() {
|
|
3051
|
-
var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i,
|
|
3052
|
-
for (i = 0,
|
|
3146
|
+
var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l2, eras = this.eras();
|
|
3147
|
+
for (i = 0, l2 = eras.length; i < l2; ++i) {
|
|
3053
3148
|
namePieces.push(regexEscape(eras[i].name));
|
|
3054
3149
|
abbrPieces.push(regexEscape(eras[i].abbr));
|
|
3055
3150
|
narrowPieces.push(regexEscape(eras[i].narrow));
|
|
@@ -3718,7 +3813,7 @@ addParseToken("x", function(input, array, config) {
|
|
|
3718
3813
|
config._d = new Date(toInt(input));
|
|
3719
3814
|
});
|
|
3720
3815
|
//! moment.js
|
|
3721
|
-
hooks.version = "2.29.
|
|
3816
|
+
hooks.version = "2.29.3";
|
|
3722
3817
|
setHookCallback(createLocal);
|
|
3723
3818
|
hooks.fn = proto;
|
|
3724
3819
|
hooks.min = min;
|
|
@@ -3758,27 +3853,57 @@ hooks.HTML5_FMT = {
|
|
|
3758
3853
|
WEEK: "GGGG-[W]WW",
|
|
3759
3854
|
MONTH: "YYYY-MM"
|
|
3760
3855
|
};
|
|
3761
|
-
const {
|
|
3856
|
+
const {
|
|
3857
|
+
OptGroup,
|
|
3858
|
+
Option
|
|
3859
|
+
} = Select;
|
|
3762
3860
|
const isOptionGroupArray = (arr) => Array.isArray(arr) && arr.length > 0 && "options" in arr[0];
|
|
3763
|
-
const toOptions = (arr) => isOptionGroupArray(arr) ? arr.map((og) => /* @__PURE__ */
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
},
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
}, opt.
|
|
3773
|
-
const AntDValueSelector = ({
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3861
|
+
const toOptions = (arr) => isOptionGroupArray(arr) ? arr.map((og) => /* @__PURE__ */ jsx(OptGroup, {
|
|
3862
|
+
label: og.label,
|
|
3863
|
+
children: og.options.map((opt) => /* @__PURE__ */ jsx(Option, {
|
|
3864
|
+
value: opt.name,
|
|
3865
|
+
children: opt.label
|
|
3866
|
+
}, opt.name))
|
|
3867
|
+
}, og.label)) : Array.isArray(arr) ? arr.map((opt) => /* @__PURE__ */ jsx(Option, {
|
|
3868
|
+
value: opt.name,
|
|
3869
|
+
children: opt.label
|
|
3870
|
+
}, opt.name)) : null;
|
|
3871
|
+
const AntDValueSelector = (_g) => {
|
|
3872
|
+
var _h = _g, {
|
|
3873
|
+
className,
|
|
3874
|
+
handleOnChange,
|
|
3875
|
+
options,
|
|
3876
|
+
value,
|
|
3877
|
+
title,
|
|
3878
|
+
disabled,
|
|
3879
|
+
multiple,
|
|
3880
|
+
testID: _testID,
|
|
3881
|
+
rules: _rules,
|
|
3882
|
+
level: _level,
|
|
3883
|
+
path: _path,
|
|
3884
|
+
context: _context,
|
|
3885
|
+
validation: _validation,
|
|
3886
|
+
operator: _operator,
|
|
3887
|
+
field: _field,
|
|
3888
|
+
fieldData: _fieldData
|
|
3889
|
+
} = _h, extraProps = __objRest(_h, [
|
|
3890
|
+
"className",
|
|
3891
|
+
"handleOnChange",
|
|
3892
|
+
"options",
|
|
3893
|
+
"value",
|
|
3894
|
+
"title",
|
|
3895
|
+
"disabled",
|
|
3896
|
+
"multiple",
|
|
3897
|
+
"testID",
|
|
3898
|
+
"rules",
|
|
3899
|
+
"level",
|
|
3900
|
+
"path",
|
|
3901
|
+
"context",
|
|
3902
|
+
"validation",
|
|
3903
|
+
"operator",
|
|
3904
|
+
"field",
|
|
3905
|
+
"fieldData"
|
|
3906
|
+
]);
|
|
3782
3907
|
const onChange = useMemo(() => {
|
|
3783
3908
|
if (multiple) {
|
|
3784
3909
|
return (v) => handleOnChange(Array.isArray(v) ? v.join(",") : v);
|
|
@@ -3786,20 +3911,25 @@ const AntDValueSelector = ({
|
|
|
3786
3911
|
return (v) => handleOnChange(v);
|
|
3787
3912
|
}, [handleOnChange, multiple]);
|
|
3788
3913
|
const val = multiple ? Array.isArray(value) ? value : value == null ? void 0 : value.split(",") : value;
|
|
3789
|
-
const modeObj = multiple ? {
|
|
3790
|
-
|
|
3914
|
+
const modeObj = multiple ? {
|
|
3915
|
+
mode: "multiple"
|
|
3916
|
+
} : {};
|
|
3917
|
+
return /* @__PURE__ */ jsx("span", {
|
|
3791
3918
|
title,
|
|
3792
|
-
className
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3919
|
+
className,
|
|
3920
|
+
children: /* @__PURE__ */ jsx(Select, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, modeObj), {
|
|
3921
|
+
dropdownMatchSelectWidth: false,
|
|
3922
|
+
disabled,
|
|
3923
|
+
value: val,
|
|
3924
|
+
onChange
|
|
3925
|
+
}), extraProps), {
|
|
3926
|
+
children: toOptions(options)
|
|
3927
|
+
}))
|
|
3928
|
+
});
|
|
3799
3929
|
};
|
|
3800
3930
|
AntDValueSelector.displayName = "AntDValueSelector";
|
|
3801
|
-
const AntDValueEditor = (
|
|
3802
|
-
var
|
|
3931
|
+
const AntDValueEditor = (_i) => {
|
|
3932
|
+
var _j = _i, {
|
|
3803
3933
|
fieldData,
|
|
3804
3934
|
operator,
|
|
3805
3935
|
value,
|
|
@@ -3809,8 +3939,9 @@ const AntDValueEditor = (_a) => {
|
|
|
3809
3939
|
type,
|
|
3810
3940
|
inputType,
|
|
3811
3941
|
values,
|
|
3942
|
+
valueSource: _vs,
|
|
3812
3943
|
disabled
|
|
3813
|
-
} =
|
|
3944
|
+
} = _j, props = __objRest(_j, [
|
|
3814
3945
|
"fieldData",
|
|
3815
3946
|
"operator",
|
|
3816
3947
|
"value",
|
|
@@ -3820,9 +3951,10 @@ const AntDValueEditor = (_a) => {
|
|
|
3820
3951
|
"type",
|
|
3821
3952
|
"inputType",
|
|
3822
3953
|
"values",
|
|
3954
|
+
"valueSource",
|
|
3823
3955
|
"disabled"
|
|
3824
3956
|
]);
|
|
3825
|
-
var
|
|
3957
|
+
var _a;
|
|
3826
3958
|
useEffect(() => {
|
|
3827
3959
|
if (inputType === "number" && !["between", "notBetween", "in", "notIn"].includes(operator) && typeof value === "string" && value.includes(",")) {
|
|
3828
3960
|
handleOnChange("");
|
|
@@ -3831,12 +3963,12 @@ const AntDValueEditor = (_a) => {
|
|
|
3831
3963
|
if (operator === "null" || operator === "notNull") {
|
|
3832
3964
|
return null;
|
|
3833
3965
|
}
|
|
3834
|
-
const placeHolderText = (
|
|
3966
|
+
const placeHolderText = (_a = fieldData == null ? void 0 : fieldData.placeholder) != null ? _a : "";
|
|
3835
3967
|
const inputTypeCoerced = ["between", "notBetween", "in", "notIn"].includes(operator) && !["date", "datetime-local"].includes(`${inputType}`) ? "text" : inputType || "text";
|
|
3836
3968
|
switch (type) {
|
|
3837
3969
|
case "select":
|
|
3838
3970
|
case "multiselect":
|
|
3839
|
-
return /* @__PURE__ */
|
|
3971
|
+
return /* @__PURE__ */ jsx(AntDValueSelector, __spreadProps(__spreadValues({}, props), {
|
|
3840
3972
|
className,
|
|
3841
3973
|
handleOnChange,
|
|
3842
3974
|
options: values,
|
|
@@ -3846,7 +3978,7 @@ const AntDValueEditor = (_a) => {
|
|
|
3846
3978
|
multiple: type === "multiselect"
|
|
3847
3979
|
}));
|
|
3848
3980
|
case "textarea":
|
|
3849
|
-
return /* @__PURE__ */
|
|
3981
|
+
return /* @__PURE__ */ jsx(Input.TextArea, {
|
|
3850
3982
|
value,
|
|
3851
3983
|
title,
|
|
3852
3984
|
className,
|
|
@@ -3855,7 +3987,7 @@ const AntDValueEditor = (_a) => {
|
|
|
3855
3987
|
onChange: (e) => handleOnChange(e.target.value)
|
|
3856
3988
|
});
|
|
3857
3989
|
case "switch":
|
|
3858
|
-
return /* @__PURE__ */
|
|
3990
|
+
return /* @__PURE__ */ jsx(Switch, {
|
|
3859
3991
|
checked: !!value,
|
|
3860
3992
|
title,
|
|
3861
3993
|
className,
|
|
@@ -3863,38 +3995,40 @@ const AntDValueEditor = (_a) => {
|
|
|
3863
3995
|
onChange: (v) => handleOnChange(v)
|
|
3864
3996
|
});
|
|
3865
3997
|
case "checkbox":
|
|
3866
|
-
return /* @__PURE__ */
|
|
3998
|
+
return /* @__PURE__ */ jsx("span", {
|
|
3867
3999
|
title,
|
|
3868
|
-
className
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
4000
|
+
className,
|
|
4001
|
+
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
4002
|
+
type: "checkbox",
|
|
4003
|
+
disabled,
|
|
4004
|
+
onChange: (e) => handleOnChange(e.target.checked),
|
|
4005
|
+
checked: !!value
|
|
4006
|
+
})
|
|
4007
|
+
});
|
|
3875
4008
|
case "radio":
|
|
3876
|
-
return /* @__PURE__ */
|
|
4009
|
+
return /* @__PURE__ */ jsx("span", {
|
|
3877
4010
|
className,
|
|
3878
|
-
title
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
4011
|
+
title,
|
|
4012
|
+
children: values.map((v) => /* @__PURE__ */ jsx(Radio, {
|
|
4013
|
+
value: v.name,
|
|
4014
|
+
checked: value === v.name,
|
|
4015
|
+
disabled,
|
|
4016
|
+
onChange: (e) => handleOnChange(e.target.value),
|
|
4017
|
+
children: v.label
|
|
4018
|
+
}, v.name))
|
|
4019
|
+
});
|
|
3886
4020
|
}
|
|
3887
4021
|
switch (inputTypeCoerced) {
|
|
3888
4022
|
case "date":
|
|
3889
4023
|
case "datetime-local":
|
|
3890
|
-
return operator === "between" || operator === "notBetween" ? /* @__PURE__ */
|
|
4024
|
+
return operator === "between" || operator === "notBetween" ? /* @__PURE__ */ jsx(DatePicker.RangePicker, {
|
|
3891
4025
|
value: typeof value === "string" && /^[^,]+,[^,]+$/.test(value) ? value.split(",").map((v) => hooks(v)) : void 0,
|
|
3892
4026
|
showTime: inputTypeCoerced === "datetime-local",
|
|
3893
4027
|
className,
|
|
3894
4028
|
disabled,
|
|
3895
4029
|
placeholder: [placeHolderText, placeHolderText],
|
|
3896
4030
|
onChange: (dates) => handleOnChange(dates == null ? void 0 : dates.map((d) => d == null ? void 0 : d.format(hooks.HTML5_FMT.DATE)).join(","))
|
|
3897
|
-
}) : /* @__PURE__ */
|
|
4031
|
+
}) : /* @__PURE__ */ jsx(DatePicker, {
|
|
3898
4032
|
value: value ? hooks(value) : null,
|
|
3899
4033
|
showTime: inputTypeCoerced === "datetime-local",
|
|
3900
4034
|
className,
|
|
@@ -3903,18 +4037,18 @@ const AntDValueEditor = (_a) => {
|
|
|
3903
4037
|
onChange: (_d, dateString) => handleOnChange(dateString)
|
|
3904
4038
|
});
|
|
3905
4039
|
case "time":
|
|
3906
|
-
return /* @__PURE__ */
|
|
3907
|
-
value: value ? hooks(value, "HH:mm") : null,
|
|
4040
|
+
return /* @__PURE__ */ jsx(TimePicker, {
|
|
4041
|
+
value: value ? hooks(value, "HH:mm:ss") : null,
|
|
3908
4042
|
className,
|
|
3909
4043
|
disabled,
|
|
3910
4044
|
placeholder: placeHolderText,
|
|
3911
4045
|
onChange: (d) => {
|
|
3912
|
-
var
|
|
3913
|
-
return handleOnChange((
|
|
4046
|
+
var _a2;
|
|
4047
|
+
return handleOnChange((_a2 = d == null ? void 0 : d.format("HH:mm:ss")) != null ? _a2 : "");
|
|
3914
4048
|
}
|
|
3915
4049
|
});
|
|
3916
4050
|
}
|
|
3917
|
-
return /* @__PURE__ */
|
|
4051
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
3918
4052
|
type: inputTypeCoerced,
|
|
3919
4053
|
value,
|
|
3920
4054
|
title,
|