@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.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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
6
|
import * as React from "react";
|
|
7
|
-
import React__default, { useCallback, useState, useEffect, useRef, createContext
|
|
7
|
+
import React__default, { useCallback, useState, useEffect, useRef, createContext, useContext, forwardRef, useImperativeHandle, useLayoutEffect, useMemo, memo, Component } from "react";
|
|
8
8
|
import Taro, { usePageScroll, eventCenter, getCurrentInstance, nextTick, useReady, createSelectorQuery } from "@tarojs/taro";
|
|
9
9
|
import ReactDOM, { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
10
|
-
function getAugmentedNamespace(
|
|
11
|
-
if (
|
|
12
|
-
return
|
|
10
|
+
function getAugmentedNamespace(n) {
|
|
11
|
+
if (n.__esModule)
|
|
12
|
+
return n;
|
|
13
13
|
var a = Object.defineProperty({}, "__esModule", { value: true });
|
|
14
|
-
Object.keys(
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(a,
|
|
14
|
+
Object.keys(n).forEach(function(k) {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
16
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
17
17
|
enumerable: true,
|
|
18
18
|
get: function() {
|
|
19
|
-
return
|
|
19
|
+
return n[k];
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -24,43 +24,43 @@ function getAugmentedNamespace(n2) {
|
|
|
24
24
|
}
|
|
25
25
|
var classname = { exports: {} };
|
|
26
26
|
var classname_production_min = {};
|
|
27
|
-
function r
|
|
27
|
+
function r(r2) {
|
|
28
28
|
function e2(e3, i, a, o) {
|
|
29
|
-
var
|
|
29
|
+
var f = i ? t + e3 + r2.e + i : t + e3, v = f;
|
|
30
30
|
if (a) {
|
|
31
|
-
var u = " " +
|
|
31
|
+
var u = " " + v + r2.m;
|
|
32
32
|
for (var s in a)
|
|
33
33
|
if (a.hasOwnProperty(s)) {
|
|
34
|
-
var
|
|
35
|
-
true ===
|
|
34
|
+
var p = a[s];
|
|
35
|
+
true === p ? v += u + s : p && (v += u + s + n + p);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
if (void 0 !== o)
|
|
39
|
-
for (var
|
|
40
|
-
var
|
|
41
|
-
if (
|
|
42
|
-
for (var
|
|
43
|
-
var
|
|
44
|
-
|
|
39
|
+
for (var c = 0, l = o.length; c < l; c++) {
|
|
40
|
+
var y = o[c];
|
|
41
|
+
if (y && "string" == typeof y.valueOf())
|
|
42
|
+
for (var g = y.valueOf().split(" "), d = 0; d < g.length; d++) {
|
|
43
|
+
var h = g[d];
|
|
44
|
+
h !== f && (v += " " + h);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return v;
|
|
48
48
|
}
|
|
49
|
-
var
|
|
50
|
-
return function(r3,
|
|
51
|
-
return function(
|
|
52
|
-
return "string" == typeof
|
|
49
|
+
var t = r2.n || "", n = r2.v || r2.m;
|
|
50
|
+
return function(r3, t2) {
|
|
51
|
+
return function(n2, i, a) {
|
|
52
|
+
return "string" == typeof n2 ? Array.isArray(i) ? e2(r3, n2, void 0, i) : e2(r3, n2, i, a) : e2(r3, t2, n2, i);
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
57
|
-
var e
|
|
58
|
-
classname_production_min.cn = e
|
|
57
|
+
var e = r({ e: "-", m: "_" });
|
|
58
|
+
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
59
59
|
{
|
|
60
60
|
classname.exports = classname_production_min;
|
|
61
61
|
}
|
|
62
62
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
63
|
-
const defaultProps$
|
|
63
|
+
const defaultProps$1t = {
|
|
64
64
|
name: "",
|
|
65
65
|
size: "",
|
|
66
66
|
classPrefix: "nut-icon",
|
|
@@ -88,7 +88,7 @@ function Icon$1(props) {
|
|
|
88
88
|
onClick,
|
|
89
89
|
...rest
|
|
90
90
|
} = {
|
|
91
|
-
...defaultProps$
|
|
91
|
+
...defaultProps$1t,
|
|
92
92
|
...props
|
|
93
93
|
};
|
|
94
94
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -122,13 +122,13 @@ function Icon$1(props) {
|
|
|
122
122
|
children
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
|
-
Icon$1.defaultProps = defaultProps$
|
|
125
|
+
Icon$1.defaultProps = defaultProps$1t;
|
|
126
126
|
Icon$1.displayName = "NutIcon";
|
|
127
127
|
const ComponentDefaults = {
|
|
128
128
|
iconClassPrefix: "nut-icon",
|
|
129
129
|
iconFontClassName: "nutui-iconfont"
|
|
130
130
|
};
|
|
131
|
-
const defaultProps$
|
|
131
|
+
const defaultProps$1s = {
|
|
132
132
|
...ComponentDefaults,
|
|
133
133
|
className: "",
|
|
134
134
|
color: "",
|
|
@@ -164,7 +164,7 @@ const Button = (props) => {
|
|
|
164
164
|
iconFontClassName,
|
|
165
165
|
...rest
|
|
166
166
|
} = {
|
|
167
|
-
...defaultProps$
|
|
167
|
+
...defaultProps$1s,
|
|
168
168
|
...props
|
|
169
169
|
};
|
|
170
170
|
const getStyle = useCallback(() => {
|
|
@@ -243,9 +243,9 @@ const Button = (props) => {
|
|
|
243
243
|
className: icon || loading ? "text" : ""
|
|
244
244
|
}, children)));
|
|
245
245
|
};
|
|
246
|
-
Button.defaultProps = defaultProps$
|
|
246
|
+
Button.defaultProps = defaultProps$1s;
|
|
247
247
|
Button.displayName = "NutButton";
|
|
248
|
-
const defaultProps$
|
|
248
|
+
const defaultProps$1r = {
|
|
249
249
|
...ComponentDefaults,
|
|
250
250
|
title: null,
|
|
251
251
|
subTitle: null,
|
|
@@ -267,7 +267,7 @@ const defaultProps$1s = {
|
|
|
267
267
|
onClick: (event) => {
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const Cell
|
|
270
|
+
const Cell = (props) => {
|
|
271
271
|
const {
|
|
272
272
|
children,
|
|
273
273
|
click,
|
|
@@ -291,7 +291,7 @@ const Cell$1 = (props) => {
|
|
|
291
291
|
iconFontClassName,
|
|
292
292
|
...rest
|
|
293
293
|
} = {
|
|
294
|
-
...defaultProps$
|
|
294
|
+
...defaultProps$1r,
|
|
295
295
|
...props
|
|
296
296
|
};
|
|
297
297
|
const b2 = cn("cell");
|
|
@@ -342,9 +342,9 @@ const Cell$1 = (props) => {
|
|
|
342
342
|
className: b2("link")
|
|
343
343
|
}) : linkSlot));
|
|
344
344
|
};
|
|
345
|
-
Cell
|
|
346
|
-
Cell
|
|
347
|
-
const defaultProps$
|
|
345
|
+
Cell.defaultProps = defaultProps$1r;
|
|
346
|
+
Cell.displayName = "NutCell";
|
|
347
|
+
const defaultProps$1q = {
|
|
348
348
|
title: "",
|
|
349
349
|
desc: "",
|
|
350
350
|
className: "",
|
|
@@ -353,7 +353,7 @@ const defaultProps$1r = {
|
|
|
353
353
|
};
|
|
354
354
|
const CellGroup = (props) => {
|
|
355
355
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
356
|
-
...defaultProps$
|
|
356
|
+
...defaultProps$1q,
|
|
357
357
|
...props
|
|
358
358
|
};
|
|
359
359
|
const b2 = cn("cell-group");
|
|
@@ -367,7 +367,7 @@ const CellGroup = (props) => {
|
|
|
367
367
|
className: b2("wrap")
|
|
368
368
|
}, children));
|
|
369
369
|
};
|
|
370
|
-
CellGroup.defaultProps = defaultProps$
|
|
370
|
+
CellGroup.defaultProps = defaultProps$1q;
|
|
371
371
|
CellGroup.displayName = "NutCellGroup";
|
|
372
372
|
var classnames = { exports: {} };
|
|
373
373
|
/*!
|
|
@@ -524,72 +524,18 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
524
524
|
}
|
|
525
525
|
return target;
|
|
526
526
|
}
|
|
527
|
-
function _setPrototypeOf(o,
|
|
528
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2,
|
|
529
|
-
o2.__proto__ =
|
|
527
|
+
function _setPrototypeOf(o, p) {
|
|
528
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p2) {
|
|
529
|
+
o2.__proto__ = p2;
|
|
530
530
|
return o2;
|
|
531
531
|
};
|
|
532
|
-
return _setPrototypeOf(o,
|
|
532
|
+
return _setPrototypeOf(o, p);
|
|
533
533
|
}
|
|
534
534
|
function _inheritsLoose(subClass, superClass) {
|
|
535
535
|
subClass.prototype = Object.create(superClass.prototype);
|
|
536
536
|
subClass.prototype.constructor = subClass;
|
|
537
537
|
_setPrototypeOf(subClass, superClass);
|
|
538
538
|
}
|
|
539
|
-
var propTypes = { exports: {} };
|
|
540
|
-
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
541
|
-
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
542
|
-
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
543
|
-
function emptyFunction() {
|
|
544
|
-
}
|
|
545
|
-
function emptyFunctionWithReset() {
|
|
546
|
-
}
|
|
547
|
-
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
548
|
-
var factoryWithThrowingShims = function() {
|
|
549
|
-
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
550
|
-
if (secret === ReactPropTypesSecret) {
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
var err = new Error(
|
|
554
|
-
"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"
|
|
555
|
-
);
|
|
556
|
-
err.name = "Invariant Violation";
|
|
557
|
-
throw err;
|
|
558
|
-
}
|
|
559
|
-
shim.isRequired = shim;
|
|
560
|
-
function getShim() {
|
|
561
|
-
return shim;
|
|
562
|
-
}
|
|
563
|
-
var ReactPropTypes = {
|
|
564
|
-
array: shim,
|
|
565
|
-
bigint: shim,
|
|
566
|
-
bool: shim,
|
|
567
|
-
func: shim,
|
|
568
|
-
number: shim,
|
|
569
|
-
object: shim,
|
|
570
|
-
string: shim,
|
|
571
|
-
symbol: shim,
|
|
572
|
-
any: shim,
|
|
573
|
-
arrayOf: getShim,
|
|
574
|
-
element: shim,
|
|
575
|
-
elementType: shim,
|
|
576
|
-
instanceOf: getShim,
|
|
577
|
-
node: shim,
|
|
578
|
-
objectOf: getShim,
|
|
579
|
-
oneOf: getShim,
|
|
580
|
-
oneOfType: getShim,
|
|
581
|
-
shape: getShim,
|
|
582
|
-
exact: getShim,
|
|
583
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
584
|
-
resetWarningCache: emptyFunction
|
|
585
|
-
};
|
|
586
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
587
|
-
return ReactPropTypes;
|
|
588
|
-
};
|
|
589
|
-
{
|
|
590
|
-
propTypes.exports = factoryWithThrowingShims();
|
|
591
|
-
}
|
|
592
|
-
var PropTypes = propTypes.exports;
|
|
593
539
|
function hasClass(element, className) {
|
|
594
540
|
if (element.classList)
|
|
595
541
|
return !!className && element.classList.contains(className);
|
|
@@ -630,10 +576,10 @@ var ENTERED = "entered";
|
|
|
630
576
|
var EXITING = "exiting";
|
|
631
577
|
var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
632
578
|
_inheritsLoose(Transition2, _React$Component);
|
|
633
|
-
function Transition2(props,
|
|
579
|
+
function Transition2(props, context) {
|
|
634
580
|
var _this;
|
|
635
|
-
_this = _React$Component.call(this, props,
|
|
636
|
-
var parentGroup =
|
|
581
|
+
_this = _React$Component.call(this, props, context) || this;
|
|
582
|
+
var parentGroup = context;
|
|
637
583
|
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
638
584
|
var initialStatus;
|
|
639
585
|
_this.appearStatus = null;
|
|
@@ -853,7 +799,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
853
799
|
}(React__default.Component);
|
|
854
800
|
Transition.contextType = TransitionGroupContext;
|
|
855
801
|
Transition.propTypes = {};
|
|
856
|
-
function noop$
|
|
802
|
+
function noop$2() {
|
|
857
803
|
}
|
|
858
804
|
Transition.defaultProps = {
|
|
859
805
|
in: false,
|
|
@@ -862,12 +808,12 @@ Transition.defaultProps = {
|
|
|
862
808
|
appear: false,
|
|
863
809
|
enter: true,
|
|
864
810
|
exit: true,
|
|
865
|
-
onEnter: noop$
|
|
866
|
-
onEntering: noop$
|
|
867
|
-
onEntered: noop$
|
|
868
|
-
onExit: noop$
|
|
869
|
-
onExiting: noop$
|
|
870
|
-
onExited: noop$
|
|
811
|
+
onEnter: noop$2,
|
|
812
|
+
onEntering: noop$2,
|
|
813
|
+
onEntered: noop$2,
|
|
814
|
+
onExit: noop$2,
|
|
815
|
+
onExiting: noop$2,
|
|
816
|
+
onExited: noop$2
|
|
871
817
|
};
|
|
872
818
|
Transition.UNMOUNTED = UNMOUNTED;
|
|
873
819
|
Transition.EXITED = EXITED;
|
|
@@ -876,13 +822,13 @@ Transition.ENTERED = ENTERED;
|
|
|
876
822
|
Transition.EXITING = EXITING;
|
|
877
823
|
var Transition$1 = Transition;
|
|
878
824
|
var _addClass = function addClass$1(node, classes) {
|
|
879
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
880
|
-
return addClass(node,
|
|
825
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
826
|
+
return addClass(node, c);
|
|
881
827
|
});
|
|
882
828
|
};
|
|
883
829
|
var removeClass = function removeClass2(node, classes) {
|
|
884
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
885
|
-
return removeClass$1(node,
|
|
830
|
+
return node && classes && classes.split(" ").forEach(function(c) {
|
|
831
|
+
return removeClass$1(node, c);
|
|
886
832
|
});
|
|
887
833
|
};
|
|
888
834
|
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
@@ -1014,7 +960,7 @@ CSSTransition.defaultProps = {
|
|
|
1014
960
|
};
|
|
1015
961
|
CSSTransition.propTypes = {};
|
|
1016
962
|
var CSSTransition$1 = CSSTransition;
|
|
1017
|
-
const defaultProps$
|
|
963
|
+
const defaultProps$1p = {
|
|
1018
964
|
...ComponentDefaults,
|
|
1019
965
|
position: "center",
|
|
1020
966
|
transition: "",
|
|
@@ -1200,7 +1146,7 @@ const Popup = (props) => {
|
|
|
1200
1146
|
}, [position]);
|
|
1201
1147
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1202
1148
|
};
|
|
1203
|
-
Popup.defaultProps = defaultProps$
|
|
1149
|
+
Popup.defaultProps = defaultProps$1p;
|
|
1204
1150
|
Popup.displayName = "NutPopup";
|
|
1205
1151
|
const zhCN = {
|
|
1206
1152
|
save: "\u4FDD\u5B58",
|
|
@@ -1330,7 +1276,7 @@ const zhCN = {
|
|
|
1330
1276
|
errorCanvasTips: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301Canvas"
|
|
1331
1277
|
}
|
|
1332
1278
|
};
|
|
1333
|
-
const defaultProps$
|
|
1279
|
+
const defaultProps$1o = {
|
|
1334
1280
|
locale: zhCN
|
|
1335
1281
|
};
|
|
1336
1282
|
const defaultConfigRef$1 = {
|
|
@@ -1343,11 +1289,11 @@ const getDefaultConfig$1 = () => {
|
|
|
1343
1289
|
};
|
|
1344
1290
|
const useConfig$1 = () => {
|
|
1345
1291
|
var _a;
|
|
1346
|
-
return (_a = useContext
|
|
1292
|
+
return (_a = useContext(ConfigContext$1)) != null ? _a : getDefaultConfig$1();
|
|
1347
1293
|
};
|
|
1348
|
-
const ConfigContext$1 = createContext
|
|
1294
|
+
const ConfigContext$1 = createContext(null);
|
|
1349
1295
|
const ConfigProvider = (props) => {
|
|
1350
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1296
|
+
const { children, ...config2 } = { ...defaultProps$1o, ...props };
|
|
1351
1297
|
const parentConfig = useConfig$1();
|
|
1352
1298
|
return /* @__PURE__ */ React__default.createElement(ConfigContext$1.Provider, {
|
|
1353
1299
|
value: {
|
|
@@ -1356,9 +1302,9 @@ const ConfigProvider = (props) => {
|
|
|
1356
1302
|
}
|
|
1357
1303
|
}, children);
|
|
1358
1304
|
};
|
|
1359
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1305
|
+
ConfigProvider.defaultProps = defaultProps$1o;
|
|
1360
1306
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1361
|
-
const defaultProps$
|
|
1307
|
+
const defaultProps$1n = {
|
|
1362
1308
|
fit: "fill",
|
|
1363
1309
|
position: "center",
|
|
1364
1310
|
alt: "",
|
|
@@ -1389,7 +1335,7 @@ const Image = (props) => {
|
|
|
1389
1335
|
onClick,
|
|
1390
1336
|
onLoad,
|
|
1391
1337
|
onError
|
|
1392
|
-
} = { ...defaultProps$
|
|
1338
|
+
} = { ...defaultProps$1n, ...props };
|
|
1393
1339
|
const [loading, setLoading] = useState(true);
|
|
1394
1340
|
const [isError, setIsError] = useState(false);
|
|
1395
1341
|
useEffect(() => {
|
|
@@ -1447,19 +1393,19 @@ const Image = (props) => {
|
|
|
1447
1393
|
name: "image-error"
|
|
1448
1394
|
})) : null);
|
|
1449
1395
|
};
|
|
1450
|
-
Image.defaultProps = defaultProps$
|
|
1396
|
+
Image.defaultProps = defaultProps$1n;
|
|
1451
1397
|
Image.displayName = "NutImage";
|
|
1452
|
-
const defaultProps$
|
|
1398
|
+
const defaultProps$1m = {};
|
|
1453
1399
|
const Layout = (props) => {
|
|
1454
|
-
({ ...defaultProps$
|
|
1400
|
+
({ ...defaultProps$1m, ...props });
|
|
1455
1401
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1456
1402
|
className: "nut-layout"
|
|
1457
1403
|
}, "Layout");
|
|
1458
1404
|
};
|
|
1459
|
-
Layout.defaultProps = defaultProps$
|
|
1405
|
+
Layout.defaultProps = defaultProps$1m;
|
|
1460
1406
|
Layout.displayName = "NutLayout";
|
|
1461
|
-
const DataContext$2 = createContext
|
|
1462
|
-
const defaultProps$
|
|
1407
|
+
const DataContext$2 = createContext({});
|
|
1408
|
+
const defaultProps$1l = {
|
|
1463
1409
|
span: "24",
|
|
1464
1410
|
offset: "0",
|
|
1465
1411
|
gutter: "0"
|
|
@@ -1473,12 +1419,12 @@ const Col = (props) => {
|
|
|
1473
1419
|
children,
|
|
1474
1420
|
onClick
|
|
1475
1421
|
} = {
|
|
1476
|
-
...defaultProps$
|
|
1422
|
+
...defaultProps$1l,
|
|
1477
1423
|
...props
|
|
1478
1424
|
};
|
|
1479
1425
|
const [colName, setColName] = useState("");
|
|
1480
1426
|
const [colStyle, setColStyle] = useState({});
|
|
1481
|
-
const { gutter } = useContext
|
|
1427
|
+
const { gutter } = useContext(DataContext$2);
|
|
1482
1428
|
const classs = () => {
|
|
1483
1429
|
const prefixCls = "nut-col";
|
|
1484
1430
|
return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
|
|
@@ -1501,9 +1447,9 @@ const Col = (props) => {
|
|
|
1501
1447
|
}
|
|
1502
1448
|
}, children);
|
|
1503
1449
|
};
|
|
1504
|
-
Col.defaultProps = defaultProps$
|
|
1450
|
+
Col.defaultProps = defaultProps$1l;
|
|
1505
1451
|
Col.displayName = "NutCol";
|
|
1506
|
-
const defaultProps$
|
|
1452
|
+
const defaultProps$1k = {
|
|
1507
1453
|
type: "",
|
|
1508
1454
|
justify: "start",
|
|
1509
1455
|
align: "flex-start",
|
|
@@ -1522,7 +1468,7 @@ const Row = (props) => {
|
|
|
1522
1468
|
gutter,
|
|
1523
1469
|
onClick
|
|
1524
1470
|
} = {
|
|
1525
|
-
...defaultProps$
|
|
1471
|
+
...defaultProps$1k,
|
|
1526
1472
|
...props
|
|
1527
1473
|
};
|
|
1528
1474
|
const prefixCls = "nut-row";
|
|
@@ -1557,9 +1503,9 @@ const Row = (props) => {
|
|
|
1557
1503
|
children
|
|
1558
1504
|
));
|
|
1559
1505
|
};
|
|
1560
|
-
Row.defaultProps = defaultProps$
|
|
1506
|
+
Row.defaultProps = defaultProps$1k;
|
|
1561
1507
|
Row.displayName = "NutRow";
|
|
1562
|
-
const defaultProps$
|
|
1508
|
+
const defaultProps$1j = {
|
|
1563
1509
|
contentPosition: "center",
|
|
1564
1510
|
dashed: false,
|
|
1565
1511
|
hairline: true,
|
|
@@ -1576,7 +1522,7 @@ const Divider = (props) => {
|
|
|
1576
1522
|
direction,
|
|
1577
1523
|
...rest
|
|
1578
1524
|
} = {
|
|
1579
|
-
...defaultProps$
|
|
1525
|
+
...defaultProps$1j,
|
|
1580
1526
|
...props
|
|
1581
1527
|
};
|
|
1582
1528
|
const dividerBem = cn("divider");
|
|
@@ -1597,9 +1543,14 @@ const Divider = (props) => {
|
|
|
1597
1543
|
...rest
|
|
1598
1544
|
}, children);
|
|
1599
1545
|
};
|
|
1600
|
-
Divider.defaultProps = defaultProps$
|
|
1546
|
+
Divider.defaultProps = defaultProps$1j;
|
|
1601
1547
|
Divider.displayName = "NutDivider";
|
|
1602
|
-
const
|
|
1548
|
+
const gridContext = {
|
|
1549
|
+
onClick: (item, index) => {
|
|
1550
|
+
}
|
|
1551
|
+
};
|
|
1552
|
+
var GridContext = React__default.createContext(gridContext);
|
|
1553
|
+
const defaultProps$1i = {
|
|
1603
1554
|
columnNum: 4,
|
|
1604
1555
|
border: true,
|
|
1605
1556
|
gutter: 0,
|
|
@@ -1625,8 +1576,9 @@ const Grid = (props) => {
|
|
|
1625
1576
|
iconSize,
|
|
1626
1577
|
iconColor,
|
|
1627
1578
|
className,
|
|
1579
|
+
onClick,
|
|
1628
1580
|
...rest
|
|
1629
|
-
} = { ...defaultProps$
|
|
1581
|
+
} = { ...defaultProps$1i, ...props };
|
|
1630
1582
|
const childrenDom = React__default.Children.toArray(children);
|
|
1631
1583
|
const pxCheck2 = (value) => {
|
|
1632
1584
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1650,6 +1602,8 @@ const Grid = (props) => {
|
|
|
1650
1602
|
className: rootClass(),
|
|
1651
1603
|
style: rootStyle(),
|
|
1652
1604
|
...rest
|
|
1605
|
+
}, /* @__PURE__ */ React__default.createElement(GridContext.Provider, {
|
|
1606
|
+
value: { onClick }
|
|
1653
1607
|
}, childrenDom.map((item, idex) => {
|
|
1654
1608
|
return React__default.cloneElement(item, {
|
|
1655
1609
|
index: idex,
|
|
@@ -1663,11 +1617,11 @@ const Grid = (props) => {
|
|
|
1663
1617
|
parentIconSize: iconSize,
|
|
1664
1618
|
parentIconColor: iconColor
|
|
1665
1619
|
});
|
|
1666
|
-
}));
|
|
1620
|
+
})));
|
|
1667
1621
|
};
|
|
1668
|
-
Grid.defaultProps = defaultProps$
|
|
1622
|
+
Grid.defaultProps = defaultProps$1i;
|
|
1669
1623
|
Grid.displayName = "NutGrid";
|
|
1670
|
-
const defaultProps$
|
|
1624
|
+
const defaultProps$1h = {
|
|
1671
1625
|
...ComponentDefaults,
|
|
1672
1626
|
text: "",
|
|
1673
1627
|
icon: "",
|
|
@@ -1706,10 +1660,11 @@ const GridItem = (props) => {
|
|
|
1706
1660
|
onClick,
|
|
1707
1661
|
...rest
|
|
1708
1662
|
} = {
|
|
1709
|
-
...defaultProps$
|
|
1663
|
+
...defaultProps$1h,
|
|
1710
1664
|
...props
|
|
1711
1665
|
};
|
|
1712
1666
|
const b2 = cn("grid-item");
|
|
1667
|
+
const context = useContext(GridContext);
|
|
1713
1668
|
const pxCheck2 = (value) => {
|
|
1714
1669
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1715
1670
|
};
|
|
@@ -1736,6 +1691,25 @@ const GridItem = (props) => {
|
|
|
1736
1691
|
};
|
|
1737
1692
|
const handleClick2 = (e2) => {
|
|
1738
1693
|
onClick && onClick(e2);
|
|
1694
|
+
context.onClick && context.onClick(
|
|
1695
|
+
{
|
|
1696
|
+
text,
|
|
1697
|
+
icon,
|
|
1698
|
+
iconSize,
|
|
1699
|
+
iconColor,
|
|
1700
|
+
parentIconSize,
|
|
1701
|
+
parentIconColor,
|
|
1702
|
+
index,
|
|
1703
|
+
columnNum,
|
|
1704
|
+
border,
|
|
1705
|
+
gutter,
|
|
1706
|
+
center,
|
|
1707
|
+
square,
|
|
1708
|
+
reverse,
|
|
1709
|
+
direction
|
|
1710
|
+
},
|
|
1711
|
+
index
|
|
1712
|
+
);
|
|
1739
1713
|
};
|
|
1740
1714
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1741
1715
|
className: b2(),
|
|
@@ -1754,7 +1728,7 @@ const GridItem = (props) => {
|
|
|
1754
1728
|
className: "nut-grid-item__text"
|
|
1755
1729
|
}, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
|
|
1756
1730
|
};
|
|
1757
|
-
GridItem.defaultProps = defaultProps$
|
|
1731
|
+
GridItem.defaultProps = defaultProps$1h;
|
|
1758
1732
|
GridItem.displayName = "NutGridItem";
|
|
1759
1733
|
const defaultConfigRef = {
|
|
1760
1734
|
current: {
|
|
@@ -1766,20 +1740,20 @@ const getDefaultConfig = () => {
|
|
|
1766
1740
|
};
|
|
1767
1741
|
const useConfig = () => {
|
|
1768
1742
|
var _a;
|
|
1769
|
-
return (_a = useContext
|
|
1743
|
+
return (_a = useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1770
1744
|
};
|
|
1771
|
-
const ConfigContext = createContext
|
|
1772
|
-
const defaultProps$
|
|
1745
|
+
const ConfigContext = createContext(null);
|
|
1746
|
+
const defaultProps$1g = {};
|
|
1773
1747
|
const Sticky = (props) => {
|
|
1774
1748
|
useConfig();
|
|
1775
|
-
({ ...defaultProps$
|
|
1749
|
+
({ ...defaultProps$1g, ...props });
|
|
1776
1750
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1777
1751
|
className: "nut-sticky"
|
|
1778
1752
|
}, "Sticky");
|
|
1779
1753
|
};
|
|
1780
|
-
Sticky.defaultProps = defaultProps$
|
|
1754
|
+
Sticky.defaultProps = defaultProps$1g;
|
|
1781
1755
|
Sticky.displayName = "NutSticky";
|
|
1782
|
-
const defaultProps$
|
|
1756
|
+
const defaultProps$1f = {
|
|
1783
1757
|
...ComponentDefaults,
|
|
1784
1758
|
title: "",
|
|
1785
1759
|
desc: "",
|
|
@@ -1815,7 +1789,7 @@ const NavBar = (props) => {
|
|
|
1815
1789
|
iconClassPrefix,
|
|
1816
1790
|
iconFontClassName
|
|
1817
1791
|
} = {
|
|
1818
|
-
...defaultProps$
|
|
1792
|
+
...defaultProps$1f,
|
|
1819
1793
|
...props
|
|
1820
1794
|
};
|
|
1821
1795
|
const b2 = cn("navbar");
|
|
@@ -1884,9 +1858,9 @@ const NavBar = (props) => {
|
|
|
1884
1858
|
className: `${b2("")}--placeholder`
|
|
1885
1859
|
}, renderWrapper()) : renderWrapper());
|
|
1886
1860
|
};
|
|
1887
|
-
NavBar.defaultProps = defaultProps$
|
|
1861
|
+
NavBar.defaultProps = defaultProps$1f;
|
|
1888
1862
|
NavBar.displayName = "NutNavBar";
|
|
1889
|
-
const defaultProps$
|
|
1863
|
+
const defaultProps$1e = {
|
|
1890
1864
|
...ComponentDefaults,
|
|
1891
1865
|
fixednavClass: "nut-fixednav",
|
|
1892
1866
|
activeText: "",
|
|
@@ -1916,7 +1890,7 @@ const FixedNav = (props) => {
|
|
|
1916
1890
|
iconFontClassName,
|
|
1917
1891
|
...rest
|
|
1918
1892
|
} = {
|
|
1919
|
-
...defaultProps$
|
|
1893
|
+
...defaultProps$1e,
|
|
1920
1894
|
...props
|
|
1921
1895
|
};
|
|
1922
1896
|
const b2 = cn("fixednav");
|
|
@@ -1971,9 +1945,9 @@ const FixedNav = (props) => {
|
|
|
1971
1945
|
className: "text"
|
|
1972
1946
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
1973
1947
|
};
|
|
1974
|
-
FixedNav.defaultProps = defaultProps$
|
|
1948
|
+
FixedNav.defaultProps = defaultProps$1e;
|
|
1975
1949
|
FixedNav.displayName = "NutFixedNav";
|
|
1976
|
-
const defaultProps$
|
|
1950
|
+
const defaultProps$1d = {
|
|
1977
1951
|
visible: 0,
|
|
1978
1952
|
bottom: false,
|
|
1979
1953
|
size: 20,
|
|
@@ -2001,7 +1975,7 @@ const Tabbar = (props) => {
|
|
|
2001
1975
|
tabSwitch,
|
|
2002
1976
|
onSwitch
|
|
2003
1977
|
} = {
|
|
2004
|
-
...defaultProps$
|
|
1978
|
+
...defaultProps$1d,
|
|
2005
1979
|
...props
|
|
2006
1980
|
};
|
|
2007
1981
|
const b2 = cn("tabbar");
|
|
@@ -2037,9 +2011,9 @@ const Tabbar = (props) => {
|
|
|
2037
2011
|
return React__default.cloneElement(child, childProps);
|
|
2038
2012
|
}));
|
|
2039
2013
|
};
|
|
2040
|
-
Tabbar.defaultProps = defaultProps$
|
|
2014
|
+
Tabbar.defaultProps = defaultProps$1d;
|
|
2041
2015
|
Tabbar.displayName = "NutTabbar";
|
|
2042
|
-
const defaultProps$
|
|
2016
|
+
const defaultProps$1c = {
|
|
2043
2017
|
...ComponentDefaults,
|
|
2044
2018
|
dot: false,
|
|
2045
2019
|
size: "",
|
|
@@ -2075,7 +2049,7 @@ const TabbarItem = (props) => {
|
|
|
2075
2049
|
iconClassPrefix,
|
|
2076
2050
|
iconFontClassName
|
|
2077
2051
|
} = {
|
|
2078
|
-
...defaultProps$
|
|
2052
|
+
...defaultProps$1c,
|
|
2079
2053
|
...props
|
|
2080
2054
|
};
|
|
2081
2055
|
const b2 = cn("tabbar-item");
|
|
@@ -2124,8 +2098,8 @@ var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
2124
2098
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2125
2099
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
2126
2100
|
var index_cjs = require$$0;
|
|
2127
|
-
const elevatorContext = createContext
|
|
2128
|
-
const defaultProps$
|
|
2101
|
+
const elevatorContext = createContext({});
|
|
2102
|
+
const defaultProps$1b = {
|
|
2129
2103
|
height: "200px",
|
|
2130
2104
|
acceptKey: "title",
|
|
2131
2105
|
indexList: [],
|
|
@@ -2148,7 +2122,7 @@ const Elevator = (props) => {
|
|
|
2148
2122
|
children,
|
|
2149
2123
|
...rest
|
|
2150
2124
|
} = {
|
|
2151
|
-
...defaultProps$
|
|
2125
|
+
...defaultProps$1b,
|
|
2152
2126
|
...props
|
|
2153
2127
|
};
|
|
2154
2128
|
const b2 = cn("elevator");
|
|
@@ -2348,9 +2322,9 @@ const Elevator = (props) => {
|
|
|
2348
2322
|
}, item[acceptKey]);
|
|
2349
2323
|
}))));
|
|
2350
2324
|
};
|
|
2351
|
-
Elevator.defaultProps = defaultProps$
|
|
2325
|
+
Elevator.defaultProps = defaultProps$1b;
|
|
2352
2326
|
Elevator.displayName = "NutElevator";
|
|
2353
|
-
const defaultProps$
|
|
2327
|
+
const defaultProps$1a = {
|
|
2354
2328
|
defaultValue: 1,
|
|
2355
2329
|
mode: "multi",
|
|
2356
2330
|
prevText: "",
|
|
@@ -2367,7 +2341,7 @@ const defaultProps$1b = {
|
|
|
2367
2341
|
};
|
|
2368
2342
|
const Pagination = (props) => {
|
|
2369
2343
|
const { locale } = useConfig$1();
|
|
2370
|
-
({ ...defaultProps$
|
|
2344
|
+
({ ...defaultProps$1a, ...props });
|
|
2371
2345
|
const {
|
|
2372
2346
|
modelValue,
|
|
2373
2347
|
mode,
|
|
@@ -2484,7 +2458,7 @@ const Pagination = (props) => {
|
|
|
2484
2458
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2485
2459
|
}, nextText || locale.pagination.next));
|
|
2486
2460
|
};
|
|
2487
|
-
Pagination.defaultProps = defaultProps$
|
|
2461
|
+
Pagination.defaultProps = defaultProps$1a;
|
|
2488
2462
|
Pagination.displayName = "NutPagination";
|
|
2489
2463
|
class Title {
|
|
2490
2464
|
constructor() {
|
|
@@ -2494,7 +2468,7 @@ class Title {
|
|
|
2494
2468
|
this.index = 0;
|
|
2495
2469
|
}
|
|
2496
2470
|
}
|
|
2497
|
-
const defaultProps$
|
|
2471
|
+
const defaultProps$19 = {
|
|
2498
2472
|
...ComponentDefaults,
|
|
2499
2473
|
tabStyle: {},
|
|
2500
2474
|
value: 0,
|
|
@@ -2535,7 +2509,7 @@ const Tabs = (props) => {
|
|
|
2535
2509
|
iconFontClassName,
|
|
2536
2510
|
...rest
|
|
2537
2511
|
} = {
|
|
2538
|
-
...defaultProps$
|
|
2512
|
+
...defaultProps$19,
|
|
2539
2513
|
...props
|
|
2540
2514
|
};
|
|
2541
2515
|
const [currentItem, setCurrentItem] = useState({ index: 0 });
|
|
@@ -2580,7 +2554,7 @@ const Tabs = (props) => {
|
|
|
2580
2554
|
color: type === "smile" ? color : "",
|
|
2581
2555
|
background: type === "line" ? color : ""
|
|
2582
2556
|
};
|
|
2583
|
-
const index = titles.current.findIndex((
|
|
2557
|
+
const index = titles.current.findIndex((t) => t.paneKey === value);
|
|
2584
2558
|
const contentStyle = {
|
|
2585
2559
|
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
2586
2560
|
transitionDuration: `${animatedTime}ms`
|
|
@@ -2653,9 +2627,9 @@ const Tabs = (props) => {
|
|
|
2653
2627
|
return React__default.cloneElement(child, childProps);
|
|
2654
2628
|
}))));
|
|
2655
2629
|
};
|
|
2656
|
-
Tabs.defaultProps = defaultProps$
|
|
2630
|
+
Tabs.defaultProps = defaultProps$19;
|
|
2657
2631
|
Tabs.displayName = "NutTabs";
|
|
2658
|
-
const defaultProps$
|
|
2632
|
+
const defaultProps$18 = {
|
|
2659
2633
|
title: "",
|
|
2660
2634
|
paneKey: "",
|
|
2661
2635
|
activeKey: "",
|
|
@@ -2663,7 +2637,7 @@ const defaultProps$19 = {
|
|
|
2663
2637
|
};
|
|
2664
2638
|
const TabPane = (props) => {
|
|
2665
2639
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2666
|
-
...defaultProps$
|
|
2640
|
+
...defaultProps$18,
|
|
2667
2641
|
...props
|
|
2668
2642
|
};
|
|
2669
2643
|
const b2 = cn("tabpane");
|
|
@@ -2679,7 +2653,7 @@ const TabPane = (props) => {
|
|
|
2679
2653
|
className: classes
|
|
2680
2654
|
}, children);
|
|
2681
2655
|
};
|
|
2682
|
-
const defaultProps$
|
|
2656
|
+
const defaultProps$17 = {
|
|
2683
2657
|
size: 3,
|
|
2684
2658
|
current: 1,
|
|
2685
2659
|
block: false,
|
|
@@ -2699,7 +2673,7 @@ const Indicator = (props) => {
|
|
|
2699
2673
|
vertical,
|
|
2700
2674
|
...rest
|
|
2701
2675
|
} = {
|
|
2702
|
-
...defaultProps$
|
|
2676
|
+
...defaultProps$17,
|
|
2703
2677
|
...props
|
|
2704
2678
|
};
|
|
2705
2679
|
const b2 = cn("indicator");
|
|
@@ -2733,7 +2707,7 @@ const Indicator = (props) => {
|
|
|
2733
2707
|
...rest
|
|
2734
2708
|
}, renderEles());
|
|
2735
2709
|
};
|
|
2736
|
-
Indicator.defaultProps = defaultProps$
|
|
2710
|
+
Indicator.defaultProps = defaultProps$17;
|
|
2737
2711
|
Indicator.displayName = "NutIndicator";
|
|
2738
2712
|
const handleClick = (e2) => {
|
|
2739
2713
|
e2.stopPropagation();
|
|
@@ -2748,8 +2722,8 @@ const handleClick = (e2) => {
|
|
|
2748
2722
|
arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
|
|
2749
2723
|
}
|
|
2750
2724
|
};
|
|
2751
|
-
const OffsetContext = createContext
|
|
2752
|
-
const defaultProps$
|
|
2725
|
+
const OffsetContext = createContext(20);
|
|
2726
|
+
const defaultProps$16 = {
|
|
2753
2727
|
showhead: false,
|
|
2754
2728
|
position: "left",
|
|
2755
2729
|
width: "80%"
|
|
@@ -2767,7 +2741,7 @@ const SideNavBar = (props) => {
|
|
|
2767
2741
|
onClose,
|
|
2768
2742
|
...rest
|
|
2769
2743
|
} = {
|
|
2770
|
-
...defaultProps$
|
|
2744
|
+
...defaultProps$16,
|
|
2771
2745
|
...props
|
|
2772
2746
|
};
|
|
2773
2747
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2795,17 +2769,17 @@ const SideNavBar = (props) => {
|
|
|
2795
2769
|
className: "nut-sidenavbar__content"
|
|
2796
2770
|
}, children))))));
|
|
2797
2771
|
};
|
|
2798
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2772
|
+
SideNavBar.defaultProps = defaultProps$16;
|
|
2799
2773
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2800
|
-
const defaultProps$
|
|
2774
|
+
const defaultProps$15 = {
|
|
2801
2775
|
open: true
|
|
2802
2776
|
};
|
|
2803
2777
|
const SubSideNavBar = (props) => {
|
|
2804
2778
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2805
|
-
...defaultProps$
|
|
2779
|
+
...defaultProps$15,
|
|
2806
2780
|
...props
|
|
2807
2781
|
};
|
|
2808
|
-
const offset = useContext
|
|
2782
|
+
const offset = useContext(OffsetContext);
|
|
2809
2783
|
console.log("offset>>>>>>>", offset);
|
|
2810
2784
|
const listRef = useRef(null);
|
|
2811
2785
|
const setListLevel = useCallback(
|
|
@@ -2873,7 +2847,7 @@ const SideNavBarItem = (props) => {
|
|
|
2873
2847
|
...rest
|
|
2874
2848
|
}, title);
|
|
2875
2849
|
};
|
|
2876
|
-
const defaultProps$
|
|
2850
|
+
const defaultProps$14 = {
|
|
2877
2851
|
...ComponentDefaults,
|
|
2878
2852
|
className: "",
|
|
2879
2853
|
style: {},
|
|
@@ -2896,7 +2870,7 @@ const Menu = (props) => {
|
|
|
2896
2870
|
iconFontClassName,
|
|
2897
2871
|
...rest
|
|
2898
2872
|
} = {
|
|
2899
|
-
...defaultProps$
|
|
2873
|
+
...defaultProps$14,
|
|
2900
2874
|
...props
|
|
2901
2875
|
};
|
|
2902
2876
|
const parentRef = useRef(null);
|
|
@@ -2993,9 +2967,9 @@ const Menu = (props) => {
|
|
|
2993
2967
|
})));
|
|
2994
2968
|
})), cloneChildren()));
|
|
2995
2969
|
};
|
|
2996
|
-
Menu.defaultProps = defaultProps$
|
|
2970
|
+
Menu.defaultProps = defaultProps$14;
|
|
2997
2971
|
Menu.displayName = "NutMenu";
|
|
2998
|
-
const defaultProps$
|
|
2972
|
+
const defaultProps$13 = {
|
|
2999
2973
|
...ComponentDefaults,
|
|
3000
2974
|
className: "",
|
|
3001
2975
|
style: {},
|
|
@@ -3010,7 +2984,7 @@ const defaultProps$14 = {
|
|
|
3010
2984
|
};
|
|
3011
2985
|
const MenuItem = forwardRef((props, ref) => {
|
|
3012
2986
|
useConfig$1();
|
|
3013
|
-
const mergedProps = { ...defaultProps$
|
|
2987
|
+
const mergedProps = { ...defaultProps$13, ...props };
|
|
3014
2988
|
const {
|
|
3015
2989
|
style,
|
|
3016
2990
|
options,
|
|
@@ -3026,7 +3000,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
3026
3000
|
iconClassPrefix,
|
|
3027
3001
|
iconFontClassName
|
|
3028
3002
|
} = {
|
|
3029
|
-
...defaultProps$
|
|
3003
|
+
...defaultProps$13,
|
|
3030
3004
|
...props
|
|
3031
3005
|
};
|
|
3032
3006
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -3064,8 +3038,8 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
3064
3038
|
});
|
|
3065
3039
|
const getParentOffset = () => {
|
|
3066
3040
|
setTimeout(async () => {
|
|
3067
|
-
const
|
|
3068
|
-
const rect = await
|
|
3041
|
+
const p = parent.parent().current;
|
|
3042
|
+
const rect = await p.getBoundingClientRect();
|
|
3069
3043
|
setPosition({
|
|
3070
3044
|
height: rect.height,
|
|
3071
3045
|
top: rect.top
|
|
@@ -3147,14 +3121,14 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
3147
3121
|
}, item.text));
|
|
3148
3122
|
}), children))));
|
|
3149
3123
|
});
|
|
3150
|
-
MenuItem.defaultProps = defaultProps$
|
|
3124
|
+
MenuItem.defaultProps = defaultProps$13;
|
|
3151
3125
|
MenuItem.displayName = "NutMenuItem";
|
|
3152
3126
|
const MIN_DISTANCE = 10;
|
|
3153
|
-
function getDirection(
|
|
3154
|
-
if (
|
|
3127
|
+
function getDirection(x, y) {
|
|
3128
|
+
if (x > y && x > MIN_DISTANCE) {
|
|
3155
3129
|
return "horizontal";
|
|
3156
3130
|
}
|
|
3157
|
-
if (
|
|
3131
|
+
if (y > x && y > MIN_DISTANCE) {
|
|
3158
3132
|
return "vertical";
|
|
3159
3133
|
}
|
|
3160
3134
|
return "";
|
|
@@ -3218,7 +3192,7 @@ const getRectByTaro = async (element) => {
|
|
|
3218
3192
|
const res = await element.getBoundingClientRect();
|
|
3219
3193
|
return res;
|
|
3220
3194
|
};
|
|
3221
|
-
const defaultProps$
|
|
3195
|
+
const defaultProps$12 = {
|
|
3222
3196
|
name: "",
|
|
3223
3197
|
size: "",
|
|
3224
3198
|
classPrefix: "nut-icon",
|
|
@@ -3246,7 +3220,7 @@ function Icon(props) {
|
|
|
3246
3220
|
onClick,
|
|
3247
3221
|
...rest
|
|
3248
3222
|
} = {
|
|
3249
|
-
...defaultProps$
|
|
3223
|
+
...defaultProps$12,
|
|
3250
3224
|
...props
|
|
3251
3225
|
};
|
|
3252
3226
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3280,9 +3254,9 @@ function Icon(props) {
|
|
|
3280
3254
|
children
|
|
3281
3255
|
);
|
|
3282
3256
|
}
|
|
3283
|
-
Icon.defaultProps = defaultProps$
|
|
3257
|
+
Icon.defaultProps = defaultProps$12;
|
|
3284
3258
|
Icon.displayName = "NutIcon";
|
|
3285
|
-
const defaultProps$
|
|
3259
|
+
const defaultProps$11 = {
|
|
3286
3260
|
id: "",
|
|
3287
3261
|
style: {},
|
|
3288
3262
|
icon: null,
|
|
@@ -3327,7 +3301,7 @@ const Toast = (props) => {
|
|
|
3327
3301
|
visible,
|
|
3328
3302
|
onClose,
|
|
3329
3303
|
...rest
|
|
3330
|
-
} = { ...defaultProps$
|
|
3304
|
+
} = { ...defaultProps$11, ...props };
|
|
3331
3305
|
let timer;
|
|
3332
3306
|
const [openState, SetOpenState] = useState(false);
|
|
3333
3307
|
useEffect(() => {
|
|
@@ -3416,9 +3390,9 @@ const Toast = (props) => {
|
|
|
3416
3390
|
className: toastBem("text")
|
|
3417
3391
|
}, msg))) : null);
|
|
3418
3392
|
};
|
|
3419
|
-
Toast.defaultProps = defaultProps$
|
|
3393
|
+
Toast.defaultProps = defaultProps$11;
|
|
3420
3394
|
Toast.displayName = "NutToast";
|
|
3421
|
-
const defaultProps$
|
|
3395
|
+
const defaultProps$10 = {
|
|
3422
3396
|
range: false,
|
|
3423
3397
|
hiddenRange: false,
|
|
3424
3398
|
hiddenTag: false,
|
|
@@ -3455,8 +3429,8 @@ const Range = (props) => {
|
|
|
3455
3429
|
minDesc,
|
|
3456
3430
|
maxDesc,
|
|
3457
3431
|
curValueDesc
|
|
3458
|
-
} = { ...defaultProps$
|
|
3459
|
-
let { min, max, step } = { ...defaultProps$
|
|
3432
|
+
} = { ...defaultProps$10, ...props };
|
|
3433
|
+
let { min, max, step } = { ...defaultProps$10, ...props };
|
|
3460
3434
|
min = Number(min);
|
|
3461
3435
|
max = Number(max);
|
|
3462
3436
|
step = Number(step);
|
|
@@ -3807,11 +3781,11 @@ const Range = (props) => {
|
|
|
3807
3781
|
}
|
|
3808
3782
|
}));
|
|
3809
3783
|
};
|
|
3810
|
-
Range.defaultProps = defaultProps$
|
|
3784
|
+
Range.defaultProps = defaultProps$10;
|
|
3811
3785
|
Range.displayName = "NutRange";
|
|
3812
3786
|
const Utils = {
|
|
3813
|
-
isLeapYear(
|
|
3814
|
-
return
|
|
3787
|
+
isLeapYear(y) {
|
|
3788
|
+
return y % 4 == 0 && y % 100 != 0 || y % 400 == 0;
|
|
3815
3789
|
},
|
|
3816
3790
|
getWhatDay(year, month, day) {
|
|
3817
3791
|
const date = new Date(`${year}/${month}/${day}`);
|
|
@@ -3855,16 +3829,16 @@ const Utils = {
|
|
|
3855
3829
|
31
|
|
3856
3830
|
][month];
|
|
3857
3831
|
},
|
|
3858
|
-
getNumTwoBit(
|
|
3859
|
-
|
|
3860
|
-
return (
|
|
3832
|
+
getNumTwoBit(n) {
|
|
3833
|
+
n = Number(n);
|
|
3834
|
+
return (n > 9 ? "" : "0") + n;
|
|
3861
3835
|
},
|
|
3862
3836
|
date2Str(date, split) {
|
|
3863
3837
|
split = split || "-";
|
|
3864
|
-
const
|
|
3865
|
-
const
|
|
3866
|
-
const
|
|
3867
|
-
return [
|
|
3838
|
+
const y = date.getFullYear();
|
|
3839
|
+
const m = this.getNumTwoBit(date.getMonth() + 1);
|
|
3840
|
+
const d = this.getNumTwoBit(date.getDate());
|
|
3841
|
+
return [y, m, d].join(split);
|
|
3868
3842
|
},
|
|
3869
3843
|
getDay(i) {
|
|
3870
3844
|
i = i || 0;
|
|
@@ -3901,7 +3875,7 @@ function requestAniFrame() {
|
|
|
3901
3875
|
};
|
|
3902
3876
|
}
|
|
3903
3877
|
var requestAniFrame$1 = requestAniFrame();
|
|
3904
|
-
const defaultProps
|
|
3878
|
+
const defaultProps$$ = {
|
|
3905
3879
|
type: "one",
|
|
3906
3880
|
isAutoBackFill: false,
|
|
3907
3881
|
poppable: true,
|
|
@@ -3930,7 +3904,7 @@ const CalendarItem = (props) => {
|
|
|
3930
3904
|
onChoose,
|
|
3931
3905
|
onUpdate,
|
|
3932
3906
|
onClose
|
|
3933
|
-
} = { ...defaultProps
|
|
3907
|
+
} = { ...defaultProps$$, ...props };
|
|
3934
3908
|
const weeks = locale.calendaritem.weekdays;
|
|
3935
3909
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3936
3910
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -4091,9 +4065,9 @@ const CalendarItem = (props) => {
|
|
|
4091
4065
|
if (type2 === "prev" && days >= 7) {
|
|
4092
4066
|
days -= 7;
|
|
4093
4067
|
}
|
|
4094
|
-
return Array.from(Array(days), (
|
|
4068
|
+
return Array.from(Array(days), (v, k) => {
|
|
4095
4069
|
return {
|
|
4096
|
-
day:
|
|
4070
|
+
day: k + 1,
|
|
4097
4071
|
type: type2
|
|
4098
4072
|
};
|
|
4099
4073
|
});
|
|
@@ -4166,16 +4140,16 @@ const CalendarItem = (props) => {
|
|
|
4166
4140
|
const setMove = (move, type2, time) => {
|
|
4167
4141
|
var _a, _b;
|
|
4168
4142
|
let updateMove = move + state.transformY;
|
|
4169
|
-
const
|
|
4143
|
+
const h = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4170
4144
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4171
4145
|
if (type2 === "end") {
|
|
4172
4146
|
if (updateMove > 0) {
|
|
4173
4147
|
updateMove = 0;
|
|
4174
4148
|
}
|
|
4175
|
-
if (updateMove < 0 && updateMove < -offsetHeight +
|
|
4176
|
-
updateMove = -offsetHeight +
|
|
4149
|
+
if (updateMove < 0 && updateMove < -offsetHeight + h) {
|
|
4150
|
+
updateMove = -offsetHeight + h;
|
|
4177
4151
|
}
|
|
4178
|
-
if (offsetHeight <=
|
|
4152
|
+
if (offsetHeight <= h && state.monthsData.length === 1) {
|
|
4179
4153
|
updateMove = 0;
|
|
4180
4154
|
}
|
|
4181
4155
|
setTransform(updateMove, type2, time);
|
|
@@ -4183,8 +4157,8 @@ const CalendarItem = (props) => {
|
|
|
4183
4157
|
if (updateMove > 0 && updateMove > 100) {
|
|
4184
4158
|
updateMove = 100;
|
|
4185
4159
|
}
|
|
4186
|
-
if (updateMove < -offsetHeight +
|
|
4187
|
-
updateMove = -offsetHeight +
|
|
4160
|
+
if (updateMove < -offsetHeight + h - 100 && state.monthsData.length > 1) {
|
|
4161
|
+
updateMove = -offsetHeight + h - 100;
|
|
4188
4162
|
}
|
|
4189
4163
|
if (updateMove < 0 && updateMove < -100 && state.monthsData.length === 1) {
|
|
4190
4164
|
updateMove = -100;
|
|
@@ -4221,11 +4195,11 @@ const CalendarItem = (props) => {
|
|
|
4221
4195
|
return false;
|
|
4222
4196
|
}
|
|
4223
4197
|
const updateMove = move + state.transformY;
|
|
4224
|
-
const
|
|
4198
|
+
const h = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4225
4199
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4226
4200
|
if (updateMove > 0) {
|
|
4227
4201
|
getMonth(getCurrData("prev"), "prev");
|
|
4228
|
-
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) >
|
|
4202
|
+
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h ? Math.abs(move) : h) * 5) {
|
|
4229
4203
|
getMonth(getCurrData("next"), "next");
|
|
4230
4204
|
if (Math.abs(move) >= 300) {
|
|
4231
4205
|
getMonth(getCurrData("next"), "next");
|
|
@@ -4354,9 +4328,9 @@ const CalendarItem = (props) => {
|
|
|
4354
4328
|
onClick: confirm
|
|
4355
4329
|
}, locale.confirm)) : ""));
|
|
4356
4330
|
};
|
|
4357
|
-
CalendarItem.defaultProps = defaultProps
|
|
4331
|
+
CalendarItem.defaultProps = defaultProps$$;
|
|
4358
4332
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4359
|
-
const defaultProps
|
|
4333
|
+
const defaultProps$_ = {
|
|
4360
4334
|
type: "one",
|
|
4361
4335
|
isAutoBackFill: false,
|
|
4362
4336
|
poppable: true,
|
|
@@ -4384,7 +4358,7 @@ const Calendar = (props) => {
|
|
|
4384
4358
|
endDate,
|
|
4385
4359
|
onClose,
|
|
4386
4360
|
onChoose
|
|
4387
|
-
} = { ...defaultProps
|
|
4361
|
+
} = { ...defaultProps$_, ...props };
|
|
4388
4362
|
const close = () => {
|
|
4389
4363
|
onClose && onClose();
|
|
4390
4364
|
};
|
|
@@ -4430,9 +4404,9 @@ const Calendar = (props) => {
|
|
|
4430
4404
|
onChoose: choose
|
|
4431
4405
|
}));
|
|
4432
4406
|
};
|
|
4433
|
-
Calendar.defaultProps = defaultProps
|
|
4407
|
+
Calendar.defaultProps = defaultProps$_;
|
|
4434
4408
|
Calendar.displayName = "NutCalendar";
|
|
4435
|
-
const defaultProps$
|
|
4409
|
+
const defaultProps$Z = {
|
|
4436
4410
|
disabled: false,
|
|
4437
4411
|
checkedValue: [],
|
|
4438
4412
|
max: void 0,
|
|
@@ -4442,7 +4416,7 @@ const defaultProps$_ = {
|
|
|
4442
4416
|
};
|
|
4443
4417
|
const CheckboxGroup = React__default.forwardRef(
|
|
4444
4418
|
(props, ref) => {
|
|
4445
|
-
const { children } = { ...defaultProps$
|
|
4419
|
+
const { children } = { ...defaultProps$Z, ...props };
|
|
4446
4420
|
const b2 = cn("checkboxgroup");
|
|
4447
4421
|
const {
|
|
4448
4422
|
className,
|
|
@@ -4475,7 +4449,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
4475
4449
|
childrenLabel.push(childProps.label || child.children);
|
|
4476
4450
|
});
|
|
4477
4451
|
const reverse = childrenLabel.filter(
|
|
4478
|
-
(
|
|
4452
|
+
(c) => (innerValue == null ? void 0 : innerValue.findIndex((v) => v === c)) === -1
|
|
4479
4453
|
);
|
|
4480
4454
|
setInnerValue(reverse);
|
|
4481
4455
|
}
|
|
@@ -4549,9 +4523,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
4549
4523
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4550
4524
|
}
|
|
4551
4525
|
);
|
|
4552
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4526
|
+
CheckboxGroup.defaultProps = defaultProps$Z;
|
|
4553
4527
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4554
|
-
const defaultProps$
|
|
4528
|
+
const defaultProps$Y = {
|
|
4555
4529
|
...ComponentDefaults,
|
|
4556
4530
|
checked: false,
|
|
4557
4531
|
disabled: false,
|
|
@@ -4567,7 +4541,7 @@ const defaultProps$Z = {
|
|
|
4567
4541
|
};
|
|
4568
4542
|
const Checkbox = (props) => {
|
|
4569
4543
|
const { children } = {
|
|
4570
|
-
...defaultProps$
|
|
4544
|
+
...defaultProps$Y,
|
|
4571
4545
|
...props
|
|
4572
4546
|
};
|
|
4573
4547
|
const b2 = cn("checkbox");
|
|
@@ -4649,7 +4623,7 @@ const Checkbox = (props) => {
|
|
|
4649
4623
|
onClick: handleClick2
|
|
4650
4624
|
}, renderIcon(), renderLabel());
|
|
4651
4625
|
};
|
|
4652
|
-
Checkbox.defaultProps = defaultProps$
|
|
4626
|
+
Checkbox.defaultProps = defaultProps$Y;
|
|
4653
4627
|
Checkbox.displayName = "NutCheckBox";
|
|
4654
4628
|
Checkbox.Group = CheckboxGroup;
|
|
4655
4629
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -5096,7 +5070,7 @@ const InternalPicker = (props, ref) => {
|
|
|
5096
5070
|
};
|
|
5097
5071
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
5098
5072
|
const currentYear = new Date().getFullYear();
|
|
5099
|
-
const defaultProps$
|
|
5073
|
+
const defaultProps$X = {
|
|
5100
5074
|
modelValue: null,
|
|
5101
5075
|
visible: false,
|
|
5102
5076
|
title: "",
|
|
@@ -5127,7 +5101,7 @@ const DatePicker = (props) => {
|
|
|
5127
5101
|
style,
|
|
5128
5102
|
...rest
|
|
5129
5103
|
} = {
|
|
5130
|
-
...defaultProps$
|
|
5104
|
+
...defaultProps$X,
|
|
5131
5105
|
...props
|
|
5132
5106
|
};
|
|
5133
5107
|
const [show, setShow] = useState(false);
|
|
@@ -5335,21 +5309,21 @@ const DatePicker = (props) => {
|
|
|
5335
5309
|
const getDateIndex = (type2) => {
|
|
5336
5310
|
if (!currentDate)
|
|
5337
5311
|
return 0;
|
|
5338
|
-
let
|
|
5312
|
+
let d = 0;
|
|
5339
5313
|
if (type2 === "year") {
|
|
5340
|
-
|
|
5314
|
+
d = currentDate.getFullYear();
|
|
5341
5315
|
} else if (type2 === "month") {
|
|
5342
|
-
|
|
5316
|
+
d = currentDate.getMonth() + 1;
|
|
5343
5317
|
} else if (type2 === "day") {
|
|
5344
|
-
|
|
5318
|
+
d = currentDate.getDate();
|
|
5345
5319
|
} else if (type2 === "hour") {
|
|
5346
|
-
|
|
5320
|
+
d = currentDate.getHours();
|
|
5347
5321
|
} else if (type2 === "minute") {
|
|
5348
|
-
|
|
5322
|
+
d = currentDate.getMinutes();
|
|
5349
5323
|
} else if (type2 === "seconds") {
|
|
5350
|
-
|
|
5324
|
+
d = currentDate.getSeconds();
|
|
5351
5325
|
}
|
|
5352
|
-
return
|
|
5326
|
+
return d;
|
|
5353
5327
|
};
|
|
5354
5328
|
const columns = (date) => {
|
|
5355
5329
|
const val = ranges(date).map((res, columnIndex) => {
|
|
@@ -5392,9 +5366,9 @@ const DatePicker = (props) => {
|
|
|
5392
5366
|
ref: pickerRef
|
|
5393
5367
|
}));
|
|
5394
5368
|
};
|
|
5395
|
-
DatePicker.defaultProps = defaultProps$
|
|
5369
|
+
DatePicker.defaultProps = defaultProps$X;
|
|
5396
5370
|
DatePicker.displayName = "NutDatePicker";
|
|
5397
|
-
const defaultProps$
|
|
5371
|
+
const defaultProps$W = {
|
|
5398
5372
|
...ComponentDefaults,
|
|
5399
5373
|
disabled: false,
|
|
5400
5374
|
buttonSize: "",
|
|
@@ -5441,7 +5415,7 @@ const InputNumber = (props) => {
|
|
|
5441
5415
|
iconFontClassName,
|
|
5442
5416
|
...restProps
|
|
5443
5417
|
} = {
|
|
5444
|
-
...defaultProps$
|
|
5418
|
+
...defaultProps$W,
|
|
5445
5419
|
...props
|
|
5446
5420
|
};
|
|
5447
5421
|
const [inputValue, setInputValue] = useState(modelValue);
|
|
@@ -5472,8 +5446,8 @@ const InputNumber = (props) => {
|
|
|
5472
5446
|
const iconAddClasses = classNames("nut-inputnumber__icon", {
|
|
5473
5447
|
"nut-inputnumber__icon--disabled": !addAllow()
|
|
5474
5448
|
});
|
|
5475
|
-
const fixedDecimalPlaces = (
|
|
5476
|
-
return Number(
|
|
5449
|
+
const fixedDecimalPlaces = (v) => {
|
|
5450
|
+
return Number(v).toFixed(Number(decimalPlaces));
|
|
5477
5451
|
};
|
|
5478
5452
|
const emitChange = (value, e2) => {
|
|
5479
5453
|
const outputValue = fixedDecimalPlaces(value);
|
|
@@ -5577,7 +5551,7 @@ const InputNumber = (props) => {
|
|
|
5577
5551
|
onClick: addNumber
|
|
5578
5552
|
}));
|
|
5579
5553
|
};
|
|
5580
|
-
InputNumber.defaultProps = defaultProps$
|
|
5554
|
+
InputNumber.defaultProps = defaultProps$W;
|
|
5581
5555
|
InputNumber.displayName = "NutInputNumber";
|
|
5582
5556
|
function trimExtraChar(value, char, regExp) {
|
|
5583
5557
|
const index = value.indexOf(char);
|
|
@@ -5603,7 +5577,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5603
5577
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5604
5578
|
return value.replace(regExp, "");
|
|
5605
5579
|
}
|
|
5606
|
-
const defaultProps$
|
|
5580
|
+
const defaultProps$V = {
|
|
5607
5581
|
...ComponentDefaults,
|
|
5608
5582
|
type: "text",
|
|
5609
5583
|
name: "",
|
|
@@ -5700,7 +5674,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
5700
5674
|
iconFontClassName,
|
|
5701
5675
|
...rest
|
|
5702
5676
|
} = {
|
|
5703
|
-
...defaultProps$
|
|
5677
|
+
...defaultProps$V,
|
|
5704
5678
|
...props
|
|
5705
5679
|
};
|
|
5706
5680
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5931,14 +5905,14 @@ const Input = forwardRef((props, ref) => {
|
|
|
5931
5905
|
}
|
|
5932
5906
|
}, errorMessage) : null)));
|
|
5933
5907
|
});
|
|
5934
|
-
Input.defaultProps = defaultProps$
|
|
5908
|
+
Input.defaultProps = defaultProps$V;
|
|
5935
5909
|
Input.displayName = "NutInput";
|
|
5936
5910
|
const radioContext = {
|
|
5937
5911
|
onChange: (val) => {
|
|
5938
5912
|
}
|
|
5939
5913
|
};
|
|
5940
5914
|
var RadioContext = React__default.createContext(radioContext);
|
|
5941
|
-
const defaultProps$
|
|
5915
|
+
const defaultProps$U = {
|
|
5942
5916
|
value: null,
|
|
5943
5917
|
textPosition: "right",
|
|
5944
5918
|
onChange: (value) => {
|
|
@@ -5948,7 +5922,7 @@ const defaultProps$V = {
|
|
|
5948
5922
|
};
|
|
5949
5923
|
const RadioGroup = React__default.forwardRef(
|
|
5950
5924
|
(props, ref) => {
|
|
5951
|
-
const { children } = { ...defaultProps$
|
|
5925
|
+
const { children } = { ...defaultProps$U, ...props };
|
|
5952
5926
|
cn("RadioGroup");
|
|
5953
5927
|
const {
|
|
5954
5928
|
className,
|
|
@@ -6013,9 +5987,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
6013
5987
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
6014
5988
|
}
|
|
6015
5989
|
);
|
|
6016
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5990
|
+
RadioGroup.defaultProps = defaultProps$U;
|
|
6017
5991
|
RadioGroup.displayName = "NutRadioGroup";
|
|
6018
|
-
const defaultProps$
|
|
5992
|
+
const defaultProps$T = {
|
|
6019
5993
|
...ComponentDefaults,
|
|
6020
5994
|
disabled: false,
|
|
6021
5995
|
checked: false,
|
|
@@ -6030,7 +6004,7 @@ const defaultProps$U = {
|
|
|
6030
6004
|
};
|
|
6031
6005
|
const Radio$1 = (props) => {
|
|
6032
6006
|
const { children } = {
|
|
6033
|
-
...defaultProps$
|
|
6007
|
+
...defaultProps$T,
|
|
6034
6008
|
...props
|
|
6035
6009
|
};
|
|
6036
6010
|
const {
|
|
@@ -6052,7 +6026,7 @@ const Radio$1 = (props) => {
|
|
|
6052
6026
|
const [checkedStatement, setCheckedStatement] = useState(checked);
|
|
6053
6027
|
const [valueStatement, setValueStatement] = useState(value);
|
|
6054
6028
|
const [disabledStatement, setDisabledStatement] = useState(disabled);
|
|
6055
|
-
const
|
|
6029
|
+
const context = useContext(RadioContext);
|
|
6056
6030
|
useEffect(() => {
|
|
6057
6031
|
setDisabledStatement(disabled);
|
|
6058
6032
|
setValueStatement(value);
|
|
@@ -6101,7 +6075,7 @@ const Radio$1 = (props) => {
|
|
|
6101
6075
|
return;
|
|
6102
6076
|
setCheckedStatement(!checkedStatement);
|
|
6103
6077
|
onChange && onChange(e2);
|
|
6104
|
-
|
|
6078
|
+
context && context.onChange(valueStatement);
|
|
6105
6079
|
};
|
|
6106
6080
|
const reverseState = textPosition === "left";
|
|
6107
6081
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -6110,11 +6084,11 @@ const Radio$1 = (props) => {
|
|
|
6110
6084
|
...rest
|
|
6111
6085
|
}, renderRadioItem());
|
|
6112
6086
|
};
|
|
6113
|
-
Radio$1.defaultProps = defaultProps$
|
|
6087
|
+
Radio$1.defaultProps = defaultProps$T;
|
|
6114
6088
|
Radio$1.displayName = "NutRadio";
|
|
6115
6089
|
Radio$1.RadioGroup = RadioGroup;
|
|
6116
6090
|
var Radio = Radio$1;
|
|
6117
|
-
const defaultProps$
|
|
6091
|
+
const defaultProps$S = {
|
|
6118
6092
|
...ComponentDefaults,
|
|
6119
6093
|
count: 5,
|
|
6120
6094
|
modelValue: 0,
|
|
@@ -6149,7 +6123,7 @@ const Rate = (props) => {
|
|
|
6149
6123
|
iconClassPrefix,
|
|
6150
6124
|
iconFontClassName
|
|
6151
6125
|
} = {
|
|
6152
|
-
...defaultProps$
|
|
6126
|
+
...defaultProps$S,
|
|
6153
6127
|
...props
|
|
6154
6128
|
};
|
|
6155
6129
|
const b2 = cn("rate");
|
|
@@ -6182,43 +6156,43 @@ const Rate = (props) => {
|
|
|
6182
6156
|
setScore(value);
|
|
6183
6157
|
onChange && onChange(value);
|
|
6184
6158
|
};
|
|
6185
|
-
const onHalfClick = (event,
|
|
6159
|
+
const onHalfClick = (event, n) => {
|
|
6186
6160
|
event.preventDefault();
|
|
6187
6161
|
event.stopPropagation();
|
|
6188
|
-
const value = Math.max(Number(minimizeValue),
|
|
6162
|
+
const value = Math.max(Number(minimizeValue), n - 0.5);
|
|
6189
6163
|
setScore(value);
|
|
6190
6164
|
onChange && onChange(value);
|
|
6191
6165
|
};
|
|
6192
6166
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6193
6167
|
className: `${b2()} ${className}`,
|
|
6194
6168
|
style
|
|
6195
|
-
}, countArray.map((
|
|
6169
|
+
}, countArray.map((n) => {
|
|
6196
6170
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6197
6171
|
className: bi(),
|
|
6198
|
-
key:
|
|
6199
|
-
onClick: (event) => onClick(event,
|
|
6172
|
+
key: n,
|
|
6173
|
+
onClick: (event) => onClick(event, n),
|
|
6200
6174
|
style: { marginRight: pxCheck2(spacing) }
|
|
6201
6175
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6202
6176
|
classPrefix: iconClassPrefix,
|
|
6203
6177
|
fontClassName: iconFontClassName,
|
|
6204
6178
|
size: iconSize,
|
|
6205
|
-
className: `${bi("icon")} ${disabled ||
|
|
6206
|
-
name:
|
|
6207
|
-
color:
|
|
6208
|
-
}), allowHalf && score >
|
|
6179
|
+
className: `${bi("icon")} ${disabled || n > score ? bi("icon--disabled") : ""}`,
|
|
6180
|
+
name: n <= score ? checkedIcon : uncheckedIcon,
|
|
6181
|
+
color: n <= score ? activeColor : voidColor
|
|
6182
|
+
}), allowHalf && score > n - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6209
6183
|
classPrefix: iconClassPrefix,
|
|
6210
6184
|
fontClassName: iconFontClassName,
|
|
6211
|
-
onClick: (event) => onHalfClick(event,
|
|
6185
|
+
onClick: (event) => onHalfClick(event, n),
|
|
6212
6186
|
className: `${bi("icon")} ${bi("icon--half")}`,
|
|
6213
|
-
color:
|
|
6187
|
+
color: n <= score ? activeColor : voidColor,
|
|
6214
6188
|
size: iconSize,
|
|
6215
6189
|
name: checkedIcon
|
|
6216
6190
|
}));
|
|
6217
6191
|
}));
|
|
6218
6192
|
};
|
|
6219
|
-
Rate.defaultProps = defaultProps$
|
|
6193
|
+
Rate.defaultProps = defaultProps$S;
|
|
6220
6194
|
Rate.displayName = "NutRate";
|
|
6221
|
-
const defaultProps$
|
|
6195
|
+
const defaultProps$R = {
|
|
6222
6196
|
...ComponentDefaults,
|
|
6223
6197
|
title: "",
|
|
6224
6198
|
desc: "",
|
|
@@ -6386,9 +6360,9 @@ const ShortPassword = (props) => {
|
|
|
6386
6360
|
onClick: () => sure()
|
|
6387
6361
|
}, locale.confirm)) : null)));
|
|
6388
6362
|
};
|
|
6389
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6363
|
+
ShortPassword.defaultProps = defaultProps$R;
|
|
6390
6364
|
ShortPassword.displayName = "NutShortPassword";
|
|
6391
|
-
const defaultProps$
|
|
6365
|
+
const defaultProps$Q = {
|
|
6392
6366
|
defaultValue: "",
|
|
6393
6367
|
textAlign: "left",
|
|
6394
6368
|
limitshow: false,
|
|
@@ -6416,7 +6390,7 @@ const TextArea = (props) => {
|
|
|
6416
6390
|
onChange,
|
|
6417
6391
|
onBlur,
|
|
6418
6392
|
onFocus
|
|
6419
|
-
} = { ...defaultProps$
|
|
6393
|
+
} = { ...defaultProps$Q, ...props };
|
|
6420
6394
|
const textareaBem = cn("textarea");
|
|
6421
6395
|
const [inputValue, SetInputValue] = useState("");
|
|
6422
6396
|
useEffect(() => {
|
|
@@ -6481,9 +6455,9 @@ const TextArea = (props) => {
|
|
|
6481
6455
|
className: textareaBem("limit")
|
|
6482
6456
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6483
6457
|
};
|
|
6484
|
-
TextArea.defaultProps = defaultProps$
|
|
6458
|
+
TextArea.defaultProps = defaultProps$Q;
|
|
6485
6459
|
TextArea.displayName = "NutTextArea";
|
|
6486
|
-
const defaultProps$
|
|
6460
|
+
const defaultProps$P = {
|
|
6487
6461
|
...ComponentDefaults,
|
|
6488
6462
|
className: "",
|
|
6489
6463
|
style: {},
|
|
@@ -6531,7 +6505,7 @@ const Progress = (props) => {
|
|
|
6531
6505
|
iconFontClassName,
|
|
6532
6506
|
...rest
|
|
6533
6507
|
} = {
|
|
6534
|
-
...defaultProps$
|
|
6508
|
+
...defaultProps$P,
|
|
6535
6509
|
...props
|
|
6536
6510
|
};
|
|
6537
6511
|
const b2 = cn("progress");
|
|
@@ -6609,7 +6583,7 @@ const Progress = (props) => {
|
|
|
6609
6583
|
color: iconColor
|
|
6610
6584
|
})));
|
|
6611
6585
|
};
|
|
6612
|
-
Progress.defaultProps = defaultProps$
|
|
6586
|
+
Progress.defaultProps = defaultProps$P;
|
|
6613
6587
|
Progress.displayName = "NutProgress";
|
|
6614
6588
|
class UploadOptions {
|
|
6615
6589
|
constructor() {
|
|
@@ -6707,7 +6681,7 @@ class Upload {
|
|
|
6707
6681
|
}
|
|
6708
6682
|
}
|
|
6709
6683
|
}
|
|
6710
|
-
const defaultProps$
|
|
6684
|
+
const defaultProps$O = {
|
|
6711
6685
|
...ComponentDefaults,
|
|
6712
6686
|
url: "",
|
|
6713
6687
|
maximum: 9,
|
|
@@ -6779,7 +6753,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6779
6753
|
onBeforeXhrUpload,
|
|
6780
6754
|
onBeforeDelete,
|
|
6781
6755
|
...restProps
|
|
6782
|
-
} = { ...defaultProps$
|
|
6756
|
+
} = { ...defaultProps$O, ...props };
|
|
6783
6757
|
const [fileList, setFileList] = useState([]);
|
|
6784
6758
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
6785
6759
|
useEffect(() => {
|
|
@@ -6964,8 +6938,8 @@ const InternalUploader = (props, ref) => {
|
|
|
6964
6938
|
const onChangeFn = (res) => {
|
|
6965
6939
|
const { tempFiles } = res;
|
|
6966
6940
|
if (onBeforeUpload) {
|
|
6967
|
-
onBeforeUpload(tempFiles).then((
|
|
6968
|
-
const _files = filterFiles(
|
|
6941
|
+
onBeforeUpload(tempFiles).then((f) => {
|
|
6942
|
+
const _files = filterFiles(f);
|
|
6969
6943
|
readFile(_files);
|
|
6970
6944
|
});
|
|
6971
6945
|
} else {
|
|
@@ -7067,9 +7041,9 @@ const InternalUploader = (props, ref) => {
|
|
|
7067
7041
|
})));
|
|
7068
7042
|
};
|
|
7069
7043
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
7070
|
-
Uploader.defaultProps = defaultProps$
|
|
7044
|
+
Uploader.defaultProps = defaultProps$O;
|
|
7071
7045
|
Uploader.displayName = "NutUploader";
|
|
7072
|
-
const defaultProps$
|
|
7046
|
+
const defaultProps$N = {
|
|
7073
7047
|
data: {
|
|
7074
7048
|
text: "",
|
|
7075
7049
|
value: "",
|
|
@@ -7085,7 +7059,7 @@ const defaultProps$O = {
|
|
|
7085
7059
|
};
|
|
7086
7060
|
const InternalCascaderItem = (props) => {
|
|
7087
7061
|
const { data, checked, chooseItem, activeColor } = {
|
|
7088
|
-
...defaultProps$
|
|
7062
|
+
...defaultProps$N,
|
|
7089
7063
|
...props
|
|
7090
7064
|
};
|
|
7091
7065
|
const b2 = cn("cascader-item");
|
|
@@ -7122,7 +7096,7 @@ const InternalCascaderItem = (props) => {
|
|
|
7122
7096
|
}));
|
|
7123
7097
|
};
|
|
7124
7098
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
7125
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7099
|
+
CascaderItem.defaultProps = defaultProps$N;
|
|
7126
7100
|
CascaderItem.displayName = "NutCascaderItem";
|
|
7127
7101
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
7128
7102
|
const {
|
|
@@ -7256,7 +7230,7 @@ class Tree {
|
|
|
7256
7230
|
return pathNodes;
|
|
7257
7231
|
}
|
|
7258
7232
|
}
|
|
7259
|
-
const defaultProps$
|
|
7233
|
+
const defaultProps$M = {
|
|
7260
7234
|
className: "",
|
|
7261
7235
|
style: {},
|
|
7262
7236
|
activeColor: "#fa2c19",
|
|
@@ -7306,7 +7280,7 @@ const InternalCascader = (props) => {
|
|
|
7306
7280
|
onClose,
|
|
7307
7281
|
onChange,
|
|
7308
7282
|
onPathChange
|
|
7309
|
-
} = { ...defaultProps$
|
|
7283
|
+
} = { ...defaultProps$M, ...props };
|
|
7310
7284
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
7311
7285
|
const [optiosData, setOptiosData] = useState([]);
|
|
7312
7286
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7401,9 +7375,9 @@ const InternalCascader = (props) => {
|
|
|
7401
7375
|
if (parent) {
|
|
7402
7376
|
needToSync = [parent.value];
|
|
7403
7377
|
state.initLoading = true;
|
|
7404
|
-
const last = await currentValue2.slice(1).reduce(async (
|
|
7378
|
+
const last = await currentValue2.slice(1).reduce(async (p, value2) => {
|
|
7405
7379
|
var _a;
|
|
7406
|
-
const parent2 = await
|
|
7380
|
+
const parent2 = await p;
|
|
7407
7381
|
await invokeLazyLoad(parent2);
|
|
7408
7382
|
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
7409
7383
|
(item) => item.value === value2
|
|
@@ -7566,9 +7540,9 @@ const InternalCascader = (props) => {
|
|
|
7566
7540
|
}, renderItem()) : renderItem());
|
|
7567
7541
|
};
|
|
7568
7542
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
7569
|
-
Cascader.defaultProps = defaultProps$
|
|
7543
|
+
Cascader.defaultProps = defaultProps$M;
|
|
7570
7544
|
Cascader.displayName = "NutCascader";
|
|
7571
|
-
const defaultProps$
|
|
7545
|
+
const defaultProps$L = {
|
|
7572
7546
|
...ComponentDefaults,
|
|
7573
7547
|
placeholder: "",
|
|
7574
7548
|
shape: "square",
|
|
@@ -7619,7 +7593,7 @@ const SearchBar = (props) => {
|
|
|
7619
7593
|
iconClassPrefix,
|
|
7620
7594
|
iconFontClassName
|
|
7621
7595
|
} = {
|
|
7622
|
-
...defaultProps$
|
|
7596
|
+
...defaultProps$L,
|
|
7623
7597
|
...props
|
|
7624
7598
|
};
|
|
7625
7599
|
const alignClass = `${align}`;
|
|
@@ -7773,9 +7747,9 @@ const SearchBar = (props) => {
|
|
|
7773
7747
|
className: "nut-searchbar__input-box"
|
|
7774
7748
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7775
7749
|
};
|
|
7776
|
-
SearchBar.defaultProps = defaultProps$
|
|
7750
|
+
SearchBar.defaultProps = defaultProps$L;
|
|
7777
7751
|
SearchBar.displayName = "NutSearchBar";
|
|
7778
|
-
const defaultProps$
|
|
7752
|
+
const defaultProps$K = {
|
|
7779
7753
|
confirmText: "",
|
|
7780
7754
|
title: "",
|
|
7781
7755
|
visible: false,
|
|
@@ -7973,1344 +7947,113 @@ const NumberKeyboard = (props) => {
|
|
|
7973
7947
|
})
|
|
7974
7948
|
}, confirmText || locale.done))) : null))));
|
|
7975
7949
|
};
|
|
7976
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7950
|
+
NumberKeyboard.defaultProps = defaultProps$K;
|
|
7977
7951
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7978
|
-
const defaultProps$
|
|
7952
|
+
const defaultProps$J = {};
|
|
7979
7953
|
const Form = (props) => {
|
|
7980
7954
|
useConfig();
|
|
7981
|
-
({ ...defaultProps$
|
|
7955
|
+
({ ...defaultProps$J, ...props });
|
|
7982
7956
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
7983
7957
|
className: "nut-form"
|
|
7984
7958
|
}, "Form");
|
|
7985
7959
|
};
|
|
7986
|
-
Form.defaultProps = defaultProps$
|
|
7960
|
+
Form.defaultProps = defaultProps$J;
|
|
7987
7961
|
Form.displayName = "NutForm";
|
|
7988
|
-
const FormItemContext = createContext
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
|
|
7962
|
+
const FormItemContext = createContext({});
|
|
7963
|
+
const defaultProps$I = {
|
|
7964
|
+
...ComponentDefaults,
|
|
7965
|
+
name: "",
|
|
7966
|
+
label: "",
|
|
7967
|
+
className: "",
|
|
7968
|
+
rules: [{ required: false, message: "" }],
|
|
7969
|
+
disabled: false,
|
|
7970
|
+
labelWidth: 90,
|
|
7971
|
+
errorMessageAlign: "left",
|
|
7972
|
+
showErrorLine: true,
|
|
7973
|
+
showErrorMessage: true
|
|
7974
|
+
};
|
|
7975
|
+
class FormItem extends React__default.Component {
|
|
7976
|
+
constructor() {
|
|
7977
|
+
super(...arguments);
|
|
7978
|
+
this.getControlled = (children) => {
|
|
7979
|
+
const { getFieldValue, setFieldsValue } = this.context;
|
|
7980
|
+
const { name } = this.props;
|
|
7981
|
+
const type = children.type.NAME;
|
|
7982
|
+
return {
|
|
7983
|
+
value: getFieldValue(name),
|
|
7984
|
+
onChange: (event) => {
|
|
7985
|
+
let newValue = event;
|
|
7986
|
+
switch (type) {
|
|
7987
|
+
case "checkbox":
|
|
7988
|
+
newValue = event.target.value;
|
|
7989
|
+
break;
|
|
7990
|
+
}
|
|
7991
|
+
setFieldsValue({ [name]: newValue });
|
|
7992
|
+
}
|
|
7993
|
+
};
|
|
7994
|
+
};
|
|
7995
|
+
this.onStoreChange = () => {
|
|
7996
|
+
this.forceUpdate();
|
|
7997
|
+
};
|
|
7998
|
+
this.renderLayout = (childNode) => {
|
|
7999
|
+
var _a, _b;
|
|
8000
|
+
const {
|
|
8001
|
+
label,
|
|
8002
|
+
name,
|
|
8003
|
+
rules = [{ required: false, message: "" }],
|
|
8004
|
+
className,
|
|
8005
|
+
labelWidth,
|
|
8006
|
+
errorMessageAlign,
|
|
8007
|
+
showErrorLine,
|
|
8008
|
+
showErrorMessage
|
|
8009
|
+
} = {
|
|
8010
|
+
...defaultProps$I,
|
|
8011
|
+
...this.props
|
|
8012
|
+
};
|
|
8013
|
+
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
8014
|
+
return item2.field === name;
|
|
8015
|
+
}));
|
|
8016
|
+
const { starPositon } = this.context;
|
|
8017
|
+
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default.createElement("i", {
|
|
8018
|
+
className: "required"
|
|
8019
|
+
});
|
|
8020
|
+
const renderLabel = starPositon === "Right" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, label, renderStar) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderStar, label);
|
|
8021
|
+
return /* @__PURE__ */ React__default.createElement(Cell, {
|
|
8022
|
+
className: `nut-form-item ${className}`
|
|
8023
|
+
}, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
8024
|
+
className: "nut-cell__title nut-form-item__label",
|
|
8025
|
+
style: {
|
|
8026
|
+
width: this.pxCheck(labelWidth)
|
|
8027
|
+
}
|
|
8028
|
+
}, renderLabel) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
8029
|
+
className: "nut-cell__value nut-form-item__body"
|
|
8030
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8031
|
+
className: "nut-form-item__body__slots"
|
|
8032
|
+
}, childNode), item.length > 0 && /* @__PURE__ */ React__default.createElement("div", {
|
|
8033
|
+
className: "nut-form-item__body__tips",
|
|
8034
|
+
style: { textAlign: errorMessageAlign }
|
|
8035
|
+
}, item[0].message)));
|
|
8036
|
+
};
|
|
8037
|
+
this.pxCheck = (value) => {
|
|
8038
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
8039
|
+
};
|
|
7995
8040
|
}
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
function resolvePathname(to2, from) {
|
|
7999
|
-
if (from === void 0)
|
|
8000
|
-
from = "";
|
|
8001
|
-
var toParts = to2 && to2.split("/") || [];
|
|
8002
|
-
var fromParts = from && from.split("/") || [];
|
|
8003
|
-
var isToAbs = to2 && isAbsolute(to2);
|
|
8004
|
-
var isFromAbs = from && isAbsolute(from);
|
|
8005
|
-
var mustEndAbs = isToAbs || isFromAbs;
|
|
8006
|
-
if (to2 && isAbsolute(to2)) {
|
|
8007
|
-
fromParts = toParts;
|
|
8008
|
-
} else if (toParts.length) {
|
|
8009
|
-
fromParts.pop();
|
|
8010
|
-
fromParts = fromParts.concat(toParts);
|
|
8011
|
-
}
|
|
8012
|
-
if (!fromParts.length)
|
|
8013
|
-
return "/";
|
|
8014
|
-
var hasTrailingSlash;
|
|
8015
|
-
if (fromParts.length) {
|
|
8016
|
-
var last = fromParts[fromParts.length - 1];
|
|
8017
|
-
hasTrailingSlash = last === "." || last === ".." || last === "";
|
|
8018
|
-
} else {
|
|
8019
|
-
hasTrailingSlash = false;
|
|
8020
|
-
}
|
|
8021
|
-
var up = 0;
|
|
8022
|
-
for (var i = fromParts.length; i >= 0; i--) {
|
|
8023
|
-
var part = fromParts[i];
|
|
8024
|
-
if (part === ".") {
|
|
8025
|
-
spliceOne(fromParts, i);
|
|
8026
|
-
} else if (part === "..") {
|
|
8027
|
-
spliceOne(fromParts, i);
|
|
8028
|
-
up++;
|
|
8029
|
-
} else if (up) {
|
|
8030
|
-
spliceOne(fromParts, i);
|
|
8031
|
-
up--;
|
|
8032
|
-
}
|
|
8033
|
-
}
|
|
8034
|
-
if (!mustEndAbs)
|
|
8035
|
-
for (; up--; up)
|
|
8036
|
-
fromParts.unshift("..");
|
|
8037
|
-
if (mustEndAbs && fromParts[0] !== "" && (!fromParts[0] || !isAbsolute(fromParts[0])))
|
|
8038
|
-
fromParts.unshift("");
|
|
8039
|
-
var result = fromParts.join("/");
|
|
8040
|
-
if (hasTrailingSlash && result.substr(-1) !== "/")
|
|
8041
|
-
result += "/";
|
|
8042
|
-
return result;
|
|
8043
|
-
}
|
|
8044
|
-
var isProduction = true;
|
|
8045
|
-
var prefix$1 = "Invariant failed";
|
|
8046
|
-
function invariant(condition, message) {
|
|
8047
|
-
if (condition) {
|
|
8048
|
-
return;
|
|
8041
|
+
componentDidMount() {
|
|
8042
|
+
this.cancelRegister = this.context.registerField(this);
|
|
8049
8043
|
}
|
|
8050
|
-
|
|
8051
|
-
|
|
8044
|
+
componentWillUnmount() {
|
|
8045
|
+
if (this.cancelRegister) {
|
|
8046
|
+
this.cancelRegister();
|
|
8047
|
+
}
|
|
8052
8048
|
}
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
var hashIndex = pathname.indexOf("#");
|
|
8062
|
-
if (hashIndex !== -1) {
|
|
8063
|
-
hash = pathname.substr(hashIndex);
|
|
8064
|
-
pathname = pathname.substr(0, hashIndex);
|
|
8065
|
-
}
|
|
8066
|
-
var searchIndex = pathname.indexOf("?");
|
|
8067
|
-
if (searchIndex !== -1) {
|
|
8068
|
-
search = pathname.substr(searchIndex);
|
|
8069
|
-
pathname = pathname.substr(0, searchIndex);
|
|
8070
|
-
}
|
|
8071
|
-
return {
|
|
8072
|
-
pathname,
|
|
8073
|
-
search: search === "?" ? "" : search,
|
|
8074
|
-
hash: hash === "#" ? "" : hash
|
|
8075
|
-
};
|
|
8076
|
-
}
|
|
8077
|
-
function createPath(location) {
|
|
8078
|
-
var pathname = location.pathname, search = location.search, hash = location.hash;
|
|
8079
|
-
var path = pathname || "/";
|
|
8080
|
-
if (search && search !== "?")
|
|
8081
|
-
path += search.charAt(0) === "?" ? search : "?" + search;
|
|
8082
|
-
if (hash && hash !== "#")
|
|
8083
|
-
path += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
8084
|
-
return path;
|
|
8085
|
-
}
|
|
8086
|
-
function createLocation(path, state, key, currentLocation) {
|
|
8087
|
-
var location;
|
|
8088
|
-
if (typeof path === "string") {
|
|
8089
|
-
location = parsePath(path);
|
|
8090
|
-
location.state = state;
|
|
8091
|
-
} else {
|
|
8092
|
-
location = _extends$3({}, path);
|
|
8093
|
-
if (location.pathname === void 0)
|
|
8094
|
-
location.pathname = "";
|
|
8095
|
-
if (location.search) {
|
|
8096
|
-
if (location.search.charAt(0) !== "?")
|
|
8097
|
-
location.search = "?" + location.search;
|
|
8098
|
-
} else {
|
|
8099
|
-
location.search = "";
|
|
8100
|
-
}
|
|
8101
|
-
if (location.hash) {
|
|
8102
|
-
if (location.hash.charAt(0) !== "#")
|
|
8103
|
-
location.hash = "#" + location.hash;
|
|
8104
|
-
} else {
|
|
8105
|
-
location.hash = "";
|
|
8106
|
-
}
|
|
8107
|
-
if (state !== void 0 && location.state === void 0)
|
|
8108
|
-
location.state = state;
|
|
8109
|
-
}
|
|
8110
|
-
try {
|
|
8111
|
-
location.pathname = decodeURI(location.pathname);
|
|
8112
|
-
} catch (e2) {
|
|
8113
|
-
if (e2 instanceof URIError) {
|
|
8114
|
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.');
|
|
8115
|
-
} else {
|
|
8116
|
-
throw e2;
|
|
8117
|
-
}
|
|
8118
|
-
}
|
|
8119
|
-
if (key)
|
|
8120
|
-
location.key = key;
|
|
8121
|
-
if (currentLocation) {
|
|
8122
|
-
if (!location.pathname) {
|
|
8123
|
-
location.pathname = currentLocation.pathname;
|
|
8124
|
-
} else if (location.pathname.charAt(0) !== "/") {
|
|
8125
|
-
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
8126
|
-
}
|
|
8127
|
-
} else {
|
|
8128
|
-
if (!location.pathname) {
|
|
8129
|
-
location.pathname = "/";
|
|
8130
|
-
}
|
|
8131
|
-
}
|
|
8132
|
-
return location;
|
|
8133
|
-
}
|
|
8134
|
-
function createTransitionManager() {
|
|
8135
|
-
var prompt = null;
|
|
8136
|
-
function setPrompt(nextPrompt) {
|
|
8137
|
-
prompt = nextPrompt;
|
|
8138
|
-
return function() {
|
|
8139
|
-
if (prompt === nextPrompt)
|
|
8140
|
-
prompt = null;
|
|
8141
|
-
};
|
|
8142
|
-
}
|
|
8143
|
-
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
8144
|
-
if (prompt != null) {
|
|
8145
|
-
var result = typeof prompt === "function" ? prompt(location, action) : prompt;
|
|
8146
|
-
if (typeof result === "string") {
|
|
8147
|
-
if (typeof getUserConfirmation === "function") {
|
|
8148
|
-
getUserConfirmation(result, callback);
|
|
8149
|
-
} else {
|
|
8150
|
-
callback(true);
|
|
8151
|
-
}
|
|
8152
|
-
} else {
|
|
8153
|
-
callback(result !== false);
|
|
8154
|
-
}
|
|
8155
|
-
} else {
|
|
8156
|
-
callback(true);
|
|
8157
|
-
}
|
|
8158
|
-
}
|
|
8159
|
-
var listeners = [];
|
|
8160
|
-
function appendListener(fn) {
|
|
8161
|
-
var isActive = true;
|
|
8162
|
-
function listener() {
|
|
8163
|
-
if (isActive)
|
|
8164
|
-
fn.apply(void 0, arguments);
|
|
8165
|
-
}
|
|
8166
|
-
listeners.push(listener);
|
|
8167
|
-
return function() {
|
|
8168
|
-
isActive = false;
|
|
8169
|
-
listeners = listeners.filter(function(item) {
|
|
8170
|
-
return item !== listener;
|
|
8171
|
-
});
|
|
8172
|
-
};
|
|
8173
|
-
}
|
|
8174
|
-
function notifyListeners() {
|
|
8175
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8176
|
-
args[_key] = arguments[_key];
|
|
8177
|
-
}
|
|
8178
|
-
listeners.forEach(function(listener) {
|
|
8179
|
-
return listener.apply(void 0, args);
|
|
8180
|
-
});
|
|
8181
|
-
}
|
|
8182
|
-
return {
|
|
8183
|
-
setPrompt,
|
|
8184
|
-
confirmTransitionTo,
|
|
8185
|
-
appendListener,
|
|
8186
|
-
notifyListeners
|
|
8187
|
-
};
|
|
8188
|
-
}
|
|
8189
|
-
function clamp$1(n2, lowerBound, upperBound) {
|
|
8190
|
-
return Math.min(Math.max(n2, lowerBound), upperBound);
|
|
8191
|
-
}
|
|
8192
|
-
function createMemoryHistory(props) {
|
|
8193
|
-
if (props === void 0) {
|
|
8194
|
-
props = {};
|
|
8195
|
-
}
|
|
8196
|
-
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;
|
|
8197
|
-
var transitionManager = createTransitionManager();
|
|
8198
|
-
function setState(nextState) {
|
|
8199
|
-
_extends$3(history, nextState);
|
|
8200
|
-
history.length = history.entries.length;
|
|
8201
|
-
transitionManager.notifyListeners(history.location, history.action);
|
|
8202
|
-
}
|
|
8203
|
-
function createKey() {
|
|
8204
|
-
return Math.random().toString(36).substr(2, keyLength);
|
|
8205
|
-
}
|
|
8206
|
-
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
8207
|
-
var entries = initialEntries.map(function(entry) {
|
|
8208
|
-
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
8209
|
-
});
|
|
8210
|
-
var createHref = createPath;
|
|
8211
|
-
function push(path, state) {
|
|
8212
|
-
var action = "PUSH";
|
|
8213
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
8214
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8215
|
-
if (!ok)
|
|
8216
|
-
return;
|
|
8217
|
-
var prevIndex = history.index;
|
|
8218
|
-
var nextIndex = prevIndex + 1;
|
|
8219
|
-
var nextEntries = history.entries.slice(0);
|
|
8220
|
-
if (nextEntries.length > nextIndex) {
|
|
8221
|
-
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
|
|
8222
|
-
} else {
|
|
8223
|
-
nextEntries.push(location);
|
|
8224
|
-
}
|
|
8225
|
-
setState({
|
|
8226
|
-
action,
|
|
8227
|
-
location,
|
|
8228
|
-
index: nextIndex,
|
|
8229
|
-
entries: nextEntries
|
|
8230
|
-
});
|
|
8231
|
-
});
|
|
8232
|
-
}
|
|
8233
|
-
function replace(path, state) {
|
|
8234
|
-
var action = "REPLACE";
|
|
8235
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
8236
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8237
|
-
if (!ok)
|
|
8238
|
-
return;
|
|
8239
|
-
history.entries[history.index] = location;
|
|
8240
|
-
setState({
|
|
8241
|
-
action,
|
|
8242
|
-
location
|
|
8243
|
-
});
|
|
8244
|
-
});
|
|
8245
|
-
}
|
|
8246
|
-
function go(n2) {
|
|
8247
|
-
var nextIndex = clamp$1(history.index + n2, 0, history.entries.length - 1);
|
|
8248
|
-
var action = "POP";
|
|
8249
|
-
var location = history.entries[nextIndex];
|
|
8250
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8251
|
-
if (ok) {
|
|
8252
|
-
setState({
|
|
8253
|
-
action,
|
|
8254
|
-
location,
|
|
8255
|
-
index: nextIndex
|
|
8256
|
-
});
|
|
8257
|
-
} else {
|
|
8258
|
-
setState();
|
|
8259
|
-
}
|
|
8260
|
-
});
|
|
8261
|
-
}
|
|
8262
|
-
function goBack() {
|
|
8263
|
-
go(-1);
|
|
8264
|
-
}
|
|
8265
|
-
function goForward() {
|
|
8266
|
-
go(1);
|
|
8267
|
-
}
|
|
8268
|
-
function canGo(n2) {
|
|
8269
|
-
var nextIndex = history.index + n2;
|
|
8270
|
-
return nextIndex >= 0 && nextIndex < history.entries.length;
|
|
8271
|
-
}
|
|
8272
|
-
function block(prompt) {
|
|
8273
|
-
if (prompt === void 0) {
|
|
8274
|
-
prompt = false;
|
|
8275
|
-
}
|
|
8276
|
-
return transitionManager.setPrompt(prompt);
|
|
8277
|
-
}
|
|
8278
|
-
function listen(listener) {
|
|
8279
|
-
return transitionManager.appendListener(listener);
|
|
8280
|
-
}
|
|
8281
|
-
var history = {
|
|
8282
|
-
length: entries.length,
|
|
8283
|
-
action: "POP",
|
|
8284
|
-
location: entries[index],
|
|
8285
|
-
index,
|
|
8286
|
-
entries,
|
|
8287
|
-
createHref,
|
|
8288
|
-
push,
|
|
8289
|
-
replace,
|
|
8290
|
-
go,
|
|
8291
|
-
goBack,
|
|
8292
|
-
goForward,
|
|
8293
|
-
canGo,
|
|
8294
|
-
block,
|
|
8295
|
-
listen
|
|
8296
|
-
};
|
|
8297
|
-
return history;
|
|
8298
|
-
}
|
|
8299
|
-
var pathToRegexp$2 = { exports: {} };
|
|
8300
|
-
var isarray$1 = Array.isArray || function(arr) {
|
|
8301
|
-
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
8302
|
-
};
|
|
8303
|
-
var isarray = isarray$1;
|
|
8304
|
-
pathToRegexp$2.exports = pathToRegexp;
|
|
8305
|
-
pathToRegexp$2.exports.parse = parse$1;
|
|
8306
|
-
pathToRegexp$2.exports.compile = compile;
|
|
8307
|
-
pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
|
|
8308
|
-
pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
|
|
8309
|
-
var PATH_REGEXP = new RegExp([
|
|
8310
|
-
"(\\\\.)",
|
|
8311
|
-
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
8312
|
-
].join("|"), "g");
|
|
8313
|
-
function parse$1(str, options) {
|
|
8314
|
-
var tokens = [];
|
|
8315
|
-
var key = 0;
|
|
8316
|
-
var index = 0;
|
|
8317
|
-
var path = "";
|
|
8318
|
-
var defaultDelimiter = options && options.delimiter || "/";
|
|
8319
|
-
var res;
|
|
8320
|
-
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
8321
|
-
var m2 = res[0];
|
|
8322
|
-
var escaped = res[1];
|
|
8323
|
-
var offset = res.index;
|
|
8324
|
-
path += str.slice(index, offset);
|
|
8325
|
-
index = offset + m2.length;
|
|
8326
|
-
if (escaped) {
|
|
8327
|
-
path += escaped[1];
|
|
8328
|
-
continue;
|
|
8329
|
-
}
|
|
8330
|
-
var next = str[index];
|
|
8331
|
-
var prefix2 = res[2];
|
|
8332
|
-
var name = res[3];
|
|
8333
|
-
var capture = res[4];
|
|
8334
|
-
var group = res[5];
|
|
8335
|
-
var modifier = res[6];
|
|
8336
|
-
var asterisk = res[7];
|
|
8337
|
-
if (path) {
|
|
8338
|
-
tokens.push(path);
|
|
8339
|
-
path = "";
|
|
8340
|
-
}
|
|
8341
|
-
var partial = prefix2 != null && next != null && next !== prefix2;
|
|
8342
|
-
var repeat = modifier === "+" || modifier === "*";
|
|
8343
|
-
var optional = modifier === "?" || modifier === "*";
|
|
8344
|
-
var delimiter = res[2] || defaultDelimiter;
|
|
8345
|
-
var pattern = capture || group;
|
|
8346
|
-
tokens.push({
|
|
8347
|
-
name: name || key++,
|
|
8348
|
-
prefix: prefix2 || "",
|
|
8349
|
-
delimiter,
|
|
8350
|
-
optional,
|
|
8351
|
-
repeat,
|
|
8352
|
-
partial,
|
|
8353
|
-
asterisk: !!asterisk,
|
|
8354
|
-
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
8355
|
-
});
|
|
8356
|
-
}
|
|
8357
|
-
if (index < str.length) {
|
|
8358
|
-
path += str.substr(index);
|
|
8359
|
-
}
|
|
8360
|
-
if (path) {
|
|
8361
|
-
tokens.push(path);
|
|
8362
|
-
}
|
|
8363
|
-
return tokens;
|
|
8364
|
-
}
|
|
8365
|
-
function compile(str, options) {
|
|
8366
|
-
return tokensToFunction(parse$1(str, options), options);
|
|
8367
|
-
}
|
|
8368
|
-
function encodeURIComponentPretty(str) {
|
|
8369
|
-
return encodeURI(str).replace(/[\/?#]/g, function(c6) {
|
|
8370
|
-
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8371
|
-
});
|
|
8372
|
-
}
|
|
8373
|
-
function encodeAsterisk(str) {
|
|
8374
|
-
return encodeURI(str).replace(/[?#]/g, function(c6) {
|
|
8375
|
-
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8376
|
-
});
|
|
8377
|
-
}
|
|
8378
|
-
function tokensToFunction(tokens, options) {
|
|
8379
|
-
var matches = new Array(tokens.length);
|
|
8380
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
8381
|
-
if (typeof tokens[i] === "object") {
|
|
8382
|
-
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
8383
|
-
}
|
|
8384
|
-
}
|
|
8385
|
-
return function(obj, opts) {
|
|
8386
|
-
var path = "";
|
|
8387
|
-
var data = obj || {};
|
|
8388
|
-
var options2 = opts || {};
|
|
8389
|
-
var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
8390
|
-
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8391
|
-
var token = tokens[i2];
|
|
8392
|
-
if (typeof token === "string") {
|
|
8393
|
-
path += token;
|
|
8394
|
-
continue;
|
|
8395
|
-
}
|
|
8396
|
-
var value = data[token.name];
|
|
8397
|
-
var segment;
|
|
8398
|
-
if (value == null) {
|
|
8399
|
-
if (token.optional) {
|
|
8400
|
-
if (token.partial) {
|
|
8401
|
-
path += token.prefix;
|
|
8402
|
-
}
|
|
8403
|
-
continue;
|
|
8404
|
-
} else {
|
|
8405
|
-
throw new TypeError('Expected "' + token.name + '" to be defined');
|
|
8406
|
-
}
|
|
8407
|
-
}
|
|
8408
|
-
if (isarray(value)) {
|
|
8409
|
-
if (!token.repeat) {
|
|
8410
|
-
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
|
|
8411
|
-
}
|
|
8412
|
-
if (value.length === 0) {
|
|
8413
|
-
if (token.optional) {
|
|
8414
|
-
continue;
|
|
8415
|
-
} else {
|
|
8416
|
-
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
8417
|
-
}
|
|
8418
|
-
}
|
|
8419
|
-
for (var j = 0; j < value.length; j++) {
|
|
8420
|
-
segment = encode(value[j]);
|
|
8421
|
-
if (!matches[i2].test(segment)) {
|
|
8422
|
-
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
|
|
8423
|
-
}
|
|
8424
|
-
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8425
|
-
}
|
|
8426
|
-
continue;
|
|
8427
|
-
}
|
|
8428
|
-
segment = token.asterisk ? encodeAsterisk(value) : encode(value);
|
|
8429
|
-
if (!matches[i2].test(segment)) {
|
|
8430
|
-
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
|
|
8431
|
-
}
|
|
8432
|
-
path += token.prefix + segment;
|
|
8433
|
-
}
|
|
8434
|
-
return path;
|
|
8435
|
-
};
|
|
8436
|
-
}
|
|
8437
|
-
function escapeString(str) {
|
|
8438
|
-
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
|
|
8439
|
-
}
|
|
8440
|
-
function escapeGroup(group) {
|
|
8441
|
-
return group.replace(/([=!:$\/()])/g, "\\$1");
|
|
8442
|
-
}
|
|
8443
|
-
function attachKeys(re, keys) {
|
|
8444
|
-
re.keys = keys;
|
|
8445
|
-
return re;
|
|
8446
|
-
}
|
|
8447
|
-
function flags(options) {
|
|
8448
|
-
return options && options.sensitive ? "" : "i";
|
|
8449
|
-
}
|
|
8450
|
-
function regexpToRegexp(path, keys) {
|
|
8451
|
-
var groups = path.source.match(/\((?!\?)/g);
|
|
8452
|
-
if (groups) {
|
|
8453
|
-
for (var i = 0; i < groups.length; i++) {
|
|
8454
|
-
keys.push({
|
|
8455
|
-
name: i,
|
|
8456
|
-
prefix: null,
|
|
8457
|
-
delimiter: null,
|
|
8458
|
-
optional: false,
|
|
8459
|
-
repeat: false,
|
|
8460
|
-
partial: false,
|
|
8461
|
-
asterisk: false,
|
|
8462
|
-
pattern: null
|
|
8463
|
-
});
|
|
8464
|
-
}
|
|
8465
|
-
}
|
|
8466
|
-
return attachKeys(path, keys);
|
|
8467
|
-
}
|
|
8468
|
-
function arrayToRegexp(path, keys, options) {
|
|
8469
|
-
var parts = [];
|
|
8470
|
-
for (var i = 0; i < path.length; i++) {
|
|
8471
|
-
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
8472
|
-
}
|
|
8473
|
-
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8474
|
-
return attachKeys(regexp, keys);
|
|
8475
|
-
}
|
|
8476
|
-
function stringToRegexp(path, keys, options) {
|
|
8477
|
-
return tokensToRegExp(parse$1(path, options), keys, options);
|
|
8478
|
-
}
|
|
8479
|
-
function tokensToRegExp(tokens, keys, options) {
|
|
8480
|
-
if (!isarray(keys)) {
|
|
8481
|
-
options = keys || options;
|
|
8482
|
-
keys = [];
|
|
8483
|
-
}
|
|
8484
|
-
options = options || {};
|
|
8485
|
-
var strict = options.strict;
|
|
8486
|
-
var end = options.end !== false;
|
|
8487
|
-
var route = "";
|
|
8488
|
-
for (var i = 0; i < tokens.length; i++) {
|
|
8489
|
-
var token = tokens[i];
|
|
8490
|
-
if (typeof token === "string") {
|
|
8491
|
-
route += escapeString(token);
|
|
8492
|
-
} else {
|
|
8493
|
-
var prefix2 = escapeString(token.prefix);
|
|
8494
|
-
var capture = "(?:" + token.pattern + ")";
|
|
8495
|
-
keys.push(token);
|
|
8496
|
-
if (token.repeat) {
|
|
8497
|
-
capture += "(?:" + prefix2 + capture + ")*";
|
|
8498
|
-
}
|
|
8499
|
-
if (token.optional) {
|
|
8500
|
-
if (!token.partial) {
|
|
8501
|
-
capture = "(?:" + prefix2 + "(" + capture + "))?";
|
|
8502
|
-
} else {
|
|
8503
|
-
capture = prefix2 + "(" + capture + ")?";
|
|
8504
|
-
}
|
|
8505
|
-
} else {
|
|
8506
|
-
capture = prefix2 + "(" + capture + ")";
|
|
8507
|
-
}
|
|
8508
|
-
route += capture;
|
|
8509
|
-
}
|
|
8510
|
-
}
|
|
8511
|
-
var delimiter = escapeString(options.delimiter || "/");
|
|
8512
|
-
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
8513
|
-
if (!strict) {
|
|
8514
|
-
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
8515
|
-
}
|
|
8516
|
-
if (end) {
|
|
8517
|
-
route += "$";
|
|
8518
|
-
} else {
|
|
8519
|
-
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
8520
|
-
}
|
|
8521
|
-
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
8522
|
-
}
|
|
8523
|
-
function pathToRegexp(path, keys, options) {
|
|
8524
|
-
if (!isarray(keys)) {
|
|
8525
|
-
options = keys || options;
|
|
8526
|
-
keys = [];
|
|
8527
|
-
}
|
|
8528
|
-
options = options || {};
|
|
8529
|
-
if (path instanceof RegExp) {
|
|
8530
|
-
return regexpToRegexp(path, keys);
|
|
8531
|
-
}
|
|
8532
|
-
if (isarray(path)) {
|
|
8533
|
-
return arrayToRegexp(path, keys, options);
|
|
8534
|
-
}
|
|
8535
|
-
return stringToRegexp(path, keys, options);
|
|
8536
|
-
}
|
|
8537
|
-
var pathToRegexp$1 = pathToRegexp$2.exports;
|
|
8538
|
-
var reactIs$1 = { exports: {} };
|
|
8539
|
-
var reactIs_production_min = {};
|
|
8540
|
-
/** @license React v16.13.1
|
|
8541
|
-
* react-is.production.min.js
|
|
8542
|
-
*
|
|
8543
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8544
|
-
*
|
|
8545
|
-
* This source code is licensed under the MIT license found in the
|
|
8546
|
-
* LICENSE file in the root directory of this source tree.
|
|
8547
|
-
*/
|
|
8548
|
-
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;
|
|
8549
|
-
function z(a) {
|
|
8550
|
-
if ("object" === typeof a && null !== a) {
|
|
8551
|
-
var u = a.$$typeof;
|
|
8552
|
-
switch (u) {
|
|
8553
|
-
case c:
|
|
8554
|
-
switch (a = a.type, a) {
|
|
8555
|
-
case l:
|
|
8556
|
-
case m:
|
|
8557
|
-
case e:
|
|
8558
|
-
case g:
|
|
8559
|
-
case f:
|
|
8560
|
-
case p:
|
|
8561
|
-
return a;
|
|
8562
|
-
default:
|
|
8563
|
-
switch (a = a && a.$$typeof, a) {
|
|
8564
|
-
case k:
|
|
8565
|
-
case n:
|
|
8566
|
-
case t:
|
|
8567
|
-
case r:
|
|
8568
|
-
case h:
|
|
8569
|
-
return a;
|
|
8570
|
-
default:
|
|
8571
|
-
return u;
|
|
8572
|
-
}
|
|
8573
|
-
}
|
|
8574
|
-
case d:
|
|
8575
|
-
return u;
|
|
8576
|
-
}
|
|
8577
|
-
}
|
|
8578
|
-
}
|
|
8579
|
-
function A(a) {
|
|
8580
|
-
return z(a) === m;
|
|
8581
|
-
}
|
|
8582
|
-
reactIs_production_min.AsyncMode = l;
|
|
8583
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
8584
|
-
reactIs_production_min.ContextConsumer = k;
|
|
8585
|
-
reactIs_production_min.ContextProvider = h;
|
|
8586
|
-
reactIs_production_min.Element = c;
|
|
8587
|
-
reactIs_production_min.ForwardRef = n;
|
|
8588
|
-
reactIs_production_min.Fragment = e;
|
|
8589
|
-
reactIs_production_min.Lazy = t;
|
|
8590
|
-
reactIs_production_min.Memo = r;
|
|
8591
|
-
reactIs_production_min.Portal = d;
|
|
8592
|
-
reactIs_production_min.Profiler = g;
|
|
8593
|
-
reactIs_production_min.StrictMode = f;
|
|
8594
|
-
reactIs_production_min.Suspense = p;
|
|
8595
|
-
reactIs_production_min.isAsyncMode = function(a) {
|
|
8596
|
-
return A(a) || z(a) === l;
|
|
8597
|
-
};
|
|
8598
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
8599
|
-
reactIs_production_min.isContextConsumer = function(a) {
|
|
8600
|
-
return z(a) === k;
|
|
8601
|
-
};
|
|
8602
|
-
reactIs_production_min.isContextProvider = function(a) {
|
|
8603
|
-
return z(a) === h;
|
|
8604
|
-
};
|
|
8605
|
-
reactIs_production_min.isElement = function(a) {
|
|
8606
|
-
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
8607
|
-
};
|
|
8608
|
-
reactIs_production_min.isForwardRef = function(a) {
|
|
8609
|
-
return z(a) === n;
|
|
8610
|
-
};
|
|
8611
|
-
reactIs_production_min.isFragment = function(a) {
|
|
8612
|
-
return z(a) === e;
|
|
8613
|
-
};
|
|
8614
|
-
reactIs_production_min.isLazy = function(a) {
|
|
8615
|
-
return z(a) === t;
|
|
8616
|
-
};
|
|
8617
|
-
reactIs_production_min.isMemo = function(a) {
|
|
8618
|
-
return z(a) === r;
|
|
8619
|
-
};
|
|
8620
|
-
reactIs_production_min.isPortal = function(a) {
|
|
8621
|
-
return z(a) === d;
|
|
8622
|
-
};
|
|
8623
|
-
reactIs_production_min.isProfiler = function(a) {
|
|
8624
|
-
return z(a) === g;
|
|
8625
|
-
};
|
|
8626
|
-
reactIs_production_min.isStrictMode = function(a) {
|
|
8627
|
-
return z(a) === f;
|
|
8628
|
-
};
|
|
8629
|
-
reactIs_production_min.isSuspense = function(a) {
|
|
8630
|
-
return z(a) === p;
|
|
8631
|
-
};
|
|
8632
|
-
reactIs_production_min.isValidElementType = function(a) {
|
|
8633
|
-
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);
|
|
8634
|
-
};
|
|
8635
|
-
reactIs_production_min.typeOf = z;
|
|
8636
|
-
{
|
|
8637
|
-
reactIs$1.exports = reactIs_production_min;
|
|
8638
|
-
}
|
|
8639
|
-
var reactIs = reactIs$1.exports;
|
|
8640
|
-
var FORWARD_REF_STATICS = {
|
|
8641
|
-
"$$typeof": true,
|
|
8642
|
-
render: true,
|
|
8643
|
-
defaultProps: true,
|
|
8644
|
-
displayName: true,
|
|
8645
|
-
propTypes: true
|
|
8646
|
-
};
|
|
8647
|
-
var MEMO_STATICS = {
|
|
8648
|
-
"$$typeof": true,
|
|
8649
|
-
compare: true,
|
|
8650
|
-
defaultProps: true,
|
|
8651
|
-
displayName: true,
|
|
8652
|
-
propTypes: true,
|
|
8653
|
-
type: true
|
|
8654
|
-
};
|
|
8655
|
-
var TYPE_STATICS = {};
|
|
8656
|
-
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
8657
|
-
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
8658
|
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
8659
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
8660
|
-
function getUniqueId() {
|
|
8661
|
-
var key = "__global_unique_id__";
|
|
8662
|
-
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
8663
|
-
}
|
|
8664
|
-
function objectIs(x2, y2) {
|
|
8665
|
-
if (x2 === y2) {
|
|
8666
|
-
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
8667
|
-
} else {
|
|
8668
|
-
return x2 !== x2 && y2 !== y2;
|
|
8669
|
-
}
|
|
8670
|
-
}
|
|
8671
|
-
function createEventEmitter(value) {
|
|
8672
|
-
var handlers = [];
|
|
8673
|
-
return {
|
|
8674
|
-
on: function on(handler) {
|
|
8675
|
-
handlers.push(handler);
|
|
8676
|
-
},
|
|
8677
|
-
off: function off(handler) {
|
|
8678
|
-
handlers = handlers.filter(function(h2) {
|
|
8679
|
-
return h2 !== handler;
|
|
8680
|
-
});
|
|
8681
|
-
},
|
|
8682
|
-
get: function get() {
|
|
8683
|
-
return value;
|
|
8684
|
-
},
|
|
8685
|
-
set: function set(newValue, changedBits) {
|
|
8686
|
-
value = newValue;
|
|
8687
|
-
handlers.forEach(function(handler) {
|
|
8688
|
-
return handler(value, changedBits);
|
|
8689
|
-
});
|
|
8690
|
-
}
|
|
8691
|
-
};
|
|
8692
|
-
}
|
|
8693
|
-
function onlyChild(children) {
|
|
8694
|
-
return Array.isArray(children) ? children[0] : children;
|
|
8695
|
-
}
|
|
8696
|
-
function createReactContext(defaultValue, calculateChangedBits) {
|
|
8697
|
-
var _Provider$childContex, _Consumer$contextType;
|
|
8698
|
-
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
8699
|
-
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
8700
|
-
_inheritsLoose(Provider2, _React$Component);
|
|
8701
|
-
function Provider2() {
|
|
8702
|
-
var _this;
|
|
8703
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8704
|
-
args[_key] = arguments[_key];
|
|
8705
|
-
}
|
|
8706
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8707
|
-
_this.emitter = createEventEmitter(_this.props.value);
|
|
8708
|
-
return _this;
|
|
8709
|
-
}
|
|
8710
|
-
var _proto = Provider2.prototype;
|
|
8711
|
-
_proto.getChildContext = function getChildContext() {
|
|
8712
|
-
var _ref;
|
|
8713
|
-
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
8714
|
-
};
|
|
8715
|
-
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8716
|
-
if (this.props.value !== nextProps.value) {
|
|
8717
|
-
var oldValue = this.props.value;
|
|
8718
|
-
var newValue = nextProps.value;
|
|
8719
|
-
var changedBits;
|
|
8720
|
-
if (objectIs(oldValue, newValue)) {
|
|
8721
|
-
changedBits = 0;
|
|
8722
|
-
} else {
|
|
8723
|
-
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
8724
|
-
changedBits |= 0;
|
|
8725
|
-
if (changedBits !== 0) {
|
|
8726
|
-
this.emitter.set(nextProps.value, changedBits);
|
|
8727
|
-
}
|
|
8728
|
-
}
|
|
8729
|
-
}
|
|
8730
|
-
};
|
|
8731
|
-
_proto.render = function render() {
|
|
8732
|
-
return this.props.children;
|
|
8733
|
-
};
|
|
8734
|
-
return Provider2;
|
|
8735
|
-
}(React__default.Component);
|
|
8736
|
-
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
8737
|
-
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
8738
|
-
_inheritsLoose(Consumer2, _React$Component2);
|
|
8739
|
-
function Consumer2() {
|
|
8740
|
-
var _this2;
|
|
8741
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
8742
|
-
args[_key2] = arguments[_key2];
|
|
8743
|
-
}
|
|
8744
|
-
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
8745
|
-
_this2.observedBits = void 0;
|
|
8746
|
-
_this2.state = {
|
|
8747
|
-
value: _this2.getValue()
|
|
8748
|
-
};
|
|
8749
|
-
_this2.onUpdate = function(newValue, changedBits) {
|
|
8750
|
-
var observedBits = _this2.observedBits | 0;
|
|
8751
|
-
if ((observedBits & changedBits) !== 0) {
|
|
8752
|
-
_this2.setState({
|
|
8753
|
-
value: _this2.getValue()
|
|
8754
|
-
});
|
|
8755
|
-
}
|
|
8756
|
-
};
|
|
8757
|
-
return _this2;
|
|
8758
|
-
}
|
|
8759
|
-
var _proto2 = Consumer2.prototype;
|
|
8760
|
-
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8761
|
-
var observedBits = nextProps.observedBits;
|
|
8762
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8763
|
-
};
|
|
8764
|
-
_proto2.componentDidMount = function componentDidMount() {
|
|
8765
|
-
if (this.context[contextProp]) {
|
|
8766
|
-
this.context[contextProp].on(this.onUpdate);
|
|
8767
|
-
}
|
|
8768
|
-
var observedBits = this.props.observedBits;
|
|
8769
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8770
|
-
};
|
|
8771
|
-
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
8772
|
-
if (this.context[contextProp]) {
|
|
8773
|
-
this.context[contextProp].off(this.onUpdate);
|
|
8774
|
-
}
|
|
8775
|
-
};
|
|
8776
|
-
_proto2.getValue = function getValue() {
|
|
8777
|
-
if (this.context[contextProp]) {
|
|
8778
|
-
return this.context[contextProp].get();
|
|
8779
|
-
} else {
|
|
8780
|
-
return defaultValue;
|
|
8781
|
-
}
|
|
8782
|
-
};
|
|
8783
|
-
_proto2.render = function render() {
|
|
8784
|
-
return onlyChild(this.props.children)(this.state.value);
|
|
8785
|
-
};
|
|
8786
|
-
return Consumer2;
|
|
8787
|
-
}(React__default.Component);
|
|
8788
|
-
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
8789
|
-
return {
|
|
8790
|
-
Provider,
|
|
8791
|
-
Consumer
|
|
8792
|
-
};
|
|
8793
|
-
}
|
|
8794
|
-
var createContext = React__default.createContext || createReactContext;
|
|
8795
|
-
var createNamedContext = function createNamedContext2(name) {
|
|
8796
|
-
var context2 = createContext();
|
|
8797
|
-
context2.displayName = name;
|
|
8798
|
-
return context2;
|
|
8799
|
-
};
|
|
8800
|
-
var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
|
|
8801
|
-
var context = /* @__PURE__ */ createNamedContext("Router");
|
|
8802
|
-
var Router = /* @__PURE__ */ function(_React$Component) {
|
|
8803
|
-
_inheritsLoose(Router2, _React$Component);
|
|
8804
|
-
Router2.computeRootMatch = function computeRootMatch(pathname) {
|
|
8805
|
-
return {
|
|
8806
|
-
path: "/",
|
|
8807
|
-
url: "/",
|
|
8808
|
-
params: {},
|
|
8809
|
-
isExact: pathname === "/"
|
|
8810
|
-
};
|
|
8811
|
-
};
|
|
8812
|
-
function Router2(props) {
|
|
8813
|
-
var _this;
|
|
8814
|
-
_this = _React$Component.call(this, props) || this;
|
|
8815
|
-
_this.state = {
|
|
8816
|
-
location: props.history.location
|
|
8817
|
-
};
|
|
8818
|
-
_this._isMounted = false;
|
|
8819
|
-
_this._pendingLocation = null;
|
|
8820
|
-
if (!props.staticContext) {
|
|
8821
|
-
_this.unlisten = props.history.listen(function(location) {
|
|
8822
|
-
_this._pendingLocation = location;
|
|
8823
|
-
});
|
|
8824
|
-
}
|
|
8825
|
-
return _this;
|
|
8826
|
-
}
|
|
8827
|
-
var _proto = Router2.prototype;
|
|
8828
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
8829
|
-
var _this2 = this;
|
|
8830
|
-
this._isMounted = true;
|
|
8831
|
-
if (this.unlisten) {
|
|
8832
|
-
this.unlisten();
|
|
8833
|
-
}
|
|
8834
|
-
if (!this.props.staticContext) {
|
|
8835
|
-
this.unlisten = this.props.history.listen(function(location) {
|
|
8836
|
-
if (_this2._isMounted) {
|
|
8837
|
-
_this2.setState({
|
|
8838
|
-
location
|
|
8839
|
-
});
|
|
8840
|
-
}
|
|
8841
|
-
});
|
|
8842
|
-
}
|
|
8843
|
-
if (this._pendingLocation) {
|
|
8844
|
-
this.setState({
|
|
8845
|
-
location: this._pendingLocation
|
|
8846
|
-
});
|
|
8847
|
-
}
|
|
8848
|
-
};
|
|
8849
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8850
|
-
if (this.unlisten) {
|
|
8851
|
-
this.unlisten();
|
|
8852
|
-
this._isMounted = false;
|
|
8853
|
-
this._pendingLocation = null;
|
|
8854
|
-
}
|
|
8855
|
-
};
|
|
8856
|
-
_proto.render = function render() {
|
|
8857
|
-
return /* @__PURE__ */ React__default.createElement(context.Provider, {
|
|
8858
|
-
value: {
|
|
8859
|
-
history: this.props.history,
|
|
8860
|
-
location: this.state.location,
|
|
8861
|
-
match: Router2.computeRootMatch(this.state.location.pathname),
|
|
8862
|
-
staticContext: this.props.staticContext
|
|
8863
|
-
}
|
|
8864
|
-
}, /* @__PURE__ */ React__default.createElement(historyContext.Provider, {
|
|
8865
|
-
children: this.props.children || null,
|
|
8866
|
-
value: this.props.history
|
|
8867
|
-
}));
|
|
8868
|
-
};
|
|
8869
|
-
return Router2;
|
|
8870
|
-
}(React__default.Component);
|
|
8871
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
8872
|
-
_inheritsLoose(MemoryRouter, _React$Component);
|
|
8873
|
-
function MemoryRouter() {
|
|
8874
|
-
var _this;
|
|
8875
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8876
|
-
args[_key] = arguments[_key];
|
|
8877
|
-
}
|
|
8878
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8879
|
-
_this.history = createMemoryHistory(_this.props);
|
|
8880
|
-
return _this;
|
|
8881
|
-
}
|
|
8882
|
-
var _proto = MemoryRouter.prototype;
|
|
8883
|
-
_proto.render = function render() {
|
|
8884
|
-
return /* @__PURE__ */ React__default.createElement(Router, {
|
|
8885
|
-
history: this.history,
|
|
8886
|
-
children: this.props.children
|
|
8887
|
-
});
|
|
8888
|
-
};
|
|
8889
|
-
return MemoryRouter;
|
|
8890
|
-
})(React__default.Component);
|
|
8891
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
8892
|
-
_inheritsLoose(Lifecycle, _React$Component);
|
|
8893
|
-
function Lifecycle() {
|
|
8894
|
-
return _React$Component.apply(this, arguments) || this;
|
|
8895
|
-
}
|
|
8896
|
-
var _proto = Lifecycle.prototype;
|
|
8897
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
8898
|
-
if (this.props.onMount)
|
|
8899
|
-
this.props.onMount.call(this, this);
|
|
8900
|
-
};
|
|
8901
|
-
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
8902
|
-
if (this.props.onUpdate)
|
|
8903
|
-
this.props.onUpdate.call(this, this, prevProps);
|
|
8904
|
-
};
|
|
8905
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8906
|
-
if (this.props.onUnmount)
|
|
8907
|
-
this.props.onUnmount.call(this, this);
|
|
8908
|
-
};
|
|
8909
|
-
_proto.render = function render() {
|
|
8910
|
-
return null;
|
|
8911
|
-
};
|
|
8912
|
-
return Lifecycle;
|
|
8913
|
-
})(React__default.Component);
|
|
8914
|
-
var cache$1 = {};
|
|
8915
|
-
var cacheLimit$1 = 1e4;
|
|
8916
|
-
var cacheCount$1 = 0;
|
|
8917
|
-
function compilePath$1(path, options) {
|
|
8918
|
-
var cacheKey2 = "" + options.end + options.strict + options.sensitive;
|
|
8919
|
-
var pathCache = cache$1[cacheKey2] || (cache$1[cacheKey2] = {});
|
|
8920
|
-
if (pathCache[path])
|
|
8921
|
-
return pathCache[path];
|
|
8922
|
-
var keys = [];
|
|
8923
|
-
var regexp = pathToRegexp$1(path, keys, options);
|
|
8924
|
-
var result = {
|
|
8925
|
-
regexp,
|
|
8926
|
-
keys
|
|
8927
|
-
};
|
|
8928
|
-
if (cacheCount$1 < cacheLimit$1) {
|
|
8929
|
-
pathCache[path] = result;
|
|
8930
|
-
cacheCount$1++;
|
|
8931
|
-
}
|
|
8932
|
-
return result;
|
|
8933
|
-
}
|
|
8934
|
-
function matchPath(pathname, options) {
|
|
8935
|
-
if (options === void 0) {
|
|
8936
|
-
options = {};
|
|
8937
|
-
}
|
|
8938
|
-
if (typeof options === "string" || Array.isArray(options)) {
|
|
8939
|
-
options = {
|
|
8940
|
-
path: options
|
|
8941
|
-
};
|
|
8942
|
-
}
|
|
8943
|
-
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;
|
|
8944
|
-
var paths = [].concat(path);
|
|
8945
|
-
return paths.reduce(function(matched, path2) {
|
|
8946
|
-
if (!path2 && path2 !== "")
|
|
8947
|
-
return null;
|
|
8948
|
-
if (matched)
|
|
8949
|
-
return matched;
|
|
8950
|
-
var _compilePath = compilePath$1(path2, {
|
|
8951
|
-
end: exact,
|
|
8952
|
-
strict,
|
|
8953
|
-
sensitive
|
|
8954
|
-
}), regexp = _compilePath.regexp, keys = _compilePath.keys;
|
|
8955
|
-
var match = regexp.exec(pathname);
|
|
8956
|
-
if (!match)
|
|
8957
|
-
return null;
|
|
8958
|
-
var url = match[0], values = match.slice(1);
|
|
8959
|
-
var isExact = pathname === url;
|
|
8960
|
-
if (exact && !isExact)
|
|
8961
|
-
return null;
|
|
8962
|
-
return {
|
|
8963
|
-
path: path2,
|
|
8964
|
-
url: path2 === "/" && url === "" ? "/" : url,
|
|
8965
|
-
isExact,
|
|
8966
|
-
params: keys.reduce(function(memo2, key, index) {
|
|
8967
|
-
memo2[key.name] = values[index];
|
|
8968
|
-
return memo2;
|
|
8969
|
-
}, {})
|
|
8970
|
-
};
|
|
8971
|
-
}, null);
|
|
8972
|
-
}
|
|
8973
|
-
function isEmptyChildren(children) {
|
|
8974
|
-
return React__default.Children.count(children) === 0;
|
|
8975
|
-
}
|
|
8976
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
8977
|
-
_inheritsLoose(Route, _React$Component);
|
|
8978
|
-
function Route() {
|
|
8979
|
-
return _React$Component.apply(this, arguments) || this;
|
|
8980
|
-
}
|
|
8981
|
-
var _proto = Route.prototype;
|
|
8982
|
-
_proto.render = function render() {
|
|
8983
|
-
var _this = this;
|
|
8984
|
-
return /* @__PURE__ */ React__default.createElement(context.Consumer, null, function(context$1) {
|
|
8985
|
-
!context$1 ? invariant(false) : void 0;
|
|
8986
|
-
var location = _this.props.location || context$1.location;
|
|
8987
|
-
var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
|
8988
|
-
var props = _extends$3({}, context$1, {
|
|
8989
|
-
location,
|
|
8990
|
-
match
|
|
8991
|
-
});
|
|
8992
|
-
var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
|
|
8993
|
-
if (Array.isArray(children) && isEmptyChildren(children)) {
|
|
8994
|
-
children = null;
|
|
8995
|
-
}
|
|
8996
|
-
return /* @__PURE__ */ React__default.createElement(context.Provider, {
|
|
8997
|
-
value: props
|
|
8998
|
-
}, props.match ? children ? typeof children === "function" ? children(props) : children : component ? /* @__PURE__ */ React__default.createElement(component, props) : render2 ? render2(props) : null : typeof children === "function" ? children(props) : null);
|
|
8999
|
-
});
|
|
9000
|
-
};
|
|
9001
|
-
return Route;
|
|
9002
|
-
})(React__default.Component);
|
|
9003
|
-
function addLeadingSlash(path) {
|
|
9004
|
-
return path.charAt(0) === "/" ? path : "/" + path;
|
|
9005
|
-
}
|
|
9006
|
-
function addBasename(basename, location) {
|
|
9007
|
-
if (!basename)
|
|
9008
|
-
return location;
|
|
9009
|
-
return _extends$3({}, location, {
|
|
9010
|
-
pathname: addLeadingSlash(basename) + location.pathname
|
|
9011
|
-
});
|
|
9012
|
-
}
|
|
9013
|
-
function stripBasename(basename, location) {
|
|
9014
|
-
if (!basename)
|
|
9015
|
-
return location;
|
|
9016
|
-
var base = addLeadingSlash(basename);
|
|
9017
|
-
if (location.pathname.indexOf(base) !== 0)
|
|
9018
|
-
return location;
|
|
9019
|
-
return _extends$3({}, location, {
|
|
9020
|
-
pathname: location.pathname.substr(base.length)
|
|
9021
|
-
});
|
|
9022
|
-
}
|
|
9023
|
-
function createURL(location) {
|
|
9024
|
-
return typeof location === "string" ? location : createPath(location);
|
|
9025
|
-
}
|
|
9026
|
-
function staticHandler(methodName) {
|
|
9027
|
-
return function() {
|
|
9028
|
-
invariant(false);
|
|
9029
|
-
};
|
|
9030
|
-
}
|
|
9031
|
-
function noop$2() {
|
|
9032
|
-
}
|
|
9033
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
9034
|
-
_inheritsLoose(StaticRouter, _React$Component);
|
|
9035
|
-
function StaticRouter() {
|
|
9036
|
-
var _this;
|
|
9037
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9038
|
-
args[_key] = arguments[_key];
|
|
9039
|
-
}
|
|
9040
|
-
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
9041
|
-
_this.handlePush = function(location) {
|
|
9042
|
-
return _this.navigateTo(location, "PUSH");
|
|
9043
|
-
};
|
|
9044
|
-
_this.handleReplace = function(location) {
|
|
9045
|
-
return _this.navigateTo(location, "REPLACE");
|
|
9046
|
-
};
|
|
9047
|
-
_this.handleListen = function() {
|
|
9048
|
-
return noop$2;
|
|
9049
|
-
};
|
|
9050
|
-
_this.handleBlock = function() {
|
|
9051
|
-
return noop$2;
|
|
9052
|
-
};
|
|
9053
|
-
return _this;
|
|
9054
|
-
}
|
|
9055
|
-
var _proto = StaticRouter.prototype;
|
|
9056
|
-
_proto.navigateTo = function navigateTo(location, action) {
|
|
9057
|
-
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;
|
|
9058
|
-
context2.action = action;
|
|
9059
|
-
context2.location = addBasename(basename, createLocation(location));
|
|
9060
|
-
context2.url = createURL(context2.location);
|
|
9061
|
-
};
|
|
9062
|
-
_proto.render = function render() {
|
|
9063
|
-
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"]);
|
|
9064
|
-
var history = {
|
|
9065
|
-
createHref: function createHref(path) {
|
|
9066
|
-
return addLeadingSlash(basename + createURL(path));
|
|
9067
|
-
},
|
|
9068
|
-
action: "POP",
|
|
9069
|
-
location: stripBasename(basename, createLocation(location)),
|
|
9070
|
-
push: this.handlePush,
|
|
9071
|
-
replace: this.handleReplace,
|
|
9072
|
-
go: staticHandler(),
|
|
9073
|
-
goBack: staticHandler(),
|
|
9074
|
-
goForward: staticHandler(),
|
|
9075
|
-
listen: this.handleListen,
|
|
9076
|
-
block: this.handleBlock
|
|
9077
|
-
};
|
|
9078
|
-
return /* @__PURE__ */ React__default.createElement(Router, _extends$3({}, rest, {
|
|
9079
|
-
history,
|
|
9080
|
-
staticContext: context2
|
|
9081
|
-
}));
|
|
9082
|
-
};
|
|
9083
|
-
return StaticRouter;
|
|
9084
|
-
})(React__default.Component);
|
|
9085
|
-
/* @__PURE__ */ (function(_React$Component) {
|
|
9086
|
-
_inheritsLoose(Switch2, _React$Component);
|
|
9087
|
-
function Switch2() {
|
|
9088
|
-
return _React$Component.apply(this, arguments) || this;
|
|
9089
|
-
}
|
|
9090
|
-
var _proto = Switch2.prototype;
|
|
9091
|
-
_proto.render = function render() {
|
|
9092
|
-
var _this = this;
|
|
9093
|
-
return /* @__PURE__ */ React__default.createElement(context.Consumer, null, function(context2) {
|
|
9094
|
-
!context2 ? invariant(false) : void 0;
|
|
9095
|
-
var location = _this.props.location || context2.location;
|
|
9096
|
-
var element, match;
|
|
9097
|
-
React__default.Children.forEach(_this.props.children, function(child) {
|
|
9098
|
-
if (match == null && /* @__PURE__ */ React__default.isValidElement(child)) {
|
|
9099
|
-
element = child;
|
|
9100
|
-
var path = child.props.path || child.props.from;
|
|
9101
|
-
match = path ? matchPath(location.pathname, _extends$3({}, child.props, {
|
|
9102
|
-
path
|
|
9103
|
-
})) : context2.match;
|
|
9104
|
-
}
|
|
9105
|
-
});
|
|
9106
|
-
return match ? /* @__PURE__ */ React__default.cloneElement(element, {
|
|
9107
|
-
location,
|
|
9108
|
-
computedMatch: match
|
|
9109
|
-
}) : null;
|
|
9110
|
-
});
|
|
9111
|
-
};
|
|
9112
|
-
return Switch2;
|
|
9113
|
-
})(React__default.Component);
|
|
9114
|
-
var useContext = React__default.useContext;
|
|
9115
|
-
function useHistory() {
|
|
9116
|
-
return useContext(historyContext);
|
|
9117
|
-
}
|
|
9118
|
-
const defaultProps$J = {
|
|
9119
|
-
...ComponentDefaults,
|
|
9120
|
-
title: null,
|
|
9121
|
-
subTitle: null,
|
|
9122
|
-
desc: "",
|
|
9123
|
-
descTextAlign: "right",
|
|
9124
|
-
isLink: false,
|
|
9125
|
-
icon: "",
|
|
9126
|
-
roundRadius: "6px",
|
|
9127
|
-
url: "",
|
|
9128
|
-
to: "",
|
|
9129
|
-
replace: false,
|
|
9130
|
-
center: false,
|
|
9131
|
-
size: "",
|
|
9132
|
-
className: "",
|
|
9133
|
-
iconSlot: null,
|
|
9134
|
-
linkSlot: null,
|
|
9135
|
-
click: (event) => {
|
|
9136
|
-
},
|
|
9137
|
-
onClick: (event) => {
|
|
9138
|
-
}
|
|
9139
|
-
};
|
|
9140
|
-
const Cell = (props) => {
|
|
9141
|
-
const {
|
|
9142
|
-
children,
|
|
9143
|
-
click,
|
|
9144
|
-
onClick,
|
|
9145
|
-
title,
|
|
9146
|
-
subTitle,
|
|
9147
|
-
desc,
|
|
9148
|
-
descTextAlign,
|
|
9149
|
-
isLink,
|
|
9150
|
-
icon,
|
|
9151
|
-
roundRadius,
|
|
9152
|
-
url,
|
|
9153
|
-
to: to2,
|
|
9154
|
-
replace,
|
|
9155
|
-
center,
|
|
9156
|
-
size,
|
|
9157
|
-
className,
|
|
9158
|
-
iconSlot,
|
|
9159
|
-
linkSlot,
|
|
9160
|
-
iconClassPrefix,
|
|
9161
|
-
iconFontClassName,
|
|
9162
|
-
...rest
|
|
9163
|
-
} = {
|
|
9164
|
-
...defaultProps$J,
|
|
9165
|
-
...props
|
|
9166
|
-
};
|
|
9167
|
-
const b2 = cn("cell");
|
|
9168
|
-
const history = useHistory();
|
|
9169
|
-
const handleClick2 = (event) => {
|
|
9170
|
-
click(event);
|
|
9171
|
-
onClick(event);
|
|
9172
|
-
if (to2 && history) {
|
|
9173
|
-
history[replace ? "replace" : "push"](to2);
|
|
9174
|
-
} else if (url) {
|
|
9175
|
-
replace ? window.location.replace(url) : window.location.href = url;
|
|
9176
|
-
}
|
|
9177
|
-
};
|
|
9178
|
-
const baseStyle = {
|
|
9179
|
-
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
9180
|
-
};
|
|
9181
|
-
const styles = title || subTitle || icon ? {} : {
|
|
9182
|
-
textAlign: descTextAlign,
|
|
9183
|
-
flex: 1
|
|
9184
|
-
};
|
|
9185
|
-
return /* @__PURE__ */ React__default.createElement("div", {
|
|
9186
|
-
className: `${b2(
|
|
9187
|
-
{ clickable: !!(isLink || to2), center, large: size === "large" },
|
|
9188
|
-
[className]
|
|
9189
|
-
)} `,
|
|
9190
|
-
onClick: (event) => handleClick2(event),
|
|
9191
|
-
style: baseStyle,
|
|
9192
|
-
...rest
|
|
9193
|
-
}, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9194
|
-
className: b2("icon")
|
|
9195
|
-
}, iconSlot || (icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9196
|
-
classPrefix: iconClassPrefix,
|
|
9197
|
-
fontClassName: iconFontClassName,
|
|
9198
|
-
name: icon,
|
|
9199
|
-
className: "icon"
|
|
9200
|
-
}) : null)) : null, title || subTitle ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9201
|
-
className: `${b2("title")}`
|
|
9202
|
-
}, title ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9203
|
-
className: b2("maintitle")
|
|
9204
|
-
}, title) : null, subTitle ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9205
|
-
className: b2("subtitle")
|
|
9206
|
-
}, subTitle) : null) : null, desc ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9207
|
-
className: b2("value", {
|
|
9208
|
-
alone: !title && !subTitle
|
|
9209
|
-
}),
|
|
9210
|
-
style: styles
|
|
9211
|
-
}, desc) : null, !linkSlot && (isLink || to2) ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9212
|
-
classPrefix: iconClassPrefix,
|
|
9213
|
-
fontClassName: iconFontClassName,
|
|
9214
|
-
name: "right",
|
|
9215
|
-
className: b2("link")
|
|
9216
|
-
}) : linkSlot));
|
|
9217
|
-
};
|
|
9218
|
-
Cell.defaultProps = defaultProps$J;
|
|
9219
|
-
Cell.displayName = "NutCell";
|
|
9220
|
-
const defaultProps$I = {
|
|
9221
|
-
...ComponentDefaults,
|
|
9222
|
-
name: "",
|
|
9223
|
-
label: "",
|
|
9224
|
-
className: "",
|
|
9225
|
-
rules: [{ required: false, message: "" }],
|
|
9226
|
-
disabled: false,
|
|
9227
|
-
labelWidth: 90,
|
|
9228
|
-
errorMessageAlign: "left",
|
|
9229
|
-
showErrorLine: true,
|
|
9230
|
-
showErrorMessage: true
|
|
9231
|
-
};
|
|
9232
|
-
class FormItem extends React__default.Component {
|
|
9233
|
-
constructor() {
|
|
9234
|
-
super(...arguments);
|
|
9235
|
-
this.getControlled = (children) => {
|
|
9236
|
-
const { getFieldValue, setFieldsValue } = this.context;
|
|
9237
|
-
const { name } = this.props;
|
|
9238
|
-
const type = children.type.NAME;
|
|
9239
|
-
return {
|
|
9240
|
-
value: getFieldValue(name),
|
|
9241
|
-
onChange: (event) => {
|
|
9242
|
-
let newValue = event;
|
|
9243
|
-
switch (type) {
|
|
9244
|
-
case "checkbox":
|
|
9245
|
-
newValue = event.target.value;
|
|
9246
|
-
break;
|
|
9247
|
-
}
|
|
9248
|
-
setFieldsValue({ [name]: newValue });
|
|
9249
|
-
}
|
|
9250
|
-
};
|
|
9251
|
-
};
|
|
9252
|
-
this.onStoreChange = () => {
|
|
9253
|
-
this.forceUpdate();
|
|
9254
|
-
};
|
|
9255
|
-
this.renderLayout = (childNode) => {
|
|
9256
|
-
var _a, _b;
|
|
9257
|
-
const {
|
|
9258
|
-
label,
|
|
9259
|
-
name,
|
|
9260
|
-
rules = [{ required: false, message: "" }],
|
|
9261
|
-
className,
|
|
9262
|
-
labelWidth,
|
|
9263
|
-
errorMessageAlign,
|
|
9264
|
-
showErrorLine,
|
|
9265
|
-
showErrorMessage
|
|
9266
|
-
} = {
|
|
9267
|
-
...defaultProps$I,
|
|
9268
|
-
...this.props
|
|
9269
|
-
};
|
|
9270
|
-
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
9271
|
-
return item2.field === name;
|
|
9272
|
-
}));
|
|
9273
|
-
const { starPositon } = this.context;
|
|
9274
|
-
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default.createElement("i", {
|
|
9275
|
-
className: "required"
|
|
9276
|
-
});
|
|
9277
|
-
const renderLabel = starPositon === "Right" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, label, renderStar) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderStar, label);
|
|
9278
|
-
return /* @__PURE__ */ React__default.createElement(Cell, {
|
|
9279
|
-
className: `nut-form-item ${className}`
|
|
9280
|
-
}, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9281
|
-
className: "nut-cell__title nut-form-item__label",
|
|
9282
|
-
style: {
|
|
9283
|
-
width: this.pxCheck(labelWidth)
|
|
9284
|
-
}
|
|
9285
|
-
}, renderLabel) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
9286
|
-
className: "nut-cell__value nut-form-item__body"
|
|
9287
|
-
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
9288
|
-
className: "nut-form-item__body__slots"
|
|
9289
|
-
}, childNode), item.length > 0 && /* @__PURE__ */ React__default.createElement("div", {
|
|
9290
|
-
className: "nut-form-item__body__tips",
|
|
9291
|
-
style: { textAlign: errorMessageAlign }
|
|
9292
|
-
}, item[0].message)));
|
|
9293
|
-
};
|
|
9294
|
-
this.pxCheck = (value) => {
|
|
9295
|
-
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
9296
|
-
};
|
|
9297
|
-
}
|
|
9298
|
-
componentDidMount() {
|
|
9299
|
-
this.cancelRegister = this.context.registerField(this);
|
|
9300
|
-
}
|
|
9301
|
-
componentWillUnmount() {
|
|
9302
|
-
if (this.cancelRegister) {
|
|
9303
|
-
this.cancelRegister();
|
|
9304
|
-
}
|
|
9305
|
-
}
|
|
9306
|
-
render() {
|
|
9307
|
-
const { children } = this.props;
|
|
9308
|
-
const c6 = Array.isArray(children) ? children[0] : children;
|
|
9309
|
-
const returnChildNode = React__default.cloneElement(
|
|
9310
|
-
c6,
|
|
9311
|
-
this.getControlled(c6)
|
|
9312
|
-
);
|
|
9313
|
-
return this.renderLayout(returnChildNode);
|
|
8049
|
+
render() {
|
|
8050
|
+
const { children } = this.props;
|
|
8051
|
+
const c = Array.isArray(children) ? children[0] : children;
|
|
8052
|
+
const returnChildNode = React__default.cloneElement(
|
|
8053
|
+
c,
|
|
8054
|
+
this.getControlled(c)
|
|
8055
|
+
);
|
|
8056
|
+
return this.renderLayout(returnChildNode);
|
|
9314
8057
|
}
|
|
9315
8058
|
}
|
|
9316
8059
|
FormItem.defaultProps = defaultProps$I;
|
|
@@ -9510,10 +8253,10 @@ const Drag = (props) => {
|
|
|
9510
8253
|
e2.preventDefault();
|
|
9511
8254
|
if (e2.touches.length === 1 && dragRef.current) {
|
|
9512
8255
|
const touch = e2.touches[0];
|
|
9513
|
-
const
|
|
9514
|
-
const
|
|
9515
|
-
translateX.current =
|
|
9516
|
-
translateY.current =
|
|
8256
|
+
const x = touch.clientX - axisCache.current.x;
|
|
8257
|
+
const y = touch.clientY - axisCache.current.y;
|
|
8258
|
+
translateX.current = x + transformCache.current.x;
|
|
8259
|
+
translateY.current = y + transformCache.current.y;
|
|
9517
8260
|
if (translateX.current < boundaryState.left) {
|
|
9518
8261
|
translateX.current = boundaryState.left;
|
|
9519
8262
|
} else if (translateX.current > boundaryState.right) {
|
|
@@ -9784,7 +8527,7 @@ const Infiniteloading = (props) => {
|
|
|
9784
8527
|
const scrollTop = useRef(0);
|
|
9785
8528
|
const direction = useRef("down");
|
|
9786
8529
|
const isTouching = useRef(false);
|
|
9787
|
-
const
|
|
8530
|
+
const y = useRef(0);
|
|
9788
8531
|
const refreshMaxH = useRef(0);
|
|
9789
8532
|
const distance = useRef(0);
|
|
9790
8533
|
const b2 = cn("infiniteloading");
|
|
@@ -9843,12 +8586,12 @@ const Infiniteloading = (props) => {
|
|
|
9843
8586
|
};
|
|
9844
8587
|
const touchStart = (event) => {
|
|
9845
8588
|
if (scrollTop.current == 0 && !isTouching.current && isOpenRefresh) {
|
|
9846
|
-
|
|
8589
|
+
y.current = event.touches[0].pageY;
|
|
9847
8590
|
isTouching.current = true;
|
|
9848
8591
|
}
|
|
9849
8592
|
};
|
|
9850
8593
|
const touchMove = (event) => {
|
|
9851
|
-
distance.current = event.touches[0].pageY -
|
|
8594
|
+
distance.current = event.touches[0].pageY - y.current;
|
|
9852
8595
|
if (distance.current > 0 && isTouching.current) {
|
|
9853
8596
|
event.preventDefault();
|
|
9854
8597
|
setTopDisScoll(distance.current);
|
|
@@ -10117,11 +8860,11 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10117
8860
|
const onTouchStart = async (event) => {
|
|
10118
8861
|
if (leftWrapper.current) {
|
|
10119
8862
|
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
10120
|
-
setActionWidth((
|
|
8863
|
+
setActionWidth((v) => ({ ...v, left: leftRect.width }));
|
|
10121
8864
|
}
|
|
10122
8865
|
if (rightWrapper.current) {
|
|
10123
8866
|
const rightRect = await getRectByTaro(rightWrapper.current);
|
|
10124
|
-
setActionWidth((
|
|
8867
|
+
setActionWidth((v) => ({ ...v, right: rightRect.width }));
|
|
10125
8868
|
}
|
|
10126
8869
|
if (!props.disabled) {
|
|
10127
8870
|
startOffset.current = state.offset;
|
|
@@ -10150,7 +8893,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10150
8893
|
};
|
|
10151
8894
|
const onTouchEnd = () => {
|
|
10152
8895
|
if (state.dragging) {
|
|
10153
|
-
setState((
|
|
8896
|
+
setState((v) => ({ ...v, dragging: false }));
|
|
10154
8897
|
toggle(state.offset > 0 ? "left" : "right");
|
|
10155
8898
|
setTimeout(() => {
|
|
10156
8899
|
lockClick.current = false;
|
|
@@ -10174,7 +8917,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10174
8917
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
10175
8918
|
const name = props.name;
|
|
10176
8919
|
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
10177
|
-
setState((
|
|
8920
|
+
setState((v) => ({ ...v, offset: Number(offset) || 0 }));
|
|
10178
8921
|
};
|
|
10179
8922
|
const close = (position) => {
|
|
10180
8923
|
var _a;
|
|
@@ -10185,7 +8928,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10185
8928
|
position: position || "left"
|
|
10186
8929
|
});
|
|
10187
8930
|
}
|
|
10188
|
-
setState((
|
|
8931
|
+
setState((v) => ({ ...v, offset: 0 }));
|
|
10189
8932
|
};
|
|
10190
8933
|
const rangeCalculation = (num, min, max) => {
|
|
10191
8934
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
@@ -10244,14 +8987,14 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
10244
8987
|
});
|
|
10245
8988
|
Swipe.defaultProps = defaultProps$A;
|
|
10246
8989
|
Swipe.displayName = "NutSwipe";
|
|
10247
|
-
function clamp(
|
|
10248
|
-
return Math.max(min, Math.min(
|
|
8990
|
+
function clamp(v, min, max) {
|
|
8991
|
+
return Math.max(min, Math.min(v, max));
|
|
10249
8992
|
}
|
|
10250
8993
|
const V = {
|
|
10251
|
-
toVector(
|
|
10252
|
-
if (
|
|
10253
|
-
|
|
10254
|
-
return Array.isArray(
|
|
8994
|
+
toVector(v, fallback) {
|
|
8995
|
+
if (v === void 0)
|
|
8996
|
+
v = fallback;
|
|
8997
|
+
return Array.isArray(v) ? v : [v, v];
|
|
10255
8998
|
},
|
|
10256
8999
|
add(v1, v2) {
|
|
10257
9000
|
return [v1[0] + v2[0], v1[1] + v2[1]];
|
|
@@ -10430,11 +9173,11 @@ function getEventDetails(event) {
|
|
|
10430
9173
|
}
|
|
10431
9174
|
return payload;
|
|
10432
9175
|
}
|
|
10433
|
-
function call$1(
|
|
10434
|
-
if (typeof
|
|
10435
|
-
return
|
|
9176
|
+
function call$1(v, ...args) {
|
|
9177
|
+
if (typeof v === "function") {
|
|
9178
|
+
return v(...args);
|
|
10436
9179
|
} else {
|
|
10437
|
-
return
|
|
9180
|
+
return v;
|
|
10438
9181
|
}
|
|
10439
9182
|
}
|
|
10440
9183
|
function noop$1() {
|
|
@@ -10699,20 +9442,20 @@ class CoordinatesEngine extends Engine {
|
|
|
10699
9442
|
}
|
|
10700
9443
|
state._blocked = (config2.lockDirection || !!config2.axis) && !state.axis || !!config2.axis && config2.axis !== state.axis;
|
|
10701
9444
|
}
|
|
10702
|
-
restrictToAxis(
|
|
9445
|
+
restrictToAxis(v) {
|
|
10703
9446
|
if (this.config.axis || this.config.lockDirection) {
|
|
10704
9447
|
switch (this.state.axis) {
|
|
10705
9448
|
case "x":
|
|
10706
|
-
|
|
9449
|
+
v[1] = 0;
|
|
10707
9450
|
break;
|
|
10708
9451
|
case "y":
|
|
10709
|
-
|
|
9452
|
+
v[0] = 0;
|
|
10710
9453
|
break;
|
|
10711
9454
|
}
|
|
10712
9455
|
}
|
|
10713
9456
|
}
|
|
10714
9457
|
}
|
|
10715
|
-
const identity = (
|
|
9458
|
+
const identity = (v) => v;
|
|
10716
9459
|
const DEFAULT_RUBBERBAND = 0.15;
|
|
10717
9460
|
const commonConfigResolver = {
|
|
10718
9461
|
enabled(value = true) {
|
|
@@ -11196,11 +9939,11 @@ _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
|
|
|
11196
9939
|
return [D.min, D.max];
|
|
11197
9940
|
};
|
|
11198
9941
|
const _angleBounds = (state) => {
|
|
11199
|
-
const
|
|
9942
|
+
const A = assignDefault(call$1(angleBounds, state), {
|
|
11200
9943
|
min: -Infinity,
|
|
11201
9944
|
max: Infinity
|
|
11202
9945
|
});
|
|
11203
|
-
return [
|
|
9946
|
+
return [A.min, A.max];
|
|
11204
9947
|
};
|
|
11205
9948
|
if (typeof scaleBounds !== "function" && typeof angleBounds !== "function")
|
|
11206
9949
|
return [_scaleBounds(), _angleBounds()];
|
|
@@ -11553,7 +10296,7 @@ let timeouts = [];
|
|
|
11553
10296
|
raf.setTimeout = (handler, ms) => {
|
|
11554
10297
|
let time = raf.now() + ms;
|
|
11555
10298
|
let cancel = () => {
|
|
11556
|
-
let i = timeouts.findIndex((
|
|
10299
|
+
let i = timeouts.findIndex((t) => t.cancel == cancel);
|
|
11557
10300
|
if (~i)
|
|
11558
10301
|
timeouts.splice(i, 1);
|
|
11559
10302
|
pendingCount -= ~i ? 1 : 0;
|
|
@@ -11568,7 +10311,7 @@ raf.setTimeout = (handler, ms) => {
|
|
|
11568
10311
|
start();
|
|
11569
10312
|
return timeout;
|
|
11570
10313
|
};
|
|
11571
|
-
let findTimeout = (time) => ~(~timeouts.findIndex((
|
|
10314
|
+
let findTimeout = (time) => ~(~timeouts.findIndex((t) => t.time > time) || ~timeouts.length);
|
|
11572
10315
|
raf.cancel = (fn) => {
|
|
11573
10316
|
onStartQueue.delete(fn);
|
|
11574
10317
|
onFrameQueue.delete(fn);
|
|
@@ -11649,7 +10392,7 @@ function update() {
|
|
|
11649
10392
|
ts = raf.now();
|
|
11650
10393
|
let count = findTimeout(ts);
|
|
11651
10394
|
if (count) {
|
|
11652
|
-
eachSafely(timeouts.splice(0, count), (
|
|
10395
|
+
eachSafely(timeouts.splice(0, count), (t) => t.handler());
|
|
11653
10396
|
pendingCount -= count;
|
|
11654
10397
|
}
|
|
11655
10398
|
if (!pendingCount) {
|
|
@@ -12055,26 +10798,26 @@ function normalizeColor(color) {
|
|
|
12055
10798
|
}
|
|
12056
10799
|
return null;
|
|
12057
10800
|
}
|
|
12058
|
-
function hue2rgb(
|
|
12059
|
-
if (
|
|
12060
|
-
|
|
12061
|
-
if (
|
|
12062
|
-
|
|
12063
|
-
if (
|
|
12064
|
-
return
|
|
12065
|
-
if (
|
|
12066
|
-
return
|
|
12067
|
-
if (
|
|
12068
|
-
return
|
|
12069
|
-
return
|
|
10801
|
+
function hue2rgb(p, q, t) {
|
|
10802
|
+
if (t < 0)
|
|
10803
|
+
t += 1;
|
|
10804
|
+
if (t > 1)
|
|
10805
|
+
t -= 1;
|
|
10806
|
+
if (t < 1 / 6)
|
|
10807
|
+
return p + (q - p) * 6 * t;
|
|
10808
|
+
if (t < 1 / 2)
|
|
10809
|
+
return q;
|
|
10810
|
+
if (t < 2 / 3)
|
|
10811
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
10812
|
+
return p;
|
|
12070
10813
|
}
|
|
12071
|
-
function hslToRgb(
|
|
12072
|
-
const
|
|
12073
|
-
const
|
|
12074
|
-
const r2 = hue2rgb(
|
|
12075
|
-
const
|
|
12076
|
-
const b2 = hue2rgb(
|
|
12077
|
-
return Math.round(r2 * 255) << 24 | Math.round(
|
|
10814
|
+
function hslToRgb(h, s, l) {
|
|
10815
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
10816
|
+
const p = 2 * l - q;
|
|
10817
|
+
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
10818
|
+
const g = hue2rgb(p, q, h);
|
|
10819
|
+
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
10820
|
+
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
12078
10821
|
}
|
|
12079
10822
|
function parse255(str) {
|
|
12080
10823
|
const int = parseInt(str, 10);
|
|
@@ -12110,10 +10853,10 @@ function colorToRgba(input) {
|
|
|
12110
10853
|
return input;
|
|
12111
10854
|
int32Color = int32Color || 0;
|
|
12112
10855
|
let r2 = (int32Color & 4278190080) >>> 24;
|
|
12113
|
-
let
|
|
10856
|
+
let g = (int32Color & 16711680) >>> 16;
|
|
12114
10857
|
let b2 = (int32Color & 65280) >>> 8;
|
|
12115
10858
|
let a = (int32Color & 255) / 255;
|
|
12116
|
-
return `rgba(${r2}, ${
|
|
10859
|
+
return `rgba(${r2}, ${g}, ${b2}, ${a})`;
|
|
12117
10860
|
}
|
|
12118
10861
|
const createInterpolator = (range, output, extrapolate) => {
|
|
12119
10862
|
if (is.fun(range)) {
|
|
@@ -12134,7 +10877,7 @@ const createInterpolator = (range, output, extrapolate) => {
|
|
|
12134
10877
|
const inputRange = config2.range || [0, 1];
|
|
12135
10878
|
const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
|
|
12136
10879
|
const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
|
|
12137
|
-
const easing = config2.easing || ((
|
|
10880
|
+
const easing = config2.easing || ((t) => t);
|
|
12138
10881
|
return (input) => {
|
|
12139
10882
|
const range2 = findRange(input, inputRange);
|
|
12140
10883
|
return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
|
|
@@ -12865,51 +11608,51 @@ const c2 = c1 * 1.525;
|
|
|
12865
11608
|
const c3 = c1 + 1;
|
|
12866
11609
|
const c4 = 2 * Math.PI / 3;
|
|
12867
11610
|
const c5 = 2 * Math.PI / 4.5;
|
|
12868
|
-
const bounceOut = (
|
|
11611
|
+
const bounceOut = (x) => {
|
|
12869
11612
|
const n1 = 7.5625;
|
|
12870
11613
|
const d1 = 2.75;
|
|
12871
|
-
if (
|
|
12872
|
-
return n1 *
|
|
12873
|
-
} else if (
|
|
12874
|
-
return n1 * (
|
|
12875
|
-
} else if (
|
|
12876
|
-
return n1 * (
|
|
11614
|
+
if (x < 1 / d1) {
|
|
11615
|
+
return n1 * x * x;
|
|
11616
|
+
} else if (x < 2 / d1) {
|
|
11617
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
11618
|
+
} else if (x < 2.5 / d1) {
|
|
11619
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
12877
11620
|
} else {
|
|
12878
|
-
return n1 * (
|
|
11621
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
12879
11622
|
}
|
|
12880
11623
|
};
|
|
12881
11624
|
const easings = {
|
|
12882
|
-
linear: (
|
|
12883
|
-
easeInQuad: (
|
|
12884
|
-
easeOutQuad: (
|
|
12885
|
-
easeInOutQuad: (
|
|
12886
|
-
easeInCubic: (
|
|
12887
|
-
easeOutCubic: (
|
|
12888
|
-
easeInOutCubic: (
|
|
12889
|
-
easeInQuart: (
|
|
12890
|
-
easeOutQuart: (
|
|
12891
|
-
easeInOutQuart: (
|
|
12892
|
-
easeInQuint: (
|
|
12893
|
-
easeOutQuint: (
|
|
12894
|
-
easeInOutQuint: (
|
|
12895
|
-
easeInSine: (
|
|
12896
|
-
easeOutSine: (
|
|
12897
|
-
easeInOutSine: (
|
|
12898
|
-
easeInExpo: (
|
|
12899
|
-
easeOutExpo: (
|
|
12900
|
-
easeInOutExpo: (
|
|
12901
|
-
easeInCirc: (
|
|
12902
|
-
easeOutCirc: (
|
|
12903
|
-
easeInOutCirc: (
|
|
12904
|
-
easeInBack: (
|
|
12905
|
-
easeOutBack: (
|
|
12906
|
-
easeInOutBack: (
|
|
12907
|
-
easeInElastic: (
|
|
12908
|
-
easeOutElastic: (
|
|
12909
|
-
easeInOutElastic: (
|
|
12910
|
-
easeInBounce: (
|
|
11625
|
+
linear: (x) => x,
|
|
11626
|
+
easeInQuad: (x) => x * x,
|
|
11627
|
+
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
11628
|
+
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
11629
|
+
easeInCubic: (x) => x * x * x,
|
|
11630
|
+
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
11631
|
+
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
11632
|
+
easeInQuart: (x) => x * x * x * x,
|
|
11633
|
+
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
11634
|
+
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
11635
|
+
easeInQuint: (x) => x * x * x * x * x,
|
|
11636
|
+
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
11637
|
+
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
11638
|
+
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
11639
|
+
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
11640
|
+
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
11641
|
+
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
11642
|
+
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
11643
|
+
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,
|
|
11644
|
+
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
11645
|
+
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
11646
|
+
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,
|
|
11647
|
+
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
11648
|
+
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
11649
|
+
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,
|
|
11650
|
+
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
11651
|
+
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
11652
|
+
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,
|
|
11653
|
+
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
12911
11654
|
easeOutBounce: bounceOut,
|
|
12912
|
-
easeInOutBounce: (
|
|
11655
|
+
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
|
|
12913
11656
|
};
|
|
12914
11657
|
const defaults = _extends({}, config.default, {
|
|
12915
11658
|
mass: 1,
|
|
@@ -13176,7 +11919,7 @@ function runAsync(to2, props, state, target) {
|
|
|
13176
11919
|
})();
|
|
13177
11920
|
}
|
|
13178
11921
|
function stopAsync(state, cancelId) {
|
|
13179
|
-
flush(state.timeouts, (
|
|
11922
|
+
flush(state.timeouts, (t) => t.cancel());
|
|
13180
11923
|
state.pauseQueue.clear();
|
|
13181
11924
|
state.resumeQueue.clear();
|
|
13182
11925
|
state.asyncId = state.asyncTo = state.promise = void 0;
|
|
@@ -13347,7 +12090,7 @@ class SpringValue extends FrameValue {
|
|
|
13347
12090
|
let velocity;
|
|
13348
12091
|
const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
|
|
13349
12092
|
if (!is.und(config2.duration)) {
|
|
13350
|
-
let
|
|
12093
|
+
let p = 1;
|
|
13351
12094
|
if (config2.duration > 0) {
|
|
13352
12095
|
if (this._memoizedDuration !== config2.duration) {
|
|
13353
12096
|
this._memoizedDuration = config2.duration;
|
|
@@ -13356,13 +12099,13 @@ class SpringValue extends FrameValue {
|
|
|
13356
12099
|
elapsed = node2.elapsedTime += dt;
|
|
13357
12100
|
}
|
|
13358
12101
|
}
|
|
13359
|
-
|
|
13360
|
-
|
|
13361
|
-
node2.durationProgress =
|
|
12102
|
+
p = (config2.progress || 0) + elapsed / this._memoizedDuration;
|
|
12103
|
+
p = p > 1 ? 1 : p < 0 ? 0 : p;
|
|
12104
|
+
node2.durationProgress = p;
|
|
13362
12105
|
}
|
|
13363
|
-
position = from + config2.easing(
|
|
12106
|
+
position = from + config2.easing(p) * (to2 - from);
|
|
13364
12107
|
velocity = (position - node2.lastPosition) / dt;
|
|
13365
|
-
finished =
|
|
12108
|
+
finished = p == 1;
|
|
13366
12109
|
} else if (config2.decay) {
|
|
13367
12110
|
const decay = config2.decay === true ? 0.998 : config2.decay;
|
|
13368
12111
|
const e2 = Math.exp(-(1 - decay) * elapsed);
|
|
@@ -13379,7 +12122,7 @@ class SpringValue extends FrameValue {
|
|
|
13379
12122
|
let isBouncing = false;
|
|
13380
12123
|
const step = 1;
|
|
13381
12124
|
const numSteps = Math.ceil(dt / step);
|
|
13382
|
-
for (let
|
|
12125
|
+
for (let n = 0; n < numSteps; ++n) {
|
|
13383
12126
|
isMoving = Math.abs(velocity) > restVelocity;
|
|
13384
12127
|
if (!isMoving) {
|
|
13385
12128
|
finished = Math.abs(to2 - position) <= precision;
|
|
@@ -14225,7 +12968,7 @@ const SpringContext = (_ref) => {
|
|
|
14225
12968
|
let {
|
|
14226
12969
|
children
|
|
14227
12970
|
} = _ref, props = _objectWithoutPropertiesLoose$1(_ref, _excluded$3);
|
|
14228
|
-
const inherited = useContext
|
|
12971
|
+
const inherited = useContext(ctx);
|
|
14229
12972
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
14230
12973
|
props = useMemoOne(() => ({
|
|
14231
12974
|
pause,
|
|
@@ -14360,9 +13103,9 @@ function useSprings(length, props, deps) {
|
|
|
14360
13103
|
}
|
|
14361
13104
|
}
|
|
14362
13105
|
const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));
|
|
14363
|
-
const
|
|
14364
|
-
const prevContext = usePrev(
|
|
14365
|
-
const hasContext =
|
|
13106
|
+
const context = useContext(SpringContext);
|
|
13107
|
+
const prevContext = usePrev(context);
|
|
13108
|
+
const hasContext = context !== prevContext && hasProps(context);
|
|
14366
13109
|
useIsomorphicLayoutEffect(() => {
|
|
14367
13110
|
layoutId.current++;
|
|
14368
13111
|
state.ctrls = ctrls.current;
|
|
@@ -14377,7 +13120,7 @@ function useSprings(length, props, deps) {
|
|
|
14377
13120
|
ref == null ? void 0 : ref.add(ctrl);
|
|
14378
13121
|
if (hasContext) {
|
|
14379
13122
|
ctrl.start({
|
|
14380
|
-
default:
|
|
13123
|
+
default: context
|
|
14381
13124
|
});
|
|
14382
13125
|
}
|
|
14383
13126
|
const update2 = updates[i];
|
|
@@ -14394,7 +13137,7 @@ function useSprings(length, props, deps) {
|
|
|
14394
13137
|
useOnce(() => () => {
|
|
14395
13138
|
each(state.ctrls, (ctrl) => ctrl.stop(true));
|
|
14396
13139
|
});
|
|
14397
|
-
const values = springs.map((
|
|
13140
|
+
const values = springs.map((x) => _extends({}, x));
|
|
14398
13141
|
return ref ? [values, ref] : values;
|
|
14399
13142
|
}
|
|
14400
13143
|
function useSpring(props, deps) {
|
|
@@ -14549,7 +13292,7 @@ function applyAnimatedValues(instance, props) {
|
|
|
14549
13292
|
scrollLeft
|
|
14550
13293
|
} = _ref, attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
14551
13294
|
const values = Object.values(attributes);
|
|
14552
|
-
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (
|
|
13295
|
+
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
|
|
14553
13296
|
if (children !== void 0) {
|
|
14554
13297
|
instance.textContent = children;
|
|
14555
13298
|
}
|
|
@@ -14627,19 +13370,19 @@ const domTransforms = /^(matrix|translate|scale|rotate|skew)/;
|
|
|
14627
13370
|
const pxTransforms = /^(translate)/;
|
|
14628
13371
|
const degTransforms = /^(rotate|skew)/;
|
|
14629
13372
|
const addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
|
|
14630
|
-
const isValueIdentity = (value, id) => is.arr(value) ? value.every((
|
|
13373
|
+
const isValueIdentity = (value, id) => is.arr(value) ? value.every((v) => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id;
|
|
14631
13374
|
class AnimatedStyle extends AnimatedObject {
|
|
14632
13375
|
constructor(_ref) {
|
|
14633
13376
|
let {
|
|
14634
|
-
x
|
|
14635
|
-
y
|
|
14636
|
-
z
|
|
13377
|
+
x,
|
|
13378
|
+
y,
|
|
13379
|
+
z
|
|
14637
13380
|
} = _ref, style = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
14638
13381
|
const inputs = [];
|
|
14639
13382
|
const transforms = [];
|
|
14640
|
-
if (
|
|
14641
|
-
inputs.push([
|
|
14642
|
-
transforms.push((xyz) => [`translate3d(${xyz.map((
|
|
13383
|
+
if (x || y || z) {
|
|
13384
|
+
inputs.push([x || 0, y || 0, z || 0]);
|
|
13385
|
+
transforms.push((xyz) => [`translate3d(${xyz.map((v) => addUnit(v, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
|
|
14643
13386
|
}
|
|
14644
13387
|
eachProp(style, (value, key) => {
|
|
14645
13388
|
if (key === "transform") {
|
|
@@ -14651,7 +13394,7 @@ class AnimatedStyle extends AnimatedObject {
|
|
|
14651
13394
|
return;
|
|
14652
13395
|
const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
|
|
14653
13396
|
inputs.push(toArray(value));
|
|
14654
|
-
transforms.push(key === "rotate3d" ? ([
|
|
13397
|
+
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)]);
|
|
14655
13398
|
}
|
|
14656
13399
|
});
|
|
14657
13400
|
if (inputs.length) {
|
|
@@ -14675,8 +13418,8 @@ class FluidTransform extends FluidValue {
|
|
|
14675
13418
|
let identity2 = true;
|
|
14676
13419
|
each(this.inputs, (input, i) => {
|
|
14677
13420
|
const arg1 = getFluidValue(input[0]);
|
|
14678
|
-
const [
|
|
14679
|
-
transform += " " +
|
|
13421
|
+
const [t, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));
|
|
13422
|
+
transform += " " + t;
|
|
14680
13423
|
identity2 = identity2 && id;
|
|
14681
13424
|
});
|
|
14682
13425
|
return identity2 ? "none" : transform;
|
|
@@ -14781,16 +13524,16 @@ const defaultProps$z = {
|
|
|
14781
13524
|
onRefresh: () => {
|
|
14782
13525
|
}
|
|
14783
13526
|
};
|
|
14784
|
-
const PullToRefresh = (
|
|
13527
|
+
const PullToRefresh = (p) => {
|
|
14785
13528
|
const { locale } = useConfig$1();
|
|
14786
13529
|
const props = {
|
|
14787
13530
|
...defaultProps$z,
|
|
14788
|
-
...
|
|
13531
|
+
...p,
|
|
14789
13532
|
...{
|
|
14790
|
-
pullingText:
|
|
14791
|
-
canReleaseText:
|
|
14792
|
-
refreshingText:
|
|
14793
|
-
completeText:
|
|
13533
|
+
pullingText: p.pullingText || locale.pullToRefresh.pullingText,
|
|
13534
|
+
canReleaseText: p.canReleaseText || locale.pullToRefresh.canReleaseText,
|
|
13535
|
+
refreshingText: p.refreshingText || locale.pullToRefresh.refreshingText,
|
|
13536
|
+
completeText: p.completeText || locale.pullToRefresh.completeText
|
|
14794
13537
|
}
|
|
14795
13538
|
};
|
|
14796
13539
|
const headHeight = props.headHeight;
|
|
@@ -14853,8 +13596,8 @@ const PullToRefresh = (p2) => {
|
|
|
14853
13596
|
function getScrollTop(element) {
|
|
14854
13597
|
return "scrollTop" in element ? element.scrollTop : element.scrollY;
|
|
14855
13598
|
}
|
|
14856
|
-
const [,
|
|
14857
|
-
if (state.first &&
|
|
13599
|
+
const [, y] = state.movement;
|
|
13600
|
+
if (state.first && y > 0) {
|
|
14858
13601
|
const target = state.event.target;
|
|
14859
13602
|
if (!target || !(target instanceof Element))
|
|
14860
13603
|
return;
|
|
@@ -14880,7 +13623,7 @@ const PullToRefresh = (p2) => {
|
|
|
14880
13623
|
}
|
|
14881
13624
|
event.stopPropagation();
|
|
14882
13625
|
const height = Math.max(
|
|
14883
|
-
rubberbandIfOutOfBounds(
|
|
13626
|
+
rubberbandIfOutOfBounds(y, 0, 0, headHeight * 5, 0.5),
|
|
14884
13627
|
0
|
|
14885
13628
|
);
|
|
14886
13629
|
api.start({ height });
|
|
@@ -15034,12 +13777,12 @@ const CircleProgress = (props) => {
|
|
|
15034
13777
|
const offset = perimeter * Number(format(parseFloat(progress2.toFixed(1)))) / 100;
|
|
15035
13778
|
const isWise = props.clockwise ? 1 : 0;
|
|
15036
13779
|
const color = isObject(circleColor) ? `url(%23${refRandomId})` : transColor(circleColor);
|
|
15037
|
-
const
|
|
13780
|
+
const d = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
15038
13781
|
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`;
|
|
15039
|
-
const path = `%3Cpath d='${
|
|
13782
|
+
const path = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
15040
13783
|
props.pathColor
|
|
15041
13784
|
)}' fill='none'/%3E`;
|
|
15042
|
-
const path1 = `%3Cpath d='${
|
|
13785
|
+
const path1 = `%3Cpath d='${d}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
|
|
15043
13786
|
color
|
|
15044
13787
|
)}' fill='none'/%3E`;
|
|
15045
13788
|
return {
|
|
@@ -15205,19 +13948,18 @@ const NoticeBar = (props) => {
|
|
|
15205
13948
|
};
|
|
15206
13949
|
const startRollEasy = () => {
|
|
15207
13950
|
showhorseLamp();
|
|
15208
|
-
const
|
|
15209
|
-
|
|
15210
|
-
~~(height / speed / 4) * 1e3 + Number(standTime)
|
|
15211
|
-
);
|
|
13951
|
+
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
13952
|
+
const timerCurr = setInterval(showhorseLamp, time + Number(standTime));
|
|
15212
13953
|
SetTimer(timerCurr);
|
|
15213
13954
|
};
|
|
15214
13955
|
const showhorseLamp = () => {
|
|
15215
13956
|
SetAnimate(true);
|
|
13957
|
+
const time = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) * 1e3 : ~~(height / speed / 4) * 1e3;
|
|
15216
13958
|
setTimeout(() => {
|
|
15217
13959
|
scrollList.current.push(scrollList.current[0]);
|
|
15218
13960
|
scrollList.current.shift();
|
|
15219
13961
|
SetAnimate(false);
|
|
15220
|
-
},
|
|
13962
|
+
}, time);
|
|
15221
13963
|
};
|
|
15222
13964
|
const startRoll = () => {
|
|
15223
13965
|
const timerCurr = setInterval(() => {
|
|
@@ -15228,7 +13970,7 @@ const NoticeBar = (props) => {
|
|
|
15228
13970
|
}, Number(standTime) + 100 * speed);
|
|
15229
13971
|
SetTimer(timerCurr);
|
|
15230
13972
|
};
|
|
15231
|
-
const scroll = (
|
|
13973
|
+
const scroll = (n, last) => {
|
|
15232
13974
|
SetAnimate(true);
|
|
15233
13975
|
setTimeout(() => {
|
|
15234
13976
|
let long = distance;
|
|
@@ -15240,7 +13982,7 @@ const NoticeBar = (props) => {
|
|
|
15240
13982
|
SetDistance(0);
|
|
15241
13983
|
SetAnimate(false);
|
|
15242
13984
|
}
|
|
15243
|
-
},
|
|
13985
|
+
}, n * speed);
|
|
15244
13986
|
};
|
|
15245
13987
|
const handleClickIcon = (event) => {
|
|
15246
13988
|
event.stopPropagation();
|
|
@@ -15277,10 +14019,11 @@ const NoticeBar = (props) => {
|
|
|
15277
14019
|
background,
|
|
15278
14020
|
height: direction === "vertical" ? `${height}px` : ""
|
|
15279
14021
|
};
|
|
15280
|
-
const duringTime = ~~(height / speed / 4);
|
|
14022
|
+
const duringTime = height / speed / 4 < 1 ? Number((height / speed / 4).toFixed(1)) : ~~(height / speed / 4);
|
|
14023
|
+
const noDuring = height / speed < 1 ? (height / speed).toFixed(1) : ~~(height / speed);
|
|
15281
14024
|
const horseLampStyle = {
|
|
15282
14025
|
transform: complexAm ? `translateY(${distance}px)` : "",
|
|
15283
|
-
transition: animate ? `all ${duringTime === 0 ?
|
|
14026
|
+
transition: animate ? `all ${duringTime === 0 ? noDuring : duringTime}s` : "",
|
|
15284
14027
|
marginTop: animate ? `-${height}px` : ""
|
|
15285
14028
|
};
|
|
15286
14029
|
const b2 = cn("noticebar");
|
|
@@ -15355,7 +14098,7 @@ const NoticeBar = (props) => {
|
|
|
15355
14098
|
};
|
|
15356
14099
|
NoticeBar.defaultProps = defaultProps$x;
|
|
15357
14100
|
NoticeBar.displayName = "NutNoticeBar";
|
|
15358
|
-
const DataContext$1 = createContext
|
|
14101
|
+
const DataContext$1 = createContext({});
|
|
15359
14102
|
const defaultProps$w = {
|
|
15360
14103
|
current: 0,
|
|
15361
14104
|
direction: "horizontal",
|
|
@@ -15425,7 +14168,7 @@ const Step = (props) => {
|
|
|
15425
14168
|
...defaultProps$v,
|
|
15426
14169
|
...props
|
|
15427
14170
|
};
|
|
15428
|
-
const parent = useContext
|
|
14171
|
+
const parent = useContext(DataContext$1);
|
|
15429
14172
|
const dot = parent.propSteps.progressDot;
|
|
15430
14173
|
const getCurrentStatus = () => {
|
|
15431
14174
|
const index = activeIndex;
|
|
@@ -15486,7 +14229,7 @@ const Step = (props) => {
|
|
|
15486
14229
|
};
|
|
15487
14230
|
Step.defaultProps = defaultProps$v;
|
|
15488
14231
|
Step.displayName = "NutStep";
|
|
15489
|
-
const DataContext = createContext
|
|
14232
|
+
const DataContext = createContext({});
|
|
15490
14233
|
const defaultProps$u = {
|
|
15491
14234
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
15492
14235
|
height: 0,
|
|
@@ -15701,10 +14444,10 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
15701
14444
|
const range = (num, min, max) => {
|
|
15702
14445
|
return Math.min(Math.max(num, min), max);
|
|
15703
14446
|
};
|
|
15704
|
-
const getDirection2 = (
|
|
15705
|
-
if (
|
|
14447
|
+
const getDirection2 = (x, y) => {
|
|
14448
|
+
if (x > y && x > DISTANCE)
|
|
15706
14449
|
return "horizontal";
|
|
15707
|
-
if (
|
|
14450
|
+
if (y > x && y > DISTANCE)
|
|
15708
14451
|
return "vertical";
|
|
15709
14452
|
return "";
|
|
15710
14453
|
};
|
|
@@ -15934,7 +14677,7 @@ const defaultProps$t = {
|
|
|
15934
14677
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
15935
14678
|
const _props = { ...defaultProps$t, ...props };
|
|
15936
14679
|
const { className, style, children, direction, size } = _props;
|
|
15937
|
-
const parent = useContext
|
|
14680
|
+
const parent = useContext(DataContext);
|
|
15938
14681
|
const b2 = cn("swiper-item");
|
|
15939
14682
|
const classes = classNames(b2(""), className);
|
|
15940
14683
|
const getStyle = () => {
|
|
@@ -15953,7 +14696,7 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
15953
14696
|
});
|
|
15954
14697
|
SwiperItem.defaultProps = defaultProps$t;
|
|
15955
14698
|
SwiperItem.displayName = "NutSwiperItem";
|
|
15956
|
-
const AvatarContext = createContext
|
|
14699
|
+
const AvatarContext = createContext({});
|
|
15957
14700
|
const defaultProps$s = {
|
|
15958
14701
|
...ComponentDefaults,
|
|
15959
14702
|
size: "",
|
|
@@ -15992,7 +14735,7 @@ const Avatar = (props) => {
|
|
|
15992
14735
|
const [showMax, setShowMax] = useState(false);
|
|
15993
14736
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
15994
14737
|
const avatarRef = useRef(null);
|
|
15995
|
-
const parent = useContext
|
|
14738
|
+
const parent = useContext(AvatarContext);
|
|
15996
14739
|
const b2 = cn("avatar");
|
|
15997
14740
|
const classes = classNames({
|
|
15998
14741
|
[`nut-avatar-${size || ((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || "normal"}`]: true,
|
|
@@ -16484,7 +15227,7 @@ const Popover = (props) => {
|
|
|
16484
15227
|
};
|
|
16485
15228
|
const filter = () => {
|
|
16486
15229
|
const ms = ["top", "bottom", "left", "right"];
|
|
16487
|
-
return ms.filter((
|
|
15230
|
+
return ms.filter((m) => location.includes(m))[0];
|
|
16488
15231
|
};
|
|
16489
15232
|
const popoverArrowSelf = () => {
|
|
16490
15233
|
const prefixCls = "popover-arrow";
|
|
@@ -16578,7 +15321,7 @@ const Skeleton = (props) => {
|
|
|
16578
15321
|
[`avatarClass--${avatarShape}`]: avatarShape
|
|
16579
15322
|
});
|
|
16580
15323
|
const repeatLines = (num) => {
|
|
16581
|
-
return Array.from({ length: num }, (
|
|
15324
|
+
return Array.from({ length: num }, (v, i) => i);
|
|
16582
15325
|
};
|
|
16583
15326
|
const getStyle = () => {
|
|
16584
15327
|
if (avatarSize) {
|
|
@@ -16665,9 +15408,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
16665
15408
|
const getTimeStamp = (timeStr) => {
|
|
16666
15409
|
if (!timeStr)
|
|
16667
15410
|
return Date.now();
|
|
16668
|
-
let
|
|
16669
|
-
|
|
16670
|
-
return new Date(
|
|
15411
|
+
let t = timeStr;
|
|
15412
|
+
t = t > 0 ? +t : t.toString().replace(/-/g, "/");
|
|
15413
|
+
return new Date(t).getTime();
|
|
16671
15414
|
};
|
|
16672
15415
|
const initTime = () => {
|
|
16673
15416
|
stateRef.current.handleEndTime = endTime;
|
|
@@ -16697,8 +15440,8 @@ const InternalCountDown = (props, ref) => {
|
|
|
16697
15440
|
}
|
|
16698
15441
|
});
|
|
16699
15442
|
};
|
|
16700
|
-
const formatRemainTime = (
|
|
16701
|
-
const ts2 =
|
|
15443
|
+
const formatRemainTime = (t, type) => {
|
|
15444
|
+
const ts2 = t;
|
|
16702
15445
|
const rest2 = {
|
|
16703
15446
|
d: 0,
|
|
16704
15447
|
h: 0,
|
|
@@ -16720,23 +15463,23 @@ const InternalCountDown = (props, ref) => {
|
|
|
16720
15463
|
return type === "custom" ? rest2 : parseFormat({ ...rest2 });
|
|
16721
15464
|
};
|
|
16722
15465
|
const parseFormat = (time2) => {
|
|
16723
|
-
const { d
|
|
16724
|
-
let { h
|
|
15466
|
+
const { d } = time2;
|
|
15467
|
+
let { h, m, s, ms } = time2;
|
|
16725
15468
|
let formatCache = format;
|
|
16726
15469
|
if (formatCache.includes("DD")) {
|
|
16727
|
-
formatCache = formatCache.replace("DD", padZero(
|
|
15470
|
+
formatCache = formatCache.replace("DD", padZero(d));
|
|
16728
15471
|
} else {
|
|
16729
|
-
|
|
15472
|
+
h += Number(d) * 24;
|
|
16730
15473
|
}
|
|
16731
15474
|
if (formatCache.includes("HH")) {
|
|
16732
|
-
formatCache = formatCache.replace("HH", padZero(
|
|
15475
|
+
formatCache = formatCache.replace("HH", padZero(h));
|
|
16733
15476
|
} else {
|
|
16734
|
-
|
|
15477
|
+
m += Number(h) * 60;
|
|
16735
15478
|
}
|
|
16736
15479
|
if (formatCache.includes("mm")) {
|
|
16737
|
-
formatCache = formatCache.replace("mm", padZero(
|
|
15480
|
+
formatCache = formatCache.replace("mm", padZero(m));
|
|
16738
15481
|
} else {
|
|
16739
|
-
s += Number(
|
|
15482
|
+
s += Number(m) * 60;
|
|
16740
15483
|
}
|
|
16741
15484
|
if (formatCache.includes("ss")) {
|
|
16742
15485
|
formatCache = formatCache.replace("ss", padZero(s));
|
|
@@ -16855,7 +15598,7 @@ const defaultProps$k = {
|
|
|
16855
15598
|
rotate: 180
|
|
16856
15599
|
};
|
|
16857
15600
|
function areEqual(prevProps, nextProps) {
|
|
16858
|
-
return JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
15601
|
+
return prevProps.children === nextProps.children && JSON.stringify(prevProps.activeName) === JSON.stringify(nextProps.activeName);
|
|
16859
15602
|
}
|
|
16860
15603
|
const Collapse = memo(
|
|
16861
15604
|
(props) => {
|
|
@@ -16980,10 +15723,6 @@ const CollapseItem = (props) => {
|
|
|
16980
15723
|
transform: "translateY(-50%)"
|
|
16981
15724
|
});
|
|
16982
15725
|
const colBem = cn("collapse-item");
|
|
16983
|
-
useEffect(() => {
|
|
16984
|
-
setCurrHeight("auto");
|
|
16985
|
-
setUpdate(!update2);
|
|
16986
|
-
}, [children]);
|
|
16987
15726
|
const measuredRef = useCallback(
|
|
16988
15727
|
(node) => {
|
|
16989
15728
|
if (node !== null) {
|
|
@@ -17001,6 +15740,14 @@ const CollapseItem = (props) => {
|
|
|
17001
15740
|
setIconStyle(newIconStyle);
|
|
17002
15741
|
}, 10);
|
|
17003
15742
|
}, [isOpen, domHeight, rotate]);
|
|
15743
|
+
useEffect(() => {
|
|
15744
|
+
if (!isOpen) {
|
|
15745
|
+
setCurrHeight("0px");
|
|
15746
|
+
} else {
|
|
15747
|
+
setCurrHeight("auto");
|
|
15748
|
+
}
|
|
15749
|
+
setUpdate(!update2);
|
|
15750
|
+
}, [children, isOpen]);
|
|
17004
15751
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
17005
15752
|
className: colBem(),
|
|
17006
15753
|
...rest
|
|
@@ -17076,7 +15823,7 @@ const CountUp = (props) => {
|
|
|
17076
15823
|
const b2 = cn("countup");
|
|
17077
15824
|
const countupRef = useRef(null);
|
|
17078
15825
|
const timerRef = useRef(0);
|
|
17079
|
-
const numbers = Array.from({ length: 10 }, (
|
|
15826
|
+
const numbers = Array.from({ length: 10 }, (v, i) => i);
|
|
17080
15827
|
const getShowNumber = () => {
|
|
17081
15828
|
const splitArr = endNumber.split(".");
|
|
17082
15829
|
const intNumber = maxLen && splitArr[0].length < maxLen ? (Array(maxLen).join("0") + splitArr[0]).slice(-maxLen) : splitArr[0];
|
|
@@ -17319,16 +16066,16 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
17319
16066
|
if (sizeKey === "width") {
|
|
17320
16067
|
newPos[index].right -= dValue;
|
|
17321
16068
|
newPos[index][sizeKey] = nowSize;
|
|
17322
|
-
for (let
|
|
17323
|
-
newPos[
|
|
17324
|
-
newPos[
|
|
16069
|
+
for (let k = index + 1; k < positions.length; k++) {
|
|
16070
|
+
newPos[k].left = positions[k - 1].right;
|
|
16071
|
+
newPos[k].right -= dValue;
|
|
17325
16072
|
}
|
|
17326
16073
|
} else if (sizeKey === "height") {
|
|
17327
16074
|
newPos[index].bottom -= dValue;
|
|
17328
16075
|
newPos[index][sizeKey] = nowSize;
|
|
17329
|
-
for (let
|
|
17330
|
-
newPos[
|
|
17331
|
-
newPos[
|
|
16076
|
+
for (let k = index + 1; k < positions.length; k++) {
|
|
16077
|
+
newPos[k].top = positions[k - 1].bottom;
|
|
16078
|
+
newPos[k].bottom -= dValue;
|
|
17332
16079
|
}
|
|
17333
16080
|
}
|
|
17334
16081
|
}
|
|
@@ -19361,4 +18108,4 @@ const TimeSelect = (props) => {
|
|
|
19361
18108
|
};
|
|
19362
18109
|
TimeSelect.defaultProps = defaultProps;
|
|
19363
18110
|
TimeSelect.displayName = "NutTimeSelect";
|
|
19364
|
-
export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell
|
|
18111
|
+
export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, CircleProgress, Col, Collapse, CollapseItem, ConfigProvider, CountDown, DatePicker, Dialog, Divider, Drag, Elevator, Empty, FixedNav, Form, FormItem, Grid, GridItem, Icon$1 as Icon, Image, ImagePreview, Indicator, Infiniteloading, Input, InputNumber, Layout, Menu, MenuItem, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Picker, Popover, Popup, Price, Progress, PullToRefresh, Radio, RadioGroup, Range, Rate, Row, SearchBar, ShortPassword, SideNavBar, SideNavBarItem, Signature, Skeleton, Step, Steps, Sticky, SubSideNavBar, Swipe, Swiper, SwiperItem, Switch, TabPane, Tabbar, TabbarItem, Table, Tabs, Tag, TextArea, TimeDetail, TimePannel, TimeSelect, Toast, TrendArrow, Uploader, Video, VirtualList, WaterMark };
|