@nutui/nutui-react-taro 1.3.4 → 1.3.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/esm/Address.js +3 -4
- package/dist/esm/AnimatingNumbers.js +2 -2
- package/dist/esm/Audio.js +4 -4
- package/dist/esm/Cascader/style/index.js +2 -1
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Dialog.js +2 -4
- package/dist/esm/ImagePreview/style/index.js +3 -1
- package/dist/esm/ImagePreview.js +3 -4
- package/dist/esm/Infiniteloading.js +2 -2
- package/dist/esm/Notify.js +2 -3
- package/dist/esm/Range.js +3 -3
- package/dist/esm/Rate.js +2 -2
- package/dist/esm/Swiper/style/index.js +1 -1
- package/dist/esm/Swiper.js +2 -2
- package/dist/esm/Toast.js +2 -2
- package/dist/esm/{address.taro-7540c626.js → address.taro-f16cef31.js} +76 -373
- package/dist/esm/{animatingnumbers.taro-877baa98.js → animatingnumbers.taro-6f40a2e9.js} +41 -25
- package/dist/esm/{audio.taro-ab2528b2.js → audio.taro-29f5568f.js} +1 -1
- package/dist/esm/{cascader.taro-35387092.js → cascader.taro-77100fb4.js} +54 -48
- package/dist/esm/dialog.taro-492e2b9a.js +218 -0
- package/dist/esm/{imagepreview.taro-3f1c7638.js → imagepreview.taro-1199e977.js} +3 -11
- package/dist/esm/{infiniteloading.taro-9701755f.js → infiniteloading.taro-b95e62bf.js} +1 -3
- package/dist/esm/notify.taro-d9c48fae.js +122 -0
- package/dist/esm/nutui-react.es.js +12 -12
- package/dist/esm/{range.taro-141a0163.js → range.taro-515d37a4.js} +1 -1
- package/dist/esm/{rate.taro-5077b962.js → rate.taro-69c85081.js} +4 -2
- package/dist/esm/{swiper.taro-58ed323b.js → swiper.taro-f314d67a.js} +4 -2
- package/dist/esm/{toast.taro-cd22a0d7.js → toast.taro-86862dff.js} +1 -1
- package/dist/esm/types/src/packages/address/customRender.taro.d.ts +15 -0
- package/dist/esm/types/src/packages/cascader/cascader.d.ts +1 -0
- package/dist/esm/types/src/packages/cascader/cascader.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/notify/index.taro.d.ts +1 -1
- package/dist/esm/types/src/packages/notify/notify.taro.d.ts +9 -15
- 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 +582 -1232
- package/dist/nutui.react.umd.js +577 -1227
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/types/index.d.ts +169 -174
- package/package.json +1 -1
- package/dist/esm/dialog.taro-54c67e08.js +0 -554
- package/dist/esm/notify.taro-0d9cfb07.js +0 -300
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react-taro v1.3.
|
|
2
|
+
* @nutui/nutui-react-taro v1.3.5-beta.1 Wed Sep 28 2022 14:33:38 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
var React__namespace = /* @__PURE__ */ _interopNamespace(React);
|
|
35
35
|
var Taro__default = /* @__PURE__ */ _interopDefaultLegacy(Taro);
|
|
36
36
|
var ReactDOM__default = /* @__PURE__ */ _interopDefaultLegacy(ReactDOM);
|
|
37
|
-
var ReactDOM__namespace = /* @__PURE__ */ _interopNamespace(ReactDOM);
|
|
38
37
|
function getAugmentedNamespace(n2) {
|
|
39
38
|
if (n2.__esModule)
|
|
40
39
|
return n2;
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
classname.exports = classname_production_min;
|
|
89
88
|
}
|
|
90
89
|
const cn = classname.exports.withNaming({ n: "nut-", e: "__", m: "--", v: "-" });
|
|
91
|
-
const defaultProps$
|
|
90
|
+
const defaultProps$1o = {
|
|
92
91
|
name: "",
|
|
93
92
|
size: "",
|
|
94
93
|
classPrefix: "nut-icon",
|
|
@@ -116,7 +115,7 @@
|
|
|
116
115
|
onClick,
|
|
117
116
|
...rest
|
|
118
117
|
} = {
|
|
119
|
-
...defaultProps$
|
|
118
|
+
...defaultProps$1o,
|
|
120
119
|
...props
|
|
121
120
|
};
|
|
122
121
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -150,13 +149,13 @@
|
|
|
150
149
|
children
|
|
151
150
|
);
|
|
152
151
|
}
|
|
153
|
-
Icon$1.defaultProps = defaultProps$
|
|
152
|
+
Icon$1.defaultProps = defaultProps$1o;
|
|
154
153
|
Icon$1.displayName = "NutIcon";
|
|
155
154
|
const ComponentDefaults = {
|
|
156
155
|
iconClassPrefix: "nut-icon",
|
|
157
156
|
iconFontClassName: "nutui-iconfont"
|
|
158
157
|
};
|
|
159
|
-
const defaultProps$
|
|
158
|
+
const defaultProps$1n = {
|
|
160
159
|
...ComponentDefaults,
|
|
161
160
|
className: "",
|
|
162
161
|
color: "",
|
|
@@ -173,7 +172,7 @@
|
|
|
173
172
|
onClick: (e2) => {
|
|
174
173
|
}
|
|
175
174
|
};
|
|
176
|
-
const Button
|
|
175
|
+
const Button = (props) => {
|
|
177
176
|
const {
|
|
178
177
|
color,
|
|
179
178
|
shape,
|
|
@@ -192,7 +191,7 @@
|
|
|
192
191
|
iconFontClassName,
|
|
193
192
|
...rest
|
|
194
193
|
} = {
|
|
195
|
-
...defaultProps$
|
|
194
|
+
...defaultProps$1n,
|
|
196
195
|
...props
|
|
197
196
|
};
|
|
198
197
|
const getStyle = React.useCallback(() => {
|
|
@@ -269,8 +268,8 @@
|
|
|
269
268
|
name: icon
|
|
270
269
|
}) : "", children));
|
|
271
270
|
};
|
|
272
|
-
Button
|
|
273
|
-
Button
|
|
271
|
+
Button.defaultProps = defaultProps$1n;
|
|
272
|
+
Button.displayName = "NutButton";
|
|
274
273
|
function _setPrototypeOf(o, p2) {
|
|
275
274
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o2, p3) {
|
|
276
275
|
o2.__proto__ = p3;
|
|
@@ -731,7 +730,7 @@
|
|
|
731
730
|
}
|
|
732
731
|
}
|
|
733
732
|
};
|
|
734
|
-
_proto.render = function
|
|
733
|
+
_proto.render = function render() {
|
|
735
734
|
return this.props.children;
|
|
736
735
|
};
|
|
737
736
|
return Provider2;
|
|
@@ -779,7 +778,7 @@
|
|
|
779
778
|
return defaultValue;
|
|
780
779
|
}
|
|
781
780
|
};
|
|
782
|
-
_proto2.render = function
|
|
781
|
+
_proto2.render = function render() {
|
|
783
782
|
return onlyChild(this.props.children)(this.state.value);
|
|
784
783
|
};
|
|
785
784
|
return Consumer2;
|
|
@@ -805,12 +804,12 @@
|
|
|
805
804
|
"(\\\\.)",
|
|
806
805
|
"([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"
|
|
807
806
|
].join("|"), "g");
|
|
808
|
-
function parse$1(str,
|
|
807
|
+
function parse$1(str, options) {
|
|
809
808
|
var tokens = [];
|
|
810
809
|
var key = 0;
|
|
811
810
|
var index2 = 0;
|
|
812
811
|
var path = "";
|
|
813
|
-
var defaultDelimiter =
|
|
812
|
+
var defaultDelimiter = options && options.delimiter || "/";
|
|
814
813
|
var res;
|
|
815
814
|
while ((res = PATH_REGEXP.exec(str)) != null) {
|
|
816
815
|
var m2 = res[0];
|
|
@@ -857,8 +856,8 @@
|
|
|
857
856
|
}
|
|
858
857
|
return tokens;
|
|
859
858
|
}
|
|
860
|
-
function compile(str,
|
|
861
|
-
return tokensToFunction(parse$1(str,
|
|
859
|
+
function compile(str, options) {
|
|
860
|
+
return tokensToFunction(parse$1(str, options), options);
|
|
862
861
|
}
|
|
863
862
|
function encodeURIComponentPretty(str) {
|
|
864
863
|
return encodeURI(str).replace(/[\/?#]/g, function(c6) {
|
|
@@ -870,18 +869,18 @@
|
|
|
870
869
|
return "%" + c6.charCodeAt(0).toString(16).toUpperCase();
|
|
871
870
|
});
|
|
872
871
|
}
|
|
873
|
-
function tokensToFunction(tokens,
|
|
872
|
+
function tokensToFunction(tokens, options) {
|
|
874
873
|
var matches = new Array(tokens.length);
|
|
875
874
|
for (var i = 0; i < tokens.length; i++) {
|
|
876
875
|
if (typeof tokens[i] === "object") {
|
|
877
|
-
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(
|
|
876
|
+
matches[i] = new RegExp("^(?:" + tokens[i].pattern + ")$", flags(options));
|
|
878
877
|
}
|
|
879
878
|
}
|
|
880
879
|
return function(obj, opts) {
|
|
881
880
|
var path = "";
|
|
882
881
|
var data = obj || {};
|
|
883
|
-
var
|
|
884
|
-
var encode =
|
|
882
|
+
var options2 = opts || {};
|
|
883
|
+
var encode = options2.pretty ? encodeURIComponentPretty : encodeURIComponent;
|
|
885
884
|
for (var i2 = 0; i2 < tokens.length; i2++) {
|
|
886
885
|
var token = tokens[i2];
|
|
887
886
|
if (typeof token === "string") {
|
|
@@ -939,8 +938,8 @@
|
|
|
939
938
|
re.keys = keys;
|
|
940
939
|
return re;
|
|
941
940
|
}
|
|
942
|
-
function flags(
|
|
943
|
-
return
|
|
941
|
+
function flags(options) {
|
|
942
|
+
return options && options.sensitive ? "" : "i";
|
|
944
943
|
}
|
|
945
944
|
function regexpToRegexp(path, keys) {
|
|
946
945
|
var groups = path.source.match(/\((?!\?)/g);
|
|
@@ -960,25 +959,25 @@
|
|
|
960
959
|
}
|
|
961
960
|
return attachKeys(path, keys);
|
|
962
961
|
}
|
|
963
|
-
function arrayToRegexp(path, keys,
|
|
962
|
+
function arrayToRegexp(path, keys, options) {
|
|
964
963
|
var parts = [];
|
|
965
964
|
for (var i = 0; i < path.length; i++) {
|
|
966
|
-
parts.push(pathToRegexp(path[i], keys,
|
|
965
|
+
parts.push(pathToRegexp(path[i], keys, options).source);
|
|
967
966
|
}
|
|
968
|
-
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(
|
|
967
|
+
var regexp = new RegExp("(?:" + parts.join("|") + ")", flags(options));
|
|
969
968
|
return attachKeys(regexp, keys);
|
|
970
969
|
}
|
|
971
|
-
function stringToRegexp(path, keys,
|
|
972
|
-
return tokensToRegExp(parse$1(path,
|
|
970
|
+
function stringToRegexp(path, keys, options) {
|
|
971
|
+
return tokensToRegExp(parse$1(path, options), keys, options);
|
|
973
972
|
}
|
|
974
|
-
function tokensToRegExp(tokens, keys,
|
|
973
|
+
function tokensToRegExp(tokens, keys, options) {
|
|
975
974
|
if (!isarray(keys)) {
|
|
976
|
-
|
|
975
|
+
options = keys || options;
|
|
977
976
|
keys = [];
|
|
978
977
|
}
|
|
979
|
-
|
|
980
|
-
var strict =
|
|
981
|
-
var end =
|
|
978
|
+
options = options || {};
|
|
979
|
+
var strict = options.strict;
|
|
980
|
+
var end = options.end !== false;
|
|
982
981
|
var route = "";
|
|
983
982
|
for (var i = 0; i < tokens.length; i++) {
|
|
984
983
|
var token = tokens[i];
|
|
@@ -1003,7 +1002,7 @@
|
|
|
1003
1002
|
route += capture;
|
|
1004
1003
|
}
|
|
1005
1004
|
}
|
|
1006
|
-
var delimiter = escapeString(
|
|
1005
|
+
var delimiter = escapeString(options.delimiter || "/");
|
|
1007
1006
|
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter;
|
|
1008
1007
|
if (!strict) {
|
|
1009
1008
|
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + "(?:" + delimiter + "(?=$))?";
|
|
@@ -1013,21 +1012,21 @@
|
|
|
1013
1012
|
} else {
|
|
1014
1013
|
route += strict && endsWithDelimiter ? "" : "(?=" + delimiter + "|$)";
|
|
1015
1014
|
}
|
|
1016
|
-
return attachKeys(new RegExp("^" + route, flags(
|
|
1015
|
+
return attachKeys(new RegExp("^" + route, flags(options)), keys);
|
|
1017
1016
|
}
|
|
1018
|
-
function pathToRegexp(path, keys,
|
|
1017
|
+
function pathToRegexp(path, keys, options) {
|
|
1019
1018
|
if (!isarray(keys)) {
|
|
1020
|
-
|
|
1019
|
+
options = keys || options;
|
|
1021
1020
|
keys = [];
|
|
1022
1021
|
}
|
|
1023
|
-
|
|
1022
|
+
options = options || {};
|
|
1024
1023
|
if (path instanceof RegExp) {
|
|
1025
1024
|
return regexpToRegexp(path, keys);
|
|
1026
1025
|
}
|
|
1027
1026
|
if (isarray(path)) {
|
|
1028
|
-
return arrayToRegexp(path, keys,
|
|
1027
|
+
return arrayToRegexp(path, keys, options);
|
|
1029
1028
|
}
|
|
1030
|
-
return stringToRegexp(path, keys,
|
|
1029
|
+
return stringToRegexp(path, keys, options);
|
|
1031
1030
|
}
|
|
1032
1031
|
var pathToRegexp$1 = pathToRegexp$2.exports;
|
|
1033
1032
|
var reactIs$1 = { exports: {} };
|
|
@@ -1225,7 +1224,7 @@
|
|
|
1225
1224
|
this._pendingLocation = null;
|
|
1226
1225
|
}
|
|
1227
1226
|
};
|
|
1228
|
-
_proto.render = function
|
|
1227
|
+
_proto.render = function render() {
|
|
1229
1228
|
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
1230
1229
|
value: {
|
|
1231
1230
|
history: this.props.history,
|
|
@@ -1252,7 +1251,7 @@
|
|
|
1252
1251
|
return _this;
|
|
1253
1252
|
}
|
|
1254
1253
|
var _proto = MemoryRouter.prototype;
|
|
1255
|
-
_proto.render = function
|
|
1254
|
+
_proto.render = function render() {
|
|
1256
1255
|
return /* @__PURE__ */ React__default["default"].createElement(Router, {
|
|
1257
1256
|
history: this.history,
|
|
1258
1257
|
children: this.props.children
|
|
@@ -1278,7 +1277,7 @@
|
|
|
1278
1277
|
if (this.props.onUnmount)
|
|
1279
1278
|
this.props.onUnmount.call(this, this);
|
|
1280
1279
|
};
|
|
1281
|
-
_proto.render = function
|
|
1280
|
+
_proto.render = function render() {
|
|
1282
1281
|
return null;
|
|
1283
1282
|
};
|
|
1284
1283
|
return Lifecycle;
|
|
@@ -1286,13 +1285,13 @@
|
|
|
1286
1285
|
var cache$1 = {};
|
|
1287
1286
|
var cacheLimit$1 = 1e4;
|
|
1288
1287
|
var cacheCount$1 = 0;
|
|
1289
|
-
function compilePath$1(path,
|
|
1290
|
-
var cacheKey2 = "" +
|
|
1288
|
+
function compilePath$1(path, options) {
|
|
1289
|
+
var cacheKey2 = "" + options.end + options.strict + options.sensitive;
|
|
1291
1290
|
var pathCache = cache$1[cacheKey2] || (cache$1[cacheKey2] = {});
|
|
1292
1291
|
if (pathCache[path])
|
|
1293
1292
|
return pathCache[path];
|
|
1294
1293
|
var keys = [];
|
|
1295
|
-
var regexp = pathToRegexp$1(path, keys,
|
|
1294
|
+
var regexp = pathToRegexp$1(path, keys, options);
|
|
1296
1295
|
var result = {
|
|
1297
1296
|
regexp,
|
|
1298
1297
|
keys
|
|
@@ -1303,16 +1302,16 @@
|
|
|
1303
1302
|
}
|
|
1304
1303
|
return result;
|
|
1305
1304
|
}
|
|
1306
|
-
function matchPath(pathname,
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1305
|
+
function matchPath(pathname, options) {
|
|
1306
|
+
if (options === void 0) {
|
|
1307
|
+
options = {};
|
|
1309
1308
|
}
|
|
1310
|
-
if (typeof
|
|
1311
|
-
|
|
1312
|
-
path:
|
|
1309
|
+
if (typeof options === "string" || Array.isArray(options)) {
|
|
1310
|
+
options = {
|
|
1311
|
+
path: options
|
|
1313
1312
|
};
|
|
1314
1313
|
}
|
|
1315
|
-
var _options =
|
|
1314
|
+
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;
|
|
1316
1315
|
var paths = [].concat(path);
|
|
1317
1316
|
return paths.reduce(function(matched, path2) {
|
|
1318
1317
|
if (!path2 && path2 !== "")
|
|
@@ -1351,7 +1350,7 @@
|
|
|
1351
1350
|
return _React$Component.apply(this, arguments) || this;
|
|
1352
1351
|
}
|
|
1353
1352
|
var _proto = Route.prototype;
|
|
1354
|
-
_proto.render = function
|
|
1353
|
+
_proto.render = function render() {
|
|
1355
1354
|
var _this = this;
|
|
1356
1355
|
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context$1) {
|
|
1357
1356
|
!context$1 ? invariant(false) : void 0;
|
|
@@ -1361,13 +1360,13 @@
|
|
|
1361
1360
|
location,
|
|
1362
1361
|
match
|
|
1363
1362
|
});
|
|
1364
|
-
var _this$props = _this.props, children = _this$props.children, component = _this$props.component,
|
|
1363
|
+
var _this$props = _this.props, children = _this$props.children, component = _this$props.component, render2 = _this$props.render;
|
|
1365
1364
|
if (Array.isArray(children) && isEmptyChildren(children)) {
|
|
1366
1365
|
children = null;
|
|
1367
1366
|
}
|
|
1368
1367
|
return /* @__PURE__ */ React__default["default"].createElement(context.Provider, {
|
|
1369
1368
|
value: props
|
|
1370
|
-
}, props.match ? children ? typeof children === "function" ? children(props) : children : component ? /* @__PURE__ */ React__default["default"].createElement(component, props) :
|
|
1369
|
+
}, props.match ? children ? typeof children === "function" ? children(props) : children : component ? /* @__PURE__ */ React__default["default"].createElement(component, props) : render2 ? render2(props) : null : typeof children === "function" ? children(props) : null);
|
|
1371
1370
|
});
|
|
1372
1371
|
};
|
|
1373
1372
|
return Route;
|
|
@@ -1431,7 +1430,7 @@
|
|
|
1431
1430
|
context2.location = addBasename(basename, createLocation(location));
|
|
1432
1431
|
context2.url = createURL(context2.location);
|
|
1433
1432
|
};
|
|
1434
|
-
_proto.render = function
|
|
1433
|
+
_proto.render = function render() {
|
|
1435
1434
|
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"]);
|
|
1436
1435
|
var history = {
|
|
1437
1436
|
createHref: function createHref(path) {
|
|
@@ -1460,7 +1459,7 @@
|
|
|
1460
1459
|
return _React$Component.apply(this, arguments) || this;
|
|
1461
1460
|
}
|
|
1462
1461
|
var _proto = Switch2.prototype;
|
|
1463
|
-
_proto.render = function
|
|
1462
|
+
_proto.render = function render() {
|
|
1464
1463
|
var _this = this;
|
|
1465
1464
|
return /* @__PURE__ */ React__default["default"].createElement(context.Consumer, null, function(context2) {
|
|
1466
1465
|
!context2 ? invariant(false) : void 0;
|
|
@@ -1487,7 +1486,7 @@
|
|
|
1487
1486
|
function useHistory() {
|
|
1488
1487
|
return useContext(historyContext);
|
|
1489
1488
|
}
|
|
1490
|
-
const defaultProps$
|
|
1489
|
+
const defaultProps$1m = {
|
|
1491
1490
|
...ComponentDefaults,
|
|
1492
1491
|
title: null,
|
|
1493
1492
|
subTitle: null,
|
|
@@ -1530,7 +1529,7 @@
|
|
|
1530
1529
|
iconFontClassName,
|
|
1531
1530
|
...rest
|
|
1532
1531
|
} = {
|
|
1533
|
-
...defaultProps$
|
|
1532
|
+
...defaultProps$1m,
|
|
1534
1533
|
...props
|
|
1535
1534
|
};
|
|
1536
1535
|
const b2 = cn("cell");
|
|
@@ -1587,9 +1586,9 @@
|
|
|
1587
1586
|
className: b2("link")
|
|
1588
1587
|
}) : linkSlot));
|
|
1589
1588
|
};
|
|
1590
|
-
Cell.defaultProps = defaultProps$
|
|
1589
|
+
Cell.defaultProps = defaultProps$1m;
|
|
1591
1590
|
Cell.displayName = "NutCell";
|
|
1592
|
-
const defaultProps$
|
|
1591
|
+
const defaultProps$1l = {
|
|
1593
1592
|
title: "",
|
|
1594
1593
|
desc: "",
|
|
1595
1594
|
titleSlot: null,
|
|
@@ -1598,7 +1597,7 @@
|
|
|
1598
1597
|
};
|
|
1599
1598
|
const CellGroup = (props) => {
|
|
1600
1599
|
const { children, classPrefix, title, desc, titleSlot, descSlot } = {
|
|
1601
|
-
...defaultProps$
|
|
1600
|
+
...defaultProps$1l,
|
|
1602
1601
|
...props
|
|
1603
1602
|
};
|
|
1604
1603
|
const b2 = cn("cell-group");
|
|
@@ -1612,7 +1611,7 @@
|
|
|
1612
1611
|
className: b2("wrap")
|
|
1613
1612
|
}, children));
|
|
1614
1613
|
};
|
|
1615
|
-
CellGroup.defaultProps = defaultProps$
|
|
1614
|
+
CellGroup.defaultProps = defaultProps$1l;
|
|
1616
1615
|
CellGroup.displayName = "NutCellGroup";
|
|
1617
1616
|
var classnames = { exports: {} };
|
|
1618
1617
|
/*!
|
|
@@ -1974,7 +1973,7 @@
|
|
|
1974
1973
|
setTimeout(this.nextCallback, timeout);
|
|
1975
1974
|
}
|
|
1976
1975
|
};
|
|
1977
|
-
_proto.render = function
|
|
1976
|
+
_proto.render = function render() {
|
|
1978
1977
|
var status = this.state.status;
|
|
1979
1978
|
if (status === UNMOUNTED) {
|
|
1980
1979
|
return null;
|
|
@@ -2145,7 +2144,7 @@
|
|
|
2145
2144
|
removeClass(node, doneClassName);
|
|
2146
2145
|
}
|
|
2147
2146
|
};
|
|
2148
|
-
_proto.render = function
|
|
2147
|
+
_proto.render = function render() {
|
|
2149
2148
|
var _this$props = this.props;
|
|
2150
2149
|
_this$props.classNames;
|
|
2151
2150
|
var props = _objectWithoutPropertiesLoose$3(_this$props, ["classNames"]);
|
|
@@ -2165,7 +2164,7 @@
|
|
|
2165
2164
|
};
|
|
2166
2165
|
CSSTransition.propTypes = {};
|
|
2167
2166
|
var CSSTransition$1 = CSSTransition;
|
|
2168
|
-
const defaultProps$
|
|
2167
|
+
const defaultProps$1k = {
|
|
2169
2168
|
...ComponentDefaults,
|
|
2170
2169
|
position: "center",
|
|
2171
2170
|
transition: "",
|
|
@@ -2351,7 +2350,7 @@
|
|
|
2351
2350
|
}, [position]);
|
|
2352
2351
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, renderToContainer(teleport, renderNode()));
|
|
2353
2352
|
};
|
|
2354
|
-
Popup.defaultProps = defaultProps$
|
|
2353
|
+
Popup.defaultProps = defaultProps$1k;
|
|
2355
2354
|
Popup.displayName = "NutPopup";
|
|
2356
2355
|
const zhCN = {
|
|
2357
2356
|
save: "\u4FDD\u5B58",
|
|
@@ -2478,7 +2477,7 @@
|
|
|
2478
2477
|
completeText: "\u5237\u65B0\u6210\u529F"
|
|
2479
2478
|
}
|
|
2480
2479
|
};
|
|
2481
|
-
const defaultProps$
|
|
2480
|
+
const defaultProps$1j = {
|
|
2482
2481
|
locale: zhCN
|
|
2483
2482
|
};
|
|
2484
2483
|
const defaultConfigRef$1 = {
|
|
@@ -2495,7 +2494,7 @@
|
|
|
2495
2494
|
};
|
|
2496
2495
|
const ConfigContext$1 = React.createContext(null);
|
|
2497
2496
|
const ConfigProvider = (props) => {
|
|
2498
|
-
const { children, ...config2 } = { ...defaultProps$
|
|
2497
|
+
const { children, ...config2 } = { ...defaultProps$1j, ...props };
|
|
2499
2498
|
const parentConfig = useConfig$1();
|
|
2500
2499
|
return /* @__PURE__ */ React__default["default"].createElement(ConfigContext$1.Provider, {
|
|
2501
2500
|
value: {
|
|
@@ -2504,25 +2503,25 @@
|
|
|
2504
2503
|
}
|
|
2505
2504
|
}, children);
|
|
2506
2505
|
};
|
|
2507
|
-
ConfigProvider.defaultProps = defaultProps$
|
|
2506
|
+
ConfigProvider.defaultProps = defaultProps$1j;
|
|
2508
2507
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
2509
|
-
const defaultProps$
|
|
2508
|
+
const defaultProps$1i = {};
|
|
2510
2509
|
const Layout = (props) => {
|
|
2511
|
-
({ ...defaultProps$
|
|
2510
|
+
({ ...defaultProps$1i, ...props });
|
|
2512
2511
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2513
2512
|
className: "nut-layout"
|
|
2514
2513
|
}, "Layout");
|
|
2515
2514
|
};
|
|
2516
|
-
Layout.defaultProps = defaultProps$
|
|
2515
|
+
Layout.defaultProps = defaultProps$1i;
|
|
2517
2516
|
Layout.displayName = "NutLayout";
|
|
2518
2517
|
const DataContext$2 = React.createContext({});
|
|
2519
|
-
const defaultProps$
|
|
2518
|
+
const defaultProps$1h = {
|
|
2520
2519
|
span: "24",
|
|
2521
2520
|
offset: "0",
|
|
2522
2521
|
gutter: "0"
|
|
2523
2522
|
};
|
|
2524
2523
|
const Col = (props) => {
|
|
2525
|
-
const { span, offset, children, onClick } = { ...defaultProps$
|
|
2524
|
+
const { span, offset, children, onClick } = { ...defaultProps$1h, ...props };
|
|
2526
2525
|
const [colName, setColName] = React.useState("");
|
|
2527
2526
|
const [colStyle, setColStyle] = React.useState({});
|
|
2528
2527
|
const { gutter } = React.useContext(DataContext$2);
|
|
@@ -2548,9 +2547,9 @@
|
|
|
2548
2547
|
}
|
|
2549
2548
|
}, children);
|
|
2550
2549
|
};
|
|
2551
|
-
Col.defaultProps = defaultProps$
|
|
2550
|
+
Col.defaultProps = defaultProps$1h;
|
|
2552
2551
|
Col.displayName = "NutCol";
|
|
2553
|
-
const defaultProps$
|
|
2552
|
+
const defaultProps$1g = {
|
|
2554
2553
|
type: "",
|
|
2555
2554
|
justify: "start",
|
|
2556
2555
|
align: "flex-start",
|
|
@@ -2559,7 +2558,7 @@
|
|
|
2559
2558
|
};
|
|
2560
2559
|
const Row = (props) => {
|
|
2561
2560
|
const { children, type, justify, align, wrap, gutter, onClick } = {
|
|
2562
|
-
...defaultProps$
|
|
2561
|
+
...defaultProps$1g,
|
|
2563
2562
|
...props
|
|
2564
2563
|
};
|
|
2565
2564
|
const prefixCls = "nut-row";
|
|
@@ -2593,9 +2592,9 @@
|
|
|
2593
2592
|
children
|
|
2594
2593
|
));
|
|
2595
2594
|
};
|
|
2596
|
-
Row.defaultProps = defaultProps$
|
|
2595
|
+
Row.defaultProps = defaultProps$1g;
|
|
2597
2596
|
Row.displayName = "NutRow";
|
|
2598
|
-
const defaultProps$
|
|
2597
|
+
const defaultProps$1f = {
|
|
2599
2598
|
contentPosition: "center",
|
|
2600
2599
|
dashed: false,
|
|
2601
2600
|
hairline: true,
|
|
@@ -2612,7 +2611,7 @@
|
|
|
2612
2611
|
direction,
|
|
2613
2612
|
...rest
|
|
2614
2613
|
} = {
|
|
2615
|
-
...defaultProps$
|
|
2614
|
+
...defaultProps$1f,
|
|
2616
2615
|
...props
|
|
2617
2616
|
};
|
|
2618
2617
|
const dividerBem = cn("divider");
|
|
@@ -2633,9 +2632,9 @@
|
|
|
2633
2632
|
...rest
|
|
2634
2633
|
}, children);
|
|
2635
2634
|
};
|
|
2636
|
-
Divider.defaultProps = defaultProps$
|
|
2635
|
+
Divider.defaultProps = defaultProps$1f;
|
|
2637
2636
|
Divider.displayName = "NutDivider";
|
|
2638
|
-
const defaultProps$
|
|
2637
|
+
const defaultProps$1e = {
|
|
2639
2638
|
columnNum: 4,
|
|
2640
2639
|
border: true,
|
|
2641
2640
|
gutter: 0,
|
|
@@ -2662,7 +2661,7 @@
|
|
|
2662
2661
|
iconColor,
|
|
2663
2662
|
className,
|
|
2664
2663
|
...rest
|
|
2665
|
-
} = { ...defaultProps$
|
|
2664
|
+
} = { ...defaultProps$1e, ...props };
|
|
2666
2665
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
2667
2666
|
const pxCheck2 = (value) => {
|
|
2668
2667
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
@@ -2701,9 +2700,9 @@
|
|
|
2701
2700
|
});
|
|
2702
2701
|
}));
|
|
2703
2702
|
};
|
|
2704
|
-
Grid.defaultProps = defaultProps$
|
|
2703
|
+
Grid.defaultProps = defaultProps$1e;
|
|
2705
2704
|
Grid.displayName = "NutGrid";
|
|
2706
|
-
const defaultProps$
|
|
2705
|
+
const defaultProps$1d = {
|
|
2707
2706
|
...ComponentDefaults,
|
|
2708
2707
|
text: "",
|
|
2709
2708
|
icon: "",
|
|
@@ -2741,7 +2740,7 @@
|
|
|
2741
2740
|
iconFontClassName,
|
|
2742
2741
|
...rest
|
|
2743
2742
|
} = {
|
|
2744
|
-
...defaultProps$
|
|
2743
|
+
...defaultProps$1d,
|
|
2745
2744
|
...props
|
|
2746
2745
|
};
|
|
2747
2746
|
const b2 = cn("grid-item");
|
|
@@ -2785,7 +2784,7 @@
|
|
|
2785
2784
|
className: "nut-grid-item__text"
|
|
2786
2785
|
}, text), children && /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children)));
|
|
2787
2786
|
};
|
|
2788
|
-
GridItem.defaultProps = defaultProps$
|
|
2787
|
+
GridItem.defaultProps = defaultProps$1d;
|
|
2789
2788
|
GridItem.displayName = "NutGridItem";
|
|
2790
2789
|
const defaultConfigRef = {
|
|
2791
2790
|
current: {
|
|
@@ -2800,17 +2799,17 @@
|
|
|
2800
2799
|
return (_a = React.useContext(ConfigContext)) != null ? _a : getDefaultConfig();
|
|
2801
2800
|
};
|
|
2802
2801
|
const ConfigContext = React.createContext(null);
|
|
2803
|
-
const defaultProps$
|
|
2802
|
+
const defaultProps$1c = {};
|
|
2804
2803
|
const Sticky = (props) => {
|
|
2805
2804
|
useConfig();
|
|
2806
|
-
({ ...defaultProps$
|
|
2805
|
+
({ ...defaultProps$1c, ...props });
|
|
2807
2806
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
2808
2807
|
className: "nut-sticky"
|
|
2809
2808
|
}, "Sticky");
|
|
2810
2809
|
};
|
|
2811
|
-
Sticky.defaultProps = defaultProps$
|
|
2810
|
+
Sticky.defaultProps = defaultProps$1c;
|
|
2812
2811
|
Sticky.displayName = "NutSticky";
|
|
2813
|
-
const defaultProps$
|
|
2812
|
+
const defaultProps$1b = {
|
|
2814
2813
|
...ComponentDefaults,
|
|
2815
2814
|
title: "",
|
|
2816
2815
|
desc: "",
|
|
@@ -2846,7 +2845,7 @@
|
|
|
2846
2845
|
iconClassPrefix,
|
|
2847
2846
|
iconFontClassName
|
|
2848
2847
|
} = {
|
|
2849
|
-
...defaultProps$
|
|
2848
|
+
...defaultProps$1b,
|
|
2850
2849
|
...props
|
|
2851
2850
|
};
|
|
2852
2851
|
const b2 = cn("navbar");
|
|
@@ -2915,9 +2914,9 @@
|
|
|
2915
2914
|
className: `${b2("")}--placeholder`
|
|
2916
2915
|
}, renderWrapper()) : renderWrapper());
|
|
2917
2916
|
};
|
|
2918
|
-
NavBar.defaultProps = defaultProps$
|
|
2917
|
+
NavBar.defaultProps = defaultProps$1b;
|
|
2919
2918
|
NavBar.displayName = "NutNavBar";
|
|
2920
|
-
const defaultProps$
|
|
2919
|
+
const defaultProps$1a = {
|
|
2921
2920
|
...ComponentDefaults,
|
|
2922
2921
|
fixednavClass: "nut-fixednav",
|
|
2923
2922
|
activeText: "",
|
|
@@ -2947,7 +2946,7 @@
|
|
|
2947
2946
|
iconFontClassName,
|
|
2948
2947
|
...rest
|
|
2949
2948
|
} = {
|
|
2950
|
-
...defaultProps$
|
|
2949
|
+
...defaultProps$1a,
|
|
2951
2950
|
...props
|
|
2952
2951
|
};
|
|
2953
2952
|
const b2 = cn("fixednav");
|
|
@@ -3002,9 +3001,9 @@
|
|
|
3002
3001
|
className: "text"
|
|
3003
3002
|
}, visible ? activeText || locale.fixednav.activeText : unActiveText || locale.fixednav.unActiveText))));
|
|
3004
3003
|
};
|
|
3005
|
-
FixedNav.defaultProps = defaultProps$
|
|
3004
|
+
FixedNav.defaultProps = defaultProps$1a;
|
|
3006
3005
|
FixedNav.displayName = "NutFixedNav";
|
|
3007
|
-
const defaultProps$
|
|
3006
|
+
const defaultProps$19 = {
|
|
3008
3007
|
visible: 0,
|
|
3009
3008
|
bottom: false,
|
|
3010
3009
|
size: 20,
|
|
@@ -3029,7 +3028,7 @@
|
|
|
3029
3028
|
style,
|
|
3030
3029
|
tabSwitch
|
|
3031
3030
|
} = {
|
|
3032
|
-
...defaultProps$
|
|
3031
|
+
...defaultProps$19,
|
|
3033
3032
|
...props
|
|
3034
3033
|
};
|
|
3035
3034
|
const b2 = cn("tabbar");
|
|
@@ -3064,9 +3063,9 @@
|
|
|
3064
3063
|
return React__default["default"].cloneElement(child, childProps);
|
|
3065
3064
|
}));
|
|
3066
3065
|
};
|
|
3067
|
-
Tabbar.defaultProps = defaultProps$
|
|
3066
|
+
Tabbar.defaultProps = defaultProps$19;
|
|
3068
3067
|
Tabbar.displayName = "NutTabbar";
|
|
3069
|
-
const defaultProps$
|
|
3068
|
+
const defaultProps$18 = {
|
|
3070
3069
|
...ComponentDefaults,
|
|
3071
3070
|
dot: false,
|
|
3072
3071
|
size: "",
|
|
@@ -3101,7 +3100,7 @@
|
|
|
3101
3100
|
iconClassPrefix,
|
|
3102
3101
|
iconFontClassName
|
|
3103
3102
|
} = {
|
|
3104
|
-
...defaultProps$
|
|
3103
|
+
...defaultProps$18,
|
|
3105
3104
|
...props
|
|
3106
3105
|
};
|
|
3107
3106
|
const b2 = cn("tabbar-item");
|
|
@@ -4684,23 +4683,21 @@
|
|
|
4684
4683
|
}
|
|
4685
4684
|
return result;
|
|
4686
4685
|
}
|
|
4687
|
-
function parse(
|
|
4688
|
-
const _ref =
|
|
4686
|
+
function parse(newConfig, gestureKey, _config = {}) {
|
|
4687
|
+
const _ref = newConfig, {
|
|
4689
4688
|
target,
|
|
4690
4689
|
eventOptions,
|
|
4691
4690
|
window: window2,
|
|
4692
4691
|
enabled,
|
|
4693
4692
|
transform
|
|
4694
4693
|
} = _ref, rest = _objectWithoutProperties(_ref, _excluded$4);
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
}, sharedConfigResolver)
|
|
4703
|
-
};
|
|
4694
|
+
_config.shared = resolveWith({
|
|
4695
|
+
target,
|
|
4696
|
+
eventOptions,
|
|
4697
|
+
window: window2,
|
|
4698
|
+
enabled,
|
|
4699
|
+
transform
|
|
4700
|
+
}, sharedConfigResolver);
|
|
4704
4701
|
if (gestureKey) {
|
|
4705
4702
|
const resolver = ConfigResolverMap.get(gestureKey);
|
|
4706
4703
|
_config[gestureKey] = resolveWith(_objectSpread2({
|
|
@@ -4724,11 +4721,11 @@
|
|
|
4724
4721
|
this._ctrl = ctrl;
|
|
4725
4722
|
this._gestureKey = gestureKey;
|
|
4726
4723
|
}
|
|
4727
|
-
add(element, device, action, handler,
|
|
4724
|
+
add(element, device, action, handler, options) {
|
|
4728
4725
|
const listeners = this._listeners;
|
|
4729
4726
|
const type = toDomEventType(device, action);
|
|
4730
4727
|
const _options = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {};
|
|
4731
|
-
const eventOptions = _objectSpread2(_objectSpread2({}, _options),
|
|
4728
|
+
const eventOptions = _objectSpread2(_objectSpread2({}, _options), options);
|
|
4732
4729
|
element.addEventListener(type, handler, eventOptions);
|
|
4733
4730
|
const remove = () => {
|
|
4734
4731
|
element.removeEventListener(type, handler, eventOptions);
|
|
@@ -4797,7 +4794,7 @@
|
|
|
4797
4794
|
this.nativeHandlers = nativeHandlers;
|
|
4798
4795
|
}
|
|
4799
4796
|
applyConfig(config2, gestureKey) {
|
|
4800
|
-
this.config = parse(config2, gestureKey);
|
|
4797
|
+
this.config = parse(config2, gestureKey, this.config);
|
|
4801
4798
|
}
|
|
4802
4799
|
clean() {
|
|
4803
4800
|
this._targetEventStore.clean();
|
|
@@ -4874,10 +4871,10 @@
|
|
|
4874
4871
|
if (internalHandlers.hover)
|
|
4875
4872
|
setupGesture(ctrl, "hover");
|
|
4876
4873
|
}
|
|
4877
|
-
const bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler,
|
|
4874
|
+
const bindToProps = (props, eventOptions, withPassiveOption) => (device, action, handler, options = {}, isNative = false) => {
|
|
4878
4875
|
var _options$capture, _options$passive;
|
|
4879
|
-
const capture = (_options$capture =
|
|
4880
|
-
const passive = (_options$passive =
|
|
4876
|
+
const capture = (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : eventOptions.capture;
|
|
4877
|
+
const passive = (_options$passive = options.passive) !== null && _options$passive !== void 0 ? _options$passive : eventOptions.passive;
|
|
4881
4878
|
let handlerProp = isNative ? device : toHandlerProp(device, action, capture);
|
|
4882
4879
|
if (withPassiveOption && passive)
|
|
4883
4880
|
handlerProp += "Passive";
|
|
@@ -8142,8 +8139,8 @@
|
|
|
8142
8139
|
}
|
|
8143
8140
|
});
|
|
8144
8141
|
const animated = host.animated;
|
|
8145
|
-
const elevatorContext
|
|
8146
|
-
const defaultProps$
|
|
8142
|
+
const elevatorContext = React.createContext({});
|
|
8143
|
+
const defaultProps$17 = {
|
|
8147
8144
|
height: "200px",
|
|
8148
8145
|
acceptKey: "title",
|
|
8149
8146
|
indexList: [],
|
|
@@ -8152,7 +8149,7 @@
|
|
|
8152
8149
|
titleHeight: 35,
|
|
8153
8150
|
className: ""
|
|
8154
8151
|
};
|
|
8155
|
-
const Elevator
|
|
8152
|
+
const Elevator = (props) => {
|
|
8156
8153
|
const {
|
|
8157
8154
|
height,
|
|
8158
8155
|
acceptKey,
|
|
@@ -8166,7 +8163,7 @@
|
|
|
8166
8163
|
children,
|
|
8167
8164
|
...rest
|
|
8168
8165
|
} = {
|
|
8169
|
-
...defaultProps$
|
|
8166
|
+
...defaultProps$17,
|
|
8170
8167
|
...props
|
|
8171
8168
|
};
|
|
8172
8169
|
const b2 = cn("elevator");
|
|
@@ -8331,7 +8328,7 @@
|
|
|
8331
8328
|
}),
|
|
8332
8329
|
key: subitem.id,
|
|
8333
8330
|
onClick: () => handleClickItem(item[acceptKey], subitem)
|
|
8334
|
-
}, children ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(elevatorContext
|
|
8331
|
+
}, children ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(elevatorContext.Provider, {
|
|
8335
8332
|
value: subitem
|
|
8336
8333
|
}, children)) : subitem.name);
|
|
8337
8334
|
})));
|
|
@@ -8354,9 +8351,9 @@
|
|
|
8354
8351
|
}, item[acceptKey]);
|
|
8355
8352
|
}))));
|
|
8356
8353
|
};
|
|
8357
|
-
Elevator
|
|
8358
|
-
Elevator
|
|
8359
|
-
const defaultProps$
|
|
8354
|
+
Elevator.defaultProps = defaultProps$17;
|
|
8355
|
+
Elevator.displayName = "NutElevator";
|
|
8356
|
+
const defaultProps$16 = {
|
|
8360
8357
|
defaultValue: 1,
|
|
8361
8358
|
mode: "multi",
|
|
8362
8359
|
prevText: "",
|
|
@@ -8373,7 +8370,7 @@
|
|
|
8373
8370
|
};
|
|
8374
8371
|
const Pagination = (props) => {
|
|
8375
8372
|
const { locale } = useConfig$1();
|
|
8376
|
-
({ ...defaultProps$
|
|
8373
|
+
({ ...defaultProps$16, ...props });
|
|
8377
8374
|
const {
|
|
8378
8375
|
modelValue,
|
|
8379
8376
|
mode,
|
|
@@ -8490,7 +8487,7 @@
|
|
|
8490
8487
|
onClick: (e2) => selectPage(Number(currentPage) + 1, true)
|
|
8491
8488
|
}, nextText || locale.pagination.next));
|
|
8492
8489
|
};
|
|
8493
|
-
Pagination.defaultProps = defaultProps$
|
|
8490
|
+
Pagination.defaultProps = defaultProps$16;
|
|
8494
8491
|
Pagination.displayName = "NutPagination";
|
|
8495
8492
|
class Title {
|
|
8496
8493
|
constructor() {
|
|
@@ -8500,7 +8497,7 @@
|
|
|
8500
8497
|
this.index = 0;
|
|
8501
8498
|
}
|
|
8502
8499
|
}
|
|
8503
|
-
const defaultProps$
|
|
8500
|
+
const defaultProps$15 = {
|
|
8504
8501
|
...ComponentDefaults,
|
|
8505
8502
|
value: 0,
|
|
8506
8503
|
color: "",
|
|
@@ -8539,7 +8536,7 @@
|
|
|
8539
8536
|
iconFontClassName,
|
|
8540
8537
|
...rest
|
|
8541
8538
|
} = {
|
|
8542
|
-
...defaultProps$
|
|
8539
|
+
...defaultProps$15,
|
|
8543
8540
|
...props
|
|
8544
8541
|
};
|
|
8545
8542
|
const [currentItem, setCurrentItem] = React.useState({ index: 0 });
|
|
@@ -8655,9 +8652,9 @@
|
|
|
8655
8652
|
return React__default["default"].cloneElement(child, childProps);
|
|
8656
8653
|
})));
|
|
8657
8654
|
};
|
|
8658
|
-
Tabs.defaultProps = defaultProps$
|
|
8655
|
+
Tabs.defaultProps = defaultProps$15;
|
|
8659
8656
|
Tabs.displayName = "NutTabs";
|
|
8660
|
-
const defaultProps$
|
|
8657
|
+
const defaultProps$14 = {
|
|
8661
8658
|
title: "",
|
|
8662
8659
|
paneKey: "",
|
|
8663
8660
|
activeKey: "",
|
|
@@ -8665,7 +8662,7 @@
|
|
|
8665
8662
|
};
|
|
8666
8663
|
const TabPane = (props) => {
|
|
8667
8664
|
const { children, paneKey, activeKey, autoHeightClassName } = {
|
|
8668
|
-
...defaultProps$
|
|
8665
|
+
...defaultProps$14,
|
|
8669
8666
|
...props
|
|
8670
8667
|
};
|
|
8671
8668
|
const b2 = cn("tabpane");
|
|
@@ -8680,7 +8677,7 @@
|
|
|
8680
8677
|
className: classes
|
|
8681
8678
|
}, children);
|
|
8682
8679
|
};
|
|
8683
|
-
const defaultProps$
|
|
8680
|
+
const defaultProps$13 = {
|
|
8684
8681
|
size: 3,
|
|
8685
8682
|
current: 1,
|
|
8686
8683
|
block: false,
|
|
@@ -8700,7 +8697,7 @@
|
|
|
8700
8697
|
vertical,
|
|
8701
8698
|
...rest
|
|
8702
8699
|
} = {
|
|
8703
|
-
...defaultProps$
|
|
8700
|
+
...defaultProps$13,
|
|
8704
8701
|
...props
|
|
8705
8702
|
};
|
|
8706
8703
|
const b2 = cn("indicator");
|
|
@@ -8734,7 +8731,7 @@
|
|
|
8734
8731
|
...rest
|
|
8735
8732
|
}, renderEles());
|
|
8736
8733
|
};
|
|
8737
|
-
Indicator.defaultProps = defaultProps$
|
|
8734
|
+
Indicator.defaultProps = defaultProps$13;
|
|
8738
8735
|
Indicator.displayName = "NutIndicator";
|
|
8739
8736
|
const handleClick = (e2) => {
|
|
8740
8737
|
e2.stopPropagation();
|
|
@@ -8750,7 +8747,7 @@
|
|
|
8750
8747
|
}
|
|
8751
8748
|
};
|
|
8752
8749
|
const OffsetContext = React.createContext(20);
|
|
8753
|
-
const defaultProps$
|
|
8750
|
+
const defaultProps$12 = {
|
|
8754
8751
|
showhead: false,
|
|
8755
8752
|
position: "left",
|
|
8756
8753
|
width: "80%"
|
|
@@ -8768,7 +8765,7 @@
|
|
|
8768
8765
|
handleClose,
|
|
8769
8766
|
...rest
|
|
8770
8767
|
} = {
|
|
8771
|
-
...defaultProps$
|
|
8768
|
+
...defaultProps$12,
|
|
8772
8769
|
...props
|
|
8773
8770
|
};
|
|
8774
8771
|
const offset = props.offset ? Number(props.offset) : 20;
|
|
@@ -8796,14 +8793,14 @@
|
|
|
8796
8793
|
className: "nut-sidenavbar__content"
|
|
8797
8794
|
}, children))))));
|
|
8798
8795
|
};
|
|
8799
|
-
SideNavBar.defaultProps = defaultProps$
|
|
8796
|
+
SideNavBar.defaultProps = defaultProps$12;
|
|
8800
8797
|
SideNavBar.displayName = "NutSideNavBar";
|
|
8801
|
-
const defaultProps$
|
|
8798
|
+
const defaultProps$11 = {
|
|
8802
8799
|
open: true
|
|
8803
8800
|
};
|
|
8804
8801
|
const SubSideNavBar = (props) => {
|
|
8805
8802
|
const { title, ikey, children, titleClick, open, ...rest } = {
|
|
8806
|
-
...defaultProps$
|
|
8803
|
+
...defaultProps$11,
|
|
8807
8804
|
...props
|
|
8808
8805
|
};
|
|
8809
8806
|
const offset = React.useContext(OffsetContext);
|
|
@@ -8874,7 +8871,7 @@
|
|
|
8874
8871
|
...rest
|
|
8875
8872
|
}, title);
|
|
8876
8873
|
};
|
|
8877
|
-
const defaultProps$
|
|
8874
|
+
const defaultProps$10 = {
|
|
8878
8875
|
...ComponentDefaults,
|
|
8879
8876
|
className: "",
|
|
8880
8877
|
style: {},
|
|
@@ -8897,7 +8894,7 @@
|
|
|
8897
8894
|
iconFontClassName,
|
|
8898
8895
|
...rest
|
|
8899
8896
|
} = {
|
|
8900
|
-
...defaultProps$
|
|
8897
|
+
...defaultProps$10,
|
|
8901
8898
|
...props
|
|
8902
8899
|
};
|
|
8903
8900
|
const parentRef = React.useRef(null);
|
|
@@ -8953,8 +8950,8 @@
|
|
|
8953
8950
|
}, React__default["default"].Children.toArray(children).map((child, index2) => {
|
|
8954
8951
|
if (!child)
|
|
8955
8952
|
return null;
|
|
8956
|
-
const { disabled, title, value, direction, options
|
|
8957
|
-
const currentTitle =
|
|
8953
|
+
const { disabled, title, value, direction, options } = child.props;
|
|
8954
|
+
const currentTitle = options == null ? void 0 : options.filter(
|
|
8958
8955
|
(option) => option.value === value
|
|
8959
8956
|
);
|
|
8960
8957
|
function finallyTitle() {
|
|
@@ -8992,9 +8989,9 @@
|
|
|
8992
8989
|
})));
|
|
8993
8990
|
})), cloneChildren());
|
|
8994
8991
|
};
|
|
8995
|
-
Menu.defaultProps = defaultProps$
|
|
8992
|
+
Menu.defaultProps = defaultProps$10;
|
|
8996
8993
|
Menu.displayName = "NutMenu";
|
|
8997
|
-
const defaultProps
|
|
8994
|
+
const defaultProps$$ = {
|
|
8998
8995
|
...ComponentDefaults,
|
|
8999
8996
|
className: "",
|
|
9000
8997
|
style: {},
|
|
@@ -9009,11 +9006,11 @@
|
|
|
9009
9006
|
};
|
|
9010
9007
|
const MenuItem = (props) => {
|
|
9011
9008
|
useConfig$1();
|
|
9012
|
-
const mergedProps = { ...defaultProps
|
|
9009
|
+
const mergedProps = { ...defaultProps$$, ...props };
|
|
9013
9010
|
const {
|
|
9014
9011
|
className,
|
|
9015
9012
|
style,
|
|
9016
|
-
options
|
|
9013
|
+
options,
|
|
9017
9014
|
value,
|
|
9018
9015
|
columns,
|
|
9019
9016
|
title,
|
|
@@ -9026,7 +9023,7 @@
|
|
|
9026
9023
|
iconClassPrefix,
|
|
9027
9024
|
iconFontClassName
|
|
9028
9025
|
} = {
|
|
9029
|
-
...defaultProps
|
|
9026
|
+
...defaultProps$$,
|
|
9030
9027
|
...props
|
|
9031
9028
|
};
|
|
9032
9029
|
const { activeColor, showPopup, parent, orderKey } = mergedProps;
|
|
@@ -9119,7 +9116,7 @@
|
|
|
9119
9116
|
classNames: "menu-item"
|
|
9120
9117
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9121
9118
|
className: "nut-menu-item__content"
|
|
9122
|
-
},
|
|
9119
|
+
}, options == null ? void 0 : options.map((item, index2) => {
|
|
9123
9120
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9124
9121
|
className: `nut-menu-item__option ${classNames({
|
|
9125
9122
|
active: item.value === _value
|
|
@@ -9145,7 +9142,7 @@
|
|
|
9145
9142
|
}, item.text));
|
|
9146
9143
|
}), children))));
|
|
9147
9144
|
};
|
|
9148
|
-
MenuItem.defaultProps = defaultProps
|
|
9145
|
+
MenuItem.defaultProps = defaultProps$$;
|
|
9149
9146
|
MenuItem.displayName = "NutMenuItem";
|
|
9150
9147
|
const MIN_DISTANCE = 10;
|
|
9151
9148
|
function getDirection(x2, y2) {
|
|
@@ -9245,7 +9242,7 @@
|
|
|
9245
9242
|
const res = await element.getBoundingClientRect();
|
|
9246
9243
|
return res;
|
|
9247
9244
|
};
|
|
9248
|
-
const defaultProps$
|
|
9245
|
+
const defaultProps$_ = {
|
|
9249
9246
|
name: "",
|
|
9250
9247
|
size: "",
|
|
9251
9248
|
classPrefix: "nut-icon",
|
|
@@ -9273,7 +9270,7 @@
|
|
|
9273
9270
|
onClick,
|
|
9274
9271
|
...rest
|
|
9275
9272
|
} = {
|
|
9276
|
-
...defaultProps$
|
|
9273
|
+
...defaultProps$_,
|
|
9277
9274
|
...props
|
|
9278
9275
|
};
|
|
9279
9276
|
const isImage = name ? name.indexOf("/") !== -1 : false;
|
|
@@ -9307,9 +9304,9 @@
|
|
|
9307
9304
|
children
|
|
9308
9305
|
);
|
|
9309
9306
|
}
|
|
9310
|
-
Icon.defaultProps = defaultProps$
|
|
9307
|
+
Icon.defaultProps = defaultProps$_;
|
|
9311
9308
|
Icon.displayName = "NutIcon";
|
|
9312
|
-
const defaultProps
|
|
9309
|
+
const defaultProps$Z = {
|
|
9313
9310
|
id: "",
|
|
9314
9311
|
style: {},
|
|
9315
9312
|
icon: null,
|
|
@@ -9354,7 +9351,7 @@
|
|
|
9354
9351
|
visible,
|
|
9355
9352
|
onClose,
|
|
9356
9353
|
...rest
|
|
9357
|
-
} = { ...defaultProps
|
|
9354
|
+
} = { ...defaultProps$Z, ...props };
|
|
9358
9355
|
let timer;
|
|
9359
9356
|
const [openState, SetOpenState] = React.useState(false);
|
|
9360
9357
|
React.useEffect(() => {
|
|
@@ -9443,9 +9440,9 @@
|
|
|
9443
9440
|
className: toastBem("text")
|
|
9444
9441
|
}, msg))) : null);
|
|
9445
9442
|
};
|
|
9446
|
-
Toast.defaultProps = defaultProps
|
|
9447
|
-
Toast.displayName = "
|
|
9448
|
-
const defaultProps$
|
|
9443
|
+
Toast.defaultProps = defaultProps$Z;
|
|
9444
|
+
Toast.displayName = "NutToast";
|
|
9445
|
+
const defaultProps$Y = {
|
|
9449
9446
|
range: false,
|
|
9450
9447
|
hiddenRange: false,
|
|
9451
9448
|
hiddenTag: false,
|
|
@@ -9476,8 +9473,8 @@
|
|
|
9476
9473
|
change,
|
|
9477
9474
|
dragStart,
|
|
9478
9475
|
dragEnd
|
|
9479
|
-
} = { ...defaultProps$
|
|
9480
|
-
let { min, max, step } = { ...defaultProps$
|
|
9476
|
+
} = { ...defaultProps$Y, ...props };
|
|
9477
|
+
let { min, max, step } = { ...defaultProps$Y, ...props };
|
|
9481
9478
|
min = Number(min);
|
|
9482
9479
|
max = Number(max);
|
|
9483
9480
|
step = Number(step);
|
|
@@ -9825,7 +9822,7 @@
|
|
|
9825
9822
|
}
|
|
9826
9823
|
}));
|
|
9827
9824
|
};
|
|
9828
|
-
Range.defaultProps = defaultProps$
|
|
9825
|
+
Range.defaultProps = defaultProps$Y;
|
|
9829
9826
|
Range.displayName = "NutRange";
|
|
9830
9827
|
const Utils = {
|
|
9831
9828
|
isLeapYear(y2) {
|
|
@@ -9919,7 +9916,7 @@
|
|
|
9919
9916
|
};
|
|
9920
9917
|
}
|
|
9921
9918
|
var requestAniFrame$1 = requestAniFrame();
|
|
9922
|
-
const defaultProps$
|
|
9919
|
+
const defaultProps$X = {
|
|
9923
9920
|
type: "one",
|
|
9924
9921
|
isAutoBackFill: false,
|
|
9925
9922
|
poppable: true,
|
|
@@ -9948,7 +9945,7 @@
|
|
|
9948
9945
|
onChoose,
|
|
9949
9946
|
onUpdate,
|
|
9950
9947
|
onClose
|
|
9951
|
-
} = { ...defaultProps$
|
|
9948
|
+
} = { ...defaultProps$X, ...props };
|
|
9952
9949
|
const weeks = locale.calendaritem.weekdays;
|
|
9953
9950
|
const [yearMonthTitle, setYearMonthTitle] = React.useState("");
|
|
9954
9951
|
const [unLoadPrev, setUnLoadPrev] = React.useState(false);
|
|
@@ -10033,7 +10030,7 @@
|
|
|
10033
10030
|
const date = `${month.curData[0]}-${month.curData[1]}-${day}`;
|
|
10034
10031
|
return Utils.isEqual(date, Utils.date2Str(new Date()));
|
|
10035
10032
|
};
|
|
10036
|
-
const
|
|
10033
|
+
const confirm = () => {
|
|
10037
10034
|
if (state.isRange && state.chooseData.length === 2 || !state.isRange) {
|
|
10038
10035
|
onChoose && onChoose(state.chooseData);
|
|
10039
10036
|
if (poppable) {
|
|
@@ -10068,7 +10065,7 @@
|
|
|
10068
10065
|
}
|
|
10069
10066
|
}
|
|
10070
10067
|
if (isAutoBackFill && !isFirst) {
|
|
10071
|
-
|
|
10068
|
+
confirm();
|
|
10072
10069
|
}
|
|
10073
10070
|
setMonthsData(state.monthsData.slice());
|
|
10074
10071
|
}
|
|
@@ -10369,12 +10366,12 @@
|
|
|
10369
10366
|
className: "nut-calendar-footer"
|
|
10370
10367
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
10371
10368
|
className: "calendar-confirm-btn",
|
|
10372
|
-
onClick:
|
|
10369
|
+
onClick: confirm
|
|
10373
10370
|
}, locale.confirm)) : ""));
|
|
10374
10371
|
};
|
|
10375
|
-
CalendarItem.defaultProps = defaultProps$
|
|
10372
|
+
CalendarItem.defaultProps = defaultProps$X;
|
|
10376
10373
|
CalendarItem.displayName = "NutCalendarItem";
|
|
10377
|
-
const defaultProps$
|
|
10374
|
+
const defaultProps$W = {
|
|
10378
10375
|
type: "one",
|
|
10379
10376
|
isAutoBackFill: false,
|
|
10380
10377
|
poppable: true,
|
|
@@ -10402,7 +10399,7 @@
|
|
|
10402
10399
|
endDate,
|
|
10403
10400
|
onClose,
|
|
10404
10401
|
onChoose
|
|
10405
|
-
} = { ...defaultProps$
|
|
10402
|
+
} = { ...defaultProps$W, ...props };
|
|
10406
10403
|
const close = () => {
|
|
10407
10404
|
onClose && onClose();
|
|
10408
10405
|
};
|
|
@@ -10445,9 +10442,9 @@
|
|
|
10445
10442
|
onChoose: choose
|
|
10446
10443
|
}));
|
|
10447
10444
|
};
|
|
10448
|
-
Calendar.defaultProps = defaultProps$
|
|
10445
|
+
Calendar.defaultProps = defaultProps$W;
|
|
10449
10446
|
Calendar.displayName = "NutCalendar";
|
|
10450
|
-
const defaultProps$
|
|
10447
|
+
const defaultProps$V = {
|
|
10451
10448
|
disabled: false,
|
|
10452
10449
|
checkedValue: [],
|
|
10453
10450
|
max: void 0,
|
|
@@ -10456,7 +10453,7 @@
|
|
|
10456
10453
|
};
|
|
10457
10454
|
const CheckboxGroup = React__default["default"].forwardRef(
|
|
10458
10455
|
(props, ref) => {
|
|
10459
|
-
const { children } = { ...defaultProps$
|
|
10456
|
+
const { children } = { ...defaultProps$V, ...props };
|
|
10460
10457
|
const b2 = cn("checkboxgroup");
|
|
10461
10458
|
const { className, disabled, onChange, checkedValue, max, ...rest } = props;
|
|
10462
10459
|
const [innerDisabled, setInnerDisabled] = React.useState(disabled);
|
|
@@ -10535,9 +10532,9 @@
|
|
|
10535
10532
|
}, cloneChildren());
|
|
10536
10533
|
}
|
|
10537
10534
|
);
|
|
10538
|
-
CheckboxGroup.defaultProps = defaultProps$
|
|
10535
|
+
CheckboxGroup.defaultProps = defaultProps$V;
|
|
10539
10536
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
10540
|
-
const defaultProps$
|
|
10537
|
+
const defaultProps$U = {
|
|
10541
10538
|
...ComponentDefaults,
|
|
10542
10539
|
checked: false,
|
|
10543
10540
|
disabled: false,
|
|
@@ -10553,7 +10550,7 @@
|
|
|
10553
10550
|
};
|
|
10554
10551
|
const Checkbox = (props) => {
|
|
10555
10552
|
const { children } = {
|
|
10556
|
-
...defaultProps$
|
|
10553
|
+
...defaultProps$U,
|
|
10557
10554
|
...props
|
|
10558
10555
|
};
|
|
10559
10556
|
const b2 = cn("checkbox");
|
|
@@ -10635,7 +10632,7 @@
|
|
|
10635
10632
|
onClick: handleClick2
|
|
10636
10633
|
}, renderIcon(), renderLabel());
|
|
10637
10634
|
};
|
|
10638
|
-
Checkbox.defaultProps = defaultProps$
|
|
10635
|
+
Checkbox.defaultProps = defaultProps$U;
|
|
10639
10636
|
Checkbox.displayName = "NutCheckBox";
|
|
10640
10637
|
Checkbox.Group = CheckboxGroup;
|
|
10641
10638
|
const InternalPickerSlot = (props, ref) => {
|
|
@@ -10916,7 +10913,7 @@
|
|
|
10916
10913
|
onClose && onClose(chooseValueData, selectedOptions());
|
|
10917
10914
|
onCloseUpdate && onCloseUpdate(chooseValueData, selectedOptions(), pickerRef);
|
|
10918
10915
|
};
|
|
10919
|
-
const
|
|
10916
|
+
const confirm = () => {
|
|
10920
10917
|
let movings = false;
|
|
10921
10918
|
refs.forEach((_ref) => {
|
|
10922
10919
|
if (_ref.moving)
|
|
@@ -11015,16 +11012,16 @@
|
|
|
11015
11012
|
};
|
|
11016
11013
|
let columnIndex2 = 0;
|
|
11017
11014
|
while (cursor && cursor.children) {
|
|
11018
|
-
const
|
|
11015
|
+
const options = cursor.children;
|
|
11019
11016
|
const value = defaultValues[columnIndex2];
|
|
11020
|
-
let index2 =
|
|
11017
|
+
let index2 = options.findIndex(
|
|
11021
11018
|
(columnItem) => columnItem.value === value
|
|
11022
11019
|
);
|
|
11023
11020
|
if (index2 === -1)
|
|
11024
11021
|
index2 = 0;
|
|
11025
11022
|
cursor = cursor.children[index2];
|
|
11026
11023
|
columnIndex2++;
|
|
11027
|
-
formatted.push(
|
|
11024
|
+
formatted.push(options);
|
|
11028
11025
|
}
|
|
11029
11026
|
return formatted;
|
|
11030
11027
|
};
|
|
@@ -11050,7 +11047,7 @@
|
|
|
11050
11047
|
className: b2("title")
|
|
11051
11048
|
}, title || ""), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
11052
11049
|
className: b2("confirm-btn"),
|
|
11053
|
-
onClick:
|
|
11050
|
+
onClick: confirm
|
|
11054
11051
|
}, locale.confirm));
|
|
11055
11052
|
};
|
|
11056
11053
|
return /* @__PURE__ */ React__default["default"].createElement(Popup, {
|
|
@@ -11082,7 +11079,7 @@
|
|
|
11082
11079
|
};
|
|
11083
11080
|
const Picker = React__default["default"].forwardRef(InternalPicker);
|
|
11084
11081
|
const currentYear = new Date().getFullYear();
|
|
11085
|
-
const defaultProps$
|
|
11082
|
+
const defaultProps$T = {
|
|
11086
11083
|
modelValue: null,
|
|
11087
11084
|
visible: false,
|
|
11088
11085
|
title: "",
|
|
@@ -11112,7 +11109,7 @@
|
|
|
11112
11109
|
style,
|
|
11113
11110
|
...rest
|
|
11114
11111
|
} = {
|
|
11115
|
-
...defaultProps$
|
|
11112
|
+
...defaultProps$T,
|
|
11116
11113
|
...props
|
|
11117
11114
|
};
|
|
11118
11115
|
const [show, setShow] = React.useState(false);
|
|
@@ -11371,15 +11368,15 @@
|
|
|
11371
11368
|
listData,
|
|
11372
11369
|
onClose: onCloseDatePicker,
|
|
11373
11370
|
defaultValueData: defaultValue,
|
|
11374
|
-
onConfirm: (values,
|
|
11371
|
+
onConfirm: (values, options) => onConfirmDatePicker && onConfirmDatePicker(values, options),
|
|
11375
11372
|
onChange: (index2, value, list) => updateChooseValueCustmer(index2, value, list),
|
|
11376
11373
|
threeDimensional,
|
|
11377
11374
|
ref: pickerRef
|
|
11378
11375
|
}));
|
|
11379
11376
|
};
|
|
11380
|
-
DatePicker.defaultProps = defaultProps$
|
|
11377
|
+
DatePicker.defaultProps = defaultProps$T;
|
|
11381
11378
|
DatePicker.displayName = "NutDatePicker";
|
|
11382
|
-
const defaultProps$
|
|
11379
|
+
const defaultProps$S = {
|
|
11383
11380
|
...ComponentDefaults,
|
|
11384
11381
|
disabled: false,
|
|
11385
11382
|
buttonSize: "",
|
|
@@ -11420,7 +11417,7 @@
|
|
|
11420
11417
|
iconFontClassName,
|
|
11421
11418
|
...restProps
|
|
11422
11419
|
} = {
|
|
11423
|
-
...defaultProps$
|
|
11420
|
+
...defaultProps$S,
|
|
11424
11421
|
...props
|
|
11425
11422
|
};
|
|
11426
11423
|
const [inputValue, setInputValue] = React.useState(modelValue);
|
|
@@ -11548,7 +11545,7 @@
|
|
|
11548
11545
|
onClick: addNumber
|
|
11549
11546
|
}));
|
|
11550
11547
|
};
|
|
11551
|
-
InputNumber.defaultProps = defaultProps$
|
|
11548
|
+
InputNumber.defaultProps = defaultProps$S;
|
|
11552
11549
|
InputNumber.displayName = "NutInputNumber";
|
|
11553
11550
|
function trimExtraChar(value, char, regExp) {
|
|
11554
11551
|
const index2 = value.indexOf(char);
|
|
@@ -11574,7 +11571,7 @@
|
|
|
11574
11571
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
11575
11572
|
return value.replace(regExp, "");
|
|
11576
11573
|
}
|
|
11577
|
-
const defaultProps$
|
|
11574
|
+
const defaultProps$R = {
|
|
11578
11575
|
...ComponentDefaults,
|
|
11579
11576
|
type: "text",
|
|
11580
11577
|
defaultValue: "",
|
|
@@ -11661,7 +11658,7 @@
|
|
|
11661
11658
|
iconFontClassName,
|
|
11662
11659
|
...rest
|
|
11663
11660
|
} = {
|
|
11664
|
-
...defaultProps$
|
|
11661
|
+
...defaultProps$R,
|
|
11665
11662
|
...props
|
|
11666
11663
|
};
|
|
11667
11664
|
locale.placeholder = placeholder || locale.placeholder;
|
|
@@ -11881,14 +11878,14 @@
|
|
|
11881
11878
|
}
|
|
11882
11879
|
}, errorMessage) : null)));
|
|
11883
11880
|
};
|
|
11884
|
-
Input.defaultProps = defaultProps$
|
|
11881
|
+
Input.defaultProps = defaultProps$R;
|
|
11885
11882
|
Input.displayName = "NutInput";
|
|
11886
11883
|
const radioContext = {
|
|
11887
11884
|
onChange: (val) => {
|
|
11888
11885
|
}
|
|
11889
11886
|
};
|
|
11890
11887
|
var RadioContext = React__default["default"].createContext(radioContext);
|
|
11891
|
-
const defaultProps$
|
|
11888
|
+
const defaultProps$Q = {
|
|
11892
11889
|
value: null,
|
|
11893
11890
|
textPosition: "right",
|
|
11894
11891
|
onChange: (value) => {
|
|
@@ -11897,7 +11894,7 @@
|
|
|
11897
11894
|
};
|
|
11898
11895
|
const RadioGroup = React__default["default"].forwardRef(
|
|
11899
11896
|
(props, ref) => {
|
|
11900
|
-
const { children } = { ...defaultProps$
|
|
11897
|
+
const { children } = { ...defaultProps$Q, ...props };
|
|
11901
11898
|
cn("RadioGroup");
|
|
11902
11899
|
const { className, value, onChange, textPosition, direction, ...rest } = props;
|
|
11903
11900
|
const [val2State, setVal2State] = React.useState(value);
|
|
@@ -11934,9 +11931,9 @@
|
|
|
11934
11931
|
}, cloneChildren()));
|
|
11935
11932
|
}
|
|
11936
11933
|
);
|
|
11937
|
-
RadioGroup.defaultProps = defaultProps$
|
|
11934
|
+
RadioGroup.defaultProps = defaultProps$Q;
|
|
11938
11935
|
RadioGroup.displayName = "NutRadioGroup";
|
|
11939
|
-
const defaultProps$
|
|
11936
|
+
const defaultProps$P = {
|
|
11940
11937
|
...ComponentDefaults,
|
|
11941
11938
|
disabled: false,
|
|
11942
11939
|
checked: false,
|
|
@@ -11951,7 +11948,7 @@
|
|
|
11951
11948
|
};
|
|
11952
11949
|
const Radio = (props) => {
|
|
11953
11950
|
const { children } = {
|
|
11954
|
-
...defaultProps$
|
|
11951
|
+
...defaultProps$P,
|
|
11955
11952
|
...props
|
|
11956
11953
|
};
|
|
11957
11954
|
const {
|
|
@@ -12031,10 +12028,10 @@
|
|
|
12031
12028
|
...rest
|
|
12032
12029
|
}, renderRadioItem());
|
|
12033
12030
|
};
|
|
12034
|
-
Radio.defaultProps = defaultProps$
|
|
12031
|
+
Radio.defaultProps = defaultProps$P;
|
|
12035
12032
|
Radio.displayName = "NutRadio";
|
|
12036
12033
|
Radio.RadioGroup = RadioGroup;
|
|
12037
|
-
const defaultProps$
|
|
12034
|
+
const defaultProps$O = {
|
|
12038
12035
|
...ComponentDefaults,
|
|
12039
12036
|
count: 5,
|
|
12040
12037
|
modelValue: 0,
|
|
@@ -12067,7 +12064,7 @@
|
|
|
12067
12064
|
iconClassPrefix,
|
|
12068
12065
|
iconFontClassName
|
|
12069
12066
|
} = {
|
|
12070
|
-
...defaultProps$
|
|
12067
|
+
...defaultProps$O,
|
|
12071
12068
|
...props
|
|
12072
12069
|
};
|
|
12073
12070
|
const b2 = cn("rate");
|
|
@@ -12085,7 +12082,7 @@
|
|
|
12085
12082
|
setScore(Math.max(Number(modelValue), Number(minimizeValue)));
|
|
12086
12083
|
}, [modelValue]);
|
|
12087
12084
|
const pxCheck2 = (value) => {
|
|
12088
|
-
return isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
12085
|
+
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
12089
12086
|
};
|
|
12090
12087
|
const onClick = (e2, index2) => {
|
|
12091
12088
|
e2.preventDefault();
|
|
@@ -12093,9 +12090,7 @@
|
|
|
12093
12090
|
if (disabled || readonly)
|
|
12094
12091
|
return;
|
|
12095
12092
|
let value = 0;
|
|
12096
|
-
if (index2 === 1 && score === index2)
|
|
12097
|
-
;
|
|
12098
|
-
else {
|
|
12093
|
+
if (!(index2 === 1 && score === index2)) {
|
|
12099
12094
|
value = index2;
|
|
12100
12095
|
}
|
|
12101
12096
|
value = Math.max(value, Number(minimizeValue));
|
|
@@ -12135,9 +12130,9 @@
|
|
|
12135
12130
|
}));
|
|
12136
12131
|
}));
|
|
12137
12132
|
};
|
|
12138
|
-
Rate.defaultProps = defaultProps$
|
|
12133
|
+
Rate.defaultProps = defaultProps$O;
|
|
12139
12134
|
Rate.displayName = "NutRate";
|
|
12140
|
-
const defaultProps$
|
|
12135
|
+
const defaultProps$N = {
|
|
12141
12136
|
...ComponentDefaults,
|
|
12142
12137
|
title: "",
|
|
12143
12138
|
desc: "",
|
|
@@ -12170,7 +12165,7 @@
|
|
|
12170
12165
|
tips,
|
|
12171
12166
|
visible,
|
|
12172
12167
|
modelValue,
|
|
12173
|
-
errorMsg
|
|
12168
|
+
errorMsg,
|
|
12174
12169
|
noButton,
|
|
12175
12170
|
closeOnClickOverlay,
|
|
12176
12171
|
length,
|
|
@@ -12285,7 +12280,7 @@
|
|
|
12285
12280
|
className: b2("message")
|
|
12286
12281
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12287
12282
|
className: b2("message__error")
|
|
12288
|
-
},
|
|
12283
|
+
}, errorMsg), tips || locale.shortpassword.tips ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12289
12284
|
className: b2("message__forget")
|
|
12290
12285
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
12291
12286
|
classPrefix: iconClassPrefix,
|
|
@@ -12305,9 +12300,9 @@
|
|
|
12305
12300
|
onClick: () => sure()
|
|
12306
12301
|
}, locale.confirm)) : null)));
|
|
12307
12302
|
};
|
|
12308
|
-
ShortPassword.defaultProps = defaultProps$
|
|
12303
|
+
ShortPassword.defaultProps = defaultProps$N;
|
|
12309
12304
|
ShortPassword.displayName = "NutShortPassword";
|
|
12310
|
-
const defaultProps$
|
|
12305
|
+
const defaultProps$M = {
|
|
12311
12306
|
defaultValue: "",
|
|
12312
12307
|
textAlign: "left",
|
|
12313
12308
|
limitshow: false,
|
|
@@ -12335,7 +12330,7 @@
|
|
|
12335
12330
|
onChange,
|
|
12336
12331
|
onBlur,
|
|
12337
12332
|
onFocus
|
|
12338
|
-
} = { ...defaultProps$
|
|
12333
|
+
} = { ...defaultProps$M, ...props };
|
|
12339
12334
|
const textareaBem = cn("textarea");
|
|
12340
12335
|
const [inputValue, SetInputValue] = React.useState("");
|
|
12341
12336
|
React.useEffect(() => {
|
|
@@ -12402,9 +12397,9 @@
|
|
|
12402
12397
|
className: textareaBem("limit")
|
|
12403
12398
|
}, inputValue.length, "/", maxlength < 0 ? 0 : maxlength) : null);
|
|
12404
12399
|
};
|
|
12405
|
-
TextArea.defaultProps = defaultProps$
|
|
12400
|
+
TextArea.defaultProps = defaultProps$M;
|
|
12406
12401
|
TextArea.displayName = "NutTextArea";
|
|
12407
|
-
const defaultProps$
|
|
12402
|
+
const defaultProps$L = {
|
|
12408
12403
|
...ComponentDefaults,
|
|
12409
12404
|
className: "",
|
|
12410
12405
|
style: {},
|
|
@@ -12452,7 +12447,7 @@
|
|
|
12452
12447
|
iconFontClassName,
|
|
12453
12448
|
...rest
|
|
12454
12449
|
} = {
|
|
12455
|
-
...defaultProps$
|
|
12450
|
+
...defaultProps$L,
|
|
12456
12451
|
...props
|
|
12457
12452
|
};
|
|
12458
12453
|
const b2 = cn("progress");
|
|
@@ -12530,7 +12525,7 @@
|
|
|
12530
12525
|
color: iconColor
|
|
12531
12526
|
})));
|
|
12532
12527
|
};
|
|
12533
|
-
Progress.defaultProps = defaultProps$
|
|
12528
|
+
Progress.defaultProps = defaultProps$L;
|
|
12534
12529
|
Progress.displayName = "NutProgress";
|
|
12535
12530
|
class UploadOptions {
|
|
12536
12531
|
constructor() {
|
|
@@ -12545,43 +12540,43 @@
|
|
|
12545
12540
|
}
|
|
12546
12541
|
}
|
|
12547
12542
|
class Upload {
|
|
12548
|
-
constructor(
|
|
12549
|
-
this.options =
|
|
12543
|
+
constructor(options) {
|
|
12544
|
+
this.options = options;
|
|
12550
12545
|
}
|
|
12551
12546
|
upload() {
|
|
12552
12547
|
var _a;
|
|
12553
|
-
const { options
|
|
12548
|
+
const { options } = this;
|
|
12554
12549
|
const xhr = new XMLHttpRequest();
|
|
12555
|
-
xhr.timeout =
|
|
12550
|
+
xhr.timeout = options.timeout;
|
|
12556
12551
|
if (xhr.upload) {
|
|
12557
12552
|
xhr.upload.addEventListener(
|
|
12558
12553
|
"progress",
|
|
12559
12554
|
(e2) => {
|
|
12560
12555
|
var _a2;
|
|
12561
|
-
(_a2 =
|
|
12556
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, e2, options);
|
|
12562
12557
|
},
|
|
12563
12558
|
false
|
|
12564
12559
|
);
|
|
12565
12560
|
xhr.onreadystatechange = () => {
|
|
12566
12561
|
var _a2, _b;
|
|
12567
12562
|
if (xhr.readyState === 4) {
|
|
12568
|
-
if (xhr.status ===
|
|
12569
|
-
(_a2 =
|
|
12563
|
+
if (xhr.status === options.xhrState) {
|
|
12564
|
+
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, xhr.responseText, options);
|
|
12570
12565
|
} else {
|
|
12571
|
-
(_b =
|
|
12566
|
+
(_b = options.onFailure) == null ? void 0 : _b.call(options, xhr.responseText, options);
|
|
12572
12567
|
}
|
|
12573
12568
|
}
|
|
12574
12569
|
};
|
|
12575
|
-
xhr.withCredentials =
|
|
12576
|
-
xhr.open(
|
|
12577
|
-
for (const [key, value] of Object.entries(
|
|
12570
|
+
xhr.withCredentials = options.withCredentials;
|
|
12571
|
+
xhr.open(options.method, options.url, true);
|
|
12572
|
+
for (const [key, value] of Object.entries(options.headers)) {
|
|
12578
12573
|
xhr.setRequestHeader(key, value);
|
|
12579
12574
|
}
|
|
12580
|
-
(_a =
|
|
12581
|
-
if (
|
|
12582
|
-
|
|
12575
|
+
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
12576
|
+
if (options.beforeXhrUpload) {
|
|
12577
|
+
options.beforeXhrUpload(xhr, options);
|
|
12583
12578
|
} else {
|
|
12584
|
-
xhr.send(
|
|
12579
|
+
xhr.send(options.formData);
|
|
12585
12580
|
}
|
|
12586
12581
|
} else {
|
|
12587
12582
|
console.warn("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 XMLHttpRequest");
|
|
@@ -12589,46 +12584,46 @@
|
|
|
12589
12584
|
}
|
|
12590
12585
|
uploadTaro(uploadFile, env) {
|
|
12591
12586
|
var _a;
|
|
12592
|
-
const
|
|
12587
|
+
const options = this.options;
|
|
12593
12588
|
if (env === "WEB") {
|
|
12594
12589
|
this.upload();
|
|
12595
|
-
} else if (
|
|
12596
|
-
|
|
12590
|
+
} else if (options.beforeXhrUpload) {
|
|
12591
|
+
options.beforeXhrUpload(uploadFile, options);
|
|
12597
12592
|
} else {
|
|
12598
12593
|
const uploadTask = uploadFile({
|
|
12599
|
-
url:
|
|
12600
|
-
filePath:
|
|
12601
|
-
fileType:
|
|
12594
|
+
url: options.url,
|
|
12595
|
+
filePath: options.taroFilePath,
|
|
12596
|
+
fileType: options.fileType,
|
|
12602
12597
|
header: {
|
|
12603
12598
|
"Content-Type": "multipart/form-data",
|
|
12604
|
-
...
|
|
12599
|
+
...options.headers
|
|
12605
12600
|
},
|
|
12606
|
-
formData:
|
|
12607
|
-
name:
|
|
12601
|
+
formData: options.formData,
|
|
12602
|
+
name: options.name,
|
|
12608
12603
|
success(response) {
|
|
12609
12604
|
var _a2, _b;
|
|
12610
|
-
if (
|
|
12611
|
-
(_a2 =
|
|
12605
|
+
if (options.xhrState == response.statusCode) {
|
|
12606
|
+
(_a2 = options.onSuccess) == null ? void 0 : _a2.call(options, response, options);
|
|
12612
12607
|
} else {
|
|
12613
|
-
(_b =
|
|
12608
|
+
(_b = options.onFailure) == null ? void 0 : _b.call(options, response, options);
|
|
12614
12609
|
}
|
|
12615
12610
|
},
|
|
12616
12611
|
fail(e2) {
|
|
12617
12612
|
var _a2;
|
|
12618
|
-
(_a2 =
|
|
12613
|
+
(_a2 = options.onFailure) == null ? void 0 : _a2.call(options, e2, options);
|
|
12619
12614
|
}
|
|
12620
12615
|
});
|
|
12621
|
-
(_a =
|
|
12616
|
+
(_a = options.onStart) == null ? void 0 : _a.call(options, options);
|
|
12622
12617
|
uploadTask.progress(
|
|
12623
12618
|
(res) => {
|
|
12624
12619
|
var _a2;
|
|
12625
|
-
(_a2 =
|
|
12620
|
+
(_a2 = options.onProgress) == null ? void 0 : _a2.call(options, res, options);
|
|
12626
12621
|
}
|
|
12627
12622
|
);
|
|
12628
12623
|
}
|
|
12629
12624
|
}
|
|
12630
12625
|
}
|
|
12631
|
-
const defaultProps$
|
|
12626
|
+
const defaultProps$K = {
|
|
12632
12627
|
...ComponentDefaults,
|
|
12633
12628
|
url: "",
|
|
12634
12629
|
maximum: 9,
|
|
@@ -12700,7 +12695,7 @@
|
|
|
12700
12695
|
onBeforeXhrUpload,
|
|
12701
12696
|
onBeforeDelete,
|
|
12702
12697
|
...restProps
|
|
12703
|
-
} = { ...defaultProps$
|
|
12698
|
+
} = { ...defaultProps$K, ...props };
|
|
12704
12699
|
const [fileList, setFileList] = React.useState([]);
|
|
12705
12700
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
12706
12701
|
React.useEffect(() => {
|
|
@@ -12903,7 +12898,7 @@
|
|
|
12903
12898
|
...restProps
|
|
12904
12899
|
}, children && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12905
12900
|
className: "nut-uploader__slot"
|
|
12906
|
-
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children, maximum > fileList.length && /* @__PURE__ */ React__default["default"].createElement(Button
|
|
12901
|
+
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, children, maximum > fileList.length && /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
12907
12902
|
className: "nut-uploader__input",
|
|
12908
12903
|
onClick: chooseImage
|
|
12909
12904
|
}))), fileList.length !== 0 && fileList.map((item, index2) => {
|
|
@@ -12982,15 +12977,15 @@
|
|
|
12982
12977
|
size: uploadIconSize,
|
|
12983
12978
|
color: "#808080",
|
|
12984
12979
|
name: uploadIcon
|
|
12985
|
-
}), /* @__PURE__ */ React__default["default"].createElement(Button
|
|
12980
|
+
}), /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
12986
12981
|
className: "nut-uploader__input",
|
|
12987
12982
|
onClick: chooseImage
|
|
12988
12983
|
})));
|
|
12989
12984
|
};
|
|
12990
12985
|
const Uploader = React__default["default"].forwardRef(InternalUploader);
|
|
12991
|
-
Uploader.defaultProps = defaultProps$
|
|
12986
|
+
Uploader.defaultProps = defaultProps$K;
|
|
12992
12987
|
Uploader.displayName = "NutUploader";
|
|
12993
|
-
const defaultProps$
|
|
12988
|
+
const defaultProps$J = {
|
|
12994
12989
|
data: {
|
|
12995
12990
|
text: "",
|
|
12996
12991
|
value: "",
|
|
@@ -13005,7 +13000,7 @@
|
|
|
13005
13000
|
};
|
|
13006
13001
|
const InternalCascaderItem = (props) => {
|
|
13007
13002
|
const { data, checked, chooseItem } = {
|
|
13008
|
-
...defaultProps$
|
|
13003
|
+
...defaultProps$J,
|
|
13009
13004
|
...props
|
|
13010
13005
|
};
|
|
13011
13006
|
const b2 = cn("cascader-item");
|
|
@@ -13041,7 +13036,7 @@
|
|
|
13041
13036
|
}));
|
|
13042
13037
|
};
|
|
13043
13038
|
const CascaderItem = React__default["default"].forwardRef(InternalCascaderItem);
|
|
13044
|
-
CascaderItem.defaultProps = defaultProps$
|
|
13039
|
+
CascaderItem.defaultProps = defaultProps$J;
|
|
13045
13040
|
CascaderItem.displayName = "NutCascaderItem";
|
|
13046
13041
|
const formatTree = (tree, parent, config2) => tree.map((node) => {
|
|
13047
13042
|
const {
|
|
@@ -13087,10 +13082,10 @@
|
|
|
13087
13082
|
pidKey: "pid",
|
|
13088
13083
|
sortKey: ""
|
|
13089
13084
|
};
|
|
13090
|
-
const convertListToOptions = (list,
|
|
13085
|
+
const convertListToOptions = (list, options) => {
|
|
13091
13086
|
const mergedOptions = {
|
|
13092
13087
|
...defaultConvertConfig,
|
|
13093
|
-
...
|
|
13088
|
+
...options || {}
|
|
13094
13089
|
};
|
|
13095
13090
|
const { topId, idKey, pidKey, sortKey } = mergedOptions;
|
|
13096
13091
|
let result = [];
|
|
@@ -13175,9 +13170,10 @@
|
|
|
13175
13170
|
return pathNodes;
|
|
13176
13171
|
}
|
|
13177
13172
|
}
|
|
13178
|
-
const defaultProps$
|
|
13173
|
+
const defaultProps$I = {
|
|
13179
13174
|
className: "",
|
|
13180
13175
|
style: {},
|
|
13176
|
+
poppable: true,
|
|
13181
13177
|
visible: false,
|
|
13182
13178
|
options: [],
|
|
13183
13179
|
value: [],
|
|
@@ -13204,8 +13200,9 @@
|
|
|
13204
13200
|
const {
|
|
13205
13201
|
className,
|
|
13206
13202
|
style,
|
|
13203
|
+
poppable,
|
|
13207
13204
|
visible,
|
|
13208
|
-
options
|
|
13205
|
+
options,
|
|
13209
13206
|
value,
|
|
13210
13207
|
title,
|
|
13211
13208
|
textKey,
|
|
@@ -13220,7 +13217,7 @@
|
|
|
13220
13217
|
onClose,
|
|
13221
13218
|
onChange,
|
|
13222
13219
|
onPathChange
|
|
13223
|
-
} = { ...defaultProps$
|
|
13220
|
+
} = { ...defaultProps$I, ...props };
|
|
13224
13221
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
13225
13222
|
const [optiosData, setOptiosData] = React.useState([]);
|
|
13226
13223
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.lazyLoad);
|
|
@@ -13263,16 +13260,16 @@
|
|
|
13263
13260
|
}, [value]);
|
|
13264
13261
|
React.useEffect(() => {
|
|
13265
13262
|
initData();
|
|
13266
|
-
}, [
|
|
13263
|
+
}, [options]);
|
|
13267
13264
|
const initData = async () => {
|
|
13268
13265
|
state.lazyLoadMap.clear();
|
|
13269
13266
|
if (convertConfig2 && Object.keys(convertConfig2).length > 0) {
|
|
13270
13267
|
state.optionsData = convertListToOptions(
|
|
13271
|
-
|
|
13268
|
+
options,
|
|
13272
13269
|
convertConfig2
|
|
13273
13270
|
);
|
|
13274
13271
|
} else {
|
|
13275
|
-
state.optionsData =
|
|
13272
|
+
state.optionsData = options;
|
|
13276
13273
|
}
|
|
13277
13274
|
state.tree = new Tree(state.optionsData, {
|
|
13278
13275
|
value: state.configs.valueKey,
|
|
@@ -13423,10 +13420,50 @@
|
|
|
13423
13420
|
}
|
|
13424
13421
|
setOptiosData(state.panes);
|
|
13425
13422
|
};
|
|
13426
|
-
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
|
|
13423
|
+
const renderItem = () => {
|
|
13424
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13425
|
+
className: `${classes} ${className}`,
|
|
13426
|
+
style
|
|
13427
|
+
}, poppable && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13428
|
+
className: b2("title")
|
|
13429
|
+
}, title), /* @__PURE__ */ React__default["default"].createElement(Tabs, {
|
|
13430
|
+
value: tabvalue,
|
|
13431
|
+
titleNode: () => {
|
|
13432
|
+
return optiosData.map((pane, index2) => {
|
|
13433
|
+
var _a, _b;
|
|
13434
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13435
|
+
onClick: () => {
|
|
13436
|
+
setTabvalue(pane.paneKey);
|
|
13437
|
+
state.tabsCursor = index2;
|
|
13438
|
+
},
|
|
13439
|
+
className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
|
|
13440
|
+
key: pane.paneKey
|
|
13441
|
+
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
13442
|
+
className: "nut-tabs__titles-item__text"
|
|
13443
|
+
}, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "\u8BF7\u9009\u62E9", !(!state.initLoading && state.panes.length) && "Loading..."), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
13444
|
+
className: "nut-tabs__titles-item__line"
|
|
13445
|
+
}));
|
|
13446
|
+
});
|
|
13447
|
+
}
|
|
13448
|
+
}, !state.initLoading && state.panes.length ? optiosData.map((pane) => /* @__PURE__ */ React__default["default"].createElement(TabPane, {
|
|
13449
|
+
key: pane.paneKey,
|
|
13450
|
+
paneKey: pane.paneKey
|
|
13451
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13452
|
+
className: classesPane
|
|
13453
|
+
}, pane.nodes && pane.nodes.map((node, index2) => {
|
|
13454
|
+
var _a;
|
|
13455
|
+
return /* @__PURE__ */ React__default["default"].createElement(CascaderItem, {
|
|
13456
|
+
key: index2,
|
|
13457
|
+
...props,
|
|
13458
|
+
data: node,
|
|
13459
|
+
checked: ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value,
|
|
13460
|
+
chooseItem: (node2) => chooseItem(node2, false)
|
|
13461
|
+
});
|
|
13462
|
+
})))) : /* @__PURE__ */ React__default["default"].createElement(TabPane, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13463
|
+
className: classesPane
|
|
13464
|
+
}))));
|
|
13465
|
+
};
|
|
13466
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, poppable ? /* @__PURE__ */ React__default["default"].createElement(Popup, {
|
|
13430
13467
|
popClass: "cascadar-popup",
|
|
13431
13468
|
visible,
|
|
13432
13469
|
position: "bottom",
|
|
@@ -13436,49 +13473,12 @@
|
|
|
13436
13473
|
closeIcon,
|
|
13437
13474
|
onClickOverlay: closePopup,
|
|
13438
13475
|
onClickCloseIcon: closePopup
|
|
13439
|
-
},
|
|
13440
|
-
className: b2("title")
|
|
13441
|
-
}, title), /* @__PURE__ */ React__default["default"].createElement(Tabs, {
|
|
13442
|
-
value: tabvalue,
|
|
13443
|
-
titleNode: () => {
|
|
13444
|
-
return optiosData.map((pane, index2) => {
|
|
13445
|
-
var _a, _b;
|
|
13446
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13447
|
-
onClick: () => {
|
|
13448
|
-
setTabvalue(pane.paneKey);
|
|
13449
|
-
state.tabsCursor = index2;
|
|
13450
|
-
},
|
|
13451
|
-
className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
|
|
13452
|
-
key: pane.paneKey
|
|
13453
|
-
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
13454
|
-
className: "nut-tabs__titles-item__text"
|
|
13455
|
-
}, !state.initLoading && state.panes.length && ((_a = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _a.text), !state.initLoading && state.panes.length && !((_b = pane == null ? void 0 : pane.selectedNode) == null ? void 0 : _b.text) && "\u8BF7\u9009\u62E9", !(!state.initLoading && state.panes.length) && "Loading..."), /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
13456
|
-
className: "nut-tabs__titles-item__line"
|
|
13457
|
-
}));
|
|
13458
|
-
});
|
|
13459
|
-
}
|
|
13460
|
-
}, !state.initLoading && state.panes.length ? optiosData.map((pane) => /* @__PURE__ */ React__default["default"].createElement(TabPane, {
|
|
13461
|
-
key: pane.paneKey,
|
|
13462
|
-
paneKey: pane.paneKey
|
|
13463
|
-
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13464
|
-
className: classesPane
|
|
13465
|
-
}, pane.nodes && pane.nodes.map((node, index2) => {
|
|
13466
|
-
var _a;
|
|
13467
|
-
return /* @__PURE__ */ React__default["default"].createElement(CascaderItem, {
|
|
13468
|
-
key: index2,
|
|
13469
|
-
...props,
|
|
13470
|
-
data: node,
|
|
13471
|
-
checked: ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value,
|
|
13472
|
-
chooseItem: (node2) => chooseItem(node2, false)
|
|
13473
|
-
});
|
|
13474
|
-
})))) : /* @__PURE__ */ React__default["default"].createElement(TabPane, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13475
|
-
className: classesPane
|
|
13476
|
-
})))));
|
|
13476
|
+
}, renderItem()) : renderItem());
|
|
13477
13477
|
};
|
|
13478
13478
|
const Cascader = React__default["default"].forwardRef(InternalCascader);
|
|
13479
|
-
Cascader.defaultProps = defaultProps$
|
|
13479
|
+
Cascader.defaultProps = defaultProps$I;
|
|
13480
13480
|
Cascader.displayName = "NutCascader";
|
|
13481
|
-
const defaultProps$
|
|
13481
|
+
const defaultProps$H = {
|
|
13482
13482
|
...ComponentDefaults,
|
|
13483
13483
|
placeholder: "",
|
|
13484
13484
|
shape: "square",
|
|
@@ -13528,7 +13528,7 @@
|
|
|
13528
13528
|
iconClassPrefix,
|
|
13529
13529
|
iconFontClassName
|
|
13530
13530
|
} = {
|
|
13531
|
-
...defaultProps$
|
|
13531
|
+
...defaultProps$H,
|
|
13532
13532
|
...props
|
|
13533
13533
|
};
|
|
13534
13534
|
const alignClass = `${align}`;
|
|
@@ -13667,9 +13667,9 @@
|
|
|
13667
13667
|
className: `${searchbarBem("content")}`
|
|
13668
13668
|
}, renderLeftinIcon(), renderField(), renderRightinIcon(), clearable && value && handleClear()), renderRightoutIcon(), renderRightLabel());
|
|
13669
13669
|
};
|
|
13670
|
-
SearchBar.defaultProps = defaultProps$
|
|
13670
|
+
SearchBar.defaultProps = defaultProps$H;
|
|
13671
13671
|
SearchBar.displayName = "NutSearchBar";
|
|
13672
|
-
const defaultProps$
|
|
13672
|
+
const defaultProps$G = {
|
|
13673
13673
|
confirmText: "",
|
|
13674
13674
|
title: "",
|
|
13675
13675
|
visible: false,
|
|
@@ -13867,9 +13867,9 @@
|
|
|
13867
13867
|
})
|
|
13868
13868
|
}, confirmText || locale.done))) : null))));
|
|
13869
13869
|
};
|
|
13870
|
-
NumberKeyboard.defaultProps = defaultProps$
|
|
13870
|
+
NumberKeyboard.defaultProps = defaultProps$G;
|
|
13871
13871
|
NumberKeyboard.displayName = "NutNumberKeyboard";
|
|
13872
|
-
const defaultProps$
|
|
13872
|
+
const defaultProps$F = {
|
|
13873
13873
|
cancelTxt: "",
|
|
13874
13874
|
optionTag: "name",
|
|
13875
13875
|
optionSubTag: "subname",
|
|
@@ -13903,7 +13903,7 @@
|
|
|
13903
13903
|
className,
|
|
13904
13904
|
style,
|
|
13905
13905
|
...rest
|
|
13906
|
-
} = { ...defaultProps$
|
|
13906
|
+
} = { ...defaultProps$F, ...props };
|
|
13907
13907
|
const b2 = cn("actionsheet");
|
|
13908
13908
|
const isHighlight = (item) => {
|
|
13909
13909
|
return props.chooseTagValue && props.chooseTagValue === item[props.optionTag || "name"] ? props.color : "#1a1a1a";
|
|
@@ -13947,9 +13947,9 @@
|
|
|
13947
13947
|
onClick: () => cancelActionSheet()
|
|
13948
13948
|
}, cancelTxt)));
|
|
13949
13949
|
};
|
|
13950
|
-
ActionSheet.defaultProps = defaultProps$
|
|
13950
|
+
ActionSheet.defaultProps = defaultProps$F;
|
|
13951
13951
|
ActionSheet.displayName = "NutActionSheet";
|
|
13952
|
-
const defaultProps$
|
|
13952
|
+
const defaultProps$E = {
|
|
13953
13953
|
...ComponentDefaults,
|
|
13954
13954
|
bottom: 20,
|
|
13955
13955
|
right: 10,
|
|
@@ -13975,7 +13975,7 @@
|
|
|
13975
13975
|
iconClassPrefix,
|
|
13976
13976
|
iconFontClassName
|
|
13977
13977
|
} = {
|
|
13978
|
-
...defaultProps$
|
|
13978
|
+
...defaultProps$E,
|
|
13979
13979
|
...props
|
|
13980
13980
|
};
|
|
13981
13981
|
const [backTop, SetBackTop] = React.useState(false);
|
|
@@ -14066,9 +14066,9 @@
|
|
|
14066
14066
|
name: "top"
|
|
14067
14067
|
}));
|
|
14068
14068
|
};
|
|
14069
|
-
BackTop.defaultProps = defaultProps$
|
|
14069
|
+
BackTop.defaultProps = defaultProps$E;
|
|
14070
14070
|
BackTop.displayName = "NutBackTop";
|
|
14071
|
-
const defaultProps$
|
|
14071
|
+
const defaultProps$D = {
|
|
14072
14072
|
attract: false,
|
|
14073
14073
|
direction: void 0,
|
|
14074
14074
|
boundary: {
|
|
@@ -14081,7 +14081,7 @@
|
|
|
14081
14081
|
};
|
|
14082
14082
|
const Drag = (props) => {
|
|
14083
14083
|
const { attract, direction, boundary, children, className, style, ...reset } = {
|
|
14084
|
-
...defaultProps$
|
|
14084
|
+
...defaultProps$D,
|
|
14085
14085
|
...props
|
|
14086
14086
|
};
|
|
14087
14087
|
const b2 = cn("drag");
|
|
@@ -14143,7 +14143,7 @@
|
|
|
14143
14143
|
...bind()
|
|
14144
14144
|
}, children));
|
|
14145
14145
|
};
|
|
14146
|
-
Drag.defaultProps = defaultProps$
|
|
14146
|
+
Drag.defaultProps = defaultProps$D;
|
|
14147
14147
|
Drag.displayName = "NutDrag";
|
|
14148
14148
|
const Content = (props) => {
|
|
14149
14149
|
const {
|
|
@@ -14242,326 +14242,22 @@
|
|
|
14242
14242
|
}));
|
|
14243
14243
|
};
|
|
14244
14244
|
DialogWrapper.displayName = "NutDialogWrapper";
|
|
14245
|
-
const defaultProps$
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14257
|
-
|
|
14258
|
-
children: void 0,
|
|
14259
|
-
onClick: (e2) => {
|
|
14260
|
-
}
|
|
14245
|
+
const defaultProps$C = {
|
|
14246
|
+
okText: "",
|
|
14247
|
+
cancelText: "",
|
|
14248
|
+
mask: true,
|
|
14249
|
+
closeOnClickOverlay: true,
|
|
14250
|
+
noFooter: false,
|
|
14251
|
+
noOkBtn: false,
|
|
14252
|
+
noCancelBtn: false,
|
|
14253
|
+
okBtnDisabled: false,
|
|
14254
|
+
cancelAutoClose: true,
|
|
14255
|
+
textAlign: "center",
|
|
14256
|
+
footerDirection: "horizontal",
|
|
14257
|
+
lockScroll: false
|
|
14261
14258
|
};
|
|
14262
|
-
const
|
|
14263
|
-
const {
|
|
14264
|
-
color,
|
|
14265
|
-
shape,
|
|
14266
|
-
plain,
|
|
14267
|
-
loading,
|
|
14268
|
-
disabled,
|
|
14269
|
-
type,
|
|
14270
|
-
size,
|
|
14271
|
-
block,
|
|
14272
|
-
icon,
|
|
14273
|
-
children,
|
|
14274
|
-
onClick,
|
|
14275
|
-
className,
|
|
14276
|
-
style,
|
|
14277
|
-
iconClassPrefix,
|
|
14278
|
-
iconFontClassName,
|
|
14279
|
-
...rest
|
|
14280
|
-
} = {
|
|
14281
|
-
...defaultProps$E,
|
|
14282
|
-
...props
|
|
14283
|
-
};
|
|
14284
|
-
const getStyle = React.useCallback(() => {
|
|
14285
|
-
const style2 = {};
|
|
14286
|
-
if (color) {
|
|
14287
|
-
if (plain) {
|
|
14288
|
-
style2.color = color;
|
|
14289
|
-
style2.background = "#fff";
|
|
14290
|
-
if (!(color == null ? void 0 : color.includes("gradient"))) {
|
|
14291
|
-
style2.borderColor = color;
|
|
14292
|
-
}
|
|
14293
|
-
} else {
|
|
14294
|
-
style2.color = "#fff";
|
|
14295
|
-
style2.background = color;
|
|
14296
|
-
}
|
|
14297
|
-
}
|
|
14298
|
-
return style2;
|
|
14299
|
-
}, [color, plain]);
|
|
14300
|
-
const classes = React.useCallback(() => {
|
|
14301
|
-
const prefixCls = "nut-button";
|
|
14302
|
-
return [
|
|
14303
|
-
prefixCls,
|
|
14304
|
-
`${type ? `${prefixCls}--${type}` : ""}`,
|
|
14305
|
-
`${size ? `${prefixCls}--${size}` : ""}`,
|
|
14306
|
-
`${shape ? `${prefixCls}--${shape}` : ""}`,
|
|
14307
|
-
`${plain ? `${prefixCls}--plain` : ""}`,
|
|
14308
|
-
`${block ? `${prefixCls}--block` : ""}`,
|
|
14309
|
-
`${disabled ? `${prefixCls}--disabled` : ""}`,
|
|
14310
|
-
`${loading ? `${prefixCls}--loading` : ""}`
|
|
14311
|
-
].filter(Boolean).join(" ");
|
|
14312
|
-
}, [block, disabled, loading, plain, shape, size, type]);
|
|
14313
|
-
const [btnName, setBtnName] = React.useState(classes());
|
|
14314
|
-
const [btnStyle, setBtnStyle] = React.useState(getStyle());
|
|
14315
|
-
React.useEffect(() => {
|
|
14316
|
-
setBtnName(classes());
|
|
14317
|
-
setBtnStyle(getStyle());
|
|
14318
|
-
}, [
|
|
14319
|
-
className,
|
|
14320
|
-
color,
|
|
14321
|
-
shape,
|
|
14322
|
-
plain,
|
|
14323
|
-
loading,
|
|
14324
|
-
disabled,
|
|
14325
|
-
style,
|
|
14326
|
-
type,
|
|
14327
|
-
size,
|
|
14328
|
-
block,
|
|
14329
|
-
icon,
|
|
14330
|
-
children,
|
|
14331
|
-
onClick,
|
|
14332
|
-
classes,
|
|
14333
|
-
getStyle
|
|
14334
|
-
]);
|
|
14335
|
-
const handleClick2 = (e2) => {
|
|
14336
|
-
if (!loading && !disabled && onClick) {
|
|
14337
|
-
onClick(e2);
|
|
14338
|
-
}
|
|
14339
|
-
};
|
|
14340
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14341
|
-
className: `${btnName} ${className}`,
|
|
14342
|
-
style: { ...btnStyle, ...style },
|
|
14343
|
-
...rest,
|
|
14344
|
-
onClick: (e2) => handleClick2(e2)
|
|
14345
|
-
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14346
|
-
className: "nut-button__warp",
|
|
14347
|
-
style: getStyle()
|
|
14348
|
-
}, loading && /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
14349
|
-
classPrefix: iconClassPrefix,
|
|
14350
|
-
fontClassName: iconFontClassName,
|
|
14351
|
-
name: "loading"
|
|
14352
|
-
}), !loading && icon ? /* @__PURE__ */ React__default["default"].createElement(Icon, {
|
|
14353
|
-
classPrefix: iconClassPrefix,
|
|
14354
|
-
fontClassName: iconFontClassName,
|
|
14355
|
-
name: icon
|
|
14356
|
-
}) : "", children));
|
|
14357
|
-
};
|
|
14358
|
-
Button.defaultProps = defaultProps$E;
|
|
14359
|
-
Button.displayName = "NutButton";
|
|
14360
|
-
const defaultProps$D = {
|
|
14361
|
-
okText: "\u786E\u8BA4",
|
|
14362
|
-
cancelText: "\u53D6\u6D88",
|
|
14363
|
-
mask: true,
|
|
14364
|
-
closeOnClickOverlay: true,
|
|
14365
|
-
noFooter: false,
|
|
14366
|
-
noOkBtn: false,
|
|
14367
|
-
noCancelBtn: false,
|
|
14368
|
-
okBtnDisabled: false,
|
|
14369
|
-
cancelAutoClose: true,
|
|
14370
|
-
textAlign: "center",
|
|
14371
|
-
footerDirection: "horizontal",
|
|
14372
|
-
lockScroll: false
|
|
14373
|
-
};
|
|
14374
|
-
const BaseDialog$1 = (props, ref) => {
|
|
14375
|
-
const {
|
|
14376
|
-
visible,
|
|
14377
|
-
footer,
|
|
14378
|
-
noFooter,
|
|
14379
|
-
noOkBtn,
|
|
14380
|
-
noCancelBtn,
|
|
14381
|
-
lockScroll,
|
|
14382
|
-
okBtnDisabled,
|
|
14383
|
-
cancelAutoClose,
|
|
14384
|
-
okText,
|
|
14385
|
-
cancelText,
|
|
14386
|
-
onClosed,
|
|
14387
|
-
onCancel,
|
|
14388
|
-
onOk,
|
|
14389
|
-
...restProps
|
|
14390
|
-
} = props;
|
|
14391
|
-
const renderFooter = function() {
|
|
14392
|
-
if (footer === null || noFooter)
|
|
14393
|
-
return "";
|
|
14394
|
-
const handleCancel = (e2) => {
|
|
14395
|
-
e2.stopPropagation();
|
|
14396
|
-
if (!cancelAutoClose)
|
|
14397
|
-
return;
|
|
14398
|
-
onClosed == null ? void 0 : onClosed();
|
|
14399
|
-
onCancel == null ? void 0 : onCancel();
|
|
14400
|
-
if (lockScroll && visible) {
|
|
14401
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
14402
|
-
}
|
|
14403
|
-
};
|
|
14404
|
-
const handleOk = (e2) => {
|
|
14405
|
-
e2.stopPropagation();
|
|
14406
|
-
onClosed == null ? void 0 : onClosed();
|
|
14407
|
-
onOk == null ? void 0 : onOk(e2);
|
|
14408
|
-
if (lockScroll && visible) {
|
|
14409
|
-
document.body.classList.remove("nut-overflow-hidden");
|
|
14410
|
-
}
|
|
14411
|
-
};
|
|
14412
|
-
const footerContent = footer || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, !noCancelBtn && /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
14413
|
-
size: "small",
|
|
14414
|
-
plain: true,
|
|
14415
|
-
type: "primary",
|
|
14416
|
-
className: "nut-dialog__footer-cancel",
|
|
14417
|
-
onClick: handleCancel
|
|
14418
|
-
}, cancelText), !noOkBtn && /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
14419
|
-
size: "small",
|
|
14420
|
-
type: "primary",
|
|
14421
|
-
className: classNames("nut-dialog__footer-ok", {
|
|
14422
|
-
disabled: okBtnDisabled
|
|
14423
|
-
}),
|
|
14424
|
-
disabled: okBtnDisabled,
|
|
14425
|
-
onClick: handleOk
|
|
14426
|
-
}, okText));
|
|
14427
|
-
return footerContent;
|
|
14428
|
-
};
|
|
14429
|
-
return /* @__PURE__ */ React__default["default"].createElement(DialogWrapper, {
|
|
14430
|
-
...restProps,
|
|
14431
|
-
visible,
|
|
14432
|
-
lockScroll,
|
|
14433
|
-
footer: renderFooter(),
|
|
14434
|
-
onClosed,
|
|
14435
|
-
onCancel
|
|
14436
|
-
});
|
|
14437
|
-
};
|
|
14438
|
-
const Dialog$1 = React.forwardRef(BaseDialog$1);
|
|
14439
|
-
Dialog$1.confirm = (props) => {
|
|
14440
|
-
return confirm(props);
|
|
14441
|
-
};
|
|
14442
|
-
["alert"].forEach((type) => {
|
|
14443
|
-
Dialog$1[type] = (props) => {
|
|
14444
|
-
return confirm({
|
|
14445
|
-
...props,
|
|
14446
|
-
isNotice: false,
|
|
14447
|
-
noticeType: type
|
|
14448
|
-
});
|
|
14449
|
-
};
|
|
14450
|
-
});
|
|
14451
|
-
Dialog$1.defaultProps = defaultProps$D;
|
|
14452
|
-
Dialog$1.displayName = "NutDialog";
|
|
14453
|
-
function ConfirmDialog(props) {
|
|
14454
|
-
return /* @__PURE__ */ React__default["default"].createElement(Dialog$1, {
|
|
14455
|
-
...props
|
|
14456
|
-
}, props.content);
|
|
14457
|
-
}
|
|
14458
|
-
const normalizeConfig = (_config) => {
|
|
14459
|
-
if (_config.isNotice) {
|
|
14460
|
-
let { icon } = _config;
|
|
14461
|
-
if (!icon && icon !== null) {
|
|
14462
|
-
switch (_config.noticeType) {
|
|
14463
|
-
case "alert":
|
|
14464
|
-
icon = "";
|
|
14465
|
-
break;
|
|
14466
|
-
}
|
|
14467
|
-
}
|
|
14468
|
-
_config.noCancelBtn = true;
|
|
14469
|
-
}
|
|
14470
|
-
return _config;
|
|
14471
|
-
};
|
|
14472
|
-
function confirm(config2, renderFunc) {
|
|
14473
|
-
const div = document.createElement("div");
|
|
14474
|
-
document.body.appendChild(div);
|
|
14475
|
-
function render2(props) {
|
|
14476
|
-
ReactDOM__default["default"].render(/* @__PURE__ */ React__default["default"].createElement(ConfirmDialog, {
|
|
14477
|
-
...props,
|
|
14478
|
-
onCancel
|
|
14479
|
-
}), div);
|
|
14480
|
-
}
|
|
14481
|
-
const renderFunction = renderFunc || render2;
|
|
14482
|
-
let dialogConfig = {
|
|
14483
|
-
...config2,
|
|
14484
|
-
visible: false
|
|
14485
|
-
};
|
|
14486
|
-
const onOk = () => {
|
|
14487
|
-
let ret;
|
|
14488
|
-
const _onOk = config2.onOk || config2.onConfirm;
|
|
14489
|
-
if (_onOk) {
|
|
14490
|
-
ret = _onOk();
|
|
14491
|
-
}
|
|
14492
|
-
if (ret && ret.then) {
|
|
14493
|
-
renderFunction(dialogConfig);
|
|
14494
|
-
ret.then(
|
|
14495
|
-
() => {
|
|
14496
|
-
onCancel(true);
|
|
14497
|
-
},
|
|
14498
|
-
(e2) => {
|
|
14499
|
-
console.error(e2);
|
|
14500
|
-
renderFunction(dialogConfig);
|
|
14501
|
-
}
|
|
14502
|
-
);
|
|
14503
|
-
}
|
|
14504
|
-
if (!ret) {
|
|
14505
|
-
onCancel(true);
|
|
14506
|
-
}
|
|
14507
|
-
};
|
|
14508
|
-
dialogConfig.onOk = onOk;
|
|
14509
|
-
dialogConfig = normalizeConfig(dialogConfig);
|
|
14510
|
-
dialogConfig.visible = true;
|
|
14511
|
-
renderFunction(dialogConfig);
|
|
14512
|
-
function destroy() {
|
|
14513
|
-
const unmountEle = ReactDOM__default["default"].unmountComponentAtNode(div);
|
|
14514
|
-
if (unmountEle && div.parentNode) {
|
|
14515
|
-
div.parentNode.removeChild(div);
|
|
14516
|
-
}
|
|
14517
|
-
}
|
|
14518
|
-
function onCancel(isOnOk) {
|
|
14519
|
-
!isOnOk && config2.onCancel && config2.onCancel();
|
|
14520
|
-
dialogConfig.visible = false;
|
|
14521
|
-
dialogConfig.onClosed = () => {
|
|
14522
|
-
config2.onClosed && config2.onClosed();
|
|
14523
|
-
destroy();
|
|
14524
|
-
};
|
|
14525
|
-
renderFunction(dialogConfig);
|
|
14526
|
-
}
|
|
14527
|
-
function update2(newConfig) {
|
|
14528
|
-
dialogConfig = {
|
|
14529
|
-
...dialogConfig,
|
|
14530
|
-
title: config2.title,
|
|
14531
|
-
...newConfig
|
|
14532
|
-
};
|
|
14533
|
-
dialogConfig = normalizeConfig(dialogConfig);
|
|
14534
|
-
renderFunction(dialogConfig);
|
|
14535
|
-
}
|
|
14536
|
-
function close() {
|
|
14537
|
-
dialogConfig.visible = false;
|
|
14538
|
-
dialogConfig.onClosed = () => {
|
|
14539
|
-
config2.onClosed && config2.onClosed();
|
|
14540
|
-
destroy();
|
|
14541
|
-
};
|
|
14542
|
-
renderFunction(dialogConfig);
|
|
14543
|
-
}
|
|
14544
|
-
return {
|
|
14545
|
-
close,
|
|
14546
|
-
update: update2
|
|
14547
|
-
};
|
|
14548
|
-
}
|
|
14549
|
-
const defaultProps$C = {
|
|
14550
|
-
okText: "",
|
|
14551
|
-
cancelText: "",
|
|
14552
|
-
mask: true,
|
|
14553
|
-
closeOnClickOverlay: true,
|
|
14554
|
-
noFooter: false,
|
|
14555
|
-
noOkBtn: false,
|
|
14556
|
-
noCancelBtn: false,
|
|
14557
|
-
okBtnDisabled: false,
|
|
14558
|
-
cancelAutoClose: true,
|
|
14559
|
-
textAlign: "center",
|
|
14560
|
-
footerDirection: "horizontal",
|
|
14561
|
-
lockScroll: false
|
|
14562
|
-
};
|
|
14563
|
-
const BaseDialog = (props, ref) => {
|
|
14564
|
-
const { locale } = useConfig$1();
|
|
14259
|
+
const BaseDialog = (props, ref) => {
|
|
14260
|
+
const { locale } = useConfig$1();
|
|
14565
14261
|
const {
|
|
14566
14262
|
visible,
|
|
14567
14263
|
footer,
|
|
@@ -14598,13 +14294,13 @@
|
|
|
14598
14294
|
document.body.classList.remove("nut-overflow-hidden");
|
|
14599
14295
|
}
|
|
14600
14296
|
};
|
|
14601
|
-
const footerContent = footer || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, !noCancelBtn && /* @__PURE__ */ React__default["default"].createElement(Button
|
|
14297
|
+
const footerContent = footer || /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, !noCancelBtn && /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
14602
14298
|
size: "small",
|
|
14603
14299
|
plain: true,
|
|
14604
14300
|
type: "primary",
|
|
14605
14301
|
className: "nut-dialog__footer-cancel",
|
|
14606
14302
|
onClick: (e2) => handleCancel(e2)
|
|
14607
|
-
}, cancelText || locale.cancel), !noOkBtn && /* @__PURE__ */ React__default["default"].createElement(Button
|
|
14303
|
+
}, cancelText || locale.cancel), !noOkBtn && /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
14608
14304
|
size: "small",
|
|
14609
14305
|
type: "primary",
|
|
14610
14306
|
className: classNames("nut-dialog__footer-ok", {
|
|
@@ -14612,7 +14308,7 @@
|
|
|
14612
14308
|
}),
|
|
14613
14309
|
disabled: okBtnDisabled,
|
|
14614
14310
|
onClick: (e2) => handleOk(e2)
|
|
14615
|
-
}, okText
|
|
14311
|
+
}, okText));
|
|
14616
14312
|
return footerContent;
|
|
14617
14313
|
};
|
|
14618
14314
|
return /* @__PURE__ */ React__default["default"].createElement(DialogWrapper, {
|
|
@@ -14625,18 +14321,6 @@
|
|
|
14625
14321
|
});
|
|
14626
14322
|
};
|
|
14627
14323
|
const Dialog = React.forwardRef(BaseDialog);
|
|
14628
|
-
Dialog.confirm = (props) => {
|
|
14629
|
-
return confirm(props);
|
|
14630
|
-
};
|
|
14631
|
-
["alert"].forEach((type) => {
|
|
14632
|
-
Dialog[type] = (props) => {
|
|
14633
|
-
return confirm({
|
|
14634
|
-
...props,
|
|
14635
|
-
isNotice: false,
|
|
14636
|
-
noticeType: type
|
|
14637
|
-
});
|
|
14638
|
-
};
|
|
14639
|
-
});
|
|
14640
14324
|
Dialog.defaultProps = defaultProps$C;
|
|
14641
14325
|
Dialog.displayName = "NutDialog";
|
|
14642
14326
|
var index_cjs$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -14776,7 +14460,6 @@
|
|
|
14776
14460
|
className: classes,
|
|
14777
14461
|
scrollY: true,
|
|
14778
14462
|
id: "scroller",
|
|
14779
|
-
style: { height: "100%" },
|
|
14780
14463
|
onScroll: scrollAction2,
|
|
14781
14464
|
onScrollToLower: lower,
|
|
14782
14465
|
onTouchStart: touchStart,
|
|
@@ -14814,211 +14497,103 @@
|
|
|
14814
14497
|
};
|
|
14815
14498
|
Infiniteloading.defaultProps = defaultProps$B;
|
|
14816
14499
|
Infiniteloading.displayName = "NutInfiniteloading";
|
|
14817
|
-
|
|
14818
|
-
const { version } = ReactDOM__namespace;
|
|
14819
|
-
const reactDOMClone = {
|
|
14820
|
-
...ReactDOM__namespace
|
|
14821
|
-
};
|
|
14822
|
-
try {
|
|
14823
|
-
const mainVersion = Number((version || "").split(".")[0]);
|
|
14824
|
-
if (mainVersion >= 18) {
|
|
14825
|
-
createRoot = reactDOMClone.createRoot;
|
|
14826
|
-
}
|
|
14827
|
-
} catch (e2) {
|
|
14828
|
-
console.log(e2);
|
|
14829
|
-
}
|
|
14830
|
-
function legacyRender(node, container) {
|
|
14831
|
-
ReactDOM__namespace.render(node, container);
|
|
14832
|
-
}
|
|
14833
|
-
function concurrentRender(node, container) {
|
|
14834
|
-
if (createRoot) {
|
|
14835
|
-
const root = createRoot(container);
|
|
14836
|
-
root.render(node);
|
|
14837
|
-
}
|
|
14838
|
-
}
|
|
14839
|
-
function render(node, container) {
|
|
14840
|
-
if (createRoot) {
|
|
14841
|
-
concurrentRender(node, container);
|
|
14842
|
-
return;
|
|
14843
|
-
}
|
|
14844
|
-
legacyRender(node, container);
|
|
14845
|
-
}
|
|
14846
|
-
class Notification extends React__namespace.PureComponent {
|
|
14847
|
-
constructor(props) {
|
|
14848
|
-
super(props);
|
|
14849
|
-
this.close = this.close.bind(this);
|
|
14850
|
-
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
14851
|
-
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
14852
|
-
this.clickCover = this.clickCover.bind(this);
|
|
14853
|
-
this.state = {
|
|
14854
|
-
show: true
|
|
14855
|
-
};
|
|
14856
|
-
}
|
|
14857
|
-
close() {
|
|
14858
|
-
this.setState({
|
|
14859
|
-
show: false
|
|
14860
|
-
});
|
|
14861
|
-
this.clearCloseTimer();
|
|
14862
|
-
if (this.props.id) {
|
|
14863
|
-
const element = document.getElementById(this.props.id);
|
|
14864
|
-
element && element.parentNode && element.parentNode.removeChild(element);
|
|
14865
|
-
}
|
|
14866
|
-
this.props.onClosed();
|
|
14867
|
-
}
|
|
14868
|
-
startCloseTimer() {
|
|
14869
|
-
const { duration } = this.props;
|
|
14870
|
-
if (duration) {
|
|
14871
|
-
this.closeTimer = window.setTimeout(() => {
|
|
14872
|
-
this.close();
|
|
14873
|
-
}, duration);
|
|
14874
|
-
}
|
|
14875
|
-
}
|
|
14876
|
-
clearCloseTimer() {
|
|
14877
|
-
if (this.closeTimer) {
|
|
14878
|
-
clearTimeout(this.closeTimer);
|
|
14879
|
-
this.closeTimer = -1;
|
|
14880
|
-
}
|
|
14881
|
-
}
|
|
14882
|
-
clickCover() {
|
|
14883
|
-
this.props.onClick();
|
|
14884
|
-
}
|
|
14885
|
-
componentDidMount() {
|
|
14886
|
-
this.startCloseTimer();
|
|
14887
|
-
}
|
|
14888
|
-
componentWillUnmount() {
|
|
14889
|
-
this.clearCloseTimer();
|
|
14890
|
-
}
|
|
14891
|
-
render() {
|
|
14892
|
-
const {
|
|
14893
|
-
children,
|
|
14894
|
-
style,
|
|
14895
|
-
msg,
|
|
14896
|
-
color,
|
|
14897
|
-
background,
|
|
14898
|
-
type,
|
|
14899
|
-
className,
|
|
14900
|
-
position,
|
|
14901
|
-
isWrapTeleport
|
|
14902
|
-
} = this.props;
|
|
14903
|
-
this.state;
|
|
14904
|
-
cn("notify");
|
|
14905
|
-
const classes = classNames({
|
|
14906
|
-
"popup-top": position === "top",
|
|
14907
|
-
"popup-bottom": position === "bottom",
|
|
14908
|
-
"nut-notify": true,
|
|
14909
|
-
[`nut-notify--${type}`]: true
|
|
14910
|
-
});
|
|
14911
|
-
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, /* @__PURE__ */ React__namespace.createElement(CSSTransition$1, {
|
|
14912
|
-
in: this.state.show,
|
|
14913
|
-
timeout: 300,
|
|
14914
|
-
classNames: "fade",
|
|
14915
|
-
unmountOnExit: true,
|
|
14916
|
-
appear: true,
|
|
14917
|
-
position,
|
|
14918
|
-
isWrapTeleport
|
|
14919
|
-
}, /* @__PURE__ */ React__namespace.createElement("div", {
|
|
14920
|
-
className: `${classes} ${className}`,
|
|
14921
|
-
style: {
|
|
14922
|
-
color: `${color || ""}`,
|
|
14923
|
-
background: `${background || ""}`
|
|
14924
|
-
},
|
|
14925
|
-
onClick: this.clickCover
|
|
14926
|
-
}, children || msg)));
|
|
14927
|
-
}
|
|
14928
|
-
}
|
|
14929
|
-
Notification.newInstance = (properties, callback) => {
|
|
14930
|
-
const element = document.createElement("div");
|
|
14931
|
-
const id = properties.id ? properties.id : `${new Date().getTime()}`;
|
|
14932
|
-
element.id = id;
|
|
14933
|
-
properties.id = id;
|
|
14934
|
-
document.body.appendChild(element);
|
|
14935
|
-
let called = false;
|
|
14936
|
-
function ref(instance) {
|
|
14937
|
-
if (called) {
|
|
14938
|
-
return;
|
|
14939
|
-
}
|
|
14940
|
-
called = true;
|
|
14941
|
-
callback({
|
|
14942
|
-
component: instance,
|
|
14943
|
-
destroy() {
|
|
14944
|
-
setTimeout(() => {
|
|
14945
|
-
ReactDOM__namespace.unmountComponentAtNode(element);
|
|
14946
|
-
element && element.parentNode && element.parentNode.removeChild(element);
|
|
14947
|
-
}, 300);
|
|
14948
|
-
}
|
|
14949
|
-
});
|
|
14950
|
-
}
|
|
14951
|
-
render(/* @__PURE__ */ React__namespace.createElement(Notification, {
|
|
14952
|
-
...properties,
|
|
14953
|
-
ref
|
|
14954
|
-
}), element);
|
|
14955
|
-
};
|
|
14956
|
-
let messageInstance = null;
|
|
14957
|
-
const options = {
|
|
14958
|
-
msg: "",
|
|
14500
|
+
const defaultProps$A = {
|
|
14959
14501
|
id: "",
|
|
14960
|
-
|
|
14502
|
+
msg: "",
|
|
14961
14503
|
color: "",
|
|
14504
|
+
duration: 3e3,
|
|
14962
14505
|
type: "danger",
|
|
14963
14506
|
className: "",
|
|
14507
|
+
background: "",
|
|
14964
14508
|
position: "top",
|
|
14965
14509
|
isWrapTeleport: true,
|
|
14510
|
+
visible: false,
|
|
14966
14511
|
onClosed: () => {
|
|
14967
14512
|
},
|
|
14968
14513
|
onClick: () => {
|
|
14969
14514
|
}
|
|
14970
14515
|
};
|
|
14971
|
-
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
},
|
|
14998
|
-
success(msg, option = {}) {
|
|
14999
|
-
errorMsg(msg);
|
|
15000
|
-
return notice({ msg, type: "success", ...option });
|
|
15001
|
-
},
|
|
15002
|
-
primary(msg, option = {}) {
|
|
15003
|
-
errorMsg(msg);
|
|
15004
|
-
return notice({ msg, type: "primary", ...option });
|
|
15005
|
-
},
|
|
15006
|
-
danger(msg, option = {}) {
|
|
15007
|
-
errorMsg(msg);
|
|
15008
|
-
return notice({ msg, type: "danger", ...option });
|
|
15009
|
-
},
|
|
15010
|
-
warn(msg, option = {}) {
|
|
15011
|
-
errorMsg(msg);
|
|
15012
|
-
return notice({ msg, type: "warning", ...option });
|
|
15013
|
-
},
|
|
15014
|
-
hide() {
|
|
15015
|
-
if (messageInstance) {
|
|
15016
|
-
messageInstance.destroy();
|
|
15017
|
-
messageInstance = null;
|
|
14516
|
+
const Notify = (props) => {
|
|
14517
|
+
const {
|
|
14518
|
+
id,
|
|
14519
|
+
children,
|
|
14520
|
+
style,
|
|
14521
|
+
msg,
|
|
14522
|
+
color,
|
|
14523
|
+
background,
|
|
14524
|
+
type,
|
|
14525
|
+
className,
|
|
14526
|
+
position,
|
|
14527
|
+
isWrapTeleport,
|
|
14528
|
+
visible,
|
|
14529
|
+
duration,
|
|
14530
|
+
onClosed,
|
|
14531
|
+
onClick,
|
|
14532
|
+
...rest
|
|
14533
|
+
} = { ...defaultProps$A, ...props };
|
|
14534
|
+
let timer;
|
|
14535
|
+
const [showNotify, SetShow] = React.useState(false);
|
|
14536
|
+
React.useEffect(() => {
|
|
14537
|
+
if (visible) {
|
|
14538
|
+
SetShow(true);
|
|
14539
|
+
show();
|
|
14540
|
+
} else {
|
|
14541
|
+
hide();
|
|
15018
14542
|
}
|
|
15019
|
-
}
|
|
14543
|
+
}, [visible]);
|
|
14544
|
+
const clickHandle = () => {
|
|
14545
|
+
onClick();
|
|
14546
|
+
};
|
|
14547
|
+
const show = () => {
|
|
14548
|
+
clearTimer();
|
|
14549
|
+
if (duration) {
|
|
14550
|
+
timer = setTimeout(() => {
|
|
14551
|
+
hide();
|
|
14552
|
+
}, duration);
|
|
14553
|
+
}
|
|
14554
|
+
};
|
|
14555
|
+
const clearTimer = () => {
|
|
14556
|
+
if (timer) {
|
|
14557
|
+
clearTimeout(timer);
|
|
14558
|
+
timer = null;
|
|
14559
|
+
}
|
|
14560
|
+
};
|
|
14561
|
+
const hide = () => {
|
|
14562
|
+
SetShow(false);
|
|
14563
|
+
if (id) {
|
|
14564
|
+
const element = document.getElementById(id);
|
|
14565
|
+
element && element.parentNode && element.parentNode.removeChild(element);
|
|
14566
|
+
}
|
|
14567
|
+
onClosed();
|
|
14568
|
+
};
|
|
14569
|
+
cn("notify");
|
|
14570
|
+
const classes = classNames({
|
|
14571
|
+
"popup-top": position === "top",
|
|
14572
|
+
"popup-bottom": position === "bottom",
|
|
14573
|
+
"nut-notify": true,
|
|
14574
|
+
[`nut-notify--${type}`]: true
|
|
14575
|
+
});
|
|
14576
|
+
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(CSSTransition$1, {
|
|
14577
|
+
in: showNotify,
|
|
14578
|
+
timeout: 300,
|
|
14579
|
+
classNames: "fade",
|
|
14580
|
+
unmountOnExit: true,
|
|
14581
|
+
appear: true,
|
|
14582
|
+
position,
|
|
14583
|
+
isWrapTeleport,
|
|
14584
|
+
id
|
|
14585
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14586
|
+
className: `${classes} ${className}`,
|
|
14587
|
+
style: {
|
|
14588
|
+
color: `${color || ""}`,
|
|
14589
|
+
background: `${background || ""}`
|
|
14590
|
+
},
|
|
14591
|
+
onClick: clickHandle
|
|
14592
|
+
}, children || msg)));
|
|
15020
14593
|
};
|
|
15021
|
-
|
|
14594
|
+
Notify.defaultProps = defaultProps$A;
|
|
14595
|
+
Notify.displayName = "NutNotify";
|
|
14596
|
+
const defaultProps$z = {
|
|
15022
14597
|
isAsync: false,
|
|
15023
14598
|
checked: false,
|
|
15024
14599
|
disable: false,
|
|
@@ -15041,7 +14616,7 @@
|
|
|
15041
14616
|
className,
|
|
15042
14617
|
style
|
|
15043
14618
|
} = {
|
|
15044
|
-
...defaultProps$
|
|
14619
|
+
...defaultProps$z,
|
|
15045
14620
|
...props
|
|
15046
14621
|
};
|
|
15047
14622
|
const [value, setValue] = React.useState(false);
|
|
@@ -15081,7 +14656,7 @@
|
|
|
15081
14656
|
className: `${b2("label")} close`
|
|
15082
14657
|
}, inactiveText))));
|
|
15083
14658
|
};
|
|
15084
|
-
Switch.defaultProps = defaultProps$
|
|
14659
|
+
Switch.defaultProps = defaultProps$z;
|
|
15085
14660
|
Switch.displayName = "NutSwitch";
|
|
15086
14661
|
function preventDefault(event, isStopPropagation) {
|
|
15087
14662
|
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
@@ -15091,7 +14666,7 @@
|
|
|
15091
14666
|
event.stopPropagation();
|
|
15092
14667
|
}
|
|
15093
14668
|
}
|
|
15094
|
-
const defaultProps$
|
|
14669
|
+
const defaultProps$y = {
|
|
15095
14670
|
name: "",
|
|
15096
14671
|
leftWidth: 0,
|
|
15097
14672
|
rightWidth: 0
|
|
@@ -15099,7 +14674,7 @@
|
|
|
15099
14674
|
const Swipe = React.forwardRef((props, instanceRef) => {
|
|
15100
14675
|
const swipeBem = cn("swipe");
|
|
15101
14676
|
const touch = useTouch();
|
|
15102
|
-
const { children, className, style } = { ...defaultProps$
|
|
14677
|
+
const { children, className, style } = { ...defaultProps$y, ...props };
|
|
15103
14678
|
const root = React.useRef();
|
|
15104
14679
|
const opened = React.useRef(false);
|
|
15105
14680
|
const lockClick = React.useRef(false);
|
|
@@ -15265,7 +14840,7 @@
|
|
|
15265
14840
|
style: wrapperStyle
|
|
15266
14841
|
}, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef)));
|
|
15267
14842
|
});
|
|
15268
|
-
Swipe.defaultProps = defaultProps$
|
|
14843
|
+
Swipe.defaultProps = defaultProps$y;
|
|
15269
14844
|
Swipe.displayName = "NutSwipe";
|
|
15270
14845
|
const canUseDom = !!(typeof window !== "undefined" && typeof document !== "undefined" && window.document && window.document.createElement);
|
|
15271
14846
|
const defaultRoot = canUseDom ? window : void 0;
|
|
@@ -15324,7 +14899,7 @@
|
|
|
15324
14899
|
console.log(e2);
|
|
15325
14900
|
}
|
|
15326
14901
|
}
|
|
15327
|
-
const defaultProps$
|
|
14902
|
+
const defaultProps$x = {
|
|
15328
14903
|
pullingText: "",
|
|
15329
14904
|
canReleaseText: "",
|
|
15330
14905
|
refreshingText: "",
|
|
@@ -15339,7 +14914,7 @@
|
|
|
15339
14914
|
const PullToRefresh = (p2) => {
|
|
15340
14915
|
const { locale } = useConfig$1();
|
|
15341
14916
|
const props = {
|
|
15342
|
-
...defaultProps$
|
|
14917
|
+
...defaultProps$x,
|
|
15343
14918
|
...p2,
|
|
15344
14919
|
...{
|
|
15345
14920
|
pullingText: p2.pullingText || locale.pullToRefresh.pullingText,
|
|
@@ -15478,10 +15053,10 @@
|
|
|
15478
15053
|
className: "nut-pulltorefresh-content"
|
|
15479
15054
|
}, props.children));
|
|
15480
15055
|
};
|
|
15481
|
-
PullToRefresh.defaultProps = defaultProps$
|
|
15056
|
+
PullToRefresh.defaultProps = defaultProps$x;
|
|
15482
15057
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
15483
15058
|
const isObject = (val) => val !== null && typeof val === "object";
|
|
15484
|
-
const defaultProps$
|
|
15059
|
+
const defaultProps$w = {
|
|
15485
15060
|
strokeWidth: 5,
|
|
15486
15061
|
radius: 50,
|
|
15487
15062
|
strokeLinecap: "round",
|
|
@@ -15503,7 +15078,7 @@
|
|
|
15503
15078
|
strokeLinecap,
|
|
15504
15079
|
...restProps
|
|
15505
15080
|
} = {
|
|
15506
|
-
...defaultProps$
|
|
15081
|
+
...defaultProps$w,
|
|
15507
15082
|
...props
|
|
15508
15083
|
};
|
|
15509
15084
|
const [oldValue, setOldValue] = React.useState(progress);
|
|
@@ -15614,9 +15189,9 @@
|
|
|
15614
15189
|
className: "nut-circleprogress-text"
|
|
15615
15190
|
}, children || /* @__PURE__ */ React__default["default"].createElement("div", null, progress, "%")));
|
|
15616
15191
|
};
|
|
15617
|
-
CircleProgress.defaultProps = defaultProps$
|
|
15192
|
+
CircleProgress.defaultProps = defaultProps$w;
|
|
15618
15193
|
CircleProgress.displayName = "NutCircleProgress";
|
|
15619
|
-
const defaultProps$
|
|
15194
|
+
const defaultProps$v = {
|
|
15620
15195
|
...ComponentDefaults,
|
|
15621
15196
|
direction: "across",
|
|
15622
15197
|
list: [],
|
|
@@ -15658,7 +15233,7 @@
|
|
|
15658
15233
|
iconClassPrefix,
|
|
15659
15234
|
iconFontClassName
|
|
15660
15235
|
} = {
|
|
15661
|
-
...defaultProps$
|
|
15236
|
+
...defaultProps$v,
|
|
15662
15237
|
...props
|
|
15663
15238
|
};
|
|
15664
15239
|
const wrap = React.useRef(null);
|
|
@@ -15907,16 +15482,16 @@
|
|
|
15907
15482
|
size: "11px"
|
|
15908
15483
|
}) : null))) : null);
|
|
15909
15484
|
};
|
|
15910
|
-
NoticeBar.defaultProps = defaultProps$
|
|
15485
|
+
NoticeBar.defaultProps = defaultProps$v;
|
|
15911
15486
|
NoticeBar.displayName = "NutNoticeBar";
|
|
15912
15487
|
const DataContext$1 = React.createContext({});
|
|
15913
|
-
const defaultProps$
|
|
15488
|
+
const defaultProps$u = {
|
|
15914
15489
|
current: 0,
|
|
15915
15490
|
direction: "horizontal",
|
|
15916
15491
|
progressDot: false
|
|
15917
15492
|
};
|
|
15918
15493
|
const Steps = (props) => {
|
|
15919
|
-
const propSteps = { ...defaultProps$
|
|
15494
|
+
const propSteps = { ...defaultProps$u, ...props };
|
|
15920
15495
|
const {
|
|
15921
15496
|
children,
|
|
15922
15497
|
current,
|
|
@@ -15949,9 +15524,9 @@
|
|
|
15949
15524
|
children
|
|
15950
15525
|
));
|
|
15951
15526
|
};
|
|
15952
|
-
Steps.defaultProps = defaultProps$
|
|
15527
|
+
Steps.defaultProps = defaultProps$u;
|
|
15953
15528
|
Steps.displayName = "NutSteps";
|
|
15954
|
-
const defaultProps$
|
|
15529
|
+
const defaultProps$t = {
|
|
15955
15530
|
...ComponentDefaults,
|
|
15956
15531
|
title: "",
|
|
15957
15532
|
content: "",
|
|
@@ -15975,7 +15550,7 @@
|
|
|
15975
15550
|
iconFontClassName,
|
|
15976
15551
|
...restProps
|
|
15977
15552
|
} = {
|
|
15978
|
-
...defaultProps$
|
|
15553
|
+
...defaultProps$t,
|
|
15979
15554
|
...props
|
|
15980
15555
|
};
|
|
15981
15556
|
const parent = React.useContext(DataContext$1);
|
|
@@ -16038,10 +15613,10 @@
|
|
|
16038
15613
|
className: "nut-step-content"
|
|
16039
15614
|
}, renderContent())));
|
|
16040
15615
|
};
|
|
16041
|
-
Step.defaultProps = defaultProps$
|
|
15616
|
+
Step.defaultProps = defaultProps$t;
|
|
16042
15617
|
Step.displayName = "NutStep";
|
|
16043
15618
|
const DataContext = React.createContext({});
|
|
16044
|
-
const defaultProps$
|
|
15619
|
+
const defaultProps$s = {
|
|
16045
15620
|
width: typeof window === "object" ? window.innerWidth : 375,
|
|
16046
15621
|
height: 0,
|
|
16047
15622
|
duration: 500,
|
|
@@ -16059,7 +15634,7 @@
|
|
|
16059
15634
|
};
|
|
16060
15635
|
const DISTANCE = 5;
|
|
16061
15636
|
const Swiper = React__default["default"].forwardRef((props, ref) => {
|
|
16062
|
-
const propSwiper = { ...defaultProps$
|
|
15637
|
+
const propSwiper = { ...defaultProps$s, ...props };
|
|
16063
15638
|
const {
|
|
16064
15639
|
children,
|
|
16065
15640
|
direction,
|
|
@@ -16410,7 +15985,9 @@
|
|
|
16410
15985
|
autoplay();
|
|
16411
15986
|
}, [children]);
|
|
16412
15987
|
React.useEffect(() => {
|
|
16413
|
-
|
|
15988
|
+
Taro.nextTick(() => {
|
|
15989
|
+
init();
|
|
15990
|
+
});
|
|
16414
15991
|
}, [propSwiper.initPage]);
|
|
16415
15992
|
React.useEffect(() => {
|
|
16416
15993
|
return () => {
|
|
@@ -16478,13 +16055,13 @@
|
|
|
16478
16055
|
});
|
|
16479
16056
|
})) : /* @__PURE__ */ React__default["default"].createElement("div", null, pageContent)));
|
|
16480
16057
|
});
|
|
16481
|
-
Swiper.defaultProps = defaultProps$
|
|
16058
|
+
Swiper.defaultProps = defaultProps$s;
|
|
16482
16059
|
Swiper.displayName = "NutSwiper";
|
|
16483
|
-
const defaultProps$
|
|
16060
|
+
const defaultProps$r = {
|
|
16484
16061
|
direction: "horizontal"
|
|
16485
16062
|
};
|
|
16486
16063
|
const SwiperItem = React__default["default"].forwardRef((props, ref) => {
|
|
16487
|
-
const _props = { ...defaultProps$
|
|
16064
|
+
const _props = { ...defaultProps$r, ...props };
|
|
16488
16065
|
const { children, direction, size } = _props;
|
|
16489
16066
|
const parent = React.useContext(DataContext);
|
|
16490
16067
|
const b2 = cn("swiper-item");
|
|
@@ -16503,10 +16080,10 @@
|
|
|
16503
16080
|
style: style()
|
|
16504
16081
|
}, children);
|
|
16505
16082
|
});
|
|
16506
|
-
SwiperItem.defaultProps = defaultProps$
|
|
16083
|
+
SwiperItem.defaultProps = defaultProps$r;
|
|
16507
16084
|
SwiperItem.displayName = "NutSwiperItem";
|
|
16508
16085
|
const AvatarContext = React.createContext({});
|
|
16509
|
-
const defaultProps$
|
|
16086
|
+
const defaultProps$q = {
|
|
16510
16087
|
...ComponentDefaults,
|
|
16511
16088
|
size: "",
|
|
16512
16089
|
icon: "",
|
|
@@ -16536,7 +16113,7 @@
|
|
|
16536
16113
|
iconFontClassName,
|
|
16537
16114
|
...rest
|
|
16538
16115
|
} = {
|
|
16539
|
-
...defaultProps$
|
|
16116
|
+
...defaultProps$q,
|
|
16540
16117
|
...props
|
|
16541
16118
|
};
|
|
16542
16119
|
const [maxSum, setMaxSum] = React.useState(0);
|
|
@@ -16623,9 +16200,9 @@
|
|
|
16623
16200
|
className: "text"
|
|
16624
16201
|
}, ((_m = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _m.maxContent) ? (_n = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _n.maxContent : `+ ${avatarIndex - ((_o = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _o.maxCount)}`)));
|
|
16625
16202
|
};
|
|
16626
|
-
Avatar.defaultProps = defaultProps$
|
|
16203
|
+
Avatar.defaultProps = defaultProps$q;
|
|
16627
16204
|
Avatar.displayName = "NutAvatar";
|
|
16628
|
-
const defaultProps$
|
|
16205
|
+
const defaultProps$p = {
|
|
16629
16206
|
maxContent: "",
|
|
16630
16207
|
maxCount: "",
|
|
16631
16208
|
maxBgColor: "#eee",
|
|
@@ -16637,7 +16214,7 @@
|
|
|
16637
16214
|
};
|
|
16638
16215
|
const AvatarGroup = (props) => {
|
|
16639
16216
|
useConfig();
|
|
16640
|
-
const propAvatarGroup = { ...defaultProps$
|
|
16217
|
+
const propAvatarGroup = { ...defaultProps$p, ...props };
|
|
16641
16218
|
const { className, style, children } = propAvatarGroup;
|
|
16642
16219
|
const avatarGroupRef = React.useRef(null);
|
|
16643
16220
|
const b2 = cn("avatar-group");
|
|
@@ -16654,9 +16231,9 @@
|
|
|
16654
16231
|
ref: avatarGroupRef
|
|
16655
16232
|
}, children));
|
|
16656
16233
|
};
|
|
16657
|
-
AvatarGroup.defaultProps = defaultProps$
|
|
16234
|
+
AvatarGroup.defaultProps = defaultProps$p;
|
|
16658
16235
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
16659
|
-
const defaultProps$
|
|
16236
|
+
const defaultProps$o = {
|
|
16660
16237
|
price: 0,
|
|
16661
16238
|
needSymbol: true,
|
|
16662
16239
|
symbol: "¥",
|
|
@@ -16674,7 +16251,7 @@
|
|
|
16674
16251
|
className,
|
|
16675
16252
|
...rest
|
|
16676
16253
|
} = {
|
|
16677
|
-
...defaultProps$
|
|
16254
|
+
...defaultProps$o,
|
|
16678
16255
|
...props
|
|
16679
16256
|
};
|
|
16680
16257
|
const b2 = cn("price");
|
|
@@ -16737,9 +16314,9 @@
|
|
|
16737
16314
|
className: `${b2("small")}`
|
|
16738
16315
|
}, formatDecimal(price)));
|
|
16739
16316
|
};
|
|
16740
|
-
Price.defaultProps = defaultProps$
|
|
16317
|
+
Price.defaultProps = defaultProps$o;
|
|
16741
16318
|
Price.displayName = "NutPrice";
|
|
16742
|
-
const defaultProps$
|
|
16319
|
+
const defaultProps$n = {
|
|
16743
16320
|
...ComponentDefaults,
|
|
16744
16321
|
value: "",
|
|
16745
16322
|
dot: false,
|
|
@@ -16762,7 +16339,7 @@
|
|
|
16762
16339
|
iconClassPrefix,
|
|
16763
16340
|
iconFontClassName
|
|
16764
16341
|
} = {
|
|
16765
|
-
...defaultProps$
|
|
16342
|
+
...defaultProps$n,
|
|
16766
16343
|
...props
|
|
16767
16344
|
};
|
|
16768
16345
|
function content() {
|
|
@@ -16799,9 +16376,9 @@
|
|
|
16799
16376
|
style: getStyle()
|
|
16800
16377
|
}, content()));
|
|
16801
16378
|
};
|
|
16802
|
-
Badge.defaultProps = defaultProps$
|
|
16379
|
+
Badge.defaultProps = defaultProps$n;
|
|
16803
16380
|
Badge.displayName = "NutBadge";
|
|
16804
|
-
const defaultProps$
|
|
16381
|
+
const defaultProps$m = {
|
|
16805
16382
|
...ComponentDefaults,
|
|
16806
16383
|
type: "default",
|
|
16807
16384
|
color: "",
|
|
@@ -16832,7 +16409,7 @@
|
|
|
16832
16409
|
iconClassPrefix,
|
|
16833
16410
|
iconFontClassName
|
|
16834
16411
|
} = {
|
|
16835
|
-
...defaultProps$
|
|
16412
|
+
...defaultProps$m,
|
|
16836
16413
|
...props
|
|
16837
16414
|
};
|
|
16838
16415
|
const [btnName, setBtnName] = React.useState("");
|
|
@@ -16906,7 +16483,7 @@
|
|
|
16906
16483
|
className: "text"
|
|
16907
16484
|
}, children)));
|
|
16908
16485
|
};
|
|
16909
|
-
Tag.defaultProps = defaultProps$
|
|
16486
|
+
Tag.defaultProps = defaultProps$m;
|
|
16910
16487
|
Tag.displayName = "NutTag";
|
|
16911
16488
|
function fillRef(ref, node) {
|
|
16912
16489
|
if (typeof ref === "function") {
|
|
@@ -16950,7 +16527,7 @@
|
|
|
16950
16527
|
return trigger;
|
|
16951
16528
|
}
|
|
16952
16529
|
}
|
|
16953
|
-
const defaultProps$
|
|
16530
|
+
const defaultProps$l = {
|
|
16954
16531
|
...ComponentDefaults,
|
|
16955
16532
|
list: [],
|
|
16956
16533
|
theme: "light",
|
|
@@ -16979,7 +16556,7 @@
|
|
|
16979
16556
|
iconFontClassName,
|
|
16980
16557
|
...reset
|
|
16981
16558
|
} = {
|
|
16982
|
-
...defaultProps$
|
|
16559
|
+
...defaultProps$l,
|
|
16983
16560
|
...props
|
|
16984
16561
|
};
|
|
16985
16562
|
const goodItem = React.useRef(null);
|
|
@@ -17074,9 +16651,9 @@
|
|
|
17074
16651
|
style: { background: "transparent" }
|
|
17075
16652
|
}) : "");
|
|
17076
16653
|
};
|
|
17077
|
-
Popover.defaultProps = defaultProps$
|
|
16654
|
+
Popover.defaultProps = defaultProps$l;
|
|
17078
16655
|
Popover.displayName = "NutPopover";
|
|
17079
|
-
const defaultProps$
|
|
16656
|
+
const defaultProps$k = {
|
|
17080
16657
|
width: "100px",
|
|
17081
16658
|
height: "100px",
|
|
17082
16659
|
row: 1,
|
|
@@ -17104,7 +16681,7 @@
|
|
|
17104
16681
|
avatarShape,
|
|
17105
16682
|
...restProps
|
|
17106
16683
|
} = {
|
|
17107
|
-
...defaultProps$
|
|
16684
|
+
...defaultProps$k,
|
|
17108
16685
|
...props
|
|
17109
16686
|
};
|
|
17110
16687
|
const b2 = cn("skeleton");
|
|
@@ -17159,9 +16736,9 @@
|
|
|
17159
16736
|
});
|
|
17160
16737
|
})))));
|
|
17161
16738
|
};
|
|
17162
|
-
Skeleton.defaultProps = defaultProps$
|
|
16739
|
+
Skeleton.defaultProps = defaultProps$k;
|
|
17163
16740
|
Skeleton.displayName = "NutSkeleton";
|
|
17164
|
-
const defaultProps$
|
|
16741
|
+
const defaultProps$j = {
|
|
17165
16742
|
paused: false,
|
|
17166
16743
|
startTime: Date.now(),
|
|
17167
16744
|
endTime: Date.now(),
|
|
@@ -17188,7 +16765,7 @@
|
|
|
17188
16765
|
onUpdate,
|
|
17189
16766
|
children,
|
|
17190
16767
|
...rest
|
|
17191
|
-
} = { ...defaultProps$
|
|
16768
|
+
} = { ...defaultProps$j, ...props };
|
|
17192
16769
|
const b2 = cn("countdown");
|
|
17193
16770
|
const [restTimeStamp, setRestTime] = React.useState(0);
|
|
17194
16771
|
const stateRef = React.useRef({
|
|
@@ -17384,9 +16961,9 @@
|
|
|
17384
16961
|
}));
|
|
17385
16962
|
};
|
|
17386
16963
|
const CountDown = React__default["default"].forwardRef(InternalCountDown);
|
|
17387
|
-
CountDown.defaultProps = defaultProps$
|
|
16964
|
+
CountDown.defaultProps = defaultProps$j;
|
|
17388
16965
|
CountDown.displayName = "NutCountDown";
|
|
17389
|
-
const defaultProps$
|
|
16966
|
+
const defaultProps$i = {
|
|
17390
16967
|
activeName: ["0"],
|
|
17391
16968
|
accordion: false,
|
|
17392
16969
|
icon: "",
|
|
@@ -17409,7 +16986,7 @@
|
|
|
17409
16986
|
iconColor,
|
|
17410
16987
|
change
|
|
17411
16988
|
} = {
|
|
17412
|
-
...defaultProps$
|
|
16989
|
+
...defaultProps$i,
|
|
17413
16990
|
...props
|
|
17414
16991
|
};
|
|
17415
16992
|
const childrenDom = React__default["default"].Children.toArray(children);
|
|
@@ -17466,9 +17043,9 @@
|
|
|
17466
17043
|
},
|
|
17467
17044
|
areEqual
|
|
17468
17045
|
);
|
|
17469
|
-
Collapse.defaultProps = defaultProps$
|
|
17046
|
+
Collapse.defaultProps = defaultProps$i;
|
|
17470
17047
|
Collapse.displayName = "NutCollapse";
|
|
17471
|
-
const defaultProps$
|
|
17048
|
+
const defaultProps$h = {
|
|
17472
17049
|
...ComponentDefaults,
|
|
17473
17050
|
title: "",
|
|
17474
17051
|
name: "",
|
|
@@ -17507,7 +17084,7 @@
|
|
|
17507
17084
|
iconFontClassName,
|
|
17508
17085
|
...rest
|
|
17509
17086
|
} = {
|
|
17510
|
-
...defaultProps$
|
|
17087
|
+
...defaultProps$h,
|
|
17511
17088
|
...props
|
|
17512
17089
|
};
|
|
17513
17090
|
const [domHeight, setDomHeight] = React.useState(-1);
|
|
@@ -17587,9 +17164,9 @@
|
|
|
17587
17164
|
className: colBem("content-text")
|
|
17588
17165
|
}, children)));
|
|
17589
17166
|
};
|
|
17590
|
-
CollapseItem.defaultProps = defaultProps$
|
|
17167
|
+
CollapseItem.defaultProps = defaultProps$h;
|
|
17591
17168
|
CollapseItem.displayName = "NutCollapseItem";
|
|
17592
|
-
const defaultProps$
|
|
17169
|
+
const defaultProps$g = {
|
|
17593
17170
|
maxLen: 0,
|
|
17594
17171
|
endNumber: "",
|
|
17595
17172
|
delaySpeed: 300,
|
|
@@ -17607,7 +17184,7 @@
|
|
|
17607
17184
|
thousands,
|
|
17608
17185
|
...reset
|
|
17609
17186
|
} = {
|
|
17610
|
-
...defaultProps$
|
|
17187
|
+
...defaultProps$g,
|
|
17611
17188
|
...props
|
|
17612
17189
|
};
|
|
17613
17190
|
const b2 = cn("countup");
|
|
@@ -17620,39 +17197,47 @@
|
|
|
17620
17197
|
const currNumber = `${thousands ? intNumber.replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") : intNumber}${splitArr[1] ? "." : ""}${splitArr[1] || ""}`;
|
|
17621
17198
|
return currNumber.split("");
|
|
17622
17199
|
};
|
|
17623
|
-
const numerArr =
|
|
17200
|
+
const [numerArr, setNumerArr] = React.useState([]);
|
|
17201
|
+
const [transformArr, setTransformArr] = React.useState([]);
|
|
17202
|
+
const isLoaded = React.useRef(false);
|
|
17624
17203
|
const setNumberTransform = () => {
|
|
17625
|
-
if (countupRef.current) {
|
|
17626
|
-
Taro__default["default"].createSelectorQuery().selectAll(".nut-
|
|
17627
|
-
const
|
|
17628
|
-
(item) => !Number.isNaN(Number(item))
|
|
17629
|
-
);
|
|
17204
|
+
if (countupRef.current && numerArr.length) {
|
|
17205
|
+
Taro__default["default"].createSelectorQuery().selectAll(".nut-countup__listitem").node((numberItems) => {
|
|
17206
|
+
const transformArrCache = [];
|
|
17630
17207
|
Object.keys(numberItems).forEach((key) => {
|
|
17631
17208
|
const elem = numberItems[Number(key)];
|
|
17632
|
-
const idx = Number(
|
|
17633
|
-
if (
|
|
17634
|
-
const transform = `translate(0, -${(idx === 0 ? 10 : idx) * 5}%)
|
|
17635
|
-
|
|
17636
|
-
elem.style.webkitTransform = transform;
|
|
17209
|
+
const idx = Number(numerArr[Number(key)]);
|
|
17210
|
+
if (elem) {
|
|
17211
|
+
const transform = idx || idx === 0 ? `translate(0, -${(idx === 0 ? 10 : idx) * 5}%)` : "";
|
|
17212
|
+
transformArrCache.push(transform);
|
|
17637
17213
|
}
|
|
17638
17214
|
});
|
|
17215
|
+
setTransformArr([...transformArrCache]);
|
|
17639
17216
|
}).exec();
|
|
17640
17217
|
}
|
|
17641
17218
|
};
|
|
17642
|
-
const numberEaseStyle = {
|
|
17643
|
-
|
|
17219
|
+
const numberEaseStyle = (idx) => {
|
|
17220
|
+
return {
|
|
17221
|
+
transition: `transform ${easeSpeed}s ease-in-out`,
|
|
17222
|
+
transform: transformArr[idx] ? transformArr[idx] : null
|
|
17223
|
+
};
|
|
17644
17224
|
};
|
|
17645
17225
|
React.useEffect(() => {
|
|
17646
|
-
|
|
17647
|
-
|
|
17648
|
-
|
|
17226
|
+
setNumberTransform();
|
|
17227
|
+
}, [numerArr]);
|
|
17228
|
+
React.useEffect(() => {
|
|
17229
|
+
if (!isLoaded.current) {
|
|
17230
|
+
isLoaded.current = true;
|
|
17231
|
+
timerRef.current = window.setTimeout(() => {
|
|
17232
|
+
setNumerArr(getShowNumber());
|
|
17233
|
+
}, delaySpeed);
|
|
17234
|
+
} else {
|
|
17235
|
+
setNumerArr(getShowNumber());
|
|
17236
|
+
}
|
|
17649
17237
|
return () => {
|
|
17650
17238
|
window.clearTimeout(timerRef.current);
|
|
17651
17239
|
};
|
|
17652
|
-
}, []);
|
|
17653
|
-
React.useEffect(() => {
|
|
17654
|
-
setNumberTransform();
|
|
17655
|
-
}, [numerArr]);
|
|
17240
|
+
}, [endNumber]);
|
|
17656
17241
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17657
17242
|
className: `${b2()} ${className}`,
|
|
17658
17243
|
ref: countupRef
|
|
@@ -17666,7 +17251,7 @@
|
|
|
17666
17251
|
key: idx
|
|
17667
17252
|
}, !Number.isNaN(Number(item)) ? /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
17668
17253
|
className: b2("number"),
|
|
17669
|
-
style: numberEaseStyle
|
|
17254
|
+
style: numberEaseStyle(idx)
|
|
17670
17255
|
}, [...numbers, ...numbers].map((number, subidx) => {
|
|
17671
17256
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
17672
17257
|
key: subidx
|
|
@@ -17676,9 +17261,9 @@
|
|
|
17676
17261
|
}, item));
|
|
17677
17262
|
})));
|
|
17678
17263
|
};
|
|
17679
|
-
CountUp.defaultProps = defaultProps$
|
|
17264
|
+
CountUp.defaultProps = defaultProps$g;
|
|
17680
17265
|
CountUp.displayName = "NutCountUp";
|
|
17681
|
-
const defaultProps$
|
|
17266
|
+
const defaultProps$f = {};
|
|
17682
17267
|
class AnimatingNumbers extends React.Component {
|
|
17683
17268
|
constructor(props) {
|
|
17684
17269
|
super(props);
|
|
@@ -17690,7 +17275,7 @@
|
|
|
17690
17275
|
});
|
|
17691
17276
|
}
|
|
17692
17277
|
}
|
|
17693
|
-
AnimatingNumbers.defaultProps = defaultProps$
|
|
17278
|
+
AnimatingNumbers.defaultProps = defaultProps$f;
|
|
17694
17279
|
AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
17695
17280
|
AnimatingNumbers.CountUp = CountUp;
|
|
17696
17281
|
const defaultStatus = {
|
|
@@ -17698,7 +17283,7 @@
|
|
|
17698
17283
|
error: "https://ftcms.jd.com/p/files/61a9e33ee7dcdbcc0ce62736.png",
|
|
17699
17284
|
network: "https://static-ftcms.jd.com/p/files/61a9e31de7dcdbcc0ce62734.png"
|
|
17700
17285
|
};
|
|
17701
|
-
const defaultProps$
|
|
17286
|
+
const defaultProps$e = {
|
|
17702
17287
|
description: "\u65E0\u5185\u5BB9",
|
|
17703
17288
|
image: "empty",
|
|
17704
17289
|
imageSize: "",
|
|
@@ -17706,9 +17291,9 @@
|
|
|
17706
17291
|
};
|
|
17707
17292
|
const Empty = (props) => {
|
|
17708
17293
|
const { locale } = useConfig$1();
|
|
17709
|
-
defaultProps$
|
|
17294
|
+
defaultProps$e.description = locale.noData || defaultProps$e.description;
|
|
17710
17295
|
const { image, imageSize, description, children, className, ...rest } = {
|
|
17711
|
-
...defaultProps$
|
|
17296
|
+
...defaultProps$e,
|
|
17712
17297
|
...props
|
|
17713
17298
|
};
|
|
17714
17299
|
const [imgStyle, setImgStyle] = React.useState({});
|
|
@@ -17750,7 +17335,7 @@
|
|
|
17750
17335
|
className: b2("description")
|
|
17751
17336
|
}, description) : { description }, children));
|
|
17752
17337
|
};
|
|
17753
|
-
Empty.defaultProps = defaultProps$
|
|
17338
|
+
Empty.defaultProps = defaultProps$e;
|
|
17754
17339
|
Empty.displayName = "NutEmpty";
|
|
17755
17340
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
17756
17341
|
let index2 = 0;
|
|
@@ -17863,7 +17448,7 @@
|
|
|
17863
17448
|
}
|
|
17864
17449
|
});
|
|
17865
17450
|
};
|
|
17866
|
-
const defaultProps$
|
|
17451
|
+
const defaultProps$d = {};
|
|
17867
17452
|
const VirtualList = (props) => {
|
|
17868
17453
|
const {
|
|
17869
17454
|
sourceData = [],
|
|
@@ -17899,7 +17484,7 @@
|
|
|
17899
17484
|
const [listTotalSize, setListTotalSize] = React.useState(99999999);
|
|
17900
17485
|
const [visibleCount, setVisibleCount] = React.useState(0);
|
|
17901
17486
|
const [offSetSize, setOffSetSize] = React.useState(containerSize || 0);
|
|
17902
|
-
const [
|
|
17487
|
+
const [options, setOptions] = React.useState({
|
|
17903
17488
|
startOffset: 0,
|
|
17904
17489
|
startIndex: 0,
|
|
17905
17490
|
overStart: 0,
|
|
@@ -17926,8 +17511,8 @@
|
|
|
17926
17511
|
return;
|
|
17927
17512
|
const count = Math.ceil(offSetSize / itemSize) + overscan;
|
|
17928
17513
|
setVisibleCount(count);
|
|
17929
|
-
setOptions((
|
|
17930
|
-
return { ...
|
|
17514
|
+
setOptions((options2) => {
|
|
17515
|
+
return { ...options2, endIndex: count };
|
|
17931
17516
|
});
|
|
17932
17517
|
}, [getElement, horizontal, itemSize, overscan, offSetSize]);
|
|
17933
17518
|
const updateTotalSize = React.useCallback(() => {
|
|
@@ -18003,10 +17588,10 @@
|
|
|
18003
17588
|
className: horizontal ? "nut-virtuallist-items nut-horizontal-items" : "nut-virtuallist-items nut-vertical-items",
|
|
18004
17589
|
ref: itemsRef,
|
|
18005
17590
|
style: {
|
|
18006
|
-
transform: horizontal ? `translate3d(${
|
|
17591
|
+
transform: horizontal ? `translate3d(${options.startOffset}px,0,0)` : `translate3d(0,${options.startOffset}px,0)`
|
|
18007
17592
|
}
|
|
18008
|
-
}, sourceData.slice(
|
|
18009
|
-
const { startIndex, overStart } =
|
|
17593
|
+
}, sourceData.slice(options.overStart, options.endIndex).map((data, index2) => {
|
|
17594
|
+
const { startIndex, overStart } = options;
|
|
18010
17595
|
const dataIndex = overStart + index2;
|
|
18011
17596
|
const styleVal = dataIndex < startIndex ? "none" : "block";
|
|
18012
17597
|
const keyVal = key && data[key] ? data[key] : dataIndex;
|
|
@@ -18022,9 +17607,9 @@
|
|
|
18022
17607
|
}) : data);
|
|
18023
17608
|
}))));
|
|
18024
17609
|
};
|
|
18025
|
-
VirtualList.defaultProps = defaultProps$
|
|
17610
|
+
VirtualList.defaultProps = defaultProps$d;
|
|
18026
17611
|
VirtualList.displayName = "NutVirtualList";
|
|
18027
|
-
const defaultProps$
|
|
17612
|
+
const defaultProps$c = {
|
|
18028
17613
|
...ComponentDefaults,
|
|
18029
17614
|
className: "",
|
|
18030
17615
|
style: {},
|
|
@@ -18036,7 +17621,7 @@
|
|
|
18036
17621
|
};
|
|
18037
17622
|
const Table = (props) => {
|
|
18038
17623
|
const { locale } = useConfig$1();
|
|
18039
|
-
defaultProps$
|
|
17624
|
+
defaultProps$c.noData = locale.noData;
|
|
18040
17625
|
const {
|
|
18041
17626
|
children,
|
|
18042
17627
|
className,
|
|
@@ -18052,7 +17637,7 @@
|
|
|
18052
17637
|
iconFontClassName,
|
|
18053
17638
|
...rest
|
|
18054
17639
|
} = {
|
|
18055
|
-
...defaultProps$
|
|
17640
|
+
...defaultProps$c,
|
|
18056
17641
|
...props
|
|
18057
17642
|
};
|
|
18058
17643
|
const [curData, setCurData] = React.useState(data);
|
|
@@ -18106,14 +17691,14 @@
|
|
|
18106
17691
|
});
|
|
18107
17692
|
};
|
|
18108
17693
|
const renderBodyTds = (item) => {
|
|
18109
|
-
return sortDataItem().map(([value,
|
|
17694
|
+
return sortDataItem().map(([value, render], index2) => {
|
|
18110
17695
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18111
17696
|
className: classNames(
|
|
18112
17697
|
"nut-table__main__body__tr__td",
|
|
18113
17698
|
cellClasses(getColumnItem(value))
|
|
18114
17699
|
),
|
|
18115
17700
|
key: value
|
|
18116
|
-
}, typeof item[value] === "function" || typeof
|
|
17701
|
+
}, typeof item[value] === "function" || typeof render === "function" ? /* @__PURE__ */ React__default["default"].createElement("div", null, render ? render(item) : item[value](item)) : item[value]);
|
|
18117
17702
|
});
|
|
18118
17703
|
};
|
|
18119
17704
|
const renderBoyTrs = () => {
|
|
@@ -18150,9 +17735,9 @@
|
|
|
18150
17735
|
className: "nut-table__nodata__text"
|
|
18151
17736
|
}, noData))));
|
|
18152
17737
|
};
|
|
18153
|
-
Table.defaultProps = defaultProps$
|
|
17738
|
+
Table.defaultProps = defaultProps$c;
|
|
18154
17739
|
Table.displayName = "NutTable";
|
|
18155
|
-
const defaultProps$
|
|
17740
|
+
const defaultProps$b = {
|
|
18156
17741
|
source: {
|
|
18157
17742
|
type: {},
|
|
18158
17743
|
src: ""
|
|
@@ -18170,14 +17755,14 @@
|
|
|
18170
17755
|
const {
|
|
18171
17756
|
children,
|
|
18172
17757
|
source,
|
|
18173
|
-
options
|
|
17758
|
+
options,
|
|
18174
17759
|
className,
|
|
18175
17760
|
play,
|
|
18176
17761
|
pause,
|
|
18177
17762
|
playend,
|
|
18178
17763
|
...restProps
|
|
18179
17764
|
} = {
|
|
18180
|
-
...defaultProps$
|
|
17765
|
+
...defaultProps$b,
|
|
18181
17766
|
...props
|
|
18182
17767
|
};
|
|
18183
17768
|
const rootRef = React.useRef(null);
|
|
@@ -18189,14 +17774,14 @@
|
|
|
18189
17774
|
const init = () => {
|
|
18190
17775
|
if (rootRef.current) {
|
|
18191
17776
|
const videoRef = rootRef.current;
|
|
18192
|
-
if (
|
|
17777
|
+
if (options.autoplay) {
|
|
18193
17778
|
setTimeout(() => {
|
|
18194
17779
|
videoRef.play();
|
|
18195
17780
|
}, 200);
|
|
18196
17781
|
}
|
|
18197
|
-
if (
|
|
18198
|
-
videoRef.setAttribute("playsinline", String(
|
|
18199
|
-
videoRef.setAttribute("webkit-playsinline", String(
|
|
17782
|
+
if (options.playsinline) {
|
|
17783
|
+
videoRef.setAttribute("playsinline", String(options.playsinline));
|
|
17784
|
+
videoRef.setAttribute("webkit-playsinline", String(options.playsinline));
|
|
18200
17785
|
videoRef.setAttribute("x5-video-player-type", "h5-page");
|
|
18201
17786
|
videoRef.setAttribute("x5-video-player-fullscreen", "false");
|
|
18202
17787
|
}
|
|
@@ -18217,11 +17802,11 @@
|
|
|
18217
17802
|
...restProps
|
|
18218
17803
|
}, /* @__PURE__ */ React__default["default"].createElement("video", {
|
|
18219
17804
|
className: "nut-video-player",
|
|
18220
|
-
muted:
|
|
18221
|
-
autoPlay:
|
|
18222
|
-
loop:
|
|
18223
|
-
poster:
|
|
18224
|
-
controls:
|
|
17805
|
+
muted: options.muted,
|
|
17806
|
+
autoPlay: options.autoplay,
|
|
17807
|
+
loop: options.loop,
|
|
17808
|
+
poster: options.poster,
|
|
17809
|
+
controls: options.controls,
|
|
18225
17810
|
ref: rootRef,
|
|
18226
17811
|
src: source.src
|
|
18227
17812
|
}, /* @__PURE__ */ React__default["default"].createElement("source", {
|
|
@@ -18231,11 +17816,11 @@
|
|
|
18231
17816
|
kind: "captions"
|
|
18232
17817
|
})));
|
|
18233
17818
|
};
|
|
18234
|
-
Video.defaultProps = defaultProps$
|
|
17819
|
+
Video.defaultProps = defaultProps$b;
|
|
18235
17820
|
Video.displayName = "NutVideo";
|
|
18236
17821
|
const b = cn("audio");
|
|
18237
17822
|
const warn = console.warn;
|
|
18238
|
-
const defaultProps$
|
|
17823
|
+
const defaultProps$a = {
|
|
18239
17824
|
...ComponentDefaults,
|
|
18240
17825
|
className: "",
|
|
18241
17826
|
url: "",
|
|
@@ -18276,7 +17861,7 @@
|
|
|
18276
17861
|
iconFontClassName,
|
|
18277
17862
|
...rest
|
|
18278
17863
|
} = {
|
|
18279
|
-
...defaultProps$
|
|
17864
|
+
...defaultProps$a,
|
|
18280
17865
|
...props
|
|
18281
17866
|
};
|
|
18282
17867
|
const [playing, setPlaying] = React.useState(false);
|
|
@@ -18400,17 +17985,17 @@
|
|
|
18400
17985
|
className: "time"
|
|
18401
17986
|
}, formatSeconds(`${totalSeconds}`) || "00:00:00")), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18402
17987
|
className: isCanPlay ? "custom-button-group" : "custom-button-group-disable"
|
|
18403
|
-
}, /* @__PURE__ */ React__default["default"].createElement(Button
|
|
17988
|
+
}, /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
18404
17989
|
type: "primary",
|
|
18405
17990
|
size: "small",
|
|
18406
17991
|
className: "back",
|
|
18407
17992
|
onClick: handleBack
|
|
18408
|
-
}, locale.audio.back || "\u5FEB\u9000"), /* @__PURE__ */ React__default["default"].createElement(Button
|
|
17993
|
+
}, locale.audio.back || "\u5FEB\u9000"), /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
18409
17994
|
type: "primary",
|
|
18410
17995
|
size: "small",
|
|
18411
17996
|
className: "start",
|
|
18412
17997
|
onClick: handleStatusChange
|
|
18413
|
-
}, playing ? `${locale.audio.pause || "\u6682\u505C"}` : `${locale.audio.start || "\u5F00\u59CB"}`), /* @__PURE__ */ React__default["default"].createElement(Button
|
|
17998
|
+
}, playing ? `${locale.audio.pause || "\u6682\u505C"}` : `${locale.audio.start || "\u5F00\u59CB"}`), /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
18414
17999
|
type: "primary",
|
|
18415
18000
|
size: "small",
|
|
18416
18001
|
onClick: handleForward
|
|
@@ -18440,9 +18025,9 @@
|
|
|
18440
18025
|
...rest
|
|
18441
18026
|
}, renderAudio());
|
|
18442
18027
|
};
|
|
18443
|
-
Audio.defaultProps = defaultProps$
|
|
18028
|
+
Audio.defaultProps = defaultProps$a;
|
|
18444
18029
|
Audio.displayName = "NutAudio";
|
|
18445
|
-
const defaultProps$
|
|
18030
|
+
const defaultProps$9 = {
|
|
18446
18031
|
images: [],
|
|
18447
18032
|
videos: [],
|
|
18448
18033
|
show: false,
|
|
@@ -18613,14 +18198,7 @@
|
|
|
18613
18198
|
initPage: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1),
|
|
18614
18199
|
paginationColor,
|
|
18615
18200
|
paginationVisible
|
|
18616
|
-
},
|
|
18617
|
-
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18618
|
-
key: index2
|
|
18619
|
-
}, /* @__PURE__ */ React__default["default"].createElement(Video, {
|
|
18620
|
-
source: item.source,
|
|
18621
|
-
options: item.options
|
|
18622
|
-
}));
|
|
18623
|
-
}), images && images.length > 0 && images.map((item, index2) => {
|
|
18201
|
+
}, images && images.length > 0 ? images.map((item, index2) => {
|
|
18624
18202
|
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18625
18203
|
key: index2
|
|
18626
18204
|
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
@@ -18628,13 +18206,13 @@
|
|
|
18628
18206
|
alt: "",
|
|
18629
18207
|
className: "nut-imagepreview-img"
|
|
18630
18208
|
}));
|
|
18631
|
-
}))), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18209
|
+
}) : [])), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18632
18210
|
className: "nut-imagepreview-index"
|
|
18633
18211
|
}, active, "/", (images ? images.length : 0) + (videos ? videos.length : 0)));
|
|
18634
18212
|
};
|
|
18635
|
-
ImagePreview.defaultProps = defaultProps$
|
|
18213
|
+
ImagePreview.defaultProps = defaultProps$9;
|
|
18636
18214
|
ImagePreview.displayName = "NutImagePreview";
|
|
18637
|
-
const defaultProps$
|
|
18215
|
+
const defaultProps$8 = {
|
|
18638
18216
|
type: "custom",
|
|
18639
18217
|
existAddress: [],
|
|
18640
18218
|
defaultIcon: "location2",
|
|
@@ -18656,7 +18234,7 @@
|
|
|
18656
18234
|
onClose,
|
|
18657
18235
|
onSwitchModule,
|
|
18658
18236
|
...rest
|
|
18659
|
-
} = { ...defaultProps$
|
|
18237
|
+
} = { ...defaultProps$8, ...props };
|
|
18660
18238
|
const b2 = cn("address");
|
|
18661
18239
|
const selectedExist = (item) => {
|
|
18662
18240
|
const copyExistAdd = existAddress;
|
|
@@ -18717,219 +18295,6 @@
|
|
|
18717
18295
|
className: b2("choose-other-btn")
|
|
18718
18296
|
}, locale.address.chooseAnotherAddress || customAndExistTitle)));
|
|
18719
18297
|
};
|
|
18720
|
-
const elevatorContext = React.createContext({});
|
|
18721
|
-
const defaultProps$8 = {
|
|
18722
|
-
height: "200px",
|
|
18723
|
-
acceptKey: "title",
|
|
18724
|
-
indexList: [],
|
|
18725
|
-
isSticky: false,
|
|
18726
|
-
spaceHeight: 23,
|
|
18727
|
-
titleHeight: 35,
|
|
18728
|
-
className: ""
|
|
18729
|
-
};
|
|
18730
|
-
const Elevator = (props) => {
|
|
18731
|
-
const {
|
|
18732
|
-
height,
|
|
18733
|
-
acceptKey,
|
|
18734
|
-
indexList,
|
|
18735
|
-
isSticky,
|
|
18736
|
-
spaceHeight,
|
|
18737
|
-
titleHeight,
|
|
18738
|
-
className,
|
|
18739
|
-
onClickItem,
|
|
18740
|
-
onClickIndex,
|
|
18741
|
-
children,
|
|
18742
|
-
...rest
|
|
18743
|
-
} = {
|
|
18744
|
-
...defaultProps$8,
|
|
18745
|
-
...props
|
|
18746
|
-
};
|
|
18747
|
-
const b2 = cn("elevator");
|
|
18748
|
-
const listview = React.useRef(null);
|
|
18749
|
-
const initData = {
|
|
18750
|
-
anchorIndex: 0,
|
|
18751
|
-
listHeight: [],
|
|
18752
|
-
listGroup: [],
|
|
18753
|
-
scrollY: 0,
|
|
18754
|
-
diff: -1,
|
|
18755
|
-
fixedTop: 0
|
|
18756
|
-
};
|
|
18757
|
-
const touchState = React.useRef({
|
|
18758
|
-
y1: 0,
|
|
18759
|
-
y2: 0
|
|
18760
|
-
});
|
|
18761
|
-
const [scrollY, setScrollY] = React.useState(0);
|
|
18762
|
-
const [currentData, setCurrentData] = React.useState(
|
|
18763
|
-
{}
|
|
18764
|
-
);
|
|
18765
|
-
const [currentKey, setCurrentKey] = React.useState("");
|
|
18766
|
-
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
18767
|
-
const [codeIndex, setCodeIndex] = React.useState(0);
|
|
18768
|
-
const [scrollStart, setScrollStart] = React.useState(false);
|
|
18769
|
-
const state = React.useRef(initData);
|
|
18770
|
-
const resetScrollState = () => {
|
|
18771
|
-
setScrollStart(false);
|
|
18772
|
-
};
|
|
18773
|
-
const clientHeight = () => {
|
|
18774
|
-
return listview.current ? listview.current.clientHeight : 0;
|
|
18775
|
-
};
|
|
18776
|
-
const getData = (el, name) => {
|
|
18777
|
-
const prefix2 = "data-";
|
|
18778
|
-
return el.getAttribute(prefix2 + name);
|
|
18779
|
-
};
|
|
18780
|
-
const calculateHeight = () => {
|
|
18781
|
-
let height2 = 0;
|
|
18782
|
-
state.current.listHeight.push(height2);
|
|
18783
|
-
for (let i = 0; i < state.current.listGroup.length; i++) {
|
|
18784
|
-
const item = state.current.listGroup[i];
|
|
18785
|
-
height2 += item.clientHeight;
|
|
18786
|
-
state.current.listHeight.push(height2);
|
|
18787
|
-
}
|
|
18788
|
-
};
|
|
18789
|
-
const scrollTo = (index2) => {
|
|
18790
|
-
if (!index2 && index2 !== 0) {
|
|
18791
|
-
return;
|
|
18792
|
-
}
|
|
18793
|
-
if (!state.current.listHeight.length) {
|
|
18794
|
-
calculateHeight();
|
|
18795
|
-
}
|
|
18796
|
-
let cacheIndex = index2;
|
|
18797
|
-
if (index2 < 0) {
|
|
18798
|
-
cacheIndex = 0;
|
|
18799
|
-
}
|
|
18800
|
-
if (index2 > state.current.listHeight.length - 2) {
|
|
18801
|
-
cacheIndex = state.current.listHeight.length - 2;
|
|
18802
|
-
}
|
|
18803
|
-
setCodeIndex(cacheIndex);
|
|
18804
|
-
if (listview.current) {
|
|
18805
|
-
listview.current.scrollTo(0, state.current.listHeight[cacheIndex]);
|
|
18806
|
-
}
|
|
18807
|
-
};
|
|
18808
|
-
const bind = useGesture({
|
|
18809
|
-
onDragStart: ({ target, offset }) => {
|
|
18810
|
-
setScrollStart(true);
|
|
18811
|
-
const index2 = Number(getData(target, "index"));
|
|
18812
|
-
touchState.current.y1 = offset[1];
|
|
18813
|
-
state.current.anchorIndex = +index2;
|
|
18814
|
-
setCodeIndex((codeIndex2) => codeIndex2 + index2);
|
|
18815
|
-
scrollTo(index2);
|
|
18816
|
-
},
|
|
18817
|
-
onDragEnd: ({ offset }) => {
|
|
18818
|
-
touchState.current.y2 = offset[1];
|
|
18819
|
-
const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight || 0;
|
|
18820
|
-
const cacheIndex = state.current.anchorIndex + Math.ceil(delta);
|
|
18821
|
-
setCodeIndex(cacheIndex);
|
|
18822
|
-
scrollTo(cacheIndex);
|
|
18823
|
-
resetScrollState();
|
|
18824
|
-
}
|
|
18825
|
-
});
|
|
18826
|
-
const handleClickItem = (key, item) => {
|
|
18827
|
-
onClickItem && onClickItem(key, item);
|
|
18828
|
-
setCurrentData(item);
|
|
18829
|
-
setCurrentKey(key);
|
|
18830
|
-
};
|
|
18831
|
-
const handleClickIndex = (key) => {
|
|
18832
|
-
onClickIndex && onClickIndex(key);
|
|
18833
|
-
};
|
|
18834
|
-
const setListGroup = () => {
|
|
18835
|
-
if (listview.current) {
|
|
18836
|
-
const els = listview.current.querySelectorAll(".nut-elevator__list__item");
|
|
18837
|
-
els.forEach((el) => {
|
|
18838
|
-
if (el != null && !state.current.listGroup.includes(el)) {
|
|
18839
|
-
state.current.listGroup.push(el);
|
|
18840
|
-
}
|
|
18841
|
-
});
|
|
18842
|
-
}
|
|
18843
|
-
};
|
|
18844
|
-
const listViewScroll = (e2) => {
|
|
18845
|
-
const { listHeight } = state.current;
|
|
18846
|
-
if (!listHeight.length) {
|
|
18847
|
-
calculateHeight();
|
|
18848
|
-
}
|
|
18849
|
-
const target = e2.target;
|
|
18850
|
-
const { scrollTop } = target;
|
|
18851
|
-
state.current.scrollY = scrollTop;
|
|
18852
|
-
setScrollY(scrollTop);
|
|
18853
|
-
for (let i = 0; i < listHeight.length - 1; i++) {
|
|
18854
|
-
const height1 = listHeight[i];
|
|
18855
|
-
const height2 = listHeight[i + 1];
|
|
18856
|
-
if (state.current.scrollY >= height1 && state.current.scrollY < height2) {
|
|
18857
|
-
setCurrentIndex(i);
|
|
18858
|
-
state.current.diff = height2 - state.current.scrollY;
|
|
18859
|
-
return;
|
|
18860
|
-
}
|
|
18861
|
-
}
|
|
18862
|
-
setCurrentIndex(listHeight.length - 2);
|
|
18863
|
-
};
|
|
18864
|
-
React.useEffect(() => {
|
|
18865
|
-
if (listview.current) {
|
|
18866
|
-
setListGroup();
|
|
18867
|
-
listview.current.addEventListener("scroll", listViewScroll);
|
|
18868
|
-
}
|
|
18869
|
-
}, [listview]);
|
|
18870
|
-
React.useEffect(() => {
|
|
18871
|
-
const { listHeight, diff, scrollY: scrollY2 } = state.current;
|
|
18872
|
-
let fixedTop = diff > 0 && diff < titleHeight ? diff - titleHeight : 0;
|
|
18873
|
-
if (scrollY2 + clientHeight() === listHeight[listHeight.length - 1]) {
|
|
18874
|
-
if (fixedTop !== 0) {
|
|
18875
|
-
fixedTop = 0;
|
|
18876
|
-
}
|
|
18877
|
-
}
|
|
18878
|
-
if (state.current.fixedTop === fixedTop)
|
|
18879
|
-
return;
|
|
18880
|
-
state.current.fixedTop = fixedTop;
|
|
18881
|
-
}, [state.current.diff, titleHeight]);
|
|
18882
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18883
|
-
className: `${b2()} ${className}`,
|
|
18884
|
-
...rest
|
|
18885
|
-
}, isSticky && scrollY > 0 ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18886
|
-
className: b2("list__fixed")
|
|
18887
|
-
}, /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18888
|
-
className: "fixed-title"
|
|
18889
|
-
}, indexList[currentIndex][acceptKey])) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18890
|
-
className: b2("list"),
|
|
18891
|
-
style: { height: Number.isNaN(+height) ? height : `${height}px` }
|
|
18892
|
-
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18893
|
-
className: b2("list__inner"),
|
|
18894
|
-
ref: listview
|
|
18895
|
-
}, indexList.map((item, idx) => {
|
|
18896
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18897
|
-
className: b2("list__item"),
|
|
18898
|
-
key: idx
|
|
18899
|
-
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18900
|
-
className: b2("list__item__code")
|
|
18901
|
-
}, item[acceptKey]), /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.list.map((subitem) => {
|
|
18902
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18903
|
-
className: b2("list__item__name", {
|
|
18904
|
-
highcolor: currentData.id === subitem.id && currentKey === item[acceptKey]
|
|
18905
|
-
}),
|
|
18906
|
-
key: subitem.id,
|
|
18907
|
-
onClick: () => handleClickItem(item[acceptKey], subitem)
|
|
18908
|
-
}, children ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement(elevatorContext.Provider, {
|
|
18909
|
-
value: subitem
|
|
18910
|
-
}, children)) : subitem.name);
|
|
18911
|
-
})));
|
|
18912
|
-
}))), indexList.length && scrollStart ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18913
|
-
className: b2("code--current", { current: true })
|
|
18914
|
-
}, indexList[codeIndex][acceptKey]) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18915
|
-
className: b2("bars")
|
|
18916
|
-
}, /* @__PURE__ */ React__default["default"].createElement(animated.div, {
|
|
18917
|
-
className: b2("bars__inner"),
|
|
18918
|
-
...bind(),
|
|
18919
|
-
style: { touchAction: "pan-y" }
|
|
18920
|
-
}, indexList.map((item, index2) => {
|
|
18921
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18922
|
-
className: b2("bars__inner__item", {
|
|
18923
|
-
active: item[acceptKey] === indexList[currentIndex][acceptKey]
|
|
18924
|
-
}),
|
|
18925
|
-
"data-index": index2,
|
|
18926
|
-
key: index2,
|
|
18927
|
-
onClick: () => handleClickIndex(item[acceptKey])
|
|
18928
|
-
}, item[acceptKey]);
|
|
18929
|
-
}))));
|
|
18930
|
-
};
|
|
18931
|
-
Elevator.defaultProps = defaultProps$8;
|
|
18932
|
-
Elevator.displayName = "NutElevator";
|
|
18933
18298
|
const defaultProps$7 = {
|
|
18934
18299
|
modelValue: [],
|
|
18935
18300
|
type: "custom",
|
|
@@ -18962,10 +18327,10 @@
|
|
|
18962
18327
|
const [privateType] = React.useState(type);
|
|
18963
18328
|
const [tabIndex, setTabIndex] = React.useState(0);
|
|
18964
18329
|
const [tabName] = React.useState(["province", "city", "country", "town"]);
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18330
|
+
React.useRef(null);
|
|
18331
|
+
React.useRef(null);
|
|
18332
|
+
React.useRef(null);
|
|
18333
|
+
React.useRef(null);
|
|
18969
18334
|
const regionLine = React.useRef(null);
|
|
18970
18335
|
const isCustom2 = () => {
|
|
18971
18336
|
return type === "custom2";
|
|
@@ -19023,21 +18388,16 @@
|
|
|
19023
18388
|
}
|
|
19024
18389
|
return locale.select;
|
|
19025
18390
|
};
|
|
19026
|
-
const mapRef = {
|
|
19027
|
-
province: provinceRef,
|
|
19028
|
-
city: cityRef,
|
|
19029
|
-
country: countryRef,
|
|
19030
|
-
town: townRef
|
|
19031
|
-
};
|
|
19032
18391
|
const lineAnimation = (index2) => {
|
|
19033
18392
|
setTimeout(() => {
|
|
19034
18393
|
const name = tabName[index2];
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
18394
|
+
Taro__default["default"].createSelectorQuery().selectAll(`.${name}`).boundingClientRect((rects) => {
|
|
18395
|
+
rects && rects.length > 0 && rects.forEach((rect) => {
|
|
18396
|
+
if (rect.width > 0)
|
|
18397
|
+
setLineDistance(rect.left || 20);
|
|
18398
|
+
});
|
|
18399
|
+
}).exec();
|
|
18400
|
+
}, 100);
|
|
19041
18401
|
};
|
|
19042
18402
|
const nextAreaList = (item) => {
|
|
19043
18403
|
const calBack = {
|
|
@@ -19120,9 +18480,6 @@
|
|
|
19120
18480
|
lineAnimation(tagIndex);
|
|
19121
18481
|
}
|
|
19122
18482
|
};
|
|
19123
|
-
const handleElevatorItem = (key, item) => {
|
|
19124
|
-
nextAreaList(item);
|
|
19125
|
-
};
|
|
19126
18483
|
React.useEffect(() => {
|
|
19127
18484
|
const { province: province2 } = { ...defaultProps$7, ...props };
|
|
19128
18485
|
setRegionList({
|
|
@@ -19161,9 +18518,8 @@
|
|
|
19161
18518
|
}, selectedRegion && Object.keys(selectedRegion).map(
|
|
19162
18519
|
(key, index2) => {
|
|
19163
18520
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19164
|
-
className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""}`,
|
|
18521
|
+
className: `${b2("tab-item")} ${index2 === tabIndex ? "active" : ""} ${tabName[index2]}`,
|
|
19165
18522
|
key: index2,
|
|
19166
|
-
ref: mapRef[key],
|
|
19167
18523
|
onClick: () => changeRegionTab(
|
|
19168
18524
|
selectedRegion[key],
|
|
19169
18525
|
index2,
|
|
@@ -19198,13 +18554,7 @@
|
|
|
19198
18554
|
size: "13px"
|
|
19199
18555
|
}), item.name));
|
|
19200
18556
|
}
|
|
19201
|
-
)))
|
|
19202
|
-
className: b2("elevator-group")
|
|
19203
|
-
}, /* @__PURE__ */ React__default["default"].createElement(Elevator, {
|
|
19204
|
-
height,
|
|
19205
|
-
indexList: regionList[tabName[tabIndex]],
|
|
19206
|
-
onClickItem: handleElevatorItem
|
|
19207
|
-
})));
|
|
18557
|
+
))));
|
|
19208
18558
|
};
|
|
19209
18559
|
const defaultProps$6 = {
|
|
19210
18560
|
...ComponentDefaults,
|
|
@@ -19577,7 +18927,7 @@
|
|
|
19577
18927
|
}
|
|
19578
18928
|
props.clear && props.clear();
|
|
19579
18929
|
};
|
|
19580
|
-
const
|
|
18930
|
+
const confirm = () => {
|
|
19581
18931
|
onSave(canvasRef.current);
|
|
19582
18932
|
};
|
|
19583
18933
|
const onSave = (canvas) => {
|
|
@@ -19607,14 +18957,14 @@
|
|
|
19607
18957
|
width: canvasWidth
|
|
19608
18958
|
}) : /* @__PURE__ */ React__default["default"].createElement("p", {
|
|
19609
18959
|
className: `${b2("unsopport")}`
|
|
19610
|
-
}, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React__default["default"].createElement(Button
|
|
18960
|
+
}, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
19611
18961
|
className: `${b2("btn")}`,
|
|
19612
18962
|
type: "default",
|
|
19613
18963
|
onClick: () => clear()
|
|
19614
|
-
}, locale.signature.reSign), /* @__PURE__ */ React__default["default"].createElement(Button
|
|
18964
|
+
}, locale.signature.reSign), /* @__PURE__ */ React__default["default"].createElement(Button, {
|
|
19615
18965
|
className: `${b2("btn")}`,
|
|
19616
18966
|
type: "primary",
|
|
19617
|
-
onClick: () =>
|
|
18967
|
+
onClick: () => confirm()
|
|
19618
18968
|
}, locale.confirm));
|
|
19619
18969
|
};
|
|
19620
18970
|
Signature.defaultProps = defaultProps$4;
|
|
@@ -19887,7 +19237,7 @@
|
|
|
19887
19237
|
exports2.BackTop = BackTop;
|
|
19888
19238
|
exports2.Badge = Badge;
|
|
19889
19239
|
exports2.Barrage = Barrage;
|
|
19890
|
-
exports2.Button = Button
|
|
19240
|
+
exports2.Button = Button;
|
|
19891
19241
|
exports2.Calendar = Calendar;
|
|
19892
19242
|
exports2.CalendarItem = CalendarItem;
|
|
19893
19243
|
exports2.Card = Card;
|
|
@@ -19906,7 +19256,7 @@
|
|
|
19906
19256
|
exports2.Dialog = Dialog;
|
|
19907
19257
|
exports2.Divider = Divider;
|
|
19908
19258
|
exports2.Drag = Drag;
|
|
19909
|
-
exports2.Elevator = Elevator
|
|
19259
|
+
exports2.Elevator = Elevator;
|
|
19910
19260
|
exports2.Empty = Empty;
|
|
19911
19261
|
exports2.FixedNav = FixedNav;
|
|
19912
19262
|
exports2.Grid = Grid;
|