@nutui/nutui-react-taro 1.3.12-beta.3 → 1.3.12-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/esm/Audio.js +3 -3
- package/dist/esm/Calendar.js +2 -2
- package/dist/esm/Form/style/index.js +2 -0
- package/dist/esm/Form.js +5 -0
- package/dist/esm/FormItem/style/index.js +2 -0
- package/dist/esm/FormItem.js +8 -0
- package/dist/esm/PullToRefresh.js +2 -2
- package/dist/esm/Range.js +2 -2
- package/dist/esm/TextArea.js +2 -2
- package/dist/esm/{audio.taro-b4f71d1b.js → audio.taro-6920085d.js} +1 -1
- package/dist/esm/{calendar.taro-a1f1a7f8.js → calendar.taro-0a8cbd0c.js} +6 -1
- package/dist/esm/form.taro-e086758a.js +16 -0
- package/dist/esm/formitem-9f11e314.js +237 -0
- package/dist/esm/nutui-react.es.js +8 -5
- package/dist/esm/{pulltorefresh.taro-e66c78ad.js → pulltorefresh.taro-fe2fa54c.js} +0 -1
- package/dist/esm/{range.taro-4232e6a7.js → range.taro-4e5f8f31.js} +10 -7
- package/dist/esm/{textarea.taro-0a85b8a5.js → textarea.taro-e1bf7f4d.js} +2 -2
- package/dist/esm/types/src/packages/form/demo.d.ts +3 -0
- package/dist/esm/types/src/packages/form/form.d.ts +9 -0
- package/dist/esm/types/src/packages/form/form.taro.d.ts +4 -0
- package/dist/esm/types/src/packages/form/index.d.ts +2 -0
- package/dist/esm/types/src/packages/form/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/form/types.d.ts +82 -0
- package/dist/esm/types/src/packages/form/useForm.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/formitem.d.ts +30 -0
- package/dist/esm/types/src/packages/formitem/formitemcontext.d.ts +6 -0
- package/dist/esm/types/src/packages/formitem/index.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/index.taro.d.ts +2 -0
- package/dist/esm/types/src/packages/formitem/types.d.ts +82 -0
- package/dist/esm/types/src/packages/formitem/useForm.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.react.build.d.ts +3 -1
- package/dist/esm/types/src/packages/nutui.react.d.ts +5 -1
- package/dist/esm/types/src/packages/nutui.react.scss.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +5 -1
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +2 -0
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +3 -1
- package/dist/esm/types/src/packages/range/range.d.ts +3 -0
- package/dist/esm/types/src/packages/range/range.taro.d.ts +3 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +1818 -419
- package/dist/nutui.react.umd.js +1813 -412
- package/dist/packages/form/form.scss +27 -0
- package/dist/packages/formitem/formitem.scss +87 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/themes/default.scss +2 -0
- package/dist/types/index.d.ts +234 -167
- package/dist/types/nutui.taro.react.build.ts +5 -1
- package/package.json +5 -2
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.3.12-beta.
|
|
2
|
+
* @nutui/nutui-react-taro v1.3.12-beta.4 Wed Nov 23 2022 16:32:35 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import React__default, { useCallback, useState, useEffect, useRef, createContext, useContext, forwardRef, useImperativeHandle, useLayoutEffect, useMemo, memo, Component } from "react";
|
|
7
|
+
import React__default, { useCallback, useState, useEffect, useRef, createContext as createContext$1, useContext as useContext$1, 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(n2) {
|
|
11
|
+
if (n2.__esModule)
|
|
12
|
+
return n2;
|
|
13
13
|
var a = Object.defineProperty({}, "__esModule", { value: true });
|
|
14
|
-
Object.keys(
|
|
15
|
-
var
|
|
16
|
-
Object.defineProperty(a,
|
|
14
|
+
Object.keys(n2).forEach(function(k2) {
|
|
15
|
+
var d2 = Object.getOwnPropertyDescriptor(n2, k2);
|
|
16
|
+
Object.defineProperty(a, k2, d2.get ? d2 : {
|
|
17
17
|
enumerable: true,
|
|
18
18
|
get: function() {
|
|
19
|
-
return
|
|
19
|
+
return n2[k2];
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
});
|
|
@@ -24,43 +24,43 @@ function getAugmentedNamespace(n) {
|
|
|
24
24
|
}
|
|
25
25
|
var classname = { exports: {} };
|
|
26
26
|
var classname_production_min = {};
|
|
27
|
-
function r(r2) {
|
|
27
|
+
function r$1(r2) {
|
|
28
28
|
function e2(e3, i, a, o) {
|
|
29
|
-
var
|
|
29
|
+
var f2 = i ? t2 + e3 + r2.e + i : t2 + e3, v2 = f2;
|
|
30
30
|
if (a) {
|
|
31
|
-
var u = " " +
|
|
31
|
+
var u = " " + v2 + r2.m;
|
|
32
32
|
for (var s in a)
|
|
33
33
|
if (a.hasOwnProperty(s)) {
|
|
34
|
-
var
|
|
35
|
-
true ===
|
|
34
|
+
var p2 = a[s];
|
|
35
|
+
true === p2 ? v2 += u + s : p2 && (v2 += u + s + n2 + p2);
|
|
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 c6 = 0, l2 = o.length; c6 < l2; c6++) {
|
|
40
|
+
var y2 = o[c6];
|
|
41
|
+
if (y2 && "string" == typeof y2.valueOf())
|
|
42
|
+
for (var g2 = y2.valueOf().split(" "), d2 = 0; d2 < g2.length; d2++) {
|
|
43
|
+
var h2 = g2[d2];
|
|
44
|
+
h2 !== f2 && (v2 += " " + h2);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
return
|
|
47
|
+
return v2;
|
|
48
48
|
}
|
|
49
|
-
var
|
|
50
|
-
return function(r3,
|
|
51
|
-
return function(
|
|
52
|
-
return "string" == typeof
|
|
49
|
+
var t2 = r2.n || "", n2 = r2.v || r2.m;
|
|
50
|
+
return function(r3, t3) {
|
|
51
|
+
return function(n3, i, a) {
|
|
52
|
+
return "string" == typeof n3 ? Array.isArray(i) ? e2(r3, n3, void 0, i) : e2(r3, n3, i, a) : e2(r3, t3, n3, i);
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
Object.defineProperty(classname_production_min, "__esModule", { value: true });
|
|
57
|
-
var e = r({ e: "-", m: "_" });
|
|
58
|
-
classname_production_min.cn = e, classname_production_min.withNaming = r;
|
|
57
|
+
var e$1 = r$1({ e: "-", m: "_" });
|
|
58
|
+
classname_production_min.cn = e$1, classname_production_min.withNaming = r$1;
|
|
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$1r = {
|
|
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$1r,
|
|
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$1r;
|
|
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$1q = {
|
|
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$1q,
|
|
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$1q;
|
|
247
247
|
Button.displayName = "NutButton";
|
|
248
|
-
const defaultProps$
|
|
248
|
+
const defaultProps$1p = {
|
|
249
249
|
...ComponentDefaults,
|
|
250
250
|
title: null,
|
|
251
251
|
subTitle: null,
|
|
@@ -267,7 +267,7 @@ const defaultProps$1m = {
|
|
|
267
267
|
onClick: (event) => {
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const Cell = (props) => {
|
|
270
|
+
const Cell$1 = (props) => {
|
|
271
271
|
const {
|
|
272
272
|
children,
|
|
273
273
|
click,
|
|
@@ -291,7 +291,7 @@ const Cell = (props) => {
|
|
|
291
291
|
iconFontClassName,
|
|
292
292
|
...rest
|
|
293
293
|
} = {
|
|
294
|
-
...defaultProps$
|
|
294
|
+
...defaultProps$1p,
|
|
295
295
|
...props
|
|
296
296
|
};
|
|
297
297
|
const b2 = cn("cell");
|
|
@@ -340,9 +340,9 @@ const Cell = (props) => {
|
|
|
340
340
|
className: b2("link")
|
|
341
341
|
}) : linkSlot));
|
|
342
342
|
};
|
|
343
|
-
Cell.defaultProps = defaultProps$
|
|
344
|
-
Cell.displayName = "NutCell";
|
|
345
|
-
const defaultProps$
|
|
343
|
+
Cell$1.defaultProps = defaultProps$1p;
|
|
344
|
+
Cell$1.displayName = "NutCell";
|
|
345
|
+
const defaultProps$1o = {
|
|
346
346
|
title: "",
|
|
347
347
|
desc: "",
|
|
348
348
|
className: "",
|
|
@@ -351,7 +351,7 @@ const defaultProps$1l = {
|
|
|
351
351
|
};
|
|
352
352
|
const CellGroup = (props) => {
|
|
353
353
|
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
354
|
-
...defaultProps$
|
|
354
|
+
...defaultProps$1o,
|
|
355
355
|
...props
|
|
356
356
|
};
|
|
357
357
|
const b2 = cn("cell-group");
|
|
@@ -365,7 +365,7 @@ const CellGroup = (props) => {
|
|
|
365
365
|
className: b2("wrap")
|
|
366
366
|
}, children));
|
|
367
367
|
};
|
|
368
|
-
CellGroup.defaultProps = defaultProps$
|
|
368
|
+
CellGroup.defaultProps = defaultProps$1o;
|
|
369
369
|
CellGroup.displayName = "NutCellGroup";
|
|
370
370
|
var classnames = { exports: {} };
|
|
371
371
|
/*!
|
|
@@ -522,18 +522,72 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
522
522
|
}
|
|
523
523
|
return target;
|
|
524
524
|
}
|
|
525
|
-
function _setPrototypeOf(o,
|
|
526
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2,
|
|
527
|
-
o2.__proto__ =
|
|
525
|
+
function _setPrototypeOf(o, p2) {
|
|
526
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
|
|
527
|
+
o2.__proto__ = p3;
|
|
528
528
|
return o2;
|
|
529
529
|
};
|
|
530
|
-
return _setPrototypeOf(o,
|
|
530
|
+
return _setPrototypeOf(o, p2);
|
|
531
531
|
}
|
|
532
532
|
function _inheritsLoose(subClass, superClass) {
|
|
533
533
|
subClass.prototype = Object.create(superClass.prototype);
|
|
534
534
|
subClass.prototype.constructor = subClass;
|
|
535
535
|
_setPrototypeOf(subClass, superClass);
|
|
536
536
|
}
|
|
537
|
+
var propTypes = { exports: {} };
|
|
538
|
+
var ReactPropTypesSecret$1 = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
539
|
+
var ReactPropTypesSecret_1 = ReactPropTypesSecret$1;
|
|
540
|
+
var ReactPropTypesSecret = ReactPropTypesSecret_1;
|
|
541
|
+
function emptyFunction() {
|
|
542
|
+
}
|
|
543
|
+
function emptyFunctionWithReset() {
|
|
544
|
+
}
|
|
545
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
546
|
+
var factoryWithThrowingShims = function() {
|
|
547
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
548
|
+
if (secret === ReactPropTypesSecret) {
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
var err = new Error(
|
|
552
|
+
"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"
|
|
553
|
+
);
|
|
554
|
+
err.name = "Invariant Violation";
|
|
555
|
+
throw err;
|
|
556
|
+
}
|
|
557
|
+
shim.isRequired = shim;
|
|
558
|
+
function getShim() {
|
|
559
|
+
return shim;
|
|
560
|
+
}
|
|
561
|
+
var ReactPropTypes = {
|
|
562
|
+
array: shim,
|
|
563
|
+
bigint: shim,
|
|
564
|
+
bool: shim,
|
|
565
|
+
func: shim,
|
|
566
|
+
number: shim,
|
|
567
|
+
object: shim,
|
|
568
|
+
string: shim,
|
|
569
|
+
symbol: shim,
|
|
570
|
+
any: shim,
|
|
571
|
+
arrayOf: getShim,
|
|
572
|
+
element: shim,
|
|
573
|
+
elementType: shim,
|
|
574
|
+
instanceOf: getShim,
|
|
575
|
+
node: shim,
|
|
576
|
+
objectOf: getShim,
|
|
577
|
+
oneOf: getShim,
|
|
578
|
+
oneOfType: getShim,
|
|
579
|
+
shape: getShim,
|
|
580
|
+
exact: getShim,
|
|
581
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
582
|
+
resetWarningCache: emptyFunction
|
|
583
|
+
};
|
|
584
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
585
|
+
return ReactPropTypes;
|
|
586
|
+
};
|
|
587
|
+
{
|
|
588
|
+
propTypes.exports = factoryWithThrowingShims();
|
|
589
|
+
}
|
|
590
|
+
var PropTypes = propTypes.exports;
|
|
537
591
|
function hasClass(element, className) {
|
|
538
592
|
if (element.classList)
|
|
539
593
|
return !!className && element.classList.contains(className);
|
|
@@ -574,10 +628,10 @@ var ENTERED = "entered";
|
|
|
574
628
|
var EXITING = "exiting";
|
|
575
629
|
var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
576
630
|
_inheritsLoose(Transition2, _React$Component);
|
|
577
|
-
function Transition2(props,
|
|
631
|
+
function Transition2(props, context2) {
|
|
578
632
|
var _this;
|
|
579
|
-
_this = _React$Component.call(this, props,
|
|
580
|
-
var parentGroup =
|
|
633
|
+
_this = _React$Component.call(this, props, context2) || this;
|
|
634
|
+
var parentGroup = context2;
|
|
581
635
|
var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
|
|
582
636
|
var initialStatus;
|
|
583
637
|
_this.appearStatus = null;
|
|
@@ -797,7 +851,7 @@ var Transition = /* @__PURE__ */ function(_React$Component) {
|
|
|
797
851
|
}(React__default.Component);
|
|
798
852
|
Transition.contextType = TransitionGroupContext;
|
|
799
853
|
Transition.propTypes = {};
|
|
800
|
-
function noop$
|
|
854
|
+
function noop$3() {
|
|
801
855
|
}
|
|
802
856
|
Transition.defaultProps = {
|
|
803
857
|
in: false,
|
|
@@ -806,12 +860,12 @@ Transition.defaultProps = {
|
|
|
806
860
|
appear: false,
|
|
807
861
|
enter: true,
|
|
808
862
|
exit: true,
|
|
809
|
-
onEnter: noop$
|
|
810
|
-
onEntering: noop$
|
|
811
|
-
onEntered: noop$
|
|
812
|
-
onExit: noop$
|
|
813
|
-
onExiting: noop$
|
|
814
|
-
onExited: noop$
|
|
863
|
+
onEnter: noop$3,
|
|
864
|
+
onEntering: noop$3,
|
|
865
|
+
onEntered: noop$3,
|
|
866
|
+
onExit: noop$3,
|
|
867
|
+
onExiting: noop$3,
|
|
868
|
+
onExited: noop$3
|
|
815
869
|
};
|
|
816
870
|
Transition.UNMOUNTED = UNMOUNTED;
|
|
817
871
|
Transition.EXITED = EXITED;
|
|
@@ -820,13 +874,13 @@ Transition.ENTERED = ENTERED;
|
|
|
820
874
|
Transition.EXITING = EXITING;
|
|
821
875
|
var Transition$1 = Transition;
|
|
822
876
|
var _addClass = function addClass$1(node, classes) {
|
|
823
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
824
|
-
return addClass(node,
|
|
877
|
+
return node && classes && classes.split(" ").forEach(function(c6) {
|
|
878
|
+
return addClass(node, c6);
|
|
825
879
|
});
|
|
826
880
|
};
|
|
827
881
|
var removeClass = function removeClass2(node, classes) {
|
|
828
|
-
return node && classes && classes.split(" ").forEach(function(
|
|
829
|
-
return removeClass$1(node,
|
|
882
|
+
return node && classes && classes.split(" ").forEach(function(c6) {
|
|
883
|
+
return removeClass$1(node, c6);
|
|
830
884
|
});
|
|
831
885
|
};
|
|
832
886
|
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
|
|
@@ -958,7 +1012,7 @@ CSSTransition.defaultProps = {
|
|
|
958
1012
|
};
|
|
959
1013
|
CSSTransition.propTypes = {};
|
|
960
1014
|
var CSSTransition$1 = CSSTransition;
|
|
961
|
-
const defaultProps$
|
|
1015
|
+
const defaultProps$1n = {
|
|
962
1016
|
...ComponentDefaults,
|
|
963
1017
|
position: "center",
|
|
964
1018
|
transition: "",
|
|
@@ -1144,7 +1198,7 @@ const Popup = (props) => {
|
|
|
1144
1198
|
}, [position]);
|
|
1145
1199
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderToContainer(teleport, renderNode()));
|
|
1146
1200
|
};
|
|
1147
|
-
Popup.defaultProps = defaultProps$
|
|
1201
|
+
Popup.defaultProps = defaultProps$1n;
|
|
1148
1202
|
Popup.displayName = "NutPopup";
|
|
1149
1203
|
const zhCN = {
|
|
1150
1204
|
save: "\u4FDD\u5B58",
|
|
@@ -1271,7 +1325,7 @@ const zhCN = {
|
|
|
1271
1325
|
completeText: "\u5237\u65B0\u6210\u529F"
|
|
1272
1326
|
}
|
|
1273
1327
|
};
|
|
1274
|
-
const defaultProps$
|
|
1328
|
+
const defaultProps$1m = {
|
|
1275
1329
|
locale: zhCN
|
|
1276
1330
|
};
|
|
1277
1331
|
const defaultConfigRef$1 = {
|
|
@@ -1284,11 +1338,11 @@ const getDefaultConfig$1 = () => {
|
|
|
1284
1338
|
};
|
|
1285
1339
|
const useConfig$1 = () => {
|
|
1286
1340
|
var _a;
|
|
1287
|
-
return (_a = useContext(ConfigContext$1)) != null ? _a : getDefaultConfig$1();
|
|
1341
|
+
return (_a = useContext$1(ConfigContext$1)) != null ? _a : getDefaultConfig$1();
|
|
1288
1342
|
};
|
|
1289
|
-
const ConfigContext$1 = createContext(null);
|
|
1343
|
+
const ConfigContext$1 = createContext$1(null);
|
|
1290
1344
|
const ConfigProvider = (props) => {
|
|
1291
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
1345
|
+
const { children, ...config2 } = { ...defaultProps$1m, ...props };
|
|
1292
1346
|
const parentConfig = useConfig$1();
|
|
1293
1347
|
return /* @__PURE__ */ React__default.createElement(ConfigContext$1.Provider, {
|
|
1294
1348
|
value: {
|
|
@@ -1297,19 +1351,19 @@ const ConfigProvider = (props) => {
|
|
|
1297
1351
|
}
|
|
1298
1352
|
}, children);
|
|
1299
1353
|
};
|
|
1300
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
1354
|
+
ConfigProvider.defaultProps = defaultProps$1m;
|
|
1301
1355
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1302
|
-
const defaultProps$
|
|
1356
|
+
const defaultProps$1l = {};
|
|
1303
1357
|
const Layout = (props) => {
|
|
1304
|
-
({ ...defaultProps$
|
|
1358
|
+
({ ...defaultProps$1l, ...props });
|
|
1305
1359
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1306
1360
|
className: "nut-layout"
|
|
1307
1361
|
}, "Layout");
|
|
1308
1362
|
};
|
|
1309
|
-
Layout.defaultProps = defaultProps$
|
|
1363
|
+
Layout.defaultProps = defaultProps$1l;
|
|
1310
1364
|
Layout.displayName = "NutLayout";
|
|
1311
|
-
const DataContext$2 = createContext({});
|
|
1312
|
-
const defaultProps$
|
|
1365
|
+
const DataContext$2 = createContext$1({});
|
|
1366
|
+
const defaultProps$1k = {
|
|
1313
1367
|
span: "24",
|
|
1314
1368
|
offset: "0",
|
|
1315
1369
|
gutter: "0"
|
|
@@ -1323,12 +1377,12 @@ const Col = (props) => {
|
|
|
1323
1377
|
children,
|
|
1324
1378
|
onClick
|
|
1325
1379
|
} = {
|
|
1326
|
-
...defaultProps$
|
|
1380
|
+
...defaultProps$1k,
|
|
1327
1381
|
...props
|
|
1328
1382
|
};
|
|
1329
1383
|
const [colName, setColName] = useState("");
|
|
1330
1384
|
const [colStyle, setColStyle] = useState({});
|
|
1331
|
-
const { gutter } = useContext(DataContext$2);
|
|
1385
|
+
const { gutter } = useContext$1(DataContext$2);
|
|
1332
1386
|
const classs = () => {
|
|
1333
1387
|
const prefixCls = "nut-col";
|
|
1334
1388
|
return `${prefixCls} ${prefixCls}-${span} ${gutter ? `${prefixCls}-gutter` : ""} ${prefixCls}-${offset}`;
|
|
@@ -1351,9 +1405,9 @@ const Col = (props) => {
|
|
|
1351
1405
|
}
|
|
1352
1406
|
}, children);
|
|
1353
1407
|
};
|
|
1354
|
-
Col.defaultProps = defaultProps$
|
|
1408
|
+
Col.defaultProps = defaultProps$1k;
|
|
1355
1409
|
Col.displayName = "NutCol";
|
|
1356
|
-
const defaultProps$
|
|
1410
|
+
const defaultProps$1j = {
|
|
1357
1411
|
type: "",
|
|
1358
1412
|
justify: "start",
|
|
1359
1413
|
align: "flex-start",
|
|
@@ -1372,7 +1426,7 @@ const Row = (props) => {
|
|
|
1372
1426
|
gutter,
|
|
1373
1427
|
onClick
|
|
1374
1428
|
} = {
|
|
1375
|
-
...defaultProps$
|
|
1429
|
+
...defaultProps$1j,
|
|
1376
1430
|
...props
|
|
1377
1431
|
};
|
|
1378
1432
|
const prefixCls = "nut-row";
|
|
@@ -1407,9 +1461,9 @@ const Row = (props) => {
|
|
|
1407
1461
|
children
|
|
1408
1462
|
));
|
|
1409
1463
|
};
|
|
1410
|
-
Row.defaultProps = defaultProps$
|
|
1464
|
+
Row.defaultProps = defaultProps$1j;
|
|
1411
1465
|
Row.displayName = "NutRow";
|
|
1412
|
-
const defaultProps$
|
|
1466
|
+
const defaultProps$1i = {
|
|
1413
1467
|
contentPosition: "center",
|
|
1414
1468
|
dashed: false,
|
|
1415
1469
|
hairline: true,
|
|
@@ -1426,7 +1480,7 @@ const Divider = (props) => {
|
|
|
1426
1480
|
direction,
|
|
1427
1481
|
...rest
|
|
1428
1482
|
} = {
|
|
1429
|
-
...defaultProps$
|
|
1483
|
+
...defaultProps$1i,
|
|
1430
1484
|
...props
|
|
1431
1485
|
};
|
|
1432
1486
|
const dividerBem = cn("divider");
|
|
@@ -1447,9 +1501,9 @@ const Divider = (props) => {
|
|
|
1447
1501
|
...rest
|
|
1448
1502
|
}, children);
|
|
1449
1503
|
};
|
|
1450
|
-
Divider.defaultProps = defaultProps$
|
|
1504
|
+
Divider.defaultProps = defaultProps$1i;
|
|
1451
1505
|
Divider.displayName = "NutDivider";
|
|
1452
|
-
const defaultProps$
|
|
1506
|
+
const defaultProps$1h = {
|
|
1453
1507
|
columnNum: 4,
|
|
1454
1508
|
border: true,
|
|
1455
1509
|
gutter: 0,
|
|
@@ -1476,7 +1530,7 @@ const Grid = (props) => {
|
|
|
1476
1530
|
iconColor,
|
|
1477
1531
|
className,
|
|
1478
1532
|
...rest
|
|
1479
|
-
} = { ...defaultProps$
|
|
1533
|
+
} = { ...defaultProps$1h, ...props };
|
|
1480
1534
|
const childrenDom = React__default.Children.toArray(children);
|
|
1481
1535
|
const pxCheck2 = (value) => {
|
|
1482
1536
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -1515,9 +1569,9 @@ const Grid = (props) => {
|
|
|
1515
1569
|
});
|
|
1516
1570
|
}));
|
|
1517
1571
|
};
|
|
1518
|
-
Grid.defaultProps = defaultProps$
|
|
1572
|
+
Grid.defaultProps = defaultProps$1h;
|
|
1519
1573
|
Grid.displayName = "NutGrid";
|
|
1520
|
-
const defaultProps$
|
|
1574
|
+
const defaultProps$1g = {
|
|
1521
1575
|
...ComponentDefaults,
|
|
1522
1576
|
text: "",
|
|
1523
1577
|
icon: "",
|
|
@@ -1556,7 +1610,7 @@ const GridItem = (props) => {
|
|
|
1556
1610
|
onClick,
|
|
1557
1611
|
...rest
|
|
1558
1612
|
} = {
|
|
1559
|
-
...defaultProps$
|
|
1613
|
+
...defaultProps$1g,
|
|
1560
1614
|
...props
|
|
1561
1615
|
};
|
|
1562
1616
|
const b2 = cn("grid-item");
|
|
@@ -1604,7 +1658,7 @@ const GridItem = (props) => {
|
|
|
1604
1658
|
className: "nut-grid-item__text"
|
|
1605
1659
|
}, text), children && /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children)));
|
|
1606
1660
|
};
|
|
1607
|
-
GridItem.defaultProps = defaultProps$
|
|
1661
|
+
GridItem.defaultProps = defaultProps$1g;
|
|
1608
1662
|
GridItem.displayName = "NutGridItem";
|
|
1609
1663
|
const defaultConfigRef = {
|
|
1610
1664
|
current: {
|
|
@@ -1616,20 +1670,20 @@ const getDefaultConfig = () => {
|
|
|
1616
1670
|
};
|
|
1617
1671
|
const useConfig = () => {
|
|
1618
1672
|
var _a;
|
|
1619
|
-
return (_a = useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1673
|
+
return (_a = useContext$1(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
1620
1674
|
};
|
|
1621
|
-
const ConfigContext = createContext(null);
|
|
1622
|
-
const defaultProps$
|
|
1675
|
+
const ConfigContext = createContext$1(null);
|
|
1676
|
+
const defaultProps$1f = {};
|
|
1623
1677
|
const Sticky = (props) => {
|
|
1624
1678
|
useConfig();
|
|
1625
|
-
({ ...defaultProps$
|
|
1679
|
+
({ ...defaultProps$1f, ...props });
|
|
1626
1680
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1627
1681
|
className: "nut-sticky"
|
|
1628
1682
|
}, "Sticky");
|
|
1629
1683
|
};
|
|
1630
|
-
Sticky.defaultProps = defaultProps$
|
|
1684
|
+
Sticky.defaultProps = defaultProps$1f;
|
|
1631
1685
|
Sticky.displayName = "NutSticky";
|
|
1632
|
-
const defaultProps$
|
|
1686
|
+
const defaultProps$1e = {
|
|
1633
1687
|
...ComponentDefaults,
|
|
1634
1688
|
title: "",
|
|
1635
1689
|
desc: "",
|
|
@@ -1665,7 +1719,7 @@ const NavBar = (props) => {
|
|
|
1665
1719
|
iconClassPrefix,
|
|
1666
1720
|
iconFontClassName
|
|
1667
1721
|
} = {
|
|
1668
|
-
...defaultProps$
|
|
1722
|
+
...defaultProps$1e,
|
|
1669
1723
|
...props
|
|
1670
1724
|
};
|
|
1671
1725
|
const b2 = cn("navbar");
|
|
@@ -1734,9 +1788,9 @@ const NavBar = (props) => {
|
|
|
1734
1788
|
className: `${b2("")}--placeholder`
|
|
1735
1789
|
}, renderWrapper()) : renderWrapper());
|
|
1736
1790
|
};
|
|
1737
|
-
NavBar.defaultProps = defaultProps$
|
|
1791
|
+
NavBar.defaultProps = defaultProps$1e;
|
|
1738
1792
|
NavBar.displayName = "NutNavBar";
|
|
1739
|
-
const defaultProps$
|
|
1793
|
+
const defaultProps$1d = {
|
|
1740
1794
|
...ComponentDefaults,
|
|
1741
1795
|
fixednavClass: "nut-fixednav",
|
|
1742
1796
|
activeText: "",
|
|
@@ -1766,7 +1820,7 @@ const FixedNav = (props) => {
|
|
|
1766
1820
|
iconFontClassName,
|
|
1767
1821
|
...rest
|
|
1768
1822
|
} = {
|
|
1769
|
-
...defaultProps$
|
|
1823
|
+
...defaultProps$1d,
|
|
1770
1824
|
...props
|
|
1771
1825
|
};
|
|
1772
1826
|
const b2 = cn("fixednav");
|
|
@@ -1821,9 +1875,9 @@ const FixedNav = (props) => {
|
|
|
1821
1875
|
className: "text"
|
|
1822
1876
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
1823
1877
|
};
|
|
1824
|
-
FixedNav.defaultProps = defaultProps$
|
|
1878
|
+
FixedNav.defaultProps = defaultProps$1d;
|
|
1825
1879
|
FixedNav.displayName = "NutFixedNav";
|
|
1826
|
-
const defaultProps$
|
|
1880
|
+
const defaultProps$1c = {
|
|
1827
1881
|
visible: 0,
|
|
1828
1882
|
bottom: false,
|
|
1829
1883
|
size: 20,
|
|
@@ -1851,7 +1905,7 @@ const Tabbar = (props) => {
|
|
|
1851
1905
|
tabSwitch,
|
|
1852
1906
|
onSwitch
|
|
1853
1907
|
} = {
|
|
1854
|
-
...defaultProps$
|
|
1908
|
+
...defaultProps$1c,
|
|
1855
1909
|
...props
|
|
1856
1910
|
};
|
|
1857
1911
|
const b2 = cn("tabbar");
|
|
@@ -1887,9 +1941,9 @@ const Tabbar = (props) => {
|
|
|
1887
1941
|
return React__default.cloneElement(child, childProps);
|
|
1888
1942
|
}));
|
|
1889
1943
|
};
|
|
1890
|
-
Tabbar.defaultProps = defaultProps$
|
|
1944
|
+
Tabbar.defaultProps = defaultProps$1c;
|
|
1891
1945
|
Tabbar.displayName = "NutTabbar";
|
|
1892
|
-
const defaultProps$
|
|
1946
|
+
const defaultProps$1b = {
|
|
1893
1947
|
...ComponentDefaults,
|
|
1894
1948
|
dot: false,
|
|
1895
1949
|
size: "",
|
|
@@ -1925,7 +1979,7 @@ const TabbarItem = (props) => {
|
|
|
1925
1979
|
iconClassPrefix,
|
|
1926
1980
|
iconFontClassName
|
|
1927
1981
|
} = {
|
|
1928
|
-
...defaultProps$
|
|
1982
|
+
...defaultProps$1b,
|
|
1929
1983
|
...props
|
|
1930
1984
|
};
|
|
1931
1985
|
const b2 = cn("tabbar-item");
|
|
@@ -1974,8 +2028,8 @@ var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
1974
2028
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1975
2029
|
var require$$0 = /* @__PURE__ */ getAugmentedNamespace(index_cjs$1);
|
|
1976
2030
|
var index_cjs = require$$0;
|
|
1977
|
-
const elevatorContext = createContext({});
|
|
1978
|
-
const defaultProps$
|
|
2031
|
+
const elevatorContext = createContext$1({});
|
|
2032
|
+
const defaultProps$1a = {
|
|
1979
2033
|
height: "200px",
|
|
1980
2034
|
acceptKey: "title",
|
|
1981
2035
|
indexList: [],
|
|
@@ -1998,7 +2052,7 @@ const Elevator = (props) => {
|
|
|
1998
2052
|
children,
|
|
1999
2053
|
...rest
|
|
2000
2054
|
} = {
|
|
2001
|
-
...defaultProps$
|
|
2055
|
+
...defaultProps$1a,
|
|
2002
2056
|
...props
|
|
2003
2057
|
};
|
|
2004
2058
|
const b2 = cn("elevator");
|
|
@@ -2198,9 +2252,9 @@ const Elevator = (props) => {
|
|
|
2198
2252
|
}, item[acceptKey]);
|
|
2199
2253
|
}))));
|
|
2200
2254
|
};
|
|
2201
|
-
Elevator.defaultProps = defaultProps$
|
|
2255
|
+
Elevator.defaultProps = defaultProps$1a;
|
|
2202
2256
|
Elevator.displayName = "NutElevator";
|
|
2203
|
-
const defaultProps$
|
|
2257
|
+
const defaultProps$19 = {
|
|
2204
2258
|
defaultValue: 1,
|
|
2205
2259
|
mode: "multi",
|
|
2206
2260
|
prevText: "",
|
|
@@ -2217,7 +2271,7 @@ const defaultProps$16 = {
|
|
|
2217
2271
|
};
|
|
2218
2272
|
const Pagination = (props) => {
|
|
2219
2273
|
const { locale } = useConfig$1();
|
|
2220
|
-
({ ...defaultProps$
|
|
2274
|
+
({ ...defaultProps$19, ...props });
|
|
2221
2275
|
const {
|
|
2222
2276
|
modelValue,
|
|
2223
2277
|
mode,
|
|
@@ -2334,7 +2388,7 @@ const Pagination = (props) => {
|
|
|
2334
2388
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
2335
2389
|
}, nextText || locale.pagination.next));
|
|
2336
2390
|
};
|
|
2337
|
-
Pagination.defaultProps = defaultProps$
|
|
2391
|
+
Pagination.defaultProps = defaultProps$19;
|
|
2338
2392
|
Pagination.displayName = "NutPagination";
|
|
2339
2393
|
class Title {
|
|
2340
2394
|
constructor() {
|
|
@@ -2344,7 +2398,7 @@ class Title {
|
|
|
2344
2398
|
this.index = 0;
|
|
2345
2399
|
}
|
|
2346
2400
|
}
|
|
2347
|
-
const defaultProps$
|
|
2401
|
+
const defaultProps$18 = {
|
|
2348
2402
|
...ComponentDefaults,
|
|
2349
2403
|
tabStyle: {},
|
|
2350
2404
|
value: 0,
|
|
@@ -2385,7 +2439,7 @@ const Tabs = (props) => {
|
|
|
2385
2439
|
iconFontClassName,
|
|
2386
2440
|
...rest
|
|
2387
2441
|
} = {
|
|
2388
|
-
...defaultProps$
|
|
2442
|
+
...defaultProps$18,
|
|
2389
2443
|
...props
|
|
2390
2444
|
};
|
|
2391
2445
|
const [currentItem, setCurrentItem] = useState({ index: 0 });
|
|
@@ -2430,7 +2484,7 @@ const Tabs = (props) => {
|
|
|
2430
2484
|
color: type === "smile" ? color : "",
|
|
2431
2485
|
background: type === "line" ? color : ""
|
|
2432
2486
|
};
|
|
2433
|
-
const index = titles.current.findIndex((
|
|
2487
|
+
const index = titles.current.findIndex((t2) => t2.paneKey === value);
|
|
2434
2488
|
const contentStyle = {
|
|
2435
2489
|
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
2436
2490
|
transitionDuration: `${animatedTime}ms`
|
|
@@ -2503,9 +2557,9 @@ const Tabs = (props) => {
|
|
|
2503
2557
|
return React__default.cloneElement(child, childProps);
|
|
2504
2558
|
}))));
|
|
2505
2559
|
};
|
|
2506
|
-
Tabs.defaultProps = defaultProps$
|
|
2560
|
+
Tabs.defaultProps = defaultProps$18;
|
|
2507
2561
|
Tabs.displayName = "NutTabs";
|
|
2508
|
-
const defaultProps$
|
|
2562
|
+
const defaultProps$17 = {
|
|
2509
2563
|
title: "",
|
|
2510
2564
|
paneKey: "",
|
|
2511
2565
|
activeKey: "",
|
|
@@ -2513,7 +2567,7 @@ const defaultProps$14 = {
|
|
|
2513
2567
|
};
|
|
2514
2568
|
const TabPane = (props) => {
|
|
2515
2569
|
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
2516
|
-
...defaultProps$
|
|
2570
|
+
...defaultProps$17,
|
|
2517
2571
|
...props
|
|
2518
2572
|
};
|
|
2519
2573
|
const b2 = cn("tabpane");
|
|
@@ -2529,7 +2583,7 @@ const TabPane = (props) => {
|
|
|
2529
2583
|
className: classes
|
|
2530
2584
|
}, children);
|
|
2531
2585
|
};
|
|
2532
|
-
const defaultProps$
|
|
2586
|
+
const defaultProps$16 = {
|
|
2533
2587
|
size: 3,
|
|
2534
2588
|
current: 1,
|
|
2535
2589
|
block: false,
|
|
@@ -2549,7 +2603,7 @@ const Indicator = (props) => {
|
|
|
2549
2603
|
vertical,
|
|
2550
2604
|
...rest
|
|
2551
2605
|
} = {
|
|
2552
|
-
...defaultProps$
|
|
2606
|
+
...defaultProps$16,
|
|
2553
2607
|
...props
|
|
2554
2608
|
};
|
|
2555
2609
|
const b2 = cn("indicator");
|
|
@@ -2583,7 +2637,7 @@ const Indicator = (props) => {
|
|
|
2583
2637
|
...rest
|
|
2584
2638
|
}, renderEles());
|
|
2585
2639
|
};
|
|
2586
|
-
Indicator.defaultProps = defaultProps$
|
|
2640
|
+
Indicator.defaultProps = defaultProps$16;
|
|
2587
2641
|
Indicator.displayName = "NutIndicator";
|
|
2588
2642
|
const handleClick = (e2) => {
|
|
2589
2643
|
e2.stopPropagation();
|
|
@@ -2598,8 +2652,8 @@ const handleClick = (e2) => {
|
|
|
2598
2652
|
arrowIcon.className = isShow ? iconClass.replace("arrow-down", "arrow-up") : iconClass.replace("arrow-up", "arrow-down");
|
|
2599
2653
|
}
|
|
2600
2654
|
};
|
|
2601
|
-
const OffsetContext = createContext(20);
|
|
2602
|
-
const defaultProps$
|
|
2655
|
+
const OffsetContext = createContext$1(20);
|
|
2656
|
+
const defaultProps$15 = {
|
|
2603
2657
|
showhead: false,
|
|
2604
2658
|
position: "left",
|
|
2605
2659
|
width: "80%"
|
|
@@ -2617,7 +2671,7 @@ const SideNavBar = (props) => {
|
|
|
2617
2671
|
onClose,
|
|
2618
2672
|
...rest
|
|
2619
2673
|
} = {
|
|
2620
|
-
...defaultProps$
|
|
2674
|
+
...defaultProps$15,
|
|
2621
2675
|
...props
|
|
2622
2676
|
};
|
|
2623
2677
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -2645,17 +2699,17 @@ const SideNavBar = (props) => {
|
|
|
2645
2699
|
className: "nut-sidenavbar__content"
|
|
2646
2700
|
}, children))))));
|
|
2647
2701
|
};
|
|
2648
|
-
SideNavBar.defaultProps = defaultProps$
|
|
2702
|
+
SideNavBar.defaultProps = defaultProps$15;
|
|
2649
2703
|
SideNavBar.displayName = "NutSideNavBar";
|
|
2650
|
-
const defaultProps$
|
|
2704
|
+
const defaultProps$14 = {
|
|
2651
2705
|
open: true
|
|
2652
2706
|
};
|
|
2653
2707
|
const SubSideNavBar = (props) => {
|
|
2654
2708
|
const { title, ikey, children, onClick, open, ...rest } = {
|
|
2655
|
-
...defaultProps$
|
|
2709
|
+
...defaultProps$14,
|
|
2656
2710
|
...props
|
|
2657
2711
|
};
|
|
2658
|
-
const offset = useContext(OffsetContext);
|
|
2712
|
+
const offset = useContext$1(OffsetContext);
|
|
2659
2713
|
console.log("offset>>>>>>>", offset);
|
|
2660
2714
|
const listRef = useRef(null);
|
|
2661
2715
|
const setListLevel = useCallback(
|
|
@@ -2723,7 +2777,7 @@ const SideNavBarItem = (props) => {
|
|
|
2723
2777
|
...rest
|
|
2724
2778
|
}, title);
|
|
2725
2779
|
};
|
|
2726
|
-
const defaultProps$
|
|
2780
|
+
const defaultProps$13 = {
|
|
2727
2781
|
...ComponentDefaults,
|
|
2728
2782
|
className: "",
|
|
2729
2783
|
style: {},
|
|
@@ -2746,7 +2800,7 @@ const Menu = (props) => {
|
|
|
2746
2800
|
iconFontClassName,
|
|
2747
2801
|
...rest
|
|
2748
2802
|
} = {
|
|
2749
|
-
...defaultProps$
|
|
2803
|
+
...defaultProps$13,
|
|
2750
2804
|
...props
|
|
2751
2805
|
};
|
|
2752
2806
|
const parentRef = useRef(null);
|
|
@@ -2843,9 +2897,9 @@ const Menu = (props) => {
|
|
|
2843
2897
|
})));
|
|
2844
2898
|
})), cloneChildren()));
|
|
2845
2899
|
};
|
|
2846
|
-
Menu.defaultProps = defaultProps$
|
|
2900
|
+
Menu.defaultProps = defaultProps$13;
|
|
2847
2901
|
Menu.displayName = "NutMenu";
|
|
2848
|
-
const defaultProps
|
|
2902
|
+
const defaultProps$12 = {
|
|
2849
2903
|
...ComponentDefaults,
|
|
2850
2904
|
className: "",
|
|
2851
2905
|
style: {},
|
|
@@ -2860,7 +2914,7 @@ const defaultProps$$ = {
|
|
|
2860
2914
|
};
|
|
2861
2915
|
const MenuItem = forwardRef((props, ref) => {
|
|
2862
2916
|
useConfig$1();
|
|
2863
|
-
const mergedProps = { ...defaultProps
|
|
2917
|
+
const mergedProps = { ...defaultProps$12, ...props };
|
|
2864
2918
|
const {
|
|
2865
2919
|
style,
|
|
2866
2920
|
options,
|
|
@@ -2876,7 +2930,7 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
2876
2930
|
iconClassPrefix,
|
|
2877
2931
|
iconFontClassName
|
|
2878
2932
|
} = {
|
|
2879
|
-
...defaultProps
|
|
2933
|
+
...defaultProps$12,
|
|
2880
2934
|
...props
|
|
2881
2935
|
};
|
|
2882
2936
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -2914,8 +2968,8 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
2914
2968
|
});
|
|
2915
2969
|
const getParentOffset = () => {
|
|
2916
2970
|
setTimeout(async () => {
|
|
2917
|
-
const
|
|
2918
|
-
const rect = await
|
|
2971
|
+
const p2 = parent.parent().current;
|
|
2972
|
+
const rect = await p2.getBoundingClientRect();
|
|
2919
2973
|
setPosition({
|
|
2920
2974
|
height: rect.height,
|
|
2921
2975
|
top: rect.top
|
|
@@ -2997,14 +3051,14 @@ const MenuItem = forwardRef((props, ref) => {
|
|
|
2997
3051
|
}, item.text));
|
|
2998
3052
|
}), children))));
|
|
2999
3053
|
});
|
|
3000
|
-
MenuItem.defaultProps = defaultProps
|
|
3054
|
+
MenuItem.defaultProps = defaultProps$12;
|
|
3001
3055
|
MenuItem.displayName = "NutMenuItem";
|
|
3002
3056
|
const MIN_DISTANCE = 10;
|
|
3003
|
-
function getDirection(
|
|
3004
|
-
if (
|
|
3057
|
+
function getDirection(x2, y2) {
|
|
3058
|
+
if (x2 > y2 && x2 > MIN_DISTANCE) {
|
|
3005
3059
|
return "horizontal";
|
|
3006
3060
|
}
|
|
3007
|
-
if (
|
|
3061
|
+
if (y2 > x2 && y2 > MIN_DISTANCE) {
|
|
3008
3062
|
return "vertical";
|
|
3009
3063
|
}
|
|
3010
3064
|
return "";
|
|
@@ -3068,7 +3122,7 @@ const getRectByTaro = async (element) => {
|
|
|
3068
3122
|
const res = await element.getBoundingClientRect();
|
|
3069
3123
|
return res;
|
|
3070
3124
|
};
|
|
3071
|
-
const defaultProps$
|
|
3125
|
+
const defaultProps$11 = {
|
|
3072
3126
|
name: "",
|
|
3073
3127
|
size: "",
|
|
3074
3128
|
classPrefix: "nut-icon",
|
|
@@ -3096,7 +3150,7 @@ function Icon(props) {
|
|
|
3096
3150
|
onClick,
|
|
3097
3151
|
...rest
|
|
3098
3152
|
} = {
|
|
3099
|
-
...defaultProps$
|
|
3153
|
+
...defaultProps$11,
|
|
3100
3154
|
...props
|
|
3101
3155
|
};
|
|
3102
3156
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -3130,9 +3184,9 @@ function Icon(props) {
|
|
|
3130
3184
|
children
|
|
3131
3185
|
);
|
|
3132
3186
|
}
|
|
3133
|
-
Icon.defaultProps = defaultProps$
|
|
3187
|
+
Icon.defaultProps = defaultProps$11;
|
|
3134
3188
|
Icon.displayName = "NutIcon";
|
|
3135
|
-
const defaultProps$
|
|
3189
|
+
const defaultProps$10 = {
|
|
3136
3190
|
id: "",
|
|
3137
3191
|
style: {},
|
|
3138
3192
|
icon: null,
|
|
@@ -3177,7 +3231,7 @@ const Toast = (props) => {
|
|
|
3177
3231
|
visible,
|
|
3178
3232
|
onClose,
|
|
3179
3233
|
...rest
|
|
3180
|
-
} = { ...defaultProps$
|
|
3234
|
+
} = { ...defaultProps$10, ...props };
|
|
3181
3235
|
let timer;
|
|
3182
3236
|
const [openState, SetOpenState] = useState(false);
|
|
3183
3237
|
useEffect(() => {
|
|
@@ -3266,9 +3320,9 @@ const Toast = (props) => {
|
|
|
3266
3320
|
className: toastBem("text")
|
|
3267
3321
|
}, msg))) : null);
|
|
3268
3322
|
};
|
|
3269
|
-
Toast.defaultProps = defaultProps$
|
|
3323
|
+
Toast.defaultProps = defaultProps$10;
|
|
3270
3324
|
Toast.displayName = "NutToast";
|
|
3271
|
-
const defaultProps
|
|
3325
|
+
const defaultProps$$ = {
|
|
3272
3326
|
range: false,
|
|
3273
3327
|
hiddenRange: false,
|
|
3274
3328
|
hiddenTag: false,
|
|
@@ -3301,9 +3355,12 @@ const Range = (props) => {
|
|
|
3301
3355
|
dragEnd,
|
|
3302
3356
|
onChange,
|
|
3303
3357
|
onDragStart,
|
|
3304
|
-
onDragEnd
|
|
3305
|
-
|
|
3306
|
-
|
|
3358
|
+
onDragEnd,
|
|
3359
|
+
minDesc,
|
|
3360
|
+
maxDesc,
|
|
3361
|
+
curValueDesc
|
|
3362
|
+
} = { ...defaultProps$$, ...props };
|
|
3363
|
+
let { min, max, step } = { ...defaultProps$$, ...props };
|
|
3307
3364
|
min = Number(min);
|
|
3308
3365
|
max = Number(max);
|
|
3309
3366
|
step = Number(step);
|
|
@@ -3480,10 +3537,10 @@ const Range = (props) => {
|
|
|
3480
3537
|
}
|
|
3481
3538
|
SetDragStatus("");
|
|
3482
3539
|
const rect = await getRectByTaro(root.current);
|
|
3483
|
-
let delta = event.detail.x - rect.left;
|
|
3540
|
+
let delta = (event.detail.x ? event.detail.x : event.clientX) - rect.left;
|
|
3484
3541
|
let total = rect.width;
|
|
3485
3542
|
if (vertical) {
|
|
3486
|
-
delta = event.detail.y - rect.top;
|
|
3543
|
+
delta = (event.detail.y ? event.detail.y : event.clientY) - rect.top;
|
|
3487
3544
|
total = rect.height;
|
|
3488
3545
|
}
|
|
3489
3546
|
const value = Number(min) + delta / total * scope();
|
|
@@ -3559,7 +3616,7 @@ const Range = (props) => {
|
|
|
3559
3616
|
className: `${containerName}`
|
|
3560
3617
|
}, !hiddenRange ? /* @__PURE__ */ React__default.createElement("div", {
|
|
3561
3618
|
className: "min"
|
|
3562
|
-
}, +min) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
3619
|
+
}, minDesc || +min) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
3563
3620
|
ref: root,
|
|
3564
3621
|
style: wrapperStyle(),
|
|
3565
3622
|
className: `${rangeName}`,
|
|
@@ -3614,7 +3671,7 @@ const Range = (props) => {
|
|
|
3614
3671
|
style: buttonStyle()
|
|
3615
3672
|
}, !hiddenTag ? /* @__PURE__ */ React__default.createElement("div", {
|
|
3616
3673
|
className: "number"
|
|
3617
|
-
}, curValue(index)) : null));
|
|
3674
|
+
}, curValueDesc || curValue(index)) : null));
|
|
3618
3675
|
}) : /* @__PURE__ */ React__default.createElement("div", {
|
|
3619
3676
|
role: "slider",
|
|
3620
3677
|
className: "nut-range-button-wrapper",
|
|
@@ -3643,9 +3700,9 @@ const Range = (props) => {
|
|
|
3643
3700
|
style: buttonStyle()
|
|
3644
3701
|
}, !hiddenTag ? /* @__PURE__ */ React__default.createElement("div", {
|
|
3645
3702
|
className: "number"
|
|
3646
|
-
}, curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default.createElement("div", {
|
|
3703
|
+
}, curValueDesc || curValue()) : null)))), !hiddenRange ? /* @__PURE__ */ React__default.createElement("div", {
|
|
3647
3704
|
className: "max"
|
|
3648
|
-
}, +max) : null, /* @__PURE__ */ React__default.createElement(Toast, {
|
|
3705
|
+
}, maxDesc || +max) : null, /* @__PURE__ */ React__default.createElement(Toast, {
|
|
3649
3706
|
type: "text",
|
|
3650
3707
|
visible: show,
|
|
3651
3708
|
msg: toastMsg,
|
|
@@ -3654,11 +3711,11 @@ const Range = (props) => {
|
|
|
3654
3711
|
}
|
|
3655
3712
|
}));
|
|
3656
3713
|
};
|
|
3657
|
-
Range.defaultProps = defaultProps
|
|
3714
|
+
Range.defaultProps = defaultProps$$;
|
|
3658
3715
|
Range.displayName = "NutRange";
|
|
3659
3716
|
const Utils = {
|
|
3660
|
-
isLeapYear(
|
|
3661
|
-
return
|
|
3717
|
+
isLeapYear(y2) {
|
|
3718
|
+
return y2 % 4 == 0 && y2 % 100 != 0 || y2 % 400 == 0;
|
|
3662
3719
|
},
|
|
3663
3720
|
getWhatDay(year, month, day) {
|
|
3664
3721
|
const date = new Date(`${year}/${month}/${day}`);
|
|
@@ -3702,16 +3759,16 @@ const Utils = {
|
|
|
3702
3759
|
31
|
|
3703
3760
|
][month];
|
|
3704
3761
|
},
|
|
3705
|
-
getNumTwoBit(
|
|
3706
|
-
|
|
3707
|
-
return (
|
|
3762
|
+
getNumTwoBit(n2) {
|
|
3763
|
+
n2 = Number(n2);
|
|
3764
|
+
return (n2 > 9 ? "" : "0") + n2;
|
|
3708
3765
|
},
|
|
3709
3766
|
date2Str(date, split) {
|
|
3710
3767
|
split = split || "-";
|
|
3711
|
-
const
|
|
3712
|
-
const
|
|
3713
|
-
const
|
|
3714
|
-
return [
|
|
3768
|
+
const y2 = date.getFullYear();
|
|
3769
|
+
const m2 = this.getNumTwoBit(date.getMonth() + 1);
|
|
3770
|
+
const d2 = this.getNumTwoBit(date.getDate());
|
|
3771
|
+
return [y2, m2, d2].join(split);
|
|
3715
3772
|
},
|
|
3716
3773
|
getDay(i) {
|
|
3717
3774
|
i = i || 0;
|
|
@@ -3748,7 +3805,7 @@ function requestAniFrame() {
|
|
|
3748
3805
|
};
|
|
3749
3806
|
}
|
|
3750
3807
|
var requestAniFrame$1 = requestAniFrame();
|
|
3751
|
-
const defaultProps$
|
|
3808
|
+
const defaultProps$_ = {
|
|
3752
3809
|
type: "one",
|
|
3753
3810
|
isAutoBackFill: false,
|
|
3754
3811
|
poppable: true,
|
|
@@ -3777,7 +3834,7 @@ const CalendarItem = (props) => {
|
|
|
3777
3834
|
onChoose,
|
|
3778
3835
|
onUpdate,
|
|
3779
3836
|
onClose
|
|
3780
|
-
} = { ...defaultProps$
|
|
3837
|
+
} = { ...defaultProps$_, ...props };
|
|
3781
3838
|
const weeks = locale.calendaritem.weekdays;
|
|
3782
3839
|
const [yearMonthTitle, setYearMonthTitle] = useState("");
|
|
3783
3840
|
const [unLoadPrev, setUnLoadPrev] = useState(false);
|
|
@@ -3938,9 +3995,9 @@ const CalendarItem = (props) => {
|
|
|
3938
3995
|
if (type2 === "prev" && days >= 7) {
|
|
3939
3996
|
days -= 7;
|
|
3940
3997
|
}
|
|
3941
|
-
return Array.from(Array(days), (
|
|
3998
|
+
return Array.from(Array(days), (v2, k2) => {
|
|
3942
3999
|
return {
|
|
3943
|
-
day:
|
|
4000
|
+
day: k2 + 1,
|
|
3944
4001
|
type: type2
|
|
3945
4002
|
};
|
|
3946
4003
|
});
|
|
@@ -4013,16 +4070,16 @@ const CalendarItem = (props) => {
|
|
|
4013
4070
|
const setMove = (move, type2, time) => {
|
|
4014
4071
|
var _a, _b;
|
|
4015
4072
|
let updateMove = move + state.transformY;
|
|
4016
|
-
const
|
|
4073
|
+
const h2 = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4017
4074
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4018
4075
|
if (type2 === "end") {
|
|
4019
4076
|
if (updateMove > 0) {
|
|
4020
4077
|
updateMove = 0;
|
|
4021
4078
|
}
|
|
4022
|
-
if (updateMove < 0 && updateMove < -offsetHeight +
|
|
4023
|
-
updateMove = -offsetHeight +
|
|
4079
|
+
if (updateMove < 0 && updateMove < -offsetHeight + h2) {
|
|
4080
|
+
updateMove = -offsetHeight + h2;
|
|
4024
4081
|
}
|
|
4025
|
-
if (offsetHeight <=
|
|
4082
|
+
if (offsetHeight <= h2 && state.monthsData.length === 1) {
|
|
4026
4083
|
updateMove = 0;
|
|
4027
4084
|
}
|
|
4028
4085
|
setTransform(updateMove, type2, time);
|
|
@@ -4030,8 +4087,8 @@ const CalendarItem = (props) => {
|
|
|
4030
4087
|
if (updateMove > 0 && updateMove > 100) {
|
|
4031
4088
|
updateMove = 100;
|
|
4032
4089
|
}
|
|
4033
|
-
if (updateMove < -offsetHeight +
|
|
4034
|
-
updateMove = -offsetHeight +
|
|
4090
|
+
if (updateMove < -offsetHeight + h2 - 100 && state.monthsData.length > 1) {
|
|
4091
|
+
updateMove = -offsetHeight + h2 - 100;
|
|
4035
4092
|
}
|
|
4036
4093
|
if (updateMove < 0 && updateMove < -100 && state.monthsData.length === 1) {
|
|
4037
4094
|
updateMove = -100;
|
|
@@ -4068,11 +4125,11 @@ const CalendarItem = (props) => {
|
|
|
4068
4125
|
return false;
|
|
4069
4126
|
}
|
|
4070
4127
|
const updateMove = move + state.transformY;
|
|
4071
|
-
const
|
|
4128
|
+
const h2 = ((_a = months.current) == null ? void 0 : _a.offsetHeight) || 0;
|
|
4072
4129
|
const offsetHeight = ((_b = monthsPanel.current) == null ? void 0 : _b.offsetHeight) || 0;
|
|
4073
4130
|
if (updateMove > 0) {
|
|
4074
4131
|
getMonth(getCurrData("prev"), "prev");
|
|
4075
|
-
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) >
|
|
4132
|
+
} else if (updateMove < 0 && updateMove < -offsetHeight + (Math.abs(move) > h2 ? Math.abs(move) : h2) * 5) {
|
|
4076
4133
|
getMonth(getCurrData("next"), "next");
|
|
4077
4134
|
if (Math.abs(move) >= 300) {
|
|
4078
4135
|
getMonth(getCurrData("next"), "next");
|
|
@@ -4201,9 +4258,9 @@ const CalendarItem = (props) => {
|
|
|
4201
4258
|
onClick: confirm
|
|
4202
4259
|
}, locale.confirm)) : ""));
|
|
4203
4260
|
};
|
|
4204
|
-
CalendarItem.defaultProps = defaultProps$
|
|
4261
|
+
CalendarItem.defaultProps = defaultProps$_;
|
|
4205
4262
|
CalendarItem.displayName = "NutCalendarItem";
|
|
4206
|
-
const defaultProps$
|
|
4263
|
+
const defaultProps$Z = {
|
|
4207
4264
|
type: "one",
|
|
4208
4265
|
isAutoBackFill: false,
|
|
4209
4266
|
poppable: true,
|
|
@@ -4231,7 +4288,7 @@ const Calendar = (props) => {
|
|
|
4231
4288
|
endDate,
|
|
4232
4289
|
onClose,
|
|
4233
4290
|
onChoose
|
|
4234
|
-
} = { ...defaultProps$
|
|
4291
|
+
} = { ...defaultProps$Z, ...props };
|
|
4235
4292
|
const close = () => {
|
|
4236
4293
|
onClose && onClose();
|
|
4237
4294
|
};
|
|
@@ -4248,9 +4305,12 @@ const Calendar = (props) => {
|
|
|
4248
4305
|
visible,
|
|
4249
4306
|
position: "bottom",
|
|
4250
4307
|
round: true,
|
|
4308
|
+
duration: 0.5,
|
|
4251
4309
|
closeable: true,
|
|
4310
|
+
destroyOnClose: true,
|
|
4252
4311
|
onClickOverlay: closePopup,
|
|
4253
|
-
onClickCloseIcon: closePopup
|
|
4312
|
+
onClickCloseIcon: closePopup,
|
|
4313
|
+
style: { height: "85vh" }
|
|
4254
4314
|
}, /* @__PURE__ */ React__default.createElement(CalendarItem, {
|
|
4255
4315
|
type,
|
|
4256
4316
|
isAutoBackFill,
|
|
@@ -4274,9 +4334,9 @@ const Calendar = (props) => {
|
|
|
4274
4334
|
onChoose: choose
|
|
4275
4335
|
}));
|
|
4276
4336
|
};
|
|
4277
|
-
Calendar.defaultProps = defaultProps$
|
|
4337
|
+
Calendar.defaultProps = defaultProps$Z;
|
|
4278
4338
|
Calendar.displayName = "NutCalendar";
|
|
4279
|
-
const defaultProps$
|
|
4339
|
+
const defaultProps$Y = {
|
|
4280
4340
|
disabled: false,
|
|
4281
4341
|
checkedValue: [],
|
|
4282
4342
|
max: void 0,
|
|
@@ -4286,7 +4346,7 @@ const defaultProps$V = {
|
|
|
4286
4346
|
};
|
|
4287
4347
|
const CheckboxGroup = React__default.forwardRef(
|
|
4288
4348
|
(props, ref) => {
|
|
4289
|
-
const { children } = { ...defaultProps$
|
|
4349
|
+
const { children } = { ...defaultProps$Y, ...props };
|
|
4290
4350
|
const b2 = cn("checkboxgroup");
|
|
4291
4351
|
const {
|
|
4292
4352
|
className,
|
|
@@ -4319,7 +4379,7 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
4319
4379
|
childrenLabel.push(childProps.label || child.children);
|
|
4320
4380
|
});
|
|
4321
4381
|
const reverse = childrenLabel.filter(
|
|
4322
|
-
(
|
|
4382
|
+
(c6) => (innerValue == null ? void 0 : innerValue.findIndex((v2) => v2 === c6)) === -1
|
|
4323
4383
|
);
|
|
4324
4384
|
setInnerValue(reverse);
|
|
4325
4385
|
}
|
|
@@ -4393,9 +4453,9 @@ const CheckboxGroup = React__default.forwardRef(
|
|
|
4393
4453
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren());
|
|
4394
4454
|
}
|
|
4395
4455
|
);
|
|
4396
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
4456
|
+
CheckboxGroup.defaultProps = defaultProps$Y;
|
|
4397
4457
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
4398
|
-
const defaultProps$
|
|
4458
|
+
const defaultProps$X = {
|
|
4399
4459
|
...ComponentDefaults,
|
|
4400
4460
|
checked: false,
|
|
4401
4461
|
disabled: false,
|
|
@@ -4411,7 +4471,7 @@ const defaultProps$U = {
|
|
|
4411
4471
|
};
|
|
4412
4472
|
const Checkbox = (props) => {
|
|
4413
4473
|
const { children } = {
|
|
4414
|
-
...defaultProps$
|
|
4474
|
+
...defaultProps$X,
|
|
4415
4475
|
...props
|
|
4416
4476
|
};
|
|
4417
4477
|
const b2 = cn("checkbox");
|
|
@@ -4493,7 +4553,7 @@ const Checkbox = (props) => {
|
|
|
4493
4553
|
onClick: handleClick2
|
|
4494
4554
|
}, renderIcon(), renderLabel());
|
|
4495
4555
|
};
|
|
4496
|
-
Checkbox.defaultProps = defaultProps$
|
|
4556
|
+
Checkbox.defaultProps = defaultProps$X;
|
|
4497
4557
|
Checkbox.displayName = "NutCheckBox";
|
|
4498
4558
|
Checkbox.Group = CheckboxGroup;
|
|
4499
4559
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -4940,7 +5000,7 @@ const InternalPicker = (props, ref) => {
|
|
|
4940
5000
|
};
|
|
4941
5001
|
const Picker = React__default.forwardRef(InternalPicker);
|
|
4942
5002
|
const currentYear = new Date().getFullYear();
|
|
4943
|
-
const defaultProps$
|
|
5003
|
+
const defaultProps$W = {
|
|
4944
5004
|
modelValue: null,
|
|
4945
5005
|
visible: false,
|
|
4946
5006
|
title: "",
|
|
@@ -4971,7 +5031,7 @@ const DatePicker = (props) => {
|
|
|
4971
5031
|
style,
|
|
4972
5032
|
...rest
|
|
4973
5033
|
} = {
|
|
4974
|
-
...defaultProps$
|
|
5034
|
+
...defaultProps$W,
|
|
4975
5035
|
...props
|
|
4976
5036
|
};
|
|
4977
5037
|
const [show, setShow] = useState(false);
|
|
@@ -5179,21 +5239,21 @@ const DatePicker = (props) => {
|
|
|
5179
5239
|
const getDateIndex = (type2) => {
|
|
5180
5240
|
if (!currentDate)
|
|
5181
5241
|
return 0;
|
|
5182
|
-
let
|
|
5242
|
+
let d2 = 0;
|
|
5183
5243
|
if (type2 === "year") {
|
|
5184
|
-
|
|
5244
|
+
d2 = currentDate.getFullYear();
|
|
5185
5245
|
} else if (type2 === "month") {
|
|
5186
|
-
|
|
5246
|
+
d2 = currentDate.getMonth() + 1;
|
|
5187
5247
|
} else if (type2 === "day") {
|
|
5188
|
-
|
|
5248
|
+
d2 = currentDate.getDate();
|
|
5189
5249
|
} else if (type2 === "hour") {
|
|
5190
|
-
|
|
5250
|
+
d2 = currentDate.getHours();
|
|
5191
5251
|
} else if (type2 === "minute") {
|
|
5192
|
-
|
|
5252
|
+
d2 = currentDate.getMinutes();
|
|
5193
5253
|
} else if (type2 === "seconds") {
|
|
5194
|
-
|
|
5254
|
+
d2 = currentDate.getSeconds();
|
|
5195
5255
|
}
|
|
5196
|
-
return
|
|
5256
|
+
return d2;
|
|
5197
5257
|
};
|
|
5198
5258
|
const columns = (date) => {
|
|
5199
5259
|
const val = ranges(date).map((res, columnIndex) => {
|
|
@@ -5236,9 +5296,9 @@ const DatePicker = (props) => {
|
|
|
5236
5296
|
ref: pickerRef
|
|
5237
5297
|
}));
|
|
5238
5298
|
};
|
|
5239
|
-
DatePicker.defaultProps = defaultProps$
|
|
5299
|
+
DatePicker.defaultProps = defaultProps$W;
|
|
5240
5300
|
DatePicker.displayName = "NutDatePicker";
|
|
5241
|
-
const defaultProps$
|
|
5301
|
+
const defaultProps$V = {
|
|
5242
5302
|
...ComponentDefaults,
|
|
5243
5303
|
disabled: false,
|
|
5244
5304
|
buttonSize: "",
|
|
@@ -5285,7 +5345,7 @@ const InputNumber = (props) => {
|
|
|
5285
5345
|
iconFontClassName,
|
|
5286
5346
|
...restProps
|
|
5287
5347
|
} = {
|
|
5288
|
-
...defaultProps$
|
|
5348
|
+
...defaultProps$V,
|
|
5289
5349
|
...props
|
|
5290
5350
|
};
|
|
5291
5351
|
const [inputValue, setInputValue] = useState(modelValue);
|
|
@@ -5316,8 +5376,8 @@ const InputNumber = (props) => {
|
|
|
5316
5376
|
const iconAddClasses = classNames("nut-inputnumber__icon", {
|
|
5317
5377
|
"nut-inputnumber__icon--disabled": !addAllow()
|
|
5318
5378
|
});
|
|
5319
|
-
const fixedDecimalPlaces = (
|
|
5320
|
-
return Number(
|
|
5379
|
+
const fixedDecimalPlaces = (v2) => {
|
|
5380
|
+
return Number(v2).toFixed(Number(decimalPlaces));
|
|
5321
5381
|
};
|
|
5322
5382
|
const emitChange = (value, e2) => {
|
|
5323
5383
|
const outputValue = fixedDecimalPlaces(value);
|
|
@@ -5421,7 +5481,7 @@ const InputNumber = (props) => {
|
|
|
5421
5481
|
onClick: addNumber
|
|
5422
5482
|
}));
|
|
5423
5483
|
};
|
|
5424
|
-
InputNumber.defaultProps = defaultProps$
|
|
5484
|
+
InputNumber.defaultProps = defaultProps$V;
|
|
5425
5485
|
InputNumber.displayName = "NutInputNumber";
|
|
5426
5486
|
function trimExtraChar(value, char, regExp) {
|
|
5427
5487
|
const index = value.indexOf(char);
|
|
@@ -5447,7 +5507,7 @@ function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
|
5447
5507
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
5448
5508
|
return value.replace(regExp, "");
|
|
5449
5509
|
}
|
|
5450
|
-
const defaultProps$
|
|
5510
|
+
const defaultProps$U = {
|
|
5451
5511
|
...ComponentDefaults,
|
|
5452
5512
|
type: "text",
|
|
5453
5513
|
name: "",
|
|
@@ -5544,7 +5604,7 @@ const Input = forwardRef((props, ref) => {
|
|
|
5544
5604
|
iconFontClassName,
|
|
5545
5605
|
...rest
|
|
5546
5606
|
} = {
|
|
5547
|
-
...defaultProps$
|
|
5607
|
+
...defaultProps$U,
|
|
5548
5608
|
...props
|
|
5549
5609
|
};
|
|
5550
5610
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -5775,14 +5835,14 @@ const Input = forwardRef((props, ref) => {
|
|
|
5775
5835
|
}
|
|
5776
5836
|
}, errorMessage) : null)));
|
|
5777
5837
|
});
|
|
5778
|
-
Input.defaultProps = defaultProps$
|
|
5838
|
+
Input.defaultProps = defaultProps$U;
|
|
5779
5839
|
Input.displayName = "NutInput";
|
|
5780
5840
|
const radioContext = {
|
|
5781
5841
|
onChange: (val) => {
|
|
5782
5842
|
}
|
|
5783
5843
|
};
|
|
5784
5844
|
var RadioContext = React__default.createContext(radioContext);
|
|
5785
|
-
const defaultProps$
|
|
5845
|
+
const defaultProps$T = {
|
|
5786
5846
|
value: null,
|
|
5787
5847
|
textPosition: "right",
|
|
5788
5848
|
onChange: (value) => {
|
|
@@ -5792,7 +5852,7 @@ const defaultProps$Q = {
|
|
|
5792
5852
|
};
|
|
5793
5853
|
const RadioGroup = React__default.forwardRef(
|
|
5794
5854
|
(props, ref) => {
|
|
5795
|
-
const { children } = { ...defaultProps$
|
|
5855
|
+
const { children } = { ...defaultProps$T, ...props };
|
|
5796
5856
|
cn("RadioGroup");
|
|
5797
5857
|
const {
|
|
5798
5858
|
className,
|
|
@@ -5857,9 +5917,9 @@ const RadioGroup = React__default.forwardRef(
|
|
|
5857
5917
|
}, (options == null ? void 0 : options.length) ? renderOptionsChildren() : cloneChildren()));
|
|
5858
5918
|
}
|
|
5859
5919
|
);
|
|
5860
|
-
RadioGroup.defaultProps = defaultProps$
|
|
5920
|
+
RadioGroup.defaultProps = defaultProps$T;
|
|
5861
5921
|
RadioGroup.displayName = "NutRadioGroup";
|
|
5862
|
-
const defaultProps$
|
|
5922
|
+
const defaultProps$S = {
|
|
5863
5923
|
...ComponentDefaults,
|
|
5864
5924
|
disabled: false,
|
|
5865
5925
|
checked: false,
|
|
@@ -5874,7 +5934,7 @@ const defaultProps$P = {
|
|
|
5874
5934
|
};
|
|
5875
5935
|
const Radio$1 = (props) => {
|
|
5876
5936
|
const { children } = {
|
|
5877
|
-
...defaultProps$
|
|
5937
|
+
...defaultProps$S,
|
|
5878
5938
|
...props
|
|
5879
5939
|
};
|
|
5880
5940
|
const {
|
|
@@ -5896,7 +5956,7 @@ const Radio$1 = (props) => {
|
|
|
5896
5956
|
const [checkedStatement, setCheckedStatement] = useState(checked);
|
|
5897
5957
|
const [valueStatement, setValueStatement] = useState(value);
|
|
5898
5958
|
const [disabledStatement, setDisabledStatement] = useState(disabled);
|
|
5899
|
-
const
|
|
5959
|
+
const context2 = useContext$1(RadioContext);
|
|
5900
5960
|
useEffect(() => {
|
|
5901
5961
|
setDisabledStatement(disabled);
|
|
5902
5962
|
setValueStatement(value);
|
|
@@ -5945,7 +6005,7 @@ const Radio$1 = (props) => {
|
|
|
5945
6005
|
return;
|
|
5946
6006
|
setCheckedStatement(!checkedStatement);
|
|
5947
6007
|
onChange && onChange(e2);
|
|
5948
|
-
|
|
6008
|
+
context2 && context2.onChange(valueStatement);
|
|
5949
6009
|
};
|
|
5950
6010
|
const reverseState = textPosition === "left";
|
|
5951
6011
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -5954,11 +6014,11 @@ const Radio$1 = (props) => {
|
|
|
5954
6014
|
...rest
|
|
5955
6015
|
}, renderRadioItem());
|
|
5956
6016
|
};
|
|
5957
|
-
Radio$1.defaultProps = defaultProps$
|
|
6017
|
+
Radio$1.defaultProps = defaultProps$S;
|
|
5958
6018
|
Radio$1.displayName = "NutRadio";
|
|
5959
6019
|
Radio$1.RadioGroup = RadioGroup;
|
|
5960
6020
|
var Radio = Radio$1;
|
|
5961
|
-
const defaultProps$
|
|
6021
|
+
const defaultProps$R = {
|
|
5962
6022
|
...ComponentDefaults,
|
|
5963
6023
|
count: 5,
|
|
5964
6024
|
modelValue: 0,
|
|
@@ -5993,7 +6053,7 @@ const Rate = (props) => {
|
|
|
5993
6053
|
iconClassPrefix,
|
|
5994
6054
|
iconFontClassName
|
|
5995
6055
|
} = {
|
|
5996
|
-
...defaultProps$
|
|
6056
|
+
...defaultProps$R,
|
|
5997
6057
|
...props
|
|
5998
6058
|
};
|
|
5999
6059
|
const b2 = cn("rate");
|
|
@@ -6026,43 +6086,43 @@ const Rate = (props) => {
|
|
|
6026
6086
|
setScore(value);
|
|
6027
6087
|
onChange && onChange(value);
|
|
6028
6088
|
};
|
|
6029
|
-
const onHalfClick = (event,
|
|
6089
|
+
const onHalfClick = (event, n2) => {
|
|
6030
6090
|
event.preventDefault();
|
|
6031
6091
|
event.stopPropagation();
|
|
6032
|
-
const value = Math.max(Number(minimizeValue),
|
|
6092
|
+
const value = Math.max(Number(minimizeValue), n2 - 0.5);
|
|
6033
6093
|
setScore(value);
|
|
6034
6094
|
onChange && onChange(value);
|
|
6035
6095
|
};
|
|
6036
6096
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6037
6097
|
className: `${b2()} ${className}`,
|
|
6038
6098
|
style
|
|
6039
|
-
}, countArray.map((
|
|
6099
|
+
}, countArray.map((n2) => {
|
|
6040
6100
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
6041
6101
|
className: bi(),
|
|
6042
|
-
key:
|
|
6043
|
-
onClick: (event) => onClick(event,
|
|
6102
|
+
key: n2,
|
|
6103
|
+
onClick: (event) => onClick(event, n2),
|
|
6044
6104
|
style: { marginRight: pxCheck2(spacing) }
|
|
6045
6105
|
}, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6046
6106
|
classPrefix: iconClassPrefix,
|
|
6047
6107
|
fontClassName: iconFontClassName,
|
|
6048
6108
|
size: iconSize,
|
|
6049
|
-
className: `${bi("icon")} ${disabled ||
|
|
6050
|
-
name:
|
|
6051
|
-
color:
|
|
6052
|
-
}), allowHalf && score >
|
|
6109
|
+
className: `${bi("icon")} ${disabled || n2 > score ? bi("icon--disabled") : ""}`,
|
|
6110
|
+
name: n2 <= score ? checkedIcon : uncheckedIcon,
|
|
6111
|
+
color: n2 <= score ? activeColor : voidColor
|
|
6112
|
+
}), allowHalf && score > n2 - 1 && /* @__PURE__ */ React__default.createElement(Icon, {
|
|
6053
6113
|
classPrefix: iconClassPrefix,
|
|
6054
6114
|
fontClassName: iconFontClassName,
|
|
6055
|
-
onClick: (event) => onHalfClick(event,
|
|
6115
|
+
onClick: (event) => onHalfClick(event, n2),
|
|
6056
6116
|
className: `${bi("icon")} ${bi("icon--half")}`,
|
|
6057
|
-
color:
|
|
6117
|
+
color: n2 <= score ? activeColor : voidColor,
|
|
6058
6118
|
size: iconSize,
|
|
6059
6119
|
name: checkedIcon
|
|
6060
6120
|
}));
|
|
6061
6121
|
}));
|
|
6062
6122
|
};
|
|
6063
|
-
Rate.defaultProps = defaultProps$
|
|
6123
|
+
Rate.defaultProps = defaultProps$R;
|
|
6064
6124
|
Rate.displayName = "NutRate";
|
|
6065
|
-
const defaultProps$
|
|
6125
|
+
const defaultProps$Q = {
|
|
6066
6126
|
...ComponentDefaults,
|
|
6067
6127
|
title: "",
|
|
6068
6128
|
desc: "",
|
|
@@ -6230,9 +6290,9 @@ const ShortPassword = (props) => {
|
|
|
6230
6290
|
onClick: () => sure()
|
|
6231
6291
|
}, locale.confirm)) : null)));
|
|
6232
6292
|
};
|
|
6233
|
-
ShortPassword.defaultProps = defaultProps$
|
|
6293
|
+
ShortPassword.defaultProps = defaultProps$Q;
|
|
6234
6294
|
ShortPassword.displayName = "NutShortPassword";
|
|
6235
|
-
const defaultProps$
|
|
6295
|
+
const defaultProps$P = {
|
|
6236
6296
|
defaultValue: "",
|
|
6237
6297
|
textAlign: "left",
|
|
6238
6298
|
limitshow: false,
|
|
@@ -6260,7 +6320,7 @@ const TextArea = (props) => {
|
|
|
6260
6320
|
onChange,
|
|
6261
6321
|
onBlur,
|
|
6262
6322
|
onFocus
|
|
6263
|
-
} = { ...defaultProps$
|
|
6323
|
+
} = { ...defaultProps$P, ...props };
|
|
6264
6324
|
const textareaBem = cn("textarea");
|
|
6265
6325
|
const [inputValue, SetInputValue] = useState("");
|
|
6266
6326
|
useEffect(() => {
|
|
@@ -6271,7 +6331,7 @@ const TextArea = (props) => {
|
|
|
6271
6331
|
SetInputValue(initValue);
|
|
6272
6332
|
}, [defaultValue]);
|
|
6273
6333
|
const textChange = (event) => {
|
|
6274
|
-
const text = event.detail;
|
|
6334
|
+
const text = event.detail ? event.detail : event.target;
|
|
6275
6335
|
if (maxlength && [...text.value].length > Number(maxlength)) {
|
|
6276
6336
|
text.value = text.value.substring(0, Number(maxlength));
|
|
6277
6337
|
}
|
|
@@ -6290,7 +6350,7 @@ const TextArea = (props) => {
|
|
|
6290
6350
|
return;
|
|
6291
6351
|
if (readonly)
|
|
6292
6352
|
return;
|
|
6293
|
-
const text = event.detail;
|
|
6353
|
+
const text = event.detail ? event.detail : event.target;
|
|
6294
6354
|
onChange && onChange(text.value, event);
|
|
6295
6355
|
onBlur && onBlur(event);
|
|
6296
6356
|
};
|
|
@@ -6325,9 +6385,9 @@ const TextArea = (props) => {
|
|
|
6325
6385
|
className: textareaBem("limit")
|
|
6326
6386
|
}, [...inputValue].length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
6327
6387
|
};
|
|
6328
|
-
TextArea.defaultProps = defaultProps$
|
|
6388
|
+
TextArea.defaultProps = defaultProps$P;
|
|
6329
6389
|
TextArea.displayName = "NutTextArea";
|
|
6330
|
-
const defaultProps$
|
|
6390
|
+
const defaultProps$O = {
|
|
6331
6391
|
...ComponentDefaults,
|
|
6332
6392
|
className: "",
|
|
6333
6393
|
style: {},
|
|
@@ -6375,7 +6435,7 @@ const Progress = (props) => {
|
|
|
6375
6435
|
iconFontClassName,
|
|
6376
6436
|
...rest
|
|
6377
6437
|
} = {
|
|
6378
|
-
...defaultProps$
|
|
6438
|
+
...defaultProps$O,
|
|
6379
6439
|
...props
|
|
6380
6440
|
};
|
|
6381
6441
|
const b2 = cn("progress");
|
|
@@ -6453,7 +6513,7 @@ const Progress = (props) => {
|
|
|
6453
6513
|
color: iconColor
|
|
6454
6514
|
})));
|
|
6455
6515
|
};
|
|
6456
|
-
Progress.defaultProps = defaultProps$
|
|
6516
|
+
Progress.defaultProps = defaultProps$O;
|
|
6457
6517
|
Progress.displayName = "NutProgress";
|
|
6458
6518
|
class UploadOptions {
|
|
6459
6519
|
constructor() {
|
|
@@ -6551,7 +6611,7 @@ class Upload {
|
|
|
6551
6611
|
}
|
|
6552
6612
|
}
|
|
6553
6613
|
}
|
|
6554
|
-
const defaultProps$
|
|
6614
|
+
const defaultProps$N = {
|
|
6555
6615
|
...ComponentDefaults,
|
|
6556
6616
|
url: "",
|
|
6557
6617
|
maximum: 9,
|
|
@@ -6623,7 +6683,7 @@ const InternalUploader = (props, ref) => {
|
|
|
6623
6683
|
onBeforeXhrUpload,
|
|
6624
6684
|
onBeforeDelete,
|
|
6625
6685
|
...restProps
|
|
6626
|
-
} = { ...defaultProps$
|
|
6686
|
+
} = { ...defaultProps$N, ...props };
|
|
6627
6687
|
const [fileList, setFileList] = useState([]);
|
|
6628
6688
|
const [uploadQueue, setUploadQueue] = useState([]);
|
|
6629
6689
|
useEffect(() => {
|
|
@@ -6808,8 +6868,8 @@ const InternalUploader = (props, ref) => {
|
|
|
6808
6868
|
const onChangeFn = (res) => {
|
|
6809
6869
|
const { tempFiles } = res;
|
|
6810
6870
|
if (onBeforeUpload) {
|
|
6811
|
-
onBeforeUpload(tempFiles).then((
|
|
6812
|
-
const _files = filterFiles(
|
|
6871
|
+
onBeforeUpload(tempFiles).then((f2) => {
|
|
6872
|
+
const _files = filterFiles(f2);
|
|
6813
6873
|
readFile(_files);
|
|
6814
6874
|
});
|
|
6815
6875
|
} else {
|
|
@@ -6911,9 +6971,9 @@ const InternalUploader = (props, ref) => {
|
|
|
6911
6971
|
})));
|
|
6912
6972
|
};
|
|
6913
6973
|
const Uploader = React__default.forwardRef(InternalUploader);
|
|
6914
|
-
Uploader.defaultProps = defaultProps$
|
|
6974
|
+
Uploader.defaultProps = defaultProps$N;
|
|
6915
6975
|
Uploader.displayName = "NutUploader";
|
|
6916
|
-
const defaultProps$
|
|
6976
|
+
const defaultProps$M = {
|
|
6917
6977
|
data: {
|
|
6918
6978
|
text: "",
|
|
6919
6979
|
value: "",
|
|
@@ -6928,7 +6988,7 @@ const defaultProps$J = {
|
|
|
6928
6988
|
};
|
|
6929
6989
|
const InternalCascaderItem = (props) => {
|
|
6930
6990
|
const { data, checked, chooseItem } = {
|
|
6931
|
-
...defaultProps$
|
|
6991
|
+
...defaultProps$M,
|
|
6932
6992
|
...props
|
|
6933
6993
|
};
|
|
6934
6994
|
const b2 = cn("cascader-item");
|
|
@@ -6964,7 +7024,7 @@ const InternalCascaderItem = (props) => {
|
|
|
6964
7024
|
}));
|
|
6965
7025
|
};
|
|
6966
7026
|
const CascaderItem = React__default.forwardRef(InternalCascaderItem);
|
|
6967
|
-
CascaderItem.defaultProps = defaultProps$
|
|
7027
|
+
CascaderItem.defaultProps = defaultProps$M;
|
|
6968
7028
|
CascaderItem.displayName = "NutCascaderItem";
|
|
6969
7029
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
6970
7030
|
const {
|
|
@@ -7098,7 +7158,7 @@ class Tree {
|
|
|
7098
7158
|
return pathNodes;
|
|
7099
7159
|
}
|
|
7100
7160
|
}
|
|
7101
|
-
const defaultProps$
|
|
7161
|
+
const defaultProps$L = {
|
|
7102
7162
|
className: "",
|
|
7103
7163
|
style: {},
|
|
7104
7164
|
poppable: true,
|
|
@@ -7145,7 +7205,7 @@ const InternalCascader = (props) => {
|
|
|
7145
7205
|
onClose,
|
|
7146
7206
|
onChange,
|
|
7147
7207
|
onPathChange
|
|
7148
|
-
} = { ...defaultProps$
|
|
7208
|
+
} = { ...defaultProps$L, ...props };
|
|
7149
7209
|
const [tabvalue, setTabvalue] = useState("c1");
|
|
7150
7210
|
const [optiosData, setOptiosData] = useState([]);
|
|
7151
7211
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -7240,9 +7300,9 @@ const InternalCascader = (props) => {
|
|
|
7240
7300
|
if (parent) {
|
|
7241
7301
|
needToSync = [parent.value];
|
|
7242
7302
|
state.initLoading = true;
|
|
7243
|
-
const last = await currentValue2.slice(1).reduce(async (
|
|
7303
|
+
const last = await currentValue2.slice(1).reduce(async (p2, value2) => {
|
|
7244
7304
|
var _a;
|
|
7245
|
-
const parent2 = await
|
|
7305
|
+
const parent2 = await p2;
|
|
7246
7306
|
await invokeLazyLoad(parent2);
|
|
7247
7307
|
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
7248
7308
|
(item) => item.value === value2
|
|
@@ -7404,9 +7464,9 @@ const InternalCascader = (props) => {
|
|
|
7404
7464
|
}, renderItem()) : renderItem());
|
|
7405
7465
|
};
|
|
7406
7466
|
const Cascader = React__default.forwardRef(InternalCascader);
|
|
7407
|
-
Cascader.defaultProps = defaultProps$
|
|
7467
|
+
Cascader.defaultProps = defaultProps$L;
|
|
7408
7468
|
Cascader.displayName = "NutCascader";
|
|
7409
|
-
const defaultProps$
|
|
7469
|
+
const defaultProps$K = {
|
|
7410
7470
|
...ComponentDefaults,
|
|
7411
7471
|
placeholder: "",
|
|
7412
7472
|
shape: "square",
|
|
@@ -7457,7 +7517,7 @@ const SearchBar = (props) => {
|
|
|
7457
7517
|
iconClassPrefix,
|
|
7458
7518
|
iconFontClassName
|
|
7459
7519
|
} = {
|
|
7460
|
-
...defaultProps$
|
|
7520
|
+
...defaultProps$K,
|
|
7461
7521
|
...props
|
|
7462
7522
|
};
|
|
7463
7523
|
const alignClass = `${align}`;
|
|
@@ -7611,9 +7671,9 @@ const SearchBar = (props) => {
|
|
|
7611
7671
|
className: "nut-searchbar__input-box"
|
|
7612
7672
|
}, renderField()), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
7613
7673
|
};
|
|
7614
|
-
SearchBar.defaultProps = defaultProps$
|
|
7674
|
+
SearchBar.defaultProps = defaultProps$K;
|
|
7615
7675
|
SearchBar.displayName = "NutSearchBar";
|
|
7616
|
-
const defaultProps$
|
|
7676
|
+
const defaultProps$J = {
|
|
7617
7677
|
confirmText: "",
|
|
7618
7678
|
title: "",
|
|
7619
7679
|
visible: false,
|
|
@@ -7811,8 +7871,1348 @@ const NumberKeyboard = (props) => {
|
|
|
7811
7871
|
})
|
|
7812
7872
|
}, confirmText || locale.done))) : null))));
|
|
7813
7873
|
};
|
|
7814
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
7874
|
+
NumberKeyboard.defaultProps = defaultProps$J;
|
|
7815
7875
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
7876
|
+
const defaultProps$I = {};
|
|
7877
|
+
const Form = (props) => {
|
|
7878
|
+
useConfig();
|
|
7879
|
+
({ ...defaultProps$I, ...props });
|
|
7880
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
7881
|
+
className: "nut-form"
|
|
7882
|
+
}, "Form");
|
|
7883
|
+
};
|
|
7884
|
+
Form.defaultProps = defaultProps$I;
|
|
7885
|
+
Form.displayName = "NutForm";
|
|
7886
|
+
const FormItemContext = createContext$1({});
|
|
7887
|
+
function isAbsolute(pathname) {
|
|
7888
|
+
return pathname.charAt(0) === "/";
|
|
7889
|
+
}
|
|
7890
|
+
function spliceOne(list, index) {
|
|
7891
|
+
for (var i = index, k2 = i + 1, n2 = list.length; k2 < n2; i += 1, k2 += 1) {
|
|
7892
|
+
list[i] = list[k2];
|
|
7893
|
+
}
|
|
7894
|
+
list.pop();
|
|
7895
|
+
}
|
|
7896
|
+
function resolvePathname(to2, from) {
|
|
7897
|
+
if (from === void 0)
|
|
7898
|
+
from = "";
|
|
7899
|
+
var toParts = to2 && to2.split("/") || [];
|
|
7900
|
+
var fromParts = from && from.split("/") || [];
|
|
7901
|
+
var isToAbs = to2 && isAbsolute(to2);
|
|
7902
|
+
var isFromAbs = from && isAbsolute(from);
|
|
7903
|
+
var mustEndAbs = isToAbs || isFromAbs;
|
|
7904
|
+
if (to2 && isAbsolute(to2)) {
|
|
7905
|
+
fromParts = toParts;
|
|
7906
|
+
} else if (toParts.length) {
|
|
7907
|
+
fromParts.pop();
|
|
7908
|
+
fromParts = fromParts.concat(toParts);
|
|
7909
|
+
}
|
|
7910
|
+
if (!fromParts.length)
|
|
7911
|
+
return "/";
|
|
7912
|
+
var hasTrailingSlash;
|
|
7913
|
+
if (fromParts.length) {
|
|
7914
|
+
var last = fromParts[fromParts.length - 1];
|
|
7915
|
+
hasTrailingSlash = last === "." || last === ".." || last === "";
|
|
7916
|
+
} else {
|
|
7917
|
+
hasTrailingSlash = false;
|
|
7918
|
+
}
|
|
7919
|
+
var up = 0;
|
|
7920
|
+
for (var i = fromParts.length; i >= 0; i--) {
|
|
7921
|
+
var part = fromParts[i];
|
|
7922
|
+
if (part === ".") {
|
|
7923
|
+
spliceOne(fromParts, i);
|
|
7924
|
+
} else if (part === "..") {
|
|
7925
|
+
spliceOne(fromParts, i);
|
|
7926
|
+
up++;
|
|
7927
|
+
} else if (up) {
|
|
7928
|
+
spliceOne(fromParts, i);
|
|
7929
|
+
up--;
|
|
7930
|
+
}
|
|
7931
|
+
}
|
|
7932
|
+
if (!mustEndAbs)
|
|
7933
|
+
for (; up--; up)
|
|
7934
|
+
fromParts.unshift("..");
|
|
7935
|
+
if (mustEndAbs && fromParts[0] !== "" && (!fromParts[0] || !isAbsolute(fromParts[0])))
|
|
7936
|
+
fromParts.unshift("");
|
|
7937
|
+
var result = fromParts.join("/");
|
|
7938
|
+
if (hasTrailingSlash && result.substr(-1) !== "/")
|
|
7939
|
+
result += "/";
|
|
7940
|
+
return result;
|
|
7941
|
+
}
|
|
7942
|
+
var isProduction = true;
|
|
7943
|
+
var prefix$1 = "Invariant failed";
|
|
7944
|
+
function invariant(condition, message) {
|
|
7945
|
+
if (condition) {
|
|
7946
|
+
return;
|
|
7947
|
+
}
|
|
7948
|
+
if (isProduction) {
|
|
7949
|
+
throw new Error(prefix$1);
|
|
7950
|
+
}
|
|
7951
|
+
var provided = typeof message === "function" ? message() : message;
|
|
7952
|
+
var value = provided ? "".concat(prefix$1, ": ").concat(provided) : prefix$1;
|
|
7953
|
+
throw new Error(value);
|
|
7954
|
+
}
|
|
7955
|
+
function parsePath(path) {
|
|
7956
|
+
var pathname = path || "/";
|
|
7957
|
+
var search = "";
|
|
7958
|
+
var hash = "";
|
|
7959
|
+
var hashIndex = pathname.indexOf("#");
|
|
7960
|
+
if (hashIndex !== -1) {
|
|
7961
|
+
hash = pathname.substr(hashIndex);
|
|
7962
|
+
pathname = pathname.substr(0, hashIndex);
|
|
7963
|
+
}
|
|
7964
|
+
var searchIndex = pathname.indexOf("?");
|
|
7965
|
+
if (searchIndex !== -1) {
|
|
7966
|
+
search = pathname.substr(searchIndex);
|
|
7967
|
+
pathname = pathname.substr(0, searchIndex);
|
|
7968
|
+
}
|
|
7969
|
+
return {
|
|
7970
|
+
pathname,
|
|
7971
|
+
search: search === "?" ? "" : search,
|
|
7972
|
+
hash: hash === "#" ? "" : hash
|
|
7973
|
+
};
|
|
7974
|
+
}
|
|
7975
|
+
function createPath(location) {
|
|
7976
|
+
var pathname = location.pathname, search = location.search, hash = location.hash;
|
|
7977
|
+
var path = pathname || "/";
|
|
7978
|
+
if (search && search !== "?")
|
|
7979
|
+
path += search.charAt(0) === "?" ? search : "?" + search;
|
|
7980
|
+
if (hash && hash !== "#")
|
|
7981
|
+
path += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
7982
|
+
return path;
|
|
7983
|
+
}
|
|
7984
|
+
function createLocation(path, state, key, currentLocation) {
|
|
7985
|
+
var location;
|
|
7986
|
+
if (typeof path === "string") {
|
|
7987
|
+
location = parsePath(path);
|
|
7988
|
+
location.state = state;
|
|
7989
|
+
} else {
|
|
7990
|
+
location = _extends$3({}, path);
|
|
7991
|
+
if (location.pathname === void 0)
|
|
7992
|
+
location.pathname = "";
|
|
7993
|
+
if (location.search) {
|
|
7994
|
+
if (location.search.charAt(0) !== "?")
|
|
7995
|
+
location.search = "?" + location.search;
|
|
7996
|
+
} else {
|
|
7997
|
+
location.search = "";
|
|
7998
|
+
}
|
|
7999
|
+
if (location.hash) {
|
|
8000
|
+
if (location.hash.charAt(0) !== "#")
|
|
8001
|
+
location.hash = "#" + location.hash;
|
|
8002
|
+
} else {
|
|
8003
|
+
location.hash = "";
|
|
8004
|
+
}
|
|
8005
|
+
if (state !== void 0 && location.state === void 0)
|
|
8006
|
+
location.state = state;
|
|
8007
|
+
}
|
|
8008
|
+
try {
|
|
8009
|
+
location.pathname = decodeURI(location.pathname);
|
|
8010
|
+
} catch (e2) {
|
|
8011
|
+
if (e2 instanceof URIError) {
|
|
8012
|
+
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. This is likely caused by an invalid percent-encoding.');
|
|
8013
|
+
} else {
|
|
8014
|
+
throw e2;
|
|
8015
|
+
}
|
|
8016
|
+
}
|
|
8017
|
+
if (key)
|
|
8018
|
+
location.key = key;
|
|
8019
|
+
if (currentLocation) {
|
|
8020
|
+
if (!location.pathname) {
|
|
8021
|
+
location.pathname = currentLocation.pathname;
|
|
8022
|
+
} else if (location.pathname.charAt(0) !== "/") {
|
|
8023
|
+
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
8024
|
+
}
|
|
8025
|
+
} else {
|
|
8026
|
+
if (!location.pathname) {
|
|
8027
|
+
location.pathname = "/";
|
|
8028
|
+
}
|
|
8029
|
+
}
|
|
8030
|
+
return location;
|
|
8031
|
+
}
|
|
8032
|
+
function createTransitionManager() {
|
|
8033
|
+
var prompt = null;
|
|
8034
|
+
function setPrompt(nextPrompt) {
|
|
8035
|
+
prompt = nextPrompt;
|
|
8036
|
+
return function() {
|
|
8037
|
+
if (prompt === nextPrompt)
|
|
8038
|
+
prompt = null;
|
|
8039
|
+
};
|
|
8040
|
+
}
|
|
8041
|
+
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
8042
|
+
if (prompt != null) {
|
|
8043
|
+
var result = typeof prompt === "function" ? prompt(location, action) : prompt;
|
|
8044
|
+
if (typeof result === "string") {
|
|
8045
|
+
if (typeof getUserConfirmation === "function") {
|
|
8046
|
+
getUserConfirmation(result, callback);
|
|
8047
|
+
} else {
|
|
8048
|
+
callback(true);
|
|
8049
|
+
}
|
|
8050
|
+
} else {
|
|
8051
|
+
callback(result !== false);
|
|
8052
|
+
}
|
|
8053
|
+
} else {
|
|
8054
|
+
callback(true);
|
|
8055
|
+
}
|
|
8056
|
+
}
|
|
8057
|
+
var listeners = [];
|
|
8058
|
+
function appendListener(fn) {
|
|
8059
|
+
var isActive = true;
|
|
8060
|
+
function listener() {
|
|
8061
|
+
if (isActive)
|
|
8062
|
+
fn.apply(void 0, arguments);
|
|
8063
|
+
}
|
|
8064
|
+
listeners.push(listener);
|
|
8065
|
+
return function() {
|
|
8066
|
+
isActive = false;
|
|
8067
|
+
listeners = listeners.filter(function(item) {
|
|
8068
|
+
return item !== listener;
|
|
8069
|
+
});
|
|
8070
|
+
};
|
|
8071
|
+
}
|
|
8072
|
+
function notifyListeners() {
|
|
8073
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8074
|
+
args[_key] = arguments[_key];
|
|
8075
|
+
}
|
|
8076
|
+
listeners.forEach(function(listener) {
|
|
8077
|
+
return listener.apply(void 0, args);
|
|
8078
|
+
});
|
|
8079
|
+
}
|
|
8080
|
+
return {
|
|
8081
|
+
setPrompt,
|
|
8082
|
+
confirmTransitionTo,
|
|
8083
|
+
appendListener,
|
|
8084
|
+
notifyListeners
|
|
8085
|
+
};
|
|
8086
|
+
}
|
|
8087
|
+
function clamp$1(n2, lowerBound, upperBound) {
|
|
8088
|
+
return Math.min(Math.max(n2, lowerBound), upperBound);
|
|
8089
|
+
}
|
|
8090
|
+
function createMemoryHistory(props) {
|
|
8091
|
+
if (props === void 0) {
|
|
8092
|
+
props = {};
|
|
8093
|
+
}
|
|
8094
|
+
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;
|
|
8095
|
+
var transitionManager = createTransitionManager();
|
|
8096
|
+
function setState(nextState) {
|
|
8097
|
+
_extends$3(history, nextState);
|
|
8098
|
+
history.length = history.entries.length;
|
|
8099
|
+
transitionManager.notifyListeners(history.location, history.action);
|
|
8100
|
+
}
|
|
8101
|
+
function createKey() {
|
|
8102
|
+
return Math.random().toString(36).substr(2, keyLength);
|
|
8103
|
+
}
|
|
8104
|
+
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
8105
|
+
var entries = initialEntries.map(function(entry) {
|
|
8106
|
+
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
8107
|
+
});
|
|
8108
|
+
var createHref = createPath;
|
|
8109
|
+
function push(path, state) {
|
|
8110
|
+
var action = "PUSH";
|
|
8111
|
+
var location = createLocation(path, state, createKey(), history.location);
|
|
8112
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8113
|
+
if (!ok)
|
|
8114
|
+
return;
|
|
8115
|
+
var prevIndex = history.index;
|
|
8116
|
+
var nextIndex = prevIndex + 1;
|
|
8117
|
+
var nextEntries = history.entries.slice(0);
|
|
8118
|
+
if (nextEntries.length > nextIndex) {
|
|
8119
|
+
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
|
|
8120
|
+
} else {
|
|
8121
|
+
nextEntries.push(location);
|
|
8122
|
+
}
|
|
8123
|
+
setState({
|
|
8124
|
+
action,
|
|
8125
|
+
location,
|
|
8126
|
+
index: nextIndex,
|
|
8127
|
+
entries: nextEntries
|
|
8128
|
+
});
|
|
8129
|
+
});
|
|
8130
|
+
}
|
|
8131
|
+
function replace(path, state) {
|
|
8132
|
+
var action = "REPLACE";
|
|
8133
|
+
var location = createLocation(path, state, createKey(), history.location);
|
|
8134
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8135
|
+
if (!ok)
|
|
8136
|
+
return;
|
|
8137
|
+
history.entries[history.index] = location;
|
|
8138
|
+
setState({
|
|
8139
|
+
action,
|
|
8140
|
+
location
|
|
8141
|
+
});
|
|
8142
|
+
});
|
|
8143
|
+
}
|
|
8144
|
+
function go(n2) {
|
|
8145
|
+
var nextIndex = clamp$1(history.index + n2, 0, history.entries.length - 1);
|
|
8146
|
+
var action = "POP";
|
|
8147
|
+
var location = history.entries[nextIndex];
|
|
8148
|
+
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function(ok) {
|
|
8149
|
+
if (ok) {
|
|
8150
|
+
setState({
|
|
8151
|
+
action,
|
|
8152
|
+
location,
|
|
8153
|
+
index: nextIndex
|
|
8154
|
+
});
|
|
8155
|
+
} else {
|
|
8156
|
+
setState();
|
|
8157
|
+
}
|
|
8158
|
+
});
|
|
8159
|
+
}
|
|
8160
|
+
function goBack() {
|
|
8161
|
+
go(-1);
|
|
8162
|
+
}
|
|
8163
|
+
function goForward() {
|
|
8164
|
+
go(1);
|
|
8165
|
+
}
|
|
8166
|
+
function canGo(n2) {
|
|
8167
|
+
var nextIndex = history.index + n2;
|
|
8168
|
+
return nextIndex >= 0 && nextIndex < history.entries.length;
|
|
8169
|
+
}
|
|
8170
|
+
function block(prompt) {
|
|
8171
|
+
if (prompt === void 0) {
|
|
8172
|
+
prompt = false;
|
|
8173
|
+
}
|
|
8174
|
+
return transitionManager.setPrompt(prompt);
|
|
8175
|
+
}
|
|
8176
|
+
function listen(listener) {
|
|
8177
|
+
return transitionManager.appendListener(listener);
|
|
8178
|
+
}
|
|
8179
|
+
var history = {
|
|
8180
|
+
length: entries.length,
|
|
8181
|
+
action: "POP",
|
|
8182
|
+
location: entries[index],
|
|
8183
|
+
index,
|
|
8184
|
+
entries,
|
|
8185
|
+
createHref,
|
|
8186
|
+
push,
|
|
8187
|
+
replace,
|
|
8188
|
+
go,
|
|
8189
|
+
goBack,
|
|
8190
|
+
goForward,
|
|
8191
|
+
canGo,
|
|
8192
|
+
block,
|
|
8193
|
+
listen
|
|
8194
|
+
};
|
|
8195
|
+
return history;
|
|
8196
|
+
}
|
|
8197
|
+
var pathToRegexp$2 = { exports: {} };
|
|
8198
|
+
var isarray$1 = Array.isArray || function(arr) {
|
|
8199
|
+
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
8200
|
+
};
|
|
8201
|
+
var isarray = isarray$1;
|
|
8202
|
+
pathToRegexp$2.exports = pathToRegexp;
|
|
8203
|
+
pathToRegexp$2.exports.parse = parse$1;
|
|
8204
|
+
pathToRegexp$2.exports.compile = compile;
|
|
8205
|
+
pathToRegexp$2.exports.tokensToFunction = tokensToFunction;
|
|
8206
|
+
pathToRegexp$2.exports.tokensToRegExp = tokensToRegExp;
|
|
8207
|
+
var PATH_REGEXP = new RegExp([
|
|
8208
|
+
"(\\\\.)",
|
|
8209
|
+
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
8210
|
+
].join("|"), "g");
|
|
8211
|
+
function parse$1(str, options) {
|
|
8212
|
+
var tokens = [];
|
|
8213
|
+
var key = 0;
|
|
8214
|
+
var index = 0;
|
|
8215
|
+
var path = "";
|
|
8216
|
+
var defaultDelimiter = options && options.delimiter || "/";
|
|
8217
|
+
var res;
|
|
8218
|
+
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
8219
|
+
var m2 = res[0];
|
|
8220
|
+
var escaped = res[1];
|
|
8221
|
+
var offset = res.index;
|
|
8222
|
+
path += str.slice(index, offset);
|
|
8223
|
+
index = offset + m2.length;
|
|
8224
|
+
if (escaped) {
|
|
8225
|
+
path += escaped[1];
|
|
8226
|
+
continue;
|
|
8227
|
+
}
|
|
8228
|
+
var next = str[index];
|
|
8229
|
+
var prefix2 = res[2];
|
|
8230
|
+
var name = res[3];
|
|
8231
|
+
var capture = res[4];
|
|
8232
|
+
var group = res[5];
|
|
8233
|
+
var modifier = res[6];
|
|
8234
|
+
var asterisk = res[7];
|
|
8235
|
+
if (path) {
|
|
8236
|
+
tokens.push(path);
|
|
8237
|
+
path = "";
|
|
8238
|
+
}
|
|
8239
|
+
var partial = prefix2 != null && next != null && next !== prefix2;
|
|
8240
|
+
var repeat = modifier === "+" || modifier === "*";
|
|
8241
|
+
var optional = modifier === "?" || modifier === "*";
|
|
8242
|
+
var delimiter = res[2] || defaultDelimiter;
|
|
8243
|
+
var pattern = capture || group;
|
|
8244
|
+
tokens.push({
|
|
8245
|
+
name: name || key++,
|
|
8246
|
+
prefix: prefix2 || "",
|
|
8247
|
+
delimiter,
|
|
8248
|
+
optional,
|
|
8249
|
+
repeat,
|
|
8250
|
+
partial,
|
|
8251
|
+
asterisk: !!asterisk,
|
|
8252
|
+
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
8253
|
+
});
|
|
8254
|
+
}
|
|
8255
|
+
if (index < str.length) {
|
|
8256
|
+
path += str.substr(index);
|
|
8257
|
+
}
|
|
8258
|
+
if (path) {
|
|
8259
|
+
tokens.push(path);
|
|
8260
|
+
}
|
|
8261
|
+
return tokens;
|
|
8262
|
+
}
|
|
8263
|
+
function compile(str, options) {
|
|
8264
|
+
return tokensToFunction(parse$1(str, options), options);
|
|
8265
|
+
}
|
|
8266
|
+
function encodeURIComponentPretty(str) {
|
|
8267
|
+
return encodeURI(str).replace(/[\/?#]/g, function(c6) {
|
|
8268
|
+
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8269
|
+
});
|
|
8270
|
+
}
|
|
8271
|
+
function encodeAsterisk(str) {
|
|
8272
|
+
return encodeURI(str).replace(/[?#]/g, function(c6) {
|
|
8273
|
+
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
8274
|
+
});
|
|
8275
|
+
}
|
|
8276
|
+
function tokensToFunction(tokens, options) {
|
|
8277
|
+
var matches = new Array(tokens.length);
|
|
8278
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
8279
|
+
if (typeof tokens[i] === "object") {
|
|
8280
|
+
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
8281
|
+
}
|
|
8282
|
+
}
|
|
8283
|
+
return function(obj, opts) {
|
|
8284
|
+
var path = "";
|
|
8285
|
+
var data = obj || {};
|
|
8286
|
+
var options2 = opts || {};
|
|
8287
|
+
var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
8288
|
+
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
8289
|
+
var token = tokens[i2];
|
|
8290
|
+
if (typeof token === "string") {
|
|
8291
|
+
path += token;
|
|
8292
|
+
continue;
|
|
8293
|
+
}
|
|
8294
|
+
var value = data[token.name];
|
|
8295
|
+
var segment;
|
|
8296
|
+
if (value == null) {
|
|
8297
|
+
if (token.optional) {
|
|
8298
|
+
if (token.partial) {
|
|
8299
|
+
path += token.prefix;
|
|
8300
|
+
}
|
|
8301
|
+
continue;
|
|
8302
|
+
} else {
|
|
8303
|
+
throw new TypeError('Expected "' + token.name + '" to be defined');
|
|
8304
|
+
}
|
|
8305
|
+
}
|
|
8306
|
+
if (isarray(value)) {
|
|
8307
|
+
if (!token.repeat) {
|
|
8308
|
+
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + "`");
|
|
8309
|
+
}
|
|
8310
|
+
if (value.length === 0) {
|
|
8311
|
+
if (token.optional) {
|
|
8312
|
+
continue;
|
|
8313
|
+
} else {
|
|
8314
|
+
throw new TypeError('Expected "' + token.name + '" to not be empty');
|
|
8315
|
+
}
|
|
8316
|
+
}
|
|
8317
|
+
for (var j = 0; j < value.length; j++) {
|
|
8318
|
+
segment = encode(value[j]);
|
|
8319
|
+
if (!matches[i2].test(segment)) {
|
|
8320
|
+
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + "`");
|
|
8321
|
+
}
|
|
8322
|
+
path += (j === 0 ? token.prefix : token.delimiter) + segment;
|
|
8323
|
+
}
|
|
8324
|
+
continue;
|
|
8325
|
+
}
|
|
8326
|
+
segment = token.asterisk ? encodeAsterisk(value) : encode(value);
|
|
8327
|
+
if (!matches[i2].test(segment)) {
|
|
8328
|
+
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"');
|
|
8329
|
+
}
|
|
8330
|
+
path += token.prefix + segment;
|
|
8331
|
+
}
|
|
8332
|
+
return path;
|
|
8333
|
+
};
|
|
8334
|
+
}
|
|
8335
|
+
function escapeString(str) {
|
|
8336
|
+
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, "\\$1");
|
|
8337
|
+
}
|
|
8338
|
+
function escapeGroup(group) {
|
|
8339
|
+
return group.replace(/([=!:$\/()])/g, "\\$1");
|
|
8340
|
+
}
|
|
8341
|
+
function attachKeys(re, keys) {
|
|
8342
|
+
re.keys = keys;
|
|
8343
|
+
return re;
|
|
8344
|
+
}
|
|
8345
|
+
function flags(options) {
|
|
8346
|
+
return options && options.sensitive ? "" : "i";
|
|
8347
|
+
}
|
|
8348
|
+
function regexpToRegexp(path, keys) {
|
|
8349
|
+
var groups = path.source.match(/\((?!\?)/g);
|
|
8350
|
+
if (groups) {
|
|
8351
|
+
for (var i = 0; i < groups.length; i++) {
|
|
8352
|
+
keys.push({
|
|
8353
|
+
name: i,
|
|
8354
|
+
prefix: null,
|
|
8355
|
+
delimiter: null,
|
|
8356
|
+
optional: false,
|
|
8357
|
+
repeat: false,
|
|
8358
|
+
partial: false,
|
|
8359
|
+
asterisk: false,
|
|
8360
|
+
pattern: null
|
|
8361
|
+
});
|
|
8362
|
+
}
|
|
8363
|
+
}
|
|
8364
|
+
return attachKeys(path, keys);
|
|
8365
|
+
}
|
|
8366
|
+
function arrayToRegexp(path, keys, options) {
|
|
8367
|
+
var parts = [];
|
|
8368
|
+
for (var i = 0; i < path.length; i++) {
|
|
8369
|
+
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
8370
|
+
}
|
|
8371
|
+
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
8372
|
+
return attachKeys(regexp, keys);
|
|
8373
|
+
}
|
|
8374
|
+
function stringToRegexp(path, keys, options) {
|
|
8375
|
+
return tokensToRegExp(parse$1(path, options), keys, options);
|
|
8376
|
+
}
|
|
8377
|
+
function tokensToRegExp(tokens, keys, options) {
|
|
8378
|
+
if (!isarray(keys)) {
|
|
8379
|
+
options = keys || options;
|
|
8380
|
+
keys = [];
|
|
8381
|
+
}
|
|
8382
|
+
options = options || {};
|
|
8383
|
+
var strict = options.strict;
|
|
8384
|
+
var end = options.end !== false;
|
|
8385
|
+
var route = "";
|
|
8386
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
8387
|
+
var token = tokens[i];
|
|
8388
|
+
if (typeof token === "string") {
|
|
8389
|
+
route += escapeString(token);
|
|
8390
|
+
} else {
|
|
8391
|
+
var prefix2 = escapeString(token.prefix);
|
|
8392
|
+
var capture = "(?:" + token.pattern + ")";
|
|
8393
|
+
keys.push(token);
|
|
8394
|
+
if (token.repeat) {
|
|
8395
|
+
capture += "(?:" + prefix2 + capture + ")*";
|
|
8396
|
+
}
|
|
8397
|
+
if (token.optional) {
|
|
8398
|
+
if (!token.partial) {
|
|
8399
|
+
capture = "(?:" + prefix2 + "(" + capture + "))?";
|
|
8400
|
+
} else {
|
|
8401
|
+
capture = prefix2 + "(" + capture + ")?";
|
|
8402
|
+
}
|
|
8403
|
+
} else {
|
|
8404
|
+
capture = prefix2 + "(" + capture + ")";
|
|
8405
|
+
}
|
|
8406
|
+
route += capture;
|
|
8407
|
+
}
|
|
8408
|
+
}
|
|
8409
|
+
var delimiter = escapeString(options.delimiter || "/");
|
|
8410
|
+
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
8411
|
+
if (!strict) {
|
|
8412
|
+
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
8413
|
+
}
|
|
8414
|
+
if (end) {
|
|
8415
|
+
route += "$";
|
|
8416
|
+
} else {
|
|
8417
|
+
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
8418
|
+
}
|
|
8419
|
+
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
8420
|
+
}
|
|
8421
|
+
function pathToRegexp(path, keys, options) {
|
|
8422
|
+
if (!isarray(keys)) {
|
|
8423
|
+
options = keys || options;
|
|
8424
|
+
keys = [];
|
|
8425
|
+
}
|
|
8426
|
+
options = options || {};
|
|
8427
|
+
if (path instanceof RegExp) {
|
|
8428
|
+
return regexpToRegexp(path, keys);
|
|
8429
|
+
}
|
|
8430
|
+
if (isarray(path)) {
|
|
8431
|
+
return arrayToRegexp(path, keys, options);
|
|
8432
|
+
}
|
|
8433
|
+
return stringToRegexp(path, keys, options);
|
|
8434
|
+
}
|
|
8435
|
+
var pathToRegexp$1 = pathToRegexp$2.exports;
|
|
8436
|
+
var reactIs$1 = { exports: {} };
|
|
8437
|
+
var reactIs_production_min = {};
|
|
8438
|
+
/** @license React v16.13.1
|
|
8439
|
+
* react-is.production.min.js
|
|
8440
|
+
*
|
|
8441
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8442
|
+
*
|
|
8443
|
+
* This source code is licensed under the MIT license found in the
|
|
8444
|
+
* LICENSE file in the root directory of this source tree.
|
|
8445
|
+
*/
|
|
8446
|
+
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;
|
|
8447
|
+
function z(a) {
|
|
8448
|
+
if ("object" === typeof a && null !== a) {
|
|
8449
|
+
var u = a.$$typeof;
|
|
8450
|
+
switch (u) {
|
|
8451
|
+
case c:
|
|
8452
|
+
switch (a = a.type, a) {
|
|
8453
|
+
case l:
|
|
8454
|
+
case m:
|
|
8455
|
+
case e:
|
|
8456
|
+
case g:
|
|
8457
|
+
case f:
|
|
8458
|
+
case p:
|
|
8459
|
+
return a;
|
|
8460
|
+
default:
|
|
8461
|
+
switch (a = a && a.$$typeof, a) {
|
|
8462
|
+
case k:
|
|
8463
|
+
case n:
|
|
8464
|
+
case t:
|
|
8465
|
+
case r:
|
|
8466
|
+
case h:
|
|
8467
|
+
return a;
|
|
8468
|
+
default:
|
|
8469
|
+
return u;
|
|
8470
|
+
}
|
|
8471
|
+
}
|
|
8472
|
+
case d:
|
|
8473
|
+
return u;
|
|
8474
|
+
}
|
|
8475
|
+
}
|
|
8476
|
+
}
|
|
8477
|
+
function A(a) {
|
|
8478
|
+
return z(a) === m;
|
|
8479
|
+
}
|
|
8480
|
+
reactIs_production_min.AsyncMode = l;
|
|
8481
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
8482
|
+
reactIs_production_min.ContextConsumer = k;
|
|
8483
|
+
reactIs_production_min.ContextProvider = h;
|
|
8484
|
+
reactIs_production_min.Element = c;
|
|
8485
|
+
reactIs_production_min.ForwardRef = n;
|
|
8486
|
+
reactIs_production_min.Fragment = e;
|
|
8487
|
+
reactIs_production_min.Lazy = t;
|
|
8488
|
+
reactIs_production_min.Memo = r;
|
|
8489
|
+
reactIs_production_min.Portal = d;
|
|
8490
|
+
reactIs_production_min.Profiler = g;
|
|
8491
|
+
reactIs_production_min.StrictMode = f;
|
|
8492
|
+
reactIs_production_min.Suspense = p;
|
|
8493
|
+
reactIs_production_min.isAsyncMode = function(a) {
|
|
8494
|
+
return A(a) || z(a) === l;
|
|
8495
|
+
};
|
|
8496
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
8497
|
+
reactIs_production_min.isContextConsumer = function(a) {
|
|
8498
|
+
return z(a) === k;
|
|
8499
|
+
};
|
|
8500
|
+
reactIs_production_min.isContextProvider = function(a) {
|
|
8501
|
+
return z(a) === h;
|
|
8502
|
+
};
|
|
8503
|
+
reactIs_production_min.isElement = function(a) {
|
|
8504
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
8505
|
+
};
|
|
8506
|
+
reactIs_production_min.isForwardRef = function(a) {
|
|
8507
|
+
return z(a) === n;
|
|
8508
|
+
};
|
|
8509
|
+
reactIs_production_min.isFragment = function(a) {
|
|
8510
|
+
return z(a) === e;
|
|
8511
|
+
};
|
|
8512
|
+
reactIs_production_min.isLazy = function(a) {
|
|
8513
|
+
return z(a) === t;
|
|
8514
|
+
};
|
|
8515
|
+
reactIs_production_min.isMemo = function(a) {
|
|
8516
|
+
return z(a) === r;
|
|
8517
|
+
};
|
|
8518
|
+
reactIs_production_min.isPortal = function(a) {
|
|
8519
|
+
return z(a) === d;
|
|
8520
|
+
};
|
|
8521
|
+
reactIs_production_min.isProfiler = function(a) {
|
|
8522
|
+
return z(a) === g;
|
|
8523
|
+
};
|
|
8524
|
+
reactIs_production_min.isStrictMode = function(a) {
|
|
8525
|
+
return z(a) === f;
|
|
8526
|
+
};
|
|
8527
|
+
reactIs_production_min.isSuspense = function(a) {
|
|
8528
|
+
return z(a) === p;
|
|
8529
|
+
};
|
|
8530
|
+
reactIs_production_min.isValidElementType = function(a) {
|
|
8531
|
+
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);
|
|
8532
|
+
};
|
|
8533
|
+
reactIs_production_min.typeOf = z;
|
|
8534
|
+
{
|
|
8535
|
+
reactIs$1.exports = reactIs_production_min;
|
|
8536
|
+
}
|
|
8537
|
+
var reactIs = reactIs$1.exports;
|
|
8538
|
+
var FORWARD_REF_STATICS = {
|
|
8539
|
+
"$$typeof": true,
|
|
8540
|
+
render: true,
|
|
8541
|
+
defaultProps: true,
|
|
8542
|
+
displayName: true,
|
|
8543
|
+
propTypes: true
|
|
8544
|
+
};
|
|
8545
|
+
var MEMO_STATICS = {
|
|
8546
|
+
"$$typeof": true,
|
|
8547
|
+
compare: true,
|
|
8548
|
+
defaultProps: true,
|
|
8549
|
+
displayName: true,
|
|
8550
|
+
propTypes: true,
|
|
8551
|
+
type: true
|
|
8552
|
+
};
|
|
8553
|
+
var TYPE_STATICS = {};
|
|
8554
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
8555
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
8556
|
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
8557
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
8558
|
+
function getUniqueId() {
|
|
8559
|
+
var key = "__global_unique_id__";
|
|
8560
|
+
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
8561
|
+
}
|
|
8562
|
+
function objectIs(x2, y2) {
|
|
8563
|
+
if (x2 === y2) {
|
|
8564
|
+
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
8565
|
+
} else {
|
|
8566
|
+
return x2 !== x2 && y2 !== y2;
|
|
8567
|
+
}
|
|
8568
|
+
}
|
|
8569
|
+
function createEventEmitter(value) {
|
|
8570
|
+
var handlers = [];
|
|
8571
|
+
return {
|
|
8572
|
+
on: function on(handler) {
|
|
8573
|
+
handlers.push(handler);
|
|
8574
|
+
},
|
|
8575
|
+
off: function off(handler) {
|
|
8576
|
+
handlers = handlers.filter(function(h2) {
|
|
8577
|
+
return h2 !== handler;
|
|
8578
|
+
});
|
|
8579
|
+
},
|
|
8580
|
+
get: function get() {
|
|
8581
|
+
return value;
|
|
8582
|
+
},
|
|
8583
|
+
set: function set(newValue, changedBits) {
|
|
8584
|
+
value = newValue;
|
|
8585
|
+
handlers.forEach(function(handler) {
|
|
8586
|
+
return handler(value, changedBits);
|
|
8587
|
+
});
|
|
8588
|
+
}
|
|
8589
|
+
};
|
|
8590
|
+
}
|
|
8591
|
+
function onlyChild(children) {
|
|
8592
|
+
return Array.isArray(children) ? children[0] : children;
|
|
8593
|
+
}
|
|
8594
|
+
function createReactContext(defaultValue, calculateChangedBits) {
|
|
8595
|
+
var _Provider$childContex, _Consumer$contextType;
|
|
8596
|
+
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
8597
|
+
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
8598
|
+
_inheritsLoose(Provider2, _React$Component);
|
|
8599
|
+
function Provider2() {
|
|
8600
|
+
var _this;
|
|
8601
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8602
|
+
args[_key] = arguments[_key];
|
|
8603
|
+
}
|
|
8604
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8605
|
+
_this.emitter = createEventEmitter(_this.props.value);
|
|
8606
|
+
return _this;
|
|
8607
|
+
}
|
|
8608
|
+
var _proto = Provider2.prototype;
|
|
8609
|
+
_proto.getChildContext = function getChildContext() {
|
|
8610
|
+
var _ref;
|
|
8611
|
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
8612
|
+
};
|
|
8613
|
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8614
|
+
if (this.props.value !== nextProps.value) {
|
|
8615
|
+
var oldValue = this.props.value;
|
|
8616
|
+
var newValue = nextProps.value;
|
|
8617
|
+
var changedBits;
|
|
8618
|
+
if (objectIs(oldValue, newValue)) {
|
|
8619
|
+
changedBits = 0;
|
|
8620
|
+
} else {
|
|
8621
|
+
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
8622
|
+
changedBits |= 0;
|
|
8623
|
+
if (changedBits !== 0) {
|
|
8624
|
+
this.emitter.set(nextProps.value, changedBits);
|
|
8625
|
+
}
|
|
8626
|
+
}
|
|
8627
|
+
}
|
|
8628
|
+
};
|
|
8629
|
+
_proto.render = function render() {
|
|
8630
|
+
return this.props.children;
|
|
8631
|
+
};
|
|
8632
|
+
return Provider2;
|
|
8633
|
+
}(React__default.Component);
|
|
8634
|
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
8635
|
+
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
8636
|
+
_inheritsLoose(Consumer2, _React$Component2);
|
|
8637
|
+
function Consumer2() {
|
|
8638
|
+
var _this2;
|
|
8639
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
8640
|
+
args[_key2] = arguments[_key2];
|
|
8641
|
+
}
|
|
8642
|
+
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
8643
|
+
_this2.observedBits = void 0;
|
|
8644
|
+
_this2.state = {
|
|
8645
|
+
value: _this2.getValue()
|
|
8646
|
+
};
|
|
8647
|
+
_this2.onUpdate = function(newValue, changedBits) {
|
|
8648
|
+
var observedBits = _this2.observedBits | 0;
|
|
8649
|
+
if ((observedBits & changedBits) !== 0) {
|
|
8650
|
+
_this2.setState({
|
|
8651
|
+
value: _this2.getValue()
|
|
8652
|
+
});
|
|
8653
|
+
}
|
|
8654
|
+
};
|
|
8655
|
+
return _this2;
|
|
8656
|
+
}
|
|
8657
|
+
var _proto2 = Consumer2.prototype;
|
|
8658
|
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
8659
|
+
var observedBits = nextProps.observedBits;
|
|
8660
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8661
|
+
};
|
|
8662
|
+
_proto2.componentDidMount = function componentDidMount() {
|
|
8663
|
+
if (this.context[contextProp]) {
|
|
8664
|
+
this.context[contextProp].on(this.onUpdate);
|
|
8665
|
+
}
|
|
8666
|
+
var observedBits = this.props.observedBits;
|
|
8667
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
8668
|
+
};
|
|
8669
|
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
8670
|
+
if (this.context[contextProp]) {
|
|
8671
|
+
this.context[contextProp].off(this.onUpdate);
|
|
8672
|
+
}
|
|
8673
|
+
};
|
|
8674
|
+
_proto2.getValue = function getValue() {
|
|
8675
|
+
if (this.context[contextProp]) {
|
|
8676
|
+
return this.context[contextProp].get();
|
|
8677
|
+
} else {
|
|
8678
|
+
return defaultValue;
|
|
8679
|
+
}
|
|
8680
|
+
};
|
|
8681
|
+
_proto2.render = function render() {
|
|
8682
|
+
return onlyChild(this.props.children)(this.state.value);
|
|
8683
|
+
};
|
|
8684
|
+
return Consumer2;
|
|
8685
|
+
}(React__default.Component);
|
|
8686
|
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
8687
|
+
return {
|
|
8688
|
+
Provider,
|
|
8689
|
+
Consumer
|
|
8690
|
+
};
|
|
8691
|
+
}
|
|
8692
|
+
var createContext = React__default.createContext || createReactContext;
|
|
8693
|
+
var createNamedContext = function createNamedContext2(name) {
|
|
8694
|
+
var context2 = createContext();
|
|
8695
|
+
context2.displayName = name;
|
|
8696
|
+
return context2;
|
|
8697
|
+
};
|
|
8698
|
+
var historyContext = /* @__PURE__ */ createNamedContext("Router-History");
|
|
8699
|
+
var context = /* @__PURE__ */ createNamedContext("Router");
|
|
8700
|
+
var Router = /* @__PURE__ */ function(_React$Component) {
|
|
8701
|
+
_inheritsLoose(Router2, _React$Component);
|
|
8702
|
+
Router2.computeRootMatch = function computeRootMatch(pathname) {
|
|
8703
|
+
return {
|
|
8704
|
+
path: "/",
|
|
8705
|
+
url: "/",
|
|
8706
|
+
params: {},
|
|
8707
|
+
isExact: pathname === "/"
|
|
8708
|
+
};
|
|
8709
|
+
};
|
|
8710
|
+
function Router2(props) {
|
|
8711
|
+
var _this;
|
|
8712
|
+
_this = _React$Component.call(this, props) || this;
|
|
8713
|
+
_this.state = {
|
|
8714
|
+
location: props.history.location
|
|
8715
|
+
};
|
|
8716
|
+
_this._isMounted = false;
|
|
8717
|
+
_this._pendingLocation = null;
|
|
8718
|
+
if (!props.staticContext) {
|
|
8719
|
+
_this.unlisten = props.history.listen(function(location) {
|
|
8720
|
+
_this._pendingLocation = location;
|
|
8721
|
+
});
|
|
8722
|
+
}
|
|
8723
|
+
return _this;
|
|
8724
|
+
}
|
|
8725
|
+
var _proto = Router2.prototype;
|
|
8726
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
8727
|
+
var _this2 = this;
|
|
8728
|
+
this._isMounted = true;
|
|
8729
|
+
if (this.unlisten) {
|
|
8730
|
+
this.unlisten();
|
|
8731
|
+
}
|
|
8732
|
+
if (!this.props.staticContext) {
|
|
8733
|
+
this.unlisten = this.props.history.listen(function(location) {
|
|
8734
|
+
if (_this2._isMounted) {
|
|
8735
|
+
_this2.setState({
|
|
8736
|
+
location
|
|
8737
|
+
});
|
|
8738
|
+
}
|
|
8739
|
+
});
|
|
8740
|
+
}
|
|
8741
|
+
if (this._pendingLocation) {
|
|
8742
|
+
this.setState({
|
|
8743
|
+
location: this._pendingLocation
|
|
8744
|
+
});
|
|
8745
|
+
}
|
|
8746
|
+
};
|
|
8747
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8748
|
+
if (this.unlisten) {
|
|
8749
|
+
this.unlisten();
|
|
8750
|
+
this._isMounted = false;
|
|
8751
|
+
this._pendingLocation = null;
|
|
8752
|
+
}
|
|
8753
|
+
};
|
|
8754
|
+
_proto.render = function render() {
|
|
8755
|
+
return /* @__PURE__ */ React__default.createElement(context.Provider, {
|
|
8756
|
+
value: {
|
|
8757
|
+
history: this.props.history,
|
|
8758
|
+
location: this.state.location,
|
|
8759
|
+
match: Router2.computeRootMatch(this.state.location.pathname),
|
|
8760
|
+
staticContext: this.props.staticContext
|
|
8761
|
+
}
|
|
8762
|
+
}, /* @__PURE__ */ React__default.createElement(historyContext.Provider, {
|
|
8763
|
+
children: this.props.children || null,
|
|
8764
|
+
value: this.props.history
|
|
8765
|
+
}));
|
|
8766
|
+
};
|
|
8767
|
+
return Router2;
|
|
8768
|
+
}(React__default.Component);
|
|
8769
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8770
|
+
_inheritsLoose(MemoryRouter, _React$Component);
|
|
8771
|
+
function MemoryRouter() {
|
|
8772
|
+
var _this;
|
|
8773
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8774
|
+
args[_key] = arguments[_key];
|
|
8775
|
+
}
|
|
8776
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8777
|
+
_this.history = createMemoryHistory(_this.props);
|
|
8778
|
+
return _this;
|
|
8779
|
+
}
|
|
8780
|
+
var _proto = MemoryRouter.prototype;
|
|
8781
|
+
_proto.render = function render() {
|
|
8782
|
+
return /* @__PURE__ */ React__default.createElement(Router, {
|
|
8783
|
+
history: this.history,
|
|
8784
|
+
children: this.props.children
|
|
8785
|
+
});
|
|
8786
|
+
};
|
|
8787
|
+
return MemoryRouter;
|
|
8788
|
+
})(React__default.Component);
|
|
8789
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8790
|
+
_inheritsLoose(Lifecycle, _React$Component);
|
|
8791
|
+
function Lifecycle() {
|
|
8792
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8793
|
+
}
|
|
8794
|
+
var _proto = Lifecycle.prototype;
|
|
8795
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
8796
|
+
if (this.props.onMount)
|
|
8797
|
+
this.props.onMount.call(this, this);
|
|
8798
|
+
};
|
|
8799
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
8800
|
+
if (this.props.onUpdate)
|
|
8801
|
+
this.props.onUpdate.call(this, this, prevProps);
|
|
8802
|
+
};
|
|
8803
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
8804
|
+
if (this.props.onUnmount)
|
|
8805
|
+
this.props.onUnmount.call(this, this);
|
|
8806
|
+
};
|
|
8807
|
+
_proto.render = function render() {
|
|
8808
|
+
return null;
|
|
8809
|
+
};
|
|
8810
|
+
return Lifecycle;
|
|
8811
|
+
})(React__default.Component);
|
|
8812
|
+
var cache$1 = {};
|
|
8813
|
+
var cacheLimit$1 = 1e4;
|
|
8814
|
+
var cacheCount$1 = 0;
|
|
8815
|
+
function compilePath$1(path, options) {
|
|
8816
|
+
var cacheKey2 = "" + options.end + options.strict + options.sensitive;
|
|
8817
|
+
var pathCache = cache$1[cacheKey2] || (cache$1[cacheKey2] = {});
|
|
8818
|
+
if (pathCache[path])
|
|
8819
|
+
return pathCache[path];
|
|
8820
|
+
var keys = [];
|
|
8821
|
+
var regexp = pathToRegexp$1(path, keys, options);
|
|
8822
|
+
var result = {
|
|
8823
|
+
regexp,
|
|
8824
|
+
keys
|
|
8825
|
+
};
|
|
8826
|
+
if (cacheCount$1 < cacheLimit$1) {
|
|
8827
|
+
pathCache[path] = result;
|
|
8828
|
+
cacheCount$1++;
|
|
8829
|
+
}
|
|
8830
|
+
return result;
|
|
8831
|
+
}
|
|
8832
|
+
function matchPath(pathname, options) {
|
|
8833
|
+
if (options === void 0) {
|
|
8834
|
+
options = {};
|
|
8835
|
+
}
|
|
8836
|
+
if (typeof options === "string" || Array.isArray(options)) {
|
|
8837
|
+
options = {
|
|
8838
|
+
path: options
|
|
8839
|
+
};
|
|
8840
|
+
}
|
|
8841
|
+
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;
|
|
8842
|
+
var paths = [].concat(path);
|
|
8843
|
+
return paths.reduce(function(matched, path2) {
|
|
8844
|
+
if (!path2 && path2 !== "")
|
|
8845
|
+
return null;
|
|
8846
|
+
if (matched)
|
|
8847
|
+
return matched;
|
|
8848
|
+
var _compilePath = compilePath$1(path2, {
|
|
8849
|
+
end: exact,
|
|
8850
|
+
strict,
|
|
8851
|
+
sensitive
|
|
8852
|
+
}), regexp = _compilePath.regexp, keys = _compilePath.keys;
|
|
8853
|
+
var match = regexp.exec(pathname);
|
|
8854
|
+
if (!match)
|
|
8855
|
+
return null;
|
|
8856
|
+
var url = match[0], values = match.slice(1);
|
|
8857
|
+
var isExact = pathname === url;
|
|
8858
|
+
if (exact && !isExact)
|
|
8859
|
+
return null;
|
|
8860
|
+
return {
|
|
8861
|
+
path: path2,
|
|
8862
|
+
url: path2 === "/" && url === "" ? "/" : url,
|
|
8863
|
+
isExact,
|
|
8864
|
+
params: keys.reduce(function(memo2, key, index) {
|
|
8865
|
+
memo2[key.name] = values[index];
|
|
8866
|
+
return memo2;
|
|
8867
|
+
}, {})
|
|
8868
|
+
};
|
|
8869
|
+
}, null);
|
|
8870
|
+
}
|
|
8871
|
+
function isEmptyChildren(children) {
|
|
8872
|
+
return React__default.Children.count(children) === 0;
|
|
8873
|
+
}
|
|
8874
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8875
|
+
_inheritsLoose(Route, _React$Component);
|
|
8876
|
+
function Route() {
|
|
8877
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8878
|
+
}
|
|
8879
|
+
var _proto = Route.prototype;
|
|
8880
|
+
_proto.render = function render() {
|
|
8881
|
+
var _this = this;
|
|
8882
|
+
return /* @__PURE__ */ React__default.createElement(context.Consumer, null, function(context$1) {
|
|
8883
|
+
!context$1 ? invariant(false) : void 0;
|
|
8884
|
+
var location = _this.props.location || context$1.location;
|
|
8885
|
+
var match = _this.props.computedMatch ? _this.props.computedMatch : _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
|
|
8886
|
+
var props = _extends$3({}, context$1, {
|
|
8887
|
+
location,
|
|
8888
|
+
match
|
|
8889
|
+
});
|
|
8890
|
+
var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
|
|
8891
|
+
if (Array.isArray(children) && isEmptyChildren(children)) {
|
|
8892
|
+
children = null;
|
|
8893
|
+
}
|
|
8894
|
+
return /* @__PURE__ */ React__default.createElement(context.Provider, {
|
|
8895
|
+
value: props
|
|
8896
|
+
}, 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);
|
|
8897
|
+
});
|
|
8898
|
+
};
|
|
8899
|
+
return Route;
|
|
8900
|
+
})(React__default.Component);
|
|
8901
|
+
function addLeadingSlash(path) {
|
|
8902
|
+
return path.charAt(0) === "/" ? path : "/" + path;
|
|
8903
|
+
}
|
|
8904
|
+
function addBasename(basename, location) {
|
|
8905
|
+
if (!basename)
|
|
8906
|
+
return location;
|
|
8907
|
+
return _extends$3({}, location, {
|
|
8908
|
+
pathname: addLeadingSlash(basename) + location.pathname
|
|
8909
|
+
});
|
|
8910
|
+
}
|
|
8911
|
+
function stripBasename(basename, location) {
|
|
8912
|
+
if (!basename)
|
|
8913
|
+
return location;
|
|
8914
|
+
var base = addLeadingSlash(basename);
|
|
8915
|
+
if (location.pathname.indexOf(base) !== 0)
|
|
8916
|
+
return location;
|
|
8917
|
+
return _extends$3({}, location, {
|
|
8918
|
+
pathname: location.pathname.substr(base.length)
|
|
8919
|
+
});
|
|
8920
|
+
}
|
|
8921
|
+
function createURL(location) {
|
|
8922
|
+
return typeof location === "string" ? location : createPath(location);
|
|
8923
|
+
}
|
|
8924
|
+
function staticHandler(methodName) {
|
|
8925
|
+
return function() {
|
|
8926
|
+
invariant(false);
|
|
8927
|
+
};
|
|
8928
|
+
}
|
|
8929
|
+
function noop$2() {
|
|
8930
|
+
}
|
|
8931
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8932
|
+
_inheritsLoose(StaticRouter, _React$Component);
|
|
8933
|
+
function StaticRouter() {
|
|
8934
|
+
var _this;
|
|
8935
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
8936
|
+
args[_key] = arguments[_key];
|
|
8937
|
+
}
|
|
8938
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
8939
|
+
_this.handlePush = function(location) {
|
|
8940
|
+
return _this.navigateTo(location, "PUSH");
|
|
8941
|
+
};
|
|
8942
|
+
_this.handleReplace = function(location) {
|
|
8943
|
+
return _this.navigateTo(location, "REPLACE");
|
|
8944
|
+
};
|
|
8945
|
+
_this.handleListen = function() {
|
|
8946
|
+
return noop$2;
|
|
8947
|
+
};
|
|
8948
|
+
_this.handleBlock = function() {
|
|
8949
|
+
return noop$2;
|
|
8950
|
+
};
|
|
8951
|
+
return _this;
|
|
8952
|
+
}
|
|
8953
|
+
var _proto = StaticRouter.prototype;
|
|
8954
|
+
_proto.navigateTo = function navigateTo(location, action) {
|
|
8955
|
+
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;
|
|
8956
|
+
context2.action = action;
|
|
8957
|
+
context2.location = addBasename(basename, createLocation(location));
|
|
8958
|
+
context2.url = createURL(context2.location);
|
|
8959
|
+
};
|
|
8960
|
+
_proto.render = function render() {
|
|
8961
|
+
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"]);
|
|
8962
|
+
var history = {
|
|
8963
|
+
createHref: function createHref(path) {
|
|
8964
|
+
return addLeadingSlash(basename + createURL(path));
|
|
8965
|
+
},
|
|
8966
|
+
action: "POP",
|
|
8967
|
+
location: stripBasename(basename, createLocation(location)),
|
|
8968
|
+
push: this.handlePush,
|
|
8969
|
+
replace: this.handleReplace,
|
|
8970
|
+
go: staticHandler(),
|
|
8971
|
+
goBack: staticHandler(),
|
|
8972
|
+
goForward: staticHandler(),
|
|
8973
|
+
listen: this.handleListen,
|
|
8974
|
+
block: this.handleBlock
|
|
8975
|
+
};
|
|
8976
|
+
return /* @__PURE__ */ React__default.createElement(Router, _extends$3({}, rest, {
|
|
8977
|
+
history,
|
|
8978
|
+
staticContext: context2
|
|
8979
|
+
}));
|
|
8980
|
+
};
|
|
8981
|
+
return StaticRouter;
|
|
8982
|
+
})(React__default.Component);
|
|
8983
|
+
/* @__PURE__ */ (function(_React$Component) {
|
|
8984
|
+
_inheritsLoose(Switch2, _React$Component);
|
|
8985
|
+
function Switch2() {
|
|
8986
|
+
return _React$Component.apply(this, arguments) || this;
|
|
8987
|
+
}
|
|
8988
|
+
var _proto = Switch2.prototype;
|
|
8989
|
+
_proto.render = function render() {
|
|
8990
|
+
var _this = this;
|
|
8991
|
+
return /* @__PURE__ */ React__default.createElement(context.Consumer, null, function(context2) {
|
|
8992
|
+
!context2 ? invariant(false) : void 0;
|
|
8993
|
+
var location = _this.props.location || context2.location;
|
|
8994
|
+
var element, match;
|
|
8995
|
+
React__default.Children.forEach(_this.props.children, function(child) {
|
|
8996
|
+
if (match == null && /* @__PURE__ */ React__default.isValidElement(child)) {
|
|
8997
|
+
element = child;
|
|
8998
|
+
var path = child.props.path || child.props.from;
|
|
8999
|
+
match = path ? matchPath(location.pathname, _extends$3({}, child.props, {
|
|
9000
|
+
path
|
|
9001
|
+
})) : context2.match;
|
|
9002
|
+
}
|
|
9003
|
+
});
|
|
9004
|
+
return match ? /* @__PURE__ */ React__default.cloneElement(element, {
|
|
9005
|
+
location,
|
|
9006
|
+
computedMatch: match
|
|
9007
|
+
}) : null;
|
|
9008
|
+
});
|
|
9009
|
+
};
|
|
9010
|
+
return Switch2;
|
|
9011
|
+
})(React__default.Component);
|
|
9012
|
+
var useContext = React__default.useContext;
|
|
9013
|
+
function useHistory() {
|
|
9014
|
+
return useContext(historyContext);
|
|
9015
|
+
}
|
|
9016
|
+
const defaultProps$H = {
|
|
9017
|
+
...ComponentDefaults,
|
|
9018
|
+
title: null,
|
|
9019
|
+
subTitle: null,
|
|
9020
|
+
desc: "",
|
|
9021
|
+
descTextAlign: "right",
|
|
9022
|
+
isLink: false,
|
|
9023
|
+
icon: "",
|
|
9024
|
+
roundRadius: "6px",
|
|
9025
|
+
url: "",
|
|
9026
|
+
to: "",
|
|
9027
|
+
replace: false,
|
|
9028
|
+
center: false,
|
|
9029
|
+
size: "",
|
|
9030
|
+
className: "",
|
|
9031
|
+
iconSlot: null,
|
|
9032
|
+
linkSlot: null,
|
|
9033
|
+
click: (event) => {
|
|
9034
|
+
},
|
|
9035
|
+
onClick: (event) => {
|
|
9036
|
+
}
|
|
9037
|
+
};
|
|
9038
|
+
const Cell = (props) => {
|
|
9039
|
+
const {
|
|
9040
|
+
children,
|
|
9041
|
+
click,
|
|
9042
|
+
onClick,
|
|
9043
|
+
title,
|
|
9044
|
+
subTitle,
|
|
9045
|
+
desc,
|
|
9046
|
+
descTextAlign,
|
|
9047
|
+
isLink,
|
|
9048
|
+
icon,
|
|
9049
|
+
roundRadius,
|
|
9050
|
+
url,
|
|
9051
|
+
to: to2,
|
|
9052
|
+
replace,
|
|
9053
|
+
center,
|
|
9054
|
+
size,
|
|
9055
|
+
className,
|
|
9056
|
+
iconSlot,
|
|
9057
|
+
linkSlot,
|
|
9058
|
+
iconClassPrefix,
|
|
9059
|
+
iconFontClassName,
|
|
9060
|
+
...rest
|
|
9061
|
+
} = {
|
|
9062
|
+
...defaultProps$H,
|
|
9063
|
+
...props
|
|
9064
|
+
};
|
|
9065
|
+
const b2 = cn("cell");
|
|
9066
|
+
const history = useHistory();
|
|
9067
|
+
const handleClick2 = (event) => {
|
|
9068
|
+
click(event);
|
|
9069
|
+
onClick(event);
|
|
9070
|
+
if (to2 && history) {
|
|
9071
|
+
history[replace ? "replace" : "push"](to2);
|
|
9072
|
+
} else if (url) {
|
|
9073
|
+
replace ? window.location.replace(url) : window.location.href = url;
|
|
9074
|
+
}
|
|
9075
|
+
};
|
|
9076
|
+
const baseStyle = {
|
|
9077
|
+
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : `${roundRadius}px`
|
|
9078
|
+
};
|
|
9079
|
+
const styles = title || subTitle || icon ? {} : {
|
|
9080
|
+
textAlign: descTextAlign,
|
|
9081
|
+
flex: 1
|
|
9082
|
+
};
|
|
9083
|
+
return /* @__PURE__ */ React__default.createElement("div", {
|
|
9084
|
+
className: `${b2(
|
|
9085
|
+
{ clickable: !!(isLink || to2), center, large: size === "large" },
|
|
9086
|
+
[className]
|
|
9087
|
+
)} `,
|
|
9088
|
+
onClick: (event) => handleClick2(event),
|
|
9089
|
+
style: baseStyle,
|
|
9090
|
+
...rest
|
|
9091
|
+
}, children || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, icon || iconSlot ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9092
|
+
className: b2("icon")
|
|
9093
|
+
}, iconSlot || (icon ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9094
|
+
classPrefix: iconClassPrefix,
|
|
9095
|
+
fontClassName: iconFontClassName,
|
|
9096
|
+
name: icon,
|
|
9097
|
+
className: "icon"
|
|
9098
|
+
}) : null)) : null, title || subTitle ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9099
|
+
className: `${b2("title")}`
|
|
9100
|
+
}, title ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9101
|
+
className: b2("maintitle")
|
|
9102
|
+
}, title) : null, subTitle ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9103
|
+
className: b2("subtitle")
|
|
9104
|
+
}, subTitle) : null) : null, desc ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9105
|
+
className: b2("value", {
|
|
9106
|
+
alone: !title && !subTitle
|
|
9107
|
+
}),
|
|
9108
|
+
style: styles
|
|
9109
|
+
}, desc) : null, !linkSlot && (isLink || to2) ? /* @__PURE__ */ React__default.createElement(Icon, {
|
|
9110
|
+
classPrefix: iconClassPrefix,
|
|
9111
|
+
fontClassName: iconFontClassName,
|
|
9112
|
+
name: "right",
|
|
9113
|
+
className: b2("link")
|
|
9114
|
+
}) : linkSlot));
|
|
9115
|
+
};
|
|
9116
|
+
Cell.defaultProps = defaultProps$H;
|
|
9117
|
+
Cell.displayName = "NutCell";
|
|
9118
|
+
const defaultProps$G = {
|
|
9119
|
+
...ComponentDefaults,
|
|
9120
|
+
name: "",
|
|
9121
|
+
label: "",
|
|
9122
|
+
className: "",
|
|
9123
|
+
rules: [{ required: false, message: "" }],
|
|
9124
|
+
disabled: false,
|
|
9125
|
+
labelWidth: 90,
|
|
9126
|
+
errorMessageAlign: "left",
|
|
9127
|
+
showErrorLine: true,
|
|
9128
|
+
showErrorMessage: true
|
|
9129
|
+
};
|
|
9130
|
+
class FormItem extends React__default.Component {
|
|
9131
|
+
constructor() {
|
|
9132
|
+
super(...arguments);
|
|
9133
|
+
this.getControlled = (children) => {
|
|
9134
|
+
const { getFieldValue, setFieldsValue } = this.context;
|
|
9135
|
+
const { name } = this.props;
|
|
9136
|
+
const type = children.type.NAME;
|
|
9137
|
+
return {
|
|
9138
|
+
value: getFieldValue(name),
|
|
9139
|
+
onChange: (event) => {
|
|
9140
|
+
let newValue = event;
|
|
9141
|
+
switch (type) {
|
|
9142
|
+
case "checkbox":
|
|
9143
|
+
newValue = event.target.value;
|
|
9144
|
+
break;
|
|
9145
|
+
}
|
|
9146
|
+
setFieldsValue({ [name]: newValue });
|
|
9147
|
+
}
|
|
9148
|
+
};
|
|
9149
|
+
};
|
|
9150
|
+
this.onStoreChange = () => {
|
|
9151
|
+
this.forceUpdate();
|
|
9152
|
+
};
|
|
9153
|
+
this.renderLayout = (childNode) => {
|
|
9154
|
+
var _a, _b;
|
|
9155
|
+
const {
|
|
9156
|
+
label,
|
|
9157
|
+
name,
|
|
9158
|
+
rules = [{ required: false, message: "" }],
|
|
9159
|
+
className,
|
|
9160
|
+
labelWidth,
|
|
9161
|
+
errorMessageAlign,
|
|
9162
|
+
showErrorLine,
|
|
9163
|
+
showErrorMessage
|
|
9164
|
+
} = {
|
|
9165
|
+
...defaultProps$G,
|
|
9166
|
+
...this.props
|
|
9167
|
+
};
|
|
9168
|
+
const item = ((_a = this.context.errList) == null ? void 0 : _a.length) > 0 && ((_b = this.context.errList) == null ? void 0 : _b.filter((item2) => {
|
|
9169
|
+
return item2.field === name;
|
|
9170
|
+
}));
|
|
9171
|
+
const { starPositon } = this.context;
|
|
9172
|
+
const renderStar = rules.length > 0 && rules[0].required && /* @__PURE__ */ React__default.createElement("i", {
|
|
9173
|
+
className: "required"
|
|
9174
|
+
});
|
|
9175
|
+
const renderLabel = starPositon === "Right" ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, label, renderStar) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderStar, label);
|
|
9176
|
+
return /* @__PURE__ */ React__default.createElement(Cell, {
|
|
9177
|
+
className: `nut-form-item ${className}`
|
|
9178
|
+
}, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
9179
|
+
className: "nut-cell__title nut-form-item__label",
|
|
9180
|
+
style: {
|
|
9181
|
+
width: this.pxCheck(labelWidth)
|
|
9182
|
+
}
|
|
9183
|
+
}, renderLabel) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
9184
|
+
className: "nut-cell__value nut-form-item__body"
|
|
9185
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
9186
|
+
className: "nut-form-item__body__slots"
|
|
9187
|
+
}, childNode), item.length > 0 && /* @__PURE__ */ React__default.createElement("div", {
|
|
9188
|
+
className: "nut-form-item__body__tips",
|
|
9189
|
+
style: { textAlign: errorMessageAlign }
|
|
9190
|
+
}, item[0].message)));
|
|
9191
|
+
};
|
|
9192
|
+
this.pxCheck = (value) => {
|
|
9193
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
9194
|
+
};
|
|
9195
|
+
}
|
|
9196
|
+
componentDidMount() {
|
|
9197
|
+
this.cancelRegister = this.context.registerField(this);
|
|
9198
|
+
}
|
|
9199
|
+
componentWillUnmount() {
|
|
9200
|
+
if (this.cancelRegister) {
|
|
9201
|
+
this.cancelRegister();
|
|
9202
|
+
}
|
|
9203
|
+
}
|
|
9204
|
+
render() {
|
|
9205
|
+
const { children } = this.props;
|
|
9206
|
+
const c6 = Array.isArray(children) ? children[0] : children;
|
|
9207
|
+
const returnChildNode = React__default.cloneElement(
|
|
9208
|
+
c6,
|
|
9209
|
+
this.getControlled(c6)
|
|
9210
|
+
);
|
|
9211
|
+
return this.renderLayout(returnChildNode);
|
|
9212
|
+
}
|
|
9213
|
+
}
|
|
9214
|
+
FormItem.defaultProps = defaultProps$G;
|
|
9215
|
+
FormItem.contextType = FormItemContext;
|
|
7816
9216
|
const defaultProps$F = {
|
|
7817
9217
|
cancelTxt: "",
|
|
7818
9218
|
optionTag: "name",
|
|
@@ -8008,10 +9408,10 @@ const Drag = (props) => {
|
|
|
8008
9408
|
e2.preventDefault();
|
|
8009
9409
|
if (e2.touches.length === 1 && dragRef.current) {
|
|
8010
9410
|
const touch = e2.touches[0];
|
|
8011
|
-
const
|
|
8012
|
-
const
|
|
8013
|
-
translateX.current =
|
|
8014
|
-
translateY.current =
|
|
9411
|
+
const x2 = touch.clientX - axisCache.current.x;
|
|
9412
|
+
const y2 = touch.clientY - axisCache.current.y;
|
|
9413
|
+
translateX.current = x2 + transformCache.current.x;
|
|
9414
|
+
translateY.current = y2 + transformCache.current.y;
|
|
8015
9415
|
if (translateX.current < boundaryState.left) {
|
|
8016
9416
|
translateX.current = boundaryState.left;
|
|
8017
9417
|
} else if (translateX.current > boundaryState.right) {
|
|
@@ -8282,7 +9682,7 @@ const Infiniteloading = (props) => {
|
|
|
8282
9682
|
const scrollTop = useRef(0);
|
|
8283
9683
|
const direction = useRef("down");
|
|
8284
9684
|
const isTouching = useRef(false);
|
|
8285
|
-
const
|
|
9685
|
+
const y2 = useRef(0);
|
|
8286
9686
|
const refreshMaxH = useRef(0);
|
|
8287
9687
|
const distance = useRef(0);
|
|
8288
9688
|
const b2 = cn("infiniteloading");
|
|
@@ -8341,12 +9741,12 @@ const Infiniteloading = (props) => {
|
|
|
8341
9741
|
};
|
|
8342
9742
|
const touchStart = (event) => {
|
|
8343
9743
|
if (scrollTop.current == 0 && !isTouching.current && isOpenRefresh) {
|
|
8344
|
-
|
|
9744
|
+
y2.current = event.touches[0].pageY;
|
|
8345
9745
|
isTouching.current = true;
|
|
8346
9746
|
}
|
|
8347
9747
|
};
|
|
8348
9748
|
const touchMove = (event) => {
|
|
8349
|
-
distance.current = event.touches[0].pageY -
|
|
9749
|
+
distance.current = event.touches[0].pageY - y2.current;
|
|
8350
9750
|
if (distance.current > 0 && isTouching.current) {
|
|
8351
9751
|
event.preventDefault();
|
|
8352
9752
|
setTopDisScoll(distance.current);
|
|
@@ -8615,11 +10015,11 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
8615
10015
|
const onTouchStart = async (event) => {
|
|
8616
10016
|
if (leftWrapper.current) {
|
|
8617
10017
|
const leftRect = await getRectByTaro(leftWrapper.current);
|
|
8618
|
-
setActionWidth((
|
|
10018
|
+
setActionWidth((v2) => ({ ...v2, left: leftRect.width }));
|
|
8619
10019
|
}
|
|
8620
10020
|
if (rightWrapper.current) {
|
|
8621
10021
|
const rightRect = await getRectByTaro(rightWrapper.current);
|
|
8622
|
-
setActionWidth((
|
|
10022
|
+
setActionWidth((v2) => ({ ...v2, right: rightRect.width }));
|
|
8623
10023
|
}
|
|
8624
10024
|
if (!props.disabled) {
|
|
8625
10025
|
startOffset.current = state.offset;
|
|
@@ -8648,7 +10048,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
8648
10048
|
};
|
|
8649
10049
|
const onTouchEnd = () => {
|
|
8650
10050
|
if (state.dragging) {
|
|
8651
|
-
setState((
|
|
10051
|
+
setState((v2) => ({ ...v2, dragging: false }));
|
|
8652
10052
|
toggle(state.offset > 0 ? "left" : "right");
|
|
8653
10053
|
setTimeout(() => {
|
|
8654
10054
|
lockClick.current = false;
|
|
@@ -8672,7 +10072,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
8672
10072
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
8673
10073
|
const name = props.name;
|
|
8674
10074
|
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
8675
|
-
setState((
|
|
10075
|
+
setState((v2) => ({ ...v2, offset: Number(offset) || 0 }));
|
|
8676
10076
|
};
|
|
8677
10077
|
const close = (position) => {
|
|
8678
10078
|
var _a;
|
|
@@ -8683,7 +10083,7 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
8683
10083
|
position: position || "left"
|
|
8684
10084
|
});
|
|
8685
10085
|
}
|
|
8686
|
-
setState((
|
|
10086
|
+
setState((v2) => ({ ...v2, offset: 0 }));
|
|
8687
10087
|
};
|
|
8688
10088
|
const rangeCalculation = (num, min, max) => {
|
|
8689
10089
|
return Math.min(Math.max(Number(num), Number(min)), Number(max));
|
|
@@ -8742,14 +10142,14 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
8742
10142
|
});
|
|
8743
10143
|
Swipe.defaultProps = defaultProps$y;
|
|
8744
10144
|
Swipe.displayName = "NutSwipe";
|
|
8745
|
-
function clamp(
|
|
8746
|
-
return Math.max(min, Math.min(
|
|
10145
|
+
function clamp(v2, min, max) {
|
|
10146
|
+
return Math.max(min, Math.min(v2, max));
|
|
8747
10147
|
}
|
|
8748
10148
|
const V = {
|
|
8749
|
-
toVector(
|
|
8750
|
-
if (
|
|
8751
|
-
|
|
8752
|
-
return Array.isArray(
|
|
10149
|
+
toVector(v2, fallback) {
|
|
10150
|
+
if (v2 === void 0)
|
|
10151
|
+
v2 = fallback;
|
|
10152
|
+
return Array.isArray(v2) ? v2 : [v2, v2];
|
|
8753
10153
|
},
|
|
8754
10154
|
add(v1, v2) {
|
|
8755
10155
|
return [v1[0] + v2[0], v1[1] + v2[1]];
|
|
@@ -8928,11 +10328,11 @@ function getEventDetails(event) {
|
|
|
8928
10328
|
}
|
|
8929
10329
|
return payload;
|
|
8930
10330
|
}
|
|
8931
|
-
function call$1(
|
|
8932
|
-
if (typeof
|
|
8933
|
-
return
|
|
10331
|
+
function call$1(v2, ...args) {
|
|
10332
|
+
if (typeof v2 === "function") {
|
|
10333
|
+
return v2(...args);
|
|
8934
10334
|
} else {
|
|
8935
|
-
return
|
|
10335
|
+
return v2;
|
|
8936
10336
|
}
|
|
8937
10337
|
}
|
|
8938
10338
|
function noop$1() {
|
|
@@ -9197,20 +10597,20 @@ class CoordinatesEngine extends Engine {
|
|
|
9197
10597
|
}
|
|
9198
10598
|
state._blocked = (config2.lockDirection || !!config2.axis) && !state.axis || !!config2.axis && config2.axis !== state.axis;
|
|
9199
10599
|
}
|
|
9200
|
-
restrictToAxis(
|
|
10600
|
+
restrictToAxis(v2) {
|
|
9201
10601
|
if (this.config.axis || this.config.lockDirection) {
|
|
9202
10602
|
switch (this.state.axis) {
|
|
9203
10603
|
case "x":
|
|
9204
|
-
|
|
10604
|
+
v2[1] = 0;
|
|
9205
10605
|
break;
|
|
9206
10606
|
case "y":
|
|
9207
|
-
|
|
10607
|
+
v2[0] = 0;
|
|
9208
10608
|
break;
|
|
9209
10609
|
}
|
|
9210
10610
|
}
|
|
9211
10611
|
}
|
|
9212
10612
|
}
|
|
9213
|
-
const identity = (
|
|
10613
|
+
const identity = (v2) => v2;
|
|
9214
10614
|
const DEFAULT_RUBBERBAND = 0.15;
|
|
9215
10615
|
const commonConfigResolver = {
|
|
9216
10616
|
enabled(value = true) {
|
|
@@ -9694,11 +11094,11 @@ _objectSpread2(_objectSpread2({}, commonConfigResolver), {}, {
|
|
|
9694
11094
|
return [D.min, D.max];
|
|
9695
11095
|
};
|
|
9696
11096
|
const _angleBounds = (state) => {
|
|
9697
|
-
const
|
|
11097
|
+
const A2 = assignDefault(call$1(angleBounds, state), {
|
|
9698
11098
|
min: -Infinity,
|
|
9699
11099
|
max: Infinity
|
|
9700
11100
|
});
|
|
9701
|
-
return [
|
|
11101
|
+
return [A2.min, A2.max];
|
|
9702
11102
|
};
|
|
9703
11103
|
if (typeof scaleBounds !== "function" && typeof angleBounds !== "function")
|
|
9704
11104
|
return [_scaleBounds(), _angleBounds()];
|
|
@@ -10051,7 +11451,7 @@ let timeouts = [];
|
|
|
10051
11451
|
raf.setTimeout = (handler, ms) => {
|
|
10052
11452
|
let time = raf.now() + ms;
|
|
10053
11453
|
let cancel = () => {
|
|
10054
|
-
let i = timeouts.findIndex((
|
|
11454
|
+
let i = timeouts.findIndex((t2) => t2.cancel == cancel);
|
|
10055
11455
|
if (~i)
|
|
10056
11456
|
timeouts.splice(i, 1);
|
|
10057
11457
|
pendingCount -= ~i ? 1 : 0;
|
|
@@ -10066,7 +11466,7 @@ raf.setTimeout = (handler, ms) => {
|
|
|
10066
11466
|
start();
|
|
10067
11467
|
return timeout;
|
|
10068
11468
|
};
|
|
10069
|
-
let findTimeout = (time) => ~(~timeouts.findIndex((
|
|
11469
|
+
let findTimeout = (time) => ~(~timeouts.findIndex((t2) => t2.time > time) || ~timeouts.length);
|
|
10070
11470
|
raf.cancel = (fn) => {
|
|
10071
11471
|
onStartQueue.delete(fn);
|
|
10072
11472
|
onFrameQueue.delete(fn);
|
|
@@ -10147,7 +11547,7 @@ function update() {
|
|
|
10147
11547
|
ts = raf.now();
|
|
10148
11548
|
let count = findTimeout(ts);
|
|
10149
11549
|
if (count) {
|
|
10150
|
-
eachSafely(timeouts.splice(0, count), (
|
|
11550
|
+
eachSafely(timeouts.splice(0, count), (t2) => t2.handler());
|
|
10151
11551
|
pendingCount -= count;
|
|
10152
11552
|
}
|
|
10153
11553
|
if (!pendingCount) {
|
|
@@ -10553,26 +11953,26 @@ function normalizeColor(color) {
|
|
|
10553
11953
|
}
|
|
10554
11954
|
return null;
|
|
10555
11955
|
}
|
|
10556
|
-
function hue2rgb(
|
|
10557
|
-
if (
|
|
10558
|
-
|
|
10559
|
-
if (
|
|
10560
|
-
|
|
10561
|
-
if (
|
|
10562
|
-
return
|
|
10563
|
-
if (
|
|
10564
|
-
return
|
|
10565
|
-
if (
|
|
10566
|
-
return
|
|
10567
|
-
return
|
|
11956
|
+
function hue2rgb(p2, q2, t2) {
|
|
11957
|
+
if (t2 < 0)
|
|
11958
|
+
t2 += 1;
|
|
11959
|
+
if (t2 > 1)
|
|
11960
|
+
t2 -= 1;
|
|
11961
|
+
if (t2 < 1 / 6)
|
|
11962
|
+
return p2 + (q2 - p2) * 6 * t2;
|
|
11963
|
+
if (t2 < 1 / 2)
|
|
11964
|
+
return q2;
|
|
11965
|
+
if (t2 < 2 / 3)
|
|
11966
|
+
return p2 + (q2 - p2) * (2 / 3 - t2) * 6;
|
|
11967
|
+
return p2;
|
|
10568
11968
|
}
|
|
10569
|
-
function hslToRgb(
|
|
10570
|
-
const
|
|
10571
|
-
const
|
|
10572
|
-
const r2 = hue2rgb(
|
|
10573
|
-
const
|
|
10574
|
-
const b2 = hue2rgb(
|
|
10575
|
-
return Math.round(r2 * 255) << 24 | Math.round(
|
|
11969
|
+
function hslToRgb(h2, s, l2) {
|
|
11970
|
+
const q2 = l2 < 0.5 ? l2 * (1 + s) : l2 + s - l2 * s;
|
|
11971
|
+
const p2 = 2 * l2 - q2;
|
|
11972
|
+
const r2 = hue2rgb(p2, q2, h2 + 1 / 3);
|
|
11973
|
+
const g2 = hue2rgb(p2, q2, h2);
|
|
11974
|
+
const b2 = hue2rgb(p2, q2, h2 - 1 / 3);
|
|
11975
|
+
return Math.round(r2 * 255) << 24 | Math.round(g2 * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
10576
11976
|
}
|
|
10577
11977
|
function parse255(str) {
|
|
10578
11978
|
const int = parseInt(str, 10);
|
|
@@ -10608,10 +12008,10 @@ function colorToRgba(input) {
|
|
|
10608
12008
|
return input;
|
|
10609
12009
|
int32Color = int32Color || 0;
|
|
10610
12010
|
let r2 = (int32Color & 4278190080) >>> 24;
|
|
10611
|
-
let
|
|
12011
|
+
let g2 = (int32Color & 16711680) >>> 16;
|
|
10612
12012
|
let b2 = (int32Color & 65280) >>> 8;
|
|
10613
12013
|
let a = (int32Color & 255) / 255;
|
|
10614
|
-
return `rgba(${r2}, ${
|
|
12014
|
+
return `rgba(${r2}, ${g2}, ${b2}, ${a})`;
|
|
10615
12015
|
}
|
|
10616
12016
|
const createInterpolator = (range, output, extrapolate) => {
|
|
10617
12017
|
if (is.fun(range)) {
|
|
@@ -10632,7 +12032,7 @@ const createInterpolator = (range, output, extrapolate) => {
|
|
|
10632
12032
|
const inputRange = config2.range || [0, 1];
|
|
10633
12033
|
const extrapolateLeft = config2.extrapolateLeft || config2.extrapolate || "extend";
|
|
10634
12034
|
const extrapolateRight = config2.extrapolateRight || config2.extrapolate || "extend";
|
|
10635
|
-
const easing = config2.easing || ((
|
|
12035
|
+
const easing = config2.easing || ((t2) => t2);
|
|
10636
12036
|
return (input) => {
|
|
10637
12037
|
const range2 = findRange(input, inputRange);
|
|
10638
12038
|
return interpolate(input, inputRange[range2], inputRange[range2 + 1], outputRange[range2], outputRange[range2 + 1], easing, extrapolateLeft, extrapolateRight, config2.map);
|
|
@@ -11363,51 +12763,51 @@ const c2 = c1 * 1.525;
|
|
|
11363
12763
|
const c3 = c1 + 1;
|
|
11364
12764
|
const c4 = 2 * Math.PI / 3;
|
|
11365
12765
|
const c5 = 2 * Math.PI / 4.5;
|
|
11366
|
-
const bounceOut = (
|
|
12766
|
+
const bounceOut = (x2) => {
|
|
11367
12767
|
const n1 = 7.5625;
|
|
11368
12768
|
const d1 = 2.75;
|
|
11369
|
-
if (
|
|
11370
|
-
return n1 *
|
|
11371
|
-
} else if (
|
|
11372
|
-
return n1 * (
|
|
11373
|
-
} else if (
|
|
11374
|
-
return n1 * (
|
|
12769
|
+
if (x2 < 1 / d1) {
|
|
12770
|
+
return n1 * x2 * x2;
|
|
12771
|
+
} else if (x2 < 2 / d1) {
|
|
12772
|
+
return n1 * (x2 -= 1.5 / d1) * x2 + 0.75;
|
|
12773
|
+
} else if (x2 < 2.5 / d1) {
|
|
12774
|
+
return n1 * (x2 -= 2.25 / d1) * x2 + 0.9375;
|
|
11375
12775
|
} else {
|
|
11376
|
-
return n1 * (
|
|
12776
|
+
return n1 * (x2 -= 2.625 / d1) * x2 + 0.984375;
|
|
11377
12777
|
}
|
|
11378
12778
|
};
|
|
11379
12779
|
const easings = {
|
|
11380
|
-
linear: (
|
|
11381
|
-
easeInQuad: (
|
|
11382
|
-
easeOutQuad: (
|
|
11383
|
-
easeInOutQuad: (
|
|
11384
|
-
easeInCubic: (
|
|
11385
|
-
easeOutCubic: (
|
|
11386
|
-
easeInOutCubic: (
|
|
11387
|
-
easeInQuart: (
|
|
11388
|
-
easeOutQuart: (
|
|
11389
|
-
easeInOutQuart: (
|
|
11390
|
-
easeInQuint: (
|
|
11391
|
-
easeOutQuint: (
|
|
11392
|
-
easeInOutQuint: (
|
|
11393
|
-
easeInSine: (
|
|
11394
|
-
easeOutSine: (
|
|
11395
|
-
easeInOutSine: (
|
|
11396
|
-
easeInExpo: (
|
|
11397
|
-
easeOutExpo: (
|
|
11398
|
-
easeInOutExpo: (
|
|
11399
|
-
easeInCirc: (
|
|
11400
|
-
easeOutCirc: (
|
|
11401
|
-
easeInOutCirc: (
|
|
11402
|
-
easeInBack: (
|
|
11403
|
-
easeOutBack: (
|
|
11404
|
-
easeInOutBack: (
|
|
11405
|
-
easeInElastic: (
|
|
11406
|
-
easeOutElastic: (
|
|
11407
|
-
easeInOutElastic: (
|
|
11408
|
-
easeInBounce: (
|
|
12780
|
+
linear: (x2) => x2,
|
|
12781
|
+
easeInQuad: (x2) => x2 * x2,
|
|
12782
|
+
easeOutQuad: (x2) => 1 - (1 - x2) * (1 - x2),
|
|
12783
|
+
easeInOutQuad: (x2) => x2 < 0.5 ? 2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 2) / 2,
|
|
12784
|
+
easeInCubic: (x2) => x2 * x2 * x2,
|
|
12785
|
+
easeOutCubic: (x2) => 1 - Math.pow(1 - x2, 3),
|
|
12786
|
+
easeInOutCubic: (x2) => x2 < 0.5 ? 4 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 3) / 2,
|
|
12787
|
+
easeInQuart: (x2) => x2 * x2 * x2 * x2,
|
|
12788
|
+
easeOutQuart: (x2) => 1 - Math.pow(1 - x2, 4),
|
|
12789
|
+
easeInOutQuart: (x2) => x2 < 0.5 ? 8 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 4) / 2,
|
|
12790
|
+
easeInQuint: (x2) => x2 * x2 * x2 * x2 * x2,
|
|
12791
|
+
easeOutQuint: (x2) => 1 - Math.pow(1 - x2, 5),
|
|
12792
|
+
easeInOutQuint: (x2) => x2 < 0.5 ? 16 * x2 * x2 * x2 * x2 * x2 : 1 - Math.pow(-2 * x2 + 2, 5) / 2,
|
|
12793
|
+
easeInSine: (x2) => 1 - Math.cos(x2 * Math.PI / 2),
|
|
12794
|
+
easeOutSine: (x2) => Math.sin(x2 * Math.PI / 2),
|
|
12795
|
+
easeInOutSine: (x2) => -(Math.cos(Math.PI * x2) - 1) / 2,
|
|
12796
|
+
easeInExpo: (x2) => x2 === 0 ? 0 : Math.pow(2, 10 * x2 - 10),
|
|
12797
|
+
easeOutExpo: (x2) => x2 === 1 ? 1 : 1 - Math.pow(2, -10 * x2),
|
|
12798
|
+
easeInOutExpo: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? Math.pow(2, 20 * x2 - 10) / 2 : (2 - Math.pow(2, -20 * x2 + 10)) / 2,
|
|
12799
|
+
easeInCirc: (x2) => 1 - Math.sqrt(1 - Math.pow(x2, 2)),
|
|
12800
|
+
easeOutCirc: (x2) => Math.sqrt(1 - Math.pow(x2 - 1, 2)),
|
|
12801
|
+
easeInOutCirc: (x2) => x2 < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x2, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x2 + 2, 2)) + 1) / 2,
|
|
12802
|
+
easeInBack: (x2) => c3 * x2 * x2 * x2 - c1 * x2 * x2,
|
|
12803
|
+
easeOutBack: (x2) => 1 + c3 * Math.pow(x2 - 1, 3) + c1 * Math.pow(x2 - 1, 2),
|
|
12804
|
+
easeInOutBack: (x2) => x2 < 0.5 ? Math.pow(2 * x2, 2) * ((c2 + 1) * 2 * x2 - c2) / 2 : (Math.pow(2 * x2 - 2, 2) * ((c2 + 1) * (x2 * 2 - 2) + c2) + 2) / 2,
|
|
12805
|
+
easeInElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : -Math.pow(2, 10 * x2 - 10) * Math.sin((x2 * 10 - 10.75) * c4),
|
|
12806
|
+
easeOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : Math.pow(2, -10 * x2) * Math.sin((x2 * 10 - 0.75) * c4) + 1,
|
|
12807
|
+
easeInOutElastic: (x2) => x2 === 0 ? 0 : x2 === 1 ? 1 : x2 < 0.5 ? -(Math.pow(2, 20 * x2 - 10) * Math.sin((20 * x2 - 11.125) * c5)) / 2 : Math.pow(2, -20 * x2 + 10) * Math.sin((20 * x2 - 11.125) * c5) / 2 + 1,
|
|
12808
|
+
easeInBounce: (x2) => 1 - bounceOut(1 - x2),
|
|
11409
12809
|
easeOutBounce: bounceOut,
|
|
11410
|
-
easeInOutBounce: (
|
|
12810
|
+
easeInOutBounce: (x2) => x2 < 0.5 ? (1 - bounceOut(1 - 2 * x2)) / 2 : (1 + bounceOut(2 * x2 - 1)) / 2
|
|
11411
12811
|
};
|
|
11412
12812
|
const defaults = _extends({}, config.default, {
|
|
11413
12813
|
mass: 1,
|
|
@@ -11674,7 +13074,7 @@ function runAsync(to2, props, state, target) {
|
|
|
11674
13074
|
})();
|
|
11675
13075
|
}
|
|
11676
13076
|
function stopAsync(state, cancelId) {
|
|
11677
|
-
flush(state.timeouts, (
|
|
13077
|
+
flush(state.timeouts, (t2) => t2.cancel());
|
|
11678
13078
|
state.pauseQueue.clear();
|
|
11679
13079
|
state.resumeQueue.clear();
|
|
11680
13080
|
state.asyncId = state.asyncTo = state.promise = void 0;
|
|
@@ -11845,7 +13245,7 @@ class SpringValue extends FrameValue {
|
|
|
11845
13245
|
let velocity;
|
|
11846
13246
|
const precision = config2.precision || (from == to2 ? 5e-3 : Math.min(1, Math.abs(to2 - from) * 1e-3));
|
|
11847
13247
|
if (!is.und(config2.duration)) {
|
|
11848
|
-
let
|
|
13248
|
+
let p2 = 1;
|
|
11849
13249
|
if (config2.duration > 0) {
|
|
11850
13250
|
if (this._memoizedDuration !== config2.duration) {
|
|
11851
13251
|
this._memoizedDuration = config2.duration;
|
|
@@ -11854,13 +13254,13 @@ class SpringValue extends FrameValue {
|
|
|
11854
13254
|
elapsed = node2.elapsedTime += dt;
|
|
11855
13255
|
}
|
|
11856
13256
|
}
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
node2.durationProgress =
|
|
13257
|
+
p2 = (config2.progress || 0) + elapsed / this._memoizedDuration;
|
|
13258
|
+
p2 = p2 > 1 ? 1 : p2 < 0 ? 0 : p2;
|
|
13259
|
+
node2.durationProgress = p2;
|
|
11860
13260
|
}
|
|
11861
|
-
position = from + config2.easing(
|
|
13261
|
+
position = from + config2.easing(p2) * (to2 - from);
|
|
11862
13262
|
velocity = (position - node2.lastPosition) / dt;
|
|
11863
|
-
finished =
|
|
13263
|
+
finished = p2 == 1;
|
|
11864
13264
|
} else if (config2.decay) {
|
|
11865
13265
|
const decay = config2.decay === true ? 0.998 : config2.decay;
|
|
11866
13266
|
const e2 = Math.exp(-(1 - decay) * elapsed);
|
|
@@ -11877,7 +13277,7 @@ class SpringValue extends FrameValue {
|
|
|
11877
13277
|
let isBouncing = false;
|
|
11878
13278
|
const step = 1;
|
|
11879
13279
|
const numSteps = Math.ceil(dt / step);
|
|
11880
|
-
for (let
|
|
13280
|
+
for (let n2 = 0; n2 < numSteps; ++n2) {
|
|
11881
13281
|
isMoving = Math.abs(velocity) > restVelocity;
|
|
11882
13282
|
if (!isMoving) {
|
|
11883
13283
|
finished = Math.abs(to2 - position) <= precision;
|
|
@@ -12723,7 +14123,7 @@ const SpringContext = (_ref) => {
|
|
|
12723
14123
|
let {
|
|
12724
14124
|
children
|
|
12725
14125
|
} = _ref, props = _objectWithoutPropertiesLoose$1(_ref, _excluded$3);
|
|
12726
|
-
const inherited = useContext(ctx);
|
|
14126
|
+
const inherited = useContext$1(ctx);
|
|
12727
14127
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
12728
14128
|
props = useMemoOne(() => ({
|
|
12729
14129
|
pause,
|
|
@@ -12858,9 +14258,9 @@ function useSprings(length, props, deps) {
|
|
|
12858
14258
|
}
|
|
12859
14259
|
}
|
|
12860
14260
|
const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));
|
|
12861
|
-
const
|
|
12862
|
-
const prevContext = usePrev(
|
|
12863
|
-
const hasContext =
|
|
14261
|
+
const context2 = useContext$1(SpringContext);
|
|
14262
|
+
const prevContext = usePrev(context2);
|
|
14263
|
+
const hasContext = context2 !== prevContext && hasProps(context2);
|
|
12864
14264
|
useIsomorphicLayoutEffect(() => {
|
|
12865
14265
|
layoutId.current++;
|
|
12866
14266
|
state.ctrls = ctrls.current;
|
|
@@ -12875,7 +14275,7 @@ function useSprings(length, props, deps) {
|
|
|
12875
14275
|
ref == null ? void 0 : ref.add(ctrl);
|
|
12876
14276
|
if (hasContext) {
|
|
12877
14277
|
ctrl.start({
|
|
12878
|
-
default:
|
|
14278
|
+
default: context2
|
|
12879
14279
|
});
|
|
12880
14280
|
}
|
|
12881
14281
|
const update2 = updates[i];
|
|
@@ -12892,7 +14292,7 @@ function useSprings(length, props, deps) {
|
|
|
12892
14292
|
useOnce(() => () => {
|
|
12893
14293
|
each(state.ctrls, (ctrl) => ctrl.stop(true));
|
|
12894
14294
|
});
|
|
12895
|
-
const values = springs.map((
|
|
14295
|
+
const values = springs.map((x2) => _extends({}, x2));
|
|
12896
14296
|
return ref ? [values, ref] : values;
|
|
12897
14297
|
}
|
|
12898
14298
|
function useSpring(props, deps) {
|
|
@@ -13047,7 +14447,7 @@ function applyAnimatedValues(instance, props) {
|
|
|
13047
14447
|
scrollLeft
|
|
13048
14448
|
} = _ref, attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
13049
14449
|
const values = Object.values(attributes);
|
|
13050
|
-
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (
|
|
14450
|
+
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n2) => "-" + n2.toLowerCase())));
|
|
13051
14451
|
if (children !== void 0) {
|
|
13052
14452
|
instance.textContent = children;
|
|
13053
14453
|
}
|
|
@@ -13125,19 +14525,19 @@ const domTransforms = /^(matrix|translate|scale|rotate|skew)/;
|
|
|
13125
14525
|
const pxTransforms = /^(translate)/;
|
|
13126
14526
|
const degTransforms = /^(rotate|skew)/;
|
|
13127
14527
|
const addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;
|
|
13128
|
-
const isValueIdentity = (value, id) => is.arr(value) ? value.every((
|
|
14528
|
+
const isValueIdentity = (value, id) => is.arr(value) ? value.every((v2) => isValueIdentity(v2, id)) : is.num(value) ? value === id : parseFloat(value) === id;
|
|
13129
14529
|
class AnimatedStyle extends AnimatedObject {
|
|
13130
14530
|
constructor(_ref) {
|
|
13131
14531
|
let {
|
|
13132
|
-
x,
|
|
13133
|
-
y,
|
|
13134
|
-
z
|
|
14532
|
+
x: x2,
|
|
14533
|
+
y: y2,
|
|
14534
|
+
z: z2
|
|
13135
14535
|
} = _ref, style = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
13136
14536
|
const inputs = [];
|
|
13137
14537
|
const transforms = [];
|
|
13138
|
-
if (
|
|
13139
|
-
inputs.push([
|
|
13140
|
-
transforms.push((xyz) => [`translate3d(${xyz.map((
|
|
14538
|
+
if (x2 || y2 || z2) {
|
|
14539
|
+
inputs.push([x2 || 0, y2 || 0, z2 || 0]);
|
|
14540
|
+
transforms.push((xyz) => [`translate3d(${xyz.map((v2) => addUnit(v2, "px")).join(",")})`, isValueIdentity(xyz, 0)]);
|
|
13141
14541
|
}
|
|
13142
14542
|
eachProp(style, (value, key) => {
|
|
13143
14543
|
if (key === "transform") {
|
|
@@ -13149,7 +14549,7 @@ class AnimatedStyle extends AnimatedObject {
|
|
|
13149
14549
|
return;
|
|
13150
14550
|
const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
|
|
13151
14551
|
inputs.push(toArray(value));
|
|
13152
|
-
transforms.push(key === "rotate3d" ? ([
|
|
14552
|
+
transforms.push(key === "rotate3d" ? ([x3, y3, z3, deg]) => [`rotate3d(${x3},${y3},${z3},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v2) => addUnit(v2, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
|
|
13153
14553
|
}
|
|
13154
14554
|
});
|
|
13155
14555
|
if (inputs.length) {
|
|
@@ -13173,8 +14573,8 @@ class FluidTransform extends FluidValue {
|
|
|
13173
14573
|
let identity2 = true;
|
|
13174
14574
|
each(this.inputs, (input, i) => {
|
|
13175
14575
|
const arg1 = getFluidValue(input[0]);
|
|
13176
|
-
const [
|
|
13177
|
-
transform += " " +
|
|
14576
|
+
const [t2, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));
|
|
14577
|
+
transform += " " + t2;
|
|
13178
14578
|
identity2 = identity2 && id;
|
|
13179
14579
|
});
|
|
13180
14580
|
return identity2 ? "none" : transform;
|
|
@@ -13279,16 +14679,16 @@ const defaultProps$x = {
|
|
|
13279
14679
|
onRefresh: () => {
|
|
13280
14680
|
}
|
|
13281
14681
|
};
|
|
13282
|
-
const PullToRefresh = (
|
|
14682
|
+
const PullToRefresh = (p2) => {
|
|
13283
14683
|
const { locale } = useConfig$1();
|
|
13284
14684
|
const props = {
|
|
13285
14685
|
...defaultProps$x,
|
|
13286
|
-
...
|
|
14686
|
+
...p2,
|
|
13287
14687
|
...{
|
|
13288
|
-
pullingText:
|
|
13289
|
-
canReleaseText:
|
|
13290
|
-
refreshingText:
|
|
13291
|
-
completeText:
|
|
14688
|
+
pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
|
|
14689
|
+
canReleaseText: p2.canReleaseText || locale.pullToRefresh.canReleaseText,
|
|
14690
|
+
refreshingText: p2.refreshingText || locale.pullToRefresh.refreshingText,
|
|
14691
|
+
completeText: p2.completeText || locale.pullToRefresh.completeText
|
|
13292
14692
|
}
|
|
13293
14693
|
};
|
|
13294
14694
|
const headHeight = props.headHeight;
|
|
@@ -13351,8 +14751,8 @@ const PullToRefresh = (p) => {
|
|
|
13351
14751
|
function getScrollTop(element) {
|
|
13352
14752
|
return "scrollTop" in element ? element.scrollTop : element.scrollY;
|
|
13353
14753
|
}
|
|
13354
|
-
const [,
|
|
13355
|
-
if (state.first &&
|
|
14754
|
+
const [, y2] = state.movement;
|
|
14755
|
+
if (state.first && y2 > 0) {
|
|
13356
14756
|
const target = state.event.target;
|
|
13357
14757
|
if (!target || !(target instanceof Element))
|
|
13358
14758
|
return;
|
|
@@ -13378,7 +14778,7 @@ const PullToRefresh = (p) => {
|
|
|
13378
14778
|
}
|
|
13379
14779
|
event.stopPropagation();
|
|
13380
14780
|
const height = Math.max(
|
|
13381
|
-
rubberbandIfOutOfBounds(
|
|
14781
|
+
rubberbandIfOutOfBounds(y2, 0, 0, headHeight * 5, 0.5),
|
|
13382
14782
|
0
|
|
13383
14783
|
);
|
|
13384
14784
|
api.start({ height });
|
|
@@ -13394,7 +14794,6 @@ const PullToRefresh = (p) => {
|
|
|
13394
14794
|
);
|
|
13395
14795
|
const renderStatusText = () => {
|
|
13396
14796
|
var _a;
|
|
13397
|
-
console.log(props);
|
|
13398
14797
|
if (props.renderText) {
|
|
13399
14798
|
return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
|
|
13400
14799
|
}
|
|
@@ -13533,12 +14932,12 @@ const CircleProgress = (props) => {
|
|
|
13533
14932
|
const offset = perimeter * Number(format(parseFloat(progress2.toFixed(1)))) / 100;
|
|
13534
14933
|
const isWise = props.clockwise ? 1 : 0;
|
|
13535
14934
|
const color = isObject(circleColor) ? `url(%23${refRandomId})` : transColor(circleColor);
|
|
13536
|
-
const
|
|
14935
|
+
const d2 = `M 50 50 m 0 -45 a 45 45 0 1 ${isWise} 0 90 a 45 45 0 1, ${isWise} 0 -90`;
|
|
13537
14936
|
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`;
|
|
13538
|
-
const path = `%3Cpath d='${
|
|
14937
|
+
const path = `%3Cpath d='${d2}' stroke-width='${strokeWidth}' stroke='${transColor(
|
|
13539
14938
|
props.pathColor
|
|
13540
14939
|
)}' fill='none'/%3E`;
|
|
13541
|
-
const path1 = `%3Cpath d='${
|
|
14940
|
+
const path1 = `%3Cpath d='${d2}' stroke-width='${strokeWidth}' stroke-dasharray='${offset},${perimeter}' stroke-linecap='round' stroke='${transColor(
|
|
13542
14941
|
color
|
|
13543
14942
|
)}' fill='none'/%3E`;
|
|
13544
14943
|
return {
|
|
@@ -13727,7 +15126,7 @@ const NoticeBar = (props) => {
|
|
|
13727
15126
|
}, Number(standTime) + 100 * speed);
|
|
13728
15127
|
SetTimer(timerCurr);
|
|
13729
15128
|
};
|
|
13730
|
-
const scroll = (
|
|
15129
|
+
const scroll = (n2, last) => {
|
|
13731
15130
|
SetAnimate(true);
|
|
13732
15131
|
setTimeout(() => {
|
|
13733
15132
|
let long = distance;
|
|
@@ -13739,7 +15138,7 @@ const NoticeBar = (props) => {
|
|
|
13739
15138
|
SetDistance(0);
|
|
13740
15139
|
SetAnimate(false);
|
|
13741
15140
|
}
|
|
13742
|
-
},
|
|
15141
|
+
}, n2 * speed);
|
|
13743
15142
|
};
|
|
13744
15143
|
const handleClickIcon = (event) => {
|
|
13745
15144
|
event.stopPropagation();
|
|
@@ -13854,7 +15253,7 @@ const NoticeBar = (props) => {
|
|
|
13854
15253
|
};
|
|
13855
15254
|
NoticeBar.defaultProps = defaultProps$v;
|
|
13856
15255
|
NoticeBar.displayName = "NutNoticeBar";
|
|
13857
|
-
const DataContext$1 = createContext({});
|
|
15256
|
+
const DataContext$1 = createContext$1({});
|
|
13858
15257
|
const defaultProps$u = {
|
|
13859
15258
|
current: 0,
|
|
13860
15259
|
direction: "horizontal",
|
|
@@ -13924,7 +15323,7 @@ const Step = (props) => {
|
|
|
13924
15323
|
...defaultProps$t,
|
|
13925
15324
|
...props
|
|
13926
15325
|
};
|
|
13927
|
-
const parent = useContext(DataContext$1);
|
|
15326
|
+
const parent = useContext$1(DataContext$1);
|
|
13928
15327
|
const dot = parent.propSteps.progressDot;
|
|
13929
15328
|
const getCurrentStatus = () => {
|
|
13930
15329
|
const index = activeIndex;
|
|
@@ -13985,7 +15384,7 @@ const Step = (props) => {
|
|
|
13985
15384
|
};
|
|
13986
15385
|
Step.defaultProps = defaultProps$t;
|
|
13987
15386
|
Step.displayName = "NutStep";
|
|
13988
|
-
const DataContext = createContext({});
|
|
15387
|
+
const DataContext = createContext$1({});
|
|
13989
15388
|
const defaultProps$s = {
|
|
13990
15389
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
13991
15390
|
height: 0,
|
|
@@ -14200,10 +15599,10 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
14200
15599
|
const range = (num, min, max) => {
|
|
14201
15600
|
return Math.min(Math.max(num, min), max);
|
|
14202
15601
|
};
|
|
14203
|
-
const getDirection2 = (
|
|
14204
|
-
if (
|
|
15602
|
+
const getDirection2 = (x2, y2) => {
|
|
15603
|
+
if (x2 > y2 && x2 > DISTANCE)
|
|
14205
15604
|
return "horizontal";
|
|
14206
|
-
if (
|
|
15605
|
+
if (y2 > x2 && y2 > DISTANCE)
|
|
14207
15606
|
return "vertical";
|
|
14208
15607
|
return "";
|
|
14209
15608
|
};
|
|
@@ -14433,7 +15832,7 @@ const defaultProps$r = {
|
|
|
14433
15832
|
const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
14434
15833
|
const _props = { ...defaultProps$r, ...props };
|
|
14435
15834
|
const { className, style, children, direction, size } = _props;
|
|
14436
|
-
const parent = useContext(DataContext);
|
|
15835
|
+
const parent = useContext$1(DataContext);
|
|
14437
15836
|
const b2 = cn("swiper-item");
|
|
14438
15837
|
const classes = classNames(b2(""), className);
|
|
14439
15838
|
const getStyle = () => {
|
|
@@ -14452,7 +15851,7 @@ const SwiperItem = React__default.forwardRef((props, ref) => {
|
|
|
14452
15851
|
});
|
|
14453
15852
|
SwiperItem.defaultProps = defaultProps$r;
|
|
14454
15853
|
SwiperItem.displayName = "NutSwiperItem";
|
|
14455
|
-
const AvatarContext = createContext({});
|
|
15854
|
+
const AvatarContext = createContext$1({});
|
|
14456
15855
|
const defaultProps$q = {
|
|
14457
15856
|
...ComponentDefaults,
|
|
14458
15857
|
size: "",
|
|
@@ -14491,7 +15890,7 @@ const Avatar = (props) => {
|
|
|
14491
15890
|
const [showMax, setShowMax] = useState(false);
|
|
14492
15891
|
const [avatarIndex, setAvatarIndex] = useState(1);
|
|
14493
15892
|
const avatarRef = useRef(null);
|
|
14494
|
-
const parent = useContext(AvatarContext);
|
|
15893
|
+
const parent = useContext$1(AvatarContext);
|
|
14495
15894
|
const b2 = cn("avatar");
|
|
14496
15895
|
const classes = classNames({
|
|
14497
15896
|
[`nut-avatar-${size || ((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || "normal"}`]: true,
|
|
@@ -14983,7 +16382,7 @@ const Popover = (props) => {
|
|
|
14983
16382
|
};
|
|
14984
16383
|
const filter = () => {
|
|
14985
16384
|
const ms = ["top", "bottom", "left", "right"];
|
|
14986
|
-
return ms.filter((
|
|
16385
|
+
return ms.filter((m2) => location.includes(m2))[0];
|
|
14987
16386
|
};
|
|
14988
16387
|
const popoverArrowSelf = () => {
|
|
14989
16388
|
const prefixCls = "popover-arrow";
|
|
@@ -15077,7 +16476,7 @@ const Skeleton = (props) => {
|
|
|
15077
16476
|
[`avatarClass--${avatarShape}`]: avatarShape
|
|
15078
16477
|
});
|
|
15079
16478
|
const repeatLines = (num) => {
|
|
15080
|
-
return Array.from({ length: num }, (
|
|
16479
|
+
return Array.from({ length: num }, (v2, i) => i);
|
|
15081
16480
|
};
|
|
15082
16481
|
const getStyle = () => {
|
|
15083
16482
|
if (avatarSize) {
|
|
@@ -15164,9 +16563,9 @@ const InternalCountDown = (props, ref) => {
|
|
|
15164
16563
|
const getTimeStamp = (timeStr) => {
|
|
15165
16564
|
if (!timeStr)
|
|
15166
16565
|
return Date.now();
|
|
15167
|
-
let
|
|
15168
|
-
|
|
15169
|
-
return new Date(
|
|
16566
|
+
let t2 = timeStr;
|
|
16567
|
+
t2 = t2 > 0 ? +t2 : t2.toString().replace(/-/g, "/");
|
|
16568
|
+
return new Date(t2).getTime();
|
|
15170
16569
|
};
|
|
15171
16570
|
const initTime = () => {
|
|
15172
16571
|
stateRef.current.handleEndTime = endTime;
|
|
@@ -15196,8 +16595,8 @@ const InternalCountDown = (props, ref) => {
|
|
|
15196
16595
|
}
|
|
15197
16596
|
});
|
|
15198
16597
|
};
|
|
15199
|
-
const formatRemainTime = (
|
|
15200
|
-
const ts2 =
|
|
16598
|
+
const formatRemainTime = (t2, type) => {
|
|
16599
|
+
const ts2 = t2;
|
|
15201
16600
|
const rest2 = {
|
|
15202
16601
|
d: 0,
|
|
15203
16602
|
h: 0,
|
|
@@ -15219,23 +16618,23 @@ const InternalCountDown = (props, ref) => {
|
|
|
15219
16618
|
return type === "custom" ? rest2 : parseFormat({ ...rest2 });
|
|
15220
16619
|
};
|
|
15221
16620
|
const parseFormat = (time2) => {
|
|
15222
|
-
const { d } = time2;
|
|
15223
|
-
let { h, m, s, ms } = time2;
|
|
16621
|
+
const { d: d2 } = time2;
|
|
16622
|
+
let { h: h2, m: m2, s, ms } = time2;
|
|
15224
16623
|
let formatCache = format;
|
|
15225
16624
|
if (formatCache.includes("DD")) {
|
|
15226
|
-
formatCache = formatCache.replace("DD", padZero(
|
|
16625
|
+
formatCache = formatCache.replace("DD", padZero(d2));
|
|
15227
16626
|
} else {
|
|
15228
|
-
|
|
16627
|
+
h2 += Number(d2) * 24;
|
|
15229
16628
|
}
|
|
15230
16629
|
if (formatCache.includes("HH")) {
|
|
15231
|
-
formatCache = formatCache.replace("HH", padZero(
|
|
16630
|
+
formatCache = formatCache.replace("HH", padZero(h2));
|
|
15232
16631
|
} else {
|
|
15233
|
-
|
|
16632
|
+
m2 += Number(h2) * 60;
|
|
15234
16633
|
}
|
|
15235
16634
|
if (formatCache.includes("mm")) {
|
|
15236
|
-
formatCache = formatCache.replace("mm", padZero(
|
|
16635
|
+
formatCache = formatCache.replace("mm", padZero(m2));
|
|
15237
16636
|
} else {
|
|
15238
|
-
s += Number(
|
|
16637
|
+
s += Number(m2) * 60;
|
|
15239
16638
|
}
|
|
15240
16639
|
if (formatCache.includes("ss")) {
|
|
15241
16640
|
formatCache = formatCache.replace("ss", padZero(s));
|
|
@@ -15575,7 +16974,7 @@ const CountUp = (props) => {
|
|
|
15575
16974
|
const b2 = cn("countup");
|
|
15576
16975
|
const countupRef = useRef(null);
|
|
15577
16976
|
const timerRef = useRef(0);
|
|
15578
|
-
const numbers = Array.from({ length: 10 }, (
|
|
16977
|
+
const numbers = Array.from({ length: 10 }, (v2, i) => i);
|
|
15579
16978
|
const getShowNumber = () => {
|
|
15580
16979
|
const splitArr = endNumber.split(".");
|
|
15581
16980
|
const intNumber = maxLen && splitArr[0].length < maxLen ? (Array(maxLen).join("0") + splitArr[0]).slice(-maxLen) : splitArr[0];
|
|
@@ -15818,16 +17217,16 @@ const updateItemSize = (positions, items, sizeKey) => {
|
|
|
15818
17217
|
if (sizeKey === "width") {
|
|
15819
17218
|
newPos[index].right -= dValue;
|
|
15820
17219
|
newPos[index][sizeKey] = nowSize;
|
|
15821
|
-
for (let
|
|
15822
|
-
newPos[
|
|
15823
|
-
newPos[
|
|
17220
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
17221
|
+
newPos[k2].left = positions[k2 - 1].right;
|
|
17222
|
+
newPos[k2].right -= dValue;
|
|
15824
17223
|
}
|
|
15825
17224
|
} else if (sizeKey === "height") {
|
|
15826
17225
|
newPos[index].bottom -= dValue;
|
|
15827
17226
|
newPos[index][sizeKey] = nowSize;
|
|
15828
|
-
for (let
|
|
15829
|
-
newPos[
|
|
15830
|
-
newPos[
|
|
17227
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
17228
|
+
newPos[k2].top = positions[k2 - 1].bottom;
|
|
17229
|
+
newPos[k2].bottom -= dValue;
|
|
15831
17230
|
}
|
|
15832
17231
|
}
|
|
15833
17232
|
}
|
|
@@ -17653,4 +19052,4 @@ const TimeSelect = (props) => {
|
|
|
17653
19052
|
};
|
|
17654
19053
|
TimeSelect.defaultProps = defaultProps;
|
|
17655
19054
|
TimeSelect.displayName = "NutTimeSelect";
|
|
17656
|
-
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, Grid, GridItem, Icon$1 as Icon, 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, Uploader, Video, VirtualList };
|
|
19055
|
+
export { ActionSheet, Address, AnimatingNumbers, Audio, Avatar, AvatarGroup, BackTop, Badge, Barrage, Button, Calendar, CalendarItem, Card, Cascader, Cell$1 as 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, 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, Uploader, Video, VirtualList };
|