@nutui/nutui-react-taro 1.3.12-beta.2 → 1.3.12-beta.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/CHANGELOG.md +13 -0
- package/dist/esm/Audio.js +3 -3
- package/dist/esm/Calendar.js +2 -2
- package/dist/esm/Form/style/index.js +2 -0
- package/dist/esm/Form.js +5 -0
- package/dist/esm/FormItem/style/index.js +2 -0
- package/dist/esm/FormItem.js +8 -0
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/Range.js +2 -2
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/{audio.taro-b4f71d1b.js → audio.taro-6920085d.js} +1 -1
- package/dist/esm/{calendar.taro-a1f1a7f8.js → calendar.taro-0a8cbd0c.js} +6 -1
- package/dist/esm/form.taro-e086758a.js +16 -0
- package/dist/esm/formitem-9f11e314.js +237 -0
- package/dist/esm/nutui-react.es.js +8 -5
- package/dist/esm/{pulltorefresh.taro-e66c78ad.js → pulltorefresh.taro-fe2fa54c.js} +0 -1
- package/dist/esm/{range.taro-4232e6a7.js → range.taro-4e5f8f31.js} +10 -7
- package/dist/esm/{textarea.taro-0a85b8a5.js → textarea.taro-e1bf7f4d.js} +2 -2
- package/dist/esm/types/src/packages/form/demo.d.ts +3 -0
- package/dist/esm/types/src/packages/form/form.d.ts +9 -0
- package/dist/esm/types/src/packages/form/form.taro.d.ts +4 -0
- package/dist/esm/types/src/packages/form/index.d.ts +2 -0
- package/dist/esm/types/src/packages/form/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/form/types.d.ts +82 -0
- package/dist/esm/types/src/packages/form/useForm.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +30 -0
- package/dist/esm/types/src/packages/formitem/formitemcontext.d.ts +6 -0
- package/dist/esm/types/src/packages/formitem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/types.d.ts +82 -0
- package/dist/esm/types/src/packages/formitem/useForm.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +5 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +5 -1
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +3 -1
- package/dist/esm/types/src/packages/range/range.d.ts +3 -0
- package/dist/esm/types/src/packages/range/range.taro.d.ts +3 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +1833 -434
- package/dist/nutui.react.umd.js +1828 -427
- package/dist/packages/form/form.scss +27 -0
- package/dist/packages/formitem/formitem.scss +87 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +2 -0
- package/dist/types/index.d.ts +234 -167
- package/dist/types/nutui.taro.react.build.ts +5 -1
- package/package.json +5 -3
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.3.12-beta.
|
|
2
|
+
* @nutui/nutui-react-taro v1.3.12-beta.4 Wed Nov 23 2022 16:32:35 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
(function(
|
|
7
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "react-dom"], factory) : (
|
|
6
|
+
(function(global2, factory) {
|
|
7
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tarojs/taro"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tarojs/taro", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.Taro, global2.ReactDOM));
|
|
8
8
|
})(this, function(exports2, React, Taro, ReactDOM) {
|
|
9
9
|
"use strict";
|
|
10
10
|
function _interopDefaultLegacy(e2) {
|
|
@@ -13,37 +13,37 @@
|
|
|
13
13
|
function _interopNamespace(e2) {
|
|
14
14
|
if (e2 && e2.__esModule)
|
|
15
15
|
return e2;
|
|
16
|
-
var
|
|
16
|
+
var n2 = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
17
17
|
if (e2) {
|
|
18
|
-
Object.keys(e2).forEach(function(
|
|
19
|
-
if (
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(
|
|
18
|
+
Object.keys(e2).forEach(function(k2) {
|
|
19
|
+
if (k2 !== "default") {
|
|
20
|
+
var d2 = Object.getOwnPropertyDescriptor(e2, k2);
|
|
21
|
+
Object.defineProperty(n2, k2, d2.get ? d2 : {
|
|
22
22
|
enumerable: true,
|
|
23
23
|
get: function() {
|
|
24
|
-
return e2[
|
|
24
|
+
return e2[k2];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
return Object.freeze(
|
|
30
|
+
n2["default"] = e2;
|
|
31
|
+
return Object.freeze(n2);
|
|
32
32
|
}
|
|
33
33
|
var React__default = /* @__PURE__ */ _interopDefaultLegacy(React);
|
|
34
34
|
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
35
35
|
var Taro__default = /* @__PURE__ */ _interopDefaultLegacy(Taro);
|
|
36
36
|
var ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
|
|
37
|
-
function getAugmentedNamespace(
|
|
38
|
-
if (
|
|
39
|
-
return
|
|
37
|
+
function getAugmentedNamespace(n2) {
|
|
38
|
+
if (n2.__esModule)
|
|
39
|
+
return n2;
|
|
40
40
|
var a = Object.defineProperty({}, "__esModule", { value: true });
|
|
41
|
-
Object.keys(
|
|
42
|
-
var
|
|
43
|
-
Object.defineProperty(a,
|
|
41
|
+
Object.keys(n2).forEach(function(k2) {
|
|
42
|
+
var d2 = Object.getOwnPropertyDescriptor(n2, k2);
|
|
43
|
+
Object.defineProperty(a, k2, d2.get ? d2 : {
|
|
44
44
|
enumerable: true,
|
|
45
45
|
get: function() {
|
|
46
|
-
return
|
|
46
|
+
return n2[k2];
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -51,43 +51,43 @@
|
|
|
51
51
|
}
|
|
52
52
|
var classname = { exports: {} };
|
|
53
53
|
var classname_production_min = {};
|
|
54
|
-
function r(r2) {
|
|
54
|
+
function r$1(r2) {
|
|
55
55
|
function e2(e3, i, a, o) {
|
|
56
|
-
var
|
|
56
|
+
var f2 = i ? t2 + e3 + r2.e + i : t2 + e3, v2 = f2;
|
|
57
57
|
if (a) {
|
|
58
|
-
var u = " " +
|
|
58
|
+
var u = " " + v2 + r2.m;
|
|
59
59
|
for (var s in a)
|
|
60
60
|
if (a.hasOwnProperty(s)) {
|
|
61
|
-
var
|
|
62
|
-
true ===
|
|
61
|
+
var p2 = a[s];
|
|
62
|
+
true === p2 ? v2 += u + s : p2 && (v2 += u + s + n2 + p2);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
if (void 0 !== o)
|
|
66
|
-
for (var
|
|
67
|
-
var
|
|
68
|
-
if (
|
|
69
|
-
for (var
|
|
70
|
-
var
|
|
71
|
-
|
|
66
|
+
for (var c6 = 0, l2 = o.length; c6 < l2; c6++) {
|
|
67
|
+
var y2 = o[c6];
|
|
68
|
+
if (y2 && "string" == typeof y2.valueOf())
|
|
69
|
+
for (var g2 = y2.valueOf().split(" "), d2 = 0; d2 < g2.length; d2++) {
|
|
70
|
+
var h2 = g2[d2];
|
|
71
|
+
h2 !== f2 && (v2 += " " + h2);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return v2;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
return function(r3,
|
|
78
|
-
return function(
|
|
79
|
-
return "string" == typeof
|
|
76
|
+
var t2 = r2.n || "", n2 = r2.v || r2.m;
|
|
77
|
+
return function(r3, t3) {
|
|
78
|
+
return function(n3, i, a) {
|
|
79
|
+
return "string" == typeof n3 ? Array.isArray(i) ? e2(r3, n3, void 0, i) : e2(r3, n3, i, a) : e2(r3, t3, n3, i);
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
84
|
-
var e = r({ e: "-", m: "_" });
|
|
85
|
-
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
84
|
+
var e$1 = r$1({ e: "-", m: "_" });
|
|
85
|
+
classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
|
|
86
86
|
{
|
|
87
87
|
classname.exports = classname_production_min;
|
|
88
88
|
}
|
|
89
89
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
90
|
-
const defaultProps$
|
|
90
|
+
const defaultProps$1r = {
|
|
91
91
|
name: "",
|
|
92
92
|
size: "",
|
|
93
93
|
classPrefix: "nut-icon",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
onClick,
|
|
116
116
|
...rest
|
|
117
117
|
} = {
|
|
118
|
-
...defaultProps$
|
|
118
|
+
...defaultProps$1r,
|
|
119
119
|
...props
|
|
120
120
|
};
|
|
121
121
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
children
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
|
-
Icon$1.defaultProps = defaultProps$
|
|
152
|
+
Icon$1.defaultProps = defaultProps$1r;
|
|
153
153
|
Icon$1.displayName = "NutIcon";
|
|
154
154
|
const ComponentDefaults = {
|
|
155
155
|
iconClassPrefix: "nut-icon",
|
|
156
156
|
iconFontClassName: "nutui-iconfont"
|
|
157
157
|
};
|
|
158
|
-
const defaultProps$
|
|
158
|
+
const defaultProps$1q = {
|
|
159
159
|
...ComponentDefaults,
|
|
160
160
|
className: "",
|
|
161
161
|
color: "",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
iconFontClassName,
|
|
192
192
|
...rest
|
|
193
193
|
} = {
|
|
194
|
-
...defaultProps$
|
|
194
|
+
...defaultProps$1q,
|
|
195
195
|
...props
|
|
196
196
|
};
|
|
197
197
|
const getStyle = React.useCallback(() => {
|
|
@@ -270,9 +270,9 @@
|
|
|
270
270
|
className: icon || loading ? "text" : ""
|
|
271
271
|
}, children)));
|
|
272
272
|
};
|
|
273
|
-
Button.defaultProps = defaultProps$
|
|
273
|
+
Button.defaultProps = defaultProps$1q;
|
|
274
274
|
Button.displayName = "NutButton";
|
|
275
|
-
const defaultProps$
|
|
275
|
+
const defaultProps$1p = {
|
|
276
276
|
...ComponentDefaults,
|
|
277
277
|
title: null,
|
|
278
278
|
subTitle: null,
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
onClick: (event) => {
|
|
295
295
|
}
|
|
296
296
|
};
|
|
297
|
-
const Cell = (props) => {
|
|
297
|
+
const Cell$1 = (props) => {
|
|
298
298
|
const {
|
|
299
299
|
children,
|
|
300
300
|
click,
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
iconFontClassName,
|
|
319
319
|
...rest
|
|
320
320
|
} = {
|
|
321
|
-
...defaultProps$
|
|
321
|
+
...defaultProps$1p,
|
|
322
322
|
...props
|
|
323
323
|
};
|
|
324
324
|
const b2 = cn("cell");
|
|
@@ -367,9 +367,9 @@
|
|
|
367
367
|
className: b2("link")
|
|
368
368
|
}) : linkSlot));
|
|
369
369
|
};
|
|
370
|
-
Cell.defaultProps = defaultProps$
|
|
371
|
-
Cell.displayName = "NutCell";
|
|
372
|
-
const defaultProps$
|
|
370
|
+
Cell$1.defaultProps = defaultProps$1p;
|
|
371
|
+
Cell$1.displayName = "NutCell";
|
|
372
|
+
const defaultProps$1o = {
|
|
373
373
|
title: "",
|
|
374
374
|
desc: "",
|
|
375
375
|
className: "",
|
|
@@ -378,7 +378,7 @@
|
|
|
378
378
|
};
|
|
379
379
|
const CellGroup = (props) => {
|
|
380
380
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
381
|
-
...defaultProps$
|
|
381
|
+
...defaultProps$1o,
|
|
382
382
|
...props
|
|
383
383
|
};
|
|
384
384
|
const b2 = cn("cell-group");
|
|
@@ -392,13 +392,13 @@
|
|
|
392
392
|
className: b2("wrap")
|
|
393
393
|
}, children));
|
|
394
394
|
};
|
|
395
|
-
CellGroup.defaultProps = defaultProps$
|
|
395
|
+
CellGroup.defaultProps = defaultProps$1o;
|
|
396
396
|
CellGroup.displayName = "NutCellGroup";
|
|
397
397
|
var classnames = { exports: {} };
|
|
398
398
|
/*!
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
399
|
+
Copyright (c) 2018 Jed Watson.
|
|
400
|
+
Licensed under the MIT License (MIT), see
|
|
401
|
+
http://jedwatson.github.io/classnames
|
|
402
402
|
*/
|
|
403
403
|
(function(module2) {
|
|
404
404
|
(function() {
|
|
@@ -420,14 +420,14 @@
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
} else if (argType === "object") {
|
|
423
|
-
if (arg.toString
|
|
424
|
-
for (var key in arg) {
|
|
425
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
426
|
-
classes.push(key);
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
} else {
|
|
423
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
430
424
|
classes.push(arg.toString());
|
|
425
|
+
continue;
|
|
426
|
+
}
|
|
427
|
+
for (var key in arg) {
|
|
428
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
429
|
+
classes.push(key);
|
|
430
|
+
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}
|
|
@@ -549,18 +549,72 @@
|
|
|
549
549
|
}
|
|
550
550
|
return target;
|
|
551
551
|
}
|
|
552
|
-
function _setPrototypeOf(o,
|
|
553
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2,
|
|
554
|
-
o2.__proto__ =
|
|
552
|
+
function _setPrototypeOf(o, p2) {
|
|
553
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
|
|
554
|
+
o2.__proto__ = p3;
|
|
555
555
|
return o2;
|
|
556
556
|
};
|
|
557
|
-
return _setPrototypeOf(o,
|
|
557
|
+
return _setPrototypeOf(o, p2);
|
|
558
558
|
}
|
|
559
559
|
function _inheritsLoose(subClass, superClass) {
|
|
560
560
|
subClass.prototype = Object.create(superClass.prototype);
|
|
561
561
|
subClass.prototype.constructor = subClass;
|
|
562
562
|
_setPrototypeOf(subClass, superClass);
|
|
563
563
|
}
|
|
564
|
+
var propTypes = { exports: {} };
|
|
565
|
+
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
566
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
567
|
+
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
568
|
+
function emptyFunction() {
|
|
569
|
+
}
|
|
570
|
+
function emptyFunctionWithReset() {
|
|
571
|
+
}
|
|
572
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
573
|
+
var factoryWithThrowingShims = function() {
|
|
574
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
575
|
+
if (secret === ReactPropTypesSecret) {
|
|
576
|
+
return;
|
|
577
|
+
}
|
|
578
|
+
var err = new Error(
|
|
579
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
580
|
+
);
|
|
581
|
+
err.name = "Invariant Violation";
|
|
582
|
+
throw err;
|
|
583
|
+
}
|
|
584
|
+
shim.isRequired = shim;
|
|
585
|
+
function getShim() {
|
|
586
|
+
return shim;
|
|
587
|
+
}
|
|
588
|
+
var ReactPropTypes = {
|
|
589
|
+
array: shim,
|
|
590
|
+
bigint: shim,
|
|
591
|
+
bool: shim,
|
|
592
|
+
func: shim,
|
|
593
|
+
number: shim,
|
|
594
|
+
object: shim,
|
|
595
|
+
string: shim,
|
|
596
|
+
symbol: shim,
|
|
597
|
+
any: shim,
|
|
598
|
+
arrayOf: getShim,
|
|
599
|
+
element: shim,
|
|
600
|
+
elementType: shim,
|
|
601
|
+
instanceOf: getShim,
|
|
602
|
+
node: shim,
|
|
603
|
+
objectOf: getShim,
|
|
604
|
+
oneOf: getShim,
|
|
605
|
+
oneOfType: getShim,
|
|
606
|
+
shape: getShim,
|
|
607
|
+
exact: getShim,
|
|
608
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
609
|
+
resetWarningCache: emptyFunction
|
|
610
|
+
};
|
|
611
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
612
|
+
return ReactPropTypes;
|
|
613
|
+
};
|
|
614
|
+
{
|
|
615
|
+
propTypes.exports = factoryWithThrowingShims();
|
|
616
|
+
}
|
|
617
|
+
var PropTypes = propTypes.exports;
|
|
564
618
|
function hasClass(element, className) {
|
|
565
619
|
if (element.classList)
|
|
566
620
|
return !!className && element.classList.contains(className);
|
|
@@ -601,10 +655,10 @@
|
|
|
601
655
|
var EXITING = "exiting";
|
|
602
656
|
var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
603
657
|
_inheritsLoose(Transition2, _React$Component);
|
|
604
|
-
function Transition2(props,
|
|
658
|
+
function Transition2(props, context2) {
|
|
605
659
|
var _this;
|
|
606
|
-
_this = _React$Component.call(this, props,
|
|
607
|
-
var parentGroup =
|
|
660
|
+
_this = _React$Component.call(this, props, context2) || this;
|
|
661
|
+
var parentGroup = context2;
|
|
608
662
|
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
609
663
|
var initialStatus;
|
|
610
664
|
_this.appearStatus = null;
|
|
@@ -824,7 +878,7 @@
|
|
|
824
878
|
}(React__default["default"].Component);
|
|
825
879
|
Transition.contextType = TransitionGroupContext;
|
|
826
880
|
Transition.propTypes = {};
|
|
827
|
-
function noop$
|
|
881
|
+
function noop$3() {
|
|
828
882
|
}
|
|
829
883
|
Transition.defaultProps = {
|
|
830
884
|
in: false,
|
|
@@ -833,12 +887,12 @@
|
|
|
833
887
|
appear: false,
|
|
834
888
|
enter: true,
|
|
835
889
|
exit: true,
|
|
836
|
-
onEnter: noop$
|
|
837
|
-
onEntering: noop$
|
|
838
|
-
onEntered: noop$
|
|
839
|
-
onExit: noop$
|
|
840
|
-
onExiting: noop$
|
|
841
|
-
onExited: noop$
|
|
890
|
+
onEnter: noop$3,
|
|
891
|
+
onEntering: noop$3,
|
|
892
|
+
onEntered: noop$3,
|
|
893
|
+
onExit: noop$3,
|
|
894
|
+
onExiting: noop$3,
|
|
895
|
+
onExited: noop$3
|
|
842
896
|
};
|
|
843
897
|
Transition.UNMOUNTED = UNMOUNTED;
|
|
844
898
|
Transition.EXITED = EXITED;
|
|
@@ -847,13 +901,13 @@
|
|
|
847
901
|
Transition.EXITING = EXITING;
|
|
848
902
|
var Transition$1 = Transition;
|
|
849
903
|
var _addClass = function addClass$1(node, classes) {
|
|
850
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
851
|
-
return addClass(node,
|
|
904
|
+
return node && classes && classes.split(" ").forEach(function(c6) {
|
|
905
|
+
return addClass(node, c6);
|
|
852
906
|
});
|
|
853
907
|
};
|
|
854
908
|
var removeClass = function removeClass2(node, classes) {
|
|
855
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
856
|
-
return removeClass$1(node,
|
|
909
|
+
return node && classes && classes.split(" ").forEach(function(c6) {
|
|
910
|
+
return removeClass$1(node, c6);
|
|
857
911
|
});
|
|
858
912
|
};
|
|
859
913
|
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
@@ -985,7 +1039,7 @@
|
|
|
985
1039
|
};
|
|
986
1040
|
CSSTransition.propTypes = {};
|
|
987
1041
|
var CSSTransition$1 = CSSTransition;
|
|
988
|
-
const defaultProps$
|
|
1042
|
+
const defaultProps$1n = {
|
|
989
1043
|
...ComponentDefaults,
|
|
990
1044
|
position: "center",
|
|
991
1045
|
transition: "",
|
|
@@ -1171,7 +1225,7 @@
|
|
|
1171
1225
|
}, [position]);
|
|
1172
1226
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1173
1227
|
};
|
|
1174
|
-
Popup.defaultProps = defaultProps$
|
|
1228
|
+
Popup.defaultProps = defaultProps$1n;
|
|
1175
1229
|
Popup.displayName = "NutPopup";
|
|
1176
1230
|
const zhCN = {
|
|
1177
1231
|
save: "\u4FDD\u5B58",
|
|
@@ -1298,7 +1352,7 @@
|
|
|
1298
1352
|
completeText: "\u5237\u65B0\u6210\u529F"
|
|
1299
1353
|
}
|
|
1300
1354
|
};
|
|
1301
|
-
const defaultProps$
|
|
1355
|
+
const defaultProps$1m = {
|
|
1302
1356
|
locale: zhCN
|
|
1303
1357
|
};
|
|
1304
1358
|
const defaultConfigRef$1 = {
|
|
@@ -1315,7 +1369,7 @@
|
|
|
1315
1369
|
};
|
|
1316
1370
|
const ConfigContext$1 = React.createContext(null);
|
|
1317
1371
|
const ConfigProvider = (props) => {
|
|
1318
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1372
|
+
const { children, ...config2 } = { ...defaultProps$1m, ...props };
|
|
1319
1373
|
const parentConfig = useConfig$1();
|
|
1320
1374
|
return /* @__PURE__ */ React__default["default"].createElement(ConfigContext$1.Provider, {
|
|
1321
1375
|
value: {
|
|
@@ -1324,19 +1378,19 @@
|
|
|
1324
1378
|
}
|
|
1325
1379
|
}, children);
|
|
1326
1380
|
};
|
|
1327
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1381
|
+
ConfigProvider.defaultProps = defaultProps$1m;
|
|
1328
1382
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1329
|
-
const defaultProps$
|
|
1383
|
+
const defaultProps$1l = {};
|
|
1330
1384
|
const Layout = (props) => {
|
|
1331
|
-
({ ...defaultProps$
|
|
1385
|
+
({ ...defaultProps$1l, ...props });
|
|
1332
1386
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1333
1387
|
className: "nut-layout"
|
|
1334
1388
|
}, "Layout");
|
|
1335
1389
|
};
|
|
1336
|
-
Layout.defaultProps = defaultProps$
|
|
1390
|
+
Layout.defaultProps = defaultProps$1l;
|
|
1337
1391
|
Layout.displayName = "NutLayout";
|
|
1338
1392
|
const DataContext$2 = React.createContext({});
|
|
1339
|
-
const defaultProps$
|
|
1393
|
+
const defaultProps$1k = {
|
|
1340
1394
|
span: "24",
|
|
1341
1395
|
offset: "0",
|
|
1342
1396
|
gutter: "0"
|
|
@@ -1350,7 +1404,7 @@
|
|
|
1350
1404
|
children,
|
|
1351
1405
|
onClick
|
|
1352
1406
|
} = {
|
|
1353
|
-
...defaultProps$
|
|
1407
|
+
...defaultProps$1k,
|
|
1354
1408
|
...props
|
|
1355
1409
|
};
|
|
1356
1410
|
const [colName, setColName] = React.useState("");
|
|
@@ -1378,9 +1432,9 @@
|
|
|
1378
1432
|
}
|
|
1379
1433
|
}, children);
|
|
1380
1434
|
};
|
|
1381
|
-
Col.defaultProps = defaultProps$
|
|
1435
|
+
Col.defaultProps = defaultProps$1k;
|
|
1382
1436
|
Col.displayName = "NutCol";
|
|
1383
|
-
const defaultProps$
|
|
1437
|
+
const defaultProps$1j = {
|
|
1384
1438
|
type: "",
|
|
1385
1439
|
justify: "start",
|
|
1386
1440
|
align: "flex-start",
|
|
@@ -1399,7 +1453,7 @@
|
|
|
1399
1453
|
gutter,
|
|
1400
1454
|
onClick
|
|
1401
1455
|
} = {
|
|
1402
|
-
...defaultProps$
|
|
1456
|
+
...defaultProps$1j,
|
|
1403
1457
|
...props
|
|
1404
1458
|
};
|
|
1405
1459
|
const prefixCls = "nut-row";
|
|
@@ -1434,9 +1488,9 @@
|
|
|
1434
1488
|
children
|
|
1435
1489
|
));
|
|
1436
1490
|
};
|
|
1437
|
-
Row.defaultProps = defaultProps$
|
|
1491
|
+
Row.defaultProps = defaultProps$1j;
|
|
1438
1492
|
Row.displayName = "NutRow";
|
|
1439
|
-
const defaultProps$
|
|
1493
|
+
const defaultProps$1i = {
|
|
1440
1494
|
contentPosition: "center",
|
|
1441
1495
|
dashed: false,
|
|
1442
1496
|
hairline: true,
|
|
@@ -1453,7 +1507,7 @@
|
|
|
1453
1507
|
direction,
|
|
1454
1508
|
...rest
|
|
1455
1509
|
} = {
|
|
1456
|
-
...defaultProps$
|
|
1510
|
+
...defaultProps$1i,
|
|
1457
1511
|
...props
|
|
1458
1512
|
};
|
|
1459
1513
|
const dividerBem = cn("divider");
|
|
@@ -1474,9 +1528,9 @@
|
|
|
1474
1528
|
...rest
|
|
1475
1529
|
}, children);
|
|
1476
1530
|
};
|
|
1477
|
-
Divider.defaultProps = defaultProps$
|
|
1531
|
+
Divider.defaultProps = defaultProps$1i;
|
|
1478
1532
|
Divider.displayName = "NutDivider";
|
|
1479
|
-
const defaultProps$
|
|
1533
|
+
const defaultProps$1h = {
|
|
1480
1534
|
columnNum: 4,
|
|
1481
1535
|
border: true,
|
|
1482
1536
|
gutter: 0,
|
|
@@ -1503,7 +1557,7 @@
|
|
|
1503
1557
|
iconColor,
|
|
1504
1558
|
className,
|
|
1505
1559
|
...rest
|
|
1506
|
-
} = { ...defaultProps$
|
|
1560
|
+
} = { ...defaultProps$1h, ...props };
|
|
1507
1561
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
1508
1562
|
const pxCheck2 = (value) => {
|
|
1509
1563
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1542,9 +1596,9 @@
|
|
|
1542
1596
|
});
|
|
1543
1597
|
}));
|
|
1544
1598
|
};
|
|
1545
|
-
Grid.defaultProps = defaultProps$
|
|
1599
|
+
Grid.defaultProps = defaultProps$1h;
|
|
1546
1600
|
Grid.displayName = "NutGrid";
|
|
1547
|
-
const defaultProps$
|
|
1601
|
+
const defaultProps$1g = {
|
|
1548
1602
|
...ComponentDefaults,
|
|
1549
1603
|
text: "",
|
|
1550
1604
|
icon: "",
|
|
@@ -1583,7 +1637,7 @@
|
|
|
1583
1637
|
onClick,
|
|
1584
1638
|
...rest
|
|
1585
1639
|
} = {
|
|
1586
|
-
...defaultProps$
|
|
1640
|
+
...defaultProps$1g,
|
|
1587
1641
|
...props
|
|
1588
1642
|
};
|
|
1589
1643
|
const b2 = cn("grid-item");
|
|
@@ -1631,7 +1685,7 @@
|
|
|
1631
1685
|
className: "nut-grid-item__text"
|
|
1632
1686
|
}, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
|
|
1633
1687
|
};
|
|
1634
|
-
GridItem.defaultProps = defaultProps$
|
|
1688
|
+
GridItem.defaultProps = defaultProps$1g;
|
|
1635
1689
|
GridItem.displayName = "NutGridItem";
|
|
1636
1690
|
const defaultConfigRef = {
|
|
1637
1691
|
current: {
|
|
@@ -1646,17 +1700,17 @@
|
|
|
1646
1700
|
return (_a = React.useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1647
1701
|
};
|
|
1648
1702
|
const ConfigContext = React.createContext(null);
|
|
1649
|
-
const defaultProps$
|
|
1703
|
+
const defaultProps$1f = {};
|
|
1650
1704
|
const Sticky = (props) => {
|
|
1651
1705
|
useConfig();
|
|
1652
|
-
({ ...defaultProps$
|
|
1706
|
+
({ ...defaultProps$1f, ...props });
|
|
1653
1707
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1654
1708
|
className: "nut-sticky"
|
|
1655
1709
|
}, "Sticky");
|
|
1656
1710
|
};
|
|
1657
|
-
Sticky.defaultProps = defaultProps$
|
|
1711
|
+
Sticky.defaultProps = defaultProps$1f;
|
|
1658
1712
|
Sticky.displayName = "NutSticky";
|
|
1659
|
-
const defaultProps$
|
|
1713
|
+
const defaultProps$1e = {
|
|
1660
1714
|
...ComponentDefaults,
|
|
1661
1715
|
title: "",
|
|
1662
1716
|
desc: "",
|
|
@@ -1692,7 +1746,7 @@
|
|
|
1692
1746
|
iconClassPrefix,
|
|
1693
1747
|
iconFontClassName
|
|
1694
1748
|
} = {
|
|
1695
|
-
...defaultProps$
|
|
1749
|
+
...defaultProps$1e,
|
|
1696
1750
|
...props
|
|
1697
1751
|
};
|
|
1698
1752
|
const b2 = cn("navbar");
|
|
@@ -1761,9 +1815,9 @@
|
|
|
1761
1815
|
className: `${b2("")}--placeholder`
|
|
1762
1816
|
}, renderWrapper()) : renderWrapper());
|
|
1763
1817
|
};
|
|
1764
|
-
NavBar.defaultProps = defaultProps$
|
|
1818
|
+
NavBar.defaultProps = defaultProps$1e;
|
|
1765
1819
|
NavBar.displayName = "NutNavBar";
|
|
1766
|
-
const defaultProps$
|
|
1820
|
+
const defaultProps$1d = {
|
|
1767
1821
|
...ComponentDefaults,
|
|
1768
1822
|
fixednavClass: "nut-fixednav",
|
|
1769
1823
|
activeText: "",
|
|
@@ -1793,7 +1847,7 @@
|
|
|
1793
1847
|
iconFontClassName,
|
|
1794
1848
|
...rest
|
|
1795
1849
|
} = {
|
|
1796
|
-
...defaultProps$
|
|
1850
|
+
...defaultProps$1d,
|
|
1797
1851
|
...props
|
|
1798
1852
|
};
|
|
1799
1853
|
const b2 = cn("fixednav");
|
|
@@ -1848,9 +1902,9 @@
|
|
|
1848
1902
|
className: "text"
|
|
1849
1903
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
1850
1904
|
};
|
|
1851
|
-
FixedNav.defaultProps = defaultProps$
|
|
1905
|
+
FixedNav.defaultProps = defaultProps$1d;
|
|
1852
1906
|
FixedNav.displayName = "NutFixedNav";
|
|
1853
|
-
const defaultProps$
|
|
1907
|
+
const defaultProps$1c = {
|
|
1854
1908
|
visible: 0,
|
|
1855
1909
|
bottom: false,
|
|
1856
1910
|
size: 20,
|
|
@@ -1878,7 +1932,7 @@
|
|
|
1878
1932
|
tabSwitch,
|
|
1879
1933
|
onSwitch
|
|
1880
1934
|
} = {
|
|
1881
|
-
...defaultProps$
|
|
1935
|
+
...defaultProps$1c,
|
|
1882
1936
|
...props
|
|
1883
1937
|
};
|
|
1884
1938
|
const b2 = cn("tabbar");
|
|
@@ -1914,9 +1968,9 @@
|
|
|
1914
1968
|
return React__default["default"].cloneElement(child, childProps);
|
|
1915
1969
|
}));
|
|
1916
1970
|
};
|
|
1917
|
-
Tabbar.defaultProps = defaultProps$
|
|
1971
|
+
Tabbar.defaultProps = defaultProps$1c;
|
|
1918
1972
|
Tabbar.displayName = "NutTabbar";
|
|
1919
|
-
const defaultProps$
|
|
1973
|
+
const defaultProps$1b = {
|
|
1920
1974
|
...ComponentDefaults,
|
|
1921
1975
|
dot: false,
|
|
1922
1976
|
size: "",
|
|
@@ -1952,7 +2006,7 @@
|
|
|
1952
2006
|
iconClassPrefix,
|
|
1953
2007
|
iconFontClassName
|
|
1954
2008
|
} = {
|
|
1955
|
-
...defaultProps$
|
|
2009
|
+
...defaultProps$1b,
|
|
1956
2010
|
...props
|
|
1957
2011
|
};
|
|
1958
2012
|
const b2 = cn("tabbar-item");
|
|
@@ -2002,7 +2056,7 @@
|
|
|
2002
2056
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
2003
2057
|
var index_cjs = require$$0;
|
|
2004
2058
|
const elevatorContext = React.createContext({});
|
|
2005
|
-
const defaultProps$
|
|
2059
|
+
const defaultProps$1a = {
|
|
2006
2060
|
height: "200px",
|
|
2007
2061
|
acceptKey: "title",
|
|
2008
2062
|
indexList: [],
|
|
@@ -2025,7 +2079,7 @@
|
|
|
2025
2079
|
children,
|
|
2026
2080
|
...rest
|
|
2027
2081
|
} = {
|
|
2028
|
-
...defaultProps$
|
|
2082
|
+
...defaultProps$1a,
|
|
2029
2083
|
...props
|
|
2030
2084
|
};
|
|
2031
2085
|
const b2 = cn("elevator");
|
|
@@ -2225,9 +2279,9 @@
|
|
|
2225
2279
|
}, item[acceptKey]);
|
|
2226
2280
|
}))));
|
|
2227
2281
|
};
|
|
2228
|
-
Elevator.defaultProps = defaultProps$
|
|
2282
|
+
Elevator.defaultProps = defaultProps$1a;
|
|
2229
2283
|
Elevator.displayName = "NutElevator";
|
|
2230
|
-
const defaultProps$
|
|
2284
|
+
const defaultProps$19 = {
|
|
2231
2285
|
defaultValue: 1,
|
|
2232
2286
|
mode: "multi",
|
|
2233
2287
|
prevText: "",
|
|
@@ -2244,7 +2298,7 @@
|
|
|
2244
2298
|
};
|
|
2245
2299
|
const Pagination = (props) => {
|
|
2246
2300
|
const { locale } = useConfig$1();
|
|
2247
|
-
({ ...defaultProps$
|
|
2301
|
+
({ ...defaultProps$19, ...props });
|
|
2248
2302
|
const {
|
|
2249
2303
|
modelValue,
|
|
2250
2304
|
mode,
|
|
@@ -2361,7 +2415,7 @@
|
|
|
2361
2415
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2362
2416
|
}, nextText || locale.pagination.next));
|
|
2363
2417
|
};
|
|
2364
|
-
Pagination.defaultProps = defaultProps$
|
|
2418
|
+
Pagination.defaultProps = defaultProps$19;
|
|
2365
2419
|
Pagination.displayName = "NutPagination";
|
|
2366
2420
|
class Title {
|
|
2367
2421
|
constructor() {
|
|
@@ -2371,7 +2425,7 @@
|
|
|
2371
2425
|
this.index = 0;
|
|
2372
2426
|
}
|
|
2373
2427
|
}
|
|
2374
|
-
const defaultProps$
|
|
2428
|
+
const defaultProps$18 = {
|
|
2375
2429
|
...ComponentDefaults,
|
|
2376
2430
|
tabStyle: {},
|
|
2377
2431
|
value: 0,
|
|
@@ -2412,7 +2466,7 @@
|
|
|
2412
2466
|
iconFontClassName,
|
|
2413
2467
|
...rest
|
|
2414
2468
|
} = {
|
|
2415
|
-
...defaultProps$
|
|
2469
|
+
...defaultProps$18,
|
|
2416
2470
|
...props
|
|
2417
2471
|
};
|
|
2418
2472
|
const [currentItem, setCurrentItem] = React.useState({ index: 0 });
|
|
@@ -2457,7 +2511,7 @@
|
|
|
2457
2511
|
color: type === "smile" ? color : "",
|
|
2458
2512
|
background: type === "line" ? color : ""
|
|
2459
2513
|
};
|
|
2460
|
-
const index = titles.current.findIndex((
|
|
2514
|
+
const index = titles.current.findIndex((t2) => t2.paneKey === value);
|
|
2461
2515
|
const contentStyle = {
|
|
2462
2516
|
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
2463
2517
|
transitionDuration: `${animatedTime}ms`
|
|
@@ -2530,9 +2584,9 @@
|
|
|
2530
2584
|
return React__default["default"].cloneElement(child, childProps);
|
|
2531
2585
|
}))));
|
|
2532
2586
|
};
|
|
2533
|
-
Tabs.defaultProps = defaultProps$
|
|
2587
|
+
Tabs.defaultProps = defaultProps$18;
|
|
2534
2588
|
Tabs.displayName = "NutTabs";
|
|
2535
|
-
const defaultProps$
|
|
2589
|
+
const defaultProps$17 = {
|
|
2536
2590
|
title: "",
|
|
2537
2591
|
paneKey: "",
|
|
2538
2592
|
activeKey: "",
|
|
@@ -2540,7 +2594,7 @@
|
|
|
2540
2594
|
};
|
|
2541
2595
|
const TabPane = (props) => {
|
|
2542
2596
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2543
|
-
...defaultProps$
|
|
2597
|
+
...defaultProps$17,
|
|
2544
2598
|
...props
|
|
2545
2599
|
};
|
|
2546
2600
|
const b2 = cn("tabpane");
|
|
@@ -2556,7 +2610,7 @@
|
|
|
2556
2610
|
className: classes
|
|
2557
2611
|
}, children);
|
|
2558
2612
|
};
|
|
2559
|
-
const defaultProps$
|
|
2613
|
+
const defaultProps$16 = {
|
|
2560
2614
|
size: 3,
|
|
2561
2615
|
current: 1,
|
|
2562
2616
|
block: false,
|
|
@@ -2576,7 +2630,7 @@
|
|
|
2576
2630
|
vertical,
|
|
2577
2631
|
...rest
|
|
2578
2632
|
} = {
|
|
2579
|
-
...defaultProps$
|
|
2633
|
+
...defaultProps$16,
|
|
2580
2634
|
...props
|
|
2581
2635
|
};
|
|
2582
2636
|
const b2 = cn("indicator");
|
|
@@ -2610,7 +2664,7 @@
|
|
|
2610
2664
|
...rest
|
|
2611
2665
|
}, renderEles());
|
|
2612
2666
|
};
|
|
2613
|
-
Indicator.defaultProps = defaultProps$
|
|
2667
|
+
Indicator.defaultProps = defaultProps$16;
|
|
2614
2668
|
Indicator.displayName = "NutIndicator";
|
|
2615
2669
|
const handleClick = (e2) => {
|
|
2616
2670
|
e2.stopPropagation();
|
|
@@ -2626,7 +2680,7 @@
|
|
|
2626
2680
|
}
|
|
2627
2681
|
};
|
|
2628
2682
|
const OffsetContext = React.createContext(20);
|
|
2629
|
-
const defaultProps$
|
|
2683
|
+
const defaultProps$15 = {
|
|
2630
2684
|
showhead: false,
|
|
2631
2685
|
position: "left",
|
|
2632
2686
|
width: "80%"
|
|
@@ -2644,7 +2698,7 @@
|
|
|
2644
2698
|
onClose,
|
|
2645
2699
|
...rest
|
|
2646
2700
|
} = {
|
|
2647
|
-
...defaultProps$
|
|
2701
|
+
...defaultProps$15,
|
|
2648
2702
|
...props
|
|
2649
2703
|
};
|
|
2650
2704
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2672,14 +2726,14 @@
|
|
|
2672
2726
|
className: "nut-sidenavbar__content"
|
|
2673
2727
|
}, children))))));
|
|
2674
2728
|
};
|
|
2675
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2729
|
+
SideNavBar.defaultProps = defaultProps$15;
|
|
2676
2730
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2677
|
-
const defaultProps$
|
|
2731
|
+
const defaultProps$14 = {
|
|
2678
2732
|
open: true
|
|
2679
2733
|
};
|
|
2680
2734
|
const SubSideNavBar = (props) => {
|
|
2681
2735
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2682
|
-
...defaultProps$
|
|
2736
|
+
...defaultProps$14,
|
|
2683
2737
|
...props
|
|
2684
2738
|
};
|
|
2685
2739
|
const offset = React.useContext(OffsetContext);
|
|
@@ -2750,7 +2804,7 @@
|
|
|
2750
2804
|
...rest
|
|
2751
2805
|
}, title);
|
|
2752
2806
|
};
|
|
2753
|
-
const defaultProps$
|
|
2807
|
+
const defaultProps$13 = {
|
|
2754
2808
|
...ComponentDefaults,
|
|
2755
2809
|
className: "",
|
|
2756
2810
|
style: {},
|
|
@@ -2773,7 +2827,7 @@
|
|
|
2773
2827
|
iconFontClassName,
|
|
2774
2828
|
...rest
|
|
2775
2829
|
} = {
|
|
2776
|
-
...defaultProps$
|
|
2830
|
+
...defaultProps$13,
|
|
2777
2831
|
...props
|
|
2778
2832
|
};
|
|
2779
2833
|
const parentRef = React.useRef(null);
|
|
@@ -2870,9 +2924,9 @@
|
|
|
2870
2924
|
})));
|
|
2871
2925
|
})), cloneChildren()));
|
|
2872
2926
|
};
|
|
2873
|
-
Menu.defaultProps = defaultProps$
|
|
2927
|
+
Menu.defaultProps = defaultProps$13;
|
|
2874
2928
|
Menu.displayName = "NutMenu";
|
|
2875
|
-
const defaultProps
|
|
2929
|
+
const defaultProps$12 = {
|
|
2876
2930
|
...ComponentDefaults,
|
|
2877
2931
|
className: "",
|
|
2878
2932
|
style: {},
|
|
@@ -2887,7 +2941,7 @@
|
|
|
2887
2941
|
};
|
|
2888
2942
|
const MenuItem = React.forwardRef((props, ref) => {
|
|
2889
2943
|
useConfig$1();
|
|
2890
|
-
const mergedProps = { ...defaultProps
|
|
2944
|
+
const mergedProps = { ...defaultProps$12, ...props };
|
|
2891
2945
|
const {
|
|
2892
2946
|
style,
|
|
2893
2947
|
options,
|
|
@@ -2903,7 +2957,7 @@
|
|
|
2903
2957
|
iconClassPrefix,
|
|
2904
2958
|
iconFontClassName
|
|
2905
2959
|
} = {
|
|
2906
|
-
...defaultProps
|
|
2960
|
+
...defaultProps$12,
|
|
2907
2961
|
...props
|
|
2908
2962
|
};
|
|
2909
2963
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -2941,8 +2995,8 @@
|
|
|
2941
2995
|
});
|
|
2942
2996
|
const getParentOffset = () => {
|
|
2943
2997
|
setTimeout(async () => {
|
|
2944
|
-
const
|
|
2945
|
-
const rect = await
|
|
2998
|
+
const p2 = parent.parent().current;
|
|
2999
|
+
const rect = await p2.getBoundingClientRect();
|
|
2946
3000
|
setPosition({
|
|
2947
3001
|
height: rect.height,
|
|
2948
3002
|
top: rect.top
|
|
@@ -3024,14 +3078,14 @@
|
|
|
3024
3078
|
}, item.text));
|
|
3025
3079
|
}), children))));
|
|
3026
3080
|
});
|
|
3027
|
-
MenuItem.defaultProps = defaultProps
|
|
3081
|
+
MenuItem.defaultProps = defaultProps$12;
|
|
3028
3082
|
MenuItem.displayName = "NutMenuItem";
|
|
3029
3083
|
const MIN_DISTANCE = 10;
|
|
3030
|
-
function getDirection(
|
|
3031
|
-
if (
|
|
3084
|
+
function getDirection(x2, y2) {
|
|
3085
|
+
if (x2 > y2 && x2 > MIN_DISTANCE) {
|
|
3032
3086
|
return "horizontal";
|
|
3033
3087
|
}
|
|
3034
|
-
if (
|
|
3088
|
+
if (y2 > x2 && y2 > MIN_DISTANCE) {
|
|
3035
3089
|
return "vertical";
|
|
3036
3090
|
}
|
|
3037
3091
|
return "";
|
|
@@ -3095,7 +3149,7 @@
|
|
|
3095
3149
|
const res = await element.getBoundingClientRect();
|
|
3096
3150
|
return res;
|
|
3097
3151
|
};
|
|
3098
|
-
const defaultProps$
|
|
3152
|
+
const defaultProps$11 = {
|
|
3099
3153
|
name: "",
|
|
3100
3154
|
size: "",
|
|
3101
3155
|
classPrefix: "nut-icon",
|
|
@@ -3123,7 +3177,7 @@
|
|
|
3123
3177
|
onClick,
|
|
3124
3178
|
...rest
|
|
3125
3179
|
} = {
|
|
3126
|
-
...defaultProps$
|
|
3180
|
+
...defaultProps$11,
|
|
3127
3181
|
...props
|
|
3128
3182
|
};
|
|
3129
3183
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3157,9 +3211,9 @@
|
|
|
3157
3211
|
children
|
|
3158
3212
|
);
|
|
3159
3213
|
}
|
|
3160
|
-
Icon.defaultProps = defaultProps$
|
|
3214
|
+
Icon.defaultProps = defaultProps$11;
|
|
3161
3215
|
Icon.displayName = "NutIcon";
|
|
3162
|
-
const defaultProps$
|
|
3216
|
+
const defaultProps$10 = {
|
|
3163
3217
|
id: "",
|
|
3164
3218
|
style: {},
|
|
3165
3219
|
icon: null,
|
|
@@ -3204,7 +3258,7 @@
|
|
|
3204
3258
|
visible,
|
|
3205
3259
|
onClose,
|
|
3206
3260
|
...rest
|
|
3207
|
-
} = { ...defaultProps$
|
|
3261
|
+
} = { ...defaultProps$10, ...props };
|
|
3208
3262
|
let timer;
|
|
3209
3263
|
const [openState, SetOpenState] = React.useState(false);
|
|
3210
3264
|
React.useEffect(() => {
|
|
@@ -3293,9 +3347,9 @@
|
|
|
3293
3347
|
className: toastBem("text")
|
|
3294
3348
|
}, msg))) : null);
|
|
3295
3349
|
};
|
|
3296
|
-
Toast.defaultProps = defaultProps$
|
|
3350
|
+
Toast.defaultProps = defaultProps$10;
|
|
3297
3351
|
Toast.displayName = "NutToast";
|
|
3298
|
-
const defaultProps
|
|
3352
|
+
const defaultProps$$ = {
|
|
3299
3353
|
range: false,
|
|
3300
3354
|
hiddenRange: false,
|
|
3301
3355
|
hiddenTag: false,
|
|
@@ -3328,9 +3382,12 @@
|
|
|
3328
3382
|
dragEnd,
|
|
3329
3383
|
onChange,
|
|
3330
3384
|
onDragStart,
|
|
3331
|
-
onDragEnd
|
|
3332
|
-
|
|
3333
|
-
|
|
3385
|
+
onDragEnd,
|
|
3386
|
+
minDesc,
|
|
3387
|
+
maxDesc,
|
|
3388
|
+
curValueDesc
|
|
3389
|
+
} = { ...defaultProps$$, ...props };
|
|
3390
|
+
let { min, max, step } = { ...defaultProps$$, ...props };
|
|
3334
3391
|
min = Number(min);
|
|
3335
3392
|
max = Number(max);
|
|
3336
3393
|
step = Number(step);
|
|
@@ -3507,10 +3564,10 @@
|
|
|
3507
3564
|
}
|
|
3508
3565
|
SetDragStatus("");
|
|
3509
3566
|
const rect = await getRectByTaro(root.current);
|
|
3510
|
-
let delta = event.detail.x - rect.left;
|
|
3567
|
+
let delta = (event.detail.x ? event.detail.x : event.clientX) - rect.left;
|
|
3511
3568
|
let total = rect.width;
|
|
3512
3569
|
if (vertical) {
|
|
3513
|
-
delta = event.detail.y - rect.top;
|
|
3570
|
+
delta = (event.detail.y ? event.detail.y : event.clientY) - rect.top;
|
|
3514
3571
|
total = rect.height;
|
|
3515
3572
|
}
|
|
3516
3573
|
const value = Number(min) + delta / total * scope();
|
|
@@ -3586,7 +3643,7 @@
|
|
|
3586
3643
|
className: `${containerName}`
|
|
3587
3644
|
}, !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3588
3645
|
className: "min"
|
|
3589
|
-
}, +min) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3646
|
+
}, minDesc || +min) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3590
3647
|
ref: root,
|
|
3591
3648
|
style: wrapperStyle(),
|
|
3592
3649
|
className: `${rangeName}`,
|
|
@@ -3641,7 +3698,7 @@
|
|
|
3641
3698
|
style: buttonStyle()
|
|
3642
3699
|
}, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3643
3700
|
className: "number"
|
|
3644
|
-
}, curValue(index)) : null));
|
|
3701
|
+
}, curValueDesc || curValue(index)) : null));
|
|
3645
3702
|
}) : /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3646
3703
|
role: "slider",
|
|
3647
3704
|
className: "nut-range-button-wrapper",
|
|
@@ -3670,9 +3727,9 @@
|
|
|
3670
3727
|
style: buttonStyle()
|
|
3671
3728
|
}, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3672
3729
|
className: "number"
|
|
3673
|
-
}, curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3730
|
+
}, curValueDesc || curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3674
3731
|
className: "max"
|
|
3675
|
-
}, +max) : null, /* @__PURE__ */ React__default["default"].createElement(Toast, {
|
|
3732
|
+
}, maxDesc || +max) : null, /* @__PURE__ */ React__default["default"].createElement(Toast, {
|
|
3676
3733
|
type: "text",
|
|
3677
3734
|
visible: show,
|
|
3678
3735
|
msg: toastMsg,
|
|
@@ -3681,11 +3738,11 @@
|
|
|
3681
3738
|
}
|
|
3682
3739
|
}));
|
|
3683
3740
|
};
|
|
3684
|
-
Range.defaultProps = defaultProps
|
|
3741
|
+
Range.defaultProps = defaultProps$$;
|
|
3685
3742
|
Range.displayName = "NutRange";
|
|
3686
3743
|
const Utils = {
|
|
3687
|
-
isLeapYear(
|
|
3688
|
-
return
|
|
3744
|
+
isLeapYear(y2) {
|
|
3745
|
+
return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0;
|
|
3689
3746
|
},
|
|
3690
3747
|
getWhatDay(year, month, day) {
|
|
3691
3748
|
const date = new Date(`${year}/${month}/${day}`);
|
|
@@ -3729,16 +3786,16 @@
|
|
|
3729
3786
|
31
|
|
3730
3787
|
][month];
|
|
3731
3788
|
},
|
|
3732
|
-
getNumTwoBit(
|
|
3733
|
-
|
|
3734
|
-
return (
|
|
3789
|
+
getNumTwoBit(n2) {
|
|
3790
|
+
n2 = Number(n2);
|
|
3791
|
+
return (n2 > 9 ? "" : "0") + n2;
|
|
3735
3792
|
},
|
|
3736
3793
|
date2Str(date, split) {
|
|
3737
3794
|
split = split || "-";
|
|
3738
|
-
const
|
|
3739
|
-
const
|
|
3740
|
-
const
|
|
3741
|
-
return [
|
|
3795
|
+
const y2 = date.getFullYear();
|
|
3796
|
+
const m2 = this.getNumTwoBit(date.getMonth() + 1);
|
|
3797
|
+
const d2 = this.getNumTwoBit(date.getDate());
|
|
3798
|
+
return [y2, m2, d2].join(split);
|
|
3742
3799
|
},
|
|
3743
3800
|
getDay(i) {
|
|
3744
3801
|
i = i || 0;
|
|
@@ -3775,7 +3832,7 @@
|
|
|
3775
3832
|
};
|
|
3776
3833
|
}
|
|
3777
3834
|
var requestAniFrame$1 = requestAniFrame();
|
|
3778
|
-
const defaultProps$
|
|
3835
|
+
const defaultProps$_ = {
|
|
3779
3836
|
type: "one",
|
|
3780
3837
|
isAutoBackFill: false,
|
|
3781
3838
|
poppable: true,
|
|
@@ -3804,7 +3861,7 @@
|
|
|
3804
3861
|
onChoose,
|
|
3805
3862
|
onUpdate,
|
|
3806
3863
|
onClose
|
|
3807
|
-
} = { ...defaultProps$
|
|
3864
|
+
} = { ...defaultProps$_, ...props };
|
|
3808
3865
|
const weeks = locale.calendaritem.weekdays;
|
|
3809
3866
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
3810
3867
|
const [unLoadPrev, setUnLoadPrev] = React.useState(false);
|
|
@@ -3965,9 +4022,9 @@
|
|
|
3965
4022
|
if (type2 === "prev" && days >= 7) {
|
|
3966
4023
|
days -= 7;
|
|
3967
4024
|
}
|
|
3968
|
-
return Array.from(Array(days), (
|
|
4025
|
+
return Array.from(Array(days), (v2, k2) => {
|
|
3969
4026
|
return {
|
|
3970
|
-
day:
|
|
4027
|
+
day: k2 + 1,
|
|
3971
4028
|
type: type2
|
|
3972
4029
|
};
|
|
3973
4030
|
});
|
|
@@ -4040,16 +4097,16 @@
|
|
|
4040
4097
|
const setMove = (move, type2, time) => {
|
|
4041
4098
|
var _a, _b;
|
|
4042
4099
|
let updateMove = move + state.transformY;
|
|
4043
|
-
const
|
|
4100
|
+
const h2 = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4044
4101
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4045
4102
|
if (type2 === "end") {
|
|
4046
4103
|
if (updateMove > 0) {
|
|
4047
4104
|
updateMove = 0;
|
|
4048
4105
|
}
|
|
4049
|
-
if (updateMove < 0 && updateMove < -offsetHeight +
|
|
4050
|
-
updateMove = -offsetHeight +
|
|
4106
|
+
if (updateMove < 0 && updateMove < -offsetHeight + h2) {
|
|
4107
|
+
updateMove = -offsetHeight + h2;
|
|
4051
4108
|
}
|
|
4052
|
-
if (offsetHeight <=
|
|
4109
|
+
if (offsetHeight <= h2 && state.monthsData.length === 1) {
|
|
4053
4110
|
updateMove = 0;
|
|
4054
4111
|
}
|
|
4055
4112
|
setTransform(updateMove, type2, time);
|
|
@@ -4057,8 +4114,8 @@
|
|
|
4057
4114
|
if (updateMove > 0 && updateMove > 100) {
|
|
4058
4115
|
updateMove = 100;
|
|
4059
4116
|
}
|
|
4060
|
-
if (updateMove < -offsetHeight +
|
|
4061
|
-
updateMove = -offsetHeight +
|
|
4117
|
+
if (updateMove < -offsetHeight + h2 - 100 && state.monthsData.length > 1) {
|
|
4118
|
+
updateMove = -offsetHeight + h2 - 100;
|
|
4062
4119
|
}
|
|
4063
4120
|
if (updateMove < 0 && updateMove < -100 && state.monthsData.length === 1) {
|
|
4064
4121
|
updateMove = -100;
|
|
@@ -4095,11 +4152,11 @@
|
|
|
4095
4152
|
return false;
|
|
4096
4153
|
}
|
|
4097
4154
|
const updateMove = move + state.transformY;
|
|
4098
|
-
const
|
|
4155
|
+
const h2 = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4099
4156
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4100
4157
|
if (updateMove > 0) {
|
|
4101
4158
|
getMonth(getCurrData("prev"), "prev");
|
|
4102
|
-
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) >
|
|
4159
|
+
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h2 ? Math.abs(move) : h2) * 5) {
|
|
4103
4160
|
getMonth(getCurrData("next"), "next");
|
|
4104
4161
|
if (Math.abs(move) >= 300) {
|
|
4105
4162
|
getMonth(getCurrData("next"), "next");
|
|
@@ -4228,9 +4285,9 @@
|
|
|
4228
4285
|
onClick: confirm
|
|
4229
4286
|
}, locale.confirm)) : ""));
|
|
4230
4287
|
};
|
|
4231
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4288
|
+
CalendarItem.defaultProps = defaultProps$_;
|
|
4232
4289
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4233
|
-
const defaultProps$
|
|
4290
|
+
const defaultProps$Z = {
|
|
4234
4291
|
type: "one",
|
|
4235
4292
|
isAutoBackFill: false,
|
|
4236
4293
|
poppable: true,
|
|
@@ -4258,7 +4315,7 @@
|
|
|
4258
4315
|
endDate,
|
|
4259
4316
|
onClose,
|
|
4260
4317
|
onChoose
|
|
4261
|
-
} = { ...defaultProps$
|
|
4318
|
+
} = { ...defaultProps$Z, ...props };
|
|
4262
4319
|
const close = () => {
|
|
4263
4320
|
onClose && onClose();
|
|
4264
4321
|
};
|
|
@@ -4275,9 +4332,12 @@
|
|
|
4275
4332
|
visible,
|
|
4276
4333
|
position: "bottom",
|
|
4277
4334
|
round: true,
|
|
4335
|
+
duration: 0.5,
|
|
4278
4336
|
closeable: true,
|
|
4337
|
+
destroyOnClose: true,
|
|
4279
4338
|
onClickOverlay: closePopup,
|
|
4280
|
-
onClickCloseIcon: closePopup
|
|
4339
|
+
onClickCloseIcon: closePopup,
|
|
4340
|
+
style: { height: "85vh" }
|
|
4281
4341
|
}, /* @__PURE__ */ React__default["default"].createElement(CalendarItem, {
|
|
4282
4342
|
type,
|
|
4283
4343
|
isAutoBackFill,
|
|
@@ -4301,9 +4361,9 @@
|
|
|
4301
4361
|
onChoose: choose
|
|
4302
4362
|
}));
|
|
4303
4363
|
};
|
|
4304
|
-
Calendar.defaultProps = defaultProps$
|
|
4364
|
+
Calendar.defaultProps = defaultProps$Z;
|
|
4305
4365
|
Calendar.displayName = "NutCalendar";
|
|
4306
|
-
const defaultProps$
|
|
4366
|
+
const defaultProps$Y = {
|
|
4307
4367
|
disabled: false,
|
|
4308
4368
|
checkedValue: [],
|
|
4309
4369
|
max: void 0,
|
|
@@ -4313,7 +4373,7 @@
|
|
|
4313
4373
|
};
|
|
4314
4374
|
const CheckboxGroup = React__default["default"].forwardRef(
|
|
4315
4375
|
(props, ref) => {
|
|
4316
|
-
const { children } = { ...defaultProps$
|
|
4376
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
4317
4377
|
const b2 = cn("checkboxgroup");
|
|
4318
4378
|
const {
|
|
4319
4379
|
className,
|
|
@@ -4346,7 +4406,7 @@
|
|
|
4346
4406
|
childrenLabel.push(childProps.label || child.children);
|
|
4347
4407
|
});
|
|
4348
4408
|
const reverse = childrenLabel.filter(
|
|
4349
|
-
(
|
|
4409
|
+
(c6) => (innerValue == null ? void 0 : innerValue.findIndex((v2) => v2 === c6)) === -1
|
|
4350
4410
|
);
|
|
4351
4411
|
setInnerValue(reverse);
|
|
4352
4412
|
}
|
|
@@ -4420,9 +4480,9 @@
|
|
|
4420
4480
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4421
4481
|
}
|
|
4422
4482
|
);
|
|
4423
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4483
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
4424
4484
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4425
|
-
const defaultProps$
|
|
4485
|
+
const defaultProps$X = {
|
|
4426
4486
|
...ComponentDefaults,
|
|
4427
4487
|
checked: false,
|
|
4428
4488
|
disabled: false,
|
|
@@ -4438,7 +4498,7 @@
|
|
|
4438
4498
|
};
|
|
4439
4499
|
const Checkbox = (props) => {
|
|
4440
4500
|
const { children } = {
|
|
4441
|
-
...defaultProps$
|
|
4501
|
+
...defaultProps$X,
|
|
4442
4502
|
...props
|
|
4443
4503
|
};
|
|
4444
4504
|
const b2 = cn("checkbox");
|
|
@@ -4520,7 +4580,7 @@
|
|
|
4520
4580
|
onClick: handleClick2
|
|
4521
4581
|
}, renderIcon(), renderLabel());
|
|
4522
4582
|
};
|
|
4523
|
-
Checkbox.defaultProps = defaultProps$
|
|
4583
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
4524
4584
|
Checkbox.displayName = "NutCheckBox";
|
|
4525
4585
|
Checkbox.Group = CheckboxGroup;
|
|
4526
4586
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4967,7 +5027,7 @@
|
|
|
4967
5027
|
};
|
|
4968
5028
|
const Picker = React__default["default"].forwardRef(InternalPicker);
|
|
4969
5029
|
const currentYear = new Date().getFullYear();
|
|
4970
|
-
const defaultProps$
|
|
5030
|
+
const defaultProps$W = {
|
|
4971
5031
|
modelValue: null,
|
|
4972
5032
|
visible: false,
|
|
4973
5033
|
title: "",
|
|
@@ -4998,7 +5058,7 @@
|
|
|
4998
5058
|
style,
|
|
4999
5059
|
...rest
|
|
5000
5060
|
} = {
|
|
5001
|
-
...defaultProps$
|
|
5061
|
+
...defaultProps$W,
|
|
5002
5062
|
...props
|
|
5003
5063
|
};
|
|
5004
5064
|
const [show, setShow] = React.useState(false);
|
|
@@ -5206,21 +5266,21 @@
|
|
|
5206
5266
|
const getDateIndex = (type2) => {
|
|
5207
5267
|
if (!currentDate)
|
|
5208
5268
|
return 0;
|
|
5209
|
-
let
|
|
5269
|
+
let d2 = 0;
|
|
5210
5270
|
if (type2 === "year") {
|
|
5211
|
-
|
|
5271
|
+
d2 = currentDate.getFullYear();
|
|
5212
5272
|
} else if (type2 === "month") {
|
|
5213
|
-
|
|
5273
|
+
d2 = currentDate.getMonth() + 1;
|
|
5214
5274
|
} else if (type2 === "day") {
|
|
5215
|
-
|
|
5275
|
+
d2 = currentDate.getDate();
|
|
5216
5276
|
} else if (type2 === "hour") {
|
|
5217
|
-
|
|
5277
|
+
d2 = currentDate.getHours();
|
|
5218
5278
|
} else if (type2 === "minute") {
|
|
5219
|
-
|
|
5279
|
+
d2 = currentDate.getMinutes();
|
|
5220
5280
|
} else if (type2 === "seconds") {
|
|
5221
|
-
|
|
5281
|
+
d2 = currentDate.getSeconds();
|
|
5222
5282
|
}
|
|
5223
|
-
return
|
|
5283
|
+
return d2;
|
|
5224
5284
|
};
|
|
5225
5285
|
const columns = (date) => {
|
|
5226
5286
|
const val = ranges(date).map((res, columnIndex) => {
|
|
@@ -5263,9 +5323,9 @@
|
|
|
5263
5323
|
ref: pickerRef
|
|
5264
5324
|
}));
|
|
5265
5325
|
};
|
|
5266
|
-
DatePicker.defaultProps = defaultProps$
|
|
5326
|
+
DatePicker.defaultProps = defaultProps$W;
|
|
5267
5327
|
DatePicker.displayName = "NutDatePicker";
|
|
5268
|
-
const defaultProps$
|
|
5328
|
+
const defaultProps$V = {
|
|
5269
5329
|
...ComponentDefaults,
|
|
5270
5330
|
disabled: false,
|
|
5271
5331
|
buttonSize: "",
|
|
@@ -5312,7 +5372,7 @@
|
|
|
5312
5372
|
iconFontClassName,
|
|
5313
5373
|
...restProps
|
|
5314
5374
|
} = {
|
|
5315
|
-
...defaultProps$
|
|
5375
|
+
...defaultProps$V,
|
|
5316
5376
|
...props
|
|
5317
5377
|
};
|
|
5318
5378
|
const [inputValue, setInputValue] = React.useState(modelValue);
|
|
@@ -5343,8 +5403,8 @@
|
|
|
5343
5403
|
const iconAddClasses = classNames("nut-inputnumber__icon", {
|
|
5344
5404
|
"nut-inputnumber__icon--disabled": !addAllow()
|
|
5345
5405
|
});
|
|
5346
|
-
const fixedDecimalPlaces = (
|
|
5347
|
-
return Number(
|
|
5406
|
+
const fixedDecimalPlaces = (v2) => {
|
|
5407
|
+
return Number(v2).toFixed(Number(decimalPlaces));
|
|
5348
5408
|
};
|
|
5349
5409
|
const emitChange = (value, e2) => {
|
|
5350
5410
|
const outputValue = fixedDecimalPlaces(value);
|
|
@@ -5448,7 +5508,7 @@
|
|
|
5448
5508
|
onClick: addNumber
|
|
5449
5509
|
}));
|
|
5450
5510
|
};
|
|
5451
|
-
InputNumber.defaultProps = defaultProps$
|
|
5511
|
+
InputNumber.defaultProps = defaultProps$V;
|
|
5452
5512
|
InputNumber.displayName = "NutInputNumber";
|
|
5453
5513
|
function trimExtraChar(value, char, regExp) {
|
|
5454
5514
|
const index = value.indexOf(char);
|
|
@@ -5474,7 +5534,7 @@
|
|
|
5474
5534
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5475
5535
|
return value.replace(regExp, "");
|
|
5476
5536
|
}
|
|
5477
|
-
const defaultProps$
|
|
5537
|
+
const defaultProps$U = {
|
|
5478
5538
|
...ComponentDefaults,
|
|
5479
5539
|
type: "text",
|
|
5480
5540
|
name: "",
|
|
@@ -5571,7 +5631,7 @@
|
|
|
5571
5631
|
iconFontClassName,
|
|
5572
5632
|
...rest
|
|
5573
5633
|
} = {
|
|
5574
|
-
...defaultProps$
|
|
5634
|
+
...defaultProps$U,
|
|
5575
5635
|
...props
|
|
5576
5636
|
};
|
|
5577
5637
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5802,14 +5862,14 @@
|
|
|
5802
5862
|
}
|
|
5803
5863
|
}, errorMessage) : null)));
|
|
5804
5864
|
});
|
|
5805
|
-
Input.defaultProps = defaultProps$
|
|
5865
|
+
Input.defaultProps = defaultProps$U;
|
|
5806
5866
|
Input.displayName = "NutInput";
|
|
5807
5867
|
const radioContext = {
|
|
5808
5868
|
onChange: (val) => {
|
|
5809
5869
|
}
|
|
5810
5870
|
};
|
|
5811
5871
|
var RadioContext = React__default["default"].createContext(radioContext);
|
|
5812
|
-
const defaultProps$
|
|
5872
|
+
const defaultProps$T = {
|
|
5813
5873
|
value: null,
|
|
5814
5874
|
textPosition: "right",
|
|
5815
5875
|
onChange: (value) => {
|
|
@@ -5819,7 +5879,7 @@
|
|
|
5819
5879
|
};
|
|
5820
5880
|
const RadioGroup = React__default["default"].forwardRef(
|
|
5821
5881
|
(props, ref) => {
|
|
5822
|
-
const { children } = { ...defaultProps$
|
|
5882
|
+
const { children } = { ...defaultProps$T, ...props };
|
|
5823
5883
|
cn("RadioGroup");
|
|
5824
5884
|
const {
|
|
5825
5885
|
className,
|
|
@@ -5884,9 +5944,9 @@
|
|
|
5884
5944
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
5885
5945
|
}
|
|
5886
5946
|
);
|
|
5887
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5947
|
+
RadioGroup.defaultProps = defaultProps$T;
|
|
5888
5948
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5889
|
-
const defaultProps$
|
|
5949
|
+
const defaultProps$S = {
|
|
5890
5950
|
...ComponentDefaults,
|
|
5891
5951
|
disabled: false,
|
|
5892
5952
|
checked: false,
|
|
@@ -5901,7 +5961,7 @@
|
|
|
5901
5961
|
};
|
|
5902
5962
|
const Radio$1 = (props) => {
|
|
5903
5963
|
const { children } = {
|
|
5904
|
-
...defaultProps$
|
|
5964
|
+
...defaultProps$S,
|
|
5905
5965
|
...props
|
|
5906
5966
|
};
|
|
5907
5967
|
const {
|
|
@@ -5923,7 +5983,7 @@
|
|
|
5923
5983
|
const [checkedStatement, setCheckedStatement] = React.useState(checked);
|
|
5924
5984
|
const [valueStatement, setValueStatement] = React.useState(value);
|
|
5925
5985
|
const [disabledStatement, setDisabledStatement] = React.useState(disabled);
|
|
5926
|
-
const
|
|
5986
|
+
const context2 = React.useContext(RadioContext);
|
|
5927
5987
|
React.useEffect(() => {
|
|
5928
5988
|
setDisabledStatement(disabled);
|
|
5929
5989
|
setValueStatement(value);
|
|
@@ -5972,7 +6032,7 @@
|
|
|
5972
6032
|
return;
|
|
5973
6033
|
setCheckedStatement(!checkedStatement);
|
|
5974
6034
|
onChange && onChange(e2);
|
|
5975
|
-
|
|
6035
|
+
context2 && context2.onChange(valueStatement);
|
|
5976
6036
|
};
|
|
5977
6037
|
const reverseState = textPosition === "left";
|
|
5978
6038
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -5981,11 +6041,11 @@
|
|
|
5981
6041
|
...rest
|
|
5982
6042
|
}, renderRadioItem());
|
|
5983
6043
|
};
|
|
5984
|
-
Radio$1.defaultProps = defaultProps$
|
|
6044
|
+
Radio$1.defaultProps = defaultProps$S;
|
|
5985
6045
|
Radio$1.displayName = "NutRadio";
|
|
5986
6046
|
Radio$1.RadioGroup = RadioGroup;
|
|
5987
6047
|
var Radio = Radio$1;
|
|
5988
|
-
const defaultProps$
|
|
6048
|
+
const defaultProps$R = {
|
|
5989
6049
|
...ComponentDefaults,
|
|
5990
6050
|
count: 5,
|
|
5991
6051
|
modelValue: 0,
|
|
@@ -6020,7 +6080,7 @@
|
|
|
6020
6080
|
iconClassPrefix,
|
|
6021
6081
|
iconFontClassName
|
|
6022
6082
|
} = {
|
|
6023
|
-
...defaultProps$
|
|
6083
|
+
...defaultProps$R,
|
|
6024
6084
|
...props
|
|
6025
6085
|
};
|
|
6026
6086
|
const b2 = cn("rate");
|
|
@@ -6053,43 +6113,43 @@
|
|
|
6053
6113
|
setScore(value);
|
|
6054
6114
|
onChange && onChange(value);
|
|
6055
6115
|
};
|
|
6056
|
-
const onHalfClick = (event,
|
|
6116
|
+
const onHalfClick = (event, n2) => {
|
|
6057
6117
|
event.preventDefault();
|
|
6058
6118
|
event.stopPropagation();
|
|
6059
|
-
const value = Math.max(Number(minimizeValue),
|
|
6119
|
+
const value = Math.max(Number(minimizeValue), n2 - 0.5);
|
|
6060
6120
|
setScore(value);
|
|
6061
6121
|
onChange && onChange(value);
|
|
6062
6122
|
};
|
|
6063
6123
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
6064
6124
|
className: `${b2()} ${className}`,
|
|
6065
6125
|
style
|
|
6066
|
-
}, countArray.map((
|
|
6126
|
+
}, countArray.map((n2) => {
|
|
6067
6127
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
6068
6128
|
className: bi(),
|
|
6069
|
-
key:
|
|
6070
|
-
onClick: (event) => onClick(event,
|
|
6129
|
+
key: n2,
|
|
6130
|
+
onClick: (event) => onClick(event, n2),
|
|
6071
6131
|
style: { marginRight: pxCheck2(spacing) }
|
|
6072
6132
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
6073
6133
|
classPrefix: iconClassPrefix,
|
|
6074
6134
|
fontClassName: iconFontClassName,
|
|
6075
6135
|
size: iconSize,
|
|
6076
|
-
className: `${bi("icon")} ${disabled ||
|
|
6077
|
-
name:
|
|
6078
|
-
color:
|
|
6079
|
-
}), allowHalf && score >
|
|
6136
|
+
className: `${bi("icon")} ${disabled || n2 > score ? bi("icon--disabled") : ""}`,
|
|
6137
|
+
name: n2 <= score ? checkedIcon : uncheckedIcon,
|
|
6138
|
+
color: n2 <= score ? activeColor : voidColor
|
|
6139
|
+
}), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
6080
6140
|
classPrefix: iconClassPrefix,
|
|
6081
6141
|
fontClassName: iconFontClassName,
|
|
6082
|
-
onClick: (event) => onHalfClick(event,
|
|
6142
|
+
onClick: (event) => onHalfClick(event, n2),
|
|
6083
6143
|
className: `${bi("icon")} ${bi("icon--half")}`,
|
|
6084
|
-
color:
|
|
6144
|
+
color: n2 <= score ? activeColor : voidColor,
|
|
6085
6145
|
size: iconSize,
|
|
6086
6146
|
name: checkedIcon
|
|
6087
6147
|
}));
|
|
6088
6148
|
}));
|
|
6089
6149
|
};
|
|
6090
|
-
Rate.defaultProps = defaultProps$
|
|
6150
|
+
Rate.defaultProps = defaultProps$R;
|
|
6091
6151
|
Rate.displayName = "NutRate";
|
|
6092
|
-
const defaultProps$
|
|
6152
|
+
const defaultProps$Q = {
|
|
6093
6153
|
...ComponentDefaults,
|
|
6094
6154
|
title: "",
|
|
6095
6155
|
desc: "",
|
|
@@ -6257,9 +6317,9 @@
|
|
|
6257
6317
|
onClick: () => sure()
|
|
6258
6318
|
}, locale.confirm)) : null)));
|
|
6259
6319
|
};
|
|
6260
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6320
|
+
ShortPassword.defaultProps = defaultProps$Q;
|
|
6261
6321
|
ShortPassword.displayName = "NutShortPassword";
|
|
6262
|
-
const defaultProps$
|
|
6322
|
+
const defaultProps$P = {
|
|
6263
6323
|
defaultValue: "",
|
|
6264
6324
|
textAlign: "left",
|
|
6265
6325
|
limitshow: false,
|
|
@@ -6287,7 +6347,7 @@
|
|
|
6287
6347
|
onChange,
|
|
6288
6348
|
onBlur,
|
|
6289
6349
|
onFocus
|
|
6290
|
-
} = { ...defaultProps$
|
|
6350
|
+
} = { ...defaultProps$P, ...props };
|
|
6291
6351
|
const textareaBem = cn("textarea");
|
|
6292
6352
|
const [inputValue, SetInputValue] = React.useState("");
|
|
6293
6353
|
React.useEffect(() => {
|
|
@@ -6298,7 +6358,7 @@
|
|
|
6298
6358
|
SetInputValue(initValue);
|
|
6299
6359
|
}, [defaultValue]);
|
|
6300
6360
|
const textChange = (event) => {
|
|
6301
|
-
const text = event.detail;
|
|
6361
|
+
const text = event.detail ? event.detail : event.target;
|
|
6302
6362
|
if (maxlength && [...text.value].length > Number(maxlength)) {
|
|
6303
6363
|
text.value = text.value.substring(0, Number(maxlength));
|
|
6304
6364
|
}
|
|
@@ -6317,7 +6377,7 @@
|
|
|
6317
6377
|
return;
|
|
6318
6378
|
if (readonly)
|
|
6319
6379
|
return;
|
|
6320
|
-
const text = event.detail;
|
|
6380
|
+
const text = event.detail ? event.detail : event.target;
|
|
6321
6381
|
onChange && onChange(text.value, event);
|
|
6322
6382
|
onBlur && onBlur(event);
|
|
6323
6383
|
};
|
|
@@ -6352,9 +6412,9 @@
|
|
|
6352
6412
|
className: textareaBem("limit")
|
|
6353
6413
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6354
6414
|
};
|
|
6355
|
-
TextArea.defaultProps = defaultProps$
|
|
6415
|
+
TextArea.defaultProps = defaultProps$P;
|
|
6356
6416
|
TextArea.displayName = "NutTextArea";
|
|
6357
|
-
const defaultProps$
|
|
6417
|
+
const defaultProps$O = {
|
|
6358
6418
|
...ComponentDefaults,
|
|
6359
6419
|
className: "",
|
|
6360
6420
|
style: {},
|
|
@@ -6402,7 +6462,7 @@
|
|
|
6402
6462
|
iconFontClassName,
|
|
6403
6463
|
...rest
|
|
6404
6464
|
} = {
|
|
6405
|
-
...defaultProps$
|
|
6465
|
+
...defaultProps$O,
|
|
6406
6466
|
...props
|
|
6407
6467
|
};
|
|
6408
6468
|
const b2 = cn("progress");
|
|
@@ -6480,7 +6540,7 @@
|
|
|
6480
6540
|
color: iconColor
|
|
6481
6541
|
})));
|
|
6482
6542
|
};
|
|
6483
|
-
Progress.defaultProps = defaultProps$
|
|
6543
|
+
Progress.defaultProps = defaultProps$O;
|
|
6484
6544
|
Progress.displayName = "NutProgress";
|
|
6485
6545
|
class UploadOptions {
|
|
6486
6546
|
constructor() {
|
|
@@ -6578,7 +6638,7 @@
|
|
|
6578
6638
|
}
|
|
6579
6639
|
}
|
|
6580
6640
|
}
|
|
6581
|
-
const defaultProps$
|
|
6641
|
+
const defaultProps$N = {
|
|
6582
6642
|
...ComponentDefaults,
|
|
6583
6643
|
url: "",
|
|
6584
6644
|
maximum: 9,
|
|
@@ -6650,7 +6710,7 @@
|
|
|
6650
6710
|
onBeforeXhrUpload,
|
|
6651
6711
|
onBeforeDelete,
|
|
6652
6712
|
...restProps
|
|
6653
|
-
} = { ...defaultProps$
|
|
6713
|
+
} = { ...defaultProps$N, ...props };
|
|
6654
6714
|
const [fileList, setFileList] = React.useState([]);
|
|
6655
6715
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
6656
6716
|
React.useEffect(() => {
|
|
@@ -6835,8 +6895,8 @@
|
|
|
6835
6895
|
const onChangeFn = (res) => {
|
|
6836
6896
|
const { tempFiles } = res;
|
|
6837
6897
|
if (onBeforeUpload) {
|
|
6838
|
-
onBeforeUpload(tempFiles).then((
|
|
6839
|
-
const _files = filterFiles(
|
|
6898
|
+
onBeforeUpload(tempFiles).then((f2) => {
|
|
6899
|
+
const _files = filterFiles(f2);
|
|
6840
6900
|
readFile(_files);
|
|
6841
6901
|
});
|
|
6842
6902
|
} else {
|
|
@@ -6938,9 +6998,9 @@
|
|
|
6938
6998
|
})));
|
|
6939
6999
|
};
|
|
6940
7000
|
const Uploader = React__default["default"].forwardRef(InternalUploader);
|
|
6941
|
-
Uploader.defaultProps = defaultProps$
|
|
7001
|
+
Uploader.defaultProps = defaultProps$N;
|
|
6942
7002
|
Uploader.displayName = "NutUploader";
|
|
6943
|
-
const defaultProps$
|
|
7003
|
+
const defaultProps$M = {
|
|
6944
7004
|
data: {
|
|
6945
7005
|
text: "",
|
|
6946
7006
|
value: "",
|
|
@@ -6955,7 +7015,7 @@
|
|
|
6955
7015
|
};
|
|
6956
7016
|
const InternalCascaderItem = (props) => {
|
|
6957
7017
|
const { data, checked, chooseItem } = {
|
|
6958
|
-
...defaultProps$
|
|
7018
|
+
...defaultProps$M,
|
|
6959
7019
|
...props
|
|
6960
7020
|
};
|
|
6961
7021
|
const b2 = cn("cascader-item");
|
|
@@ -6991,7 +7051,7 @@
|
|
|
6991
7051
|
}));
|
|
6992
7052
|
};
|
|
6993
7053
|
const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
|
|
6994
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7054
|
+
CascaderItem.defaultProps = defaultProps$M;
|
|
6995
7055
|
CascaderItem.displayName = "NutCascaderItem";
|
|
6996
7056
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
6997
7057
|
const {
|
|
@@ -7125,7 +7185,7 @@
|
|
|
7125
7185
|
return pathNodes;
|
|
7126
7186
|
}
|
|
7127
7187
|
}
|
|
7128
|
-
const defaultProps$
|
|
7188
|
+
const defaultProps$L = {
|
|
7129
7189
|
className: "",
|
|
7130
7190
|
style: {},
|
|
7131
7191
|
poppable: true,
|
|
@@ -7172,7 +7232,7 @@
|
|
|
7172
7232
|
onClose,
|
|
7173
7233
|
onChange,
|
|
7174
7234
|
onPathChange
|
|
7175
|
-
} = { ...defaultProps$
|
|
7235
|
+
} = { ...defaultProps$L, ...props };
|
|
7176
7236
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
7177
7237
|
const [optiosData, setOptiosData] = React.useState([]);
|
|
7178
7238
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7267,9 +7327,9 @@
|
|
|
7267
7327
|
if (parent) {
|
|
7268
7328
|
needToSync = [parent.value];
|
|
7269
7329
|
state.initLoading = true;
|
|
7270
|
-
const last = await currentValue2.slice(1).reduce(async (
|
|
7330
|
+
const last = await currentValue2.slice(1).reduce(async (p2, value2) => {
|
|
7271
7331
|
var _a;
|
|
7272
|
-
const parent2 = await
|
|
7332
|
+
const parent2 = await p2;
|
|
7273
7333
|
await invokeLazyLoad(parent2);
|
|
7274
7334
|
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
7275
7335
|
(item) => item.value === value2
|
|
@@ -7431,9 +7491,9 @@
|
|
|
7431
7491
|
}, renderItem()) : renderItem());
|
|
7432
7492
|
};
|
|
7433
7493
|
const Cascader = React__default["default"].forwardRef(InternalCascader);
|
|
7434
|
-
Cascader.defaultProps = defaultProps$
|
|
7494
|
+
Cascader.defaultProps = defaultProps$L;
|
|
7435
7495
|
Cascader.displayName = "NutCascader";
|
|
7436
|
-
const defaultProps$
|
|
7496
|
+
const defaultProps$K = {
|
|
7437
7497
|
...ComponentDefaults,
|
|
7438
7498
|
placeholder: "",
|
|
7439
7499
|
shape: "square",
|
|
@@ -7484,7 +7544,7 @@
|
|
|
7484
7544
|
iconClassPrefix,
|
|
7485
7545
|
iconFontClassName
|
|
7486
7546
|
} = {
|
|
7487
|
-
...defaultProps$
|
|
7547
|
+
...defaultProps$K,
|
|
7488
7548
|
...props
|
|
7489
7549
|
};
|
|
7490
7550
|
const alignClass = `${align}`;
|
|
@@ -7638,9 +7698,9 @@
|
|
|
7638
7698
|
className: "nut-searchbar__input-box"
|
|
7639
7699
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7640
7700
|
};
|
|
7641
|
-
SearchBar.defaultProps = defaultProps$
|
|
7701
|
+
SearchBar.defaultProps = defaultProps$K;
|
|
7642
7702
|
SearchBar.displayName = "NutSearchBar";
|
|
7643
|
-
const defaultProps$
|
|
7703
|
+
const defaultProps$J = {
|
|
7644
7704
|
confirmText: "",
|
|
7645
7705
|
title: "",
|
|
7646
7706
|
visible: false,
|
|
@@ -7838,8 +7898,1348 @@
|
|
|
7838
7898
|
})
|
|
7839
7899
|
}, confirmText || locale.done))) : null))));
|
|
7840
7900
|
};
|
|
7841
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7901
|
+
NumberKeyboard.defaultProps = defaultProps$J;
|
|
7842
7902
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7903
|
+
const defaultProps$I = {};
|
|
7904
|
+
const Form = (props) => {
|
|
7905
|
+
useConfig();
|
|
7906
|
+
({ ...defaultProps$I, ...props });
|
|
7907
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
7908
|
+
className: "nut-form"
|
|
7909
|
+
}, "Form");
|
|
7910
|
+
};
|
|
7911
|
+
Form.defaultProps = defaultProps$I;
|
|
7912
|
+
Form.displayName = "NutForm";
|
|
7913
|
+
const FormItemContext = React.createContext({});
|
|
7914
|
+
function isAbsolute(pathname) {
|
|
7915
|
+
return pathname.charAt(0) === "/";
|
|
7916
|
+
}
|
|
7917
|
+
function spliceOne(list, index) {
|
|
7918
|
+
for (var i = index, k2 = i + 1, n2 = list.length; k2 < n2; i += 1, k2 += 1) {
|
|
7919
|
+
list[i] = list[k2];
|
|
7920
|
+
}
|
|
7921
|
+
list.pop();
|
|
7922
|
+
}
|
|
7923
|
+
function resolvePathname(to2, from) {
|
|
7924
|
+
if (from === void 0)
|
|
7925
|
+
from = "";
|
|
7926
|
+
var toParts = to2 && to2.split("/") || [];
|
|
7927
|
+
var fromParts = from && from.split("/") || [];
|
|
7928
|
+
var isToAbs = to2 && isAbsolute(to2);
|
|
7929
|
+
var isFromAbs = from && isAbsolute(from);
|
|
7930
|
+
var mustEndAbs = isToAbs || isFromAbs;
|
|
7931
|
+
if (to2 && isAbsolute(to2)) {
|
|
7932
|
+
fromParts = toParts;
|
|
7933
|
+
} else if (toParts.length) {
|
|
7934
|
+
fromParts.pop();
|
|
7935
|
+
fromParts = fromParts.concat(toParts);
|
|
7936
|
+
}
|
|
7937
|
+
if (!fromParts.length)
|
|
7938
|
+
return "/";
|
|
7939
|
+
var hasTrailingSlash;
|
|
7940
|
+
if (fromParts.length) {
|
|
7941
|
+
var last = fromParts[fromParts.length - 1];
|
|
7942
|
+
hasTrailingSlash = last === "." || last === ".." || last === "";
|
|
7943
|
+
} else {
|
|
7944
|
+
hasTrailingSlash = false;
|
|
7945
|
+
}
|
|
7946
|
+
var up = 0;
|
|
7947
|
+
for (var i = fromParts.length; i >= 0; i--) {
|
|
7948
|
+
var part = fromParts[i];
|
|
7949
|
+
if (part === ".") {
|
|
7950
|
+
spliceOne(fromParts, i);
|
|
7951
|
+
} else if (part === "..") {
|
|
7952
|
+
spliceOne(fromParts, i);
|
|
7953
|
+
up++;
|
|
7954
|
+
} else if (up) {
|
|
7955
|
+
spliceOne(fromParts, i);
|
|
7956
|
+
up--;
|
|
7957
|
+
}
|
|
7958
|
+
}
|
|
7959
|
+
if (!mustEndAbs)
|
|
7960
|
+
for (; up--; up)
|
|
7961
|
+
fromParts.unshift("..");
|
|
7962
|
+
if (mustEndAbs && fromParts[0] !== "" && (!fromParts[0] || !isAbsolute(fromParts[0])))
|
|
7963
|
+
fromParts.unshift("");
|
|
7964
|
+
var result = fromParts.join("/");
|
|
7965
|
+
if (hasTrailingSlash && result.substr(-1) !== "/")
|
|
7966
|
+
result += "/";
|
|
7967
|
+
return result;
|
|
7968
|
+
}
|
|
7969
|
+
var isProduction = true;
|
|
7970
|
+
var prefix$1 = "Invariant failed";
|
|
7971
|
+
function invariant(condition, message) {
|
|
7972
|
+
if (condition) {
|
|
7973
|
+
return;
|
|
7974
|
+
}
|
|
7975
|
+
if (isProduction) {
|
|
7976
|
+
throw new Error(prefix$1);
|
|
7977
|
+
}
|
|
7978
|
+
var provided = typeof message === "function" ? message() : message;
|
|
7979
|
+
var value = provided ? "".concat(prefix$1, ": ").concat(provided) : prefix$1;
|
|
7980
|
+
throw new Error(value);
|
|
7981
|
+
}
|
|
7982
|
+
function parsePath(path) {
|
|
7983
|
+
var pathname = path || "/";
|
|
7984
|
+
var search = "";
|
|
7985
|
+
var hash = "";
|
|
7986
|
+
var hashIndex = pathname.indexOf("#");
|
|
7987
|
+
if (hashIndex !== -1) {
|
|
7988
|
+
hash = pathname.substr(hashIndex);
|
|
7989
|
+
pathname = pathname.substr(0, hashIndex);
|
|
7990
|
+
}
|
|
7991
|
+
var searchIndex = pathname.indexOf("?");
|
|
7992
|
+
if (searchIndex !== -1) {
|
|
7993
|
+
search = pathname.substr(searchIndex);
|
|
7994
|
+
pathname = pathname.substr(0, searchIndex);
|
|
7995
|
+
}
|
|
7996
|
+
return {
|
|
7997
|
+
pathname,
|
|
7998
|
+
search: search === "?" ? "" : search,
|
|
7999
|
+
hash: hash === "#" ? "" : hash
|
|
8000
|
+
};
|
|
8001
|
+
}
|
|
8002
|
+
function createPath(location) {
|
|
8003
|
+
var pathname = location.pathname, search = location.search, hash = location.hash;
|
|
8004
|
+
var path = pathname || "/";
|
|
8005
|
+
if (search && search !== "?")
|
|
8006
|
+
path += search.charAt(0) === "?" ? search : "?" + search;
|
|
8007
|
+
if (hash && hash !== "#")
|
|
8008
|
+
path += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
8009
|
+
return path;
|
|
8010
|
+
}
|
|
8011
|
+
function createLocation(path, state, key, currentLocation) {
|
|
8012
|
+
var location;
|
|
8013
|
+
if (typeof path === "string") {
|
|
8014
|
+
location = parsePath(path);
|
|
8015
|
+
location.state = state;
|
|
8016
|
+
} else {
|
|
8017
|
+
location = _extends$3({}, path);
|
|
8018
|
+
if (location.pathname === void 0)
|
|
8019
|
+
location.pathname = "";
|
|
8020
|
+
if (location.search) {
|
|
8021
|
+
if (location.search.charAt(0) !== "?")
|
|
8022
|
+
location.search = "?" + location.search;
|
|
8023
|
+
} else {
|
|
8024
|
+
location.search = "";
|
|
8025
|
+
}
|
|
8026
|
+
if (location.hash) {
|
|
8027
|
+
if (location.hash.charAt(0) !== "#")
|
|
8028
|
+
location.hash = "#" + location.hash;
|
|
8029
|
+
} else {
|
|
8030
|
+
location.hash = "";
|
|
8031
|
+
}
|
|
8032
|
+
if (state !== void 0 && location.state === void 0)
|
|
8033
|
+
location.state = state;
|
|
8034
|
+
}
|
|
8035
|
+
try {
|
|
8036
|
+
location.pathname = decodeURI(location.pathname);
|
|
8037
|
+
} catch (e2) {
|
|
8038
|
+
if (e2 instanceof URIError) {
|
|
8039
|
+
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.');
|
|
8040
|
+
} else {
|
|
8041
|
+
throw e2;
|
|
8042
|
+
}
|
|
8043
|
+
}
|
|
8044
|
+
if (key)
|
|
8045
|
+
location.key = key;
|
|
8046
|
+
if (currentLocation) {
|
|
8047
|
+
if (!location.pathname) {
|
|
8048
|
+
location.pathname = currentLocation.pathname;
|
|
8049
|
+
} else if (location.pathname.charAt(0) !== "/") {
|
|
8050
|
+
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
8051
|
+
}
|
|
8052
|
+
} else {
|
|
8053
|
+
if (!location.pathname) {
|
|
8054
|
+
location.pathname = "/";
|
|
8055
|
+
}
|
|
8056
|
+
}
|
|
8057
|
+
return location;
|
|
8058
|
+
}
|
|
8059
|
+
function createTransitionManager() {
|
|
8060
|
+
var prompt = null;
|
|
8061
|
+
function setPrompt(nextPrompt) {
|
|
8062
|
+
prompt = nextPrompt;
|
|
8063
|
+
return function() {
|
|
8064
|
+
if (prompt === nextPrompt)
|
|
8065
|
+
prompt = null;
|
|
8066
|
+
};
|
|
8067
|
+
}
|
|
8068
|
+
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
8069
|
+
if (prompt != null) {
|
|
8070
|
+
var result = typeof prompt === "function" ? prompt(location, action) : prompt;
|
|
8071
|
+
if (typeof result === "string") {
|
|
8072
|
+
if (typeof getUserConfirmation === "function") {
|
|
8073
|
+
getUserConfirmation(result, callback);
|
|
8074
|
+
} else {
|
|
8075
|
+
callback(true);
|
|
8076
|
+
}
|
|
8077
|
+
} else {
|
|
8078
|
+
callback(result !== false);
|
|
8079
|
+
}
|
|
8080
|
+
} else {
|
|
8081
|
+
callback(true);
|
|
8082
|
+
}
|
|
8083
|
+
}
|
|
8084
|
+
var listeners = [];
|
|
8085
|
+
function appendListener(fn) {
|
|
8086
|
+
var isActive = true;
|
|
8087
|
+
function listener() {
|
|
8088
|
+
if (isActive)
|
|
8089
|
+
fn.apply(void 0, arguments);
|
|
8090
|
+
}
|
|
8091
|
+
listeners.push(listener);
|
|
8092
|
+
return function() {
|
|
8093
|
+
isActive = false;
|
|
8094
|
+
listeners = listeners.filter(function(item) {
|
|
8095
|
+
return item !== listener;
|
|
8096
|
+
});
|
|
8097
|
+
};
|
|
8098
|
+
}
|
|
8099
|
+
function notifyListeners() {
|
|
8100
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8101
|
+
args[_key] = arguments[_key];
|
|
8102
|
+
}
|
|
8103
|
+
listeners.forEach(function(listener) {
|
|
8104
|
+
return listener.apply(void 0, args);
|
|
8105
|
+
});
|
|
8106
|
+
}
|
|
8107
|
+
return {
|
|
8108
|
+
setPrompt,
|
|
8109
|
+
confirmTransitionTo,
|
|
8110
|
+
appendListener,
|
|
8111
|
+
notifyListeners
|
|
8112
|
+
};
|
|
8113
|
+
}
|
|
8114
|
+
function clamp$1(n2, lowerBound, upperBound) {
|
|
8115
|
+
return Math.min(Math.max(n2, lowerBound), upperBound);
|
|
8116
|
+
}
|
|
8117
|
+
function createMemoryHistory(props) {
|
|
8118
|
+
if (props === void 0) {
|
|
8119
|
+
props = {};
|
|
8120
|
+
}
|
|
8121
|
+
var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ["/"] : _props$initialEntries, _props$initialIndex = _props.initialIndex, initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
|
|
8122
|
+
var transitionManager = createTransitionManager();
|
|
8123
|
+
function setState(nextState) {
|
|
8124
|
+
_extends$3(history, nextState);
|
|
8125
|
+
history.length = history.entries.length;
|
|
8126
|
+
transitionManager.notifyListeners(history.location, history.action);
|
|
8127
|
+
}
|
|
8128
|
+
function createKey() {
|
|
8129
|
+
return Math.random().toString(36).substr(2, keyLength);
|
|
8130
|
+
}
|
|
8131
|
+
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
8132
|
+
var entries = initialEntries.map(function(entry) {
|
|
8133
|
+
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
8134
|
+
});
|
|
8135
|
+
var createHref = createPath;
|
|
8136
|
+
function push(path, state) {
|
|
8137
|
+
var action = "PUSH";
|
|
8138
|
+
var location = createLocation(path, state, createKey(), history.location);
|
|
8139
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8140
|
+
if (!ok)
|
|
8141
|
+
return;
|
|
8142
|
+
var prevIndex = history.index;
|
|
8143
|
+
var nextIndex = prevIndex + 1;
|
|
8144
|
+
var nextEntries = history.entries.slice(0);
|
|
8145
|
+
if (nextEntries.length > nextIndex) {
|
|
8146
|
+
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
|
|
8147
|
+
} else {
|
|
8148
|
+
nextEntries.push(location);
|
|
8149
|
+
}
|
|
8150
|
+
setState({
|
|
8151
|
+
action,
|
|
8152
|
+
location,
|
|
8153
|
+
index: nextIndex,
|
|
8154
|
+
entries: nextEntries
|
|
8155
|
+
});
|
|
8156
|
+
});
|
|
8157
|
+
}
|
|
8158
|
+
function replace(path, state) {
|
|
8159
|
+
var action = "REPLACE";
|
|
8160
|
+
var location = createLocation(path, state, createKey(), history.location);
|
|
8161
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8162
|
+
if (!ok)
|
|
8163
|
+
return;
|
|
8164
|
+
history.entries[history.index] = location;
|
|
8165
|
+
setState({
|
|
8166
|
+
action,
|
|
8167
|
+
location
|
|
8168
|
+
});
|
|
8169
|
+
});
|
|
8170
|
+
}
|
|
8171
|
+
function go(n2) {
|
|
8172
|
+
var nextIndex = clamp$1(history.index + n2, 0, history.entries.length - 1);
|
|
8173
|
+
var action = "POP";
|
|
8174
|
+
var location = history.entries[nextIndex];
|
|
8175
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8176
|
+
if (ok) {
|
|
8177
|
+
setState({
|
|
8178
|
+
action,
|
|
8179
|
+
location,
|
|
8180
|
+
index: nextIndex
|
|
8181
|
+
});
|
|
8182
|
+
} else {
|
|
8183
|
+
setState();
|
|
8184
|
+
}
|
|
8185
|
+
});
|
|
8186
|
+
}
|
|
8187
|
+
function goBack() {
|
|
8188
|
+
go(-1);
|
|
8189
|
+
}
|
|
8190
|
+
function goForward() {
|
|
8191
|
+
go(1);
|
|
8192
|
+
}
|
|
8193
|
+
function canGo(n2) {
|
|
8194
|
+
var nextIndex = history.index + n2;
|
|
8195
|
+
return nextIndex >= 0 && nextIndex < history.entries.length;
|
|
8196
|
+
}
|
|
8197
|
+
function block(prompt) {
|
|
8198
|
+
if (prompt === void 0) {
|
|
8199
|
+
prompt = false;
|
|
8200
|
+
}
|
|
8201
|
+
return transitionManager.setPrompt(prompt);
|
|
8202
|
+
}
|
|
8203
|
+
function listen(listener) {
|
|
8204
|
+
return transitionManager.appendListener(listener);
|
|
8205
|
+
}
|
|
8206
|
+
var history = {
|
|
8207
|
+
length: entries.length,
|
|
8208
|
+
action: "POP",
|
|
8209
|
+
location: entries[index],
|
|
8210
|
+
index,
|
|
8211
|
+
entries,
|
|
8212
|
+
createHref,
|
|
8213
|
+
push,
|
|
8214
|
+
replace,
|
|
8215
|
+
go,
|
|
8216
|
+
goBack,
|
|
8217
|
+
goForward,
|
|
8218
|
+
canGo,
|
|
8219
|
+
block,
|
|
8220
|
+
listen
|
|
8221
|
+
};
|
|
8222
|
+
return history;
|
|
8223
|
+
}
|
|
8224
|
+
var pathToRegexp$2 = { exports: {} };
|
|
8225
|
+
var isarray$1 = Array.isArray || function(arr) {
|
|
8226
|
+
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
8227
|
+
};
|
|
8228
|
+
var isarray = isarray$1;
|
|
8229
|
+
pathToRegexp$2.exports = pathToRegexp;
|
|
8230
|
+
pathToRegexp$2.exports.parse = parse$1;
|
|
8231
|
+
pathToRegexp$2.exports.compile = compile;
|
|
8232
|
+
pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
|
|
8233
|
+
pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
|
|
8234
|
+
var PATH_REGEXP = new RegExp([
|
|
8235
|
+
"(\\\\.)",
|
|
8236
|
+
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
8237
|
+
].join("|"), "g");
|
|
8238
|
+
function parse$1(str, options) {
|
|
8239
|
+
var tokens = [];
|
|
8240
|
+
var key = 0;
|
|
8241
|
+
var index = 0;
|
|
8242
|
+
var path = "";
|
|
8243
|
+
var defaultDelimiter = options && options.delimiter || "/";
|
|
8244
|
+
var res;
|
|
8245
|
+
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
8246
|
+
var m2 = res[0];
|
|
8247
|
+
var escaped = res[1];
|
|
8248
|
+
var offset = res.index;
|
|
8249
|
+
path += str.slice(index, offset);
|
|
8250
|
+
index = offset + m2.length;
|
|
8251
|
+
if (escaped) {
|
|
8252
|
+
path += escaped[1];
|
|
8253
|
+
continue;
|
|
8254
|
+
}
|
|
8255
|
+
var next = str[index];
|
|
8256
|
+
var prefix2 = res[2];
|
|
8257
|
+
var name = res[3];
|
|
8258
|
+
var capture = res[4];
|
|
8259
|
+
var group = res[5];
|
|
8260
|
+
var modifier = res[6];
|
|
8261
|
+
var asterisk = res[7];
|
|
8262
|
+
if (path) {
|
|
8263
|
+
tokens.push(path);
|
|
8264
|
+
path = "";
|
|
8265
|
+
}
|
|
8266
|
+
var partial = prefix2 != null && next != null && next !== prefix2;
|
|
8267
|
+
var repeat = modifier === "+" || modifier === "*";
|
|
8268
|
+
var optional = modifier === "?" || modifier === "*";
|
|
8269
|
+
var delimiter = res[2] || defaultDelimiter;
|
|
8270
|
+
var pattern = capture || group;
|
|
8271
|
+
tokens.push({
|
|
8272
|
+
name: name || key++,
|
|
8273
|
+
prefix: prefix2 || "",
|
|
8274
|
+
delimiter,
|
|
8275
|
+
optional,
|
|
8276
|
+
repeat,
|
|
8277
|
+
partial,
|
|
8278
|
+
asterisk: !!asterisk,
|
|
8279
|
+
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
8280
|
+
});
|
|
8281
|
+
}
|
|
8282
|
+
if (index < str.length) {
|
|
8283
|
+
path += str.substr(index);
|
|
8284
|
+
}
|
|
8285
|
+
if (path) {
|
|
8286
|
+
tokens.push(path);
|
|
8287
|
+
}
|
|
8288
|
+
return tokens;
|
|
8289
|
+
}
|
|
8290
|
+
function compile(str, options) {
|
|
8291
|
+
return tokensToFunction(parse$1(str, options), options);
|
|
8292
|
+
}
|
|
8293
|
+
function encodeURIComponentPretty(str) {
|
|
8294
|
+
return encodeURI(str).replace(/[\/?#]/g, function(c6) {
|
|
8295
|
+
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8296
|
+
});
|
|
8297
|
+
}
|
|
8298
|
+
function encodeAsterisk(str) {
|
|
8299
|
+
return encodeURI(str).replace(/[?#]/g, function(c6) {
|
|
8300
|
+
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8301
|
+
});
|
|
8302
|
+
}
|
|
8303
|
+
function tokensToFunction(tokens, options) {
|
|
8304
|
+
var matches = new Array(tokens.length);
|
|
8305
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
8306
|
+
if (typeof tokens[i] === "object") {
|
|
8307
|
+
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
8308
|
+
}
|
|
8309
|
+
}
|
|
8310
|
+
return function(obj, opts) {
|
|
8311
|
+
var path = "";
|
|
8312
|
+
var data = obj || {};
|
|
8313
|
+
var options2 = opts || {};
|
|
8314
|
+
var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
8315
|
+
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8316
|
+
var token = tokens[i2];
|
|
8317
|
+
if (typeof token === "string") {
|
|
8318
|
+
path += token;
|
|
8319
|
+
continue;
|
|
8320
|
+
}
|
|
8321
|
+
var value = data[token.name];
|
|
8322
|
+
var segment;
|
|
8323
|
+
if (value == null) {
|
|
8324
|
+
if (token.optional) {
|
|
8325
|
+
if (token.partial) {
|
|
8326
|
+
path += token.prefix;
|
|
8327
|
+
}
|
|
8328
|
+
continue;
|
|
8329
|
+
} else {
|
|
8330
|
+
throw new TypeError('Expected "' + token.name + '" to be defined');
|
|
8331
|
+
}
|
|
8332
|
+
}
|
|
8333
|
+
if (isarray(value)) {
|
|
8334
|
+
if (!token.repeat) {
|
|
8335
|
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
|
|
8336
|
+
}
|
|
8337
|
+
if (value.length === 0) {
|
|
8338
|
+
if (token.optional) {
|
|
8339
|
+
continue;
|
|
8340
|
+
} else {
|
|
8341
|
+
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
8342
|
+
}
|
|
8343
|
+
}
|
|
8344
|
+
for (var j = 0; j < value.length; j++) {
|
|
8345
|
+
segment = encode(value[j]);
|
|
8346
|
+
if (!matches[i2].test(segment)) {
|
|
8347
|
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
|
|
8348
|
+
}
|
|
8349
|
+
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8350
|
+
}
|
|
8351
|
+
continue;
|
|
8352
|
+
}
|
|
8353
|
+
segment = token.asterisk ? encodeAsterisk(value) : encode(value);
|
|
8354
|
+
if (!matches[i2].test(segment)) {
|
|
8355
|
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
|
|
8356
|
+
}
|
|
8357
|
+
path += token.prefix + segment;
|
|
8358
|
+
}
|
|
8359
|
+
return path;
|
|
8360
|
+
};
|
|
8361
|
+
}
|
|
8362
|
+
function escapeString(str) {
|
|
8363
|
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
|
|
8364
|
+
}
|
|
8365
|
+
function escapeGroup(group) {
|
|
8366
|
+
return group.replace(/([=!:$\/()])/g, "\\$1");
|
|
8367
|
+
}
|
|
8368
|
+
function attachKeys(re, keys) {
|
|
8369
|
+
re.keys = keys;
|
|
8370
|
+
return re;
|
|
8371
|
+
}
|
|
8372
|
+
function flags(options) {
|
|
8373
|
+
return options && options.sensitive ? "" : "i";
|
|
8374
|
+
}
|
|
8375
|
+
function regexpToRegexp(path, keys) {
|
|
8376
|
+
var groups = path.source.match(/\((?!\?)/g);
|
|
8377
|
+
if (groups) {
|
|
8378
|
+
for (var i = 0; i < groups.length; i++) {
|
|
8379
|
+
keys.push({
|
|
8380
|
+
name: i,
|
|
8381
|
+
prefix: null,
|
|
8382
|
+
delimiter: null,
|
|
8383
|
+
optional: false,
|
|
8384
|
+
repeat: false,
|
|
8385
|
+
partial: false,
|
|
8386
|
+
asterisk: false,
|
|
8387
|
+
pattern: null
|
|
8388
|
+
});
|
|
8389
|
+
}
|
|
8390
|
+
}
|
|
8391
|
+
return attachKeys(path, keys);
|
|
8392
|
+
}
|
|
8393
|
+
function arrayToRegexp(path, keys, options) {
|
|
8394
|
+
var parts = [];
|
|
8395
|
+
for (var i = 0; i < path.length; i++) {
|
|
8396
|
+
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
8397
|
+
}
|
|
8398
|
+
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8399
|
+
return attachKeys(regexp, keys);
|
|
8400
|
+
}
|
|
8401
|
+
function stringToRegexp(path, keys, options) {
|
|
8402
|
+
return tokensToRegExp(parse$1(path, options), keys, options);
|
|
8403
|
+
}
|
|
8404
|
+
function tokensToRegExp(tokens, keys, options) {
|
|
8405
|
+
if (!isarray(keys)) {
|
|
8406
|
+
options = keys || options;
|
|
8407
|
+
keys = [];
|
|
8408
|
+
}
|
|
8409
|
+
options = options || {};
|
|
8410
|
+
var strict = options.strict;
|
|
8411
|
+
var end = options.end !== false;
|
|
8412
|
+
var route = "";
|
|
8413
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
8414
|
+
var token = tokens[i];
|
|
8415
|
+
if (typeof token === "string") {
|
|
8416
|
+
route += escapeString(token);
|
|
8417
|
+
} else {
|
|
8418
|
+
var prefix2 = escapeString(token.prefix);
|
|
8419
|
+
var capture = "(?:" + token.pattern + ")";
|
|
8420
|
+
keys.push(token);
|
|
8421
|
+
if (token.repeat) {
|
|
8422
|
+
capture += "(?:" + prefix2 + capture + ")*";
|
|
8423
|
+
}
|
|
8424
|
+
if (token.optional) {
|
|
8425
|
+
if (!token.partial) {
|
|
8426
|
+
capture = "(?:" + prefix2 + "(" + capture + "))?";
|
|
8427
|
+
} else {
|
|
8428
|
+
capture = prefix2 + "(" + capture + ")?";
|
|
8429
|
+
}
|
|
8430
|
+
} else {
|
|
8431
|
+
capture = prefix2 + "(" + capture + ")";
|
|
8432
|
+
}
|
|
8433
|
+
route += capture;
|
|
8434
|
+
}
|
|
8435
|
+
}
|
|
8436
|
+
var delimiter = escapeString(options.delimiter || "/");
|
|
8437
|
+
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
8438
|
+
if (!strict) {
|
|
8439
|
+
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
8440
|
+
}
|
|
8441
|
+
if (end) {
|
|
8442
|
+
route += "$";
|
|
8443
|
+
} else {
|
|
8444
|
+
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
8445
|
+
}
|
|
8446
|
+
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
8447
|
+
}
|
|
8448
|
+
function pathToRegexp(path, keys, options) {
|
|
8449
|
+
if (!isarray(keys)) {
|
|
8450
|
+
options = keys || options;
|
|
8451
|
+
keys = [];
|
|
8452
|
+
}
|
|
8453
|
+
options = options || {};
|
|
8454
|
+
if (path instanceof RegExp) {
|
|
8455
|
+
return regexpToRegexp(path, keys);
|
|
8456
|
+
}
|
|
8457
|
+
if (isarray(path)) {
|
|
8458
|
+
return arrayToRegexp(path, keys, options);
|
|
8459
|
+
}
|
|
8460
|
+
return stringToRegexp(path, keys, options);
|
|
8461
|
+
}
|
|
8462
|
+
var pathToRegexp$1 = pathToRegexp$2.exports;
|
|
8463
|
+
var reactIs$1 = { exports: {} };
|
|
8464
|
+
var reactIs_production_min = {};
|
|
8465
|
+
/** @license React v16.13.1
|
|
8466
|
+
* react-is.production.min.js
|
|
8467
|
+
*
|
|
8468
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8469
|
+
*
|
|
8470
|
+
* This source code is licensed under the MIT license found in the
|
|
8471
|
+
* LICENSE file in the root directory of this source tree.
|
|
8472
|
+
*/
|
|
8473
|
+
var b$1 = "function" === typeof Symbol && Symbol.for, c = b$1 ? Symbol.for("react.element") : 60103, d = b$1 ? Symbol.for("react.portal") : 60106, e = b$1 ? Symbol.for("react.fragment") : 60107, f = b$1 ? Symbol.for("react.strict_mode") : 60108, g = b$1 ? Symbol.for("react.profiler") : 60114, h = b$1 ? Symbol.for("react.provider") : 60109, k = b$1 ? Symbol.for("react.context") : 60110, l = b$1 ? Symbol.for("react.async_mode") : 60111, m = b$1 ? Symbol.for("react.concurrent_mode") : 60111, n = b$1 ? Symbol.for("react.forward_ref") : 60112, p = b$1 ? Symbol.for("react.suspense") : 60113, q = b$1 ? Symbol.for("react.suspense_list") : 60120, r = b$1 ? Symbol.for("react.memo") : 60115, t = b$1 ? Symbol.for("react.lazy") : 60116, v = b$1 ? Symbol.for("react.block") : 60121, w = b$1 ? Symbol.for("react.fundamental") : 60117, x = b$1 ? Symbol.for("react.responder") : 60118, y = b$1 ? Symbol.for("react.scope") : 60119;
|
|
8474
|
+
function z(a) {
|
|
8475
|
+
if ("object" === typeof a && null !== a) {
|
|
8476
|
+
var u = a.$$typeof;
|
|
8477
|
+
switch (u) {
|
|
8478
|
+
case c:
|
|
8479
|
+
switch (a = a.type, a) {
|
|
8480
|
+
case l:
|
|
8481
|
+
case m:
|
|
8482
|
+
case e:
|
|
8483
|
+
case g:
|
|
8484
|
+
case f:
|
|
8485
|
+
case p:
|
|
8486
|
+
return a;
|
|
8487
|
+
default:
|
|
8488
|
+
switch (a = a && a.$$typeof, a) {
|
|
8489
|
+
case k:
|
|
8490
|
+
case n:
|
|
8491
|
+
case t:
|
|
8492
|
+
case r:
|
|
8493
|
+
case h:
|
|
8494
|
+
return a;
|
|
8495
|
+
default:
|
|
8496
|
+
return u;
|
|
8497
|
+
}
|
|
8498
|
+
}
|
|
8499
|
+
case d:
|
|
8500
|
+
return u;
|
|
8501
|
+
}
|
|
8502
|
+
}
|
|
8503
|
+
}
|
|
8504
|
+
function A(a) {
|
|
8505
|
+
return z(a) === m;
|
|
8506
|
+
}
|
|
8507
|
+
reactIs_production_min.AsyncMode = l;
|
|
8508
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
8509
|
+
reactIs_production_min.ContextConsumer = k;
|
|
8510
|
+
reactIs_production_min.ContextProvider = h;
|
|
8511
|
+
reactIs_production_min.Element = c;
|
|
8512
|
+
reactIs_production_min.ForwardRef = n;
|
|
8513
|
+
reactIs_production_min.Fragment = e;
|
|
8514
|
+
reactIs_production_min.Lazy = t;
|
|
8515
|
+
reactIs_production_min.Memo = r;
|
|
8516
|
+
reactIs_production_min.Portal = d;
|
|
8517
|
+
reactIs_production_min.Profiler = g;
|
|
8518
|
+
reactIs_production_min.StrictMode = f;
|
|
8519
|
+
reactIs_production_min.Suspense = p;
|
|
8520
|
+
reactIs_production_min.isAsyncMode = function(a) {
|
|
8521
|
+
return A(a) || z(a) === l;
|
|
8522
|
+
};
|
|
8523
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
8524
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
8525
|
+
return z(a) === k;
|
|
8526
|
+
};
|
|
8527
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
8528
|
+
return z(a) === h;
|
|
8529
|
+
};
|
|
8530
|
+
reactIs_production_min.isElement = function(a) {
|
|
8531
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
8532
|
+
};
|
|
8533
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
8534
|
+
return z(a) === n;
|
|
8535
|
+
};
|
|
8536
|
+
reactIs_production_min.isFragment = function(a) {
|
|
8537
|
+
return z(a) === e;
|
|
8538
|
+
};
|
|
8539
|
+
reactIs_production_min.isLazy = function(a) {
|
|
8540
|
+
return z(a) === t;
|
|
8541
|
+
};
|
|
8542
|
+
reactIs_production_min.isMemo = function(a) {
|
|
8543
|
+
return z(a) === r;
|
|
8544
|
+
};
|
|
8545
|
+
reactIs_production_min.isPortal = function(a) {
|
|
8546
|
+
return z(a) === d;
|
|
8547
|
+
};
|
|
8548
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
8549
|
+
return z(a) === g;
|
|
8550
|
+
};
|
|
8551
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
8552
|
+
return z(a) === f;
|
|
8553
|
+
};
|
|
8554
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
8555
|
+
return z(a) === p;
|
|
8556
|
+
};
|
|
8557
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
8558
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
8559
|
+
};
|
|
8560
|
+
reactIs_production_min.typeOf = z;
|
|
8561
|
+
{
|
|
8562
|
+
reactIs$1.exports = reactIs_production_min;
|
|
8563
|
+
}
|
|
8564
|
+
var reactIs = reactIs$1.exports;
|
|
8565
|
+
var FORWARD_REF_STATICS = {
|
|
8566
|
+
"$$typeof": true,
|
|
8567
|
+
render: true,
|
|
8568
|
+
defaultProps: true,
|
|
8569
|
+
displayName: true,
|
|
8570
|
+
propTypes: true
|
|
8571
|
+
};
|
|
8572
|
+
var MEMO_STATICS = {
|
|
8573
|
+
"$$typeof": true,
|
|
8574
|
+
compare: true,
|
|
8575
|
+
defaultProps: true,
|
|
8576
|
+
displayName: true,
|
|
8577
|
+
propTypes: true,
|
|
8578
|
+
type: true
|
|
8579
|
+
};
|
|
8580
|
+
var TYPE_STATICS = {};
|
|
8581
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
8582
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
8583
|
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
8584
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
8585
|
+
function getUniqueId() {
|
|
8586
|
+
var key = "__global_unique_id__";
|
|
8587
|
+
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
8588
|
+
}
|
|
8589
|
+
function objectIs(x2, y2) {
|
|
8590
|
+
if (x2 === y2) {
|
|
8591
|
+
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
8592
|
+
} else {
|
|
8593
|
+
return x2 !== x2 && y2 !== y2;
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
function createEventEmitter(value) {
|
|
8597
|
+
var handlers = [];
|
|
8598
|
+
return {
|
|
8599
|
+
on: function on(handler) {
|
|
8600
|
+
handlers.push(handler);
|
|
8601
|
+
},
|
|
8602
|
+
off: function off(handler) {
|
|
8603
|
+
handlers = handlers.filter(function(h2) {
|
|
8604
|
+
return h2 !== handler;
|
|
8605
|
+
});
|
|
8606
|
+
},
|
|
8607
|
+
get: function get() {
|
|
8608
|
+
return value;
|
|
8609
|
+
},
|
|
8610
|
+
set: function set(newValue, changedBits) {
|
|
8611
|
+
value = newValue;
|
|
8612
|
+
handlers.forEach(function(handler) {
|
|
8613
|
+
return handler(value, changedBits);
|
|
8614
|
+
});
|
|
8615
|
+
}
|
|
8616
|
+
};
|
|
8617
|
+
}
|
|
8618
|
+
function onlyChild(children) {
|
|
8619
|
+
return Array.isArray(children) ? children[0] : children;
|
|
8620
|
+
}
|
|
8621
|
+
function createReactContext(defaultValue, calculateChangedBits) {
|
|
8622
|
+
var _Provider$childContex, _Consumer$contextType;
|
|
8623
|
+
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
8624
|
+
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
8625
|
+
_inheritsLoose(Provider2, _React$Component);
|
|
8626
|
+
function Provider2() {
|
|
8627
|
+
var _this;
|
|
8628
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8629
|
+
args[_key] = arguments[_key];
|
|
8630
|
+
}
|
|
8631
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8632
|
+
_this.emitter = createEventEmitter(_this.props.value);
|
|
8633
|
+
return _this;
|
|
8634
|
+
}
|
|
8635
|
+
var _proto = Provider2.prototype;
|
|
8636
|
+
_proto.getChildContext = function getChildContext() {
|
|
8637
|
+
var _ref;
|
|
8638
|
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
8639
|
+
};
|
|
8640
|
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8641
|
+
if (this.props.value !== nextProps.value) {
|
|
8642
|
+
var oldValue = this.props.value;
|
|
8643
|
+
var newValue = nextProps.value;
|
|
8644
|
+
var changedBits;
|
|
8645
|
+
if (objectIs(oldValue, newValue)) {
|
|
8646
|
+
changedBits = 0;
|
|
8647
|
+
} else {
|
|
8648
|
+
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
8649
|
+
changedBits |= 0;
|
|
8650
|
+
if (changedBits !== 0) {
|
|
8651
|
+
this.emitter.set(nextProps.value, changedBits);
|
|
8652
|
+
}
|
|
8653
|
+
}
|
|
8654
|
+
}
|
|
8655
|
+
};
|
|
8656
|
+
_proto.render = function render() {
|
|
8657
|
+
return this.props.children;
|
|
8658
|
+
};
|
|
8659
|
+
return Provider2;
|
|
8660
|
+
}(React__default["default"].Component);
|
|
8661
|
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
8662
|
+
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
8663
|
+
_inheritsLoose(Consumer2, _React$Component2);
|
|
8664
|
+
function Consumer2() {
|
|
8665
|
+
var _this2;
|
|
8666
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
8667
|
+
args[_key2] = arguments[_key2];
|
|
8668
|
+
}
|
|
8669
|
+
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
8670
|
+
_this2.observedBits = void 0;
|
|
8671
|
+
_this2.state = {
|
|
8672
|
+
value: _this2.getValue()
|
|
8673
|
+
};
|
|
8674
|
+
_this2.onUpdate = function(newValue, changedBits) {
|
|
8675
|
+
var observedBits = _this2.observedBits | 0;
|
|
8676
|
+
if ((observedBits & changedBits) !== 0) {
|
|
8677
|
+
_this2.setState({
|
|
8678
|
+
value: _this2.getValue()
|
|
8679
|
+
});
|
|
8680
|
+
}
|
|
8681
|
+
};
|
|
8682
|
+
return _this2;
|
|
8683
|
+
}
|
|
8684
|
+
var _proto2 = Consumer2.prototype;
|
|
8685
|
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8686
|
+
var observedBits = nextProps.observedBits;
|
|
8687
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8688
|
+
};
|
|
8689
|
+
_proto2.componentDidMount = function componentDidMount() {
|
|
8690
|
+
if (this.context[contextProp]) {
|
|
8691
|
+
this.context[contextProp].on(this.onUpdate);
|
|
8692
|
+
}
|
|
8693
|
+
var observedBits = this.props.observedBits;
|
|
8694
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8695
|
+
};
|
|
8696
|
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
8697
|
+
if (this.context[contextProp]) {
|
|
8698
|
+
this.context[contextProp].off(this.onUpdate);
|
|
8699
|
+
}
|
|
8700
|
+
};
|
|
8701
|
+
_proto2.getValue = function getValue() {
|
|
8702
|
+
if (this.context[contextProp]) {
|
|
8703
|
+
return this.context[contextProp].get();
|
|
8704
|
+
} else {
|
|
8705
|
+
return defaultValue;
|
|
8706
|
+
}
|
|
8707
|
+
};
|
|
8708
|
+
_proto2.render = function render() {
|
|
8709
|
+
return onlyChild(this.props.children)(this.state.value);
|
|
8710
|
+
};
|
|
8711
|
+
return Consumer2;
|
|
8712
|
+
}(React__default["default"].Component);
|
|
8713
|
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
8714
|
+
return {
|
|
8715
|
+
Provider,
|
|
8716
|
+
Consumer
|
|
8717
|
+
};
|
|
8718
|
+
}
|
|
8719
|
+
var createContext = React__default["default"].createContext || createReactContext;
|
|
8720
|
+
var createNamedContext = function createNamedContext2(name) {
|
|
8721
|
+
var context2 = createContext();
|
|
8722
|
+
context2.displayName = name;
|
|
8723
|
+
return context2;
|
|
8724
|
+
};
|
|
8725
|
+
var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
|
|
8726
|
+
var context = /* @__PURE__ */ createNamedContext("Router");
|
|
8727
|
+
var Router = /* @__PURE__ */ function(_React$Component) {
|
|
8728
|
+
_inheritsLoose(Router2, _React$Component);
|
|
8729
|
+
Router2.computeRootMatch = function computeRootMatch(pathname) {
|
|
8730
|
+
return {
|
|
8731
|
+
path: "/",
|
|
8732
|
+
url: "/",
|
|
8733
|
+
params: {},
|
|
8734
|
+
isExact: pathname === "/"
|
|
8735
|
+
};
|
|
8736
|
+
};
|
|
8737
|
+
function Router2(props) {
|
|
8738
|
+
var _this;
|
|
8739
|
+
_this = _React$Component.call(this, props) || this;
|
|
8740
|
+
_this.state = {
|
|
8741
|
+
location: props.history.location
|
|
8742
|
+
};
|
|
8743
|
+
_this._isMounted = false;
|
|
8744
|
+
_this._pendingLocation = null;
|
|
8745
|
+
if (!props.staticContext) {
|
|
8746
|
+
_this.unlisten = props.history.listen(function(location) {
|
|
8747
|
+
_this._pendingLocation = location;
|
|
8748
|
+
});
|
|
8749
|
+
}
|
|
8750
|
+
return _this;
|
|
8751
|
+
}
|
|
8752
|
+
var _proto = Router2.prototype;
|
|
8753
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
8754
|
+
var _this2 = this;
|
|
8755
|
+
this._isMounted = true;
|
|
8756
|
+
if (this.unlisten) {
|
|
8757
|
+
this.unlisten();
|
|
8758
|
+
}
|
|
8759
|
+
if (!this.props.staticContext) {
|
|
8760
|
+
this.unlisten = this.props.history.listen(function(location) {
|
|
8761
|
+
if (_this2._isMounted) {
|
|
8762
|
+
_this2.setState({
|
|
8763
|
+
location
|
|
8764
|
+
});
|
|
8765
|
+
}
|
|
8766
|
+
});
|
|
8767
|
+
}
|
|
8768
|
+
if (this._pendingLocation) {
|
|
8769
|
+
this.setState({
|
|
8770
|
+
location: this._pendingLocation
|
|
8771
|
+
});
|
|
8772
|
+
}
|
|
8773
|
+
};
|
|
8774
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8775
|
+
if (this.unlisten) {
|
|
8776
|
+
this.unlisten();
|
|
8777
|
+
this._isMounted = false;
|
|
8778
|
+
this._pendingLocation = null;
|
|
8779
|
+
}
|
|
8780
|
+
};
|
|
8781
|
+
_proto.render = function render() {
|
|
8782
|
+
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
8783
|
+
value: {
|
|
8784
|
+
history: this.props.history,
|
|
8785
|
+
location: this.state.location,
|
|
8786
|
+
match: Router2.computeRootMatch(this.state.location.pathname),
|
|
8787
|
+
staticContext: this.props.staticContext
|
|
8788
|
+
}
|
|
8789
|
+
}, /* @__PURE__ */ React__default["default"].createElement(historyContext.Provider, {
|
|
8790
|
+
children: this.props.children || null,
|
|
8791
|
+
value: this.props.history
|
|
8792
|
+
}));
|
|
8793
|
+
};
|
|
8794
|
+
return Router2;
|
|
8795
|
+
}(React__default["default"].Component);
|
|
8796
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8797
|
+
_inheritsLoose(MemoryRouter, _React$Component);
|
|
8798
|
+
function MemoryRouter() {
|
|
8799
|
+
var _this;
|
|
8800
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8801
|
+
args[_key] = arguments[_key];
|
|
8802
|
+
}
|
|
8803
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8804
|
+
_this.history = createMemoryHistory(_this.props);
|
|
8805
|
+
return _this;
|
|
8806
|
+
}
|
|
8807
|
+
var _proto = MemoryRouter.prototype;
|
|
8808
|
+
_proto.render = function render() {
|
|
8809
|
+
return /* @__PURE__ */ React__default["default"].createElement(Router, {
|
|
8810
|
+
history: this.history,
|
|
8811
|
+
children: this.props.children
|
|
8812
|
+
});
|
|
8813
|
+
};
|
|
8814
|
+
return MemoryRouter;
|
|
8815
|
+
})(React__default["default"].Component);
|
|
8816
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8817
|
+
_inheritsLoose(Lifecycle, _React$Component);
|
|
8818
|
+
function Lifecycle() {
|
|
8819
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8820
|
+
}
|
|
8821
|
+
var _proto = Lifecycle.prototype;
|
|
8822
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
8823
|
+
if (this.props.onMount)
|
|
8824
|
+
this.props.onMount.call(this, this);
|
|
8825
|
+
};
|
|
8826
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
8827
|
+
if (this.props.onUpdate)
|
|
8828
|
+
this.props.onUpdate.call(this, this, prevProps);
|
|
8829
|
+
};
|
|
8830
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8831
|
+
if (this.props.onUnmount)
|
|
8832
|
+
this.props.onUnmount.call(this, this);
|
|
8833
|
+
};
|
|
8834
|
+
_proto.render = function render() {
|
|
8835
|
+
return null;
|
|
8836
|
+
};
|
|
8837
|
+
return Lifecycle;
|
|
8838
|
+
})(React__default["default"].Component);
|
|
8839
|
+
var cache$1 = {};
|
|
8840
|
+
var cacheLimit$1 = 1e4;
|
|
8841
|
+
var cacheCount$1 = 0;
|
|
8842
|
+
function compilePath$1(path, options) {
|
|
8843
|
+
var cacheKey2 = "" + options.end + options.strict + options.sensitive;
|
|
8844
|
+
var pathCache = cache$1[cacheKey2] || (cache$1[cacheKey2] = {});
|
|
8845
|
+
if (pathCache[path])
|
|
8846
|
+
return pathCache[path];
|
|
8847
|
+
var keys = [];
|
|
8848
|
+
var regexp = pathToRegexp$1(path, keys, options);
|
|
8849
|
+
var result = {
|
|
8850
|
+
regexp,
|
|
8851
|
+
keys
|
|
8852
|
+
};
|
|
8853
|
+
if (cacheCount$1 < cacheLimit$1) {
|
|
8854
|
+
pathCache[path] = result;
|
|
8855
|
+
cacheCount$1++;
|
|
8856
|
+
}
|
|
8857
|
+
return result;
|
|
8858
|
+
}
|
|
8859
|
+
function matchPath(pathname, options) {
|
|
8860
|
+
if (options === void 0) {
|
|
8861
|
+
options = {};
|
|
8862
|
+
}
|
|
8863
|
+
if (typeof options === "string" || Array.isArray(options)) {
|
|
8864
|
+
options = {
|
|
8865
|
+
path: options
|
|
8866
|
+
};
|
|
8867
|
+
}
|
|
8868
|
+
var _options = options, path = _options.path, _options$exact = _options.exact, exact = _options$exact === void 0 ? false : _options$exact, _options$strict = _options.strict, strict = _options$strict === void 0 ? false : _options$strict, _options$sensitive = _options.sensitive, sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
|
|
8869
|
+
var paths = [].concat(path);
|
|
8870
|
+
return paths.reduce(function(matched, path2) {
|
|
8871
|
+
if (!path2 && path2 !== "")
|
|
8872
|
+
return null;
|
|
8873
|
+
if (matched)
|
|
8874
|
+
return matched;
|
|
8875
|
+
var _compilePath = compilePath$1(path2, {
|
|
8876
|
+
end: exact,
|
|
8877
|
+
strict,
|
|
8878
|
+
sensitive
|
|
8879
|
+
}), regexp = _compilePath.regexp, keys = _compilePath.keys;
|
|
8880
|
+
var match = regexp.exec(pathname);
|
|
8881
|
+
if (!match)
|
|
8882
|
+
return null;
|
|
8883
|
+
var url = match[0], values = match.slice(1);
|
|
8884
|
+
var isExact = pathname === url;
|
|
8885
|
+
if (exact && !isExact)
|
|
8886
|
+
return null;
|
|
8887
|
+
return {
|
|
8888
|
+
path: path2,
|
|
8889
|
+
url: path2 === "/" && url === "" ? "/" : url,
|
|
8890
|
+
isExact,
|
|
8891
|
+
params: keys.reduce(function(memo, key, index) {
|
|
8892
|
+
memo[key.name] = values[index];
|
|
8893
|
+
return memo;
|
|
8894
|
+
}, {})
|
|
8895
|
+
};
|
|
8896
|
+
}, null);
|
|
8897
|
+
}
|
|
8898
|
+
function isEmptyChildren(children) {
|
|
8899
|
+
return React__default["default"].Children.count(children) === 0;
|
|
8900
|
+
}
|
|
8901
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8902
|
+
_inheritsLoose(Route, _React$Component);
|
|
8903
|
+
function Route() {
|
|
8904
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8905
|
+
}
|
|
8906
|
+
var _proto = Route.prototype;
|
|
8907
|
+
_proto.render = function render() {
|
|
8908
|
+
var _this = this;
|
|
8909
|
+
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context$1) {
|
|
8910
|
+
!context$1 ? invariant(false) : void 0;
|
|
8911
|
+
var location = _this.props.location || context$1.location;
|
|
8912
|
+
var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
|
8913
|
+
var props = _extends$3({}, context$1, {
|
|
8914
|
+
location,
|
|
8915
|
+
match
|
|
8916
|
+
});
|
|
8917
|
+
var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
|
|
8918
|
+
if (Array.isArray(children) && isEmptyChildren(children)) {
|
|
8919
|
+
children = null;
|
|
8920
|
+
}
|
|
8921
|
+
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
8922
|
+
value: props
|
|
8923
|
+
}, props.match ? children ? typeof children === "function" ? children(props) : children : component ? /* @__PURE__ */ React__default["default"].createElement(component, props) : render2 ? render2(props) : null : typeof children === "function" ? children(props) : null);
|
|
8924
|
+
});
|
|
8925
|
+
};
|
|
8926
|
+
return Route;
|
|
8927
|
+
})(React__default["default"].Component);
|
|
8928
|
+
function addLeadingSlash(path) {
|
|
8929
|
+
return path.charAt(0) === "/" ? path : "/" + path;
|
|
8930
|
+
}
|
|
8931
|
+
function addBasename(basename, location) {
|
|
8932
|
+
if (!basename)
|
|
8933
|
+
return location;
|
|
8934
|
+
return _extends$3({}, location, {
|
|
8935
|
+
pathname: addLeadingSlash(basename) + location.pathname
|
|
8936
|
+
});
|
|
8937
|
+
}
|
|
8938
|
+
function stripBasename(basename, location) {
|
|
8939
|
+
if (!basename)
|
|
8940
|
+
return location;
|
|
8941
|
+
var base = addLeadingSlash(basename);
|
|
8942
|
+
if (location.pathname.indexOf(base) !== 0)
|
|
8943
|
+
return location;
|
|
8944
|
+
return _extends$3({}, location, {
|
|
8945
|
+
pathname: location.pathname.substr(base.length)
|
|
8946
|
+
});
|
|
8947
|
+
}
|
|
8948
|
+
function createURL(location) {
|
|
8949
|
+
return typeof location === "string" ? location : createPath(location);
|
|
8950
|
+
}
|
|
8951
|
+
function staticHandler(methodName) {
|
|
8952
|
+
return function() {
|
|
8953
|
+
invariant(false);
|
|
8954
|
+
};
|
|
8955
|
+
}
|
|
8956
|
+
function noop$2() {
|
|
8957
|
+
}
|
|
8958
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8959
|
+
_inheritsLoose(StaticRouter, _React$Component);
|
|
8960
|
+
function StaticRouter() {
|
|
8961
|
+
var _this;
|
|
8962
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8963
|
+
args[_key] = arguments[_key];
|
|
8964
|
+
}
|
|
8965
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8966
|
+
_this.handlePush = function(location) {
|
|
8967
|
+
return _this.navigateTo(location, "PUSH");
|
|
8968
|
+
};
|
|
8969
|
+
_this.handleReplace = function(location) {
|
|
8970
|
+
return _this.navigateTo(location, "REPLACE");
|
|
8971
|
+
};
|
|
8972
|
+
_this.handleListen = function() {
|
|
8973
|
+
return noop$2;
|
|
8974
|
+
};
|
|
8975
|
+
_this.handleBlock = function() {
|
|
8976
|
+
return noop$2;
|
|
8977
|
+
};
|
|
8978
|
+
return _this;
|
|
8979
|
+
}
|
|
8980
|
+
var _proto = StaticRouter.prototype;
|
|
8981
|
+
_proto.navigateTo = function navigateTo(location, action) {
|
|
8982
|
+
var _this$props = this.props, _this$props$basename = _this$props.basename, basename = _this$props$basename === void 0 ? "" : _this$props$basename, _this$props$context = _this$props.context, context2 = _this$props$context === void 0 ? {} : _this$props$context;
|
|
8983
|
+
context2.action = action;
|
|
8984
|
+
context2.location = addBasename(basename, createLocation(location));
|
|
8985
|
+
context2.url = createURL(context2.location);
|
|
8986
|
+
};
|
|
8987
|
+
_proto.render = function render() {
|
|
8988
|
+
var _this$props2 = this.props, _this$props2$basename = _this$props2.basename, basename = _this$props2$basename === void 0 ? "" : _this$props2$basename, _this$props2$context = _this$props2.context, context2 = _this$props2$context === void 0 ? {} : _this$props2$context, _this$props2$location = _this$props2.location, location = _this$props2$location === void 0 ? "/" : _this$props2$location, rest = _objectWithoutPropertiesLoose$3(_this$props2, ["basename", "context", "location"]);
|
|
8989
|
+
var history = {
|
|
8990
|
+
createHref: function createHref(path) {
|
|
8991
|
+
return addLeadingSlash(basename + createURL(path));
|
|
8992
|
+
},
|
|
8993
|
+
action: "POP",
|
|
8994
|
+
location: stripBasename(basename, createLocation(location)),
|
|
8995
|
+
push: this.handlePush,
|
|
8996
|
+
replace: this.handleReplace,
|
|
8997
|
+
go: staticHandler(),
|
|
8998
|
+
goBack: staticHandler(),
|
|
8999
|
+
goForward: staticHandler(),
|
|
9000
|
+
listen: this.handleListen,
|
|
9001
|
+
block: this.handleBlock
|
|
9002
|
+
};
|
|
9003
|
+
return /* @__PURE__ */ React__default["default"].createElement(Router, _extends$3({}, rest, {
|
|
9004
|
+
history,
|
|
9005
|
+
staticContext: context2
|
|
9006
|
+
}));
|
|
9007
|
+
};
|
|
9008
|
+
return StaticRouter;
|
|
9009
|
+
})(React__default["default"].Component);
|
|
9010
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
9011
|
+
_inheritsLoose(Switch2, _React$Component);
|
|
9012
|
+
function Switch2() {
|
|
9013
|
+
return _React$Component.apply(this, arguments) || this;
|
|
9014
|
+
}
|
|
9015
|
+
var _proto = Switch2.prototype;
|
|
9016
|
+
_proto.render = function render() {
|
|
9017
|
+
var _this = this;
|
|
9018
|
+
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context2) {
|
|
9019
|
+
!context2 ? invariant(false) : void 0;
|
|
9020
|
+
var location = _this.props.location || context2.location;
|
|
9021
|
+
var element, match;
|
|
9022
|
+
React__default["default"].Children.forEach(_this.props.children, function(child) {
|
|
9023
|
+
if (match == null && /* @__PURE__ */ React__default["default"].isValidElement(child)) {
|
|
9024
|
+
element = child;
|
|
9025
|
+
var path = child.props.path || child.props.from;
|
|
9026
|
+
match = path ? matchPath(location.pathname, _extends$3({}, child.props, {
|
|
9027
|
+
path
|
|
9028
|
+
})) : context2.match;
|
|
9029
|
+
}
|
|
9030
|
+
});
|
|
9031
|
+
return match ? /* @__PURE__ */ React__default["default"].cloneElement(element, {
|
|
9032
|
+
location,
|
|
9033
|
+
computedMatch: match
|
|
9034
|
+
}) : null;
|
|
9035
|
+
});
|
|
9036
|
+
};
|
|
9037
|
+
return Switch2;
|
|
9038
|
+
})(React__default["default"].Component);
|
|
9039
|
+
var useContext = React__default["default"].useContext;
|
|
9040
|
+
function useHistory() {
|
|
9041
|
+
return useContext(historyContext);
|
|
9042
|
+
}
|
|
9043
|
+
const defaultProps$H = {
|
|
9044
|
+
...ComponentDefaults,
|
|
9045
|
+
title: null,
|
|
9046
|
+
subTitle: null,
|
|
9047
|
+
desc: "",
|
|
9048
|
+
descTextAlign: "right",
|
|
9049
|
+
isLink: false,
|
|
9050
|
+
icon: "",
|
|
9051
|
+
roundRadius: "6px",
|
|
9052
|
+
url: "",
|
|
9053
|
+
to: "",
|
|
9054
|
+
replace: false,
|
|
9055
|
+
center: false,
|
|
9056
|
+
size: "",
|
|
9057
|
+
className: "",
|
|
9058
|
+
iconSlot: null,
|
|
9059
|
+
linkSlot: null,
|
|
9060
|
+
click: (event) => {
|
|
9061
|
+
},
|
|
9062
|
+
onClick: (event) => {
|
|
9063
|
+
}
|
|
9064
|
+
};
|
|
9065
|
+
const Cell = (props) => {
|
|
9066
|
+
const {
|
|
9067
|
+
children,
|
|
9068
|
+
click,
|
|
9069
|
+
onClick,
|
|
9070
|
+
title,
|
|
9071
|
+
subTitle,
|
|
9072
|
+
desc,
|
|
9073
|
+
descTextAlign,
|
|
9074
|
+
isLink,
|
|
9075
|
+
icon,
|
|
9076
|
+
roundRadius,
|
|
9077
|
+
url,
|
|
9078
|
+
to: to2,
|
|
9079
|
+
replace,
|
|
9080
|
+
center,
|
|
9081
|
+
size,
|
|
9082
|
+
className,
|
|
9083
|
+
iconSlot,
|
|
9084
|
+
linkSlot,
|
|
9085
|
+
iconClassPrefix,
|
|
9086
|
+
iconFontClassName,
|
|
9087
|
+
...rest
|
|
9088
|
+
} = {
|
|
9089
|
+
...defaultProps$H,
|
|
9090
|
+
...props
|
|
9091
|
+
};
|
|
9092
|
+
const b2 = cn("cell");
|
|
9093
|
+
const history = useHistory();
|
|
9094
|
+
const handleClick2 = (event) => {
|
|
9095
|
+
click(event);
|
|
9096
|
+
onClick(event);
|
|
9097
|
+
if (to2 && history) {
|
|
9098
|
+
history[replace ? "replace" : "push"](to2);
|
|
9099
|
+
} else if (url) {
|
|
9100
|
+
replace ? window.location.replace(url) : window.location.href = url;
|
|
9101
|
+
}
|
|
9102
|
+
};
|
|
9103
|
+
const baseStyle = {
|
|
9104
|
+
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
9105
|
+
};
|
|
9106
|
+
const styles = title || subTitle || icon ? {} : {
|
|
9107
|
+
textAlign: descTextAlign,
|
|
9108
|
+
flex: 1
|
|
9109
|
+
};
|
|
9110
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9111
|
+
className: `${b2(
|
|
9112
|
+
{ clickable: !!(isLink || to2), center, large: size === "large" },
|
|
9113
|
+
[className]
|
|
9114
|
+
)} `,
|
|
9115
|
+
onClick: (event) => handleClick2(event),
|
|
9116
|
+
style: baseStyle,
|
|
9117
|
+
...rest
|
|
9118
|
+
}, children || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9119
|
+
className: b2("icon")
|
|
9120
|
+
}, iconSlot || (icon ? /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
9121
|
+
classPrefix: iconClassPrefix,
|
|
9122
|
+
fontClassName: iconFontClassName,
|
|
9123
|
+
name: icon,
|
|
9124
|
+
className: "icon"
|
|
9125
|
+
}) : null)) : null, title || subTitle ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9126
|
+
className: `${b2("title")}`
|
|
9127
|
+
}, title ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9128
|
+
className: b2("maintitle")
|
|
9129
|
+
}, title) : null, subTitle ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9130
|
+
className: b2("subtitle")
|
|
9131
|
+
}, subTitle) : null) : null, desc ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9132
|
+
className: b2("value", {
|
|
9133
|
+
alone: !title && !subTitle
|
|
9134
|
+
}),
|
|
9135
|
+
style: styles
|
|
9136
|
+
}, desc) : null, !linkSlot && (isLink || to2) ? /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
9137
|
+
classPrefix: iconClassPrefix,
|
|
9138
|
+
fontClassName: iconFontClassName,
|
|
9139
|
+
name: "right",
|
|
9140
|
+
className: b2("link")
|
|
9141
|
+
}) : linkSlot));
|
|
9142
|
+
};
|
|
9143
|
+
Cell.defaultProps = defaultProps$H;
|
|
9144
|
+
Cell.displayName = "NutCell";
|
|
9145
|
+
const defaultProps$G = {
|
|
9146
|
+
...ComponentDefaults,
|
|
9147
|
+
name: "",
|
|
9148
|
+
label: "",
|
|
9149
|
+
className: "",
|
|
9150
|
+
rules: [{ required: false, message: "" }],
|
|
9151
|
+
disabled: false,
|
|
9152
|
+
labelWidth: 90,
|
|
9153
|
+
errorMessageAlign: "left",
|
|
9154
|
+
showErrorLine: true,
|
|
9155
|
+
showErrorMessage: true
|
|
9156
|
+
};
|
|
9157
|
+
class FormItem extends React__default["default"].Component {
|
|
9158
|
+
constructor() {
|
|
9159
|
+
super(...arguments);
|
|
9160
|
+
this.getControlled = (children) => {
|
|
9161
|
+
const { getFieldValue, setFieldsValue } = this.context;
|
|
9162
|
+
const { name } = this.props;
|
|
9163
|
+
const type = children.type.NAME;
|
|
9164
|
+
return {
|
|
9165
|
+
value: getFieldValue(name),
|
|
9166
|
+
onChange: (event) => {
|
|
9167
|
+
let newValue = event;
|
|
9168
|
+
switch (type) {
|
|
9169
|
+
case "checkbox":
|
|
9170
|
+
newValue = event.target.value;
|
|
9171
|
+
break;
|
|
9172
|
+
}
|
|
9173
|
+
setFieldsValue({ [name]: newValue });
|
|
9174
|
+
}
|
|
9175
|
+
};
|
|
9176
|
+
};
|
|
9177
|
+
this.onStoreChange = () => {
|
|
9178
|
+
this.forceUpdate();
|
|
9179
|
+
};
|
|
9180
|
+
this.renderLayout = (childNode) => {
|
|
9181
|
+
var _a, _b;
|
|
9182
|
+
const {
|
|
9183
|
+
label,
|
|
9184
|
+
name,
|
|
9185
|
+
rules = [{ required: false, message: "" }],
|
|
9186
|
+
className,
|
|
9187
|
+
labelWidth,
|
|
9188
|
+
errorMessageAlign,
|
|
9189
|
+
showErrorLine,
|
|
9190
|
+
showErrorMessage
|
|
9191
|
+
} = {
|
|
9192
|
+
...defaultProps$G,
|
|
9193
|
+
...this.props
|
|
9194
|
+
};
|
|
9195
|
+
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
9196
|
+
return item2.field === name;
|
|
9197
|
+
}));
|
|
9198
|
+
const { starPositon } = this.context;
|
|
9199
|
+
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
9200
|
+
className: "required"
|
|
9201
|
+
});
|
|
9202
|
+
const renderLabel = starPositon === "Right" ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, label, renderStar) : /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderStar, label);
|
|
9203
|
+
return /* @__PURE__ */ React__default["default"].createElement(Cell, {
|
|
9204
|
+
className: `nut-form-item ${className}`
|
|
9205
|
+
}, label ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9206
|
+
className: "nut-cell__title nut-form-item__label",
|
|
9207
|
+
style: {
|
|
9208
|
+
width: this.pxCheck(labelWidth)
|
|
9209
|
+
}
|
|
9210
|
+
}, renderLabel) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9211
|
+
className: "nut-cell__value nut-form-item__body"
|
|
9212
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9213
|
+
className: "nut-form-item__body__slots"
|
|
9214
|
+
}, childNode), item.length > 0 && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9215
|
+
className: "nut-form-item__body__tips",
|
|
9216
|
+
style: { textAlign: errorMessageAlign }
|
|
9217
|
+
}, item[0].message)));
|
|
9218
|
+
};
|
|
9219
|
+
this.pxCheck = (value) => {
|
|
9220
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
9221
|
+
};
|
|
9222
|
+
}
|
|
9223
|
+
componentDidMount() {
|
|
9224
|
+
this.cancelRegister = this.context.registerField(this);
|
|
9225
|
+
}
|
|
9226
|
+
componentWillUnmount() {
|
|
9227
|
+
if (this.cancelRegister) {
|
|
9228
|
+
this.cancelRegister();
|
|
9229
|
+
}
|
|
9230
|
+
}
|
|
9231
|
+
render() {
|
|
9232
|
+
const { children } = this.props;
|
|
9233
|
+
const c6 = Array.isArray(children) ? children[0] : children;
|
|
9234
|
+
const returnChildNode = React__default["default"].cloneElement(
|
|
9235
|
+
c6,
|
|
9236
|
+
this.getControlled(c6)
|
|
9237
|
+
);
|
|
9238
|
+
return this.renderLayout(returnChildNode);
|
|
9239
|
+
}
|
|
9240
|
+
}
|
|
9241
|
+
FormItem.defaultProps = defaultProps$G;
|
|
9242
|
+
FormItem.contextType = FormItemContext;
|
|
7843
9243
|
const defaultProps$F = {
|
|
7844
9244
|
cancelTxt: "",
|
|
7845
9245
|
optionTag: "name",
|
|
@@ -8035,10 +9435,10 @@
|
|
|
8035
9435
|
e2.preventDefault();
|
|
8036
9436
|
if (e2.touches.length === 1 && dragRef.current) {
|
|
8037
9437
|
const touch = e2.touches[0];
|
|
8038
|
-
const
|
|
8039
|
-
const
|
|
8040
|
-
translateX.current =
|
|
8041
|
-
translateY.current =
|
|
9438
|
+
const x2 = touch.clientX - axisCache.current.x;
|
|
9439
|
+
const y2 = touch.clientY - axisCache.current.y;
|
|
9440
|
+
translateX.current = x2 + transformCache.current.x;
|
|
9441
|
+
translateY.current = y2 + transformCache.current.y;
|
|
8042
9442
|
if (translateX.current < boundaryState.left) {
|
|
8043
9443
|
translateX.current = boundaryState.left;
|
|
8044
9444
|
} else if (translateX.current > boundaryState.right) {
|
|
@@ -8309,7 +9709,7 @@
|
|
|
8309
9709
|
const scrollTop = React.useRef(0);
|
|
8310
9710
|
const direction = React.useRef("down");
|
|
8311
9711
|
const isTouching = React.useRef(false);
|
|
8312
|
-
const
|
|
9712
|
+
const y2 = React.useRef(0);
|
|
8313
9713
|
const refreshMaxH = React.useRef(0);
|
|
8314
9714
|
const distance = React.useRef(0);
|
|
8315
9715
|
const b2 = cn("infiniteloading");
|
|
@@ -8368,12 +9768,12 @@
|
|
|
8368
9768
|
};
|
|
8369
9769
|
const touchStart = (event) => {
|
|
8370
9770
|
if (scrollTop.current == 0 && !isTouching.current && isOpenRefresh) {
|
|
8371
|
-
|
|
9771
|
+
y2.current = event.touches[0].pageY;
|
|
8372
9772
|
isTouching.current = true;
|
|
8373
9773
|
}
|
|
8374
9774
|
};
|
|
8375
9775
|
const touchMove = (event) => {
|
|
8376
|
-
distance.current = event.touches[0].pageY -
|
|
9776
|
+
distance.current = event.touches[0].pageY - y2.current;
|
|
8377
9777
|
if (distance.current > 0 && isTouching.current) {
|
|
8378
9778
|
event.preventDefault();
|
|
8379
9779
|
setTopDisScoll(distance.current);
|
|
@@ -8642,11 +10042,11 @@
|
|
|
8642
10042
|
const onTouchStart = async (event) => {
|
|
8643
10043
|
if (leftWrapper.current) {
|
|
8644
10044
|
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
8645
|
-
setActionWidth((
|
|
10045
|
+
setActionWidth((v2) => ({ ...v2, left: leftRect.width }));
|
|
8646
10046
|
}
|
|
8647
10047
|
if (rightWrapper.current) {
|
|
8648
10048
|
const rightRect = await getRectByTaro(rightWrapper.current);
|
|
8649
|
-
setActionWidth((
|
|
10049
|
+
setActionWidth((v2) => ({ ...v2, right: rightRect.width }));
|
|
8650
10050
|
}
|
|
8651
10051
|
if (!props.disabled) {
|
|
8652
10052
|
startOffset.current = state.offset;
|
|
@@ -8675,7 +10075,7 @@
|
|
|
8675
10075
|
};
|
|
8676
10076
|
const onTouchEnd = () => {
|
|
8677
10077
|
if (state.dragging) {
|
|
8678
|
-
setState((
|
|
10078
|
+
setState((v2) => ({ ...v2, dragging: false }));
|
|
8679
10079
|
toggle(state.offset > 0 ? "left" : "right");
|
|
8680
10080
|
setTimeout(() => {
|
|
8681
10081
|
lockClick.current = false;
|
|
@@ -8699,7 +10099,7 @@
|
|
|
8699
10099
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
8700
10100
|
const name = props.name;
|
|
8701
10101
|
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
8702
|
-
setState((
|
|
10102
|
+
setState((v2) => ({ ...v2, offset: Number(offset) || 0 }));
|
|
8703
10103
|
};
|
|
8704
10104
|
const close = (position) => {
|
|
8705
10105
|
var _a;
|
|
@@ -8710,7 +10110,7 @@
|
|
|
8710
10110
|
position: position || "left"
|
|
8711
10111
|
});
|
|
8712
10112
|
}
|
|
8713
|
-
setState((
|
|
10113
|
+
setState((v2) => ({ ...v2, offset: 0 }));
|
|
8714
10114
|
};
|
|
8715
10115
|
const rangeCalculation = (num, min, max) => {
|
|
8716
10116
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
@@ -8769,14 +10169,14 @@
|
|
|
8769
10169
|
});
|
|
8770
10170
|
Swipe.defaultProps = defaultProps$y;
|
|
8771
10171
|
Swipe.displayName = "NutSwipe";
|
|
8772
|
-
function clamp(
|
|
8773
|
-
return Math.max(min, Math.min(
|
|
10172
|
+
function clamp(v2, min, max) {
|
|
10173
|
+
return Math.max(min, Math.min(v2, max));
|
|
8774
10174
|
}
|
|
8775
10175
|
const V = {
|
|
8776
|
-
toVector(
|
|
8777
|
-
if (
|
|
8778
|
-
|
|
8779
|
-
return Array.isArray(
|
|
10176
|
+
toVector(v2, fallback) {
|
|
10177
|
+
if (v2 === void 0)
|
|
10178
|
+
v2 = fallback;
|
|
10179
|
+
return Array.isArray(v2) ? v2 : [v2, v2];
|
|
8780
10180
|
},
|
|
8781
10181
|
add(v1, v2) {
|
|
8782
10182
|
return [v1[0] + v2[0], v1[1] + v2[1]];
|
|
@@ -8955,11 +10355,11 @@
|
|
|
8955
10355
|
}
|
|
8956
10356
|
return payload;
|
|
8957
10357
|
}
|
|
8958
|
-
function call$1(
|
|
8959
|
-
if (typeof
|
|
8960
|
-
return
|
|
10358
|
+
function call$1(v2, ...args) {
|
|
10359
|
+
if (typeof v2 === "function") {
|
|
10360
|
+
return v2(...args);
|
|
8961
10361
|
} else {
|
|
8962
|
-
return
|
|
10362
|
+
return v2;
|
|
8963
10363
|
}
|
|
8964
10364
|
}
|
|
8965
10365
|
function noop$1() {
|
|
@@ -9224,20 +10624,20 @@
|
|
|
9224
10624
|
}
|
|
9225
10625
|
state._blocked = (config2.lockDirection || !!config2.axis) && !state.axis || !!config2.axis && config2.axis !== state.axis;
|
|
9226
10626
|
}
|
|
9227
|
-
restrictToAxis(
|
|
10627
|
+
restrictToAxis(v2) {
|
|
9228
10628
|
if (this.config.axis || this.config.lockDirection) {
|
|
9229
10629
|
switch (this.state.axis) {
|
|
9230
10630
|
case "x":
|
|
9231
|
-
|
|
10631
|
+
v2[1] = 0;
|
|
9232
10632
|
break;
|
|
9233
10633
|
case "y":
|
|
9234
|
-
|
|
10634
|
+
v2[0] = 0;
|
|
9235
10635
|
break;
|
|
9236
10636
|
}
|
|
9237
10637
|
}
|
|
9238
10638
|
}
|
|
9239
10639
|
}
|
|
9240
|
-
const identity = (
|
|
10640
|
+
const identity = (v2) => v2;
|
|
9241
10641
|
const DEFAULT_RUBBERBAND = 0.15;
|
|
9242
10642
|
const commonConfigResolver = {
|
|
9243
10643
|
enabled(value = true) {
|
|
@@ -9721,11 +11121,11 @@
|
|
|
9721
11121
|
return [D.min, D.max];
|
|
9722
11122
|
};
|
|
9723
11123
|
const _angleBounds = (state) => {
|
|
9724
|
-
const
|
|
11124
|
+
const A2 = assignDefault(call$1(angleBounds, state), {
|
|
9725
11125
|
min: -Infinity,
|
|
9726
11126
|
max: Infinity
|
|
9727
11127
|
});
|
|
9728
|
-
return [
|
|
11128
|
+
return [A2.min, A2.max];
|
|
9729
11129
|
};
|
|
9730
11130
|
if (typeof scaleBounds !== "function" && typeof angleBounds !== "function")
|
|
9731
11131
|
return [_scaleBounds(), _angleBounds()];
|
|
@@ -10078,7 +11478,7 @@
|
|
|
10078
11478
|
raf.setTimeout = (handler, ms) => {
|
|
10079
11479
|
let time = raf.now() + ms;
|
|
10080
11480
|
let cancel = () => {
|
|
10081
|
-
let i = timeouts.findIndex((
|
|
11481
|
+
let i = timeouts.findIndex((t2) => t2.cancel == cancel);
|
|
10082
11482
|
if (~i)
|
|
10083
11483
|
timeouts.splice(i, 1);
|
|
10084
11484
|
pendingCount -= ~i ? 1 : 0;
|
|
@@ -10093,7 +11493,7 @@
|
|
|
10093
11493
|
start();
|
|
10094
11494
|
return timeout;
|
|
10095
11495
|
};
|
|
10096
|
-
let findTimeout = (time) => ~(~timeouts.findIndex((
|
|
11496
|
+
let findTimeout = (time) => ~(~timeouts.findIndex((t2) => t2.time > time) || ~timeouts.length);
|
|
10097
11497
|
raf.cancel = (fn) => {
|
|
10098
11498
|
onStartQueue.delete(fn);
|
|
10099
11499
|
onFrameQueue.delete(fn);
|
|
@@ -10174,7 +11574,7 @@
|
|
|
10174
11574
|
ts = raf.now();
|
|
10175
11575
|
let count = findTimeout(ts);
|
|
10176
11576
|
if (count) {
|
|
10177
|
-
eachSafely(timeouts.splice(0, count), (
|
|
11577
|
+
eachSafely(timeouts.splice(0, count), (t2) => t2.handler());
|
|
10178
11578
|
pendingCount -= count;
|
|
10179
11579
|
}
|
|
10180
11580
|
if (!pendingCount) {
|
|
@@ -10580,26 +11980,26 @@
|
|
|
10580
11980
|
}
|
|
10581
11981
|
return null;
|
|
10582
11982
|
}
|
|
10583
|
-
function hue2rgb(
|
|
10584
|
-
if (
|
|
10585
|
-
|
|
10586
|
-
if (
|
|
10587
|
-
|
|
10588
|
-
if (
|
|
10589
|
-
return
|
|
10590
|
-
if (
|
|
10591
|
-
return
|
|
10592
|
-
if (
|
|
10593
|
-
return
|
|
10594
|
-
return
|
|
11983
|
+
function hue2rgb(p2, q2, t2) {
|
|
11984
|
+
if (t2 < 0)
|
|
11985
|
+
t2 += 1;
|
|
11986
|
+
if (t2 > 1)
|
|
11987
|
+
t2 -= 1;
|
|
11988
|
+
if (t2 < 1 / 6)
|
|
11989
|
+
return p2 + (q2 - p2) * 6 * t2;
|
|
11990
|
+
if (t2 < 1 / 2)
|
|
11991
|
+
return q2;
|
|
11992
|
+
if (t2 < 2 / 3)
|
|
11993
|
+
return p2 + (q2 - p2) * (2 / 3 - t2) * 6;
|
|
11994
|
+
return p2;
|
|
10595
11995
|
}
|
|
10596
|
-
function hslToRgb(
|
|
10597
|
-
const
|
|
10598
|
-
const
|
|
10599
|
-
const r2 = hue2rgb(
|
|
10600
|
-
const
|
|
10601
|
-
const b2 = hue2rgb(
|
|
10602
|
-
return Math.round(r2 * 255) << 24 | Math.round(
|
|
11996
|
+
function hslToRgb(h2, s, l2) {
|
|
11997
|
+
const q2 = l2 < 0.5 ? l2 * (1 + s) : l2 + s - l2 * s;
|
|
11998
|
+
const p2 = 2 * l2 - q2;
|
|
11999
|
+
const r2 = hue2rgb(p2, q2, h2 + 1 / 3);
|
|
12000
|
+
const g2 = hue2rgb(p2, q2, h2);
|
|
12001
|
+
const b2 = hue2rgb(p2, q2, h2 - 1 / 3);
|
|
12002
|
+
return Math.round(r2 * 255) << 24 | Math.round(g2 * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
10603
12003
|
}
|
|
10604
12004
|
function parse255(str) {
|
|
10605
12005
|
const int = parseInt(str, 10);
|
|
@@ -10635,10 +12035,10 @@
|
|
|
10635
12035
|
return input;
|
|
10636
12036
|
int32Color = int32Color || 0;
|
|
10637
12037
|
let r2 = (int32Color & 4278190080) >>> 24;
|
|
10638
|
-
let
|
|
12038
|
+
let g2 = (int32Color & 16711680) >>> 16;
|
|
10639
12039
|
let b2 = (int32Color & 65280) >>> 8;
|
|
10640
12040
|
let a = (int32Color & 255) / 255;
|
|
10641
|
-
return `rgba(${r2}, ${
|
|
12041
|
+
return `rgba(${r2}, ${g2}, ${b2}, ${a})`;
|
|
10642
12042
|
}
|
|
10643
12043
|
const createInterpolator = (range, output, extrapolate) => {
|
|
10644
12044
|
if (is.fun(range)) {
|
|
@@ -10659,7 +12059,7 @@
|
|
|
10659
12059
|
const inputRange = config2.range || [0, 1];
|
|
10660
12060
|
const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
|
|
10661
12061
|
const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
|
|
10662
|
-
const easing = config2.easing || ((
|
|
12062
|
+
const easing = config2.easing || ((t2) => t2);
|
|
10663
12063
|
return (input) => {
|
|
10664
12064
|
const range2 = findRange(input, inputRange);
|
|
10665
12065
|
return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
|
|
@@ -10705,7 +12105,7 @@
|
|
|
10705
12105
|
return i - 1;
|
|
10706
12106
|
}
|
|
10707
12107
|
function _extends$2() {
|
|
10708
|
-
_extends$2 = Object.assign
|
|
12108
|
+
_extends$2 = Object.assign ? Object.assign.bind() : function(target) {
|
|
10709
12109
|
for (var i = 1; i < arguments.length; i++) {
|
|
10710
12110
|
var source = arguments[i];
|
|
10711
12111
|
for (var key in source) {
|
|
@@ -11118,7 +12518,7 @@
|
|
|
11118
12518
|
return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;
|
|
11119
12519
|
}
|
|
11120
12520
|
function _extends$1() {
|
|
11121
|
-
_extends$1 = Object.assign
|
|
12521
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function(target) {
|
|
11122
12522
|
for (var i = 1; i < arguments.length; i++) {
|
|
11123
12523
|
var source = arguments[i];
|
|
11124
12524
|
for (var key in source) {
|
|
@@ -11237,7 +12637,7 @@
|
|
|
11237
12637
|
};
|
|
11238
12638
|
const getDisplayName = (arg) => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;
|
|
11239
12639
|
function _extends() {
|
|
11240
|
-
_extends = Object.assign
|
|
12640
|
+
_extends = Object.assign ? Object.assign.bind() : function(target) {
|
|
11241
12641
|
for (var i = 1; i < arguments.length; i++) {
|
|
11242
12642
|
var source = arguments[i];
|
|
11243
12643
|
for (var key in source) {
|
|
@@ -11390,51 +12790,51 @@
|
|
|
11390
12790
|
const c3 = c1 + 1;
|
|
11391
12791
|
const c4 = 2 * Math.PI / 3;
|
|
11392
12792
|
const c5 = 2 * Math.PI / 4.5;
|
|
11393
|
-
const bounceOut = (
|
|
12793
|
+
const bounceOut = (x2) => {
|
|
11394
12794
|
const n1 = 7.5625;
|
|
11395
12795
|
const d1 = 2.75;
|
|
11396
|
-
if (
|
|
11397
|
-
return n1 *
|
|
11398
|
-
} else if (
|
|
11399
|
-
return n1 * (
|
|
11400
|
-
} else if (
|
|
11401
|
-
return n1 * (
|
|
12796
|
+
if (x2 < 1 / d1) {
|
|
12797
|
+
return n1 * x2 * x2;
|
|
12798
|
+
} else if (x2 < 2 / d1) {
|
|
12799
|
+
return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
|
|
12800
|
+
} else if (x2 < 2.5 / d1) {
|
|
12801
|
+
return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
|
|
11402
12802
|
} else {
|
|
11403
|
-
return n1 * (
|
|
12803
|
+
return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
|
|
11404
12804
|
}
|
|
11405
12805
|
};
|
|
11406
12806
|
const easings = {
|
|
11407
|
-
linear: (
|
|
11408
|
-
easeInQuad: (
|
|
11409
|
-
easeOutQuad: (
|
|
11410
|
-
easeInOutQuad: (
|
|
11411
|
-
easeInCubic: (
|
|
11412
|
-
easeOutCubic: (
|
|
11413
|
-
easeInOutCubic: (
|
|
11414
|
-
easeInQuart: (
|
|
11415
|
-
easeOutQuart: (
|
|
11416
|
-
easeInOutQuart: (
|
|
11417
|
-
easeInQuint: (
|
|
11418
|
-
easeOutQuint: (
|
|
11419
|
-
easeInOutQuint: (
|
|
11420
|
-
easeInSine: (
|
|
11421
|
-
easeOutSine: (
|
|
11422
|
-
easeInOutSine: (
|
|
11423
|
-
easeInExpo: (
|
|
11424
|
-
easeOutExpo: (
|
|
11425
|
-
easeInOutExpo: (
|
|
11426
|
-
easeInCirc: (
|
|
11427
|
-
easeOutCirc: (
|
|
11428
|
-
easeInOutCirc: (
|
|
11429
|
-
easeInBack: (
|
|
11430
|
-
easeOutBack: (
|
|
11431
|
-
easeInOutBack: (
|
|
11432
|
-
easeInElastic: (
|
|
11433
|
-
easeOutElastic: (
|
|
11434
|
-
easeInOutElastic: (
|
|
11435
|
-
easeInBounce: (
|
|
12807
|
+
linear: (x2) => x2,
|
|
12808
|
+
easeInQuad: (x2) => x2 * x2,
|
|
12809
|
+
easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
|
|
12810
|
+
easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
|
|
12811
|
+
easeInCubic: (x2) => x2 * x2 * x2,
|
|
12812
|
+
easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
|
|
12813
|
+
easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
|
|
12814
|
+
easeInQuart: (x2) => x2 * x2 * x2 * x2,
|
|
12815
|
+
easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
|
|
12816
|
+
easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
|
|
12817
|
+
easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
|
|
12818
|
+
easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
|
|
12819
|
+
easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
|
|
12820
|
+
easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
|
|
12821
|
+
easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
|
|
12822
|
+
easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
|
|
12823
|
+
easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
|
|
12824
|
+
easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
|
|
12825
|
+
easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
|
|
12826
|
+
easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
|
|
12827
|
+
easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
|
|
12828
|
+
easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
|
|
12829
|
+
easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
|
|
12830
|
+
easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
|
|
12831
|
+
easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
|
|
12832
|
+
easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
|
|
12833
|
+
easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
|
|
12834
|
+
easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
|
|
12835
|
+
easeInBounce: (x2) => 1 - bounceOut(1 - x2),
|
|
11436
12836
|
easeOutBounce: bounceOut,
|
|
11437
|
-
easeInOutBounce: (
|
|
12837
|
+
easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
|
|
11438
12838
|
};
|
|
11439
12839
|
const defaults = _extends({}, config.default, {
|
|
11440
12840
|
mass: 1,
|
|
@@ -11701,7 +13101,7 @@
|
|
|
11701
13101
|
})();
|
|
11702
13102
|
}
|
|
11703
13103
|
function stopAsync(state, cancelId) {
|
|
11704
|
-
flush(state.timeouts, (
|
|
13104
|
+
flush(state.timeouts, (t2) => t2.cancel());
|
|
11705
13105
|
state.pauseQueue.clear();
|
|
11706
13106
|
state.resumeQueue.clear();
|
|
11707
13107
|
state.asyncId = state.asyncTo = state.promise = void 0;
|
|
@@ -11870,8 +13270,9 @@
|
|
|
11870
13270
|
const from = anim.fromValues[i];
|
|
11871
13271
|
const v0 = node2.v0 != null ? node2.v0 : node2.v0 = is.arr(config2.velocity) ? config2.velocity[i] : config2.velocity;
|
|
11872
13272
|
let velocity;
|
|
13273
|
+
const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
|
|
11873
13274
|
if (!is.und(config2.duration)) {
|
|
11874
|
-
let
|
|
13275
|
+
let p2 = 1;
|
|
11875
13276
|
if (config2.duration > 0) {
|
|
11876
13277
|
if (this._memoizedDuration !== config2.duration) {
|
|
11877
13278
|
this._memoizedDuration = config2.duration;
|
|
@@ -11880,22 +13281,21 @@
|
|
|
11880
13281
|
elapsed = node2.elapsedTime += dt;
|
|
11881
13282
|
}
|
|
11882
13283
|
}
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
node2.durationProgress =
|
|
13284
|
+
p2 = (config2.progress || 0) + elapsed / this._memoizedDuration;
|
|
13285
|
+
p2 = p2 > 1 ? 1 : p2 < 0 ? 0 : p2;
|
|
13286
|
+
node2.durationProgress = p2;
|
|
11886
13287
|
}
|
|
11887
|
-
position = from + config2.easing(
|
|
13288
|
+
position = from + config2.easing(p2) * (to2 - from);
|
|
11888
13289
|
velocity = (position - node2.lastPosition) / dt;
|
|
11889
|
-
finished =
|
|
13290
|
+
finished = p2 == 1;
|
|
11890
13291
|
} else if (config2.decay) {
|
|
11891
13292
|
const decay = config2.decay === true ? 0.998 : config2.decay;
|
|
11892
13293
|
const e2 = Math.exp(-(1 - decay) * elapsed);
|
|
11893
13294
|
position = from + v0 / (1 - decay) * (1 - e2);
|
|
11894
|
-
finished = Math.abs(node2.lastPosition - position)
|
|
13295
|
+
finished = Math.abs(node2.lastPosition - position) <= precision;
|
|
11895
13296
|
velocity = v0 * e2;
|
|
11896
13297
|
} else {
|
|
11897
13298
|
velocity = node2.lastVelocity == null ? v0 : node2.lastVelocity;
|
|
11898
|
-
const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
|
|
11899
13299
|
const restVelocity = config2.restVelocity || precision / 10;
|
|
11900
13300
|
const bounceFactor = config2.clamp ? 0 : config2.bounce;
|
|
11901
13301
|
const canBounce = !is.und(bounceFactor);
|
|
@@ -11904,7 +13304,7 @@
|
|
|
11904
13304
|
let isBouncing = false;
|
|
11905
13305
|
const step = 1;
|
|
11906
13306
|
const numSteps = Math.ceil(dt / step);
|
|
11907
|
-
for (let
|
|
13307
|
+
for (let n2 = 0; n2 < numSteps; ++n2) {
|
|
11908
13308
|
isMoving = Math.abs(velocity) > restVelocity;
|
|
11909
13309
|
if (!isMoving) {
|
|
11910
13310
|
finished = Math.abs(to2 - position) <= precision;
|
|
@@ -12885,9 +14285,9 @@
|
|
|
12885
14285
|
}
|
|
12886
14286
|
}
|
|
12887
14287
|
const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));
|
|
12888
|
-
const
|
|
12889
|
-
const prevContext = usePrev(
|
|
12890
|
-
const hasContext =
|
|
14288
|
+
const context2 = React.useContext(SpringContext);
|
|
14289
|
+
const prevContext = usePrev(context2);
|
|
14290
|
+
const hasContext = context2 !== prevContext && hasProps(context2);
|
|
12891
14291
|
useIsomorphicLayoutEffect(() => {
|
|
12892
14292
|
layoutId.current++;
|
|
12893
14293
|
state.ctrls = ctrls.current;
|
|
@@ -12902,7 +14302,7 @@
|
|
|
12902
14302
|
ref == null ? void 0 : ref.add(ctrl);
|
|
12903
14303
|
if (hasContext) {
|
|
12904
14304
|
ctrl.start({
|
|
12905
|
-
default:
|
|
14305
|
+
default: context2
|
|
12906
14306
|
});
|
|
12907
14307
|
}
|
|
12908
14308
|
const update2 = updates[i];
|
|
@@ -12919,7 +14319,7 @@
|
|
|
12919
14319
|
useOnce(() => () => {
|
|
12920
14320
|
each(state.ctrls, (ctrl) => ctrl.stop(true));
|
|
12921
14321
|
});
|
|
12922
|
-
const values = springs.map((
|
|
14322
|
+
const values = springs.map((x2) => _extends({}, x2));
|
|
12923
14323
|
return ref ? [values, ref] : values;
|
|
12924
14324
|
}
|
|
12925
14325
|
function useSpring(props, deps) {
|
|
@@ -13074,7 +14474,7 @@
|
|
|
13074
14474
|
scrollLeft
|
|
13075
14475
|
} = _ref, attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
13076
14476
|
const values = Object.values(attributes);
|
|
13077
|
-
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (
|
|
14477
|
+
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n2) => "-" + n2.toLowerCase())));
|
|
13078
14478
|
if (children !== void 0) {
|
|
13079
14479
|
instance.textContent = children;
|
|
13080
14480
|
}
|
|
@@ -13152,19 +14552,19 @@
|
|
|
13152
14552
|
const pxTransforms = /^(translate)/;
|
|
13153
14553
|
const degTransforms = /^(rotate|skew)/;
|
|
13154
14554
|
const addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
|
|
13155
|
-
const isValueIdentity = (value, id) => is.arr(value) ? value.every((
|
|
14555
|
+
const isValueIdentity = (value, id) => is.arr(value) ? value.every((v2) => isValueIdentity(v2, id)) : is.num(value) ? value === id : parseFloat(value) === id;
|
|
13156
14556
|
class AnimatedStyle extends AnimatedObject {
|
|
13157
14557
|
constructor(_ref) {
|
|
13158
14558
|
let {
|
|
13159
|
-
x,
|
|
13160
|
-
y,
|
|
13161
|
-
z
|
|
14559
|
+
x: x2,
|
|
14560
|
+
y: y2,
|
|
14561
|
+
z: z2
|
|
13162
14562
|
} = _ref, style = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
13163
14563
|
const inputs = [];
|
|
13164
14564
|
const transforms = [];
|
|
13165
|
-
if (
|
|
13166
|
-
inputs.push([
|
|
13167
|
-
transforms.push((xyz) => [`translate3d(${xyz.map((
|
|
14565
|
+
if (x2 || y2 || z2) {
|
|
14566
|
+
inputs.push([x2 || 0, y2 || 0, z2 || 0]);
|
|
14567
|
+
transforms.push((xyz) => [`translate3d(${xyz.map((v2) => addUnit(v2, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
|
|
13168
14568
|
}
|
|
13169
14569
|
eachProp(style, (value, key) => {
|
|
13170
14570
|
if (key === "transform") {
|
|
@@ -13176,7 +14576,7 @@
|
|
|
13176
14576
|
return;
|
|
13177
14577
|
const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
|
|
13178
14578
|
inputs.push(toArray(value));
|
|
13179
|
-
transforms.push(key === "rotate3d" ? ([
|
|
14579
|
+
transforms.push(key === "rotate3d" ? ([x3, y3, z3, deg]) => [`rotate3d(${x3},${y3},${z3},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v2) => addUnit(v2, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
|
|
13180
14580
|
}
|
|
13181
14581
|
});
|
|
13182
14582
|
if (inputs.length) {
|
|
@@ -13200,8 +14600,8 @@
|
|
|
13200
14600
|
let identity2 = true;
|
|
13201
14601
|
each(this.inputs, (input, i) => {
|
|
13202
14602
|
const arg1 = getFluidValue(input[0]);
|
|
13203
|
-
const [
|
|
13204
|
-
transform += " " +
|
|
14603
|
+
const [t2, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));
|
|
14604
|
+
transform += " " + t2;
|
|
13205
14605
|
identity2 = identity2 && id;
|
|
13206
14606
|
});
|
|
13207
14607
|
return identity2 ? "none" : transform;
|
|
@@ -13306,16 +14706,16 @@
|
|
|
13306
14706
|
onRefresh: () => {
|
|
13307
14707
|
}
|
|
13308
14708
|
};
|
|
13309
|
-
const PullToRefresh = (
|
|
14709
|
+
const PullToRefresh = (p2) => {
|
|
13310
14710
|
const { locale } = useConfig$1();
|
|
13311
14711
|
const props = {
|
|
13312
14712
|
...defaultProps$x,
|
|
13313
|
-
...
|
|
14713
|
+
...p2,
|
|
13314
14714
|
...{
|
|
13315
|
-
pullingText:
|
|
13316
|
-
canReleaseText:
|
|
13317
|
-
refreshingText:
|
|
13318
|
-
completeText:
|
|
14715
|
+
pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
|
|
14716
|
+
canReleaseText: p2.canReleaseText || locale.pullToRefresh.canReleaseText,
|
|
14717
|
+
refreshingText: p2.refreshingText || locale.pullToRefresh.refreshingText,
|
|
14718
|
+
completeText: p2.completeText || locale.pullToRefresh.completeText
|
|
13319
14719
|
}
|
|
13320
14720
|
};
|
|
13321
14721
|
const headHeight = props.headHeight;
|
|
@@ -13378,8 +14778,8 @@
|
|
|
13378
14778
|
function getScrollTop(element) {
|
|
13379
14779
|
return "scrollTop" in element ? element.scrollTop : element.scrollY;
|
|
13380
14780
|
}
|
|
13381
|
-
const [,
|
|
13382
|
-
if (state.first &&
|
|
14781
|
+
const [, y2] = state.movement;
|
|
14782
|
+
if (state.first && y2 > 0) {
|
|
13383
14783
|
const target = state.event.target;
|
|
13384
14784
|
if (!target || !(target instanceof Element))
|
|
13385
14785
|
return;
|
|
@@ -13405,7 +14805,7 @@
|
|
|
13405
14805
|
}
|
|
13406
14806
|
event.stopPropagation();
|
|
13407
14807
|
const height = Math.max(
|
|
13408
|
-
rubberbandIfOutOfBounds(
|
|
14808
|
+
rubberbandIfOutOfBounds(y2, 0, 0, headHeight * 5, 0.5),
|
|
13409
14809
|
0
|
|
13410
14810
|
);
|
|
13411
14811
|
api.start({ height });
|
|
@@ -13421,7 +14821,6 @@
|
|
|
13421
14821
|
);
|
|
13422
14822
|
const renderStatusText = () => {
|
|
13423
14823
|
var _a;
|
|
13424
|
-
console.log(props);
|
|
13425
14824
|
if (props.renderText) {
|
|
13426
14825
|
return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
|
|
13427
14826
|
}
|
|
@@ -13560,12 +14959,12 @@
|
|
|
13560
14959
|
const offset = perimeter * Number(format(parseFloat(progress2.toFixed(1)))) / 100;
|
|
13561
14960
|
const isWise = props.clockwise ? 1 : 0;
|
|
13562
14961
|
const color = isObject(circleColor) ? `url(%23${refRandomId})` : transColor(circleColor);
|
|
13563
|
-
const
|
|
14962
|
+
const d2 = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
13564
14963
|
const pa = `%3Cdefs%3E%3ClinearGradient id='${refRandomId}' x1='100%25' y1='0%25' x2='0%25' y2='0%25'%3E${stopDom}%3C/linearGradient%3E%3C/defs%3E`;
|
|
13565
|
-
const path = `%3Cpath d='${
|
|
14964
|
+
const path = `%3Cpath d='${d2}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
13566
14965
|
props.pathColor
|
|
13567
14966
|
)}' fill='none'/%3E`;
|
|
13568
|
-
const path1 = `%3Cpath d='${
|
|
14967
|
+
const path1 = `%3Cpath d='${d2}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
|
|
13569
14968
|
color
|
|
13570
14969
|
)}' fill='none'/%3E`;
|
|
13571
14970
|
return {
|
|
@@ -13754,7 +15153,7 @@
|
|
|
13754
15153
|
}, Number(standTime) + 100 * speed);
|
|
13755
15154
|
SetTimer(timerCurr);
|
|
13756
15155
|
};
|
|
13757
|
-
const scroll = (
|
|
15156
|
+
const scroll = (n2, last) => {
|
|
13758
15157
|
SetAnimate(true);
|
|
13759
15158
|
setTimeout(() => {
|
|
13760
15159
|
let long = distance;
|
|
@@ -13766,7 +15165,7 @@
|
|
|
13766
15165
|
SetDistance(0);
|
|
13767
15166
|
SetAnimate(false);
|
|
13768
15167
|
}
|
|
13769
|
-
},
|
|
15168
|
+
}, n2 * speed);
|
|
13770
15169
|
};
|
|
13771
15170
|
const handleClickIcon = (event) => {
|
|
13772
15171
|
event.stopPropagation();
|
|
@@ -14227,10 +15626,10 @@
|
|
|
14227
15626
|
const range = (num, min, max) => {
|
|
14228
15627
|
return Math.min(Math.max(num, min), max);
|
|
14229
15628
|
};
|
|
14230
|
-
const getDirection2 = (
|
|
14231
|
-
if (
|
|
15629
|
+
const getDirection2 = (x2, y2) => {
|
|
15630
|
+
if (x2 > y2 && x2 > DISTANCE)
|
|
14232
15631
|
return "horizontal";
|
|
14233
|
-
if (
|
|
15632
|
+
if (y2 > x2 && y2 > DISTANCE)
|
|
14234
15633
|
return "vertical";
|
|
14235
15634
|
return "";
|
|
14236
15635
|
};
|
|
@@ -15010,7 +16409,7 @@
|
|
|
15010
16409
|
};
|
|
15011
16410
|
const filter = () => {
|
|
15012
16411
|
const ms = ["top", "bottom", "left", "right"];
|
|
15013
|
-
return ms.filter((
|
|
16412
|
+
return ms.filter((m2) => location.includes(m2))[0];
|
|
15014
16413
|
};
|
|
15015
16414
|
const popoverArrowSelf = () => {
|
|
15016
16415
|
const prefixCls = "popover-arrow";
|
|
@@ -15104,7 +16503,7 @@
|
|
|
15104
16503
|
[`avatarClass--${avatarShape}`]: avatarShape
|
|
15105
16504
|
});
|
|
15106
16505
|
const repeatLines = (num) => {
|
|
15107
|
-
return Array.from({ length: num }, (
|
|
16506
|
+
return Array.from({ length: num }, (v2, i) => i);
|
|
15108
16507
|
};
|
|
15109
16508
|
const getStyle = () => {
|
|
15110
16509
|
if (avatarSize) {
|
|
@@ -15191,9 +16590,9 @@
|
|
|
15191
16590
|
const getTimeStamp = (timeStr) => {
|
|
15192
16591
|
if (!timeStr)
|
|
15193
16592
|
return Date.now();
|
|
15194
|
-
let
|
|
15195
|
-
|
|
15196
|
-
return new Date(
|
|
16593
|
+
let t2 = timeStr;
|
|
16594
|
+
t2 = t2 > 0 ? +t2 : t2.toString().replace(/-/g, "/");
|
|
16595
|
+
return new Date(t2).getTime();
|
|
15197
16596
|
};
|
|
15198
16597
|
const initTime = () => {
|
|
15199
16598
|
stateRef.current.handleEndTime = endTime;
|
|
@@ -15223,8 +16622,8 @@
|
|
|
15223
16622
|
}
|
|
15224
16623
|
});
|
|
15225
16624
|
};
|
|
15226
|
-
const formatRemainTime = (
|
|
15227
|
-
const ts2 =
|
|
16625
|
+
const formatRemainTime = (t2, type) => {
|
|
16626
|
+
const ts2 = t2;
|
|
15228
16627
|
const rest2 = {
|
|
15229
16628
|
d: 0,
|
|
15230
16629
|
h: 0,
|
|
@@ -15246,23 +16645,23 @@
|
|
|
15246
16645
|
return type === "custom" ? rest2 : parseFormat({ ...rest2 });
|
|
15247
16646
|
};
|
|
15248
16647
|
const parseFormat = (time2) => {
|
|
15249
|
-
const { d } = time2;
|
|
15250
|
-
let { h, m, s, ms } = time2;
|
|
16648
|
+
const { d: d2 } = time2;
|
|
16649
|
+
let { h: h2, m: m2, s, ms } = time2;
|
|
15251
16650
|
let formatCache = format;
|
|
15252
16651
|
if (formatCache.includes("DD")) {
|
|
15253
|
-
formatCache = formatCache.replace("DD", padZero(
|
|
16652
|
+
formatCache = formatCache.replace("DD", padZero(d2));
|
|
15254
16653
|
} else {
|
|
15255
|
-
|
|
16654
|
+
h2 += Number(d2) * 24;
|
|
15256
16655
|
}
|
|
15257
16656
|
if (formatCache.includes("HH")) {
|
|
15258
|
-
formatCache = formatCache.replace("HH", padZero(
|
|
16657
|
+
formatCache = formatCache.replace("HH", padZero(h2));
|
|
15259
16658
|
} else {
|
|
15260
|
-
|
|
16659
|
+
m2 += Number(h2) * 60;
|
|
15261
16660
|
}
|
|
15262
16661
|
if (formatCache.includes("mm")) {
|
|
15263
|
-
formatCache = formatCache.replace("mm", padZero(
|
|
16662
|
+
formatCache = formatCache.replace("mm", padZero(m2));
|
|
15264
16663
|
} else {
|
|
15265
|
-
s += Number(
|
|
16664
|
+
s += Number(m2) * 60;
|
|
15266
16665
|
}
|
|
15267
16666
|
if (formatCache.includes("ss")) {
|
|
15268
16667
|
formatCache = formatCache.replace("ss", padZero(s));
|
|
@@ -15602,7 +17001,7 @@
|
|
|
15602
17001
|
const b2 = cn("countup");
|
|
15603
17002
|
const countupRef = React.useRef(null);
|
|
15604
17003
|
const timerRef = React.useRef(0);
|
|
15605
|
-
const numbers = Array.from({ length: 10 }, (
|
|
17004
|
+
const numbers = Array.from({ length: 10 }, (v2, i) => i);
|
|
15606
17005
|
const getShowNumber = () => {
|
|
15607
17006
|
const splitArr = endNumber.split(".");
|
|
15608
17007
|
const intNumber = maxLen && splitArr[0].length < maxLen ? (Array(maxLen).join("0") + splitArr[0]).slice(-maxLen) : splitArr[0];
|
|
@@ -15845,16 +17244,16 @@
|
|
|
15845
17244
|
if (sizeKey === "width") {
|
|
15846
17245
|
newPos[index].right -= dValue;
|
|
15847
17246
|
newPos[index][sizeKey] = nowSize;
|
|
15848
|
-
for (let
|
|
15849
|
-
newPos[
|
|
15850
|
-
newPos[
|
|
17247
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
17248
|
+
newPos[k2].left = positions[k2 - 1].right;
|
|
17249
|
+
newPos[k2].right -= dValue;
|
|
15851
17250
|
}
|
|
15852
17251
|
} else if (sizeKey === "height") {
|
|
15853
17252
|
newPos[index].bottom -= dValue;
|
|
15854
17253
|
newPos[index][sizeKey] = nowSize;
|
|
15855
|
-
for (let
|
|
15856
|
-
newPos[
|
|
15857
|
-
newPos[
|
|
17254
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
17255
|
+
newPos[k2].top = positions[k2 - 1].bottom;
|
|
17256
|
+
newPos[k2].bottom -= dValue;
|
|
15858
17257
|
}
|
|
15859
17258
|
}
|
|
15860
17259
|
}
|
|
@@ -17694,7 +19093,7 @@
|
|
|
17694
19093
|
exports2.CalendarItem = CalendarItem;
|
|
17695
19094
|
exports2.Card = Card;
|
|
17696
19095
|
exports2.Cascader = Cascader;
|
|
17697
|
-
exports2.Cell = Cell;
|
|
19096
|
+
exports2.Cell = Cell$1;
|
|
17698
19097
|
exports2.CellGroup = CellGroup;
|
|
17699
19098
|
exports2.Checkbox = Checkbox;
|
|
17700
19099
|
exports2.CheckboxGroup = CheckboxGroup;
|
|
@@ -17711,6 +19110,8 @@
|
|
|
17711
19110
|
exports2.Elevator = Elevator;
|
|
17712
19111
|
exports2.Empty = Empty;
|
|
17713
19112
|
exports2.FixedNav = FixedNav;
|
|
19113
|
+
exports2.Form = Form;
|
|
19114
|
+
exports2.FormItem = FormItem;
|
|
17714
19115
|
exports2.Grid = Grid;
|
|
17715
19116
|
exports2.GridItem = GridItem;
|
|
17716
19117
|
exports2.Icon = Icon$1;
|