@nutui/nutui-react-taro 1.3.13 → 1.3.14-beta.1
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 +19 -2
- package/README.md +54 -43
- package/dist/esm/Collapse.js +2 -2
- package/dist/esm/CollapseItem.js +2 -2
- package/dist/esm/FormItem.js +5 -4
- package/dist/esm/Grid.js +3 -2
- package/dist/esm/GridItem.js +3 -2
- package/dist/esm/NoticeBar.js +2 -2
- package/dist/esm/TrendArrow/style/index.js +1 -1
- package/dist/esm/{collapse.taro-13cde270.js → collapse.taro-af58206c.js} +1 -1
- package/dist/esm/{collapseitem-75843a5e.js → collapseitem-ce1849d2.js} +9 -5
- package/dist/esm/{formitem-9f11e314.js → formitem.taro-fef76bf1.js} +1 -102
- package/dist/esm/{grid.taro-d244170c.js → grid.taro-1f03be03.js} +9 -3
- package/dist/esm/grid.taro.context-39636af9.js +6 -0
- package/dist/esm/{griditem.taro-f7ee189b.js → griditem.taro-1452609c.js} +19 -1
- package/dist/esm/{noticebar.taro-4915fed3.js → noticebar.taro-43c18dc9.js} +7 -4
- package/dist/esm/nutui-react.es.js +7 -7
- package/dist/esm/types/src/packages/formitem/formitem.taro.d.ts +30 -0
- package/dist/esm/types/src/packages/formitem/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/grid/grid.context.d.ts +6 -0
- package/dist/esm/types/src/packages/grid/grid.d.ts +3 -1
- package/dist/esm/types/src/packages/grid/grid.taro.context.d.ts +6 -0
- package/dist/esm/types/src/packages/grid/grid.taro.d.ts +3 -1
- package/dist/esm/types/src/utils/render.d.ts +8 -1
- 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 +551 -1804
- package/dist/nutui.react.umd.js +543 -1796
- package/dist/packages/noticebar/noticebar.scss +0 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/font/config.json +5 -1
- package/dist/styles/font/demo_index.html +118 -26
- package/dist/styles/font/iconfont.css +23 -7
- package/dist/styles/font/iconfont.js +6 -6
- package/dist/styles/font/iconfont.json +35 -7
- package/dist/styles/font/iconfont.ttf +0 -0
- package/dist/styles/font/iconfont.woff +0 -0
- package/dist/styles/font/iconfont.woff2 +0 -0
- package/dist/types/index.d.ts +16 -15
- package/dist/types/nutui.taro.react.build.ts +1 -1
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.3.
|
|
2
|
+
* @nutui/nutui-react-taro v1.3.14-beta.0 Fri Dec 09 2022 12:20:12 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(global, 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) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory((global.nutui = global.nutui || {}, global.nutui.react = {}), global.React, global.Taro, global.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 n = 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(k) {
|
|
19
|
+
if (k !== "default") {
|
|
20
|
+
var d = Object.getOwnPropertyDescriptor(e2, k);
|
|
21
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
22
22
|
enumerable: true,
|
|
23
23
|
get: function() {
|
|
24
|
-
return e2[
|
|
24
|
+
return e2[k];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
return Object.freeze(
|
|
30
|
+
n["default"] = e2;
|
|
31
|
+
return Object.freeze(n);
|
|
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(n) {
|
|
38
|
+
if (n.__esModule)
|
|
39
|
+
return n;
|
|
40
40
|
var a = Object.defineProperty({}, "__esModule", { value: true });
|
|
41
|
-
Object.keys(
|
|
42
|
-
var
|
|
43
|
-
Object.defineProperty(a,
|
|
41
|
+
Object.keys(n).forEach(function(k) {
|
|
42
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
43
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
44
44
|
enumerable: true,
|
|
45
45
|
get: function() {
|
|
46
|
-
return
|
|
46
|
+
return n[k];
|
|
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
|
|
54
|
+
function r(r2) {
|
|
55
55
|
function e2(e3, i, a, o) {
|
|
56
|
-
var
|
|
56
|
+
var f = i ? t + e3 + r2.e + i : t + e3, v = f;
|
|
57
57
|
if (a) {
|
|
58
|
-
var u = " " +
|
|
58
|
+
var u = " " + v + r2.m;
|
|
59
59
|
for (var s in a)
|
|
60
60
|
if (a.hasOwnProperty(s)) {
|
|
61
|
-
var
|
|
62
|
-
true ===
|
|
61
|
+
var p = a[s];
|
|
62
|
+
true === p ? v += u + s : p && (v += u + s + n + p);
|
|
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 c = 0, l = o.length; c < l; c++) {
|
|
67
|
+
var y = o[c];
|
|
68
|
+
if (y && "string" == typeof y.valueOf())
|
|
69
|
+
for (var g = y.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
70
|
+
var h = g[d];
|
|
71
|
+
h !== f && (v += " " + h);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return
|
|
74
|
+
return v;
|
|
75
75
|
}
|
|
76
|
-
var
|
|
77
|
-
return function(r3,
|
|
78
|
-
return function(
|
|
79
|
-
return "string" == typeof
|
|
76
|
+
var t = r2.n || "", n = r2.v || r2.m;
|
|
77
|
+
return function(r3, t2) {
|
|
78
|
+
return function(n2, i, a) {
|
|
79
|
+
return "string" == typeof n2 ? Array.isArray(i) ? e2(r3, n2, void 0, i) : e2(r3, n2, i, a) : e2(r3, t2, n2, i);
|
|
80
80
|
};
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
84
|
-
var e
|
|
85
|
-
classname_production_min.cn = e
|
|
84
|
+
var e = r({ e: "-", m: "_" });
|
|
85
|
+
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
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$1t = {
|
|
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$1t,
|
|
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$1t;
|
|
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$1s = {
|
|
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$1s,
|
|
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$1s;
|
|
274
274
|
Button.displayName = "NutButton";
|
|
275
|
-
const defaultProps$
|
|
275
|
+
const defaultProps$1r = {
|
|
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
|
|
297
|
+
const Cell = (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$1r,
|
|
322
322
|
...props
|
|
323
323
|
};
|
|
324
324
|
const b2 = cn("cell");
|
|
@@ -369,9 +369,9 @@
|
|
|
369
369
|
className: b2("link")
|
|
370
370
|
}) : linkSlot));
|
|
371
371
|
};
|
|
372
|
-
Cell
|
|
373
|
-
Cell
|
|
374
|
-
const defaultProps$
|
|
372
|
+
Cell.defaultProps = defaultProps$1r;
|
|
373
|
+
Cell.displayName = "NutCell";
|
|
374
|
+
const defaultProps$1q = {
|
|
375
375
|
title: "",
|
|
376
376
|
desc: "",
|
|
377
377
|
className: "",
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
};
|
|
381
381
|
const CellGroup = (props) => {
|
|
382
382
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
383
|
-
...defaultProps$
|
|
383
|
+
...defaultProps$1q,
|
|
384
384
|
...props
|
|
385
385
|
};
|
|
386
386
|
const b2 = cn("cell-group");
|
|
@@ -394,7 +394,7 @@
|
|
|
394
394
|
className: b2("wrap")
|
|
395
395
|
}, children));
|
|
396
396
|
};
|
|
397
|
-
CellGroup.defaultProps = defaultProps$
|
|
397
|
+
CellGroup.defaultProps = defaultProps$1q;
|
|
398
398
|
CellGroup.displayName = "NutCellGroup";
|
|
399
399
|
var classnames = { exports: {} };
|
|
400
400
|
/*!
|
|
@@ -551,72 +551,18 @@
|
|
|
551
551
|
}
|
|
552
552
|
return target;
|
|
553
553
|
}
|
|
554
|
-
function _setPrototypeOf(o,
|
|
555
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2,
|
|
556
|
-
o2.__proto__ =
|
|
554
|
+
function _setPrototypeOf(o, p) {
|
|
555
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
556
|
+
o2.__proto__ = p2;
|
|
557
557
|
return o2;
|
|
558
558
|
};
|
|
559
|
-
return _setPrototypeOf(o,
|
|
559
|
+
return _setPrototypeOf(o, p);
|
|
560
560
|
}
|
|
561
561
|
function _inheritsLoose(subClass, superClass) {
|
|
562
562
|
subClass.prototype = Object.create(superClass.prototype);
|
|
563
563
|
subClass.prototype.constructor = subClass;
|
|
564
564
|
_setPrototypeOf(subClass, superClass);
|
|
565
565
|
}
|
|
566
|
-
var propTypes = { exports: {} };
|
|
567
|
-
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
568
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
569
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
570
|
-
function emptyFunction() {
|
|
571
|
-
}
|
|
572
|
-
function emptyFunctionWithReset() {
|
|
573
|
-
}
|
|
574
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
575
|
-
var factoryWithThrowingShims = function() {
|
|
576
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
577
|
-
if (secret === ReactPropTypesSecret) {
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
var err = new Error(
|
|
581
|
-
"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"
|
|
582
|
-
);
|
|
583
|
-
err.name = "Invariant Violation";
|
|
584
|
-
throw err;
|
|
585
|
-
}
|
|
586
|
-
shim.isRequired = shim;
|
|
587
|
-
function getShim() {
|
|
588
|
-
return shim;
|
|
589
|
-
}
|
|
590
|
-
var ReactPropTypes = {
|
|
591
|
-
array: shim,
|
|
592
|
-
bigint: shim,
|
|
593
|
-
bool: shim,
|
|
594
|
-
func: shim,
|
|
595
|
-
number: shim,
|
|
596
|
-
object: shim,
|
|
597
|
-
string: shim,
|
|
598
|
-
symbol: shim,
|
|
599
|
-
any: shim,
|
|
600
|
-
arrayOf: getShim,
|
|
601
|
-
element: shim,
|
|
602
|
-
elementType: shim,
|
|
603
|
-
instanceOf: getShim,
|
|
604
|
-
node: shim,
|
|
605
|
-
objectOf: getShim,
|
|
606
|
-
oneOf: getShim,
|
|
607
|
-
oneOfType: getShim,
|
|
608
|
-
shape: getShim,
|
|
609
|
-
exact: getShim,
|
|
610
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
611
|
-
resetWarningCache: emptyFunction
|
|
612
|
-
};
|
|
613
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
614
|
-
return ReactPropTypes;
|
|
615
|
-
};
|
|
616
|
-
{
|
|
617
|
-
propTypes.exports = factoryWithThrowingShims();
|
|
618
|
-
}
|
|
619
|
-
var PropTypes = propTypes.exports;
|
|
620
566
|
function hasClass(element, className) {
|
|
621
567
|
if (element.classList)
|
|
622
568
|
return !!className && element.classList.contains(className);
|
|
@@ -657,10 +603,10 @@
|
|
|
657
603
|
var EXITING = "exiting";
|
|
658
604
|
var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
659
605
|
_inheritsLoose(Transition2, _React$Component);
|
|
660
|
-
function Transition2(props,
|
|
606
|
+
function Transition2(props, context) {
|
|
661
607
|
var _this;
|
|
662
|
-
_this = _React$Component.call(this, props,
|
|
663
|
-
var parentGroup =
|
|
608
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
609
|
+
var parentGroup = context;
|
|
664
610
|
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
665
611
|
var initialStatus;
|
|
666
612
|
_this.appearStatus = null;
|
|
@@ -880,7 +826,7 @@
|
|
|
880
826
|
}(React__default["default"].Component);
|
|
881
827
|
Transition.contextType = TransitionGroupContext;
|
|
882
828
|
Transition.propTypes = {};
|
|
883
|
-
function noop$
|
|
829
|
+
function noop$2() {
|
|
884
830
|
}
|
|
885
831
|
Transition.defaultProps = {
|
|
886
832
|
in: false,
|
|
@@ -889,12 +835,12 @@
|
|
|
889
835
|
appear: false,
|
|
890
836
|
enter: true,
|
|
891
837
|
exit: true,
|
|
892
|
-
onEnter: noop$
|
|
893
|
-
onEntering: noop$
|
|
894
|
-
onEntered: noop$
|
|
895
|
-
onExit: noop$
|
|
896
|
-
onExiting: noop$
|
|
897
|
-
onExited: noop$
|
|
838
|
+
onEnter: noop$2,
|
|
839
|
+
onEntering: noop$2,
|
|
840
|
+
onEntered: noop$2,
|
|
841
|
+
onExit: noop$2,
|
|
842
|
+
onExiting: noop$2,
|
|
843
|
+
onExited: noop$2
|
|
898
844
|
};
|
|
899
845
|
Transition.UNMOUNTED = UNMOUNTED;
|
|
900
846
|
Transition.EXITED = EXITED;
|
|
@@ -903,13 +849,13 @@
|
|
|
903
849
|
Transition.EXITING = EXITING;
|
|
904
850
|
var Transition$1 = Transition;
|
|
905
851
|
var _addClass = function addClass$1(node, classes) {
|
|
906
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
907
|
-
return addClass(node,
|
|
852
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
853
|
+
return addClass(node, c);
|
|
908
854
|
});
|
|
909
855
|
};
|
|
910
856
|
var removeClass = function removeClass2(node, classes) {
|
|
911
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
912
|
-
return removeClass$1(node,
|
|
857
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
858
|
+
return removeClass$1(node, c);
|
|
913
859
|
});
|
|
914
860
|
};
|
|
915
861
|
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
@@ -1041,7 +987,7 @@
|
|
|
1041
987
|
};
|
|
1042
988
|
CSSTransition.propTypes = {};
|
|
1043
989
|
var CSSTransition$1 = CSSTransition;
|
|
1044
|
-
const defaultProps$
|
|
990
|
+
const defaultProps$1p = {
|
|
1045
991
|
...ComponentDefaults,
|
|
1046
992
|
position: "center",
|
|
1047
993
|
transition: "",
|
|
@@ -1227,7 +1173,7 @@
|
|
|
1227
1173
|
}, [position]);
|
|
1228
1174
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1229
1175
|
};
|
|
1230
|
-
Popup.defaultProps = defaultProps$
|
|
1176
|
+
Popup.defaultProps = defaultProps$1p;
|
|
1231
1177
|
Popup.displayName = "NutPopup";
|
|
1232
1178
|
const zhCN = {
|
|
1233
1179
|
save: "\u4FDD\u5B58",
|
|
@@ -1357,7 +1303,7 @@
|
|
|
1357
1303
|
errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
|
|
1358
1304
|
}
|
|
1359
1305
|
};
|
|
1360
|
-
const defaultProps$
|
|
1306
|
+
const defaultProps$1o = {
|
|
1361
1307
|
locale: zhCN
|
|
1362
1308
|
};
|
|
1363
1309
|
const defaultConfigRef$1 = {
|
|
@@ -1374,7 +1320,7 @@
|
|
|
1374
1320
|
};
|
|
1375
1321
|
const ConfigContext$1 = React.createContext(null);
|
|
1376
1322
|
const ConfigProvider = (props) => {
|
|
1377
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1323
|
+
const { children, ...config2 } = { ...defaultProps$1o, ...props };
|
|
1378
1324
|
const parentConfig = useConfig$1();
|
|
1379
1325
|
return /* @__PURE__ */ React__default["default"].createElement(ConfigContext$1.Provider, {
|
|
1380
1326
|
value: {
|
|
@@ -1383,9 +1329,9 @@
|
|
|
1383
1329
|
}
|
|
1384
1330
|
}, children);
|
|
1385
1331
|
};
|
|
1386
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1332
|
+
ConfigProvider.defaultProps = defaultProps$1o;
|
|
1387
1333
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1388
|
-
const defaultProps$
|
|
1334
|
+
const defaultProps$1n = {
|
|
1389
1335
|
fit: "fill",
|
|
1390
1336
|
position: "center",
|
|
1391
1337
|
alt: "",
|
|
@@ -1416,7 +1362,7 @@
|
|
|
1416
1362
|
onClick,
|
|
1417
1363
|
onLoad,
|
|
1418
1364
|
onError
|
|
1419
|
-
} = { ...defaultProps$
|
|
1365
|
+
} = { ...defaultProps$1n, ...props };
|
|
1420
1366
|
const [loading, setLoading] = React.useState(true);
|
|
1421
1367
|
const [isError, setIsError] = React.useState(false);
|
|
1422
1368
|
React.useEffect(() => {
|
|
@@ -1474,19 +1420,19 @@
|
|
|
1474
1420
|
name: "image-error"
|
|
1475
1421
|
})) : null);
|
|
1476
1422
|
};
|
|
1477
|
-
Image.defaultProps = defaultProps$
|
|
1423
|
+
Image.defaultProps = defaultProps$1n;
|
|
1478
1424
|
Image.displayName = "NutImage";
|
|
1479
|
-
const defaultProps$
|
|
1425
|
+
const defaultProps$1m = {};
|
|
1480
1426
|
const Layout = (props) => {
|
|
1481
|
-
({ ...defaultProps$
|
|
1427
|
+
({ ...defaultProps$1m, ...props });
|
|
1482
1428
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1483
1429
|
className: "nut-layout"
|
|
1484
1430
|
}, "Layout");
|
|
1485
1431
|
};
|
|
1486
|
-
Layout.defaultProps = defaultProps$
|
|
1432
|
+
Layout.defaultProps = defaultProps$1m;
|
|
1487
1433
|
Layout.displayName = "NutLayout";
|
|
1488
1434
|
const DataContext$2 = React.createContext({});
|
|
1489
|
-
const defaultProps$
|
|
1435
|
+
const defaultProps$1l = {
|
|
1490
1436
|
span: "24",
|
|
1491
1437
|
offset: "0",
|
|
1492
1438
|
gutter: "0"
|
|
@@ -1500,7 +1446,7 @@
|
|
|
1500
1446
|
children,
|
|
1501
1447
|
onClick
|
|
1502
1448
|
} = {
|
|
1503
|
-
...defaultProps$
|
|
1449
|
+
...defaultProps$1l,
|
|
1504
1450
|
...props
|
|
1505
1451
|
};
|
|
1506
1452
|
const [colName, setColName] = React.useState("");
|
|
@@ -1528,9 +1474,9 @@
|
|
|
1528
1474
|
}
|
|
1529
1475
|
}, children);
|
|
1530
1476
|
};
|
|
1531
|
-
Col.defaultProps = defaultProps$
|
|
1477
|
+
Col.defaultProps = defaultProps$1l;
|
|
1532
1478
|
Col.displayName = "NutCol";
|
|
1533
|
-
const defaultProps$
|
|
1479
|
+
const defaultProps$1k = {
|
|
1534
1480
|
type: "",
|
|
1535
1481
|
justify: "start",
|
|
1536
1482
|
align: "flex-start",
|
|
@@ -1549,7 +1495,7 @@
|
|
|
1549
1495
|
gutter,
|
|
1550
1496
|
onClick
|
|
1551
1497
|
} = {
|
|
1552
|
-
...defaultProps$
|
|
1498
|
+
...defaultProps$1k,
|
|
1553
1499
|
...props
|
|
1554
1500
|
};
|
|
1555
1501
|
const prefixCls = "nut-row";
|
|
@@ -1584,9 +1530,9 @@
|
|
|
1584
1530
|
children
|
|
1585
1531
|
));
|
|
1586
1532
|
};
|
|
1587
|
-
Row.defaultProps = defaultProps$
|
|
1533
|
+
Row.defaultProps = defaultProps$1k;
|
|
1588
1534
|
Row.displayName = "NutRow";
|
|
1589
|
-
const defaultProps$
|
|
1535
|
+
const defaultProps$1j = {
|
|
1590
1536
|
contentPosition: "center",
|
|
1591
1537
|
dashed: false,
|
|
1592
1538
|
hairline: true,
|
|
@@ -1603,7 +1549,7 @@
|
|
|
1603
1549
|
direction,
|
|
1604
1550
|
...rest
|
|
1605
1551
|
} = {
|
|
1606
|
-
...defaultProps$
|
|
1552
|
+
...defaultProps$1j,
|
|
1607
1553
|
...props
|
|
1608
1554
|
};
|
|
1609
1555
|
const dividerBem = cn("divider");
|
|
@@ -1624,9 +1570,14 @@
|
|
|
1624
1570
|
...rest
|
|
1625
1571
|
}, children);
|
|
1626
1572
|
};
|
|
1627
|
-
Divider.defaultProps = defaultProps$
|
|
1573
|
+
Divider.defaultProps = defaultProps$1j;
|
|
1628
1574
|
Divider.displayName = "NutDivider";
|
|
1629
|
-
const
|
|
1575
|
+
const gridContext = {
|
|
1576
|
+
onClick: (item, index) => {
|
|
1577
|
+
}
|
|
1578
|
+
};
|
|
1579
|
+
var GridContext = React__default["default"].createContext(gridContext);
|
|
1580
|
+
const defaultProps$1i = {
|
|
1630
1581
|
columnNum: 4,
|
|
1631
1582
|
border: true,
|
|
1632
1583
|
gutter: 0,
|
|
@@ -1652,8 +1603,9 @@
|
|
|
1652
1603
|
iconSize,
|
|
1653
1604
|
iconColor,
|
|
1654
1605
|
className,
|
|
1606
|
+
onClick,
|
|
1655
1607
|
...rest
|
|
1656
|
-
} = { ...defaultProps$
|
|
1608
|
+
} = { ...defaultProps$1i, ...props };
|
|
1657
1609
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
1658
1610
|
const pxCheck2 = (value) => {
|
|
1659
1611
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1677,6 +1629,8 @@
|
|
|
1677
1629
|
className: rootClass(),
|
|
1678
1630
|
style: rootStyle(),
|
|
1679
1631
|
...rest
|
|
1632
|
+
}, /* @__PURE__ */ React__default["default"].createElement(GridContext.Provider, {
|
|
1633
|
+
value: { onClick }
|
|
1680
1634
|
}, childrenDom.map((item, idex) => {
|
|
1681
1635
|
return React__default["default"].cloneElement(item, {
|
|
1682
1636
|
index: idex,
|
|
@@ -1690,11 +1644,11 @@
|
|
|
1690
1644
|
parentIconSize: iconSize,
|
|
1691
1645
|
parentIconColor: iconColor
|
|
1692
1646
|
});
|
|
1693
|
-
}));
|
|
1647
|
+
})));
|
|
1694
1648
|
};
|
|
1695
|
-
Grid.defaultProps = defaultProps$
|
|
1649
|
+
Grid.defaultProps = defaultProps$1i;
|
|
1696
1650
|
Grid.displayName = "NutGrid";
|
|
1697
|
-
const defaultProps$
|
|
1651
|
+
const defaultProps$1h = {
|
|
1698
1652
|
...ComponentDefaults,
|
|
1699
1653
|
text: "",
|
|
1700
1654
|
icon: "",
|
|
@@ -1733,10 +1687,11 @@
|
|
|
1733
1687
|
onClick,
|
|
1734
1688
|
...rest
|
|
1735
1689
|
} = {
|
|
1736
|
-
...defaultProps$
|
|
1690
|
+
...defaultProps$1h,
|
|
1737
1691
|
...props
|
|
1738
1692
|
};
|
|
1739
1693
|
const b2 = cn("grid-item");
|
|
1694
|
+
const context = React.useContext(GridContext);
|
|
1740
1695
|
const pxCheck2 = (value) => {
|
|
1741
1696
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1742
1697
|
};
|
|
@@ -1763,6 +1718,25 @@
|
|
|
1763
1718
|
};
|
|
1764
1719
|
const handleClick2 = (e2) => {
|
|
1765
1720
|
onClick && onClick(e2);
|
|
1721
|
+
context.onClick && context.onClick(
|
|
1722
|
+
{
|
|
1723
|
+
text,
|
|
1724
|
+
icon,
|
|
1725
|
+
iconSize,
|
|
1726
|
+
iconColor,
|
|
1727
|
+
parentIconSize,
|
|
1728
|
+
parentIconColor,
|
|
1729
|
+
index,
|
|
1730
|
+
columnNum,
|
|
1731
|
+
border,
|
|
1732
|
+
gutter,
|
|
1733
|
+
center,
|
|
1734
|
+
square,
|
|
1735
|
+
reverse,
|
|
1736
|
+
direction
|
|
1737
|
+
},
|
|
1738
|
+
index
|
|
1739
|
+
);
|
|
1766
1740
|
};
|
|
1767
1741
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1768
1742
|
className: b2(),
|
|
@@ -1781,7 +1755,7 @@
|
|
|
1781
1755
|
className: "nut-grid-item__text"
|
|
1782
1756
|
}, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
|
|
1783
1757
|
};
|
|
1784
|
-
GridItem.defaultProps = defaultProps$
|
|
1758
|
+
GridItem.defaultProps = defaultProps$1h;
|
|
1785
1759
|
GridItem.displayName = "NutGridItem";
|
|
1786
1760
|
const defaultConfigRef = {
|
|
1787
1761
|
current: {
|
|
@@ -1796,17 +1770,17 @@
|
|
|
1796
1770
|
return (_a = React.useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1797
1771
|
};
|
|
1798
1772
|
const ConfigContext = React.createContext(null);
|
|
1799
|
-
const defaultProps$
|
|
1773
|
+
const defaultProps$1g = {};
|
|
1800
1774
|
const Sticky = (props) => {
|
|
1801
1775
|
useConfig();
|
|
1802
|
-
({ ...defaultProps$
|
|
1776
|
+
({ ...defaultProps$1g, ...props });
|
|
1803
1777
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1804
1778
|
className: "nut-sticky"
|
|
1805
1779
|
}, "Sticky");
|
|
1806
1780
|
};
|
|
1807
|
-
Sticky.defaultProps = defaultProps$
|
|
1781
|
+
Sticky.defaultProps = defaultProps$1g;
|
|
1808
1782
|
Sticky.displayName = "NutSticky";
|
|
1809
|
-
const defaultProps$
|
|
1783
|
+
const defaultProps$1f = {
|
|
1810
1784
|
...ComponentDefaults,
|
|
1811
1785
|
title: "",
|
|
1812
1786
|
desc: "",
|
|
@@ -1842,7 +1816,7 @@
|
|
|
1842
1816
|
iconClassPrefix,
|
|
1843
1817
|
iconFontClassName
|
|
1844
1818
|
} = {
|
|
1845
|
-
...defaultProps$
|
|
1819
|
+
...defaultProps$1f,
|
|
1846
1820
|
...props
|
|
1847
1821
|
};
|
|
1848
1822
|
const b2 = cn("navbar");
|
|
@@ -1911,9 +1885,9 @@
|
|
|
1911
1885
|
className: `${b2("")}--placeholder`
|
|
1912
1886
|
}, renderWrapper()) : renderWrapper());
|
|
1913
1887
|
};
|
|
1914
|
-
NavBar.defaultProps = defaultProps$
|
|
1888
|
+
NavBar.defaultProps = defaultProps$1f;
|
|
1915
1889
|
NavBar.displayName = "NutNavBar";
|
|
1916
|
-
const defaultProps$
|
|
1890
|
+
const defaultProps$1e = {
|
|
1917
1891
|
...ComponentDefaults,
|
|
1918
1892
|
fixednavClass: "nut-fixednav",
|
|
1919
1893
|
activeText: "",
|
|
@@ -1943,7 +1917,7 @@
|
|
|
1943
1917
|
iconFontClassName,
|
|
1944
1918
|
...rest
|
|
1945
1919
|
} = {
|
|
1946
|
-
...defaultProps$
|
|
1920
|
+
...defaultProps$1e,
|
|
1947
1921
|
...props
|
|
1948
1922
|
};
|
|
1949
1923
|
const b2 = cn("fixednav");
|
|
@@ -1998,9 +1972,9 @@
|
|
|
1998
1972
|
className: "text"
|
|
1999
1973
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
2000
1974
|
};
|
|
2001
|
-
FixedNav.defaultProps = defaultProps$
|
|
1975
|
+
FixedNav.defaultProps = defaultProps$1e;
|
|
2002
1976
|
FixedNav.displayName = "NutFixedNav";
|
|
2003
|
-
const defaultProps$
|
|
1977
|
+
const defaultProps$1d = {
|
|
2004
1978
|
visible: 0,
|
|
2005
1979
|
bottom: false,
|
|
2006
1980
|
size: 20,
|
|
@@ -2028,7 +2002,7 @@
|
|
|
2028
2002
|
tabSwitch,
|
|
2029
2003
|
onSwitch
|
|
2030
2004
|
} = {
|
|
2031
|
-
...defaultProps$
|
|
2005
|
+
...defaultProps$1d,
|
|
2032
2006
|
...props
|
|
2033
2007
|
};
|
|
2034
2008
|
const b2 = cn("tabbar");
|
|
@@ -2064,9 +2038,9 @@
|
|
|
2064
2038
|
return React__default["default"].cloneElement(child, childProps);
|
|
2065
2039
|
}));
|
|
2066
2040
|
};
|
|
2067
|
-
Tabbar.defaultProps = defaultProps$
|
|
2041
|
+
Tabbar.defaultProps = defaultProps$1d;
|
|
2068
2042
|
Tabbar.displayName = "NutTabbar";
|
|
2069
|
-
const defaultProps$
|
|
2043
|
+
const defaultProps$1c = {
|
|
2070
2044
|
...ComponentDefaults,
|
|
2071
2045
|
dot: false,
|
|
2072
2046
|
size: "",
|
|
@@ -2102,7 +2076,7 @@
|
|
|
2102
2076
|
iconClassPrefix,
|
|
2103
2077
|
iconFontClassName
|
|
2104
2078
|
} = {
|
|
2105
|
-
...defaultProps$
|
|
2079
|
+
...defaultProps$1c,
|
|
2106
2080
|
...props
|
|
2107
2081
|
};
|
|
2108
2082
|
const b2 = cn("tabbar-item");
|
|
@@ -2152,7 +2126,7 @@
|
|
|
2152
2126
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
2153
2127
|
var index_cjs = require$$0;
|
|
2154
2128
|
const elevatorContext = React.createContext({});
|
|
2155
|
-
const defaultProps$
|
|
2129
|
+
const defaultProps$1b = {
|
|
2156
2130
|
height: "200px",
|
|
2157
2131
|
acceptKey: "title",
|
|
2158
2132
|
indexList: [],
|
|
@@ -2175,7 +2149,7 @@
|
|
|
2175
2149
|
children,
|
|
2176
2150
|
...rest
|
|
2177
2151
|
} = {
|
|
2178
|
-
...defaultProps$
|
|
2152
|
+
...defaultProps$1b,
|
|
2179
2153
|
...props
|
|
2180
2154
|
};
|
|
2181
2155
|
const b2 = cn("elevator");
|
|
@@ -2375,9 +2349,9 @@
|
|
|
2375
2349
|
}, item[acceptKey]);
|
|
2376
2350
|
}))));
|
|
2377
2351
|
};
|
|
2378
|
-
Elevator.defaultProps = defaultProps$
|
|
2352
|
+
Elevator.defaultProps = defaultProps$1b;
|
|
2379
2353
|
Elevator.displayName = "NutElevator";
|
|
2380
|
-
const defaultProps$
|
|
2354
|
+
const defaultProps$1a = {
|
|
2381
2355
|
defaultValue: 1,
|
|
2382
2356
|
mode: "multi",
|
|
2383
2357
|
prevText: "",
|
|
@@ -2394,7 +2368,7 @@
|
|
|
2394
2368
|
};
|
|
2395
2369
|
const Pagination = (props) => {
|
|
2396
2370
|
const { locale } = useConfig$1();
|
|
2397
|
-
({ ...defaultProps$
|
|
2371
|
+
({ ...defaultProps$1a, ...props });
|
|
2398
2372
|
const {
|
|
2399
2373
|
modelValue,
|
|
2400
2374
|
mode,
|
|
@@ -2511,7 +2485,7 @@
|
|
|
2511
2485
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2512
2486
|
}, nextText || locale.pagination.next));
|
|
2513
2487
|
};
|
|
2514
|
-
Pagination.defaultProps = defaultProps$
|
|
2488
|
+
Pagination.defaultProps = defaultProps$1a;
|
|
2515
2489
|
Pagination.displayName = "NutPagination";
|
|
2516
2490
|
class Title {
|
|
2517
2491
|
constructor() {
|
|
@@ -2521,7 +2495,7 @@
|
|
|
2521
2495
|
this.index = 0;
|
|
2522
2496
|
}
|
|
2523
2497
|
}
|
|
2524
|
-
const defaultProps$
|
|
2498
|
+
const defaultProps$19 = {
|
|
2525
2499
|
...ComponentDefaults,
|
|
2526
2500
|
tabStyle: {},
|
|
2527
2501
|
value: 0,
|
|
@@ -2562,7 +2536,7 @@
|
|
|
2562
2536
|
iconFontClassName,
|
|
2563
2537
|
...rest
|
|
2564
2538
|
} = {
|
|
2565
|
-
...defaultProps$
|
|
2539
|
+
...defaultProps$19,
|
|
2566
2540
|
...props
|
|
2567
2541
|
};
|
|
2568
2542
|
const [currentItem, setCurrentItem] = React.useState({ index: 0 });
|
|
@@ -2607,7 +2581,7 @@
|
|
|
2607
2581
|
color: type === "smile" ? color : "",
|
|
2608
2582
|
background: type === "line" ? color : ""
|
|
2609
2583
|
};
|
|
2610
|
-
const index = titles.current.findIndex((
|
|
2584
|
+
const index = titles.current.findIndex((t) => t.paneKey === value);
|
|
2611
2585
|
const contentStyle = {
|
|
2612
2586
|
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
2613
2587
|
transitionDuration: `${animatedTime}ms`
|
|
@@ -2680,9 +2654,9 @@
|
|
|
2680
2654
|
return React__default["default"].cloneElement(child, childProps);
|
|
2681
2655
|
}))));
|
|
2682
2656
|
};
|
|
2683
|
-
Tabs.defaultProps = defaultProps$
|
|
2657
|
+
Tabs.defaultProps = defaultProps$19;
|
|
2684
2658
|
Tabs.displayName = "NutTabs";
|
|
2685
|
-
const defaultProps$
|
|
2659
|
+
const defaultProps$18 = {
|
|
2686
2660
|
title: "",
|
|
2687
2661
|
paneKey: "",
|
|
2688
2662
|
activeKey: "",
|
|
@@ -2690,7 +2664,7 @@
|
|
|
2690
2664
|
};
|
|
2691
2665
|
const TabPane = (props) => {
|
|
2692
2666
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2693
|
-
...defaultProps$
|
|
2667
|
+
...defaultProps$18,
|
|
2694
2668
|
...props
|
|
2695
2669
|
};
|
|
2696
2670
|
const b2 = cn("tabpane");
|
|
@@ -2706,7 +2680,7 @@
|
|
|
2706
2680
|
className: classes
|
|
2707
2681
|
}, children);
|
|
2708
2682
|
};
|
|
2709
|
-
const defaultProps$
|
|
2683
|
+
const defaultProps$17 = {
|
|
2710
2684
|
size: 3,
|
|
2711
2685
|
current: 1,
|
|
2712
2686
|
block: false,
|
|
@@ -2726,7 +2700,7 @@
|
|
|
2726
2700
|
vertical,
|
|
2727
2701
|
...rest
|
|
2728
2702
|
} = {
|
|
2729
|
-
...defaultProps$
|
|
2703
|
+
...defaultProps$17,
|
|
2730
2704
|
...props
|
|
2731
2705
|
};
|
|
2732
2706
|
const b2 = cn("indicator");
|
|
@@ -2760,7 +2734,7 @@
|
|
|
2760
2734
|
...rest
|
|
2761
2735
|
}, renderEles());
|
|
2762
2736
|
};
|
|
2763
|
-
Indicator.defaultProps = defaultProps$
|
|
2737
|
+
Indicator.defaultProps = defaultProps$17;
|
|
2764
2738
|
Indicator.displayName = "NutIndicator";
|
|
2765
2739
|
const handleClick = (e2) => {
|
|
2766
2740
|
e2.stopPropagation();
|
|
@@ -2776,7 +2750,7 @@
|
|
|
2776
2750
|
}
|
|
2777
2751
|
};
|
|
2778
2752
|
const OffsetContext = React.createContext(20);
|
|
2779
|
-
const defaultProps$
|
|
2753
|
+
const defaultProps$16 = {
|
|
2780
2754
|
showhead: false,
|
|
2781
2755
|
position: "left",
|
|
2782
2756
|
width: "80%"
|
|
@@ -2794,7 +2768,7 @@
|
|
|
2794
2768
|
onClose,
|
|
2795
2769
|
...rest
|
|
2796
2770
|
} = {
|
|
2797
|
-
...defaultProps$
|
|
2771
|
+
...defaultProps$16,
|
|
2798
2772
|
...props
|
|
2799
2773
|
};
|
|
2800
2774
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2822,14 +2796,14 @@
|
|
|
2822
2796
|
className: "nut-sidenavbar__content"
|
|
2823
2797
|
}, children))))));
|
|
2824
2798
|
};
|
|
2825
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2799
|
+
SideNavBar.defaultProps = defaultProps$16;
|
|
2826
2800
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2827
|
-
const defaultProps$
|
|
2801
|
+
const defaultProps$15 = {
|
|
2828
2802
|
open: true
|
|
2829
2803
|
};
|
|
2830
2804
|
const SubSideNavBar = (props) => {
|
|
2831
2805
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2832
|
-
...defaultProps$
|
|
2806
|
+
...defaultProps$15,
|
|
2833
2807
|
...props
|
|
2834
2808
|
};
|
|
2835
2809
|
const offset = React.useContext(OffsetContext);
|
|
@@ -2900,7 +2874,7 @@
|
|
|
2900
2874
|
...rest
|
|
2901
2875
|
}, title);
|
|
2902
2876
|
};
|
|
2903
|
-
const defaultProps$
|
|
2877
|
+
const defaultProps$14 = {
|
|
2904
2878
|
...ComponentDefaults,
|
|
2905
2879
|
className: "",
|
|
2906
2880
|
style: {},
|
|
@@ -2923,7 +2897,7 @@
|
|
|
2923
2897
|
iconFontClassName,
|
|
2924
2898
|
...rest
|
|
2925
2899
|
} = {
|
|
2926
|
-
...defaultProps$
|
|
2900
|
+
...defaultProps$14,
|
|
2927
2901
|
...props
|
|
2928
2902
|
};
|
|
2929
2903
|
const parentRef = React.useRef(null);
|
|
@@ -3020,9 +2994,9 @@
|
|
|
3020
2994
|
})));
|
|
3021
2995
|
})), cloneChildren()));
|
|
3022
2996
|
};
|
|
3023
|
-
Menu.defaultProps = defaultProps$
|
|
2997
|
+
Menu.defaultProps = defaultProps$14;
|
|
3024
2998
|
Menu.displayName = "NutMenu";
|
|
3025
|
-
const defaultProps$
|
|
2999
|
+
const defaultProps$13 = {
|
|
3026
3000
|
...ComponentDefaults,
|
|
3027
3001
|
className: "",
|
|
3028
3002
|
style: {},
|
|
@@ -3037,7 +3011,7 @@
|
|
|
3037
3011
|
};
|
|
3038
3012
|
const MenuItem = React.forwardRef((props, ref) => {
|
|
3039
3013
|
useConfig$1();
|
|
3040
|
-
const mergedProps = { ...defaultProps$
|
|
3014
|
+
const mergedProps = { ...defaultProps$13, ...props };
|
|
3041
3015
|
const {
|
|
3042
3016
|
style,
|
|
3043
3017
|
options,
|
|
@@ -3053,7 +3027,7 @@
|
|
|
3053
3027
|
iconClassPrefix,
|
|
3054
3028
|
iconFontClassName
|
|
3055
3029
|
} = {
|
|
3056
|
-
...defaultProps$
|
|
3030
|
+
...defaultProps$13,
|
|
3057
3031
|
...props
|
|
3058
3032
|
};
|
|
3059
3033
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -3091,8 +3065,8 @@
|
|
|
3091
3065
|
});
|
|
3092
3066
|
const getParentOffset = () => {
|
|
3093
3067
|
setTimeout(async () => {
|
|
3094
|
-
const
|
|
3095
|
-
const rect = await
|
|
3068
|
+
const p = parent.parent().current;
|
|
3069
|
+
const rect = await p.getBoundingClientRect();
|
|
3096
3070
|
setPosition({
|
|
3097
3071
|
height: rect.height,
|
|
3098
3072
|
top: rect.top
|
|
@@ -3174,14 +3148,14 @@
|
|
|
3174
3148
|
}, item.text));
|
|
3175
3149
|
}), children))));
|
|
3176
3150
|
});
|
|
3177
|
-
MenuItem.defaultProps = defaultProps$
|
|
3151
|
+
MenuItem.defaultProps = defaultProps$13;
|
|
3178
3152
|
MenuItem.displayName = "NutMenuItem";
|
|
3179
3153
|
const MIN_DISTANCE = 10;
|
|
3180
|
-
function getDirection(
|
|
3181
|
-
if (
|
|
3154
|
+
function getDirection(x, y) {
|
|
3155
|
+
if (x > y && x > MIN_DISTANCE) {
|
|
3182
3156
|
return "horizontal";
|
|
3183
3157
|
}
|
|
3184
|
-
if (
|
|
3158
|
+
if (y > x && y > MIN_DISTANCE) {
|
|
3185
3159
|
return "vertical";
|
|
3186
3160
|
}
|
|
3187
3161
|
return "";
|
|
@@ -3245,7 +3219,7 @@
|
|
|
3245
3219
|
const res = await element.getBoundingClientRect();
|
|
3246
3220
|
return res;
|
|
3247
3221
|
};
|
|
3248
|
-
const defaultProps$
|
|
3222
|
+
const defaultProps$12 = {
|
|
3249
3223
|
name: "",
|
|
3250
3224
|
size: "",
|
|
3251
3225
|
classPrefix: "nut-icon",
|
|
@@ -3273,7 +3247,7 @@
|
|
|
3273
3247
|
onClick,
|
|
3274
3248
|
...rest
|
|
3275
3249
|
} = {
|
|
3276
|
-
...defaultProps$
|
|
3250
|
+
...defaultProps$12,
|
|
3277
3251
|
...props
|
|
3278
3252
|
};
|
|
3279
3253
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3307,9 +3281,9 @@
|
|
|
3307
3281
|
children
|
|
3308
3282
|
);
|
|
3309
3283
|
}
|
|
3310
|
-
Icon.defaultProps = defaultProps$
|
|
3284
|
+
Icon.defaultProps = defaultProps$12;
|
|
3311
3285
|
Icon.displayName = "NutIcon";
|
|
3312
|
-
const defaultProps$
|
|
3286
|
+
const defaultProps$11 = {
|
|
3313
3287
|
id: "",
|
|
3314
3288
|
style: {},
|
|
3315
3289
|
icon: null,
|
|
@@ -3354,7 +3328,7 @@
|
|
|
3354
3328
|
visible,
|
|
3355
3329
|
onClose,
|
|
3356
3330
|
...rest
|
|
3357
|
-
} = { ...defaultProps$
|
|
3331
|
+
} = { ...defaultProps$11, ...props };
|
|
3358
3332
|
let timer;
|
|
3359
3333
|
const [openState, SetOpenState] = React.useState(false);
|
|
3360
3334
|
React.useEffect(() => {
|
|
@@ -3443,9 +3417,9 @@
|
|
|
3443
3417
|
className: toastBem("text")
|
|
3444
3418
|
}, msg))) : null);
|
|
3445
3419
|
};
|
|
3446
|
-
Toast.defaultProps = defaultProps$
|
|
3420
|
+
Toast.defaultProps = defaultProps$11;
|
|
3447
3421
|
Toast.displayName = "NutToast";
|
|
3448
|
-
const defaultProps$
|
|
3422
|
+
const defaultProps$10 = {
|
|
3449
3423
|
range: false,
|
|
3450
3424
|
hiddenRange: false,
|
|
3451
3425
|
hiddenTag: false,
|
|
@@ -3482,8 +3456,8 @@
|
|
|
3482
3456
|
minDesc,
|
|
3483
3457
|
maxDesc,
|
|
3484
3458
|
curValueDesc
|
|
3485
|
-
} = { ...defaultProps$
|
|
3486
|
-
let { min, max, step } = { ...defaultProps$
|
|
3459
|
+
} = { ...defaultProps$10, ...props };
|
|
3460
|
+
let { min, max, step } = { ...defaultProps$10, ...props };
|
|
3487
3461
|
min = Number(min);
|
|
3488
3462
|
max = Number(max);
|
|
3489
3463
|
step = Number(step);
|
|
@@ -3834,11 +3808,11 @@
|
|
|
3834
3808
|
}
|
|
3835
3809
|
}));
|
|
3836
3810
|
};
|
|
3837
|
-
Range.defaultProps = defaultProps$
|
|
3811
|
+
Range.defaultProps = defaultProps$10;
|
|
3838
3812
|
Range.displayName = "NutRange";
|
|
3839
3813
|
const Utils = {
|
|
3840
|
-
isLeapYear(
|
|
3841
|
-
return
|
|
3814
|
+
isLeapYear(y) {
|
|
3815
|
+
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
|
|
3842
3816
|
},
|
|
3843
3817
|
getWhatDay(year, month, day) {
|
|
3844
3818
|
const date = new Date(`${year}/${month}/${day}`);
|
|
@@ -3882,16 +3856,16 @@
|
|
|
3882
3856
|
31
|
|
3883
3857
|
][month];
|
|
3884
3858
|
},
|
|
3885
|
-
getNumTwoBit(
|
|
3886
|
-
|
|
3887
|
-
return (
|
|
3859
|
+
getNumTwoBit(n) {
|
|
3860
|
+
n = Number(n);
|
|
3861
|
+
return (n > 9 ? "" : "0") + n;
|
|
3888
3862
|
},
|
|
3889
3863
|
date2Str(date, split) {
|
|
3890
3864
|
split = split || "-";
|
|
3891
|
-
const
|
|
3892
|
-
const
|
|
3893
|
-
const
|
|
3894
|
-
return [
|
|
3865
|
+
const y = date.getFullYear();
|
|
3866
|
+
const m = this.getNumTwoBit(date.getMonth() + 1);
|
|
3867
|
+
const d = this.getNumTwoBit(date.getDate());
|
|
3868
|
+
return [y, m, d].join(split);
|
|
3895
3869
|
},
|
|
3896
3870
|
getDay(i) {
|
|
3897
3871
|
i = i || 0;
|
|
@@ -3928,7 +3902,7 @@
|
|
|
3928
3902
|
};
|
|
3929
3903
|
}
|
|
3930
3904
|
var requestAniFrame$1 = requestAniFrame();
|
|
3931
|
-
const defaultProps
|
|
3905
|
+
const defaultProps$$ = {
|
|
3932
3906
|
type: "one",
|
|
3933
3907
|
isAutoBackFill: false,
|
|
3934
3908
|
poppable: true,
|
|
@@ -3957,7 +3931,7 @@
|
|
|
3957
3931
|
onChoose,
|
|
3958
3932
|
onUpdate,
|
|
3959
3933
|
onClose
|
|
3960
|
-
} = { ...defaultProps
|
|
3934
|
+
} = { ...defaultProps$$, ...props };
|
|
3961
3935
|
const weeks = locale.calendaritem.weekdays;
|
|
3962
3936
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
3963
3937
|
const [unLoadPrev, setUnLoadPrev] = React.useState(false);
|
|
@@ -4118,9 +4092,9 @@
|
|
|
4118
4092
|
if (type2 === "prev" && days >= 7) {
|
|
4119
4093
|
days -= 7;
|
|
4120
4094
|
}
|
|
4121
|
-
return Array.from(Array(days), (
|
|
4095
|
+
return Array.from(Array(days), (v, k) => {
|
|
4122
4096
|
return {
|
|
4123
|
-
day:
|
|
4097
|
+
day: k + 1,
|
|
4124
4098
|
type: type2
|
|
4125
4099
|
};
|
|
4126
4100
|
});
|
|
@@ -4193,16 +4167,16 @@
|
|
|
4193
4167
|
const setMove = (move, type2, time) => {
|
|
4194
4168
|
var _a, _b;
|
|
4195
4169
|
let updateMove = move + state.transformY;
|
|
4196
|
-
const
|
|
4170
|
+
const h = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4197
4171
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4198
4172
|
if (type2 === "end") {
|
|
4199
4173
|
if (updateMove > 0) {
|
|
4200
4174
|
updateMove = 0;
|
|
4201
4175
|
}
|
|
4202
|
-
if (updateMove < 0 && updateMove < -offsetHeight +
|
|
4203
|
-
updateMove = -offsetHeight +
|
|
4176
|
+
if (updateMove < 0 && updateMove < -offsetHeight + h) {
|
|
4177
|
+
updateMove = -offsetHeight + h;
|
|
4204
4178
|
}
|
|
4205
|
-
if (offsetHeight <=
|
|
4179
|
+
if (offsetHeight <= h && state.monthsData.length === 1) {
|
|
4206
4180
|
updateMove = 0;
|
|
4207
4181
|
}
|
|
4208
4182
|
setTransform(updateMove, type2, time);
|
|
@@ -4210,8 +4184,8 @@
|
|
|
4210
4184
|
if (updateMove > 0 && updateMove > 100) {
|
|
4211
4185
|
updateMove = 100;
|
|
4212
4186
|
}
|
|
4213
|
-
if (updateMove < -offsetHeight +
|
|
4214
|
-
updateMove = -offsetHeight +
|
|
4187
|
+
if (updateMove < -offsetHeight + h - 100 && state.monthsData.length > 1) {
|
|
4188
|
+
updateMove = -offsetHeight + h - 100;
|
|
4215
4189
|
}
|
|
4216
4190
|
if (updateMove < 0 && updateMove < -100 && state.monthsData.length === 1) {
|
|
4217
4191
|
updateMove = -100;
|
|
@@ -4248,11 +4222,11 @@
|
|
|
4248
4222
|
return false;
|
|
4249
4223
|
}
|
|
4250
4224
|
const updateMove = move + state.transformY;
|
|
4251
|
-
const
|
|
4225
|
+
const h = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4252
4226
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4253
4227
|
if (updateMove > 0) {
|
|
4254
4228
|
getMonth(getCurrData("prev"), "prev");
|
|
4255
|
-
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) >
|
|
4229
|
+
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h ? Math.abs(move) : h) * 5) {
|
|
4256
4230
|
getMonth(getCurrData("next"), "next");
|
|
4257
4231
|
if (Math.abs(move) >= 300) {
|
|
4258
4232
|
getMonth(getCurrData("next"), "next");
|
|
@@ -4381,9 +4355,9 @@
|
|
|
4381
4355
|
onClick: confirm
|
|
4382
4356
|
}, locale.confirm)) : ""));
|
|
4383
4357
|
};
|
|
4384
|
-
CalendarItem.defaultProps = defaultProps
|
|
4358
|
+
CalendarItem.defaultProps = defaultProps$$;
|
|
4385
4359
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4386
|
-
const defaultProps
|
|
4360
|
+
const defaultProps$_ = {
|
|
4387
4361
|
type: "one",
|
|
4388
4362
|
isAutoBackFill: false,
|
|
4389
4363
|
poppable: true,
|
|
@@ -4411,7 +4385,7 @@
|
|
|
4411
4385
|
endDate,
|
|
4412
4386
|
onClose,
|
|
4413
4387
|
onChoose
|
|
4414
|
-
} = { ...defaultProps
|
|
4388
|
+
} = { ...defaultProps$_, ...props };
|
|
4415
4389
|
const close = () => {
|
|
4416
4390
|
onClose && onClose();
|
|
4417
4391
|
};
|
|
@@ -4457,9 +4431,9 @@
|
|
|
4457
4431
|
onChoose: choose
|
|
4458
4432
|
}));
|
|
4459
4433
|
};
|
|
4460
|
-
Calendar.defaultProps = defaultProps
|
|
4434
|
+
Calendar.defaultProps = defaultProps$_;
|
|
4461
4435
|
Calendar.displayName = "NutCalendar";
|
|
4462
|
-
const defaultProps$
|
|
4436
|
+
const defaultProps$Z = {
|
|
4463
4437
|
disabled: false,
|
|
4464
4438
|
checkedValue: [],
|
|
4465
4439
|
max: void 0,
|
|
@@ -4469,7 +4443,7 @@
|
|
|
4469
4443
|
};
|
|
4470
4444
|
const CheckboxGroup = React__default["default"].forwardRef(
|
|
4471
4445
|
(props, ref) => {
|
|
4472
|
-
const { children } = { ...defaultProps$
|
|
4446
|
+
const { children } = { ...defaultProps$Z, ...props };
|
|
4473
4447
|
const b2 = cn("checkboxgroup");
|
|
4474
4448
|
const {
|
|
4475
4449
|
className,
|
|
@@ -4502,7 +4476,7 @@
|
|
|
4502
4476
|
childrenLabel.push(childProps.label || child.children);
|
|
4503
4477
|
});
|
|
4504
4478
|
const reverse = childrenLabel.filter(
|
|
4505
|
-
(
|
|
4479
|
+
(c) => (innerValue == null ? void 0 : innerValue.findIndex((v) => v === c)) === -1
|
|
4506
4480
|
);
|
|
4507
4481
|
setInnerValue(reverse);
|
|
4508
4482
|
}
|
|
@@ -4576,9 +4550,9 @@
|
|
|
4576
4550
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4577
4551
|
}
|
|
4578
4552
|
);
|
|
4579
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4553
|
+
CheckboxGroup.defaultProps = defaultProps$Z;
|
|
4580
4554
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4581
|
-
const defaultProps$
|
|
4555
|
+
const defaultProps$Y = {
|
|
4582
4556
|
...ComponentDefaults,
|
|
4583
4557
|
checked: false,
|
|
4584
4558
|
disabled: false,
|
|
@@ -4594,7 +4568,7 @@
|
|
|
4594
4568
|
};
|
|
4595
4569
|
const Checkbox = (props) => {
|
|
4596
4570
|
const { children } = {
|
|
4597
|
-
...defaultProps$
|
|
4571
|
+
...defaultProps$Y,
|
|
4598
4572
|
...props
|
|
4599
4573
|
};
|
|
4600
4574
|
const b2 = cn("checkbox");
|
|
@@ -4676,7 +4650,7 @@
|
|
|
4676
4650
|
onClick: handleClick2
|
|
4677
4651
|
}, renderIcon(), renderLabel());
|
|
4678
4652
|
};
|
|
4679
|
-
Checkbox.defaultProps = defaultProps$
|
|
4653
|
+
Checkbox.defaultProps = defaultProps$Y;
|
|
4680
4654
|
Checkbox.displayName = "NutCheckBox";
|
|
4681
4655
|
Checkbox.Group = CheckboxGroup;
|
|
4682
4656
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -5123,7 +5097,7 @@
|
|
|
5123
5097
|
};
|
|
5124
5098
|
const Picker = React__default["default"].forwardRef(InternalPicker);
|
|
5125
5099
|
const currentYear = new Date().getFullYear();
|
|
5126
|
-
const defaultProps$
|
|
5100
|
+
const defaultProps$X = {
|
|
5127
5101
|
modelValue: null,
|
|
5128
5102
|
visible: false,
|
|
5129
5103
|
title: "",
|
|
@@ -5154,7 +5128,7 @@
|
|
|
5154
5128
|
style,
|
|
5155
5129
|
...rest
|
|
5156
5130
|
} = {
|
|
5157
|
-
...defaultProps$
|
|
5131
|
+
...defaultProps$X,
|
|
5158
5132
|
...props
|
|
5159
5133
|
};
|
|
5160
5134
|
const [show, setShow] = React.useState(false);
|
|
@@ -5362,21 +5336,21 @@
|
|
|
5362
5336
|
const getDateIndex = (type2) => {
|
|
5363
5337
|
if (!currentDate)
|
|
5364
5338
|
return 0;
|
|
5365
|
-
let
|
|
5339
|
+
let d = 0;
|
|
5366
5340
|
if (type2 === "year") {
|
|
5367
|
-
|
|
5341
|
+
d = currentDate.getFullYear();
|
|
5368
5342
|
} else if (type2 === "month") {
|
|
5369
|
-
|
|
5343
|
+
d = currentDate.getMonth() + 1;
|
|
5370
5344
|
} else if (type2 === "day") {
|
|
5371
|
-
|
|
5345
|
+
d = currentDate.getDate();
|
|
5372
5346
|
} else if (type2 === "hour") {
|
|
5373
|
-
|
|
5347
|
+
d = currentDate.getHours();
|
|
5374
5348
|
} else if (type2 === "minute") {
|
|
5375
|
-
|
|
5349
|
+
d = currentDate.getMinutes();
|
|
5376
5350
|
} else if (type2 === "seconds") {
|
|
5377
|
-
|
|
5351
|
+
d = currentDate.getSeconds();
|
|
5378
5352
|
}
|
|
5379
|
-
return
|
|
5353
|
+
return d;
|
|
5380
5354
|
};
|
|
5381
5355
|
const columns = (date) => {
|
|
5382
5356
|
const val = ranges(date).map((res, columnIndex) => {
|
|
@@ -5419,9 +5393,9 @@
|
|
|
5419
5393
|
ref: pickerRef
|
|
5420
5394
|
}));
|
|
5421
5395
|
};
|
|
5422
|
-
DatePicker.defaultProps = defaultProps$
|
|
5396
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
5423
5397
|
DatePicker.displayName = "NutDatePicker";
|
|
5424
|
-
const defaultProps$
|
|
5398
|
+
const defaultProps$W = {
|
|
5425
5399
|
...ComponentDefaults,
|
|
5426
5400
|
disabled: false,
|
|
5427
5401
|
buttonSize: "",
|
|
@@ -5468,7 +5442,7 @@
|
|
|
5468
5442
|
iconFontClassName,
|
|
5469
5443
|
...restProps
|
|
5470
5444
|
} = {
|
|
5471
|
-
...defaultProps$
|
|
5445
|
+
...defaultProps$W,
|
|
5472
5446
|
...props
|
|
5473
5447
|
};
|
|
5474
5448
|
const [inputValue, setInputValue] = React.useState(modelValue);
|
|
@@ -5499,8 +5473,8 @@
|
|
|
5499
5473
|
const iconAddClasses = classNames("nut-inputnumber__icon", {
|
|
5500
5474
|
"nut-inputnumber__icon--disabled": !addAllow()
|
|
5501
5475
|
});
|
|
5502
|
-
const fixedDecimalPlaces = (
|
|
5503
|
-
return Number(
|
|
5476
|
+
const fixedDecimalPlaces = (v) => {
|
|
5477
|
+
return Number(v).toFixed(Number(decimalPlaces));
|
|
5504
5478
|
};
|
|
5505
5479
|
const emitChange = (value, e2) => {
|
|
5506
5480
|
const outputValue = fixedDecimalPlaces(value);
|
|
@@ -5604,7 +5578,7 @@
|
|
|
5604
5578
|
onClick: addNumber
|
|
5605
5579
|
}));
|
|
5606
5580
|
};
|
|
5607
|
-
InputNumber.defaultProps = defaultProps$
|
|
5581
|
+
InputNumber.defaultProps = defaultProps$W;
|
|
5608
5582
|
InputNumber.displayName = "NutInputNumber";
|
|
5609
5583
|
function trimExtraChar(value, char, regExp) {
|
|
5610
5584
|
const index = value.indexOf(char);
|
|
@@ -5630,7 +5604,7 @@
|
|
|
5630
5604
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5631
5605
|
return value.replace(regExp, "");
|
|
5632
5606
|
}
|
|
5633
|
-
const defaultProps$
|
|
5607
|
+
const defaultProps$V = {
|
|
5634
5608
|
...ComponentDefaults,
|
|
5635
5609
|
type: "text",
|
|
5636
5610
|
name: "",
|
|
@@ -5727,7 +5701,7 @@
|
|
|
5727
5701
|
iconFontClassName,
|
|
5728
5702
|
...rest
|
|
5729
5703
|
} = {
|
|
5730
|
-
...defaultProps$
|
|
5704
|
+
...defaultProps$V,
|
|
5731
5705
|
...props
|
|
5732
5706
|
};
|
|
5733
5707
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5958,14 +5932,14 @@
|
|
|
5958
5932
|
}
|
|
5959
5933
|
}, errorMessage) : null)));
|
|
5960
5934
|
});
|
|
5961
|
-
Input.defaultProps = defaultProps$
|
|
5935
|
+
Input.defaultProps = defaultProps$V;
|
|
5962
5936
|
Input.displayName = "NutInput";
|
|
5963
5937
|
const radioContext = {
|
|
5964
5938
|
onChange: (val) => {
|
|
5965
5939
|
}
|
|
5966
5940
|
};
|
|
5967
5941
|
var RadioContext = React__default["default"].createContext(radioContext);
|
|
5968
|
-
const defaultProps$
|
|
5942
|
+
const defaultProps$U = {
|
|
5969
5943
|
value: null,
|
|
5970
5944
|
textPosition: "right",
|
|
5971
5945
|
onChange: (value) => {
|
|
@@ -5975,7 +5949,7 @@
|
|
|
5975
5949
|
};
|
|
5976
5950
|
const RadioGroup = React__default["default"].forwardRef(
|
|
5977
5951
|
(props, ref) => {
|
|
5978
|
-
const { children } = { ...defaultProps$
|
|
5952
|
+
const { children } = { ...defaultProps$U, ...props };
|
|
5979
5953
|
cn("RadioGroup");
|
|
5980
5954
|
const {
|
|
5981
5955
|
className,
|
|
@@ -6040,9 +6014,9 @@
|
|
|
6040
6014
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
6041
6015
|
}
|
|
6042
6016
|
);
|
|
6043
|
-
RadioGroup.defaultProps = defaultProps$
|
|
6017
|
+
RadioGroup.defaultProps = defaultProps$U;
|
|
6044
6018
|
RadioGroup.displayName = "NutRadioGroup";
|
|
6045
|
-
const defaultProps$
|
|
6019
|
+
const defaultProps$T = {
|
|
6046
6020
|
...ComponentDefaults,
|
|
6047
6021
|
disabled: false,
|
|
6048
6022
|
checked: false,
|
|
@@ -6057,7 +6031,7 @@
|
|
|
6057
6031
|
};
|
|
6058
6032
|
const Radio$1 = (props) => {
|
|
6059
6033
|
const { children } = {
|
|
6060
|
-
...defaultProps$
|
|
6034
|
+
...defaultProps$T,
|
|
6061
6035
|
...props
|
|
6062
6036
|
};
|
|
6063
6037
|
const {
|
|
@@ -6079,7 +6053,7 @@
|
|
|
6079
6053
|
const [checkedStatement, setCheckedStatement] = React.useState(checked);
|
|
6080
6054
|
const [valueStatement, setValueStatement] = React.useState(value);
|
|
6081
6055
|
const [disabledStatement, setDisabledStatement] = React.useState(disabled);
|
|
6082
|
-
const
|
|
6056
|
+
const context = React.useContext(RadioContext);
|
|
6083
6057
|
React.useEffect(() => {
|
|
6084
6058
|
setDisabledStatement(disabled);
|
|
6085
6059
|
setValueStatement(value);
|
|
@@ -6128,7 +6102,7 @@
|
|
|
6128
6102
|
return;
|
|
6129
6103
|
setCheckedStatement(!checkedStatement);
|
|
6130
6104
|
onChange && onChange(e2);
|
|
6131
|
-
|
|
6105
|
+
context && context.onChange(valueStatement);
|
|
6132
6106
|
};
|
|
6133
6107
|
const reverseState = textPosition === "left";
|
|
6134
6108
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -6137,11 +6111,11 @@
|
|
|
6137
6111
|
...rest
|
|
6138
6112
|
}, renderRadioItem());
|
|
6139
6113
|
};
|
|
6140
|
-
Radio$1.defaultProps = defaultProps$
|
|
6114
|
+
Radio$1.defaultProps = defaultProps$T;
|
|
6141
6115
|
Radio$1.displayName = "NutRadio";
|
|
6142
6116
|
Radio$1.RadioGroup = RadioGroup;
|
|
6143
6117
|
var Radio = Radio$1;
|
|
6144
|
-
const defaultProps$
|
|
6118
|
+
const defaultProps$S = {
|
|
6145
6119
|
...ComponentDefaults,
|
|
6146
6120
|
count: 5,
|
|
6147
6121
|
modelValue: 0,
|
|
@@ -6176,7 +6150,7 @@
|
|
|
6176
6150
|
iconClassPrefix,
|
|
6177
6151
|
iconFontClassName
|
|
6178
6152
|
} = {
|
|
6179
|
-
...defaultProps$
|
|
6153
|
+
...defaultProps$S,
|
|
6180
6154
|
...props
|
|
6181
6155
|
};
|
|
6182
6156
|
const b2 = cn("rate");
|
|
@@ -6209,43 +6183,43 @@
|
|
|
6209
6183
|
setScore(value);
|
|
6210
6184
|
onChange && onChange(value);
|
|
6211
6185
|
};
|
|
6212
|
-
const onHalfClick = (event,
|
|
6186
|
+
const onHalfClick = (event, n) => {
|
|
6213
6187
|
event.preventDefault();
|
|
6214
6188
|
event.stopPropagation();
|
|
6215
|
-
const value = Math.max(Number(minimizeValue),
|
|
6189
|
+
const value = Math.max(Number(minimizeValue), n - 0.5);
|
|
6216
6190
|
setScore(value);
|
|
6217
6191
|
onChange && onChange(value);
|
|
6218
6192
|
};
|
|
6219
6193
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
6220
6194
|
className: `${b2()} ${className}`,
|
|
6221
6195
|
style
|
|
6222
|
-
}, countArray.map((
|
|
6196
|
+
}, countArray.map((n) => {
|
|
6223
6197
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
6224
6198
|
className: bi(),
|
|
6225
|
-
key:
|
|
6226
|
-
onClick: (event) => onClick(event,
|
|
6199
|
+
key: n,
|
|
6200
|
+
onClick: (event) => onClick(event, n),
|
|
6227
6201
|
style: { marginRight: pxCheck2(spacing) }
|
|
6228
6202
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
6229
6203
|
classPrefix: iconClassPrefix,
|
|
6230
6204
|
fontClassName: iconFontClassName,
|
|
6231
6205
|
size: iconSize,
|
|
6232
|
-
className: `${bi("icon")} ${disabled ||
|
|
6233
|
-
name:
|
|
6234
|
-
color:
|
|
6235
|
-
}), allowHalf && score >
|
|
6206
|
+
className: `${bi("icon")} ${disabled || n > score ? bi("icon--disabled") : ""}`,
|
|
6207
|
+
name: n <= score ? checkedIcon : uncheckedIcon,
|
|
6208
|
+
color: n <= score ? activeColor : voidColor
|
|
6209
|
+
}), allowHalf && score > n - 1 && /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
6236
6210
|
classPrefix: iconClassPrefix,
|
|
6237
6211
|
fontClassName: iconFontClassName,
|
|
6238
|
-
onClick: (event) => onHalfClick(event,
|
|
6212
|
+
onClick: (event) => onHalfClick(event, n),
|
|
6239
6213
|
className: `${bi("icon")} ${bi("icon--half")}`,
|
|
6240
|
-
color:
|
|
6214
|
+
color: n <= score ? activeColor : voidColor,
|
|
6241
6215
|
size: iconSize,
|
|
6242
6216
|
name: checkedIcon
|
|
6243
6217
|
}));
|
|
6244
6218
|
}));
|
|
6245
6219
|
};
|
|
6246
|
-
Rate.defaultProps = defaultProps$
|
|
6220
|
+
Rate.defaultProps = defaultProps$S;
|
|
6247
6221
|
Rate.displayName = "NutRate";
|
|
6248
|
-
const defaultProps$
|
|
6222
|
+
const defaultProps$R = {
|
|
6249
6223
|
...ComponentDefaults,
|
|
6250
6224
|
title: "",
|
|
6251
6225
|
desc: "",
|
|
@@ -6413,9 +6387,9 @@
|
|
|
6413
6387
|
onClick: () => sure()
|
|
6414
6388
|
}, locale.confirm)) : null)));
|
|
6415
6389
|
};
|
|
6416
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6390
|
+
ShortPassword.defaultProps = defaultProps$R;
|
|
6417
6391
|
ShortPassword.displayName = "NutShortPassword";
|
|
6418
|
-
const defaultProps$
|
|
6392
|
+
const defaultProps$Q = {
|
|
6419
6393
|
defaultValue: "",
|
|
6420
6394
|
textAlign: "left",
|
|
6421
6395
|
limitshow: false,
|
|
@@ -6443,7 +6417,7 @@
|
|
|
6443
6417
|
onChange,
|
|
6444
6418
|
onBlur,
|
|
6445
6419
|
onFocus
|
|
6446
|
-
} = { ...defaultProps$
|
|
6420
|
+
} = { ...defaultProps$Q, ...props };
|
|
6447
6421
|
const textareaBem = cn("textarea");
|
|
6448
6422
|
const [inputValue, SetInputValue] = React.useState("");
|
|
6449
6423
|
React.useEffect(() => {
|
|
@@ -6508,9 +6482,9 @@
|
|
|
6508
6482
|
className: textareaBem("limit")
|
|
6509
6483
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6510
6484
|
};
|
|
6511
|
-
TextArea.defaultProps = defaultProps$
|
|
6485
|
+
TextArea.defaultProps = defaultProps$Q;
|
|
6512
6486
|
TextArea.displayName = "NutTextArea";
|
|
6513
|
-
const defaultProps$
|
|
6487
|
+
const defaultProps$P = {
|
|
6514
6488
|
...ComponentDefaults,
|
|
6515
6489
|
className: "",
|
|
6516
6490
|
style: {},
|
|
@@ -6558,7 +6532,7 @@
|
|
|
6558
6532
|
iconFontClassName,
|
|
6559
6533
|
...rest
|
|
6560
6534
|
} = {
|
|
6561
|
-
...defaultProps$
|
|
6535
|
+
...defaultProps$P,
|
|
6562
6536
|
...props
|
|
6563
6537
|
};
|
|
6564
6538
|
const b2 = cn("progress");
|
|
@@ -6636,7 +6610,7 @@
|
|
|
6636
6610
|
color: iconColor
|
|
6637
6611
|
})));
|
|
6638
6612
|
};
|
|
6639
|
-
Progress.defaultProps = defaultProps$
|
|
6613
|
+
Progress.defaultProps = defaultProps$P;
|
|
6640
6614
|
Progress.displayName = "NutProgress";
|
|
6641
6615
|
class UploadOptions {
|
|
6642
6616
|
constructor() {
|
|
@@ -6734,7 +6708,7 @@
|
|
|
6734
6708
|
}
|
|
6735
6709
|
}
|
|
6736
6710
|
}
|
|
6737
|
-
const defaultProps$
|
|
6711
|
+
const defaultProps$O = {
|
|
6738
6712
|
...ComponentDefaults,
|
|
6739
6713
|
url: "",
|
|
6740
6714
|
maximum: 9,
|
|
@@ -6806,7 +6780,7 @@
|
|
|
6806
6780
|
onBeforeXhrUpload,
|
|
6807
6781
|
onBeforeDelete,
|
|
6808
6782
|
...restProps
|
|
6809
|
-
} = { ...defaultProps$
|
|
6783
|
+
} = { ...defaultProps$O, ...props };
|
|
6810
6784
|
const [fileList, setFileList] = React.useState([]);
|
|
6811
6785
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
6812
6786
|
React.useEffect(() => {
|
|
@@ -6991,8 +6965,8 @@
|
|
|
6991
6965
|
const onChangeFn = (res) => {
|
|
6992
6966
|
const { tempFiles } = res;
|
|
6993
6967
|
if (onBeforeUpload) {
|
|
6994
|
-
onBeforeUpload(tempFiles).then((
|
|
6995
|
-
const _files = filterFiles(
|
|
6968
|
+
onBeforeUpload(tempFiles).then((f) => {
|
|
6969
|
+
const _files = filterFiles(f);
|
|
6996
6970
|
readFile(_files);
|
|
6997
6971
|
});
|
|
6998
6972
|
} else {
|
|
@@ -7094,9 +7068,9 @@
|
|
|
7094
7068
|
})));
|
|
7095
7069
|
};
|
|
7096
7070
|
const Uploader = React__default["default"].forwardRef(InternalUploader);
|
|
7097
|
-
Uploader.defaultProps = defaultProps$
|
|
7071
|
+
Uploader.defaultProps = defaultProps$O;
|
|
7098
7072
|
Uploader.displayName = "NutUploader";
|
|
7099
|
-
const defaultProps$
|
|
7073
|
+
const defaultProps$N = {
|
|
7100
7074
|
data: {
|
|
7101
7075
|
text: "",
|
|
7102
7076
|
value: "",
|
|
@@ -7112,7 +7086,7 @@
|
|
|
7112
7086
|
};
|
|
7113
7087
|
const InternalCascaderItem = (props) => {
|
|
7114
7088
|
const { data, checked, chooseItem, activeColor } = {
|
|
7115
|
-
...defaultProps$
|
|
7089
|
+
...defaultProps$N,
|
|
7116
7090
|
...props
|
|
7117
7091
|
};
|
|
7118
7092
|
const b2 = cn("cascader-item");
|
|
@@ -7149,7 +7123,7 @@
|
|
|
7149
7123
|
}));
|
|
7150
7124
|
};
|
|
7151
7125
|
const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
|
|
7152
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7126
|
+
CascaderItem.defaultProps = defaultProps$N;
|
|
7153
7127
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7154
7128
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7155
7129
|
const {
|
|
@@ -7283,7 +7257,7 @@
|
|
|
7283
7257
|
return pathNodes;
|
|
7284
7258
|
}
|
|
7285
7259
|
}
|
|
7286
|
-
const defaultProps$
|
|
7260
|
+
const defaultProps$M = {
|
|
7287
7261
|
className: "",
|
|
7288
7262
|
style: {},
|
|
7289
7263
|
activeColor: "#fa2c19",
|
|
@@ -7333,7 +7307,7 @@
|
|
|
7333
7307
|
onClose,
|
|
7334
7308
|
onChange,
|
|
7335
7309
|
onPathChange
|
|
7336
|
-
} = { ...defaultProps$
|
|
7310
|
+
} = { ...defaultProps$M, ...props };
|
|
7337
7311
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
7338
7312
|
const [optiosData, setOptiosData] = React.useState([]);
|
|
7339
7313
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7428,9 +7402,9 @@
|
|
|
7428
7402
|
if (parent) {
|
|
7429
7403
|
needToSync = [parent.value];
|
|
7430
7404
|
state.initLoading = true;
|
|
7431
|
-
const last = await currentValue2.slice(1).reduce(async (
|
|
7405
|
+
const last = await currentValue2.slice(1).reduce(async (p, value2) => {
|
|
7432
7406
|
var _a;
|
|
7433
|
-
const parent2 = await
|
|
7407
|
+
const parent2 = await p;
|
|
7434
7408
|
await invokeLazyLoad(parent2);
|
|
7435
7409
|
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
7436
7410
|
(item) => item.value === value2
|
|
@@ -7593,9 +7567,9 @@
|
|
|
7593
7567
|
}, renderItem()) : renderItem());
|
|
7594
7568
|
};
|
|
7595
7569
|
const Cascader = React__default["default"].forwardRef(InternalCascader);
|
|
7596
|
-
Cascader.defaultProps = defaultProps$
|
|
7570
|
+
Cascader.defaultProps = defaultProps$M;
|
|
7597
7571
|
Cascader.displayName = "NutCascader";
|
|
7598
|
-
const defaultProps$
|
|
7572
|
+
const defaultProps$L = {
|
|
7599
7573
|
...ComponentDefaults,
|
|
7600
7574
|
placeholder: "",
|
|
7601
7575
|
shape: "square",
|
|
@@ -7646,7 +7620,7 @@
|
|
|
7646
7620
|
iconClassPrefix,
|
|
7647
7621
|
iconFontClassName
|
|
7648
7622
|
} = {
|
|
7649
|
-
...defaultProps$
|
|
7623
|
+
...defaultProps$L,
|
|
7650
7624
|
...props
|
|
7651
7625
|
};
|
|
7652
7626
|
const alignClass = `${align}`;
|
|
@@ -7800,9 +7774,9 @@
|
|
|
7800
7774
|
className: "nut-searchbar__input-box"
|
|
7801
7775
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7802
7776
|
};
|
|
7803
|
-
SearchBar.defaultProps = defaultProps$
|
|
7777
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
7804
7778
|
SearchBar.displayName = "NutSearchBar";
|
|
7805
|
-
const defaultProps$
|
|
7779
|
+
const defaultProps$K = {
|
|
7806
7780
|
confirmText: "",
|
|
7807
7781
|
title: "",
|
|
7808
7782
|
visible: false,
|
|
@@ -8000,1344 +7974,113 @@
|
|
|
8000
7974
|
})
|
|
8001
7975
|
}, confirmText || locale.done))) : null))));
|
|
8002
7976
|
};
|
|
8003
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7977
|
+
NumberKeyboard.defaultProps = defaultProps$K;
|
|
8004
7978
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
8005
|
-
const defaultProps$
|
|
7979
|
+
const defaultProps$J = {};
|
|
8006
7980
|
const Form = (props) => {
|
|
8007
7981
|
useConfig();
|
|
8008
|
-
({ ...defaultProps$
|
|
7982
|
+
({ ...defaultProps$J, ...props });
|
|
8009
7983
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8010
7984
|
className: "nut-form"
|
|
8011
7985
|
}, "Form");
|
|
8012
7986
|
};
|
|
8013
|
-
Form.defaultProps = defaultProps$
|
|
7987
|
+
Form.defaultProps = defaultProps$J;
|
|
8014
7988
|
Form.displayName = "NutForm";
|
|
8015
7989
|
const FormItemContext = React.createContext({});
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
7990
|
+
const defaultProps$I = {
|
|
7991
|
+
...ComponentDefaults,
|
|
7992
|
+
name: "",
|
|
7993
|
+
label: "",
|
|
7994
|
+
className: "",
|
|
7995
|
+
rules: [{ required: false, message: "" }],
|
|
7996
|
+
disabled: false,
|
|
7997
|
+
labelWidth: 90,
|
|
7998
|
+
errorMessageAlign: "left",
|
|
7999
|
+
showErrorLine: true,
|
|
8000
|
+
showErrorMessage: true
|
|
8001
|
+
};
|
|
8002
|
+
class FormItem extends React__default["default"].Component {
|
|
8003
|
+
constructor() {
|
|
8004
|
+
super(...arguments);
|
|
8005
|
+
this.getControlled = (children) => {
|
|
8006
|
+
const { getFieldValue, setFieldsValue } = this.context;
|
|
8007
|
+
const { name } = this.props;
|
|
8008
|
+
const type = children.type.NAME;
|
|
8009
|
+
return {
|
|
8010
|
+
value: getFieldValue(name),
|
|
8011
|
+
onChange: (event) => {
|
|
8012
|
+
let newValue = event;
|
|
8013
|
+
switch (type) {
|
|
8014
|
+
case "checkbox":
|
|
8015
|
+
newValue = event.target.value;
|
|
8016
|
+
break;
|
|
8017
|
+
}
|
|
8018
|
+
setFieldsValue({ [name]: newValue });
|
|
8019
|
+
}
|
|
8020
|
+
};
|
|
8021
|
+
};
|
|
8022
|
+
this.onStoreChange = () => {
|
|
8023
|
+
this.forceUpdate();
|
|
8024
|
+
};
|
|
8025
|
+
this.renderLayout = (childNode) => {
|
|
8026
|
+
var _a, _b;
|
|
8027
|
+
const {
|
|
8028
|
+
label,
|
|
8029
|
+
name,
|
|
8030
|
+
rules = [{ required: false, message: "" }],
|
|
8031
|
+
className,
|
|
8032
|
+
labelWidth,
|
|
8033
|
+
errorMessageAlign,
|
|
8034
|
+
showErrorLine,
|
|
8035
|
+
showErrorMessage
|
|
8036
|
+
} = {
|
|
8037
|
+
...defaultProps$I,
|
|
8038
|
+
...this.props
|
|
8039
|
+
};
|
|
8040
|
+
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
8041
|
+
return item2.field === name;
|
|
8042
|
+
}));
|
|
8043
|
+
const { starPositon } = this.context;
|
|
8044
|
+
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
8045
|
+
className: "required"
|
|
8046
|
+
});
|
|
8047
|
+
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);
|
|
8048
|
+
return /* @__PURE__ */ React__default["default"].createElement(Cell, {
|
|
8049
|
+
className: `nut-form-item ${className}`
|
|
8050
|
+
}, label ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8051
|
+
className: "nut-cell__title nut-form-item__label",
|
|
8052
|
+
style: {
|
|
8053
|
+
width: this.pxCheck(labelWidth)
|
|
8054
|
+
}
|
|
8055
|
+
}, renderLabel) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8056
|
+
className: "nut-cell__value nut-form-item__body"
|
|
8057
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8058
|
+
className: "nut-form-item__body__slots"
|
|
8059
|
+
}, childNode), item.length > 0 && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8060
|
+
className: "nut-form-item__body__tips",
|
|
8061
|
+
style: { textAlign: errorMessageAlign }
|
|
8062
|
+
}, item[0].message)));
|
|
8063
|
+
};
|
|
8064
|
+
this.pxCheck = (value) => {
|
|
8065
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
8066
|
+
};
|
|
8022
8067
|
}
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
function resolvePathname(to2, from) {
|
|
8026
|
-
if (from === void 0)
|
|
8027
|
-
from = "";
|
|
8028
|
-
var toParts = to2 && to2.split("/") || [];
|
|
8029
|
-
var fromParts = from && from.split("/") || [];
|
|
8030
|
-
var isToAbs = to2 && isAbsolute(to2);
|
|
8031
|
-
var isFromAbs = from && isAbsolute(from);
|
|
8032
|
-
var mustEndAbs = isToAbs || isFromAbs;
|
|
8033
|
-
if (to2 && isAbsolute(to2)) {
|
|
8034
|
-
fromParts = toParts;
|
|
8035
|
-
} else if (toParts.length) {
|
|
8036
|
-
fromParts.pop();
|
|
8037
|
-
fromParts = fromParts.concat(toParts);
|
|
8038
|
-
}
|
|
8039
|
-
if (!fromParts.length)
|
|
8040
|
-
return "/";
|
|
8041
|
-
var hasTrailingSlash;
|
|
8042
|
-
if (fromParts.length) {
|
|
8043
|
-
var last = fromParts[fromParts.length - 1];
|
|
8044
|
-
hasTrailingSlash = last === "." || last === ".." || last === "";
|
|
8045
|
-
} else {
|
|
8046
|
-
hasTrailingSlash = false;
|
|
8047
|
-
}
|
|
8048
|
-
var up = 0;
|
|
8049
|
-
for (var i = fromParts.length; i >= 0; i--) {
|
|
8050
|
-
var part = fromParts[i];
|
|
8051
|
-
if (part === ".") {
|
|
8052
|
-
spliceOne(fromParts, i);
|
|
8053
|
-
} else if (part === "..") {
|
|
8054
|
-
spliceOne(fromParts, i);
|
|
8055
|
-
up++;
|
|
8056
|
-
} else if (up) {
|
|
8057
|
-
spliceOne(fromParts, i);
|
|
8058
|
-
up--;
|
|
8059
|
-
}
|
|
8060
|
-
}
|
|
8061
|
-
if (!mustEndAbs)
|
|
8062
|
-
for (; up--; up)
|
|
8063
|
-
fromParts.unshift("..");
|
|
8064
|
-
if (mustEndAbs && fromParts[0] !== "" && (!fromParts[0] || !isAbsolute(fromParts[0])))
|
|
8065
|
-
fromParts.unshift("");
|
|
8066
|
-
var result = fromParts.join("/");
|
|
8067
|
-
if (hasTrailingSlash && result.substr(-1) !== "/")
|
|
8068
|
-
result += "/";
|
|
8069
|
-
return result;
|
|
8070
|
-
}
|
|
8071
|
-
var isProduction = true;
|
|
8072
|
-
var prefix$1 = "Invariant failed";
|
|
8073
|
-
function invariant(condition, message) {
|
|
8074
|
-
if (condition) {
|
|
8075
|
-
return;
|
|
8068
|
+
componentDidMount() {
|
|
8069
|
+
this.cancelRegister = this.context.registerField(this);
|
|
8076
8070
|
}
|
|
8077
|
-
|
|
8078
|
-
|
|
8071
|
+
componentWillUnmount() {
|
|
8072
|
+
if (this.cancelRegister) {
|
|
8073
|
+
this.cancelRegister();
|
|
8074
|
+
}
|
|
8079
8075
|
}
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
var hashIndex = pathname.indexOf("#");
|
|
8089
|
-
if (hashIndex !== -1) {
|
|
8090
|
-
hash = pathname.substr(hashIndex);
|
|
8091
|
-
pathname = pathname.substr(0, hashIndex);
|
|
8092
|
-
}
|
|
8093
|
-
var searchIndex = pathname.indexOf("?");
|
|
8094
|
-
if (searchIndex !== -1) {
|
|
8095
|
-
search = pathname.substr(searchIndex);
|
|
8096
|
-
pathname = pathname.substr(0, searchIndex);
|
|
8097
|
-
}
|
|
8098
|
-
return {
|
|
8099
|
-
pathname,
|
|
8100
|
-
search: search === "?" ? "" : search,
|
|
8101
|
-
hash: hash === "#" ? "" : hash
|
|
8102
|
-
};
|
|
8103
|
-
}
|
|
8104
|
-
function createPath(location) {
|
|
8105
|
-
var pathname = location.pathname, search = location.search, hash = location.hash;
|
|
8106
|
-
var path = pathname || "/";
|
|
8107
|
-
if (search && search !== "?")
|
|
8108
|
-
path += search.charAt(0) === "?" ? search : "?" + search;
|
|
8109
|
-
if (hash && hash !== "#")
|
|
8110
|
-
path += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
8111
|
-
return path;
|
|
8112
|
-
}
|
|
8113
|
-
function createLocation(path, state, key, currentLocation) {
|
|
8114
|
-
var location;
|
|
8115
|
-
if (typeof path === "string") {
|
|
8116
|
-
location = parsePath(path);
|
|
8117
|
-
location.state = state;
|
|
8118
|
-
} else {
|
|
8119
|
-
location = _extends$3({}, path);
|
|
8120
|
-
if (location.pathname === void 0)
|
|
8121
|
-
location.pathname = "";
|
|
8122
|
-
if (location.search) {
|
|
8123
|
-
if (location.search.charAt(0) !== "?")
|
|
8124
|
-
location.search = "?" + location.search;
|
|
8125
|
-
} else {
|
|
8126
|
-
location.search = "";
|
|
8127
|
-
}
|
|
8128
|
-
if (location.hash) {
|
|
8129
|
-
if (location.hash.charAt(0) !== "#")
|
|
8130
|
-
location.hash = "#" + location.hash;
|
|
8131
|
-
} else {
|
|
8132
|
-
location.hash = "";
|
|
8133
|
-
}
|
|
8134
|
-
if (state !== void 0 && location.state === void 0)
|
|
8135
|
-
location.state = state;
|
|
8136
|
-
}
|
|
8137
|
-
try {
|
|
8138
|
-
location.pathname = decodeURI(location.pathname);
|
|
8139
|
-
} catch (e2) {
|
|
8140
|
-
if (e2 instanceof URIError) {
|
|
8141
|
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.');
|
|
8142
|
-
} else {
|
|
8143
|
-
throw e2;
|
|
8144
|
-
}
|
|
8145
|
-
}
|
|
8146
|
-
if (key)
|
|
8147
|
-
location.key = key;
|
|
8148
|
-
if (currentLocation) {
|
|
8149
|
-
if (!location.pathname) {
|
|
8150
|
-
location.pathname = currentLocation.pathname;
|
|
8151
|
-
} else if (location.pathname.charAt(0) !== "/") {
|
|
8152
|
-
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
8153
|
-
}
|
|
8154
|
-
} else {
|
|
8155
|
-
if (!location.pathname) {
|
|
8156
|
-
location.pathname = "/";
|
|
8157
|
-
}
|
|
8158
|
-
}
|
|
8159
|
-
return location;
|
|
8160
|
-
}
|
|
8161
|
-
function createTransitionManager() {
|
|
8162
|
-
var prompt = null;
|
|
8163
|
-
function setPrompt(nextPrompt) {
|
|
8164
|
-
prompt = nextPrompt;
|
|
8165
|
-
return function() {
|
|
8166
|
-
if (prompt === nextPrompt)
|
|
8167
|
-
prompt = null;
|
|
8168
|
-
};
|
|
8169
|
-
}
|
|
8170
|
-
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
8171
|
-
if (prompt != null) {
|
|
8172
|
-
var result = typeof prompt === "function" ? prompt(location, action) : prompt;
|
|
8173
|
-
if (typeof result === "string") {
|
|
8174
|
-
if (typeof getUserConfirmation === "function") {
|
|
8175
|
-
getUserConfirmation(result, callback);
|
|
8176
|
-
} else {
|
|
8177
|
-
callback(true);
|
|
8178
|
-
}
|
|
8179
|
-
} else {
|
|
8180
|
-
callback(result !== false);
|
|
8181
|
-
}
|
|
8182
|
-
} else {
|
|
8183
|
-
callback(true);
|
|
8184
|
-
}
|
|
8185
|
-
}
|
|
8186
|
-
var listeners = [];
|
|
8187
|
-
function appendListener(fn) {
|
|
8188
|
-
var isActive = true;
|
|
8189
|
-
function listener() {
|
|
8190
|
-
if (isActive)
|
|
8191
|
-
fn.apply(void 0, arguments);
|
|
8192
|
-
}
|
|
8193
|
-
listeners.push(listener);
|
|
8194
|
-
return function() {
|
|
8195
|
-
isActive = false;
|
|
8196
|
-
listeners = listeners.filter(function(item) {
|
|
8197
|
-
return item !== listener;
|
|
8198
|
-
});
|
|
8199
|
-
};
|
|
8200
|
-
}
|
|
8201
|
-
function notifyListeners() {
|
|
8202
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8203
|
-
args[_key] = arguments[_key];
|
|
8204
|
-
}
|
|
8205
|
-
listeners.forEach(function(listener) {
|
|
8206
|
-
return listener.apply(void 0, args);
|
|
8207
|
-
});
|
|
8208
|
-
}
|
|
8209
|
-
return {
|
|
8210
|
-
setPrompt,
|
|
8211
|
-
confirmTransitionTo,
|
|
8212
|
-
appendListener,
|
|
8213
|
-
notifyListeners
|
|
8214
|
-
};
|
|
8215
|
-
}
|
|
8216
|
-
function clamp$1(n2, lowerBound, upperBound) {
|
|
8217
|
-
return Math.min(Math.max(n2, lowerBound), upperBound);
|
|
8218
|
-
}
|
|
8219
|
-
function createMemoryHistory(props) {
|
|
8220
|
-
if (props === void 0) {
|
|
8221
|
-
props = {};
|
|
8222
|
-
}
|
|
8223
|
-
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;
|
|
8224
|
-
var transitionManager = createTransitionManager();
|
|
8225
|
-
function setState(nextState) {
|
|
8226
|
-
_extends$3(history, nextState);
|
|
8227
|
-
history.length = history.entries.length;
|
|
8228
|
-
transitionManager.notifyListeners(history.location, history.action);
|
|
8229
|
-
}
|
|
8230
|
-
function createKey() {
|
|
8231
|
-
return Math.random().toString(36).substr(2, keyLength);
|
|
8232
|
-
}
|
|
8233
|
-
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
8234
|
-
var entries = initialEntries.map(function(entry) {
|
|
8235
|
-
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
8236
|
-
});
|
|
8237
|
-
var createHref = createPath;
|
|
8238
|
-
function push(path, state) {
|
|
8239
|
-
var action = "PUSH";
|
|
8240
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
8241
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8242
|
-
if (!ok)
|
|
8243
|
-
return;
|
|
8244
|
-
var prevIndex = history.index;
|
|
8245
|
-
var nextIndex = prevIndex + 1;
|
|
8246
|
-
var nextEntries = history.entries.slice(0);
|
|
8247
|
-
if (nextEntries.length > nextIndex) {
|
|
8248
|
-
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
|
|
8249
|
-
} else {
|
|
8250
|
-
nextEntries.push(location);
|
|
8251
|
-
}
|
|
8252
|
-
setState({
|
|
8253
|
-
action,
|
|
8254
|
-
location,
|
|
8255
|
-
index: nextIndex,
|
|
8256
|
-
entries: nextEntries
|
|
8257
|
-
});
|
|
8258
|
-
});
|
|
8259
|
-
}
|
|
8260
|
-
function replace(path, state) {
|
|
8261
|
-
var action = "REPLACE";
|
|
8262
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
8263
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8264
|
-
if (!ok)
|
|
8265
|
-
return;
|
|
8266
|
-
history.entries[history.index] = location;
|
|
8267
|
-
setState({
|
|
8268
|
-
action,
|
|
8269
|
-
location
|
|
8270
|
-
});
|
|
8271
|
-
});
|
|
8272
|
-
}
|
|
8273
|
-
function go(n2) {
|
|
8274
|
-
var nextIndex = clamp$1(history.index + n2, 0, history.entries.length - 1);
|
|
8275
|
-
var action = "POP";
|
|
8276
|
-
var location = history.entries[nextIndex];
|
|
8277
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8278
|
-
if (ok) {
|
|
8279
|
-
setState({
|
|
8280
|
-
action,
|
|
8281
|
-
location,
|
|
8282
|
-
index: nextIndex
|
|
8283
|
-
});
|
|
8284
|
-
} else {
|
|
8285
|
-
setState();
|
|
8286
|
-
}
|
|
8287
|
-
});
|
|
8288
|
-
}
|
|
8289
|
-
function goBack() {
|
|
8290
|
-
go(-1);
|
|
8291
|
-
}
|
|
8292
|
-
function goForward() {
|
|
8293
|
-
go(1);
|
|
8294
|
-
}
|
|
8295
|
-
function canGo(n2) {
|
|
8296
|
-
var nextIndex = history.index + n2;
|
|
8297
|
-
return nextIndex >= 0 && nextIndex < history.entries.length;
|
|
8298
|
-
}
|
|
8299
|
-
function block(prompt) {
|
|
8300
|
-
if (prompt === void 0) {
|
|
8301
|
-
prompt = false;
|
|
8302
|
-
}
|
|
8303
|
-
return transitionManager.setPrompt(prompt);
|
|
8304
|
-
}
|
|
8305
|
-
function listen(listener) {
|
|
8306
|
-
return transitionManager.appendListener(listener);
|
|
8307
|
-
}
|
|
8308
|
-
var history = {
|
|
8309
|
-
length: entries.length,
|
|
8310
|
-
action: "POP",
|
|
8311
|
-
location: entries[index],
|
|
8312
|
-
index,
|
|
8313
|
-
entries,
|
|
8314
|
-
createHref,
|
|
8315
|
-
push,
|
|
8316
|
-
replace,
|
|
8317
|
-
go,
|
|
8318
|
-
goBack,
|
|
8319
|
-
goForward,
|
|
8320
|
-
canGo,
|
|
8321
|
-
block,
|
|
8322
|
-
listen
|
|
8323
|
-
};
|
|
8324
|
-
return history;
|
|
8325
|
-
}
|
|
8326
|
-
var pathToRegexp$2 = { exports: {} };
|
|
8327
|
-
var isarray$1 = Array.isArray || function(arr) {
|
|
8328
|
-
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
8329
|
-
};
|
|
8330
|
-
var isarray = isarray$1;
|
|
8331
|
-
pathToRegexp$2.exports = pathToRegexp;
|
|
8332
|
-
pathToRegexp$2.exports.parse = parse$1;
|
|
8333
|
-
pathToRegexp$2.exports.compile = compile;
|
|
8334
|
-
pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
|
|
8335
|
-
pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
|
|
8336
|
-
var PATH_REGEXP = new RegExp([
|
|
8337
|
-
"(\\\\.)",
|
|
8338
|
-
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
8339
|
-
].join("|"), "g");
|
|
8340
|
-
function parse$1(str, options) {
|
|
8341
|
-
var tokens = [];
|
|
8342
|
-
var key = 0;
|
|
8343
|
-
var index = 0;
|
|
8344
|
-
var path = "";
|
|
8345
|
-
var defaultDelimiter = options && options.delimiter || "/";
|
|
8346
|
-
var res;
|
|
8347
|
-
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
8348
|
-
var m2 = res[0];
|
|
8349
|
-
var escaped = res[1];
|
|
8350
|
-
var offset = res.index;
|
|
8351
|
-
path += str.slice(index, offset);
|
|
8352
|
-
index = offset + m2.length;
|
|
8353
|
-
if (escaped) {
|
|
8354
|
-
path += escaped[1];
|
|
8355
|
-
continue;
|
|
8356
|
-
}
|
|
8357
|
-
var next = str[index];
|
|
8358
|
-
var prefix2 = res[2];
|
|
8359
|
-
var name = res[3];
|
|
8360
|
-
var capture = res[4];
|
|
8361
|
-
var group = res[5];
|
|
8362
|
-
var modifier = res[6];
|
|
8363
|
-
var asterisk = res[7];
|
|
8364
|
-
if (path) {
|
|
8365
|
-
tokens.push(path);
|
|
8366
|
-
path = "";
|
|
8367
|
-
}
|
|
8368
|
-
var partial = prefix2 != null && next != null && next !== prefix2;
|
|
8369
|
-
var repeat = modifier === "+" || modifier === "*";
|
|
8370
|
-
var optional = modifier === "?" || modifier === "*";
|
|
8371
|
-
var delimiter = res[2] || defaultDelimiter;
|
|
8372
|
-
var pattern = capture || group;
|
|
8373
|
-
tokens.push({
|
|
8374
|
-
name: name || key++,
|
|
8375
|
-
prefix: prefix2 || "",
|
|
8376
|
-
delimiter,
|
|
8377
|
-
optional,
|
|
8378
|
-
repeat,
|
|
8379
|
-
partial,
|
|
8380
|
-
asterisk: !!asterisk,
|
|
8381
|
-
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
8382
|
-
});
|
|
8383
|
-
}
|
|
8384
|
-
if (index < str.length) {
|
|
8385
|
-
path += str.substr(index);
|
|
8386
|
-
}
|
|
8387
|
-
if (path) {
|
|
8388
|
-
tokens.push(path);
|
|
8389
|
-
}
|
|
8390
|
-
return tokens;
|
|
8391
|
-
}
|
|
8392
|
-
function compile(str, options) {
|
|
8393
|
-
return tokensToFunction(parse$1(str, options), options);
|
|
8394
|
-
}
|
|
8395
|
-
function encodeURIComponentPretty(str) {
|
|
8396
|
-
return encodeURI(str).replace(/[\/?#]/g, function(c6) {
|
|
8397
|
-
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8398
|
-
});
|
|
8399
|
-
}
|
|
8400
|
-
function encodeAsterisk(str) {
|
|
8401
|
-
return encodeURI(str).replace(/[?#]/g, function(c6) {
|
|
8402
|
-
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8403
|
-
});
|
|
8404
|
-
}
|
|
8405
|
-
function tokensToFunction(tokens, options) {
|
|
8406
|
-
var matches = new Array(tokens.length);
|
|
8407
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
8408
|
-
if (typeof tokens[i] === "object") {
|
|
8409
|
-
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
8410
|
-
}
|
|
8411
|
-
}
|
|
8412
|
-
return function(obj, opts) {
|
|
8413
|
-
var path = "";
|
|
8414
|
-
var data = obj || {};
|
|
8415
|
-
var options2 = opts || {};
|
|
8416
|
-
var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
8417
|
-
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8418
|
-
var token = tokens[i2];
|
|
8419
|
-
if (typeof token === "string") {
|
|
8420
|
-
path += token;
|
|
8421
|
-
continue;
|
|
8422
|
-
}
|
|
8423
|
-
var value = data[token.name];
|
|
8424
|
-
var segment;
|
|
8425
|
-
if (value == null) {
|
|
8426
|
-
if (token.optional) {
|
|
8427
|
-
if (token.partial) {
|
|
8428
|
-
path += token.prefix;
|
|
8429
|
-
}
|
|
8430
|
-
continue;
|
|
8431
|
-
} else {
|
|
8432
|
-
throw new TypeError('Expected "' + token.name + '" to be defined');
|
|
8433
|
-
}
|
|
8434
|
-
}
|
|
8435
|
-
if (isarray(value)) {
|
|
8436
|
-
if (!token.repeat) {
|
|
8437
|
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
|
|
8438
|
-
}
|
|
8439
|
-
if (value.length === 0) {
|
|
8440
|
-
if (token.optional) {
|
|
8441
|
-
continue;
|
|
8442
|
-
} else {
|
|
8443
|
-
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
8444
|
-
}
|
|
8445
|
-
}
|
|
8446
|
-
for (var j = 0; j < value.length; j++) {
|
|
8447
|
-
segment = encode(value[j]);
|
|
8448
|
-
if (!matches[i2].test(segment)) {
|
|
8449
|
-
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
|
|
8450
|
-
}
|
|
8451
|
-
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8452
|
-
}
|
|
8453
|
-
continue;
|
|
8454
|
-
}
|
|
8455
|
-
segment = token.asterisk ? encodeAsterisk(value) : encode(value);
|
|
8456
|
-
if (!matches[i2].test(segment)) {
|
|
8457
|
-
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
|
|
8458
|
-
}
|
|
8459
|
-
path += token.prefix + segment;
|
|
8460
|
-
}
|
|
8461
|
-
return path;
|
|
8462
|
-
};
|
|
8463
|
-
}
|
|
8464
|
-
function escapeString(str) {
|
|
8465
|
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
|
|
8466
|
-
}
|
|
8467
|
-
function escapeGroup(group) {
|
|
8468
|
-
return group.replace(/([=!:$\/()])/g, "\\$1");
|
|
8469
|
-
}
|
|
8470
|
-
function attachKeys(re, keys) {
|
|
8471
|
-
re.keys = keys;
|
|
8472
|
-
return re;
|
|
8473
|
-
}
|
|
8474
|
-
function flags(options) {
|
|
8475
|
-
return options && options.sensitive ? "" : "i";
|
|
8476
|
-
}
|
|
8477
|
-
function regexpToRegexp(path, keys) {
|
|
8478
|
-
var groups = path.source.match(/\((?!\?)/g);
|
|
8479
|
-
if (groups) {
|
|
8480
|
-
for (var i = 0; i < groups.length; i++) {
|
|
8481
|
-
keys.push({
|
|
8482
|
-
name: i,
|
|
8483
|
-
prefix: null,
|
|
8484
|
-
delimiter: null,
|
|
8485
|
-
optional: false,
|
|
8486
|
-
repeat: false,
|
|
8487
|
-
partial: false,
|
|
8488
|
-
asterisk: false,
|
|
8489
|
-
pattern: null
|
|
8490
|
-
});
|
|
8491
|
-
}
|
|
8492
|
-
}
|
|
8493
|
-
return attachKeys(path, keys);
|
|
8494
|
-
}
|
|
8495
|
-
function arrayToRegexp(path, keys, options) {
|
|
8496
|
-
var parts = [];
|
|
8497
|
-
for (var i = 0; i < path.length; i++) {
|
|
8498
|
-
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
8499
|
-
}
|
|
8500
|
-
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8501
|
-
return attachKeys(regexp, keys);
|
|
8502
|
-
}
|
|
8503
|
-
function stringToRegexp(path, keys, options) {
|
|
8504
|
-
return tokensToRegExp(parse$1(path, options), keys, options);
|
|
8505
|
-
}
|
|
8506
|
-
function tokensToRegExp(tokens, keys, options) {
|
|
8507
|
-
if (!isarray(keys)) {
|
|
8508
|
-
options = keys || options;
|
|
8509
|
-
keys = [];
|
|
8510
|
-
}
|
|
8511
|
-
options = options || {};
|
|
8512
|
-
var strict = options.strict;
|
|
8513
|
-
var end = options.end !== false;
|
|
8514
|
-
var route = "";
|
|
8515
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
8516
|
-
var token = tokens[i];
|
|
8517
|
-
if (typeof token === "string") {
|
|
8518
|
-
route += escapeString(token);
|
|
8519
|
-
} else {
|
|
8520
|
-
var prefix2 = escapeString(token.prefix);
|
|
8521
|
-
var capture = "(?:" + token.pattern + ")";
|
|
8522
|
-
keys.push(token);
|
|
8523
|
-
if (token.repeat) {
|
|
8524
|
-
capture += "(?:" + prefix2 + capture + ")*";
|
|
8525
|
-
}
|
|
8526
|
-
if (token.optional) {
|
|
8527
|
-
if (!token.partial) {
|
|
8528
|
-
capture = "(?:" + prefix2 + "(" + capture + "))?";
|
|
8529
|
-
} else {
|
|
8530
|
-
capture = prefix2 + "(" + capture + ")?";
|
|
8531
|
-
}
|
|
8532
|
-
} else {
|
|
8533
|
-
capture = prefix2 + "(" + capture + ")";
|
|
8534
|
-
}
|
|
8535
|
-
route += capture;
|
|
8536
|
-
}
|
|
8537
|
-
}
|
|
8538
|
-
var delimiter = escapeString(options.delimiter || "/");
|
|
8539
|
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
8540
|
-
if (!strict) {
|
|
8541
|
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
8542
|
-
}
|
|
8543
|
-
if (end) {
|
|
8544
|
-
route += "$";
|
|
8545
|
-
} else {
|
|
8546
|
-
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
8547
|
-
}
|
|
8548
|
-
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
8549
|
-
}
|
|
8550
|
-
function pathToRegexp(path, keys, options) {
|
|
8551
|
-
if (!isarray(keys)) {
|
|
8552
|
-
options = keys || options;
|
|
8553
|
-
keys = [];
|
|
8554
|
-
}
|
|
8555
|
-
options = options || {};
|
|
8556
|
-
if (path instanceof RegExp) {
|
|
8557
|
-
return regexpToRegexp(path, keys);
|
|
8558
|
-
}
|
|
8559
|
-
if (isarray(path)) {
|
|
8560
|
-
return arrayToRegexp(path, keys, options);
|
|
8561
|
-
}
|
|
8562
|
-
return stringToRegexp(path, keys, options);
|
|
8563
|
-
}
|
|
8564
|
-
var pathToRegexp$1 = pathToRegexp$2.exports;
|
|
8565
|
-
var reactIs$1 = { exports: {} };
|
|
8566
|
-
var reactIs_production_min = {};
|
|
8567
|
-
/** @license React v16.13.1
|
|
8568
|
-
* react-is.production.min.js
|
|
8569
|
-
*
|
|
8570
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8571
|
-
*
|
|
8572
|
-
* This source code is licensed under the MIT license found in the
|
|
8573
|
-
* LICENSE file in the root directory of this source tree.
|
|
8574
|
-
*/
|
|
8575
|
-
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;
|
|
8576
|
-
function z(a) {
|
|
8577
|
-
if ("object" === typeof a && null !== a) {
|
|
8578
|
-
var u = a.$$typeof;
|
|
8579
|
-
switch (u) {
|
|
8580
|
-
case c:
|
|
8581
|
-
switch (a = a.type, a) {
|
|
8582
|
-
case l:
|
|
8583
|
-
case m:
|
|
8584
|
-
case e:
|
|
8585
|
-
case g:
|
|
8586
|
-
case f:
|
|
8587
|
-
case p:
|
|
8588
|
-
return a;
|
|
8589
|
-
default:
|
|
8590
|
-
switch (a = a && a.$$typeof, a) {
|
|
8591
|
-
case k:
|
|
8592
|
-
case n:
|
|
8593
|
-
case t:
|
|
8594
|
-
case r:
|
|
8595
|
-
case h:
|
|
8596
|
-
return a;
|
|
8597
|
-
default:
|
|
8598
|
-
return u;
|
|
8599
|
-
}
|
|
8600
|
-
}
|
|
8601
|
-
case d:
|
|
8602
|
-
return u;
|
|
8603
|
-
}
|
|
8604
|
-
}
|
|
8605
|
-
}
|
|
8606
|
-
function A(a) {
|
|
8607
|
-
return z(a) === m;
|
|
8608
|
-
}
|
|
8609
|
-
reactIs_production_min.AsyncMode = l;
|
|
8610
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
8611
|
-
reactIs_production_min.ContextConsumer = k;
|
|
8612
|
-
reactIs_production_min.ContextProvider = h;
|
|
8613
|
-
reactIs_production_min.Element = c;
|
|
8614
|
-
reactIs_production_min.ForwardRef = n;
|
|
8615
|
-
reactIs_production_min.Fragment = e;
|
|
8616
|
-
reactIs_production_min.Lazy = t;
|
|
8617
|
-
reactIs_production_min.Memo = r;
|
|
8618
|
-
reactIs_production_min.Portal = d;
|
|
8619
|
-
reactIs_production_min.Profiler = g;
|
|
8620
|
-
reactIs_production_min.StrictMode = f;
|
|
8621
|
-
reactIs_production_min.Suspense = p;
|
|
8622
|
-
reactIs_production_min.isAsyncMode = function(a) {
|
|
8623
|
-
return A(a) || z(a) === l;
|
|
8624
|
-
};
|
|
8625
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
8626
|
-
reactIs_production_min.isContextConsumer = function(a) {
|
|
8627
|
-
return z(a) === k;
|
|
8628
|
-
};
|
|
8629
|
-
reactIs_production_min.isContextProvider = function(a) {
|
|
8630
|
-
return z(a) === h;
|
|
8631
|
-
};
|
|
8632
|
-
reactIs_production_min.isElement = function(a) {
|
|
8633
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
8634
|
-
};
|
|
8635
|
-
reactIs_production_min.isForwardRef = function(a) {
|
|
8636
|
-
return z(a) === n;
|
|
8637
|
-
};
|
|
8638
|
-
reactIs_production_min.isFragment = function(a) {
|
|
8639
|
-
return z(a) === e;
|
|
8640
|
-
};
|
|
8641
|
-
reactIs_production_min.isLazy = function(a) {
|
|
8642
|
-
return z(a) === t;
|
|
8643
|
-
};
|
|
8644
|
-
reactIs_production_min.isMemo = function(a) {
|
|
8645
|
-
return z(a) === r;
|
|
8646
|
-
};
|
|
8647
|
-
reactIs_production_min.isPortal = function(a) {
|
|
8648
|
-
return z(a) === d;
|
|
8649
|
-
};
|
|
8650
|
-
reactIs_production_min.isProfiler = function(a) {
|
|
8651
|
-
return z(a) === g;
|
|
8652
|
-
};
|
|
8653
|
-
reactIs_production_min.isStrictMode = function(a) {
|
|
8654
|
-
return z(a) === f;
|
|
8655
|
-
};
|
|
8656
|
-
reactIs_production_min.isSuspense = function(a) {
|
|
8657
|
-
return z(a) === p;
|
|
8658
|
-
};
|
|
8659
|
-
reactIs_production_min.isValidElementType = function(a) {
|
|
8660
|
-
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);
|
|
8661
|
-
};
|
|
8662
|
-
reactIs_production_min.typeOf = z;
|
|
8663
|
-
{
|
|
8664
|
-
reactIs$1.exports = reactIs_production_min;
|
|
8665
|
-
}
|
|
8666
|
-
var reactIs = reactIs$1.exports;
|
|
8667
|
-
var FORWARD_REF_STATICS = {
|
|
8668
|
-
"$$typeof": true,
|
|
8669
|
-
render: true,
|
|
8670
|
-
defaultProps: true,
|
|
8671
|
-
displayName: true,
|
|
8672
|
-
propTypes: true
|
|
8673
|
-
};
|
|
8674
|
-
var MEMO_STATICS = {
|
|
8675
|
-
"$$typeof": true,
|
|
8676
|
-
compare: true,
|
|
8677
|
-
defaultProps: true,
|
|
8678
|
-
displayName: true,
|
|
8679
|
-
propTypes: true,
|
|
8680
|
-
type: true
|
|
8681
|
-
};
|
|
8682
|
-
var TYPE_STATICS = {};
|
|
8683
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
8684
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
8685
|
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
8686
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
8687
|
-
function getUniqueId() {
|
|
8688
|
-
var key = "__global_unique_id__";
|
|
8689
|
-
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
8690
|
-
}
|
|
8691
|
-
function objectIs(x2, y2) {
|
|
8692
|
-
if (x2 === y2) {
|
|
8693
|
-
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
8694
|
-
} else {
|
|
8695
|
-
return x2 !== x2 && y2 !== y2;
|
|
8696
|
-
}
|
|
8697
|
-
}
|
|
8698
|
-
function createEventEmitter(value) {
|
|
8699
|
-
var handlers = [];
|
|
8700
|
-
return {
|
|
8701
|
-
on: function on(handler) {
|
|
8702
|
-
handlers.push(handler);
|
|
8703
|
-
},
|
|
8704
|
-
off: function off(handler) {
|
|
8705
|
-
handlers = handlers.filter(function(h2) {
|
|
8706
|
-
return h2 !== handler;
|
|
8707
|
-
});
|
|
8708
|
-
},
|
|
8709
|
-
get: function get() {
|
|
8710
|
-
return value;
|
|
8711
|
-
},
|
|
8712
|
-
set: function set(newValue, changedBits) {
|
|
8713
|
-
value = newValue;
|
|
8714
|
-
handlers.forEach(function(handler) {
|
|
8715
|
-
return handler(value, changedBits);
|
|
8716
|
-
});
|
|
8717
|
-
}
|
|
8718
|
-
};
|
|
8719
|
-
}
|
|
8720
|
-
function onlyChild(children) {
|
|
8721
|
-
return Array.isArray(children) ? children[0] : children;
|
|
8722
|
-
}
|
|
8723
|
-
function createReactContext(defaultValue, calculateChangedBits) {
|
|
8724
|
-
var _Provider$childContex, _Consumer$contextType;
|
|
8725
|
-
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
8726
|
-
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
8727
|
-
_inheritsLoose(Provider2, _React$Component);
|
|
8728
|
-
function Provider2() {
|
|
8729
|
-
var _this;
|
|
8730
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8731
|
-
args[_key] = arguments[_key];
|
|
8732
|
-
}
|
|
8733
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8734
|
-
_this.emitter = createEventEmitter(_this.props.value);
|
|
8735
|
-
return _this;
|
|
8736
|
-
}
|
|
8737
|
-
var _proto = Provider2.prototype;
|
|
8738
|
-
_proto.getChildContext = function getChildContext() {
|
|
8739
|
-
var _ref;
|
|
8740
|
-
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
8741
|
-
};
|
|
8742
|
-
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8743
|
-
if (this.props.value !== nextProps.value) {
|
|
8744
|
-
var oldValue = this.props.value;
|
|
8745
|
-
var newValue = nextProps.value;
|
|
8746
|
-
var changedBits;
|
|
8747
|
-
if (objectIs(oldValue, newValue)) {
|
|
8748
|
-
changedBits = 0;
|
|
8749
|
-
} else {
|
|
8750
|
-
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
8751
|
-
changedBits |= 0;
|
|
8752
|
-
if (changedBits !== 0) {
|
|
8753
|
-
this.emitter.set(nextProps.value, changedBits);
|
|
8754
|
-
}
|
|
8755
|
-
}
|
|
8756
|
-
}
|
|
8757
|
-
};
|
|
8758
|
-
_proto.render = function render() {
|
|
8759
|
-
return this.props.children;
|
|
8760
|
-
};
|
|
8761
|
-
return Provider2;
|
|
8762
|
-
}(React__default["default"].Component);
|
|
8763
|
-
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
8764
|
-
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
8765
|
-
_inheritsLoose(Consumer2, _React$Component2);
|
|
8766
|
-
function Consumer2() {
|
|
8767
|
-
var _this2;
|
|
8768
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
8769
|
-
args[_key2] = arguments[_key2];
|
|
8770
|
-
}
|
|
8771
|
-
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
8772
|
-
_this2.observedBits = void 0;
|
|
8773
|
-
_this2.state = {
|
|
8774
|
-
value: _this2.getValue()
|
|
8775
|
-
};
|
|
8776
|
-
_this2.onUpdate = function(newValue, changedBits) {
|
|
8777
|
-
var observedBits = _this2.observedBits | 0;
|
|
8778
|
-
if ((observedBits & changedBits) !== 0) {
|
|
8779
|
-
_this2.setState({
|
|
8780
|
-
value: _this2.getValue()
|
|
8781
|
-
});
|
|
8782
|
-
}
|
|
8783
|
-
};
|
|
8784
|
-
return _this2;
|
|
8785
|
-
}
|
|
8786
|
-
var _proto2 = Consumer2.prototype;
|
|
8787
|
-
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8788
|
-
var observedBits = nextProps.observedBits;
|
|
8789
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8790
|
-
};
|
|
8791
|
-
_proto2.componentDidMount = function componentDidMount() {
|
|
8792
|
-
if (this.context[contextProp]) {
|
|
8793
|
-
this.context[contextProp].on(this.onUpdate);
|
|
8794
|
-
}
|
|
8795
|
-
var observedBits = this.props.observedBits;
|
|
8796
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8797
|
-
};
|
|
8798
|
-
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
8799
|
-
if (this.context[contextProp]) {
|
|
8800
|
-
this.context[contextProp].off(this.onUpdate);
|
|
8801
|
-
}
|
|
8802
|
-
};
|
|
8803
|
-
_proto2.getValue = function getValue() {
|
|
8804
|
-
if (this.context[contextProp]) {
|
|
8805
|
-
return this.context[contextProp].get();
|
|
8806
|
-
} else {
|
|
8807
|
-
return defaultValue;
|
|
8808
|
-
}
|
|
8809
|
-
};
|
|
8810
|
-
_proto2.render = function render() {
|
|
8811
|
-
return onlyChild(this.props.children)(this.state.value);
|
|
8812
|
-
};
|
|
8813
|
-
return Consumer2;
|
|
8814
|
-
}(React__default["default"].Component);
|
|
8815
|
-
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
8816
|
-
return {
|
|
8817
|
-
Provider,
|
|
8818
|
-
Consumer
|
|
8819
|
-
};
|
|
8820
|
-
}
|
|
8821
|
-
var createContext = React__default["default"].createContext || createReactContext;
|
|
8822
|
-
var createNamedContext = function createNamedContext2(name) {
|
|
8823
|
-
var context2 = createContext();
|
|
8824
|
-
context2.displayName = name;
|
|
8825
|
-
return context2;
|
|
8826
|
-
};
|
|
8827
|
-
var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
|
|
8828
|
-
var context = /* @__PURE__ */ createNamedContext("Router");
|
|
8829
|
-
var Router = /* @__PURE__ */ function(_React$Component) {
|
|
8830
|
-
_inheritsLoose(Router2, _React$Component);
|
|
8831
|
-
Router2.computeRootMatch = function computeRootMatch(pathname) {
|
|
8832
|
-
return {
|
|
8833
|
-
path: "/",
|
|
8834
|
-
url: "/",
|
|
8835
|
-
params: {},
|
|
8836
|
-
isExact: pathname === "/"
|
|
8837
|
-
};
|
|
8838
|
-
};
|
|
8839
|
-
function Router2(props) {
|
|
8840
|
-
var _this;
|
|
8841
|
-
_this = _React$Component.call(this, props) || this;
|
|
8842
|
-
_this.state = {
|
|
8843
|
-
location: props.history.location
|
|
8844
|
-
};
|
|
8845
|
-
_this._isMounted = false;
|
|
8846
|
-
_this._pendingLocation = null;
|
|
8847
|
-
if (!props.staticContext) {
|
|
8848
|
-
_this.unlisten = props.history.listen(function(location) {
|
|
8849
|
-
_this._pendingLocation = location;
|
|
8850
|
-
});
|
|
8851
|
-
}
|
|
8852
|
-
return _this;
|
|
8853
|
-
}
|
|
8854
|
-
var _proto = Router2.prototype;
|
|
8855
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
8856
|
-
var _this2 = this;
|
|
8857
|
-
this._isMounted = true;
|
|
8858
|
-
if (this.unlisten) {
|
|
8859
|
-
this.unlisten();
|
|
8860
|
-
}
|
|
8861
|
-
if (!this.props.staticContext) {
|
|
8862
|
-
this.unlisten = this.props.history.listen(function(location) {
|
|
8863
|
-
if (_this2._isMounted) {
|
|
8864
|
-
_this2.setState({
|
|
8865
|
-
location
|
|
8866
|
-
});
|
|
8867
|
-
}
|
|
8868
|
-
});
|
|
8869
|
-
}
|
|
8870
|
-
if (this._pendingLocation) {
|
|
8871
|
-
this.setState({
|
|
8872
|
-
location: this._pendingLocation
|
|
8873
|
-
});
|
|
8874
|
-
}
|
|
8875
|
-
};
|
|
8876
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8877
|
-
if (this.unlisten) {
|
|
8878
|
-
this.unlisten();
|
|
8879
|
-
this._isMounted = false;
|
|
8880
|
-
this._pendingLocation = null;
|
|
8881
|
-
}
|
|
8882
|
-
};
|
|
8883
|
-
_proto.render = function render() {
|
|
8884
|
-
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
8885
|
-
value: {
|
|
8886
|
-
history: this.props.history,
|
|
8887
|
-
location: this.state.location,
|
|
8888
|
-
match: Router2.computeRootMatch(this.state.location.pathname),
|
|
8889
|
-
staticContext: this.props.staticContext
|
|
8890
|
-
}
|
|
8891
|
-
}, /* @__PURE__ */ React__default["default"].createElement(historyContext.Provider, {
|
|
8892
|
-
children: this.props.children || null,
|
|
8893
|
-
value: this.props.history
|
|
8894
|
-
}));
|
|
8895
|
-
};
|
|
8896
|
-
return Router2;
|
|
8897
|
-
}(React__default["default"].Component);
|
|
8898
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
8899
|
-
_inheritsLoose(MemoryRouter, _React$Component);
|
|
8900
|
-
function MemoryRouter() {
|
|
8901
|
-
var _this;
|
|
8902
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8903
|
-
args[_key] = arguments[_key];
|
|
8904
|
-
}
|
|
8905
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8906
|
-
_this.history = createMemoryHistory(_this.props);
|
|
8907
|
-
return _this;
|
|
8908
|
-
}
|
|
8909
|
-
var _proto = MemoryRouter.prototype;
|
|
8910
|
-
_proto.render = function render() {
|
|
8911
|
-
return /* @__PURE__ */ React__default["default"].createElement(Router, {
|
|
8912
|
-
history: this.history,
|
|
8913
|
-
children: this.props.children
|
|
8914
|
-
});
|
|
8915
|
-
};
|
|
8916
|
-
return MemoryRouter;
|
|
8917
|
-
})(React__default["default"].Component);
|
|
8918
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
8919
|
-
_inheritsLoose(Lifecycle, _React$Component);
|
|
8920
|
-
function Lifecycle() {
|
|
8921
|
-
return _React$Component.apply(this, arguments) || this;
|
|
8922
|
-
}
|
|
8923
|
-
var _proto = Lifecycle.prototype;
|
|
8924
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
8925
|
-
if (this.props.onMount)
|
|
8926
|
-
this.props.onMount.call(this, this);
|
|
8927
|
-
};
|
|
8928
|
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
8929
|
-
if (this.props.onUpdate)
|
|
8930
|
-
this.props.onUpdate.call(this, this, prevProps);
|
|
8931
|
-
};
|
|
8932
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8933
|
-
if (this.props.onUnmount)
|
|
8934
|
-
this.props.onUnmount.call(this, this);
|
|
8935
|
-
};
|
|
8936
|
-
_proto.render = function render() {
|
|
8937
|
-
return null;
|
|
8938
|
-
};
|
|
8939
|
-
return Lifecycle;
|
|
8940
|
-
})(React__default["default"].Component);
|
|
8941
|
-
var cache$1 = {};
|
|
8942
|
-
var cacheLimit$1 = 1e4;
|
|
8943
|
-
var cacheCount$1 = 0;
|
|
8944
|
-
function compilePath$1(path, options) {
|
|
8945
|
-
var cacheKey2 = "" + options.end + options.strict + options.sensitive;
|
|
8946
|
-
var pathCache = cache$1[cacheKey2] || (cache$1[cacheKey2] = {});
|
|
8947
|
-
if (pathCache[path])
|
|
8948
|
-
return pathCache[path];
|
|
8949
|
-
var keys = [];
|
|
8950
|
-
var regexp = pathToRegexp$1(path, keys, options);
|
|
8951
|
-
var result = {
|
|
8952
|
-
regexp,
|
|
8953
|
-
keys
|
|
8954
|
-
};
|
|
8955
|
-
if (cacheCount$1 < cacheLimit$1) {
|
|
8956
|
-
pathCache[path] = result;
|
|
8957
|
-
cacheCount$1++;
|
|
8958
|
-
}
|
|
8959
|
-
return result;
|
|
8960
|
-
}
|
|
8961
|
-
function matchPath(pathname, options) {
|
|
8962
|
-
if (options === void 0) {
|
|
8963
|
-
options = {};
|
|
8964
|
-
}
|
|
8965
|
-
if (typeof options === "string" || Array.isArray(options)) {
|
|
8966
|
-
options = {
|
|
8967
|
-
path: options
|
|
8968
|
-
};
|
|
8969
|
-
}
|
|
8970
|
-
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;
|
|
8971
|
-
var paths = [].concat(path);
|
|
8972
|
-
return paths.reduce(function(matched, path2) {
|
|
8973
|
-
if (!path2 && path2 !== "")
|
|
8974
|
-
return null;
|
|
8975
|
-
if (matched)
|
|
8976
|
-
return matched;
|
|
8977
|
-
var _compilePath = compilePath$1(path2, {
|
|
8978
|
-
end: exact,
|
|
8979
|
-
strict,
|
|
8980
|
-
sensitive
|
|
8981
|
-
}), regexp = _compilePath.regexp, keys = _compilePath.keys;
|
|
8982
|
-
var match = regexp.exec(pathname);
|
|
8983
|
-
if (!match)
|
|
8984
|
-
return null;
|
|
8985
|
-
var url = match[0], values = match.slice(1);
|
|
8986
|
-
var isExact = pathname === url;
|
|
8987
|
-
if (exact && !isExact)
|
|
8988
|
-
return null;
|
|
8989
|
-
return {
|
|
8990
|
-
path: path2,
|
|
8991
|
-
url: path2 === "/" && url === "" ? "/" : url,
|
|
8992
|
-
isExact,
|
|
8993
|
-
params: keys.reduce(function(memo, key, index) {
|
|
8994
|
-
memo[key.name] = values[index];
|
|
8995
|
-
return memo;
|
|
8996
|
-
}, {})
|
|
8997
|
-
};
|
|
8998
|
-
}, null);
|
|
8999
|
-
}
|
|
9000
|
-
function isEmptyChildren(children) {
|
|
9001
|
-
return React__default["default"].Children.count(children) === 0;
|
|
9002
|
-
}
|
|
9003
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
9004
|
-
_inheritsLoose(Route, _React$Component);
|
|
9005
|
-
function Route() {
|
|
9006
|
-
return _React$Component.apply(this, arguments) || this;
|
|
9007
|
-
}
|
|
9008
|
-
var _proto = Route.prototype;
|
|
9009
|
-
_proto.render = function render() {
|
|
9010
|
-
var _this = this;
|
|
9011
|
-
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context$1) {
|
|
9012
|
-
!context$1 ? invariant(false) : void 0;
|
|
9013
|
-
var location = _this.props.location || context$1.location;
|
|
9014
|
-
var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
|
9015
|
-
var props = _extends$3({}, context$1, {
|
|
9016
|
-
location,
|
|
9017
|
-
match
|
|
9018
|
-
});
|
|
9019
|
-
var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
|
|
9020
|
-
if (Array.isArray(children) && isEmptyChildren(children)) {
|
|
9021
|
-
children = null;
|
|
9022
|
-
}
|
|
9023
|
-
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
9024
|
-
value: props
|
|
9025
|
-
}, 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);
|
|
9026
|
-
});
|
|
9027
|
-
};
|
|
9028
|
-
return Route;
|
|
9029
|
-
})(React__default["default"].Component);
|
|
9030
|
-
function addLeadingSlash(path) {
|
|
9031
|
-
return path.charAt(0) === "/" ? path : "/" + path;
|
|
9032
|
-
}
|
|
9033
|
-
function addBasename(basename, location) {
|
|
9034
|
-
if (!basename)
|
|
9035
|
-
return location;
|
|
9036
|
-
return _extends$3({}, location, {
|
|
9037
|
-
pathname: addLeadingSlash(basename) + location.pathname
|
|
9038
|
-
});
|
|
9039
|
-
}
|
|
9040
|
-
function stripBasename(basename, location) {
|
|
9041
|
-
if (!basename)
|
|
9042
|
-
return location;
|
|
9043
|
-
var base = addLeadingSlash(basename);
|
|
9044
|
-
if (location.pathname.indexOf(base) !== 0)
|
|
9045
|
-
return location;
|
|
9046
|
-
return _extends$3({}, location, {
|
|
9047
|
-
pathname: location.pathname.substr(base.length)
|
|
9048
|
-
});
|
|
9049
|
-
}
|
|
9050
|
-
function createURL(location) {
|
|
9051
|
-
return typeof location === "string" ? location : createPath(location);
|
|
9052
|
-
}
|
|
9053
|
-
function staticHandler(methodName) {
|
|
9054
|
-
return function() {
|
|
9055
|
-
invariant(false);
|
|
9056
|
-
};
|
|
9057
|
-
}
|
|
9058
|
-
function noop$2() {
|
|
9059
|
-
}
|
|
9060
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
9061
|
-
_inheritsLoose(StaticRouter, _React$Component);
|
|
9062
|
-
function StaticRouter() {
|
|
9063
|
-
var _this;
|
|
9064
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9065
|
-
args[_key] = arguments[_key];
|
|
9066
|
-
}
|
|
9067
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
9068
|
-
_this.handlePush = function(location) {
|
|
9069
|
-
return _this.navigateTo(location, "PUSH");
|
|
9070
|
-
};
|
|
9071
|
-
_this.handleReplace = function(location) {
|
|
9072
|
-
return _this.navigateTo(location, "REPLACE");
|
|
9073
|
-
};
|
|
9074
|
-
_this.handleListen = function() {
|
|
9075
|
-
return noop$2;
|
|
9076
|
-
};
|
|
9077
|
-
_this.handleBlock = function() {
|
|
9078
|
-
return noop$2;
|
|
9079
|
-
};
|
|
9080
|
-
return _this;
|
|
9081
|
-
}
|
|
9082
|
-
var _proto = StaticRouter.prototype;
|
|
9083
|
-
_proto.navigateTo = function navigateTo(location, action) {
|
|
9084
|
-
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;
|
|
9085
|
-
context2.action = action;
|
|
9086
|
-
context2.location = addBasename(basename, createLocation(location));
|
|
9087
|
-
context2.url = createURL(context2.location);
|
|
9088
|
-
};
|
|
9089
|
-
_proto.render = function render() {
|
|
9090
|
-
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"]);
|
|
9091
|
-
var history = {
|
|
9092
|
-
createHref: function createHref(path) {
|
|
9093
|
-
return addLeadingSlash(basename + createURL(path));
|
|
9094
|
-
},
|
|
9095
|
-
action: "POP",
|
|
9096
|
-
location: stripBasename(basename, createLocation(location)),
|
|
9097
|
-
push: this.handlePush,
|
|
9098
|
-
replace: this.handleReplace,
|
|
9099
|
-
go: staticHandler(),
|
|
9100
|
-
goBack: staticHandler(),
|
|
9101
|
-
goForward: staticHandler(),
|
|
9102
|
-
listen: this.handleListen,
|
|
9103
|
-
block: this.handleBlock
|
|
9104
|
-
};
|
|
9105
|
-
return /* @__PURE__ */ React__default["default"].createElement(Router, _extends$3({}, rest, {
|
|
9106
|
-
history,
|
|
9107
|
-
staticContext: context2
|
|
9108
|
-
}));
|
|
9109
|
-
};
|
|
9110
|
-
return StaticRouter;
|
|
9111
|
-
})(React__default["default"].Component);
|
|
9112
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
9113
|
-
_inheritsLoose(Switch2, _React$Component);
|
|
9114
|
-
function Switch2() {
|
|
9115
|
-
return _React$Component.apply(this, arguments) || this;
|
|
9116
|
-
}
|
|
9117
|
-
var _proto = Switch2.prototype;
|
|
9118
|
-
_proto.render = function render() {
|
|
9119
|
-
var _this = this;
|
|
9120
|
-
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context2) {
|
|
9121
|
-
!context2 ? invariant(false) : void 0;
|
|
9122
|
-
var location = _this.props.location || context2.location;
|
|
9123
|
-
var element, match;
|
|
9124
|
-
React__default["default"].Children.forEach(_this.props.children, function(child) {
|
|
9125
|
-
if (match == null && /* @__PURE__ */ React__default["default"].isValidElement(child)) {
|
|
9126
|
-
element = child;
|
|
9127
|
-
var path = child.props.path || child.props.from;
|
|
9128
|
-
match = path ? matchPath(location.pathname, _extends$3({}, child.props, {
|
|
9129
|
-
path
|
|
9130
|
-
})) : context2.match;
|
|
9131
|
-
}
|
|
9132
|
-
});
|
|
9133
|
-
return match ? /* @__PURE__ */ React__default["default"].cloneElement(element, {
|
|
9134
|
-
location,
|
|
9135
|
-
computedMatch: match
|
|
9136
|
-
}) : null;
|
|
9137
|
-
});
|
|
9138
|
-
};
|
|
9139
|
-
return Switch2;
|
|
9140
|
-
})(React__default["default"].Component);
|
|
9141
|
-
var useContext = React__default["default"].useContext;
|
|
9142
|
-
function useHistory() {
|
|
9143
|
-
return useContext(historyContext);
|
|
9144
|
-
}
|
|
9145
|
-
const defaultProps$J = {
|
|
9146
|
-
...ComponentDefaults,
|
|
9147
|
-
title: null,
|
|
9148
|
-
subTitle: null,
|
|
9149
|
-
desc: "",
|
|
9150
|
-
descTextAlign: "right",
|
|
9151
|
-
isLink: false,
|
|
9152
|
-
icon: "",
|
|
9153
|
-
roundRadius: "6px",
|
|
9154
|
-
url: "",
|
|
9155
|
-
to: "",
|
|
9156
|
-
replace: false,
|
|
9157
|
-
center: false,
|
|
9158
|
-
size: "",
|
|
9159
|
-
className: "",
|
|
9160
|
-
iconSlot: null,
|
|
9161
|
-
linkSlot: null,
|
|
9162
|
-
click: (event) => {
|
|
9163
|
-
},
|
|
9164
|
-
onClick: (event) => {
|
|
9165
|
-
}
|
|
9166
|
-
};
|
|
9167
|
-
const Cell = (props) => {
|
|
9168
|
-
const {
|
|
9169
|
-
children,
|
|
9170
|
-
click,
|
|
9171
|
-
onClick,
|
|
9172
|
-
title,
|
|
9173
|
-
subTitle,
|
|
9174
|
-
desc,
|
|
9175
|
-
descTextAlign,
|
|
9176
|
-
isLink,
|
|
9177
|
-
icon,
|
|
9178
|
-
roundRadius,
|
|
9179
|
-
url,
|
|
9180
|
-
to: to2,
|
|
9181
|
-
replace,
|
|
9182
|
-
center,
|
|
9183
|
-
size,
|
|
9184
|
-
className,
|
|
9185
|
-
iconSlot,
|
|
9186
|
-
linkSlot,
|
|
9187
|
-
iconClassPrefix,
|
|
9188
|
-
iconFontClassName,
|
|
9189
|
-
...rest
|
|
9190
|
-
} = {
|
|
9191
|
-
...defaultProps$J,
|
|
9192
|
-
...props
|
|
9193
|
-
};
|
|
9194
|
-
const b2 = cn("cell");
|
|
9195
|
-
const history = useHistory();
|
|
9196
|
-
const handleClick2 = (event) => {
|
|
9197
|
-
click(event);
|
|
9198
|
-
onClick(event);
|
|
9199
|
-
if (to2 && history) {
|
|
9200
|
-
history[replace ? "replace" : "push"](to2);
|
|
9201
|
-
} else if (url) {
|
|
9202
|
-
replace ? window.location.replace(url) : window.location.href = url;
|
|
9203
|
-
}
|
|
9204
|
-
};
|
|
9205
|
-
const baseStyle = {
|
|
9206
|
-
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
9207
|
-
};
|
|
9208
|
-
const styles = title || subTitle || icon ? {} : {
|
|
9209
|
-
textAlign: descTextAlign,
|
|
9210
|
-
flex: 1
|
|
9211
|
-
};
|
|
9212
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9213
|
-
className: `${b2(
|
|
9214
|
-
{ clickable: !!(isLink || to2), center, large: size === "large" },
|
|
9215
|
-
[className]
|
|
9216
|
-
)} `,
|
|
9217
|
-
onClick: (event) => handleClick2(event),
|
|
9218
|
-
style: baseStyle,
|
|
9219
|
-
...rest
|
|
9220
|
-
}, children || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9221
|
-
className: b2("icon")
|
|
9222
|
-
}, iconSlot || (icon ? /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
9223
|
-
classPrefix: iconClassPrefix,
|
|
9224
|
-
fontClassName: iconFontClassName,
|
|
9225
|
-
name: icon,
|
|
9226
|
-
className: "icon"
|
|
9227
|
-
}) : null)) : null, title || subTitle ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9228
|
-
className: `${b2("title")}`
|
|
9229
|
-
}, title ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9230
|
-
className: b2("maintitle")
|
|
9231
|
-
}, title) : null, subTitle ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9232
|
-
className: b2("subtitle")
|
|
9233
|
-
}, subTitle) : null) : null, desc ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9234
|
-
className: b2("value", {
|
|
9235
|
-
alone: !title && !subTitle
|
|
9236
|
-
}),
|
|
9237
|
-
style: styles
|
|
9238
|
-
}, desc) : null, !linkSlot && (isLink || to2) ? /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
9239
|
-
classPrefix: iconClassPrefix,
|
|
9240
|
-
fontClassName: iconFontClassName,
|
|
9241
|
-
name: "right",
|
|
9242
|
-
className: b2("link")
|
|
9243
|
-
}) : linkSlot));
|
|
9244
|
-
};
|
|
9245
|
-
Cell.defaultProps = defaultProps$J;
|
|
9246
|
-
Cell.displayName = "NutCell";
|
|
9247
|
-
const defaultProps$I = {
|
|
9248
|
-
...ComponentDefaults,
|
|
9249
|
-
name: "",
|
|
9250
|
-
label: "",
|
|
9251
|
-
className: "",
|
|
9252
|
-
rules: [{ required: false, message: "" }],
|
|
9253
|
-
disabled: false,
|
|
9254
|
-
labelWidth: 90,
|
|
9255
|
-
errorMessageAlign: "left",
|
|
9256
|
-
showErrorLine: true,
|
|
9257
|
-
showErrorMessage: true
|
|
9258
|
-
};
|
|
9259
|
-
class FormItem extends React__default["default"].Component {
|
|
9260
|
-
constructor() {
|
|
9261
|
-
super(...arguments);
|
|
9262
|
-
this.getControlled = (children) => {
|
|
9263
|
-
const { getFieldValue, setFieldsValue } = this.context;
|
|
9264
|
-
const { name } = this.props;
|
|
9265
|
-
const type = children.type.NAME;
|
|
9266
|
-
return {
|
|
9267
|
-
value: getFieldValue(name),
|
|
9268
|
-
onChange: (event) => {
|
|
9269
|
-
let newValue = event;
|
|
9270
|
-
switch (type) {
|
|
9271
|
-
case "checkbox":
|
|
9272
|
-
newValue = event.target.value;
|
|
9273
|
-
break;
|
|
9274
|
-
}
|
|
9275
|
-
setFieldsValue({ [name]: newValue });
|
|
9276
|
-
}
|
|
9277
|
-
};
|
|
9278
|
-
};
|
|
9279
|
-
this.onStoreChange = () => {
|
|
9280
|
-
this.forceUpdate();
|
|
9281
|
-
};
|
|
9282
|
-
this.renderLayout = (childNode) => {
|
|
9283
|
-
var _a, _b;
|
|
9284
|
-
const {
|
|
9285
|
-
label,
|
|
9286
|
-
name,
|
|
9287
|
-
rules = [{ required: false, message: "" }],
|
|
9288
|
-
className,
|
|
9289
|
-
labelWidth,
|
|
9290
|
-
errorMessageAlign,
|
|
9291
|
-
showErrorLine,
|
|
9292
|
-
showErrorMessage
|
|
9293
|
-
} = {
|
|
9294
|
-
...defaultProps$I,
|
|
9295
|
-
...this.props
|
|
9296
|
-
};
|
|
9297
|
-
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
9298
|
-
return item2.field === name;
|
|
9299
|
-
}));
|
|
9300
|
-
const { starPositon } = this.context;
|
|
9301
|
-
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
9302
|
-
className: "required"
|
|
9303
|
-
});
|
|
9304
|
-
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);
|
|
9305
|
-
return /* @__PURE__ */ React__default["default"].createElement(Cell, {
|
|
9306
|
-
className: `nut-form-item ${className}`
|
|
9307
|
-
}, label ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9308
|
-
className: "nut-cell__title nut-form-item__label",
|
|
9309
|
-
style: {
|
|
9310
|
-
width: this.pxCheck(labelWidth)
|
|
9311
|
-
}
|
|
9312
|
-
}, renderLabel) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9313
|
-
className: "nut-cell__value nut-form-item__body"
|
|
9314
|
-
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9315
|
-
className: "nut-form-item__body__slots"
|
|
9316
|
-
}, childNode), item.length > 0 && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9317
|
-
className: "nut-form-item__body__tips",
|
|
9318
|
-
style: { textAlign: errorMessageAlign }
|
|
9319
|
-
}, item[0].message)));
|
|
9320
|
-
};
|
|
9321
|
-
this.pxCheck = (value) => {
|
|
9322
|
-
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
9323
|
-
};
|
|
9324
|
-
}
|
|
9325
|
-
componentDidMount() {
|
|
9326
|
-
this.cancelRegister = this.context.registerField(this);
|
|
9327
|
-
}
|
|
9328
|
-
componentWillUnmount() {
|
|
9329
|
-
if (this.cancelRegister) {
|
|
9330
|
-
this.cancelRegister();
|
|
9331
|
-
}
|
|
9332
|
-
}
|
|
9333
|
-
render() {
|
|
9334
|
-
const { children } = this.props;
|
|
9335
|
-
const c6 = Array.isArray(children) ? children[0] : children;
|
|
9336
|
-
const returnChildNode = React__default["default"].cloneElement(
|
|
9337
|
-
c6,
|
|
9338
|
-
this.getControlled(c6)
|
|
9339
|
-
);
|
|
9340
|
-
return this.renderLayout(returnChildNode);
|
|
8076
|
+
render() {
|
|
8077
|
+
const { children } = this.props;
|
|
8078
|
+
const c = Array.isArray(children) ? children[0] : children;
|
|
8079
|
+
const returnChildNode = React__default["default"].cloneElement(
|
|
8080
|
+
c,
|
|
8081
|
+
this.getControlled(c)
|
|
8082
|
+
);
|
|
8083
|
+
return this.renderLayout(returnChildNode);
|
|
9341
8084
|
}
|
|
9342
8085
|
}
|
|
9343
8086
|
FormItem.defaultProps = defaultProps$I;
|
|
@@ -9537,10 +8280,10 @@
|
|
|
9537
8280
|
e2.preventDefault();
|
|
9538
8281
|
if (e2.touches.length === 1 && dragRef.current) {
|
|
9539
8282
|
const touch = e2.touches[0];
|
|
9540
|
-
const
|
|
9541
|
-
const
|
|
9542
|
-
translateX.current =
|
|
9543
|
-
translateY.current =
|
|
8283
|
+
const x = touch.clientX - axisCache.current.x;
|
|
8284
|
+
const y = touch.clientY - axisCache.current.y;
|
|
8285
|
+
translateX.current = x + transformCache.current.x;
|
|
8286
|
+
translateY.current = y + transformCache.current.y;
|
|
9544
8287
|
if (translateX.current < boundaryState.left) {
|
|
9545
8288
|
translateX.current = boundaryState.left;
|
|
9546
8289
|
} else if (translateX.current > boundaryState.right) {
|
|
@@ -9811,7 +8554,7 @@
|
|
|
9811
8554
|
const scrollTop = React.useRef(0);
|
|
9812
8555
|
const direction = React.useRef("down");
|
|
9813
8556
|
const isTouching = React.useRef(false);
|
|
9814
|
-
const
|
|
8557
|
+
const y = React.useRef(0);
|
|
9815
8558
|
const refreshMaxH = React.useRef(0);
|
|
9816
8559
|
const distance = React.useRef(0);
|
|
9817
8560
|
const b2 = cn("infiniteloading");
|
|
@@ -9870,12 +8613,12 @@
|
|
|
9870
8613
|
};
|
|
9871
8614
|
const touchStart = (event) => {
|
|
9872
8615
|
if (scrollTop.current == 0 && !isTouching.current && isOpenRefresh) {
|
|
9873
|
-
|
|
8616
|
+
y.current = event.touches[0].pageY;
|
|
9874
8617
|
isTouching.current = true;
|
|
9875
8618
|
}
|
|
9876
8619
|
};
|
|
9877
8620
|
const touchMove = (event) => {
|
|
9878
|
-
distance.current = event.touches[0].pageY -
|
|
8621
|
+
distance.current = event.touches[0].pageY - y.current;
|
|
9879
8622
|
if (distance.current > 0 && isTouching.current) {
|
|
9880
8623
|
event.preventDefault();
|
|
9881
8624
|
setTopDisScoll(distance.current);
|
|
@@ -10144,11 +8887,11 @@
|
|
|
10144
8887
|
const onTouchStart = async (event) => {
|
|
10145
8888
|
if (leftWrapper.current) {
|
|
10146
8889
|
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
10147
|
-
setActionWidth((
|
|
8890
|
+
setActionWidth((v) => ({ ...v, left: leftRect.width }));
|
|
10148
8891
|
}
|
|
10149
8892
|
if (rightWrapper.current) {
|
|
10150
8893
|
const rightRect = await getRectByTaro(rightWrapper.current);
|
|
10151
|
-
setActionWidth((
|
|
8894
|
+
setActionWidth((v) => ({ ...v, right: rightRect.width }));
|
|
10152
8895
|
}
|
|
10153
8896
|
if (!props.disabled) {
|
|
10154
8897
|
startOffset.current = state.offset;
|
|
@@ -10177,7 +8920,7 @@
|
|
|
10177
8920
|
};
|
|
10178
8921
|
const onTouchEnd = () => {
|
|
10179
8922
|
if (state.dragging) {
|
|
10180
|
-
setState((
|
|
8923
|
+
setState((v) => ({ ...v, dragging: false }));
|
|
10181
8924
|
toggle(state.offset > 0 ? "left" : "right");
|
|
10182
8925
|
setTimeout(() => {
|
|
10183
8926
|
lockClick.current = false;
|
|
@@ -10201,7 +8944,7 @@
|
|
|
10201
8944
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
10202
8945
|
const name = props.name;
|
|
10203
8946
|
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
10204
|
-
setState((
|
|
8947
|
+
setState((v) => ({ ...v, offset: Number(offset) || 0 }));
|
|
10205
8948
|
};
|
|
10206
8949
|
const close = (position) => {
|
|
10207
8950
|
var _a;
|
|
@@ -10212,7 +8955,7 @@
|
|
|
10212
8955
|
position: position || "left"
|
|
10213
8956
|
});
|
|
10214
8957
|
}
|
|
10215
|
-
setState((
|
|
8958
|
+
setState((v) => ({ ...v, offset: 0 }));
|
|
10216
8959
|
};
|
|
10217
8960
|
const rangeCalculation = (num, min, max) => {
|
|
10218
8961
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
@@ -10271,14 +9014,14 @@
|
|
|
10271
9014
|
});
|
|
10272
9015
|
Swipe.defaultProps = defaultProps$A;
|
|
10273
9016
|
Swipe.displayName = "NutSwipe";
|
|
10274
|
-
function clamp(
|
|
10275
|
-
return Math.max(min, Math.min(
|
|
9017
|
+
function clamp(v, min, max) {
|
|
9018
|
+
return Math.max(min, Math.min(v, max));
|
|
10276
9019
|
}
|
|
10277
9020
|
const V = {
|
|
10278
|
-
toVector(
|
|
10279
|
-
if (
|
|
10280
|
-
|
|
10281
|
-
return Array.isArray(
|
|
9021
|
+
toVector(v, fallback) {
|
|
9022
|
+
if (v === void 0)
|
|
9023
|
+
v = fallback;
|
|
9024
|
+
return Array.isArray(v) ? v : [v, v];
|
|
10282
9025
|
},
|
|
10283
9026
|
add(v1, v2) {
|
|
10284
9027
|
return [v1[0] + v2[0], v1[1] + v2[1]];
|
|
@@ -10457,11 +9200,11 @@
|
|
|
10457
9200
|
}
|
|
10458
9201
|
return payload;
|
|
10459
9202
|
}
|
|
10460
|
-
function call$1(
|
|
10461
|
-
if (typeof
|
|
10462
|
-
return
|
|
9203
|
+
function call$1(v, ...args) {
|
|
9204
|
+
if (typeof v === "function") {
|
|
9205
|
+
return v(...args);
|
|
10463
9206
|
} else {
|
|
10464
|
-
return
|
|
9207
|
+
return v;
|
|
10465
9208
|
}
|
|
10466
9209
|
}
|
|
10467
9210
|
function noop$1() {
|
|
@@ -10726,20 +9469,20 @@
|
|
|
10726
9469
|
}
|
|
10727
9470
|
state._blocked = (config2.lockDirection || !!config2.axis) && !state.axis || !!config2.axis && config2.axis !== state.axis;
|
|
10728
9471
|
}
|
|
10729
|
-
restrictToAxis(
|
|
9472
|
+
restrictToAxis(v) {
|
|
10730
9473
|
if (this.config.axis || this.config.lockDirection) {
|
|
10731
9474
|
switch (this.state.axis) {
|
|
10732
9475
|
case "x":
|
|
10733
|
-
|
|
9476
|
+
v[1] = 0;
|
|
10734
9477
|
break;
|
|
10735
9478
|
case "y":
|
|
10736
|
-
|
|
9479
|
+
v[0] = 0;
|
|
10737
9480
|
break;
|
|
10738
9481
|
}
|
|
10739
9482
|
}
|
|
10740
9483
|
}
|
|
10741
9484
|
}
|
|
10742
|
-
const identity = (
|
|
9485
|
+
const identity = (v) => v;
|
|
10743
9486
|
const DEFAULT_RUBBERBAND = 0.15;
|
|
10744
9487
|
const commonConfigResolver = {
|
|
10745
9488
|
enabled(value = true) {
|
|
@@ -11223,11 +9966,11 @@
|
|
|
11223
9966
|
return [D.min, D.max];
|
|
11224
9967
|
};
|
|
11225
9968
|
const _angleBounds = (state) => {
|
|
11226
|
-
const
|
|
9969
|
+
const A = assignDefault(call$1(angleBounds, state), {
|
|
11227
9970
|
min: -Infinity,
|
|
11228
9971
|
max: Infinity
|
|
11229
9972
|
});
|
|
11230
|
-
return [
|
|
9973
|
+
return [A.min, A.max];
|
|
11231
9974
|
};
|
|
11232
9975
|
if (typeof scaleBounds !== "function" && typeof angleBounds !== "function")
|
|
11233
9976
|
return [_scaleBounds(), _angleBounds()];
|
|
@@ -11580,7 +10323,7 @@
|
|
|
11580
10323
|
raf.setTimeout = (handler, ms) => {
|
|
11581
10324
|
let time = raf.now() + ms;
|
|
11582
10325
|
let cancel = () => {
|
|
11583
|
-
let i = timeouts.findIndex((
|
|
10326
|
+
let i = timeouts.findIndex((t) => t.cancel == cancel);
|
|
11584
10327
|
if (~i)
|
|
11585
10328
|
timeouts.splice(i, 1);
|
|
11586
10329
|
pendingCount -= ~i ? 1 : 0;
|
|
@@ -11595,7 +10338,7 @@
|
|
|
11595
10338
|
start();
|
|
11596
10339
|
return timeout;
|
|
11597
10340
|
};
|
|
11598
|
-
let findTimeout = (time) => ~(~timeouts.findIndex((
|
|
10341
|
+
let findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length);
|
|
11599
10342
|
raf.cancel = (fn) => {
|
|
11600
10343
|
onStartQueue.delete(fn);
|
|
11601
10344
|
onFrameQueue.delete(fn);
|
|
@@ -11676,7 +10419,7 @@
|
|
|
11676
10419
|
ts = raf.now();
|
|
11677
10420
|
let count = findTimeout(ts);
|
|
11678
10421
|
if (count) {
|
|
11679
|
-
eachSafely(timeouts.splice(0, count), (
|
|
10422
|
+
eachSafely(timeouts.splice(0, count), (t) => t.handler());
|
|
11680
10423
|
pendingCount -= count;
|
|
11681
10424
|
}
|
|
11682
10425
|
if (!pendingCount) {
|
|
@@ -12082,26 +10825,26 @@
|
|
|
12082
10825
|
}
|
|
12083
10826
|
return null;
|
|
12084
10827
|
}
|
|
12085
|
-
function hue2rgb(
|
|
12086
|
-
if (
|
|
12087
|
-
|
|
12088
|
-
if (
|
|
12089
|
-
|
|
12090
|
-
if (
|
|
12091
|
-
return
|
|
12092
|
-
if (
|
|
12093
|
-
return
|
|
12094
|
-
if (
|
|
12095
|
-
return
|
|
12096
|
-
return
|
|
10828
|
+
function hue2rgb(p, q, t) {
|
|
10829
|
+
if (t < 0)
|
|
10830
|
+
t += 1;
|
|
10831
|
+
if (t > 1)
|
|
10832
|
+
t -= 1;
|
|
10833
|
+
if (t < 1 / 6)
|
|
10834
|
+
return p + (q - p) * 6 * t;
|
|
10835
|
+
if (t < 1 / 2)
|
|
10836
|
+
return q;
|
|
10837
|
+
if (t < 2 / 3)
|
|
10838
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
10839
|
+
return p;
|
|
12097
10840
|
}
|
|
12098
|
-
function hslToRgb(
|
|
12099
|
-
const
|
|
12100
|
-
const
|
|
12101
|
-
const r2 = hue2rgb(
|
|
12102
|
-
const
|
|
12103
|
-
const b2 = hue2rgb(
|
|
12104
|
-
return Math.round(r2 * 255) << 24 | Math.round(
|
|
10841
|
+
function hslToRgb(h, s, l) {
|
|
10842
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
10843
|
+
const p = 2 * l - q;
|
|
10844
|
+
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
10845
|
+
const g = hue2rgb(p, q, h);
|
|
10846
|
+
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
10847
|
+
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
12105
10848
|
}
|
|
12106
10849
|
function parse255(str) {
|
|
12107
10850
|
const int = parseInt(str, 10);
|
|
@@ -12137,10 +10880,10 @@
|
|
|
12137
10880
|
return input;
|
|
12138
10881
|
int32Color = int32Color || 0;
|
|
12139
10882
|
let r2 = (int32Color & 4278190080) >>> 24;
|
|
12140
|
-
let
|
|
10883
|
+
let g = (int32Color & 16711680) >>> 16;
|
|
12141
10884
|
let b2 = (int32Color & 65280) >>> 8;
|
|
12142
10885
|
let a = (int32Color & 255) / 255;
|
|
12143
|
-
return `rgba(${r2}, ${
|
|
10886
|
+
return `rgba(${r2}, ${g}, ${b2}, ${a})`;
|
|
12144
10887
|
}
|
|
12145
10888
|
const createInterpolator = (range, output, extrapolate) => {
|
|
12146
10889
|
if (is.fun(range)) {
|
|
@@ -12161,7 +10904,7 @@
|
|
|
12161
10904
|
const inputRange = config2.range || [0, 1];
|
|
12162
10905
|
const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
|
|
12163
10906
|
const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
|
|
12164
|
-
const easing = config2.easing || ((
|
|
10907
|
+
const easing = config2.easing || ((t) => t);
|
|
12165
10908
|
return (input) => {
|
|
12166
10909
|
const range2 = findRange(input, inputRange);
|
|
12167
10910
|
return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
|
|
@@ -12892,51 +11635,51 @@
|
|
|
12892
11635
|
const c3 = c1 + 1;
|
|
12893
11636
|
const c4 = 2 * Math.PI / 3;
|
|
12894
11637
|
const c5 = 2 * Math.PI / 4.5;
|
|
12895
|
-
const bounceOut = (
|
|
11638
|
+
const bounceOut = (x) => {
|
|
12896
11639
|
const n1 = 7.5625;
|
|
12897
11640
|
const d1 = 2.75;
|
|
12898
|
-
if (
|
|
12899
|
-
return n1 *
|
|
12900
|
-
} else if (
|
|
12901
|
-
return n1 * (
|
|
12902
|
-
} else if (
|
|
12903
|
-
return n1 * (
|
|
11641
|
+
if (x < 1 / d1) {
|
|
11642
|
+
return n1 * x * x;
|
|
11643
|
+
} else if (x < 2 / d1) {
|
|
11644
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
11645
|
+
} else if (x < 2.5 / d1) {
|
|
11646
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
12904
11647
|
} else {
|
|
12905
|
-
return n1 * (
|
|
11648
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
12906
11649
|
}
|
|
12907
11650
|
};
|
|
12908
11651
|
const easings = {
|
|
12909
|
-
linear: (
|
|
12910
|
-
easeInQuad: (
|
|
12911
|
-
easeOutQuad: (
|
|
12912
|
-
easeInOutQuad: (
|
|
12913
|
-
easeInCubic: (
|
|
12914
|
-
easeOutCubic: (
|
|
12915
|
-
easeInOutCubic: (
|
|
12916
|
-
easeInQuart: (
|
|
12917
|
-
easeOutQuart: (
|
|
12918
|
-
easeInOutQuart: (
|
|
12919
|
-
easeInQuint: (
|
|
12920
|
-
easeOutQuint: (
|
|
12921
|
-
easeInOutQuint: (
|
|
12922
|
-
easeInSine: (
|
|
12923
|
-
easeOutSine: (
|
|
12924
|
-
easeInOutSine: (
|
|
12925
|
-
easeInExpo: (
|
|
12926
|
-
easeOutExpo: (
|
|
12927
|
-
easeInOutExpo: (
|
|
12928
|
-
easeInCirc: (
|
|
12929
|
-
easeOutCirc: (
|
|
12930
|
-
easeInOutCirc: (
|
|
12931
|
-
easeInBack: (
|
|
12932
|
-
easeOutBack: (
|
|
12933
|
-
easeInOutBack: (
|
|
12934
|
-
easeInElastic: (
|
|
12935
|
-
easeOutElastic: (
|
|
12936
|
-
easeInOutElastic: (
|
|
12937
|
-
easeInBounce: (
|
|
11652
|
+
linear: (x) => x,
|
|
11653
|
+
easeInQuad: (x) => x * x,
|
|
11654
|
+
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
11655
|
+
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
11656
|
+
easeInCubic: (x) => x * x * x,
|
|
11657
|
+
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
11658
|
+
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
11659
|
+
easeInQuart: (x) => x * x * x * x,
|
|
11660
|
+
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
11661
|
+
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
11662
|
+
easeInQuint: (x) => x * x * x * x * x,
|
|
11663
|
+
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
11664
|
+
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
11665
|
+
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
11666
|
+
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
11667
|
+
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
11668
|
+
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
11669
|
+
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
11670
|
+
easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
|
11671
|
+
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
11672
|
+
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
11673
|
+
easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
|
11674
|
+
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
11675
|
+
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
11676
|
+
easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
11677
|
+
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
11678
|
+
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
11679
|
+
easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
|
11680
|
+
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
12938
11681
|
easeOutBounce: bounceOut,
|
|
12939
|
-
easeInOutBounce: (
|
|
11682
|
+
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
|
|
12940
11683
|
};
|
|
12941
11684
|
const defaults = _extends({}, config.default, {
|
|
12942
11685
|
mass: 1,
|
|
@@ -13203,7 +11946,7 @@
|
|
|
13203
11946
|
})();
|
|
13204
11947
|
}
|
|
13205
11948
|
function stopAsync(state, cancelId) {
|
|
13206
|
-
flush(state.timeouts, (
|
|
11949
|
+
flush(state.timeouts, (t) => t.cancel());
|
|
13207
11950
|
state.pauseQueue.clear();
|
|
13208
11951
|
state.resumeQueue.clear();
|
|
13209
11952
|
state.asyncId = state.asyncTo = state.promise = void 0;
|
|
@@ -13374,7 +12117,7 @@
|
|
|
13374
12117
|
let velocity;
|
|
13375
12118
|
const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
|
|
13376
12119
|
if (!is.und(config2.duration)) {
|
|
13377
|
-
let
|
|
12120
|
+
let p = 1;
|
|
13378
12121
|
if (config2.duration > 0) {
|
|
13379
12122
|
if (this._memoizedDuration !== config2.duration) {
|
|
13380
12123
|
this._memoizedDuration = config2.duration;
|
|
@@ -13383,13 +12126,13 @@
|
|
|
13383
12126
|
elapsed = node2.elapsedTime += dt;
|
|
13384
12127
|
}
|
|
13385
12128
|
}
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
node2.durationProgress =
|
|
12129
|
+
p = (config2.progress || 0) + elapsed / this._memoizedDuration;
|
|
12130
|
+
p = p > 1 ? 1 : p < 0 ? 0 : p;
|
|
12131
|
+
node2.durationProgress = p;
|
|
13389
12132
|
}
|
|
13390
|
-
position = from + config2.easing(
|
|
12133
|
+
position = from + config2.easing(p) * (to2 - from);
|
|
13391
12134
|
velocity = (position - node2.lastPosition) / dt;
|
|
13392
|
-
finished =
|
|
12135
|
+
finished = p == 1;
|
|
13393
12136
|
} else if (config2.decay) {
|
|
13394
12137
|
const decay = config2.decay === true ? 0.998 : config2.decay;
|
|
13395
12138
|
const e2 = Math.exp(-(1 - decay) * elapsed);
|
|
@@ -13406,7 +12149,7 @@
|
|
|
13406
12149
|
let isBouncing = false;
|
|
13407
12150
|
const step = 1;
|
|
13408
12151
|
const numSteps = Math.ceil(dt / step);
|
|
13409
|
-
for (let
|
|
12152
|
+
for (let n = 0; n < numSteps; ++n) {
|
|
13410
12153
|
isMoving = Math.abs(velocity) > restVelocity;
|
|
13411
12154
|
if (!isMoving) {
|
|
13412
12155
|
finished = Math.abs(to2 - position) <= precision;
|
|
@@ -14387,9 +13130,9 @@
|
|
|
14387
13130
|
}
|
|
14388
13131
|
}
|
|
14389
13132
|
const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));
|
|
14390
|
-
const
|
|
14391
|
-
const prevContext = usePrev(
|
|
14392
|
-
const hasContext =
|
|
13133
|
+
const context = React.useContext(SpringContext);
|
|
13134
|
+
const prevContext = usePrev(context);
|
|
13135
|
+
const hasContext = context !== prevContext && hasProps(context);
|
|
14393
13136
|
useIsomorphicLayoutEffect(() => {
|
|
14394
13137
|
layoutId.current++;
|
|
14395
13138
|
state.ctrls = ctrls.current;
|
|
@@ -14404,7 +13147,7 @@
|
|
|
14404
13147
|
ref == null ? void 0 : ref.add(ctrl);
|
|
14405
13148
|
if (hasContext) {
|
|
14406
13149
|
ctrl.start({
|
|
14407
|
-
default:
|
|
13150
|
+
default: context
|
|
14408
13151
|
});
|
|
14409
13152
|
}
|
|
14410
13153
|
const update2 = updates[i];
|
|
@@ -14421,7 +13164,7 @@
|
|
|
14421
13164
|
useOnce(() => () => {
|
|
14422
13165
|
each(state.ctrls, (ctrl) => ctrl.stop(true));
|
|
14423
13166
|
});
|
|
14424
|
-
const values = springs.map((
|
|
13167
|
+
const values = springs.map((x) => _extends({}, x));
|
|
14425
13168
|
return ref ? [values, ref] : values;
|
|
14426
13169
|
}
|
|
14427
13170
|
function useSpring(props, deps) {
|
|
@@ -14576,7 +13319,7 @@
|
|
|
14576
13319
|
scrollLeft
|
|
14577
13320
|
} = _ref, attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
14578
13321
|
const values = Object.values(attributes);
|
|
14579
|
-
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (
|
|
13322
|
+
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
|
|
14580
13323
|
if (children !== void 0) {
|
|
14581
13324
|
instance.textContent = children;
|
|
14582
13325
|
}
|
|
@@ -14654,19 +13397,19 @@
|
|
|
14654
13397
|
const pxTransforms = /^(translate)/;
|
|
14655
13398
|
const degTransforms = /^(rotate|skew)/;
|
|
14656
13399
|
const addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
|
|
14657
|
-
const isValueIdentity = (value, id) => is.arr(value) ? value.every((
|
|
13400
|
+
const isValueIdentity = (value, id) => is.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id;
|
|
14658
13401
|
class AnimatedStyle extends AnimatedObject {
|
|
14659
13402
|
constructor(_ref) {
|
|
14660
13403
|
let {
|
|
14661
|
-
x
|
|
14662
|
-
y
|
|
14663
|
-
z
|
|
13404
|
+
x,
|
|
13405
|
+
y,
|
|
13406
|
+
z
|
|
14664
13407
|
} = _ref, style = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14665
13408
|
const inputs = [];
|
|
14666
13409
|
const transforms = [];
|
|
14667
|
-
if (
|
|
14668
|
-
inputs.push([
|
|
14669
|
-
transforms.push((xyz) => [`translate3d(${xyz.map((
|
|
13410
|
+
if (x || y || z) {
|
|
13411
|
+
inputs.push([x || 0, y || 0, z || 0]);
|
|
13412
|
+
transforms.push((xyz) => [`translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
|
|
14670
13413
|
}
|
|
14671
13414
|
eachProp(style, (value, key) => {
|
|
14672
13415
|
if (key === "transform") {
|
|
@@ -14678,7 +13421,7 @@
|
|
|
14678
13421
|
return;
|
|
14679
13422
|
const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
|
|
14680
13423
|
inputs.push(toArray(value));
|
|
14681
|
-
transforms.push(key === "rotate3d" ? ([
|
|
13424
|
+
transforms.push(key === "rotate3d" ? ([x2, y2, z2, deg]) => [`rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
|
|
14682
13425
|
}
|
|
14683
13426
|
});
|
|
14684
13427
|
if (inputs.length) {
|
|
@@ -14702,8 +13445,8 @@
|
|
|
14702
13445
|
let identity2 = true;
|
|
14703
13446
|
each(this.inputs, (input, i) => {
|
|
14704
13447
|
const arg1 = getFluidValue(input[0]);
|
|
14705
|
-
const [
|
|
14706
|
-
transform += " " +
|
|
13448
|
+
const [t, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));
|
|
13449
|
+
transform += " " + t;
|
|
14707
13450
|
identity2 = identity2 && id;
|
|
14708
13451
|
});
|
|
14709
13452
|
return identity2 ? "none" : transform;
|
|
@@ -14808,16 +13551,16 @@
|
|
|
14808
13551
|
onRefresh: () => {
|
|
14809
13552
|
}
|
|
14810
13553
|
};
|
|
14811
|
-
const PullToRefresh = (
|
|
13554
|
+
const PullToRefresh = (p) => {
|
|
14812
13555
|
const { locale } = useConfig$1();
|
|
14813
13556
|
const props = {
|
|
14814
13557
|
...defaultProps$z,
|
|
14815
|
-
...
|
|
13558
|
+
...p,
|
|
14816
13559
|
...{
|
|
14817
|
-
pullingText:
|
|
14818
|
-
canReleaseText:
|
|
14819
|
-
refreshingText:
|
|
14820
|
-
completeText:
|
|
13560
|
+
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
13561
|
+
canReleaseText: p.canReleaseText || locale.pullToRefresh.canReleaseText,
|
|
13562
|
+
refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
|
|
13563
|
+
completeText: p.completeText || locale.pullToRefresh.completeText
|
|
14821
13564
|
}
|
|
14822
13565
|
};
|
|
14823
13566
|
const headHeight = props.headHeight;
|
|
@@ -14880,8 +13623,8 @@
|
|
|
14880
13623
|
function getScrollTop(element) {
|
|
14881
13624
|
return "scrollTop" in element ? element.scrollTop : element.scrollY;
|
|
14882
13625
|
}
|
|
14883
|
-
const [,
|
|
14884
|
-
if (state.first &&
|
|
13626
|
+
const [, y] = state.movement;
|
|
13627
|
+
if (state.first && y > 0) {
|
|
14885
13628
|
const target = state.event.target;
|
|
14886
13629
|
if (!target || !(target instanceof Element))
|
|
14887
13630
|
return;
|
|
@@ -14907,7 +13650,7 @@
|
|
|
14907
13650
|
}
|
|
14908
13651
|
event.stopPropagation();
|
|
14909
13652
|
const height = Math.max(
|
|
14910
|
-
rubberbandIfOutOfBounds(
|
|
13653
|
+
rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5),
|
|
14911
13654
|
0
|
|
14912
13655
|
);
|
|
14913
13656
|
api.start({ height });
|
|
@@ -15061,12 +13804,12 @@
|
|
|
15061
13804
|
const offset = perimeter * Number(format(parseFloat(progress2.toFixed(1)))) / 100;
|
|
15062
13805
|
const isWise = props.clockwise ? 1 : 0;
|
|
15063
13806
|
const color = isObject(circleColor) ? `url(%23${refRandomId})` : transColor(circleColor);
|
|
15064
|
-
const
|
|
13807
|
+
const d = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
15065
13808
|
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`;
|
|
15066
|
-
const path = `%3Cpath d='${
|
|
13809
|
+
const path = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
15067
13810
|
props.pathColor
|
|
15068
13811
|
)}' fill='none'/%3E`;
|
|
15069
|
-
const path1 = `%3Cpath d='${
|
|
13812
|
+
const path1 = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
|
|
15070
13813
|
color
|
|
15071
13814
|
)}' fill='none'/%3E`;
|
|
15072
13815
|
return {
|
|
@@ -15232,19 +13975,18 @@
|
|
|
15232
13975
|
};
|
|
15233
13976
|
const startRollEasy = () => {
|
|
15234
13977
|
showhorseLamp();
|
|
15235
|
-
const
|
|
15236
|
-
|
|
15237
|
-
~~(height / speed / 4) * 1e3 + Number(standTime)
|
|
15238
|
-
);
|
|
13978
|
+
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
13979
|
+
const timerCurr = setInterval(showhorseLamp, time + Number(standTime));
|
|
15239
13980
|
SetTimer(timerCurr);
|
|
15240
13981
|
};
|
|
15241
13982
|
const showhorseLamp = () => {
|
|
15242
13983
|
SetAnimate(true);
|
|
13984
|
+
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
15243
13985
|
setTimeout(() => {
|
|
15244
13986
|
scrollList.current.push(scrollList.current[0]);
|
|
15245
13987
|
scrollList.current.shift();
|
|
15246
13988
|
SetAnimate(false);
|
|
15247
|
-
},
|
|
13989
|
+
}, time);
|
|
15248
13990
|
};
|
|
15249
13991
|
const startRoll = () => {
|
|
15250
13992
|
const timerCurr = setInterval(() => {
|
|
@@ -15255,7 +13997,7 @@
|
|
|
15255
13997
|
}, Number(standTime) + 100 * speed);
|
|
15256
13998
|
SetTimer(timerCurr);
|
|
15257
13999
|
};
|
|
15258
|
-
const scroll = (
|
|
14000
|
+
const scroll = (n, last) => {
|
|
15259
14001
|
SetAnimate(true);
|
|
15260
14002
|
setTimeout(() => {
|
|
15261
14003
|
let long = distance;
|
|
@@ -15267,7 +14009,7 @@
|
|
|
15267
14009
|
SetDistance(0);
|
|
15268
14010
|
SetAnimate(false);
|
|
15269
14011
|
}
|
|
15270
|
-
},
|
|
14012
|
+
}, n * speed);
|
|
15271
14013
|
};
|
|
15272
14014
|
const handleClickIcon = (event) => {
|
|
15273
14015
|
event.stopPropagation();
|
|
@@ -15304,10 +14046,11 @@
|
|
|
15304
14046
|
background,
|
|
15305
14047
|
height: direction === "vertical" ? `${height}px` : ""
|
|
15306
14048
|
};
|
|
15307
|
-
const duringTime = ~~(height / speed / 4);
|
|
14049
|
+
const duringTime = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) : ~~(height / speed / 4);
|
|
14050
|
+
const noDuring = height / speed < 1 ? (height / speed).toFixed(1) : ~~(height / speed);
|
|
15308
14051
|
const horseLampStyle = {
|
|
15309
14052
|
transform: complexAm ? `translateY(${distance}px)` : "",
|
|
15310
|
-
transition: animate ? `all ${duringTime === 0 ?
|
|
14053
|
+
transition: animate ? `all ${duringTime === 0 ? noDuring : duringTime}s` : "",
|
|
15311
14054
|
marginTop: animate ? `-${height}px` : ""
|
|
15312
14055
|
};
|
|
15313
14056
|
const b2 = cn("noticebar");
|
|
@@ -15728,10 +14471,10 @@
|
|
|
15728
14471
|
const range = (num, min, max) => {
|
|
15729
14472
|
return Math.min(Math.max(num, min), max);
|
|
15730
14473
|
};
|
|
15731
|
-
const getDirection2 = (
|
|
15732
|
-
if (
|
|
14474
|
+
const getDirection2 = (x, y) => {
|
|
14475
|
+
if (x > y && x > DISTANCE)
|
|
15733
14476
|
return "horizontal";
|
|
15734
|
-
if (
|
|
14477
|
+
if (y > x && y > DISTANCE)
|
|
15735
14478
|
return "vertical";
|
|
15736
14479
|
return "";
|
|
15737
14480
|
};
|
|
@@ -16511,7 +15254,7 @@
|
|
|
16511
15254
|
};
|
|
16512
15255
|
const filter = () => {
|
|
16513
15256
|
const ms = ["top", "bottom", "left", "right"];
|
|
16514
|
-
return ms.filter((
|
|
15257
|
+
return ms.filter((m) => location.includes(m))[0];
|
|
16515
15258
|
};
|
|
16516
15259
|
const popoverArrowSelf = () => {
|
|
16517
15260
|
const prefixCls = "popover-arrow";
|
|
@@ -16605,7 +15348,7 @@
|
|
|
16605
15348
|
[`avatarClass--${avatarShape}`]: avatarShape
|
|
16606
15349
|
});
|
|
16607
15350
|
const repeatLines = (num) => {
|
|
16608
|
-
return Array.from({ length: num }, (
|
|
15351
|
+
return Array.from({ length: num }, (v, i) => i);
|
|
16609
15352
|
};
|
|
16610
15353
|
const getStyle = () => {
|
|
16611
15354
|
if (avatarSize) {
|
|
@@ -16692,9 +15435,9 @@
|
|
|
16692
15435
|
const getTimeStamp = (timeStr) => {
|
|
16693
15436
|
if (!timeStr)
|
|
16694
15437
|
return Date.now();
|
|
16695
|
-
let
|
|
16696
|
-
|
|
16697
|
-
return new Date(
|
|
15438
|
+
let t = timeStr;
|
|
15439
|
+
t = t > 0 ? +t : t.toString().replace(/-/g, "/");
|
|
15440
|
+
return new Date(t).getTime();
|
|
16698
15441
|
};
|
|
16699
15442
|
const initTime = () => {
|
|
16700
15443
|
stateRef.current.handleEndTime = endTime;
|
|
@@ -16724,8 +15467,8 @@
|
|
|
16724
15467
|
}
|
|
16725
15468
|
});
|
|
16726
15469
|
};
|
|
16727
|
-
const formatRemainTime = (
|
|
16728
|
-
const ts2 =
|
|
15470
|
+
const formatRemainTime = (t, type) => {
|
|
15471
|
+
const ts2 = t;
|
|
16729
15472
|
const rest2 = {
|
|
16730
15473
|
d: 0,
|
|
16731
15474
|
h: 0,
|
|
@@ -16747,23 +15490,23 @@
|
|
|
16747
15490
|
return type === "custom" ? rest2 : parseFormat({ ...rest2 });
|
|
16748
15491
|
};
|
|
16749
15492
|
const parseFormat = (time2) => {
|
|
16750
|
-
const { d
|
|
16751
|
-
let { h
|
|
15493
|
+
const { d } = time2;
|
|
15494
|
+
let { h, m, s, ms } = time2;
|
|
16752
15495
|
let formatCache = format;
|
|
16753
15496
|
if (formatCache.includes("DD")) {
|
|
16754
|
-
formatCache = formatCache.replace("DD", padZero(
|
|
15497
|
+
formatCache = formatCache.replace("DD", padZero(d));
|
|
16755
15498
|
} else {
|
|
16756
|
-
|
|
15499
|
+
h += Number(d) * 24;
|
|
16757
15500
|
}
|
|
16758
15501
|
if (formatCache.includes("HH")) {
|
|
16759
|
-
formatCache = formatCache.replace("HH", padZero(
|
|
15502
|
+
formatCache = formatCache.replace("HH", padZero(h));
|
|
16760
15503
|
} else {
|
|
16761
|
-
|
|
15504
|
+
m += Number(h) * 60;
|
|
16762
15505
|
}
|
|
16763
15506
|
if (formatCache.includes("mm")) {
|
|
16764
|
-
formatCache = formatCache.replace("mm", padZero(
|
|
15507
|
+
formatCache = formatCache.replace("mm", padZero(m));
|
|
16765
15508
|
} else {
|
|
16766
|
-
s += Number(
|
|
15509
|
+
s += Number(m) * 60;
|
|
16767
15510
|
}
|
|
16768
15511
|
if (formatCache.includes("ss")) {
|
|
16769
15512
|
formatCache = formatCache.replace("ss", padZero(s));
|
|
@@ -16882,7 +15625,7 @@
|
|
|
16882
15625
|
rotate: 180
|
|
16883
15626
|
};
|
|
16884
15627
|
function areEqual(prevProps, nextProps) {
|
|
16885
|
-
return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
15628
|
+
return prevProps.children === nextProps.children && JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
16886
15629
|
}
|
|
16887
15630
|
const Collapse = React.memo(
|
|
16888
15631
|
(props) => {
|
|
@@ -17007,10 +15750,6 @@
|
|
|
17007
15750
|
transform: "translateY(-50%)"
|
|
17008
15751
|
});
|
|
17009
15752
|
const colBem = cn("collapse-item");
|
|
17010
|
-
React.useEffect(() => {
|
|
17011
|
-
setCurrHeight("auto");
|
|
17012
|
-
setUpdate(!update2);
|
|
17013
|
-
}, [children]);
|
|
17014
15753
|
const measuredRef = React.useCallback(
|
|
17015
15754
|
(node) => {
|
|
17016
15755
|
if (node !== null) {
|
|
@@ -17028,6 +15767,14 @@
|
|
|
17028
15767
|
setIconStyle(newIconStyle);
|
|
17029
15768
|
}, 10);
|
|
17030
15769
|
}, [isOpen, domHeight, rotate]);
|
|
15770
|
+
React.useEffect(() => {
|
|
15771
|
+
if (!isOpen) {
|
|
15772
|
+
setCurrHeight("0px");
|
|
15773
|
+
} else {
|
|
15774
|
+
setCurrHeight("auto");
|
|
15775
|
+
}
|
|
15776
|
+
setUpdate(!update2);
|
|
15777
|
+
}, [children, isOpen]);
|
|
17031
15778
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17032
15779
|
className: colBem(),
|
|
17033
15780
|
...rest
|
|
@@ -17103,7 +15850,7 @@
|
|
|
17103
15850
|
const b2 = cn("countup");
|
|
17104
15851
|
const countupRef = React.useRef(null);
|
|
17105
15852
|
const timerRef = React.useRef(0);
|
|
17106
|
-
const numbers = Array.from({ length: 10 }, (
|
|
15853
|
+
const numbers = Array.from({ length: 10 }, (v, i) => i);
|
|
17107
15854
|
const getShowNumber = () => {
|
|
17108
15855
|
const splitArr = endNumber.split(".");
|
|
17109
15856
|
const intNumber = maxLen && splitArr[0].length < maxLen ? (Array(maxLen).join("0") + splitArr[0]).slice(-maxLen) : splitArr[0];
|
|
@@ -17346,16 +16093,16 @@
|
|
|
17346
16093
|
if (sizeKey === "width") {
|
|
17347
16094
|
newPos[index].right -= dValue;
|
|
17348
16095
|
newPos[index][sizeKey] = nowSize;
|
|
17349
|
-
for (let
|
|
17350
|
-
newPos[
|
|
17351
|
-
newPos[
|
|
16096
|
+
for (let k = index + 1; k < positions.length; k++) {
|
|
16097
|
+
newPos[k].left = positions[k - 1].right;
|
|
16098
|
+
newPos[k].right -= dValue;
|
|
17352
16099
|
}
|
|
17353
16100
|
} else if (sizeKey === "height") {
|
|
17354
16101
|
newPos[index].bottom -= dValue;
|
|
17355
16102
|
newPos[index][sizeKey] = nowSize;
|
|
17356
|
-
for (let
|
|
17357
|
-
newPos[
|
|
17358
|
-
newPos[
|
|
16103
|
+
for (let k = index + 1; k < positions.length; k++) {
|
|
16104
|
+
newPos[k].top = positions[k - 1].bottom;
|
|
16105
|
+
newPos[k].bottom -= dValue;
|
|
17359
16106
|
}
|
|
17360
16107
|
}
|
|
17361
16108
|
}
|
|
@@ -19402,7 +18149,7 @@
|
|
|
19402
18149
|
exports2.CalendarItem = CalendarItem;
|
|
19403
18150
|
exports2.Card = Card;
|
|
19404
18151
|
exports2.Cascader = Cascader;
|
|
19405
|
-
exports2.Cell = Cell
|
|
18152
|
+
exports2.Cell = Cell;
|
|
19406
18153
|
exports2.CellGroup = CellGroup;
|
|
19407
18154
|
exports2.Checkbox = Checkbox;
|
|
19408
18155
|
exports2.CheckboxGroup = CheckboxGroup;
|