@nutui/nutui-react 2.3.11 → 2.3.12
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 +18 -0
- package/dist/esm/ActionSheet.js +30 -86
- package/dist/esm/Address.js +80 -184
- package/dist/esm/Animate.js +21 -49
- package/dist/esm/AnimatingNumbers.js +47 -136
- package/dist/esm/Audio.js +88 -159
- package/dist/esm/Avatar.js +44 -91
- package/dist/esm/AvatarCropper.js +149 -268
- package/dist/esm/AvatarGroup.js +13 -44
- package/dist/esm/BackTop.js +34 -75
- package/dist/esm/Badge.js +0 -3
- package/dist/esm/Barrage.js +49 -83
- package/dist/esm/Button.js +0 -4
- package/dist/esm/Calendar.js +27 -119
- package/dist/esm/CalendarCard.js +180 -291
- package/dist/esm/CalendarItem.js +253 -314
- package/dist/esm/Card.js +38 -72
- package/dist/esm/Cascader.js +0 -17
- package/dist/esm/Cell.js +27 -62
- package/dist/esm/CellGroup.js +16 -45
- package/dist/esm/Checkbox.js +0 -6
- package/dist/esm/CheckboxGroup.js +49 -88
- package/dist/esm/CircleProgress.js +42 -93
- package/dist/esm/Col.js +17 -48
- package/dist/esm/Collapse.js +18 -49
- package/dist/esm/CollapseItem.js +0 -3
- package/dist/esm/ConfigProvider.js +3 -4
- package/dist/esm/CountDown.js +62 -101
- package/dist/esm/DatePicker.js +87 -127
- package/dist/esm/Dialog.js +117 -203
- package/dist/esm/Divider.js +16 -36
- package/dist/esm/Drag.js +32 -76
- package/dist/esm/Elevator.js +94 -133
- package/dist/esm/Ellipsis.js +71 -92
- package/dist/esm/Empty.js +31 -71
- package/dist/esm/FixedNav.js +32 -81
- package/dist/esm/Form.js +28 -61
- package/dist/esm/FormItem.js +0 -3
- package/dist/esm/Grid.js +27 -52
- package/dist/esm/GridItem.js +0 -4
- package/dist/esm/Image.js +47 -102
- package/dist/esm/ImagePreview.js +82 -135
- package/dist/esm/Indicator.js +0 -2
- package/dist/esm/InfiniteLoading.js +77 -159
- package/dist/esm/Input.js +57 -125
- package/dist/esm/InputNumber.js +66 -96
- package/dist/esm/Layout.js +4 -28
- package/dist/esm/Loading.js +13 -40
- package/dist/esm/Menu.js +51 -114
- package/dist/esm/MenuItem.js +0 -13
- package/dist/esm/NavBar.js +46 -85
- package/dist/esm/NoticeBar.js +153 -226
- package/dist/esm/Notify.js +87 -195
- package/dist/esm/NumberKeyboard.js +84 -150
- package/dist/esm/Overlay.js +0 -8
- package/dist/esm/Pagination.js +58 -97
- package/dist/esm/Picker.js +215 -283
- package/dist/esm/Popover.js +111 -160
- package/dist/esm/Popup.js +0 -12
- package/dist/esm/Price.js +23 -60
- package/dist/esm/Progress.js +47 -77
- package/dist/esm/PullToRefresh.js +94 -202
- package/dist/esm/Radio.js +0 -6
- package/dist/esm/RadioGroup.js +23 -56
- package/dist/esm/Range.js +113 -177
- package/dist/esm/Rate.js +48 -95
- package/dist/esm/Row.js +19 -43
- package/dist/esm/SafeArea.js +0 -2
- package/dist/esm/SearchBar.js +52 -119
- package/dist/esm/ShortPassword.js +58 -106
- package/dist/esm/SideNavBar.js +34 -59
- package/dist/esm/SideNavBarItem.js +7 -36
- package/dist/esm/Signature.js +49 -84
- package/dist/esm/Skeleton.js +31 -68
- package/dist/esm/Space.js +7 -34
- package/dist/esm/Step.js +35 -64
- package/dist/esm/Steps.js +16 -40
- package/dist/esm/Sticky.js +64 -109
- package/dist/esm/SubSideNavBar.js +42 -71
- package/dist/esm/Swipe.js +79 -143
- package/dist/esm/Swiper.js +136 -183
- package/dist/esm/SwiperItem.js +13 -38
- package/dist/esm/Switch.js +20 -53
- package/dist/esm/TabPane.js +6 -30
- package/dist/esm/Tabbar.js +29 -60
- package/dist/esm/TabbarItem.js +0 -4
- package/dist/esm/Table.js +92 -141
- package/dist/esm/Tabs.js +0 -7
- package/dist/esm/Tag.js +30 -74
- package/dist/esm/TextArea.js +37 -82
- package/dist/esm/TimeDetail.js +20 -58
- package/dist/esm/TimeSelect.js +57 -95
- package/dist/esm/Toast.js +110 -219
- package/dist/esm/Tour.js +88 -132
- package/dist/esm/TrendArrow.js +32 -74
- package/dist/esm/Uploader.js +226 -346
- package/dist/esm/UserContext.js +1 -1
- package/dist/esm/Video.js +34 -67
- package/dist/esm/VirtualList.js +127 -160
- package/dist/esm/WaterMark.js +24 -68
- package/dist/esm/badge2.js +23 -53
- package/dist/esm/button2.js +30 -63
- package/dist/esm/can-use-dom.js +1 -1
- package/dist/esm/cascader2.js +308 -538
- package/dist/esm/checkbox2.js +59 -96
- package/dist/esm/collapseitem2.js +48 -86
- package/dist/esm/configprovider2.js +43 -1003
- package/dist/esm/context.js +1 -1
- package/dist/esm/context2.js +1 -1
- package/dist/esm/context3.js +1 -1
- package/dist/esm/context4.js +1 -1
- package/dist/esm/context5.js +8 -8
- package/dist/esm/date.js +88 -66
- package/dist/esm/formitem2.js +236 -1526
- package/dist/esm/get-scroll-parent.js +8 -10
- package/dist/esm/griditem2.js +34 -52
- package/dist/esm/index.js +5 -12
- package/dist/esm/indicator2.js +13 -42
- package/dist/esm/menuitem2.js +81 -124
- package/dist/esm/overlay2.js +39 -78
- package/dist/esm/pad-zero.js +3 -4
- package/dist/esm/popup2.js +79 -124
- package/dist/esm/px-check.js +2 -2
- package/dist/esm/radio2.js +48 -79
- package/dist/esm/raf.js +5 -3
- package/dist/esm/render.js +17 -54
- package/dist/esm/safearea2.js +3 -5
- package/dist/esm/supports-passive.js +3 -3
- package/dist/esm/tabbaritem2.js +42 -58
- package/dist/esm/tabs2.js +82 -120
- package/dist/esm/tslib.es6.js +47 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/esm/types/src/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/esm/types/src/packages/configprovider/index.d.ts +2 -2
- package/dist/esm/types/src/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.taro.d.ts +2 -0
- package/dist/esm/typings.js +1 -1
- package/dist/esm/use-click-away.js +9 -13
- package/dist/esm/use-client-rect.js +4 -4
- package/dist/esm/use-props-value.js +10 -15
- package/dist/esm/use-refs.js +5 -7
- package/dist/esm/use-touch.js +16 -20
- 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/tr-TR.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +465 -485
- package/dist/nutui.react.umd.js +462 -482
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +4 -0
- package/dist/types/index.d.ts +98 -98
- package/dist/types/packages/actionsheet/actionsheet.d.ts +1 -1
- package/dist/types/packages/actionsheet/actionsheet.taro.d.ts +1 -1
- package/dist/types/packages/address/address.d.ts +1 -1
- package/dist/types/packages/address/address.taro.d.ts +1 -1
- package/dist/types/packages/address/customRender.d.ts +1 -1
- package/dist/types/packages/address/customRender.taro.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.d.ts +1 -1
- package/dist/types/packages/avatar/avatar.taro.d.ts +1 -1
- package/dist/types/packages/button/demos/h5/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/h5/demo9.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo1.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo10.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo2.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo3.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo4.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo5.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo6.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo7.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo8.d.ts +3 -0
- package/dist/types/packages/button/demos/taro/demo9.d.ts +3 -0
- package/dist/types/packages/calendaritem/calendaritem.d.ts +1 -1
- package/dist/types/packages/calendaritem/calendaritem.taro.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.d.ts +1 -1
- package/dist/types/packages/cascader/cascader.taro.d.ts +1 -1
- package/dist/types/packages/cell/cell.d.ts +1 -1
- package/dist/types/packages/cell/cell.taro.d.ts +1 -1
- package/dist/types/packages/checkbox/checkbox.d.ts +2 -2
- package/dist/types/packages/checkbox/checkbox.taro.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.d.ts +2 -2
- package/dist/types/packages/checkboxgroup/checkboxgroup.taro.d.ts +2 -2
- package/dist/types/packages/configprovider/configprovider.d.ts +1 -0
- package/dist/types/packages/configprovider/configprovider.taro.d.ts +1 -0
- package/dist/types/packages/configprovider/index.d.ts +2 -2
- package/dist/types/packages/configprovider/index.taro.d.ts +2 -2
- package/dist/types/packages/datepicker/datepicker.d.ts +1 -1
- package/dist/types/packages/datepicker/datepicker.taro.d.ts +1 -1
- package/dist/types/packages/dialog/dialogwrap.d.ts +1 -1
- package/dist/types/packages/empty/empty.d.ts +16 -4
- package/dist/types/packages/fixednav/fixednav.d.ts +1 -1
- package/dist/types/packages/fixednav/fixednav.taro.d.ts +1 -1
- package/dist/types/packages/form/form.d.ts +1 -1
- package/dist/types/packages/form/form.taro.d.ts +1 -1
- package/dist/types/packages/form/index.d.ts +1 -1
- package/dist/types/packages/form/index.taro.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +2 -0
- package/dist/types/packages/menu/menu.d.ts +1 -1
- package/dist/types/packages/menu/menu.taro.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.d.ts +1 -1
- package/dist/types/packages/numberkeyboard/numberkeyboard.taro.d.ts +1 -1
- package/dist/types/packages/nutui.react.d.ts +98 -98
- package/dist/types/packages/nutui.react.taro.d.ts +98 -98
- package/dist/types/packages/nutui.taro.react.build.d.ts +98 -98
- package/dist/types/packages/picker/picker.d.ts +1 -1
- package/dist/types/packages/picker/picker.taro.d.ts +1 -1
- package/dist/types/packages/popover/popover.d.ts +1 -1
- package/dist/types/packages/popover/popover.taro.d.ts +1 -1
- package/dist/types/packages/popup/popup.d.ts +1 -1
- package/dist/types/packages/popup/popup.taro.d.ts +1 -1
- package/dist/types/packages/radio/radio.d.ts +2 -2
- package/dist/types/packages/radio/radio.taro.d.ts +2 -2
- package/dist/types/packages/rate/rate.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.d.ts +1 -1
- package/dist/types/packages/shortpassword/shortpassword.taro.d.ts +1 -1
- package/dist/types/packages/swiper/index.d.ts +1 -1
- package/dist/types/packages/swiper/index.taro.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.d.ts +1 -1
- package/dist/types/packages/tabs/tabs.taro.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.d.ts +1 -1
- package/dist/types/packages/timedetail/timedetail.taro.d.ts +1 -1
- package/dist/types/packages/tour/tour.d.ts +1 -1
- package/dist/types/packages/tour/tour.taro.d.ts +1 -1
- package/package.json +5 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.nutui = global2.nutui || {}, global2.nutui.react = {}), global2.React, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, ReactDOM) {
|
|
4
|
-
"use strict"
|
|
5
|
-
|
|
6
|
-
var __publicField = (obj, key, value) => {
|
|
7
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
-
return value;
|
|
9
|
-
};
|
|
10
|
-
/*!
|
|
11
|
-
* @nutui/nutui-react v2.3.11 Fri Feb 23 2024 19:38:03 GMT+0800 (China Standard Time)
|
|
4
|
+
"use strict";/*!
|
|
5
|
+
* @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
|
|
12
6
|
* (c) 2023 @jdf2e.
|
|
13
7
|
* Released under the MIT License.
|
|
14
8
|
*/
|
|
15
9
|
|
|
16
|
-
var _a;
|
|
17
10
|
function _interopNamespaceDefault(e2) {
|
|
18
11
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
19
12
|
if (e2) {
|
|
@@ -46,34 +39,44 @@ var __publicField = (obj, key, value) => {
|
|
|
46
39
|
(function() {
|
|
47
40
|
var hasOwn = {}.hasOwnProperty;
|
|
48
41
|
function classNames2() {
|
|
49
|
-
var classes =
|
|
42
|
+
var classes = "";
|
|
50
43
|
for (var i = 0; i < arguments.length; i++) {
|
|
51
44
|
var arg = arguments[i];
|
|
52
|
-
if (
|
|
53
|
-
|
|
54
|
-
var argType = typeof arg;
|
|
55
|
-
if (argType === "string" || argType === "number") {
|
|
56
|
-
classes.push(arg);
|
|
57
|
-
} else if (Array.isArray(arg)) {
|
|
58
|
-
if (arg.length) {
|
|
59
|
-
var inner = classNames2.apply(null, arg);
|
|
60
|
-
if (inner) {
|
|
61
|
-
classes.push(inner);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
} else if (argType === "object") {
|
|
65
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
66
|
-
classes.push(arg.toString());
|
|
67
|
-
continue;
|
|
68
|
-
}
|
|
69
|
-
for (var key in arg) {
|
|
70
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
71
|
-
classes.push(key);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
45
|
+
if (arg) {
|
|
46
|
+
classes = appendClass(classes, parseValue(arg));
|
|
74
47
|
}
|
|
75
48
|
}
|
|
76
|
-
return classes
|
|
49
|
+
return classes;
|
|
50
|
+
}
|
|
51
|
+
function parseValue(arg) {
|
|
52
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
53
|
+
return arg;
|
|
54
|
+
}
|
|
55
|
+
if (typeof arg !== "object") {
|
|
56
|
+
return "";
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(arg)) {
|
|
59
|
+
return classNames2.apply(null, arg);
|
|
60
|
+
}
|
|
61
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
62
|
+
return arg.toString();
|
|
63
|
+
}
|
|
64
|
+
var classes = "";
|
|
65
|
+
for (var key in arg) {
|
|
66
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
67
|
+
classes = appendClass(classes, key);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return classes;
|
|
71
|
+
}
|
|
72
|
+
function appendClass(value, newClass) {
|
|
73
|
+
if (!newClass) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
if (value) {
|
|
77
|
+
return value + " " + newClass;
|
|
78
|
+
}
|
|
79
|
+
return value + newClass;
|
|
77
80
|
}
|
|
78
81
|
if (module2.exports) {
|
|
79
82
|
classNames2.default = classNames2;
|
|
@@ -1704,8 +1707,8 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
1704
1707
|
var reIsNative = RegExp(
|
|
1705
1708
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1706
1709
|
);
|
|
1707
|
-
var
|
|
1708
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer =
|
|
1710
|
+
var Buffer = moduleExports ? root2.Buffer : void 0, Symbol2 = root2.Symbol, Uint8Array = root2.Uint8Array, propertyIsEnumerable = objectProto2.propertyIsEnumerable, splice = arrayProto.splice, symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
1711
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
|
|
1709
1712
|
var DataView = getNative(root2, "DataView"), Map2 = getNative(root2, "Map"), Promise2 = getNative(root2, "Promise"), Set2 = getNative(root2, "Set"), WeakMap2 = getNative(root2, "WeakMap"), nativeCreate = getNative(Object, "create");
|
|
1710
1713
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
|
1711
1714
|
var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
|
|
@@ -2037,7 +2040,7 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
2037
2040
|
object2 = object2.buffer;
|
|
2038
2041
|
other = other.buffer;
|
|
2039
2042
|
case arrayBufferTag:
|
|
2040
|
-
if (object2.byteLength != other.byteLength || !equalFunc(new
|
|
2043
|
+
if (object2.byteLength != other.byteLength || !equalFunc(new Uint8Array(object2), new Uint8Array(other))) {
|
|
2041
2044
|
return false;
|
|
2042
2045
|
}
|
|
2043
2046
|
return true;
|
|
@@ -2394,11 +2397,23 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
2394
2397
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2395
2398
|
}
|
|
2396
2399
|
};
|
|
2400
|
+
const inBrowser = typeof window !== "undefined";
|
|
2401
|
+
function requestAniFrame() {
|
|
2402
|
+
if (typeof window !== "undefined") {
|
|
2403
|
+
const _window = window;
|
|
2404
|
+
return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
|
|
2405
|
+
_window.setTimeout(callback, 1e3 / 60);
|
|
2406
|
+
};
|
|
2407
|
+
}
|
|
2408
|
+
return (callback) => {
|
|
2409
|
+
setTimeout(callback, 1e3 / 60);
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
const requestAniFrame$1 = requestAniFrame();
|
|
2397
2413
|
const classPrefix$p = "nut-configprovider";
|
|
2398
2414
|
const defaultConfigRef = {
|
|
2399
2415
|
current: {
|
|
2400
|
-
locale: zhCN
|
|
2401
|
-
direction: "ltr"
|
|
2416
|
+
locale: zhCN
|
|
2402
2417
|
}
|
|
2403
2418
|
};
|
|
2404
2419
|
const getDefaultConfig = () => {
|
|
@@ -2415,16 +2430,24 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
2415
2430
|
});
|
|
2416
2431
|
return cssVars;
|
|
2417
2432
|
}
|
|
2433
|
+
const useRtl = () => {
|
|
2434
|
+
const { direction } = useConfig();
|
|
2435
|
+
if (direction) {
|
|
2436
|
+
return direction === "rtl";
|
|
2437
|
+
}
|
|
2438
|
+
return inBrowser && document.dir === "rtl";
|
|
2439
|
+
};
|
|
2418
2440
|
const ConfigProvider = (props) => {
|
|
2419
2441
|
const { style, className, children, direction, ...config2 } = props;
|
|
2420
2442
|
const mergedConfig = useMemo(
|
|
2421
2443
|
() => {
|
|
2422
2444
|
return {
|
|
2423
2445
|
...getDefaultConfig(),
|
|
2424
|
-
...config2
|
|
2446
|
+
...config2,
|
|
2447
|
+
direction
|
|
2425
2448
|
};
|
|
2426
2449
|
},
|
|
2427
|
-
[config2],
|
|
2450
|
+
[config2, direction],
|
|
2428
2451
|
(prev, next) => prev.some((prevTheme, index) => {
|
|
2429
2452
|
const nextTheme = next[index];
|
|
2430
2453
|
return !isequal(prevTheme, nextTheme);
|
|
@@ -2665,72 +2688,111 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
2665
2688
|
_setPrototypeOf$1(subClass, superClass);
|
|
2666
2689
|
}
|
|
2667
2690
|
var propTypes = { exports: {} };
|
|
2668
|
-
var
|
|
2669
|
-
var
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
var
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2691
|
+
var reactIs = { exports: {} };
|
|
2692
|
+
var reactIs_production_min = {};
|
|
2693
|
+
/** @license React v16.13.1
|
|
2694
|
+
* react-is.production.min.js
|
|
2695
|
+
*
|
|
2696
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2697
|
+
*
|
|
2698
|
+
* This source code is licensed under the MIT license found in the
|
|
2699
|
+
* LICENSE file in the root directory of this source tree.
|
|
2700
|
+
*/
|
|
2701
|
+
var hasRequiredReactIs_production_min;
|
|
2702
|
+
function requireReactIs_production_min() {
|
|
2703
|
+
if (hasRequiredReactIs_production_min)
|
|
2704
|
+
return reactIs_production_min;
|
|
2705
|
+
hasRequiredReactIs_production_min = 1;
|
|
2706
|
+
var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
2707
|
+
function z(a2) {
|
|
2708
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
2709
|
+
var u = a2.$$typeof;
|
|
2710
|
+
switch (u) {
|
|
2711
|
+
case c6:
|
|
2712
|
+
switch (a2 = a2.type, a2) {
|
|
2713
|
+
case l2:
|
|
2714
|
+
case m:
|
|
2715
|
+
case e2:
|
|
2716
|
+
case g:
|
|
2717
|
+
case f:
|
|
2718
|
+
case p:
|
|
2719
|
+
return a2;
|
|
2720
|
+
default:
|
|
2721
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2722
|
+
case k:
|
|
2723
|
+
case n:
|
|
2724
|
+
case t2:
|
|
2725
|
+
case r2:
|
|
2726
|
+
case h:
|
|
2727
|
+
return a2;
|
|
2728
|
+
default:
|
|
2729
|
+
return u;
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
case d:
|
|
2733
|
+
return u;
|
|
2694
2734
|
}
|
|
2695
|
-
var err = new Error(
|
|
2696
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
2697
|
-
);
|
|
2698
|
-
err.name = "Invariant Violation";
|
|
2699
|
-
throw err;
|
|
2700
|
-
}
|
|
2701
|
-
shim.isRequired = shim;
|
|
2702
|
-
function getShim() {
|
|
2703
|
-
return shim;
|
|
2704
2735
|
}
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
exact: getShim,
|
|
2725
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
2726
|
-
resetWarningCache: emptyFunction
|
|
2727
|
-
};
|
|
2728
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2729
|
-
return ReactPropTypes;
|
|
2736
|
+
}
|
|
2737
|
+
function A(a2) {
|
|
2738
|
+
return z(a2) === m;
|
|
2739
|
+
}
|
|
2740
|
+
reactIs_production_min.AsyncMode = l2;
|
|
2741
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
2742
|
+
reactIs_production_min.ContextConsumer = k;
|
|
2743
|
+
reactIs_production_min.ContextProvider = h;
|
|
2744
|
+
reactIs_production_min.Element = c6;
|
|
2745
|
+
reactIs_production_min.ForwardRef = n;
|
|
2746
|
+
reactIs_production_min.Fragment = e2;
|
|
2747
|
+
reactIs_production_min.Lazy = t2;
|
|
2748
|
+
reactIs_production_min.Memo = r2;
|
|
2749
|
+
reactIs_production_min.Portal = d;
|
|
2750
|
+
reactIs_production_min.Profiler = g;
|
|
2751
|
+
reactIs_production_min.StrictMode = f;
|
|
2752
|
+
reactIs_production_min.Suspense = p;
|
|
2753
|
+
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2754
|
+
return A(a2) || z(a2) === l2;
|
|
2730
2755
|
};
|
|
2731
|
-
|
|
2756
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
2757
|
+
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2758
|
+
return z(a2) === k;
|
|
2759
|
+
};
|
|
2760
|
+
reactIs_production_min.isContextProvider = function(a2) {
|
|
2761
|
+
return z(a2) === h;
|
|
2762
|
+
};
|
|
2763
|
+
reactIs_production_min.isElement = function(a2) {
|
|
2764
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2765
|
+
};
|
|
2766
|
+
reactIs_production_min.isForwardRef = function(a2) {
|
|
2767
|
+
return z(a2) === n;
|
|
2768
|
+
};
|
|
2769
|
+
reactIs_production_min.isFragment = function(a2) {
|
|
2770
|
+
return z(a2) === e2;
|
|
2771
|
+
};
|
|
2772
|
+
reactIs_production_min.isLazy = function(a2) {
|
|
2773
|
+
return z(a2) === t2;
|
|
2774
|
+
};
|
|
2775
|
+
reactIs_production_min.isMemo = function(a2) {
|
|
2776
|
+
return z(a2) === r2;
|
|
2777
|
+
};
|
|
2778
|
+
reactIs_production_min.isPortal = function(a2) {
|
|
2779
|
+
return z(a2) === d;
|
|
2780
|
+
};
|
|
2781
|
+
reactIs_production_min.isProfiler = function(a2) {
|
|
2782
|
+
return z(a2) === g;
|
|
2783
|
+
};
|
|
2784
|
+
reactIs_production_min.isStrictMode = function(a2) {
|
|
2785
|
+
return z(a2) === f;
|
|
2786
|
+
};
|
|
2787
|
+
reactIs_production_min.isSuspense = function(a2) {
|
|
2788
|
+
return z(a2) === p;
|
|
2789
|
+
};
|
|
2790
|
+
reactIs_production_min.isValidElementType = function(a2) {
|
|
2791
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
|
|
2792
|
+
};
|
|
2793
|
+
reactIs_production_min.typeOf = z;
|
|
2794
|
+
return reactIs_production_min;
|
|
2732
2795
|
}
|
|
2733
|
-
var reactIs = { exports: {} };
|
|
2734
2796
|
var reactIs_development = {};
|
|
2735
2797
|
/** @license React v16.13.1
|
|
2736
2798
|
* react-is.development.js
|
|
@@ -2894,110 +2956,6 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
2894
2956
|
}
|
|
2895
2957
|
return reactIs_development;
|
|
2896
2958
|
}
|
|
2897
|
-
var reactIs_production_min = {};
|
|
2898
|
-
/** @license React v16.13.1
|
|
2899
|
-
* react-is.production.min.js
|
|
2900
|
-
*
|
|
2901
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2902
|
-
*
|
|
2903
|
-
* This source code is licensed under the MIT license found in the
|
|
2904
|
-
* LICENSE file in the root directory of this source tree.
|
|
2905
|
-
*/
|
|
2906
|
-
var hasRequiredReactIs_production_min;
|
|
2907
|
-
function requireReactIs_production_min() {
|
|
2908
|
-
if (hasRequiredReactIs_production_min)
|
|
2909
|
-
return reactIs_production_min;
|
|
2910
|
-
hasRequiredReactIs_production_min = 1;
|
|
2911
|
-
var b = "function" === typeof Symbol && Symbol.for, c6 = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e2 = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l2 = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r2 = b ? Symbol.for("react.memo") : 60115, t2 = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
|
|
2912
|
-
function z(a2) {
|
|
2913
|
-
if ("object" === typeof a2 && null !== a2) {
|
|
2914
|
-
var u = a2.$$typeof;
|
|
2915
|
-
switch (u) {
|
|
2916
|
-
case c6:
|
|
2917
|
-
switch (a2 = a2.type, a2) {
|
|
2918
|
-
case l2:
|
|
2919
|
-
case m:
|
|
2920
|
-
case e2:
|
|
2921
|
-
case g:
|
|
2922
|
-
case f:
|
|
2923
|
-
case p:
|
|
2924
|
-
return a2;
|
|
2925
|
-
default:
|
|
2926
|
-
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2927
|
-
case k:
|
|
2928
|
-
case n:
|
|
2929
|
-
case t2:
|
|
2930
|
-
case r2:
|
|
2931
|
-
case h:
|
|
2932
|
-
return a2;
|
|
2933
|
-
default:
|
|
2934
|
-
return u;
|
|
2935
|
-
}
|
|
2936
|
-
}
|
|
2937
|
-
case d:
|
|
2938
|
-
return u;
|
|
2939
|
-
}
|
|
2940
|
-
}
|
|
2941
|
-
}
|
|
2942
|
-
function A(a2) {
|
|
2943
|
-
return z(a2) === m;
|
|
2944
|
-
}
|
|
2945
|
-
reactIs_production_min.AsyncMode = l2;
|
|
2946
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
2947
|
-
reactIs_production_min.ContextConsumer = k;
|
|
2948
|
-
reactIs_production_min.ContextProvider = h;
|
|
2949
|
-
reactIs_production_min.Element = c6;
|
|
2950
|
-
reactIs_production_min.ForwardRef = n;
|
|
2951
|
-
reactIs_production_min.Fragment = e2;
|
|
2952
|
-
reactIs_production_min.Lazy = t2;
|
|
2953
|
-
reactIs_production_min.Memo = r2;
|
|
2954
|
-
reactIs_production_min.Portal = d;
|
|
2955
|
-
reactIs_production_min.Profiler = g;
|
|
2956
|
-
reactIs_production_min.StrictMode = f;
|
|
2957
|
-
reactIs_production_min.Suspense = p;
|
|
2958
|
-
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2959
|
-
return A(a2) || z(a2) === l2;
|
|
2960
|
-
};
|
|
2961
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
2962
|
-
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2963
|
-
return z(a2) === k;
|
|
2964
|
-
};
|
|
2965
|
-
reactIs_production_min.isContextProvider = function(a2) {
|
|
2966
|
-
return z(a2) === h;
|
|
2967
|
-
};
|
|
2968
|
-
reactIs_production_min.isElement = function(a2) {
|
|
2969
|
-
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2970
|
-
};
|
|
2971
|
-
reactIs_production_min.isForwardRef = function(a2) {
|
|
2972
|
-
return z(a2) === n;
|
|
2973
|
-
};
|
|
2974
|
-
reactIs_production_min.isFragment = function(a2) {
|
|
2975
|
-
return z(a2) === e2;
|
|
2976
|
-
};
|
|
2977
|
-
reactIs_production_min.isLazy = function(a2) {
|
|
2978
|
-
return z(a2) === t2;
|
|
2979
|
-
};
|
|
2980
|
-
reactIs_production_min.isMemo = function(a2) {
|
|
2981
|
-
return z(a2) === r2;
|
|
2982
|
-
};
|
|
2983
|
-
reactIs_production_min.isPortal = function(a2) {
|
|
2984
|
-
return z(a2) === d;
|
|
2985
|
-
};
|
|
2986
|
-
reactIs_production_min.isProfiler = function(a2) {
|
|
2987
|
-
return z(a2) === g;
|
|
2988
|
-
};
|
|
2989
|
-
reactIs_production_min.isStrictMode = function(a2) {
|
|
2990
|
-
return z(a2) === f;
|
|
2991
|
-
};
|
|
2992
|
-
reactIs_production_min.isSuspense = function(a2) {
|
|
2993
|
-
return z(a2) === p;
|
|
2994
|
-
};
|
|
2995
|
-
reactIs_production_min.isValidElementType = function(a2) {
|
|
2996
|
-
return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r2 || a2.$$typeof === h || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
|
|
2997
|
-
};
|
|
2998
|
-
reactIs_production_min.typeOf = z;
|
|
2999
|
-
return reactIs_production_min;
|
|
3000
|
-
}
|
|
3001
2959
|
var hasRequiredReactIs;
|
|
3002
2960
|
function requireReactIs() {
|
|
3003
2961
|
if (hasRequiredReactIs)
|
|
@@ -3086,6 +3044,16 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
3086
3044
|
};
|
|
3087
3045
|
return objectAssign;
|
|
3088
3046
|
}
|
|
3047
|
+
var ReactPropTypesSecret_1;
|
|
3048
|
+
var hasRequiredReactPropTypesSecret;
|
|
3049
|
+
function requireReactPropTypesSecret() {
|
|
3050
|
+
if (hasRequiredReactPropTypesSecret)
|
|
3051
|
+
return ReactPropTypesSecret_1;
|
|
3052
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
3053
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
3054
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
3055
|
+
return ReactPropTypesSecret_1;
|
|
3056
|
+
}
|
|
3089
3057
|
var has;
|
|
3090
3058
|
var hasRequiredHas;
|
|
3091
3059
|
function requireHas() {
|
|
@@ -3603,6 +3571,61 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
3603
3571
|
};
|
|
3604
3572
|
return factoryWithTypeCheckers;
|
|
3605
3573
|
}
|
|
3574
|
+
var factoryWithThrowingShims;
|
|
3575
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
3576
|
+
function requireFactoryWithThrowingShims() {
|
|
3577
|
+
if (hasRequiredFactoryWithThrowingShims)
|
|
3578
|
+
return factoryWithThrowingShims;
|
|
3579
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
3580
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
3581
|
+
function emptyFunction() {
|
|
3582
|
+
}
|
|
3583
|
+
function emptyFunctionWithReset() {
|
|
3584
|
+
}
|
|
3585
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3586
|
+
factoryWithThrowingShims = function() {
|
|
3587
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3588
|
+
if (secret === ReactPropTypesSecret) {
|
|
3589
|
+
return;
|
|
3590
|
+
}
|
|
3591
|
+
var err = new Error(
|
|
3592
|
+
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
3593
|
+
);
|
|
3594
|
+
err.name = "Invariant Violation";
|
|
3595
|
+
throw err;
|
|
3596
|
+
}
|
|
3597
|
+
shim.isRequired = shim;
|
|
3598
|
+
function getShim() {
|
|
3599
|
+
return shim;
|
|
3600
|
+
}
|
|
3601
|
+
var ReactPropTypes = {
|
|
3602
|
+
array: shim,
|
|
3603
|
+
bigint: shim,
|
|
3604
|
+
bool: shim,
|
|
3605
|
+
func: shim,
|
|
3606
|
+
number: shim,
|
|
3607
|
+
object: shim,
|
|
3608
|
+
string: shim,
|
|
3609
|
+
symbol: shim,
|
|
3610
|
+
any: shim,
|
|
3611
|
+
arrayOf: getShim,
|
|
3612
|
+
element: shim,
|
|
3613
|
+
elementType: shim,
|
|
3614
|
+
instanceOf: getShim,
|
|
3615
|
+
node: shim,
|
|
3616
|
+
objectOf: getShim,
|
|
3617
|
+
oneOf: getShim,
|
|
3618
|
+
oneOfType: getShim,
|
|
3619
|
+
shape: getShim,
|
|
3620
|
+
exact: getShim,
|
|
3621
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
3622
|
+
resetWarningCache: emptyFunction
|
|
3623
|
+
};
|
|
3624
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
3625
|
+
return ReactPropTypes;
|
|
3626
|
+
};
|
|
3627
|
+
return factoryWithThrowingShims;
|
|
3628
|
+
}
|
|
3606
3629
|
if (process.env.NODE_ENV !== "production") {
|
|
3607
3630
|
var ReactIs = requireReactIs();
|
|
3608
3631
|
var throwOnDirectAccess = true;
|
|
@@ -4448,6 +4471,19 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
4448
4471
|
}
|
|
4449
4472
|
return getAllScrollableParents(element.parentElement, scrollableParents);
|
|
4450
4473
|
}
|
|
4474
|
+
let passiveSupported = false;
|
|
4475
|
+
if (canUseDom) {
|
|
4476
|
+
try {
|
|
4477
|
+
const opts = Object.defineProperty({}, "passive", {
|
|
4478
|
+
get() {
|
|
4479
|
+
passiveSupported = true;
|
|
4480
|
+
}
|
|
4481
|
+
});
|
|
4482
|
+
window.addEventListener("test-passive-supported", null, opts);
|
|
4483
|
+
} catch (e2) {
|
|
4484
|
+
console.log(e2);
|
|
4485
|
+
}
|
|
4486
|
+
}
|
|
4451
4487
|
let totalLockCount = 0;
|
|
4452
4488
|
const BODY_LOCK_CLASS = "nut-overflow-hidden";
|
|
4453
4489
|
function getScrollableElement(el) {
|
|
@@ -4496,7 +4532,7 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
4496
4532
|
document.addEventListener(
|
|
4497
4533
|
"touchmove",
|
|
4498
4534
|
onTouchMove,
|
|
4499
|
-
false
|
|
4535
|
+
passiveSupported ? { passive: false } : false
|
|
4500
4536
|
);
|
|
4501
4537
|
if (!totalLockCount) {
|
|
4502
4538
|
document.body.classList.add(BODY_LOCK_CLASS);
|
|
@@ -5104,18 +5140,6 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
5104
5140
|
}
|
|
5105
5141
|
);
|
|
5106
5142
|
};
|
|
5107
|
-
function requestAniFrame() {
|
|
5108
|
-
if (typeof window !== "undefined") {
|
|
5109
|
-
const _window = window;
|
|
5110
|
-
return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
|
|
5111
|
-
_window.setTimeout(callback, 1e3 / 60);
|
|
5112
|
-
};
|
|
5113
|
-
}
|
|
5114
|
-
return (callback) => {
|
|
5115
|
-
setTimeout(callback, 1e3 / 60);
|
|
5116
|
-
};
|
|
5117
|
-
}
|
|
5118
|
-
const requestAniFrame$1 = requestAniFrame();
|
|
5119
5143
|
const defaultProps$1i = {
|
|
5120
5144
|
...ComponentDefaults,
|
|
5121
5145
|
target: "",
|
|
@@ -5190,13 +5214,13 @@ Check the top-level render call using <` + t2 + ">.");
|
|
|
5190
5214
|
window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
|
|
5191
5215
|
};
|
|
5192
5216
|
function addEventListener() {
|
|
5193
|
-
var
|
|
5194
|
-
(
|
|
5217
|
+
var _a, _b;
|
|
5218
|
+
(_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", scrollListener, false);
|
|
5195
5219
|
(_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
|
|
5196
5220
|
}
|
|
5197
5221
|
function removeEventListener() {
|
|
5198
|
-
var
|
|
5199
|
-
(
|
|
5222
|
+
var _a, _b;
|
|
5223
|
+
(_a = scrollEl.current) == null ? void 0 : _a.removeEventListener("scroll", scrollListener, false);
|
|
5200
5224
|
(_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
|
|
5201
5225
|
}
|
|
5202
5226
|
const goTop = (e2) => {
|
|
@@ -10446,7 +10470,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10446
10470
|
onDragEnd: ({ offset }) => {
|
|
10447
10471
|
touchState.current.y2 = offset[1];
|
|
10448
10472
|
const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight || 0;
|
|
10449
|
-
const cacheIndex = state.current.anchorIndex + Math.
|
|
10473
|
+
const cacheIndex = state.current.anchorIndex + Math.round(delta);
|
|
10450
10474
|
setCodeIndex(cacheIndex);
|
|
10451
10475
|
scrollTo(cacheIndex);
|
|
10452
10476
|
resetScrollState();
|
|
@@ -10476,7 +10500,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
10476
10500
|
calculateHeight();
|
|
10477
10501
|
}
|
|
10478
10502
|
const target = e2.target;
|
|
10479
|
-
|
|
10503
|
+
let { scrollTop } = target;
|
|
10504
|
+
scrollTop = Math.ceil(scrollTop);
|
|
10480
10505
|
state.current.scrollY = scrollTop;
|
|
10481
10506
|
setScrollY(scrollTop);
|
|
10482
10507
|
for (let i = 0; i < listHeight.length - 1; i++) {
|
|
@@ -11060,8 +11085,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11060
11085
|
onClick && onClick({ title, value, isShow });
|
|
11061
11086
|
};
|
|
11062
11087
|
React.useEffect(() => {
|
|
11063
|
-
var
|
|
11064
|
-
const childNodes = (
|
|
11088
|
+
var _a, _b;
|
|
11089
|
+
const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
|
|
11065
11090
|
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
11066
11091
|
childNodes && setListLevel(childNodes);
|
|
11067
11092
|
}, [setListLevel]);
|
|
@@ -11109,7 +11134,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11109
11134
|
color: ""
|
|
11110
11135
|
};
|
|
11111
11136
|
const Badge = (props) => {
|
|
11112
|
-
var
|
|
11137
|
+
var _a;
|
|
11113
11138
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
11114
11139
|
...defaultProps$1b,
|
|
11115
11140
|
...props
|
|
@@ -11141,7 +11166,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11141
11166
|
`${classPrefix2}-content`,
|
|
11142
11167
|
{ [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
|
|
11143
11168
|
{
|
|
11144
|
-
[`${classPrefix2}-one`]: typeof content() === "string" && ((
|
|
11169
|
+
[`${classPrefix2}-one`]: typeof content() === "string" && ((_a = `${content()}`) == null ? void 0 : _a.length) === 1
|
|
11145
11170
|
}
|
|
11146
11171
|
);
|
|
11147
11172
|
const getStyle = () => {
|
|
@@ -11578,22 +11603,19 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11578
11603
|
};
|
|
11579
11604
|
class Tree {
|
|
11580
11605
|
constructor(nodes, config2) {
|
|
11581
|
-
|
|
11582
|
-
__publicField(this, "config");
|
|
11583
|
-
// eslint-disable-next-line class-methods-use-this
|
|
11584
|
-
__publicField(this, "isLeaf", (node, lazy) => {
|
|
11606
|
+
this.isLeaf = (node, lazy) => {
|
|
11585
11607
|
const { leaf, children } = node;
|
|
11586
11608
|
const hasChildren = Array.isArray(children) && Boolean(children.length);
|
|
11587
11609
|
return leaf || !hasChildren && !lazy;
|
|
11588
|
-
}
|
|
11589
|
-
|
|
11610
|
+
};
|
|
11611
|
+
this.hasChildren = (node, lazy) => {
|
|
11590
11612
|
const isLeaf = this.isLeaf(node, lazy);
|
|
11591
11613
|
if (isLeaf) {
|
|
11592
11614
|
return false;
|
|
11593
11615
|
}
|
|
11594
11616
|
const { children } = node;
|
|
11595
11617
|
return Array.isArray(children) && Boolean(children.length);
|
|
11596
|
-
}
|
|
11618
|
+
};
|
|
11597
11619
|
this.config = {
|
|
11598
11620
|
value: "value",
|
|
11599
11621
|
text: "text",
|
|
@@ -11640,7 +11662,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11640
11662
|
return pathNodes;
|
|
11641
11663
|
}
|
|
11642
11664
|
}
|
|
11643
|
-
const Tree$1 = Tree;
|
|
11644
11665
|
const defaultProps$16 = {
|
|
11645
11666
|
...ComponentDefaults,
|
|
11646
11667
|
activeColor: "",
|
|
@@ -11716,7 +11737,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11716
11737
|
paneKey: ""
|
|
11717
11738
|
}
|
|
11718
11739
|
],
|
|
11719
|
-
tree: new Tree
|
|
11740
|
+
tree: new Tree([], {}),
|
|
11720
11741
|
tabsCursor: 0,
|
|
11721
11742
|
// 选中的tab项
|
|
11722
11743
|
initLoading: false,
|
|
@@ -11746,7 +11767,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11746
11767
|
} else {
|
|
11747
11768
|
state.optionsData = options2;
|
|
11748
11769
|
}
|
|
11749
|
-
state.tree = new Tree
|
|
11770
|
+
state.tree = new Tree(state.optionsData, {
|
|
11750
11771
|
value: state.configs.optionKey.valueKey,
|
|
11751
11772
|
text: state.configs.optionKey.textKey,
|
|
11752
11773
|
children: state.configs.optionKey.childrenKey
|
|
@@ -11788,10 +11809,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11788
11809
|
needToSync = [parent.value];
|
|
11789
11810
|
state.initLoading = true;
|
|
11790
11811
|
const last = await currentValue.slice(1).reduce(async (p, value2) => {
|
|
11791
|
-
var
|
|
11812
|
+
var _a;
|
|
11792
11813
|
const parent2 = await p;
|
|
11793
11814
|
await invokeLazyLoad(parent2);
|
|
11794
|
-
const node = (
|
|
11815
|
+
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
11795
11816
|
(item) => item.value === value2
|
|
11796
11817
|
);
|
|
11797
11818
|
if (node) {
|
|
@@ -11827,8 +11848,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11827
11848
|
let lazyLoadPromise = state.lazyLoadMap.get(node);
|
|
11828
11849
|
if (!lazyLoadPromise) {
|
|
11829
11850
|
lazyLoadPromise = new Promise((resolve) => {
|
|
11830
|
-
var
|
|
11831
|
-
(_b = (
|
|
11851
|
+
var _a, _b;
|
|
11852
|
+
(_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
|
|
11832
11853
|
});
|
|
11833
11854
|
state.lazyLoadMap.set(node, lazyLoadPromise);
|
|
11834
11855
|
}
|
|
@@ -11898,9 +11919,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11898
11919
|
setOptionsData(state.panes);
|
|
11899
11920
|
};
|
|
11900
11921
|
const renderItem = (pane, node, index) => {
|
|
11901
|
-
var
|
|
11922
|
+
var _a;
|
|
11902
11923
|
const classPrefix22 = "nut-cascader-item";
|
|
11903
|
-
const checked = ((
|
|
11924
|
+
const checked = ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value;
|
|
11904
11925
|
const classes = classNames(
|
|
11905
11926
|
{
|
|
11906
11927
|
active: checked,
|
|
@@ -11946,7 +11967,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11946
11967
|
value: tabvalue,
|
|
11947
11968
|
title: () => {
|
|
11948
11969
|
return optionsData.map((pane, index) => {
|
|
11949
|
-
var
|
|
11970
|
+
var _a, _b;
|
|
11950
11971
|
return /* @__PURE__ */ React.createElement(
|
|
11951
11972
|
"div",
|
|
11952
11973
|
{
|
|
@@ -11957,15 +11978,15 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
11957
11978
|
className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
|
|
11958
11979
|
key: pane.paneKey
|
|
11959
11980
|
},
|
|
11960
|
-
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((
|
|
11981
|
+
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-text" }, !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) && "请选择", !(!state.initLoading && state.panes.length) && "Loading..."),
|
|
11961
11982
|
/* @__PURE__ */ React.createElement("span", { className: "nut-tabs-titles-item-line" })
|
|
11962
11983
|
);
|
|
11963
11984
|
});
|
|
11964
11985
|
}
|
|
11965
11986
|
},
|
|
11966
11987
|
!state.initLoading && state.panes.length ? optionsData.map((pane) => {
|
|
11967
|
-
var
|
|
11968
|
-
return /* @__PURE__ */ React.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React.createElement("div", { className: classesPane }, (
|
|
11988
|
+
var _a;
|
|
11989
|
+
return /* @__PURE__ */ React.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React.createElement("div", { className: classesPane }, (_a = pane.nodes) == null ? void 0 : _a.map(
|
|
11969
11990
|
(node, index) => renderItem(pane, node, index)
|
|
11970
11991
|
)));
|
|
11971
11992
|
}) : /* @__PURE__ */ React.createElement(Tabs.TabPane, null, /* @__PURE__ */ React.createElement("div", { className: classesPane }))
|
|
@@ -13159,8 +13180,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
13159
13180
|
onDayClick && onDayClick(param);
|
|
13160
13181
|
};
|
|
13161
13182
|
const scrollToDate = (date2) => {
|
|
13162
|
-
var
|
|
13163
|
-
(
|
|
13183
|
+
var _a;
|
|
13184
|
+
(_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date2);
|
|
13164
13185
|
};
|
|
13165
13186
|
const yearMonthChange = (param) => {
|
|
13166
13187
|
onPageChange && onPageChange(param);
|
|
@@ -14098,14 +14119,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14098
14119
|
moving: moving.current
|
|
14099
14120
|
}));
|
|
14100
14121
|
React.useEffect(() => {
|
|
14101
|
-
var
|
|
14102
|
-
const options22 = false;
|
|
14103
|
-
(
|
|
14122
|
+
var _a, _b, _c;
|
|
14123
|
+
const options22 = passiveSupported ? { passive: false } : false;
|
|
14124
|
+
(_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
|
|
14104
14125
|
(_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
|
|
14105
14126
|
(_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
|
|
14106
14127
|
return () => {
|
|
14107
|
-
var
|
|
14108
|
-
(
|
|
14128
|
+
var _a2, _b2, _c2;
|
|
14129
|
+
(_a2 = PickerPanelRef.current) == null ? void 0 : _a2.removeEventListener("touchstart", touchStart);
|
|
14109
14130
|
(_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
|
|
14110
14131
|
(_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
|
|
14111
14132
|
};
|
|
@@ -14209,8 +14230,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14209
14230
|
defaultValue: [...defaultValue],
|
|
14210
14231
|
finalValue: [...defaultValue],
|
|
14211
14232
|
onChange: (val) => {
|
|
14212
|
-
var
|
|
14213
|
-
(
|
|
14233
|
+
var _a;
|
|
14234
|
+
(_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
|
|
14214
14235
|
}
|
|
14215
14236
|
});
|
|
14216
14237
|
const [innerVisible, setInnerVisible] = usePropsValue({
|
|
@@ -14218,8 +14239,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14218
14239
|
defaultValue: false,
|
|
14219
14240
|
finalValue: false,
|
|
14220
14241
|
onChange: (val) => {
|
|
14221
|
-
var
|
|
14222
|
-
(
|
|
14242
|
+
var _a;
|
|
14243
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props, setSelectedOptions(), innerValue);
|
|
14223
14244
|
}
|
|
14224
14245
|
});
|
|
14225
14246
|
const [innerValue, setInnerValue] = React.useState(selectedValue);
|
|
@@ -14321,14 +14342,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14321
14342
|
return options22;
|
|
14322
14343
|
};
|
|
14323
14344
|
const chooseItem = (columnOptions, columnIndex2) => {
|
|
14324
|
-
var
|
|
14345
|
+
var _a, _b;
|
|
14325
14346
|
const values = [];
|
|
14326
14347
|
const start2 = columnIndex2;
|
|
14327
14348
|
if (columnOptions && Object.keys(columnOptions).length) {
|
|
14328
14349
|
if (values[columnIndex2] !== columnOptions.value) {
|
|
14329
14350
|
if (columnsType() === "cascade") {
|
|
14330
14351
|
values[columnIndex2] = columnOptions.value || "";
|
|
14331
|
-
while ((
|
|
14352
|
+
while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
|
|
14332
14353
|
values[columnIndex2 + 1] = columnOptions.children[0].value;
|
|
14333
14354
|
columnIndex2++;
|
|
14334
14355
|
columnOptions = columnOptions.children[0];
|
|
@@ -14404,9 +14425,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14404
14425
|
visible: innerVisible,
|
|
14405
14426
|
position: "bottom",
|
|
14406
14427
|
onOverlayClick: () => {
|
|
14407
|
-
var
|
|
14428
|
+
var _a;
|
|
14408
14429
|
if (closeOnOverlayClick) {
|
|
14409
|
-
(
|
|
14430
|
+
(_a = props.onCancel) == null ? void 0 : _a.call(props);
|
|
14410
14431
|
setInnerVisible(false);
|
|
14411
14432
|
}
|
|
14412
14433
|
},
|
|
@@ -14597,7 +14618,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14597
14618
|
}
|
|
14598
14619
|
};
|
|
14599
14620
|
const handlePickerChange = (selectedOptions, selectedValue, index) => {
|
|
14600
|
-
var
|
|
14621
|
+
var _a;
|
|
14601
14622
|
const rangeType = type2.toLocaleLowerCase();
|
|
14602
14623
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
14603
14624
|
rangeType
|
|
@@ -14636,7 +14657,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14636
14657
|
} else if (rangeType === "datehour") {
|
|
14637
14658
|
date2 = new Date(year, month, day, Number(formatDate[3]));
|
|
14638
14659
|
}
|
|
14639
|
-
const isEqual2 = ((
|
|
14660
|
+
const isEqual2 = ((_a = new Date(selectedDate)) == null ? void 0 : _a.getTime()) === (date2 == null ? void 0 : date2.getTime());
|
|
14640
14661
|
date2 && isDate(date2) && !isEqual2 && setSelectedDate(formatValue(date2));
|
|
14641
14662
|
}
|
|
14642
14663
|
props.onChange && props.onChange(selectedOptions, selectedValue, index);
|
|
@@ -14653,7 +14674,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14653
14674
|
return { text: padMin + fatter, value: padMin };
|
|
14654
14675
|
};
|
|
14655
14676
|
const generateColumn = (min, max, val, type22, columnIndex) => {
|
|
14656
|
-
var
|
|
14677
|
+
var _a;
|
|
14657
14678
|
let cmin = min;
|
|
14658
14679
|
const arr = [];
|
|
14659
14680
|
let index = 0;
|
|
@@ -14668,7 +14689,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
14668
14689
|
index++;
|
|
14669
14690
|
}
|
|
14670
14691
|
}
|
|
14671
|
-
pickerValue[columnIndex] = (
|
|
14692
|
+
pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
14672
14693
|
setPickerValue([...pickerValue]);
|
|
14673
14694
|
if (props.filter && props.filter(type22, arr)) {
|
|
14674
14695
|
return props.filter(type22, arr);
|
|
@@ -15789,21 +15810,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15789
15810
|
const SECRET = "NUT_FORM_INTERNAL";
|
|
15790
15811
|
class FormStore {
|
|
15791
15812
|
constructor() {
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
// 校验成功或失败的回调,onFinish、onFinishFailed
|
|
15800
|
-
__publicField(this, "callbacks", {});
|
|
15801
|
-
__publicField(this, "errors", {});
|
|
15802
|
-
/**
|
|
15803
|
-
* 注册组件实例
|
|
15804
|
-
* @param field
|
|
15805
|
-
*/
|
|
15806
|
-
__publicField(this, "registerField", (field) => {
|
|
15813
|
+
this.initialValues = {};
|
|
15814
|
+
this.updateList = [];
|
|
15815
|
+
this.store = {};
|
|
15816
|
+
this.fieldEntities = [];
|
|
15817
|
+
this.callbacks = {};
|
|
15818
|
+
this.errors = {};
|
|
15819
|
+
this.registerField = (field) => {
|
|
15807
15820
|
this.fieldEntities.push(field);
|
|
15808
15821
|
return () => {
|
|
15809
15822
|
this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
|
|
@@ -15811,19 +15824,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15811
15824
|
delete this.store[field.props.name];
|
|
15812
15825
|
}
|
|
15813
15826
|
};
|
|
15814
|
-
}
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
var _a2;
|
|
15821
|
-
return (_a2 = this.store) == null ? void 0 : _a2[name];
|
|
15822
|
-
});
|
|
15823
|
-
/**
|
|
15824
|
-
* 获取全部字段
|
|
15825
|
-
*/
|
|
15826
|
-
__publicField(this, "getFieldsValue", (nameList) => {
|
|
15827
|
+
};
|
|
15828
|
+
this.getFieldValue = (name) => {
|
|
15829
|
+
var _a;
|
|
15830
|
+
return (_a = this.store) == null ? void 0 : _a[name];
|
|
15831
|
+
};
|
|
15832
|
+
this.getFieldsValue = (nameList) => {
|
|
15827
15833
|
if (typeof nameList === "boolean") {
|
|
15828
15834
|
return JSON.parse(JSON.stringify(this.store));
|
|
15829
15835
|
}
|
|
@@ -15832,23 +15838,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15832
15838
|
fieldsValue[field] = this.getFieldValue(field);
|
|
15833
15839
|
});
|
|
15834
15840
|
return fieldsValue;
|
|
15835
|
-
}
|
|
15836
|
-
|
|
15837
|
-
* 设置 form 的初始值,之后在 reset 的时候使用
|
|
15838
|
-
* @param values
|
|
15839
|
-
* @param init
|
|
15840
|
-
*/
|
|
15841
|
-
__publicField(this, "setInitialValues", (values, init) => {
|
|
15841
|
+
};
|
|
15842
|
+
this.setInitialValues = (values, init) => {
|
|
15842
15843
|
if (init) {
|
|
15843
15844
|
this.initialValues = values;
|
|
15844
15845
|
this.store = values;
|
|
15845
15846
|
}
|
|
15846
|
-
}
|
|
15847
|
-
|
|
15848
|
-
* 存储组件数据
|
|
15849
|
-
* @param newStore { [name]: newValue }
|
|
15850
|
-
*/
|
|
15851
|
-
__publicField(this, "setFieldsValue", (newStore) => {
|
|
15847
|
+
};
|
|
15848
|
+
this.setFieldsValue = (newStore) => {
|
|
15852
15849
|
this.store = {
|
|
15853
15850
|
...this.store,
|
|
15854
15851
|
...newStore
|
|
@@ -15870,15 +15867,15 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15870
15867
|
item.entity.onStoreChange("update");
|
|
15871
15868
|
}
|
|
15872
15869
|
});
|
|
15873
|
-
}
|
|
15874
|
-
|
|
15870
|
+
};
|
|
15871
|
+
this.setCallback = (callback) => {
|
|
15875
15872
|
this.callbacks = {
|
|
15876
15873
|
...this.callbacks,
|
|
15877
15874
|
...callback
|
|
15878
15875
|
};
|
|
15879
|
-
}
|
|
15880
|
-
|
|
15881
|
-
var
|
|
15876
|
+
};
|
|
15877
|
+
this.validateFields = async (nameList) => {
|
|
15878
|
+
var _a;
|
|
15882
15879
|
let filterEntitys = [];
|
|
15883
15880
|
const errs = [];
|
|
15884
15881
|
this.errors.length = 0;
|
|
@@ -15904,7 +15901,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15904
15901
|
}
|
|
15905
15902
|
const validator = new Schema(descriptor);
|
|
15906
15903
|
try {
|
|
15907
|
-
await validator.validate({ [name]: (
|
|
15904
|
+
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
15908
15905
|
} catch ({ errors }) {
|
|
15909
15906
|
if (errors) {
|
|
15910
15907
|
errs.push(...errors);
|
|
@@ -15918,25 +15915,24 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15918
15915
|
entity.onStoreChange("validate");
|
|
15919
15916
|
}
|
|
15920
15917
|
return errs;
|
|
15921
|
-
}
|
|
15922
|
-
|
|
15923
|
-
var
|
|
15918
|
+
};
|
|
15919
|
+
this.submit = async () => {
|
|
15920
|
+
var _a, _b, _c, _d;
|
|
15924
15921
|
const errors = await this.validateFields();
|
|
15925
15922
|
if (errors.length === 0) {
|
|
15926
|
-
(_b = (
|
|
15923
|
+
(_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
|
|
15927
15924
|
} else if (errors.length > 0) {
|
|
15928
15925
|
(_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
|
|
15929
15926
|
}
|
|
15930
|
-
}
|
|
15931
|
-
|
|
15927
|
+
};
|
|
15928
|
+
this.resetFields = () => {
|
|
15932
15929
|
this.errors.length = 0;
|
|
15933
15930
|
this.store = this.initialValues;
|
|
15934
15931
|
this.fieldEntities.forEach((entity) => {
|
|
15935
15932
|
entity.onStoreChange("reset");
|
|
15936
15933
|
});
|
|
15937
|
-
}
|
|
15938
|
-
|
|
15939
|
-
__publicField(this, "registerUpdate", (field, shouldUpdate) => {
|
|
15934
|
+
};
|
|
15935
|
+
this.registerUpdate = (field, shouldUpdate) => {
|
|
15940
15936
|
this.updateList.push({
|
|
15941
15937
|
entity: field,
|
|
15942
15938
|
condition: shouldUpdate
|
|
@@ -15944,11 +15940,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15944
15940
|
return () => {
|
|
15945
15941
|
this.updateList = this.updateList.filter((i) => i.entity !== field);
|
|
15946
15942
|
};
|
|
15947
|
-
}
|
|
15948
|
-
|
|
15943
|
+
};
|
|
15944
|
+
this.dispatch = ({ name }) => {
|
|
15949
15945
|
this.validateFields([name]);
|
|
15950
|
-
}
|
|
15951
|
-
|
|
15946
|
+
};
|
|
15947
|
+
this.getInternal = (key) => {
|
|
15952
15948
|
if (key === SECRET) {
|
|
15953
15949
|
return {
|
|
15954
15950
|
registerField: this.registerField,
|
|
@@ -15960,8 +15956,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15960
15956
|
registerUpdate: this.registerUpdate
|
|
15961
15957
|
};
|
|
15962
15958
|
}
|
|
15963
|
-
}
|
|
15964
|
-
|
|
15959
|
+
};
|
|
15960
|
+
this.getForm = () => {
|
|
15965
15961
|
return {
|
|
15966
15962
|
getFieldValue: this.getFieldValue,
|
|
15967
15963
|
getFieldsValue: this.getFieldsValue,
|
|
@@ -15972,7 +15968,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
15972
15968
|
errors: this.errors,
|
|
15973
15969
|
getInternal: this.getInternal
|
|
15974
15970
|
};
|
|
15975
|
-
}
|
|
15971
|
+
};
|
|
15976
15972
|
this.callbacks = {
|
|
15977
15973
|
onFinish: () => {
|
|
15978
15974
|
},
|
|
@@ -16092,19 +16088,15 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16092
16088
|
shouldUpdate: false,
|
|
16093
16089
|
noStyle: false
|
|
16094
16090
|
};
|
|
16095
|
-
class
|
|
16091
|
+
const _FormItem = class _FormItem extends React.Component {
|
|
16096
16092
|
constructor(props) {
|
|
16097
16093
|
super(props);
|
|
16098
|
-
|
|
16099
|
-
|
|
16100
|
-
__publicField(this, "eventOff");
|
|
16101
|
-
// children添加value属性和onChange事件
|
|
16102
|
-
__publicField(this, "getControlled", (children) => {
|
|
16103
|
-
var _a2;
|
|
16094
|
+
this.getControlled = (children) => {
|
|
16095
|
+
var _a;
|
|
16104
16096
|
const { setFieldsValue, getFieldValue } = this.context;
|
|
16105
16097
|
const { dispatch } = this.context.getInternal(SECRET);
|
|
16106
16098
|
const { name = "" } = this.props;
|
|
16107
|
-
if ((
|
|
16099
|
+
if ((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.defaultValue) {
|
|
16108
16100
|
console.warn("通过 initialValue 设置初始值");
|
|
16109
16101
|
}
|
|
16110
16102
|
const fieldValue = getFieldValue(name);
|
|
@@ -16126,7 +16118,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16126
16118
|
const { validateTrigger } = this.props;
|
|
16127
16119
|
let validateTriggers = [this.props.trigger || "onChange"];
|
|
16128
16120
|
if (validateTrigger) {
|
|
16129
|
-
validateTriggers = typeof validateTrigger === "string" ? [
|
|
16121
|
+
validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
|
|
16130
16122
|
validateTriggers.forEach((trigger) => {
|
|
16131
16123
|
const originTrigger = controlled[trigger];
|
|
16132
16124
|
controlled[trigger] = (...args) => {
|
|
@@ -16156,21 +16148,21 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16156
16148
|
};
|
|
16157
16149
|
}
|
|
16158
16150
|
return controlled;
|
|
16159
|
-
}
|
|
16160
|
-
|
|
16151
|
+
};
|
|
16152
|
+
this.refresh = () => {
|
|
16161
16153
|
this.setState(({ resetCount }) => ({
|
|
16162
16154
|
resetCount: resetCount + 1
|
|
16163
16155
|
}));
|
|
16164
|
-
}
|
|
16165
|
-
|
|
16156
|
+
};
|
|
16157
|
+
this.onStoreChange = (type2) => {
|
|
16166
16158
|
if (type2 === "reset") {
|
|
16167
16159
|
this.context.errors[this.props.name] = [];
|
|
16168
16160
|
this.refresh();
|
|
16169
16161
|
} else {
|
|
16170
16162
|
this.forceUpdate();
|
|
16171
16163
|
}
|
|
16172
|
-
}
|
|
16173
|
-
|
|
16164
|
+
};
|
|
16165
|
+
this.renderLayout = (childNode) => {
|
|
16174
16166
|
const {
|
|
16175
16167
|
label,
|
|
16176
16168
|
name,
|
|
@@ -16205,7 +16197,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16205
16197
|
item[0].message
|
|
16206
16198
|
))
|
|
16207
16199
|
);
|
|
16208
|
-
}
|
|
16200
|
+
};
|
|
16209
16201
|
this.componentRef = React.createRef();
|
|
16210
16202
|
this.state = {
|
|
16211
16203
|
resetCount: 1
|
|
@@ -16238,9 +16230,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16238
16230
|
}
|
|
16239
16231
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
16240
16232
|
}
|
|
16241
|
-
}
|
|
16242
|
-
|
|
16243
|
-
|
|
16233
|
+
};
|
|
16234
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
16235
|
+
_FormItem.contextType = Context;
|
|
16236
|
+
let FormItem = _FormItem;
|
|
16244
16237
|
const InnerForm = Form;
|
|
16245
16238
|
InnerForm.Item = FormItem;
|
|
16246
16239
|
InnerForm.useForm = useForm;
|
|
@@ -16329,12 +16322,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16329
16322
|
setValue("");
|
|
16330
16323
|
},
|
|
16331
16324
|
focus: () => {
|
|
16332
|
-
var
|
|
16333
|
-
(
|
|
16325
|
+
var _a;
|
|
16326
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
16334
16327
|
},
|
|
16335
16328
|
blur: () => {
|
|
16336
|
-
var
|
|
16337
|
-
(
|
|
16329
|
+
var _a;
|
|
16330
|
+
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
16338
16331
|
},
|
|
16339
16332
|
get nativeElement() {
|
|
16340
16333
|
return inputRef.current;
|
|
@@ -16424,14 +16417,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16424
16417
|
handleInput(e2.currentTarget.value);
|
|
16425
16418
|
},
|
|
16426
16419
|
onCompositionStart: (e2) => {
|
|
16427
|
-
var
|
|
16420
|
+
var _a;
|
|
16428
16421
|
composingRef.current = true;
|
|
16429
|
-
(
|
|
16422
|
+
(_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
|
|
16430
16423
|
},
|
|
16431
16424
|
onCompositionEnd: (e2) => {
|
|
16432
|
-
var
|
|
16425
|
+
var _a;
|
|
16433
16426
|
composingRef.current = false;
|
|
16434
|
-
(
|
|
16427
|
+
(_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
|
|
16435
16428
|
}
|
|
16436
16429
|
}
|
|
16437
16430
|
),
|
|
@@ -16498,14 +16491,15 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
16498
16491
|
const [focused, setFocused] = React.useState(false);
|
|
16499
16492
|
const inputRef = React.useRef(null);
|
|
16500
16493
|
React.useEffect(() => {
|
|
16501
|
-
var
|
|
16494
|
+
var _a, _b;
|
|
16502
16495
|
if (focused) {
|
|
16503
|
-
(_b = (
|
|
16496
|
+
(_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
|
|
16504
16497
|
}
|
|
16505
16498
|
}, [focused]);
|
|
16506
16499
|
const [shadowValue, setShadowValue] = usePropsValue({
|
|
16507
16500
|
value: typeof value === "string" ? parseFloat(value) : value,
|
|
16508
16501
|
defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
|
|
16502
|
+
finalValue: 0,
|
|
16509
16503
|
onChange: (value2) => {
|
|
16510
16504
|
}
|
|
16511
16505
|
});
|
|
@@ -17445,6 +17439,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17445
17439
|
marks: {}
|
|
17446
17440
|
};
|
|
17447
17441
|
const Range = (props) => {
|
|
17442
|
+
const rtl = useRtl();
|
|
17448
17443
|
const {
|
|
17449
17444
|
className,
|
|
17450
17445
|
range: range2,
|
|
@@ -17557,15 +17552,17 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17557
17552
|
transition: dragStatus ? "none" : void 0
|
|
17558
17553
|
};
|
|
17559
17554
|
}
|
|
17555
|
+
const dir = rtl ? "right" : "left";
|
|
17560
17556
|
return {
|
|
17561
17557
|
width: calcMainAxis(),
|
|
17562
|
-
|
|
17558
|
+
[dir]: calcOffset(),
|
|
17563
17559
|
transition: dragStatus ? "none" : void 0
|
|
17564
17560
|
};
|
|
17565
17561
|
};
|
|
17566
17562
|
const marksStyle = (mark) => {
|
|
17563
|
+
const dir = rtl ? "right" : "left";
|
|
17567
17564
|
let style = {
|
|
17568
|
-
|
|
17565
|
+
[dir]: `${(mark - min) / scope() * 100}%`
|
|
17569
17566
|
};
|
|
17570
17567
|
if (vertical) {
|
|
17571
17568
|
style = {
|
|
@@ -17657,6 +17654,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17657
17654
|
let delta = touch.deltaX.current;
|
|
17658
17655
|
let total = rect.width;
|
|
17659
17656
|
let diff = delta / total * scope();
|
|
17657
|
+
diff = rtl ? -diff : diff;
|
|
17660
17658
|
if (vertical) {
|
|
17661
17659
|
delta = touch.deltaY.current;
|
|
17662
17660
|
total = rect.height;
|
|
@@ -17814,8 +17812,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
17814
17812
|
setScore(value2);
|
|
17815
17813
|
};
|
|
17816
17814
|
const getScoreByPosition = (x) => {
|
|
17817
|
-
var
|
|
17818
|
-
if ((
|
|
17815
|
+
var _a;
|
|
17816
|
+
if ((_a = rateRects.current) == null ? void 0 : _a.length) {
|
|
17819
17817
|
for (let index = rateRects.current.length - 1; index >= 0; index--) {
|
|
17820
17818
|
const item = rateRects.current[index];
|
|
17821
17819
|
if (item && x > item.left) {
|
|
@@ -18495,22 +18493,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18495
18493
|
TextArea.displayName = "NutTextArea";
|
|
18496
18494
|
class UploadOptions {
|
|
18497
18495
|
constructor() {
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
__publicField(this, "headers", {});
|
|
18507
|
-
__publicField(this, "withCredentials", false);
|
|
18508
|
-
__publicField(this, "onStart");
|
|
18509
|
-
__publicField(this, "taroFilePath");
|
|
18510
|
-
__publicField(this, "onProgress");
|
|
18511
|
-
__publicField(this, "onSuccess");
|
|
18512
|
-
__publicField(this, "onFailure");
|
|
18513
|
-
__publicField(this, "beforeXhrUpload");
|
|
18496
|
+
this.url = "";
|
|
18497
|
+
this.name = "file";
|
|
18498
|
+
this.fileType = "image";
|
|
18499
|
+
this.method = "post";
|
|
18500
|
+
this.xhrState = 200;
|
|
18501
|
+
this.timeout = 30 * 1e3;
|
|
18502
|
+
this.headers = {};
|
|
18503
|
+
this.withCredentials = false;
|
|
18514
18504
|
}
|
|
18515
18505
|
}
|
|
18516
18506
|
const UPLOADING = "uploading";
|
|
@@ -18518,11 +18508,10 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18518
18508
|
const ERROR = "error";
|
|
18519
18509
|
class Upload {
|
|
18520
18510
|
constructor(options2) {
|
|
18521
|
-
__publicField(this, "options");
|
|
18522
18511
|
this.options = options2;
|
|
18523
18512
|
}
|
|
18524
18513
|
upload() {
|
|
18525
|
-
var
|
|
18514
|
+
var _a;
|
|
18526
18515
|
const { options: options2 } = this;
|
|
18527
18516
|
const xhr = new XMLHttpRequest();
|
|
18528
18517
|
xhr.timeout = options2.timeout;
|
|
@@ -18530,16 +18519,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18530
18519
|
xhr.upload.addEventListener(
|
|
18531
18520
|
"progress",
|
|
18532
18521
|
(e2) => {
|
|
18533
|
-
var
|
|
18534
|
-
(
|
|
18522
|
+
var _a2;
|
|
18523
|
+
(_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
|
|
18535
18524
|
},
|
|
18536
18525
|
false
|
|
18537
18526
|
);
|
|
18538
18527
|
xhr.onreadystatechange = () => {
|
|
18539
|
-
var
|
|
18528
|
+
var _a2, _b;
|
|
18540
18529
|
if (xhr.readyState === 4) {
|
|
18541
18530
|
if (xhr.status === options2.xhrState) {
|
|
18542
|
-
(
|
|
18531
|
+
(_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, xhr.responseText, options2);
|
|
18543
18532
|
} else {
|
|
18544
18533
|
(_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
|
|
18545
18534
|
}
|
|
@@ -18550,7 +18539,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18550
18539
|
for (const [key, value] of Object.entries(options2.headers)) {
|
|
18551
18540
|
xhr.setRequestHeader(key, value);
|
|
18552
18541
|
}
|
|
18553
|
-
(
|
|
18542
|
+
(_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
|
|
18554
18543
|
if (options2.beforeXhrUpload) {
|
|
18555
18544
|
options2.beforeXhrUpload(xhr, options2);
|
|
18556
18545
|
} else {
|
|
@@ -18595,6 +18584,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18595
18584
|
delay: 0
|
|
18596
18585
|
};
|
|
18597
18586
|
const Progress = (props) => {
|
|
18587
|
+
const rtl = useRtl();
|
|
18598
18588
|
const {
|
|
18599
18589
|
className,
|
|
18600
18590
|
style,
|
|
@@ -18688,7 +18678,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18688
18678
|
"div",
|
|
18689
18679
|
{
|
|
18690
18680
|
className: `${classPrefix2}-text`,
|
|
18691
|
-
style: { left: `${displayPercent}%` }
|
|
18681
|
+
style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
|
|
18692
18682
|
},
|
|
18693
18683
|
children || /* @__PURE__ */ React.createElement(
|
|
18694
18684
|
"div",
|
|
@@ -18722,7 +18712,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18722
18712
|
return item.loadingIcon || /* @__PURE__ */ React.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
|
|
18723
18713
|
};
|
|
18724
18714
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
|
|
18725
|
-
var
|
|
18715
|
+
var _a;
|
|
18726
18716
|
return /* @__PURE__ */ React.createElement(
|
|
18727
18717
|
"div",
|
|
18728
18718
|
{
|
|
@@ -18737,7 +18727,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18737
18727
|
onClick: () => onDeleteItem(item, index)
|
|
18738
18728
|
}
|
|
18739
18729
|
),
|
|
18740
|
-
previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((
|
|
18730
|
+
previewType === "picture" && !children && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React.createElement(React.Fragment, null, item.url && /* @__PURE__ */ React.createElement(
|
|
18741
18731
|
"img",
|
|
18742
18732
|
{
|
|
18743
18733
|
className: "nut-uploader-preview-img-c",
|
|
@@ -18791,18 +18781,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18791
18781
|
};
|
|
18792
18782
|
class FileItem {
|
|
18793
18783
|
constructor() {
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
__publicField(this, "type");
|
|
18800
|
-
__publicField(this, "path");
|
|
18801
|
-
__publicField(this, "percentage", 0);
|
|
18802
|
-
__publicField(this, "formData", {});
|
|
18803
|
-
__publicField(this, "responseText");
|
|
18804
|
-
__publicField(this, "loadingIcon");
|
|
18805
|
-
__publicField(this, "failIcon");
|
|
18784
|
+
this.status = "ready";
|
|
18785
|
+
this.message = "准备中..";
|
|
18786
|
+
this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
18787
|
+
this.percentage = 0;
|
|
18788
|
+
this.formData = {};
|
|
18806
18789
|
}
|
|
18807
18790
|
}
|
|
18808
18791
|
const defaultProps$G = {
|
|
@@ -18910,11 +18893,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
18910
18893
|
el.value = "";
|
|
18911
18894
|
};
|
|
18912
18895
|
const executeUpload = (fileItem, index) => {
|
|
18913
|
-
var
|
|
18896
|
+
var _a, _b;
|
|
18914
18897
|
const uploadOption = new UploadOptions();
|
|
18915
18898
|
uploadOption.url = url;
|
|
18916
18899
|
for (const [key, value2] of Object.entries(data)) {
|
|
18917
|
-
(
|
|
18900
|
+
(_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
|
|
18918
18901
|
}
|
|
18919
18902
|
uploadOption.formData = fileItem.formData;
|
|
18920
18903
|
uploadOption.timeout = timeout * 1;
|
|
@@ -19001,7 +18984,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19001
18984
|
};
|
|
19002
18985
|
const readFile = (files) => {
|
|
19003
18986
|
files.forEach((file, index) => {
|
|
19004
|
-
var
|
|
18987
|
+
var _a;
|
|
19005
18988
|
const formData = new FormData();
|
|
19006
18989
|
formData.append(name, file);
|
|
19007
18990
|
const fileItem = new FileItem();
|
|
@@ -19012,7 +18995,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19012
18995
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
19013
18996
|
fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
|
|
19014
18997
|
executeUpload(fileItem, index);
|
|
19015
|
-
if (preview && ((
|
|
18998
|
+
if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
|
|
19016
18999
|
const reader = new FileReader();
|
|
19017
19000
|
reader.onload = (event) => {
|
|
19018
19001
|
fileItem.url = event.target.result;
|
|
@@ -19250,8 +19233,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19250
19233
|
}
|
|
19251
19234
|
async function concurrentUnmount(container) {
|
|
19252
19235
|
return Promise.resolve().then(() => {
|
|
19253
|
-
var
|
|
19254
|
-
(
|
|
19236
|
+
var _a;
|
|
19237
|
+
(_a = container[MARK]) == null ? void 0 : _a.unmount();
|
|
19255
19238
|
delete container[MARK];
|
|
19256
19239
|
});
|
|
19257
19240
|
}
|
|
@@ -19352,7 +19335,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19352
19335
|
update: update2
|
|
19353
19336
|
};
|
|
19354
19337
|
};
|
|
19355
|
-
const confirm$1 = confirm;
|
|
19356
19338
|
const Content = (props) => {
|
|
19357
19339
|
const {
|
|
19358
19340
|
visible,
|
|
@@ -19567,11 +19549,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19567
19549
|
};
|
|
19568
19550
|
const Dialog = React.forwardRef(BaseDialog);
|
|
19569
19551
|
Dialog.confirm = (props) => {
|
|
19570
|
-
return confirm
|
|
19552
|
+
return confirm(props);
|
|
19571
19553
|
};
|
|
19572
19554
|
["alert"].forEach((type2) => {
|
|
19573
19555
|
Dialog[type2] = (props) => {
|
|
19574
|
-
return confirm
|
|
19556
|
+
return confirm({
|
|
19575
19557
|
...props,
|
|
19576
19558
|
isNotice: false,
|
|
19577
19559
|
noticeType: type2
|
|
@@ -19774,16 +19756,16 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
19774
19756
|
const distance = React.useRef(0);
|
|
19775
19757
|
const classes = classNames(classPrefix$d, className);
|
|
19776
19758
|
React.useEffect(() => {
|
|
19777
|
-
var
|
|
19759
|
+
var _a;
|
|
19778
19760
|
if (target && document.getElementById(target)) {
|
|
19779
19761
|
scrollEl.current = document.getElementById(target);
|
|
19780
19762
|
} else {
|
|
19781
19763
|
scrollEl.current = window;
|
|
19782
19764
|
}
|
|
19783
|
-
(
|
|
19765
|
+
(_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
|
|
19784
19766
|
return () => {
|
|
19785
|
-
var
|
|
19786
|
-
(
|
|
19767
|
+
var _a2;
|
|
19768
|
+
(_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", handleScroll, capture);
|
|
19787
19769
|
};
|
|
19788
19770
|
}, [hasMore, isInfiniting, onLoadMore]);
|
|
19789
19771
|
React.useEffect(() => {
|
|
@@ -20335,10 +20317,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20335
20317
|
NoticeBar.defaultProps = defaultProps$z;
|
|
20336
20318
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20337
20319
|
const classPrefix$c = "nut-notify";
|
|
20338
|
-
let Notification$1 =
|
|
20320
|
+
let Notification$1 = class Notification extends React__namespace.PureComponent {
|
|
20339
20321
|
constructor(props) {
|
|
20340
20322
|
super(props);
|
|
20341
|
-
__publicField(this, "closeTimer");
|
|
20342
20323
|
this.close = this.close.bind(this);
|
|
20343
20324
|
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
20344
20325
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
@@ -20411,7 +20392,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20411
20392
|
)
|
|
20412
20393
|
));
|
|
20413
20394
|
}
|
|
20414
|
-
}
|
|
20395
|
+
};
|
|
20415
20396
|
Notification$1.newInstance = (properties, callback) => {
|
|
20416
20397
|
const element = document.createElement("div");
|
|
20417
20398
|
const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
@@ -20577,8 +20558,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20577
20558
|
}
|
|
20578
20559
|
useClickAway(
|
|
20579
20560
|
() => {
|
|
20580
|
-
var
|
|
20581
|
-
(
|
|
20561
|
+
var _a;
|
|
20562
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20582
20563
|
onClose == null ? void 0 : onClose();
|
|
20583
20564
|
},
|
|
20584
20565
|
targetSet,
|
|
@@ -20614,11 +20595,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20614
20595
|
return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
|
|
20615
20596
|
};
|
|
20616
20597
|
const getRootPosition = () => {
|
|
20617
|
-
var
|
|
20598
|
+
var _a, _b;
|
|
20618
20599
|
const styles = {};
|
|
20619
20600
|
if (!rootPosition)
|
|
20620
20601
|
return {};
|
|
20621
|
-
const contentWidth = (
|
|
20602
|
+
const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
|
|
20622
20603
|
const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
|
|
20623
20604
|
const { width, height, left, top, right } = rootPosition;
|
|
20624
20605
|
const direction = location.split("-")[0];
|
|
@@ -20691,12 +20672,12 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20691
20672
|
return styles;
|
|
20692
20673
|
};
|
|
20693
20674
|
const handleSelect = (item, index) => {
|
|
20694
|
-
var
|
|
20675
|
+
var _a;
|
|
20695
20676
|
if (!item.disabled) {
|
|
20696
20677
|
onSelect == null ? void 0 : onSelect(item, index);
|
|
20697
20678
|
}
|
|
20698
20679
|
if (closeOnActionClick) {
|
|
20699
|
-
(
|
|
20680
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20700
20681
|
onClose == null ? void 0 : onClose();
|
|
20701
20682
|
}
|
|
20702
20683
|
};
|
|
@@ -20706,8 +20687,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20706
20687
|
className: "nut-popover-wrapper",
|
|
20707
20688
|
ref: popoverRef,
|
|
20708
20689
|
onClick: () => {
|
|
20709
|
-
var
|
|
20710
|
-
(
|
|
20690
|
+
var _a;
|
|
20691
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20711
20692
|
if (!visible) {
|
|
20712
20693
|
onOpen == null ? void 0 : onOpen();
|
|
20713
20694
|
} else {
|
|
@@ -20757,8 +20738,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20757
20738
|
{
|
|
20758
20739
|
className: "nut-popover-menu-item-action-icon",
|
|
20759
20740
|
onClick: (e2) => {
|
|
20760
|
-
var
|
|
20761
|
-
return (_b = (
|
|
20741
|
+
var _a, _b;
|
|
20742
|
+
return (_b = (_a = item.action) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e2);
|
|
20762
20743
|
}
|
|
20763
20744
|
},
|
|
20764
20745
|
item.action.icon
|
|
@@ -20835,8 +20816,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20835
20816
|
const elementRef = React.useRef(null);
|
|
20836
20817
|
const pullingRef = React.useRef(false);
|
|
20837
20818
|
React.useEffect(() => {
|
|
20838
|
-
var
|
|
20839
|
-
(
|
|
20819
|
+
var _a;
|
|
20820
|
+
(_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
|
|
20840
20821
|
});
|
|
20841
20822
|
}, []);
|
|
20842
20823
|
async function doRefresh() {
|
|
@@ -20919,23 +20900,23 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
20919
20900
|
axis: "y",
|
|
20920
20901
|
target: elementRef,
|
|
20921
20902
|
enabled: !props.disabled,
|
|
20922
|
-
eventOptions: false
|
|
20903
|
+
eventOptions: passiveSupported ? { passive: false } : false
|
|
20923
20904
|
}
|
|
20924
20905
|
);
|
|
20925
20906
|
const renderIcons = (status2) => {
|
|
20926
20907
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("i", { className: `${classPrefix2}-head-content-icons` }, (status2 === "pulling" || status2 === "complete") && /* @__PURE__ */ React.createElement(t$2, null), (status2 === "canRelease" || status2 === "refreshing") && /* @__PURE__ */ React.createElement(t$1, null)));
|
|
20927
20908
|
};
|
|
20928
20909
|
const renderStatusIcon = () => {
|
|
20929
|
-
var
|
|
20910
|
+
var _a;
|
|
20930
20911
|
if (props.renderIcon) {
|
|
20931
|
-
return (
|
|
20912
|
+
return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
|
|
20932
20913
|
}
|
|
20933
20914
|
return renderIcons(status);
|
|
20934
20915
|
};
|
|
20935
20916
|
const renderStatusText = () => {
|
|
20936
|
-
var
|
|
20917
|
+
var _a;
|
|
20937
20918
|
if (props.renderText) {
|
|
20938
|
-
return (
|
|
20919
|
+
return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
|
|
20939
20920
|
}
|
|
20940
20921
|
if (status === "pulling")
|
|
20941
20922
|
return props.pullingText;
|
|
@@ -21005,7 +20986,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21005
20986
|
};
|
|
21006
20987
|
const classPrefix$9 = `nut-avatar`;
|
|
21007
20988
|
const Avatar = (props) => {
|
|
21008
|
-
var
|
|
20989
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
21009
20990
|
const {
|
|
21010
20991
|
children,
|
|
21011
20992
|
size,
|
|
@@ -21032,7 +21013,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21032
21013
|
const parent = React.useContext(AvatarContext);
|
|
21033
21014
|
const sizeValue = ["large", "normal", "small"];
|
|
21034
21015
|
const classes = classNames({
|
|
21035
|
-
[`nut-avatar-${((
|
|
21016
|
+
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
21036
21017
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
21037
21018
|
});
|
|
21038
21019
|
const cls = classNames(classPrefix$9, classes, className);
|
|
@@ -21050,20 +21031,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21050
21031
|
color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
|
|
21051
21032
|
};
|
|
21052
21033
|
React.useEffect(() => {
|
|
21053
|
-
var
|
|
21054
|
-
const avatarChildren = (
|
|
21034
|
+
var _a2;
|
|
21035
|
+
const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
|
|
21055
21036
|
if (avatarChildren) {
|
|
21056
21037
|
avatarLength(avatarChildren);
|
|
21057
21038
|
}
|
|
21058
21039
|
}, []);
|
|
21059
21040
|
const avatarLength = (children2) => {
|
|
21060
|
-
var
|
|
21041
|
+
var _a2, _b2, _c2;
|
|
21061
21042
|
for (let i = 0; i < children2.length; i++) {
|
|
21062
21043
|
if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
|
|
21063
21044
|
children2[i].setAttribute("data-index", i + 1);
|
|
21064
21045
|
}
|
|
21065
21046
|
}
|
|
21066
|
-
const index = Number((_b2 = (
|
|
21047
|
+
const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
|
|
21067
21048
|
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
|
|
21068
21049
|
setMaxSum(children2.length);
|
|
21069
21050
|
setAvatarIndex(index);
|
|
@@ -21202,20 +21183,20 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21202
21183
|
const leftWidth = actionWidth.left;
|
|
21203
21184
|
const rightWidth = actionWidth.right;
|
|
21204
21185
|
const onTouchStart = (event) => {
|
|
21205
|
-
var
|
|
21186
|
+
var _a;
|
|
21206
21187
|
if (!props.disabled) {
|
|
21207
21188
|
startOffset.current = state.offset;
|
|
21208
21189
|
touch.start(event);
|
|
21209
|
-
(
|
|
21190
|
+
(_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
|
|
21210
21191
|
}
|
|
21211
21192
|
};
|
|
21212
21193
|
const onTouchMove = (event) => {
|
|
21213
|
-
var
|
|
21194
|
+
var _a;
|
|
21214
21195
|
if (props.disabled) {
|
|
21215
21196
|
return;
|
|
21216
21197
|
}
|
|
21217
21198
|
touch.move(event);
|
|
21218
|
-
(
|
|
21199
|
+
(_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
|
|
21219
21200
|
if (touch.isHorizontal()) {
|
|
21220
21201
|
lockClick.current = true;
|
|
21221
21202
|
const newState = { ...state, dragging: true };
|
|
@@ -21232,14 +21213,14 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21232
21213
|
}
|
|
21233
21214
|
};
|
|
21234
21215
|
const onTouchEnd = (event) => {
|
|
21235
|
-
var
|
|
21216
|
+
var _a;
|
|
21236
21217
|
if (state.dragging) {
|
|
21237
21218
|
setState((v) => ({ ...v, dragging: false }));
|
|
21238
21219
|
toggle(state.offset > 0 ? "left" : "right");
|
|
21239
21220
|
setTimeout(() => {
|
|
21240
21221
|
lockClick.current = false;
|
|
21241
21222
|
}, 0);
|
|
21242
|
-
(
|
|
21223
|
+
(_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
|
|
21243
21224
|
}
|
|
21244
21225
|
};
|
|
21245
21226
|
const toggle = (side) => {
|
|
@@ -21254,18 +21235,18 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21254
21235
|
}
|
|
21255
21236
|
};
|
|
21256
21237
|
const open = (side) => {
|
|
21257
|
-
var
|
|
21238
|
+
var _a;
|
|
21258
21239
|
opened.current = true;
|
|
21259
21240
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
21260
21241
|
const name = props.name;
|
|
21261
|
-
(
|
|
21242
|
+
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
21262
21243
|
setState((v) => ({ ...v, offset: Number(offset) || 0 }));
|
|
21263
21244
|
};
|
|
21264
21245
|
const close = (position) => {
|
|
21265
|
-
var
|
|
21246
|
+
var _a;
|
|
21266
21247
|
if (opened.current) {
|
|
21267
21248
|
opened.current = false;
|
|
21268
|
-
(
|
|
21249
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props, {
|
|
21269
21250
|
name: props.name,
|
|
21270
21251
|
position: position || "left"
|
|
21271
21252
|
});
|
|
@@ -21359,7 +21340,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21359
21340
|
class Notification extends React__namespace.PureComponent {
|
|
21360
21341
|
constructor(props) {
|
|
21361
21342
|
super(props);
|
|
21362
|
-
__publicField(this, "closeTimer");
|
|
21363
21343
|
this.close = this.close.bind(this);
|
|
21364
21344
|
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
21365
21345
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
@@ -21473,7 +21453,6 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21473
21453
|
));
|
|
21474
21454
|
}
|
|
21475
21455
|
}
|
|
21476
|
-
__publicField(Notification, "newInstance");
|
|
21477
21456
|
Notification.newInstance = (properties, callback) => {
|
|
21478
21457
|
const element = document.createElement("div");
|
|
21479
21458
|
const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
@@ -21685,7 +21664,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21685
21664
|
CountUp.defaultProps = defaultProps$r;
|
|
21686
21665
|
CountUp.displayName = "NutCountUp";
|
|
21687
21666
|
const defaultProps$q = {};
|
|
21688
|
-
class
|
|
21667
|
+
const _AnimatingNumbers = class _AnimatingNumbers extends React.Component {
|
|
21689
21668
|
constructor(props) {
|
|
21690
21669
|
super(props);
|
|
21691
21670
|
this.state = {};
|
|
@@ -21693,10 +21672,11 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21693
21672
|
render() {
|
|
21694
21673
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-animatingnumbers" });
|
|
21695
21674
|
}
|
|
21696
|
-
}
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21675
|
+
};
|
|
21676
|
+
_AnimatingNumbers.defaultProps = defaultProps$q;
|
|
21677
|
+
_AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
21678
|
+
_AnimatingNumbers.CountUp = CountUp;
|
|
21679
|
+
let AnimatingNumbers = _AnimatingNumbers;
|
|
21700
21680
|
AnimatingNumbers.CountUp = CountUp;
|
|
21701
21681
|
const defaultProps$p = {
|
|
21702
21682
|
...ComponentDefaults,
|
|
@@ -21959,7 +21939,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
21959
21939
|
};
|
|
21960
21940
|
const classPrefix$6 = `nut-circleprogress`;
|
|
21961
21941
|
const CircleProgress = (props) => {
|
|
21962
|
-
var
|
|
21942
|
+
var _a;
|
|
21963
21943
|
const {
|
|
21964
21944
|
children,
|
|
21965
21945
|
percent,
|
|
@@ -22018,7 +21998,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22018
21998
|
});
|
|
22019
21999
|
return stopArr;
|
|
22020
22000
|
};
|
|
22021
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (
|
|
22001
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
|
|
22022
22002
|
return /* @__PURE__ */ React.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
|
|
22023
22003
|
}))), /* @__PURE__ */ React.createElement(
|
|
22024
22004
|
"path",
|
|
@@ -22104,8 +22084,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22104
22084
|
}
|
|
22105
22085
|
};
|
|
22106
22086
|
const getOffsetHeight = () => {
|
|
22107
|
-
var
|
|
22108
|
-
const height = (
|
|
22087
|
+
var _a;
|
|
22088
|
+
const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
|
|
22109
22089
|
return height ? `${height}px` : "";
|
|
22110
22090
|
};
|
|
22111
22091
|
const toggle = () => {
|
|
@@ -22486,7 +22466,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22486
22466
|
};
|
|
22487
22467
|
const classPrefix$5 = `nut-ellipsis`;
|
|
22488
22468
|
const Ellipsis = (props) => {
|
|
22489
|
-
var
|
|
22469
|
+
var _a, _b;
|
|
22490
22470
|
const {
|
|
22491
22471
|
children,
|
|
22492
22472
|
content,
|
|
@@ -22626,7 +22606,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22626
22606
|
const handleClick2 = () => {
|
|
22627
22607
|
onClick && onClick();
|
|
22628
22608
|
};
|
|
22629
|
-
return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, (
|
|
22609
|
+
return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React.createElement(React.Fragment, null, (_a = ellipsis.current) == null ? void 0 : _a.leading, expandText ? /* @__PURE__ */ React.createElement(
|
|
22630
22610
|
"span",
|
|
22631
22611
|
{
|
|
22632
22612
|
className: "nut-ellipsis-text",
|
|
@@ -22914,7 +22894,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22914
22894
|
isEmit = false,
|
|
22915
22895
|
movingStatus = false
|
|
22916
22896
|
}) => {
|
|
22917
|
-
var
|
|
22897
|
+
var _a;
|
|
22918
22898
|
if (swiperItemCount <= 1)
|
|
22919
22899
|
return;
|
|
22920
22900
|
const targetActive = getActive(pace);
|
|
@@ -22931,7 +22911,7 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
22931
22911
|
setChildOffset(childOffset);
|
|
22932
22912
|
}
|
|
22933
22913
|
if (isEmit && active !== targetActive) {
|
|
22934
|
-
(
|
|
22914
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, (targetActive + swiperItemCount) % swiperItemCount);
|
|
22935
22915
|
}
|
|
22936
22916
|
active = targetActive;
|
|
22937
22917
|
setActive(targetActive);
|
|
@@ -23092,13 +23072,13 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23092
23072
|
{ name: "touchend", e: onTouchEnd }
|
|
23093
23073
|
];
|
|
23094
23074
|
events.forEach((item) => {
|
|
23095
|
-
var
|
|
23096
|
-
(
|
|
23075
|
+
var _a;
|
|
23076
|
+
(_a = container.current) == null ? void 0 : _a.addEventListener(item.name, item.e, false);
|
|
23097
23077
|
});
|
|
23098
23078
|
return () => {
|
|
23099
23079
|
events.forEach((item) => {
|
|
23100
|
-
var
|
|
23101
|
-
(
|
|
23080
|
+
var _a;
|
|
23081
|
+
(_a = container.current) == null ? void 0 : _a.removeEventListener(item.name, item.e, false);
|
|
23102
23082
|
});
|
|
23103
23083
|
};
|
|
23104
23084
|
});
|
|
@@ -23214,8 +23194,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23214
23194
|
defaultValue,
|
|
23215
23195
|
finalValue: defaultValue,
|
|
23216
23196
|
onChange: (val) => {
|
|
23217
|
-
var
|
|
23218
|
-
(
|
|
23197
|
+
var _a;
|
|
23198
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, val);
|
|
23219
23199
|
}
|
|
23220
23200
|
});
|
|
23221
23201
|
const [showPop, setShowPop] = React.useState(visible);
|
|
@@ -23326,9 +23306,9 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23326
23306
|
);
|
|
23327
23307
|
};
|
|
23328
23308
|
const slideChangeEnd = (page) => {
|
|
23329
|
-
var
|
|
23309
|
+
var _a;
|
|
23330
23310
|
setActive(page + 1);
|
|
23331
|
-
(
|
|
23311
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
|
|
23332
23312
|
};
|
|
23333
23313
|
const onCloseInner = () => {
|
|
23334
23314
|
setShowPop(false);
|
|
@@ -23627,8 +23607,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
23627
23607
|
return index === +parent.propSteps.value ? "process" : "wait";
|
|
23628
23608
|
};
|
|
23629
23609
|
const handleClickStep = () => {
|
|
23630
|
-
var
|
|
23631
|
-
((
|
|
23610
|
+
var _a, _b;
|
|
23611
|
+
((_a = parent.propSteps) == null ? void 0 : _a.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
|
|
23632
23612
|
};
|
|
23633
23613
|
const classPrefix2 = `nut-step`;
|
|
23634
23614
|
const classes = classNames(
|
|
@@ -24345,8 +24325,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24345
24325
|
setListTotalSize(totalSize);
|
|
24346
24326
|
}, [list, itemHeight, horizontal]);
|
|
24347
24327
|
const getElement = React.useCallback(() => {
|
|
24348
|
-
var
|
|
24349
|
-
return ((
|
|
24328
|
+
var _a;
|
|
24329
|
+
return ((_a = scrollRef.current) == null ? void 0 : _a.parentElement) || document.body;
|
|
24350
24330
|
}, []);
|
|
24351
24331
|
React.useEffect(() => {
|
|
24352
24332
|
if (containerHeight)
|
|
@@ -24523,8 +24503,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24523
24503
|
barrageCWidth.current = barrageBody.current.offsetWidth;
|
|
24524
24504
|
}
|
|
24525
24505
|
setTimeout(() => {
|
|
24526
|
-
var
|
|
24527
|
-
(
|
|
24506
|
+
var _a;
|
|
24507
|
+
(_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
|
|
24528
24508
|
"--move-distance",
|
|
24529
24509
|
`-${barrageCWidth.current}px`
|
|
24530
24510
|
);
|
|
@@ -24773,8 +24753,8 @@ Please add \`${key}Action\` when creating your handler.`);
|
|
|
24773
24753
|
];
|
|
24774
24754
|
}
|
|
24775
24755
|
newActiveTime = newActiveTime.filter((item) => {
|
|
24776
|
-
var
|
|
24777
|
-
return ((
|
|
24756
|
+
var _a;
|
|
24757
|
+
return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
|
|
24778
24758
|
});
|
|
24779
24759
|
setActiveTime(newActiveTime);
|
|
24780
24760
|
onTimeChange && onTimeChange(selectTime, newActiveTime);
|