@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.es.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
-
var __publicField = (obj, key, value) => {
|
|
4
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
return value;
|
|
6
|
-
};
|
|
7
1
|
/*!
|
|
8
|
-
* @nutui/nutui-react v2.3.
|
|
2
|
+
* @nutui/nutui-react v2.3.12 Fri Mar 01 2024 16:09:25 GMT+0800 (China Standard Time)
|
|
9
3
|
* (c) 2023 @jdf2e.
|
|
10
4
|
* Released under the MIT License.
|
|
11
5
|
*/
|
|
12
|
-
var _a;
|
|
13
6
|
import * as React from "react";
|
|
14
7
|
import React__default, { useCallback, createContext, useContext, useState, useRef, useEffect, useLayoutEffect, forwardRef, useMemo as useMemo$1, useImperativeHandle, isValidElement, Component } from "react";
|
|
15
8
|
import * as ReactDOM from "react-dom";
|
|
@@ -28,34 +21,44 @@ var classnames = { exports: {} };
|
|
|
28
21
|
(function() {
|
|
29
22
|
var hasOwn = {}.hasOwnProperty;
|
|
30
23
|
function classNames2() {
|
|
31
|
-
var classes =
|
|
24
|
+
var classes = "";
|
|
32
25
|
for (var i = 0; i < arguments.length; i++) {
|
|
33
26
|
var arg = arguments[i];
|
|
34
|
-
if (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
if (arg) {
|
|
28
|
+
classes = appendClass(classes, parseValue(arg));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return classes;
|
|
32
|
+
}
|
|
33
|
+
function parseValue(arg) {
|
|
34
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
35
|
+
return arg;
|
|
36
|
+
}
|
|
37
|
+
if (typeof arg !== "object") {
|
|
38
|
+
return "";
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(arg)) {
|
|
41
|
+
return classNames2.apply(null, arg);
|
|
42
|
+
}
|
|
43
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
44
|
+
return arg.toString();
|
|
45
|
+
}
|
|
46
|
+
var classes = "";
|
|
47
|
+
for (var key in arg) {
|
|
48
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
49
|
+
classes = appendClass(classes, key);
|
|
56
50
|
}
|
|
57
51
|
}
|
|
58
|
-
return classes
|
|
52
|
+
return classes;
|
|
53
|
+
}
|
|
54
|
+
function appendClass(value, newClass) {
|
|
55
|
+
if (!newClass) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
if (value) {
|
|
59
|
+
return value + " " + newClass;
|
|
60
|
+
}
|
|
61
|
+
return value + newClass;
|
|
59
62
|
}
|
|
60
63
|
if (module.exports) {
|
|
61
64
|
classNames2.default = classNames2;
|
|
@@ -1686,8 +1689,8 @@ lodash_isequal.exports;
|
|
|
1686
1689
|
var reIsNative = RegExp(
|
|
1687
1690
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
1688
1691
|
);
|
|
1689
|
-
var
|
|
1690
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer =
|
|
1692
|
+
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;
|
|
1693
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0, nativeKeys = overArg(Object.keys, Object);
|
|
1691
1694
|
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");
|
|
1692
1695
|
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
|
|
1693
1696
|
var symbolProto2 = Symbol2 ? Symbol2.prototype : void 0, symbolValueOf = symbolProto2 ? symbolProto2.valueOf : void 0;
|
|
@@ -2019,7 +2022,7 @@ lodash_isequal.exports;
|
|
|
2019
2022
|
object4 = object4.buffer;
|
|
2020
2023
|
other = other.buffer;
|
|
2021
2024
|
case arrayBufferTag:
|
|
2022
|
-
if (object4.byteLength != other.byteLength || !equalFunc(new
|
|
2025
|
+
if (object4.byteLength != other.byteLength || !equalFunc(new Uint8Array(object4), new Uint8Array(other))) {
|
|
2023
2026
|
return false;
|
|
2024
2027
|
}
|
|
2025
2028
|
return true;
|
|
@@ -2376,11 +2379,23 @@ const zhCN = {
|
|
|
2376
2379
|
errorCanvasTips: "当前环境不支持Canvas"
|
|
2377
2380
|
}
|
|
2378
2381
|
};
|
|
2382
|
+
const inBrowser = typeof window !== "undefined";
|
|
2383
|
+
function requestAniFrame() {
|
|
2384
|
+
if (typeof window !== "undefined") {
|
|
2385
|
+
const _window = window;
|
|
2386
|
+
return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
|
|
2387
|
+
_window.setTimeout(callback, 1e3 / 60);
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
return (callback) => {
|
|
2391
|
+
setTimeout(callback, 1e3 / 60);
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
const requestAniFrame$1 = requestAniFrame();
|
|
2379
2395
|
const classPrefix$p = "nut-configprovider";
|
|
2380
2396
|
const defaultConfigRef = {
|
|
2381
2397
|
current: {
|
|
2382
|
-
locale: zhCN
|
|
2383
|
-
direction: "ltr"
|
|
2398
|
+
locale: zhCN
|
|
2384
2399
|
}
|
|
2385
2400
|
};
|
|
2386
2401
|
const getDefaultConfig = () => {
|
|
@@ -2397,16 +2412,24 @@ function convertThemeVarsToCSSVars(themeVars) {
|
|
|
2397
2412
|
});
|
|
2398
2413
|
return cssVars;
|
|
2399
2414
|
}
|
|
2415
|
+
const useRtl = () => {
|
|
2416
|
+
const { direction } = useConfig();
|
|
2417
|
+
if (direction) {
|
|
2418
|
+
return direction === "rtl";
|
|
2419
|
+
}
|
|
2420
|
+
return inBrowser && document.dir === "rtl";
|
|
2421
|
+
};
|
|
2400
2422
|
const ConfigProvider = (props) => {
|
|
2401
2423
|
const { style, className, children, direction, ...config2 } = props;
|
|
2402
2424
|
const mergedConfig = useMemo(
|
|
2403
2425
|
() => {
|
|
2404
2426
|
return {
|
|
2405
2427
|
...getDefaultConfig(),
|
|
2406
|
-
...config2
|
|
2428
|
+
...config2,
|
|
2429
|
+
direction
|
|
2407
2430
|
};
|
|
2408
2431
|
},
|
|
2409
|
-
[config2],
|
|
2432
|
+
[config2, direction],
|
|
2410
2433
|
(prev, next) => prev.some((prevTheme, index) => {
|
|
2411
2434
|
const nextTheme = next[index];
|
|
2412
2435
|
return !isequal(prevTheme, nextTheme);
|
|
@@ -2647,72 +2670,111 @@ function _inheritsLoose$1(subClass, superClass) {
|
|
|
2647
2670
|
_setPrototypeOf$1(subClass, superClass);
|
|
2648
2671
|
}
|
|
2649
2672
|
var propTypes = { exports: {} };
|
|
2650
|
-
var
|
|
2651
|
-
var
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
var
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2673
|
+
var reactIs = { exports: {} };
|
|
2674
|
+
var reactIs_production_min = {};
|
|
2675
|
+
/** @license React v16.13.1
|
|
2676
|
+
* react-is.production.min.js
|
|
2677
|
+
*
|
|
2678
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2679
|
+
*
|
|
2680
|
+
* This source code is licensed under the MIT license found in the
|
|
2681
|
+
* LICENSE file in the root directory of this source tree.
|
|
2682
|
+
*/
|
|
2683
|
+
var hasRequiredReactIs_production_min;
|
|
2684
|
+
function requireReactIs_production_min() {
|
|
2685
|
+
if (hasRequiredReactIs_production_min)
|
|
2686
|
+
return reactIs_production_min;
|
|
2687
|
+
hasRequiredReactIs_production_min = 1;
|
|
2688
|
+
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;
|
|
2689
|
+
function z(a2) {
|
|
2690
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
2691
|
+
var u = a2.$$typeof;
|
|
2692
|
+
switch (u) {
|
|
2693
|
+
case c6:
|
|
2694
|
+
switch (a2 = a2.type, a2) {
|
|
2695
|
+
case l2:
|
|
2696
|
+
case m:
|
|
2697
|
+
case e2:
|
|
2698
|
+
case g:
|
|
2699
|
+
case f:
|
|
2700
|
+
case p:
|
|
2701
|
+
return a2;
|
|
2702
|
+
default:
|
|
2703
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2704
|
+
case k:
|
|
2705
|
+
case n:
|
|
2706
|
+
case t2:
|
|
2707
|
+
case r2:
|
|
2708
|
+
case h:
|
|
2709
|
+
return a2;
|
|
2710
|
+
default:
|
|
2711
|
+
return u;
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
case d:
|
|
2715
|
+
return u;
|
|
2676
2716
|
}
|
|
2677
|
-
var err = new Error(
|
|
2678
|
-
"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"
|
|
2679
|
-
);
|
|
2680
|
-
err.name = "Invariant Violation";
|
|
2681
|
-
throw err;
|
|
2682
|
-
}
|
|
2683
|
-
shim.isRequired = shim;
|
|
2684
|
-
function getShim() {
|
|
2685
|
-
return shim;
|
|
2686
2717
|
}
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
exact: getShim,
|
|
2707
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
2708
|
-
resetWarningCache: emptyFunction
|
|
2709
|
-
};
|
|
2710
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2711
|
-
return ReactPropTypes;
|
|
2718
|
+
}
|
|
2719
|
+
function A(a2) {
|
|
2720
|
+
return z(a2) === m;
|
|
2721
|
+
}
|
|
2722
|
+
reactIs_production_min.AsyncMode = l2;
|
|
2723
|
+
reactIs_production_min.ConcurrentMode = m;
|
|
2724
|
+
reactIs_production_min.ContextConsumer = k;
|
|
2725
|
+
reactIs_production_min.ContextProvider = h;
|
|
2726
|
+
reactIs_production_min.Element = c6;
|
|
2727
|
+
reactIs_production_min.ForwardRef = n;
|
|
2728
|
+
reactIs_production_min.Fragment = e2;
|
|
2729
|
+
reactIs_production_min.Lazy = t2;
|
|
2730
|
+
reactIs_production_min.Memo = r2;
|
|
2731
|
+
reactIs_production_min.Portal = d;
|
|
2732
|
+
reactIs_production_min.Profiler = g;
|
|
2733
|
+
reactIs_production_min.StrictMode = f;
|
|
2734
|
+
reactIs_production_min.Suspense = p;
|
|
2735
|
+
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2736
|
+
return A(a2) || z(a2) === l2;
|
|
2712
2737
|
};
|
|
2713
|
-
|
|
2738
|
+
reactIs_production_min.isConcurrentMode = A;
|
|
2739
|
+
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2740
|
+
return z(a2) === k;
|
|
2741
|
+
};
|
|
2742
|
+
reactIs_production_min.isContextProvider = function(a2) {
|
|
2743
|
+
return z(a2) === h;
|
|
2744
|
+
};
|
|
2745
|
+
reactIs_production_min.isElement = function(a2) {
|
|
2746
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2747
|
+
};
|
|
2748
|
+
reactIs_production_min.isForwardRef = function(a2) {
|
|
2749
|
+
return z(a2) === n;
|
|
2750
|
+
};
|
|
2751
|
+
reactIs_production_min.isFragment = function(a2) {
|
|
2752
|
+
return z(a2) === e2;
|
|
2753
|
+
};
|
|
2754
|
+
reactIs_production_min.isLazy = function(a2) {
|
|
2755
|
+
return z(a2) === t2;
|
|
2756
|
+
};
|
|
2757
|
+
reactIs_production_min.isMemo = function(a2) {
|
|
2758
|
+
return z(a2) === r2;
|
|
2759
|
+
};
|
|
2760
|
+
reactIs_production_min.isPortal = function(a2) {
|
|
2761
|
+
return z(a2) === d;
|
|
2762
|
+
};
|
|
2763
|
+
reactIs_production_min.isProfiler = function(a2) {
|
|
2764
|
+
return z(a2) === g;
|
|
2765
|
+
};
|
|
2766
|
+
reactIs_production_min.isStrictMode = function(a2) {
|
|
2767
|
+
return z(a2) === f;
|
|
2768
|
+
};
|
|
2769
|
+
reactIs_production_min.isSuspense = function(a2) {
|
|
2770
|
+
return z(a2) === p;
|
|
2771
|
+
};
|
|
2772
|
+
reactIs_production_min.isValidElementType = function(a2) {
|
|
2773
|
+
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);
|
|
2774
|
+
};
|
|
2775
|
+
reactIs_production_min.typeOf = z;
|
|
2776
|
+
return reactIs_production_min;
|
|
2714
2777
|
}
|
|
2715
|
-
var reactIs = { exports: {} };
|
|
2716
2778
|
var reactIs_development = {};
|
|
2717
2779
|
/** @license React v16.13.1
|
|
2718
2780
|
* react-is.development.js
|
|
@@ -2876,110 +2938,6 @@ function requireReactIs_development() {
|
|
|
2876
2938
|
}
|
|
2877
2939
|
return reactIs_development;
|
|
2878
2940
|
}
|
|
2879
|
-
var reactIs_production_min = {};
|
|
2880
|
-
/** @license React v16.13.1
|
|
2881
|
-
* react-is.production.min.js
|
|
2882
|
-
*
|
|
2883
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2884
|
-
*
|
|
2885
|
-
* This source code is licensed under the MIT license found in the
|
|
2886
|
-
* LICENSE file in the root directory of this source tree.
|
|
2887
|
-
*/
|
|
2888
|
-
var hasRequiredReactIs_production_min;
|
|
2889
|
-
function requireReactIs_production_min() {
|
|
2890
|
-
if (hasRequiredReactIs_production_min)
|
|
2891
|
-
return reactIs_production_min;
|
|
2892
|
-
hasRequiredReactIs_production_min = 1;
|
|
2893
|
-
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;
|
|
2894
|
-
function z(a2) {
|
|
2895
|
-
if ("object" === typeof a2 && null !== a2) {
|
|
2896
|
-
var u = a2.$$typeof;
|
|
2897
|
-
switch (u) {
|
|
2898
|
-
case c6:
|
|
2899
|
-
switch (a2 = a2.type, a2) {
|
|
2900
|
-
case l2:
|
|
2901
|
-
case m:
|
|
2902
|
-
case e2:
|
|
2903
|
-
case g:
|
|
2904
|
-
case f:
|
|
2905
|
-
case p:
|
|
2906
|
-
return a2;
|
|
2907
|
-
default:
|
|
2908
|
-
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
2909
|
-
case k:
|
|
2910
|
-
case n:
|
|
2911
|
-
case t2:
|
|
2912
|
-
case r2:
|
|
2913
|
-
case h:
|
|
2914
|
-
return a2;
|
|
2915
|
-
default:
|
|
2916
|
-
return u;
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
case d:
|
|
2920
|
-
return u;
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
function A(a2) {
|
|
2925
|
-
return z(a2) === m;
|
|
2926
|
-
}
|
|
2927
|
-
reactIs_production_min.AsyncMode = l2;
|
|
2928
|
-
reactIs_production_min.ConcurrentMode = m;
|
|
2929
|
-
reactIs_production_min.ContextConsumer = k;
|
|
2930
|
-
reactIs_production_min.ContextProvider = h;
|
|
2931
|
-
reactIs_production_min.Element = c6;
|
|
2932
|
-
reactIs_production_min.ForwardRef = n;
|
|
2933
|
-
reactIs_production_min.Fragment = e2;
|
|
2934
|
-
reactIs_production_min.Lazy = t2;
|
|
2935
|
-
reactIs_production_min.Memo = r2;
|
|
2936
|
-
reactIs_production_min.Portal = d;
|
|
2937
|
-
reactIs_production_min.Profiler = g;
|
|
2938
|
-
reactIs_production_min.StrictMode = f;
|
|
2939
|
-
reactIs_production_min.Suspense = p;
|
|
2940
|
-
reactIs_production_min.isAsyncMode = function(a2) {
|
|
2941
|
-
return A(a2) || z(a2) === l2;
|
|
2942
|
-
};
|
|
2943
|
-
reactIs_production_min.isConcurrentMode = A;
|
|
2944
|
-
reactIs_production_min.isContextConsumer = function(a2) {
|
|
2945
|
-
return z(a2) === k;
|
|
2946
|
-
};
|
|
2947
|
-
reactIs_production_min.isContextProvider = function(a2) {
|
|
2948
|
-
return z(a2) === h;
|
|
2949
|
-
};
|
|
2950
|
-
reactIs_production_min.isElement = function(a2) {
|
|
2951
|
-
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c6;
|
|
2952
|
-
};
|
|
2953
|
-
reactIs_production_min.isForwardRef = function(a2) {
|
|
2954
|
-
return z(a2) === n;
|
|
2955
|
-
};
|
|
2956
|
-
reactIs_production_min.isFragment = function(a2) {
|
|
2957
|
-
return z(a2) === e2;
|
|
2958
|
-
};
|
|
2959
|
-
reactIs_production_min.isLazy = function(a2) {
|
|
2960
|
-
return z(a2) === t2;
|
|
2961
|
-
};
|
|
2962
|
-
reactIs_production_min.isMemo = function(a2) {
|
|
2963
|
-
return z(a2) === r2;
|
|
2964
|
-
};
|
|
2965
|
-
reactIs_production_min.isPortal = function(a2) {
|
|
2966
|
-
return z(a2) === d;
|
|
2967
|
-
};
|
|
2968
|
-
reactIs_production_min.isProfiler = function(a2) {
|
|
2969
|
-
return z(a2) === g;
|
|
2970
|
-
};
|
|
2971
|
-
reactIs_production_min.isStrictMode = function(a2) {
|
|
2972
|
-
return z(a2) === f;
|
|
2973
|
-
};
|
|
2974
|
-
reactIs_production_min.isSuspense = function(a2) {
|
|
2975
|
-
return z(a2) === p;
|
|
2976
|
-
};
|
|
2977
|
-
reactIs_production_min.isValidElementType = function(a2) {
|
|
2978
|
-
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);
|
|
2979
|
-
};
|
|
2980
|
-
reactIs_production_min.typeOf = z;
|
|
2981
|
-
return reactIs_production_min;
|
|
2982
|
-
}
|
|
2983
2941
|
var hasRequiredReactIs;
|
|
2984
2942
|
function requireReactIs() {
|
|
2985
2943
|
if (hasRequiredReactIs)
|
|
@@ -3068,6 +3026,16 @@ function requireObjectAssign() {
|
|
|
3068
3026
|
};
|
|
3069
3027
|
return objectAssign;
|
|
3070
3028
|
}
|
|
3029
|
+
var ReactPropTypesSecret_1;
|
|
3030
|
+
var hasRequiredReactPropTypesSecret;
|
|
3031
|
+
function requireReactPropTypesSecret() {
|
|
3032
|
+
if (hasRequiredReactPropTypesSecret)
|
|
3033
|
+
return ReactPropTypesSecret_1;
|
|
3034
|
+
hasRequiredReactPropTypesSecret = 1;
|
|
3035
|
+
var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
3036
|
+
ReactPropTypesSecret_1 = ReactPropTypesSecret;
|
|
3037
|
+
return ReactPropTypesSecret_1;
|
|
3038
|
+
}
|
|
3071
3039
|
var has;
|
|
3072
3040
|
var hasRequiredHas;
|
|
3073
3041
|
function requireHas() {
|
|
@@ -3585,6 +3553,61 @@ function requireFactoryWithTypeCheckers() {
|
|
|
3585
3553
|
};
|
|
3586
3554
|
return factoryWithTypeCheckers;
|
|
3587
3555
|
}
|
|
3556
|
+
var factoryWithThrowingShims;
|
|
3557
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
3558
|
+
function requireFactoryWithThrowingShims() {
|
|
3559
|
+
if (hasRequiredFactoryWithThrowingShims)
|
|
3560
|
+
return factoryWithThrowingShims;
|
|
3561
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
3562
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
3563
|
+
function emptyFunction() {
|
|
3564
|
+
}
|
|
3565
|
+
function emptyFunctionWithReset() {
|
|
3566
|
+
}
|
|
3567
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3568
|
+
factoryWithThrowingShims = function() {
|
|
3569
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3570
|
+
if (secret === ReactPropTypesSecret) {
|
|
3571
|
+
return;
|
|
3572
|
+
}
|
|
3573
|
+
var err = new Error(
|
|
3574
|
+
"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"
|
|
3575
|
+
);
|
|
3576
|
+
err.name = "Invariant Violation";
|
|
3577
|
+
throw err;
|
|
3578
|
+
}
|
|
3579
|
+
shim.isRequired = shim;
|
|
3580
|
+
function getShim() {
|
|
3581
|
+
return shim;
|
|
3582
|
+
}
|
|
3583
|
+
var ReactPropTypes = {
|
|
3584
|
+
array: shim,
|
|
3585
|
+
bigint: shim,
|
|
3586
|
+
bool: shim,
|
|
3587
|
+
func: shim,
|
|
3588
|
+
number: shim,
|
|
3589
|
+
object: shim,
|
|
3590
|
+
string: shim,
|
|
3591
|
+
symbol: shim,
|
|
3592
|
+
any: shim,
|
|
3593
|
+
arrayOf: getShim,
|
|
3594
|
+
element: shim,
|
|
3595
|
+
elementType: shim,
|
|
3596
|
+
instanceOf: getShim,
|
|
3597
|
+
node: shim,
|
|
3598
|
+
objectOf: getShim,
|
|
3599
|
+
oneOf: getShim,
|
|
3600
|
+
oneOfType: getShim,
|
|
3601
|
+
shape: getShim,
|
|
3602
|
+
exact: getShim,
|
|
3603
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
3604
|
+
resetWarningCache: emptyFunction
|
|
3605
|
+
};
|
|
3606
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
3607
|
+
return ReactPropTypes;
|
|
3608
|
+
};
|
|
3609
|
+
return factoryWithThrowingShims;
|
|
3610
|
+
}
|
|
3588
3611
|
if (process.env.NODE_ENV !== "production") {
|
|
3589
3612
|
var ReactIs = requireReactIs();
|
|
3590
3613
|
var throwOnDirectAccess = true;
|
|
@@ -4430,6 +4453,19 @@ function getAllScrollableParents(element, scrollableParents = []) {
|
|
|
4430
4453
|
}
|
|
4431
4454
|
return getAllScrollableParents(element.parentElement, scrollableParents);
|
|
4432
4455
|
}
|
|
4456
|
+
let passiveSupported = false;
|
|
4457
|
+
if (canUseDom) {
|
|
4458
|
+
try {
|
|
4459
|
+
const opts = Object.defineProperty({}, "passive", {
|
|
4460
|
+
get() {
|
|
4461
|
+
passiveSupported = true;
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
window.addEventListener("test-passive-supported", null, opts);
|
|
4465
|
+
} catch (e2) {
|
|
4466
|
+
console.log(e2);
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4433
4469
|
let totalLockCount = 0;
|
|
4434
4470
|
const BODY_LOCK_CLASS = "nut-overflow-hidden";
|
|
4435
4471
|
function getScrollableElement(el) {
|
|
@@ -4478,7 +4514,7 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
4478
4514
|
document.addEventListener(
|
|
4479
4515
|
"touchmove",
|
|
4480
4516
|
onTouchMove,
|
|
4481
|
-
false
|
|
4517
|
+
passiveSupported ? { passive: false } : false
|
|
4482
4518
|
);
|
|
4483
4519
|
if (!totalLockCount) {
|
|
4484
4520
|
document.body.classList.add(BODY_LOCK_CLASS);
|
|
@@ -5086,18 +5122,6 @@ const SafeArea = (props) => {
|
|
|
5086
5122
|
}
|
|
5087
5123
|
);
|
|
5088
5124
|
};
|
|
5089
|
-
function requestAniFrame() {
|
|
5090
|
-
if (typeof window !== "undefined") {
|
|
5091
|
-
const _window = window;
|
|
5092
|
-
return _window.requestAnimationFrame || _window.webkitRequestAnimationFrame || function(callback) {
|
|
5093
|
-
_window.setTimeout(callback, 1e3 / 60);
|
|
5094
|
-
};
|
|
5095
|
-
}
|
|
5096
|
-
return (callback) => {
|
|
5097
|
-
setTimeout(callback, 1e3 / 60);
|
|
5098
|
-
};
|
|
5099
|
-
}
|
|
5100
|
-
const requestAniFrame$1 = requestAniFrame();
|
|
5101
5125
|
const defaultProps$1i = {
|
|
5102
5126
|
...ComponentDefaults,
|
|
5103
5127
|
target: "",
|
|
@@ -5172,13 +5196,13 @@ const BackTop = (props) => {
|
|
|
5172
5196
|
window.cancelAnimationFrame = window.webkitCancelAnimationFrame;
|
|
5173
5197
|
};
|
|
5174
5198
|
function addEventListener() {
|
|
5175
|
-
var
|
|
5176
|
-
(
|
|
5199
|
+
var _a, _b;
|
|
5200
|
+
(_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", scrollListener, false);
|
|
5177
5201
|
(_b = scrollEl.current) == null ? void 0 : _b.addEventListener("resize", scrollListener, false);
|
|
5178
5202
|
}
|
|
5179
5203
|
function removeEventListener() {
|
|
5180
|
-
var
|
|
5181
|
-
(
|
|
5204
|
+
var _a, _b;
|
|
5205
|
+
(_a = scrollEl.current) == null ? void 0 : _a.removeEventListener("scroll", scrollListener, false);
|
|
5182
5206
|
(_b = scrollEl.current) == null ? void 0 : _b.removeEventListener("resize", scrollListener, false);
|
|
5183
5207
|
}
|
|
5184
5208
|
const goTop = (e2) => {
|
|
@@ -10428,7 +10452,7 @@ const Elevator = (props) => {
|
|
|
10428
10452
|
onDragEnd: ({ offset }) => {
|
|
10429
10453
|
touchState.current.y2 = offset[1];
|
|
10430
10454
|
const delta = (touchState.current.y2 - touchState.current.y1) / spaceHeight || 0;
|
|
10431
|
-
const cacheIndex = state.current.anchorIndex + Math.
|
|
10455
|
+
const cacheIndex = state.current.anchorIndex + Math.round(delta);
|
|
10432
10456
|
setCodeIndex(cacheIndex);
|
|
10433
10457
|
scrollTo(cacheIndex);
|
|
10434
10458
|
resetScrollState();
|
|
@@ -10458,7 +10482,8 @@ const Elevator = (props) => {
|
|
|
10458
10482
|
calculateHeight();
|
|
10459
10483
|
}
|
|
10460
10484
|
const target = e2.target;
|
|
10461
|
-
|
|
10485
|
+
let { scrollTop } = target;
|
|
10486
|
+
scrollTop = Math.ceil(scrollTop);
|
|
10462
10487
|
state.current.scrollY = scrollTop;
|
|
10463
10488
|
setScrollY(scrollTop);
|
|
10464
10489
|
for (let i = 0; i < listHeight.length - 1; i++) {
|
|
@@ -11042,8 +11067,8 @@ const SubSideNavBar = (props) => {
|
|
|
11042
11067
|
onClick && onClick({ title, value, isShow });
|
|
11043
11068
|
};
|
|
11044
11069
|
useEffect(() => {
|
|
11045
|
-
var
|
|
11046
|
-
const childNodes = (
|
|
11070
|
+
var _a, _b;
|
|
11071
|
+
const childNodes = (_a = listRef.current) == null ? void 0 : _a.children;
|
|
11047
11072
|
(_b = listRef.current) == null ? void 0 : _b.setAttribute("level", "1");
|
|
11048
11073
|
childNodes && setListLevel(childNodes);
|
|
11049
11074
|
}, [setListLevel]);
|
|
@@ -11091,7 +11116,7 @@ const defaultProps$1b = {
|
|
|
11091
11116
|
color: ""
|
|
11092
11117
|
};
|
|
11093
11118
|
const Badge = (props) => {
|
|
11094
|
-
var
|
|
11119
|
+
var _a;
|
|
11095
11120
|
const { className, style, value, max, children, dot, top, right, color } = {
|
|
11096
11121
|
...defaultProps$1b,
|
|
11097
11122
|
...props
|
|
@@ -11123,7 +11148,7 @@ const Badge = (props) => {
|
|
|
11123
11148
|
`${classPrefix2}-content`,
|
|
11124
11149
|
{ [`${classPrefix2}-sup`]: isNumber() || isString() || dot },
|
|
11125
11150
|
{
|
|
11126
|
-
[`${classPrefix2}-one`]: typeof content() === "string" && ((
|
|
11151
|
+
[`${classPrefix2}-one`]: typeof content() === "string" && ((_a = `${content()}`) == null ? void 0 : _a.length) === 1
|
|
11127
11152
|
}
|
|
11128
11153
|
);
|
|
11129
11154
|
const getStyle = () => {
|
|
@@ -11560,22 +11585,19 @@ const convertListToOptions = (list, options2) => {
|
|
|
11560
11585
|
};
|
|
11561
11586
|
class Tree {
|
|
11562
11587
|
constructor(nodes, config2) {
|
|
11563
|
-
|
|
11564
|
-
__publicField(this, "config");
|
|
11565
|
-
// eslint-disable-next-line class-methods-use-this
|
|
11566
|
-
__publicField(this, "isLeaf", (node, lazy) => {
|
|
11588
|
+
this.isLeaf = (node, lazy) => {
|
|
11567
11589
|
const { leaf, children } = node;
|
|
11568
11590
|
const hasChildren = Array.isArray(children) && Boolean(children.length);
|
|
11569
11591
|
return leaf || !hasChildren && !lazy;
|
|
11570
|
-
}
|
|
11571
|
-
|
|
11592
|
+
};
|
|
11593
|
+
this.hasChildren = (node, lazy) => {
|
|
11572
11594
|
const isLeaf = this.isLeaf(node, lazy);
|
|
11573
11595
|
if (isLeaf) {
|
|
11574
11596
|
return false;
|
|
11575
11597
|
}
|
|
11576
11598
|
const { children } = node;
|
|
11577
11599
|
return Array.isArray(children) && Boolean(children.length);
|
|
11578
|
-
}
|
|
11600
|
+
};
|
|
11579
11601
|
this.config = {
|
|
11580
11602
|
value: "value",
|
|
11581
11603
|
text: "text",
|
|
@@ -11622,7 +11644,6 @@ class Tree {
|
|
|
11622
11644
|
return pathNodes;
|
|
11623
11645
|
}
|
|
11624
11646
|
}
|
|
11625
|
-
const Tree$1 = Tree;
|
|
11626
11647
|
const defaultProps$16 = {
|
|
11627
11648
|
...ComponentDefaults,
|
|
11628
11649
|
activeColor: "",
|
|
@@ -11698,7 +11719,7 @@ const InternalCascader = (props, ref) => {
|
|
|
11698
11719
|
paneKey: ""
|
|
11699
11720
|
}
|
|
11700
11721
|
],
|
|
11701
|
-
tree: new Tree
|
|
11722
|
+
tree: new Tree([], {}),
|
|
11702
11723
|
tabsCursor: 0,
|
|
11703
11724
|
// 选中的tab项
|
|
11704
11725
|
initLoading: false,
|
|
@@ -11728,7 +11749,7 @@ const InternalCascader = (props, ref) => {
|
|
|
11728
11749
|
} else {
|
|
11729
11750
|
state.optionsData = options2;
|
|
11730
11751
|
}
|
|
11731
|
-
state.tree = new Tree
|
|
11752
|
+
state.tree = new Tree(state.optionsData, {
|
|
11732
11753
|
value: state.configs.optionKey.valueKey,
|
|
11733
11754
|
text: state.configs.optionKey.textKey,
|
|
11734
11755
|
children: state.configs.optionKey.childrenKey
|
|
@@ -11770,10 +11791,10 @@ const InternalCascader = (props, ref) => {
|
|
|
11770
11791
|
needToSync = [parent.value];
|
|
11771
11792
|
state.initLoading = true;
|
|
11772
11793
|
const last = await currentValue.slice(1).reduce(async (p, value2) => {
|
|
11773
|
-
var
|
|
11794
|
+
var _a;
|
|
11774
11795
|
const parent2 = await p;
|
|
11775
11796
|
await invokeLazyLoad(parent2);
|
|
11776
|
-
const node = (
|
|
11797
|
+
const node = (_a = parent2 == null ? void 0 : parent2.children) == null ? void 0 : _a.find(
|
|
11777
11798
|
(item) => item.value === value2
|
|
11778
11799
|
);
|
|
11779
11800
|
if (node) {
|
|
@@ -11809,8 +11830,8 @@ const InternalCascader = (props, ref) => {
|
|
|
11809
11830
|
let lazyLoadPromise = state.lazyLoadMap.get(node);
|
|
11810
11831
|
if (!lazyLoadPromise) {
|
|
11811
11832
|
lazyLoadPromise = new Promise((resolve) => {
|
|
11812
|
-
var
|
|
11813
|
-
(_b = (
|
|
11833
|
+
var _a, _b;
|
|
11834
|
+
(_b = (_a = state.configs).onLoad) == null ? void 0 : _b.call(_a, node, resolve);
|
|
11814
11835
|
});
|
|
11815
11836
|
state.lazyLoadMap.set(node, lazyLoadPromise);
|
|
11816
11837
|
}
|
|
@@ -11880,9 +11901,9 @@ const InternalCascader = (props, ref) => {
|
|
|
11880
11901
|
setOptionsData(state.panes);
|
|
11881
11902
|
};
|
|
11882
11903
|
const renderItem = (pane, node, index) => {
|
|
11883
|
-
var
|
|
11904
|
+
var _a;
|
|
11884
11905
|
const classPrefix22 = "nut-cascader-item";
|
|
11885
|
-
const checked = ((
|
|
11906
|
+
const checked = ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value;
|
|
11886
11907
|
const classes = classNames(
|
|
11887
11908
|
{
|
|
11888
11909
|
active: checked,
|
|
@@ -11928,7 +11949,7 @@ const InternalCascader = (props, ref) => {
|
|
|
11928
11949
|
value: tabvalue,
|
|
11929
11950
|
title: () => {
|
|
11930
11951
|
return optionsData.map((pane, index) => {
|
|
11931
|
-
var
|
|
11952
|
+
var _a, _b;
|
|
11932
11953
|
return /* @__PURE__ */ React__default.createElement(
|
|
11933
11954
|
"div",
|
|
11934
11955
|
{
|
|
@@ -11939,15 +11960,15 @@ const InternalCascader = (props, ref) => {
|
|
|
11939
11960
|
className: `nut-tabs-titles-item ${tabvalue === pane.paneKey ? "nut-tabs-titles-item-active" : ""}`,
|
|
11940
11961
|
key: pane.paneKey
|
|
11941
11962
|
},
|
|
11942
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-text" }, !state.initLoading && state.panes.length && ((
|
|
11963
|
+
/* @__PURE__ */ React__default.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..."),
|
|
11943
11964
|
/* @__PURE__ */ React__default.createElement("span", { className: "nut-tabs-titles-item-line" })
|
|
11944
11965
|
);
|
|
11945
11966
|
});
|
|
11946
11967
|
}
|
|
11947
11968
|
},
|
|
11948
11969
|
!state.initLoading && state.panes.length ? optionsData.map((pane) => {
|
|
11949
|
-
var
|
|
11950
|
-
return /* @__PURE__ */ React__default.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }, (
|
|
11970
|
+
var _a;
|
|
11971
|
+
return /* @__PURE__ */ React__default.createElement(Tabs.TabPane, { key: pane.paneKey, value: pane.paneKey }, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }, (_a = pane.nodes) == null ? void 0 : _a.map(
|
|
11951
11972
|
(node, index) => renderItem(pane, node, index)
|
|
11952
11973
|
)));
|
|
11953
11974
|
}) : /* @__PURE__ */ React__default.createElement(Tabs.TabPane, null, /* @__PURE__ */ React__default.createElement("div", { className: classesPane }))
|
|
@@ -13141,8 +13162,8 @@ const Calendar = React__default.forwardRef((props, ref) => {
|
|
|
13141
13162
|
onDayClick && onDayClick(param);
|
|
13142
13163
|
};
|
|
13143
13164
|
const scrollToDate = (date4) => {
|
|
13144
|
-
var
|
|
13145
|
-
(
|
|
13165
|
+
var _a;
|
|
13166
|
+
(_a = calendarRef.current) == null ? void 0 : _a.scrollToDate(date4);
|
|
13146
13167
|
};
|
|
13147
13168
|
const yearMonthChange = (param) => {
|
|
13148
13169
|
onPageChange && onPageChange(param);
|
|
@@ -14080,14 +14101,14 @@ const InternalPickerPanel = (props, ref) => {
|
|
|
14080
14101
|
moving: moving.current
|
|
14081
14102
|
}));
|
|
14082
14103
|
useEffect(() => {
|
|
14083
|
-
var
|
|
14084
|
-
const options22 = false;
|
|
14085
|
-
(
|
|
14104
|
+
var _a, _b, _c;
|
|
14105
|
+
const options22 = passiveSupported ? { passive: false } : false;
|
|
14106
|
+
(_a = PickerPanelRef.current) == null ? void 0 : _a.addEventListener("touchstart", touchStart, options22);
|
|
14086
14107
|
(_b = PickerPanelRef.current) == null ? void 0 : _b.addEventListener("touchmove", touchMove, options22);
|
|
14087
14108
|
(_c = PickerPanelRef.current) == null ? void 0 : _c.addEventListener("touchend", touchEnd, options22);
|
|
14088
14109
|
return () => {
|
|
14089
|
-
var
|
|
14090
|
-
(
|
|
14110
|
+
var _a2, _b2, _c2;
|
|
14111
|
+
(_a2 = PickerPanelRef.current) == null ? void 0 : _a2.removeEventListener("touchstart", touchStart);
|
|
14091
14112
|
(_b2 = PickerPanelRef.current) == null ? void 0 : _b2.removeEventListener("touchmove", touchMove);
|
|
14092
14113
|
(_c2 = PickerPanelRef.current) == null ? void 0 : _c2.removeEventListener("touchend", touchEnd);
|
|
14093
14114
|
};
|
|
@@ -14191,8 +14212,8 @@ const InternalPicker = (props, ref) => {
|
|
|
14191
14212
|
defaultValue: [...defaultValue],
|
|
14192
14213
|
finalValue: [...defaultValue],
|
|
14193
14214
|
onChange: (val) => {
|
|
14194
|
-
var
|
|
14195
|
-
(
|
|
14215
|
+
var _a;
|
|
14216
|
+
(_a = props.onConfirm) == null ? void 0 : _a.call(props, setSelectedOptions(), val);
|
|
14196
14217
|
}
|
|
14197
14218
|
});
|
|
14198
14219
|
const [innerVisible, setInnerVisible] = usePropsValue({
|
|
@@ -14200,8 +14221,8 @@ const InternalPicker = (props, ref) => {
|
|
|
14200
14221
|
defaultValue: false,
|
|
14201
14222
|
finalValue: false,
|
|
14202
14223
|
onChange: (val) => {
|
|
14203
|
-
var
|
|
14204
|
-
(
|
|
14224
|
+
var _a;
|
|
14225
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props, setSelectedOptions(), innerValue);
|
|
14205
14226
|
}
|
|
14206
14227
|
});
|
|
14207
14228
|
const [innerValue, setInnerValue] = useState(selectedValue);
|
|
@@ -14303,14 +14324,14 @@ const InternalPicker = (props, ref) => {
|
|
|
14303
14324
|
return options22;
|
|
14304
14325
|
};
|
|
14305
14326
|
const chooseItem = (columnOptions, columnIndex2) => {
|
|
14306
|
-
var
|
|
14327
|
+
var _a, _b;
|
|
14307
14328
|
const values = [];
|
|
14308
14329
|
const start2 = columnIndex2;
|
|
14309
14330
|
if (columnOptions && Object.keys(columnOptions).length) {
|
|
14310
14331
|
if (values[columnIndex2] !== columnOptions.value) {
|
|
14311
14332
|
if (columnsType() === "cascade") {
|
|
14312
14333
|
values[columnIndex2] = columnOptions.value || "";
|
|
14313
|
-
while ((
|
|
14334
|
+
while ((_a = columnOptions == null ? void 0 : columnOptions.children) == null ? void 0 : _a[0]) {
|
|
14314
14335
|
values[columnIndex2 + 1] = columnOptions.children[0].value;
|
|
14315
14336
|
columnIndex2++;
|
|
14316
14337
|
columnOptions = columnOptions.children[0];
|
|
@@ -14386,9 +14407,9 @@ const InternalPicker = (props, ref) => {
|
|
|
14386
14407
|
visible: innerVisible,
|
|
14387
14408
|
position: "bottom",
|
|
14388
14409
|
onOverlayClick: () => {
|
|
14389
|
-
var
|
|
14410
|
+
var _a;
|
|
14390
14411
|
if (closeOnOverlayClick) {
|
|
14391
|
-
(
|
|
14412
|
+
(_a = props.onCancel) == null ? void 0 : _a.call(props);
|
|
14392
14413
|
setInnerVisible(false);
|
|
14393
14414
|
}
|
|
14394
14415
|
},
|
|
@@ -14579,7 +14600,7 @@ const DatePicker = (props) => {
|
|
|
14579
14600
|
}
|
|
14580
14601
|
};
|
|
14581
14602
|
const handlePickerChange = (selectedOptions, selectedValue, index) => {
|
|
14582
|
-
var
|
|
14603
|
+
var _a;
|
|
14583
14604
|
const rangeType = type4.toLocaleLowerCase();
|
|
14584
14605
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
14585
14606
|
rangeType
|
|
@@ -14618,7 +14639,7 @@ const DatePicker = (props) => {
|
|
|
14618
14639
|
} else if (rangeType === "datehour") {
|
|
14619
14640
|
date4 = new Date(year, month, day, Number(formatDate[3]));
|
|
14620
14641
|
}
|
|
14621
|
-
const isEqual2 = ((
|
|
14642
|
+
const isEqual2 = ((_a = new Date(selectedDate)) == null ? void 0 : _a.getTime()) === (date4 == null ? void 0 : date4.getTime());
|
|
14622
14643
|
date4 && isDate(date4) && !isEqual2 && setSelectedDate(formatValue(date4));
|
|
14623
14644
|
}
|
|
14624
14645
|
props.onChange && props.onChange(selectedOptions, selectedValue, index);
|
|
@@ -14635,7 +14656,7 @@ const DatePicker = (props) => {
|
|
|
14635
14656
|
return { text: padMin + fatter, value: padMin };
|
|
14636
14657
|
};
|
|
14637
14658
|
const generateColumn = (min, max, val, type22, columnIndex) => {
|
|
14638
|
-
var
|
|
14659
|
+
var _a;
|
|
14639
14660
|
let cmin = min;
|
|
14640
14661
|
const arr = [];
|
|
14641
14662
|
let index = 0;
|
|
@@ -14650,7 +14671,7 @@ const DatePicker = (props) => {
|
|
|
14650
14671
|
index++;
|
|
14651
14672
|
}
|
|
14652
14673
|
}
|
|
14653
|
-
pickerValue[columnIndex] = (
|
|
14674
|
+
pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
14654
14675
|
setPickerValue([...pickerValue]);
|
|
14655
14676
|
if (props.filter && props.filter(type22, arr)) {
|
|
14656
14677
|
return props.filter(type22, arr);
|
|
@@ -15771,21 +15792,13 @@ Schema.validators = validators;
|
|
|
15771
15792
|
const SECRET = "NUT_FORM_INTERNAL";
|
|
15772
15793
|
class FormStore {
|
|
15773
15794
|
constructor() {
|
|
15774
|
-
|
|
15775
|
-
|
|
15776
|
-
|
|
15777
|
-
|
|
15778
|
-
|
|
15779
|
-
|
|
15780
|
-
|
|
15781
|
-
// 校验成功或失败的回调,onFinish、onFinishFailed
|
|
15782
|
-
__publicField(this, "callbacks", {});
|
|
15783
|
-
__publicField(this, "errors", {});
|
|
15784
|
-
/**
|
|
15785
|
-
* 注册组件实例
|
|
15786
|
-
* @param field
|
|
15787
|
-
*/
|
|
15788
|
-
__publicField(this, "registerField", (field) => {
|
|
15795
|
+
this.initialValues = {};
|
|
15796
|
+
this.updateList = [];
|
|
15797
|
+
this.store = {};
|
|
15798
|
+
this.fieldEntities = [];
|
|
15799
|
+
this.callbacks = {};
|
|
15800
|
+
this.errors = {};
|
|
15801
|
+
this.registerField = (field) => {
|
|
15789
15802
|
this.fieldEntities.push(field);
|
|
15790
15803
|
return () => {
|
|
15791
15804
|
this.fieldEntities = this.fieldEntities.filter((item) => item !== field);
|
|
@@ -15793,19 +15806,12 @@ class FormStore {
|
|
|
15793
15806
|
delete this.store[field.props.name];
|
|
15794
15807
|
}
|
|
15795
15808
|
};
|
|
15796
|
-
}
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
var _a2;
|
|
15803
|
-
return (_a2 = this.store) == null ? void 0 : _a2[name];
|
|
15804
|
-
});
|
|
15805
|
-
/**
|
|
15806
|
-
* 获取全部字段
|
|
15807
|
-
*/
|
|
15808
|
-
__publicField(this, "getFieldsValue", (nameList) => {
|
|
15809
|
+
};
|
|
15810
|
+
this.getFieldValue = (name) => {
|
|
15811
|
+
var _a;
|
|
15812
|
+
return (_a = this.store) == null ? void 0 : _a[name];
|
|
15813
|
+
};
|
|
15814
|
+
this.getFieldsValue = (nameList) => {
|
|
15809
15815
|
if (typeof nameList === "boolean") {
|
|
15810
15816
|
return JSON.parse(JSON.stringify(this.store));
|
|
15811
15817
|
}
|
|
@@ -15814,23 +15820,14 @@ class FormStore {
|
|
|
15814
15820
|
fieldsValue[field] = this.getFieldValue(field);
|
|
15815
15821
|
});
|
|
15816
15822
|
return fieldsValue;
|
|
15817
|
-
}
|
|
15818
|
-
|
|
15819
|
-
* 设置 form 的初始值,之后在 reset 的时候使用
|
|
15820
|
-
* @param values
|
|
15821
|
-
* @param init
|
|
15822
|
-
*/
|
|
15823
|
-
__publicField(this, "setInitialValues", (values, init) => {
|
|
15823
|
+
};
|
|
15824
|
+
this.setInitialValues = (values, init) => {
|
|
15824
15825
|
if (init) {
|
|
15825
15826
|
this.initialValues = values;
|
|
15826
15827
|
this.store = values;
|
|
15827
15828
|
}
|
|
15828
|
-
}
|
|
15829
|
-
|
|
15830
|
-
* 存储组件数据
|
|
15831
|
-
* @param newStore { [name]: newValue }
|
|
15832
|
-
*/
|
|
15833
|
-
__publicField(this, "setFieldsValue", (newStore) => {
|
|
15829
|
+
};
|
|
15830
|
+
this.setFieldsValue = (newStore) => {
|
|
15834
15831
|
this.store = {
|
|
15835
15832
|
...this.store,
|
|
15836
15833
|
...newStore
|
|
@@ -15852,15 +15849,15 @@ class FormStore {
|
|
|
15852
15849
|
item.entity.onStoreChange("update");
|
|
15853
15850
|
}
|
|
15854
15851
|
});
|
|
15855
|
-
}
|
|
15856
|
-
|
|
15852
|
+
};
|
|
15853
|
+
this.setCallback = (callback) => {
|
|
15857
15854
|
this.callbacks = {
|
|
15858
15855
|
...this.callbacks,
|
|
15859
15856
|
...callback
|
|
15860
15857
|
};
|
|
15861
|
-
}
|
|
15862
|
-
|
|
15863
|
-
var
|
|
15858
|
+
};
|
|
15859
|
+
this.validateFields = async (nameList) => {
|
|
15860
|
+
var _a;
|
|
15864
15861
|
let filterEntitys = [];
|
|
15865
15862
|
const errs = [];
|
|
15866
15863
|
this.errors.length = 0;
|
|
@@ -15886,7 +15883,7 @@ class FormStore {
|
|
|
15886
15883
|
}
|
|
15887
15884
|
const validator = new Schema(descriptor);
|
|
15888
15885
|
try {
|
|
15889
|
-
await validator.validate({ [name]: (
|
|
15886
|
+
await validator.validate({ [name]: (_a = this.store) == null ? void 0 : _a[name] });
|
|
15890
15887
|
} catch ({ errors }) {
|
|
15891
15888
|
if (errors) {
|
|
15892
15889
|
errs.push(...errors);
|
|
@@ -15900,25 +15897,24 @@ class FormStore {
|
|
|
15900
15897
|
entity.onStoreChange("validate");
|
|
15901
15898
|
}
|
|
15902
15899
|
return errs;
|
|
15903
|
-
}
|
|
15904
|
-
|
|
15905
|
-
var
|
|
15900
|
+
};
|
|
15901
|
+
this.submit = async () => {
|
|
15902
|
+
var _a, _b, _c, _d;
|
|
15906
15903
|
const errors = await this.validateFields();
|
|
15907
15904
|
if (errors.length === 0) {
|
|
15908
|
-
(_b = (
|
|
15905
|
+
(_b = (_a = this.callbacks).onFinish) == null ? void 0 : _b.call(_a, this.store);
|
|
15909
15906
|
} else if (errors.length > 0) {
|
|
15910
15907
|
(_d = (_c = this.callbacks).onFinishFailed) == null ? void 0 : _d.call(_c, this.store, errors);
|
|
15911
15908
|
}
|
|
15912
|
-
}
|
|
15913
|
-
|
|
15909
|
+
};
|
|
15910
|
+
this.resetFields = () => {
|
|
15914
15911
|
this.errors.length = 0;
|
|
15915
15912
|
this.store = this.initialValues;
|
|
15916
15913
|
this.fieldEntities.forEach((entity) => {
|
|
15917
15914
|
entity.onStoreChange("reset");
|
|
15918
15915
|
});
|
|
15919
|
-
}
|
|
15920
|
-
|
|
15921
|
-
__publicField(this, "registerUpdate", (field, shouldUpdate) => {
|
|
15916
|
+
};
|
|
15917
|
+
this.registerUpdate = (field, shouldUpdate) => {
|
|
15922
15918
|
this.updateList.push({
|
|
15923
15919
|
entity: field,
|
|
15924
15920
|
condition: shouldUpdate
|
|
@@ -15926,11 +15922,11 @@ class FormStore {
|
|
|
15926
15922
|
return () => {
|
|
15927
15923
|
this.updateList = this.updateList.filter((i) => i.entity !== field);
|
|
15928
15924
|
};
|
|
15929
|
-
}
|
|
15930
|
-
|
|
15925
|
+
};
|
|
15926
|
+
this.dispatch = ({ name }) => {
|
|
15931
15927
|
this.validateFields([name]);
|
|
15932
|
-
}
|
|
15933
|
-
|
|
15928
|
+
};
|
|
15929
|
+
this.getInternal = (key) => {
|
|
15934
15930
|
if (key === SECRET) {
|
|
15935
15931
|
return {
|
|
15936
15932
|
registerField: this.registerField,
|
|
@@ -15942,8 +15938,8 @@ class FormStore {
|
|
|
15942
15938
|
registerUpdate: this.registerUpdate
|
|
15943
15939
|
};
|
|
15944
15940
|
}
|
|
15945
|
-
}
|
|
15946
|
-
|
|
15941
|
+
};
|
|
15942
|
+
this.getForm = () => {
|
|
15947
15943
|
return {
|
|
15948
15944
|
getFieldValue: this.getFieldValue,
|
|
15949
15945
|
getFieldsValue: this.getFieldsValue,
|
|
@@ -15954,7 +15950,7 @@ class FormStore {
|
|
|
15954
15950
|
errors: this.errors,
|
|
15955
15951
|
getInternal: this.getInternal
|
|
15956
15952
|
};
|
|
15957
|
-
}
|
|
15953
|
+
};
|
|
15958
15954
|
this.callbacks = {
|
|
15959
15955
|
onFinish: () => {
|
|
15960
15956
|
},
|
|
@@ -16074,19 +16070,15 @@ const defaultProps$W = {
|
|
|
16074
16070
|
shouldUpdate: false,
|
|
16075
16071
|
noStyle: false
|
|
16076
16072
|
};
|
|
16077
|
-
class
|
|
16073
|
+
const _FormItem = class _FormItem extends React__default.Component {
|
|
16078
16074
|
constructor(props) {
|
|
16079
16075
|
super(props);
|
|
16080
|
-
|
|
16081
|
-
|
|
16082
|
-
__publicField(this, "eventOff");
|
|
16083
|
-
// children添加value属性和onChange事件
|
|
16084
|
-
__publicField(this, "getControlled", (children) => {
|
|
16085
|
-
var _a2;
|
|
16076
|
+
this.getControlled = (children) => {
|
|
16077
|
+
var _a;
|
|
16086
16078
|
const { setFieldsValue, getFieldValue } = this.context;
|
|
16087
16079
|
const { dispatch } = this.context.getInternal(SECRET);
|
|
16088
16080
|
const { name = "" } = this.props;
|
|
16089
|
-
if ((
|
|
16081
|
+
if ((_a = children == null ? void 0 : children.props) == null ? void 0 : _a.defaultValue) {
|
|
16090
16082
|
console.warn("通过 initialValue 设置初始值");
|
|
16091
16083
|
}
|
|
16092
16084
|
const fieldValue = getFieldValue(name);
|
|
@@ -16108,7 +16100,7 @@ class FormItem extends React__default.Component {
|
|
|
16108
16100
|
const { validateTrigger } = this.props;
|
|
16109
16101
|
let validateTriggers = [this.props.trigger || "onChange"];
|
|
16110
16102
|
if (validateTrigger) {
|
|
16111
|
-
validateTriggers = typeof validateTrigger === "string" ? [
|
|
16103
|
+
validateTriggers = typeof validateTrigger === "string" ? [validateTrigger] : [...validateTrigger];
|
|
16112
16104
|
validateTriggers.forEach((trigger) => {
|
|
16113
16105
|
const originTrigger = controlled[trigger];
|
|
16114
16106
|
controlled[trigger] = (...args) => {
|
|
@@ -16138,21 +16130,21 @@ class FormItem extends React__default.Component {
|
|
|
16138
16130
|
};
|
|
16139
16131
|
}
|
|
16140
16132
|
return controlled;
|
|
16141
|
-
}
|
|
16142
|
-
|
|
16133
|
+
};
|
|
16134
|
+
this.refresh = () => {
|
|
16143
16135
|
this.setState(({ resetCount }) => ({
|
|
16144
16136
|
resetCount: resetCount + 1
|
|
16145
16137
|
}));
|
|
16146
|
-
}
|
|
16147
|
-
|
|
16138
|
+
};
|
|
16139
|
+
this.onStoreChange = (type4) => {
|
|
16148
16140
|
if (type4 === "reset") {
|
|
16149
16141
|
this.context.errors[this.props.name] = [];
|
|
16150
16142
|
this.refresh();
|
|
16151
16143
|
} else {
|
|
16152
16144
|
this.forceUpdate();
|
|
16153
16145
|
}
|
|
16154
|
-
}
|
|
16155
|
-
|
|
16146
|
+
};
|
|
16147
|
+
this.renderLayout = (childNode) => {
|
|
16156
16148
|
const {
|
|
16157
16149
|
label,
|
|
16158
16150
|
name,
|
|
@@ -16187,7 +16179,7 @@ class FormItem extends React__default.Component {
|
|
|
16187
16179
|
item[0].message
|
|
16188
16180
|
))
|
|
16189
16181
|
);
|
|
16190
|
-
}
|
|
16182
|
+
};
|
|
16191
16183
|
this.componentRef = React__default.createRef();
|
|
16192
16184
|
this.state = {
|
|
16193
16185
|
resetCount: 1
|
|
@@ -16220,9 +16212,10 @@ class FormItem extends React__default.Component {
|
|
|
16220
16212
|
}
|
|
16221
16213
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
16222
16214
|
}
|
|
16223
|
-
}
|
|
16224
|
-
|
|
16225
|
-
|
|
16215
|
+
};
|
|
16216
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
16217
|
+
_FormItem.contextType = Context;
|
|
16218
|
+
let FormItem = _FormItem;
|
|
16226
16219
|
const InnerForm = Form;
|
|
16227
16220
|
InnerForm.Item = FormItem;
|
|
16228
16221
|
InnerForm.useForm = useForm;
|
|
@@ -16311,12 +16304,12 @@ const Input = forwardRef(
|
|
|
16311
16304
|
setValue("");
|
|
16312
16305
|
},
|
|
16313
16306
|
focus: () => {
|
|
16314
|
-
var
|
|
16315
|
-
(
|
|
16307
|
+
var _a;
|
|
16308
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
16316
16309
|
},
|
|
16317
16310
|
blur: () => {
|
|
16318
|
-
var
|
|
16319
|
-
(
|
|
16311
|
+
var _a;
|
|
16312
|
+
(_a = inputRef.current) == null ? void 0 : _a.blur();
|
|
16320
16313
|
},
|
|
16321
16314
|
get nativeElement() {
|
|
16322
16315
|
return inputRef.current;
|
|
@@ -16406,14 +16399,14 @@ const Input = forwardRef(
|
|
|
16406
16399
|
handleInput(e2.currentTarget.value);
|
|
16407
16400
|
},
|
|
16408
16401
|
onCompositionStart: (e2) => {
|
|
16409
|
-
var
|
|
16402
|
+
var _a;
|
|
16410
16403
|
composingRef.current = true;
|
|
16411
|
-
(
|
|
16404
|
+
(_a = props.onCompositionStart) == null ? void 0 : _a.call(props, e2);
|
|
16412
16405
|
},
|
|
16413
16406
|
onCompositionEnd: (e2) => {
|
|
16414
|
-
var
|
|
16407
|
+
var _a;
|
|
16415
16408
|
composingRef.current = false;
|
|
16416
|
-
(
|
|
16409
|
+
(_a = props.onCompositionEnd) == null ? void 0 : _a.call(props, e2);
|
|
16417
16410
|
}
|
|
16418
16411
|
}
|
|
16419
16412
|
),
|
|
@@ -16480,14 +16473,15 @@ const InputNumber = (props) => {
|
|
|
16480
16473
|
const [focused, setFocused] = useState(false);
|
|
16481
16474
|
const inputRef = useRef(null);
|
|
16482
16475
|
useEffect(() => {
|
|
16483
|
-
var
|
|
16476
|
+
var _a, _b;
|
|
16484
16477
|
if (focused) {
|
|
16485
|
-
(_b = (
|
|
16478
|
+
(_b = (_a = inputRef.current) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a);
|
|
16486
16479
|
}
|
|
16487
16480
|
}, [focused]);
|
|
16488
16481
|
const [shadowValue, setShadowValue] = usePropsValue({
|
|
16489
16482
|
value: typeof value === "string" ? parseFloat(value) : value,
|
|
16490
16483
|
defaultValue: typeof defaultValue === "string" ? parseFloat(defaultValue) : defaultValue,
|
|
16484
|
+
finalValue: 0,
|
|
16491
16485
|
onChange: (value2) => {
|
|
16492
16486
|
}
|
|
16493
16487
|
});
|
|
@@ -17427,6 +17421,7 @@ const defaultProps$O = {
|
|
|
17427
17421
|
marks: {}
|
|
17428
17422
|
};
|
|
17429
17423
|
const Range = (props) => {
|
|
17424
|
+
const rtl = useRtl();
|
|
17430
17425
|
const {
|
|
17431
17426
|
className,
|
|
17432
17427
|
range: range3,
|
|
@@ -17539,15 +17534,17 @@ const Range = (props) => {
|
|
|
17539
17534
|
transition: dragStatus ? "none" : void 0
|
|
17540
17535
|
};
|
|
17541
17536
|
}
|
|
17537
|
+
const dir = rtl ? "right" : "left";
|
|
17542
17538
|
return {
|
|
17543
17539
|
width: calcMainAxis(),
|
|
17544
|
-
|
|
17540
|
+
[dir]: calcOffset(),
|
|
17545
17541
|
transition: dragStatus ? "none" : void 0
|
|
17546
17542
|
};
|
|
17547
17543
|
};
|
|
17548
17544
|
const marksStyle = (mark) => {
|
|
17545
|
+
const dir = rtl ? "right" : "left";
|
|
17549
17546
|
let style = {
|
|
17550
|
-
|
|
17547
|
+
[dir]: `${(mark - min) / scope() * 100}%`
|
|
17551
17548
|
};
|
|
17552
17549
|
if (vertical) {
|
|
17553
17550
|
style = {
|
|
@@ -17639,6 +17636,7 @@ const Range = (props) => {
|
|
|
17639
17636
|
let delta = touch.deltaX.current;
|
|
17640
17637
|
let total = rect.width;
|
|
17641
17638
|
let diff = delta / total * scope();
|
|
17639
|
+
diff = rtl ? -diff : diff;
|
|
17642
17640
|
if (vertical) {
|
|
17643
17641
|
delta = touch.deltaY.current;
|
|
17644
17642
|
total = rect.height;
|
|
@@ -17796,8 +17794,8 @@ const Rate = (props) => {
|
|
|
17796
17794
|
setScore(value2);
|
|
17797
17795
|
};
|
|
17798
17796
|
const getScoreByPosition = (x) => {
|
|
17799
|
-
var
|
|
17800
|
-
if ((
|
|
17797
|
+
var _a;
|
|
17798
|
+
if ((_a = rateRects.current) == null ? void 0 : _a.length) {
|
|
17801
17799
|
for (let index = rateRects.current.length - 1; index >= 0; index--) {
|
|
17802
17800
|
const item = rateRects.current[index];
|
|
17803
17801
|
if (item && x > item.left) {
|
|
@@ -18477,22 +18475,14 @@ TextArea.defaultProps = defaultProps$I;
|
|
|
18477
18475
|
TextArea.displayName = "NutTextArea";
|
|
18478
18476
|
class UploadOptions {
|
|
18479
18477
|
constructor() {
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
|
|
18487
|
-
|
|
18488
|
-
__publicField(this, "headers", {});
|
|
18489
|
-
__publicField(this, "withCredentials", false);
|
|
18490
|
-
__publicField(this, "onStart");
|
|
18491
|
-
__publicField(this, "taroFilePath");
|
|
18492
|
-
__publicField(this, "onProgress");
|
|
18493
|
-
__publicField(this, "onSuccess");
|
|
18494
|
-
__publicField(this, "onFailure");
|
|
18495
|
-
__publicField(this, "beforeXhrUpload");
|
|
18478
|
+
this.url = "";
|
|
18479
|
+
this.name = "file";
|
|
18480
|
+
this.fileType = "image";
|
|
18481
|
+
this.method = "post";
|
|
18482
|
+
this.xhrState = 200;
|
|
18483
|
+
this.timeout = 30 * 1e3;
|
|
18484
|
+
this.headers = {};
|
|
18485
|
+
this.withCredentials = false;
|
|
18496
18486
|
}
|
|
18497
18487
|
}
|
|
18498
18488
|
const UPLOADING = "uploading";
|
|
@@ -18500,11 +18490,10 @@ const SUCCESS = "success";
|
|
|
18500
18490
|
const ERROR = "error";
|
|
18501
18491
|
class Upload {
|
|
18502
18492
|
constructor(options2) {
|
|
18503
|
-
__publicField(this, "options");
|
|
18504
18493
|
this.options = options2;
|
|
18505
18494
|
}
|
|
18506
18495
|
upload() {
|
|
18507
|
-
var
|
|
18496
|
+
var _a;
|
|
18508
18497
|
const { options: options2 } = this;
|
|
18509
18498
|
const xhr = new XMLHttpRequest();
|
|
18510
18499
|
xhr.timeout = options2.timeout;
|
|
@@ -18512,16 +18501,16 @@ class Upload {
|
|
|
18512
18501
|
xhr.upload.addEventListener(
|
|
18513
18502
|
"progress",
|
|
18514
18503
|
(e2) => {
|
|
18515
|
-
var
|
|
18516
|
-
(
|
|
18504
|
+
var _a2;
|
|
18505
|
+
(_a2 = options2.onProgress) == null ? void 0 : _a2.call(options2, e2, options2);
|
|
18517
18506
|
},
|
|
18518
18507
|
false
|
|
18519
18508
|
);
|
|
18520
18509
|
xhr.onreadystatechange = () => {
|
|
18521
|
-
var
|
|
18510
|
+
var _a2, _b;
|
|
18522
18511
|
if (xhr.readyState === 4) {
|
|
18523
18512
|
if (xhr.status === options2.xhrState) {
|
|
18524
|
-
(
|
|
18513
|
+
(_a2 = options2.onSuccess) == null ? void 0 : _a2.call(options2, xhr.responseText, options2);
|
|
18525
18514
|
} else {
|
|
18526
18515
|
(_b = options2.onFailure) == null ? void 0 : _b.call(options2, xhr.responseText, options2);
|
|
18527
18516
|
}
|
|
@@ -18532,7 +18521,7 @@ class Upload {
|
|
|
18532
18521
|
for (const [key, value] of Object.entries(options2.headers)) {
|
|
18533
18522
|
xhr.setRequestHeader(key, value);
|
|
18534
18523
|
}
|
|
18535
|
-
(
|
|
18524
|
+
(_a = options2.onStart) == null ? void 0 : _a.call(options2, options2);
|
|
18536
18525
|
if (options2.beforeXhrUpload) {
|
|
18537
18526
|
options2.beforeXhrUpload(xhr, options2);
|
|
18538
18527
|
} else {
|
|
@@ -18577,6 +18566,7 @@ const defaultProps$H = {
|
|
|
18577
18566
|
delay: 0
|
|
18578
18567
|
};
|
|
18579
18568
|
const Progress = (props) => {
|
|
18569
|
+
const rtl = useRtl();
|
|
18580
18570
|
const {
|
|
18581
18571
|
className,
|
|
18582
18572
|
style,
|
|
@@ -18670,7 +18660,7 @@ const Progress = (props) => {
|
|
|
18670
18660
|
"div",
|
|
18671
18661
|
{
|
|
18672
18662
|
className: `${classPrefix2}-text`,
|
|
18673
|
-
style: { left: `${displayPercent}%` }
|
|
18663
|
+
style: rtl ? { right: `${displayPercent}%` } : { left: `${displayPercent}%` }
|
|
18674
18664
|
},
|
|
18675
18665
|
children || /* @__PURE__ */ React__default.createElement(
|
|
18676
18666
|
"div",
|
|
@@ -18704,7 +18694,7 @@ const Preview = ({
|
|
|
18704
18694
|
return item.loadingIcon || /* @__PURE__ */ React__default.createElement(t$2, { className: "nut-icon-loading", color: "#fff" });
|
|
18705
18695
|
};
|
|
18706
18696
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, fileList.length !== 0 && fileList.map((item, index) => {
|
|
18707
|
-
var
|
|
18697
|
+
var _a;
|
|
18708
18698
|
return /* @__PURE__ */ React__default.createElement(
|
|
18709
18699
|
"div",
|
|
18710
18700
|
{
|
|
@@ -18719,7 +18709,7 @@ const Preview = ({
|
|
|
18719
18709
|
onClick: () => onDeleteItem(item, index)
|
|
18720
18710
|
}
|
|
18721
18711
|
),
|
|
18722
|
-
previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((
|
|
18712
|
+
previewType === "picture" && !children && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-img" }, item.status === "ready" ? /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)) : item.status !== "success" && /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress" }, renderIcon(item), /* @__PURE__ */ React__default.createElement("div", { className: "nut-uploader-preview-progress-msg" }, item.message)), ((_a = item.type) == null ? void 0 : _a.includes("image")) ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, item.url && /* @__PURE__ */ React__default.createElement(
|
|
18723
18713
|
"img",
|
|
18724
18714
|
{
|
|
18725
18715
|
className: "nut-uploader-preview-img-c",
|
|
@@ -18773,18 +18763,11 @@ const Preview = ({
|
|
|
18773
18763
|
};
|
|
18774
18764
|
class FileItem {
|
|
18775
18765
|
constructor() {
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
|
|
18780
|
-
|
|
18781
|
-
__publicField(this, "type");
|
|
18782
|
-
__publicField(this, "path");
|
|
18783
|
-
__publicField(this, "percentage", 0);
|
|
18784
|
-
__publicField(this, "formData", {});
|
|
18785
|
-
__publicField(this, "responseText");
|
|
18786
|
-
__publicField(this, "loadingIcon");
|
|
18787
|
-
__publicField(this, "failIcon");
|
|
18766
|
+
this.status = "ready";
|
|
18767
|
+
this.message = "准备中..";
|
|
18768
|
+
this.uid = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
18769
|
+
this.percentage = 0;
|
|
18770
|
+
this.formData = {};
|
|
18788
18771
|
}
|
|
18789
18772
|
}
|
|
18790
18773
|
const defaultProps$G = {
|
|
@@ -18892,11 +18875,11 @@ const InternalUploader = (props, ref) => {
|
|
|
18892
18875
|
el.value = "";
|
|
18893
18876
|
};
|
|
18894
18877
|
const executeUpload = (fileItem, index) => {
|
|
18895
|
-
var
|
|
18878
|
+
var _a, _b;
|
|
18896
18879
|
const uploadOption = new UploadOptions();
|
|
18897
18880
|
uploadOption.url = url2;
|
|
18898
18881
|
for (const [key, value2] of Object.entries(data)) {
|
|
18899
|
-
(
|
|
18882
|
+
(_a = fileItem.formData) == null ? void 0 : _a.append(key, value2);
|
|
18900
18883
|
}
|
|
18901
18884
|
uploadOption.formData = fileItem.formData;
|
|
18902
18885
|
uploadOption.timeout = timeout2 * 1;
|
|
@@ -18983,7 +18966,7 @@ const InternalUploader = (props, ref) => {
|
|
|
18983
18966
|
};
|
|
18984
18967
|
const readFile = (files) => {
|
|
18985
18968
|
files.forEach((file, index) => {
|
|
18986
|
-
var
|
|
18969
|
+
var _a;
|
|
18987
18970
|
const formData = new FormData();
|
|
18988
18971
|
formData.append(name, file);
|
|
18989
18972
|
const fileItem = new FileItem();
|
|
@@ -18994,7 +18977,7 @@ const InternalUploader = (props, ref) => {
|
|
|
18994
18977
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
18995
18978
|
fileItem.message = autoUpload ? locale.uploader.readyUpload : locale.uploader.waitingUpload;
|
|
18996
18979
|
executeUpload(fileItem, index);
|
|
18997
|
-
if (preview && ((
|
|
18980
|
+
if (preview && ((_a = file.type) == null ? void 0 : _a.includes("image"))) {
|
|
18998
18981
|
const reader = new FileReader();
|
|
18999
18982
|
reader.onload = (event) => {
|
|
19000
18983
|
fileItem.url = event.target.result;
|
|
@@ -19232,8 +19215,8 @@ function legacyUnmount(container) {
|
|
|
19232
19215
|
}
|
|
19233
19216
|
async function concurrentUnmount(container) {
|
|
19234
19217
|
return Promise.resolve().then(() => {
|
|
19235
|
-
var
|
|
19236
|
-
(
|
|
19218
|
+
var _a;
|
|
19219
|
+
(_a = container[MARK]) == null ? void 0 : _a.unmount();
|
|
19237
19220
|
delete container[MARK];
|
|
19238
19221
|
});
|
|
19239
19222
|
}
|
|
@@ -19334,7 +19317,6 @@ const confirm = (config2, renderFunc) => {
|
|
|
19334
19317
|
update: update2
|
|
19335
19318
|
};
|
|
19336
19319
|
};
|
|
19337
|
-
const confirm$1 = confirm;
|
|
19338
19320
|
const Content = (props) => {
|
|
19339
19321
|
const {
|
|
19340
19322
|
visible,
|
|
@@ -19549,11 +19531,11 @@ const BaseDialog = (props, ref) => {
|
|
|
19549
19531
|
};
|
|
19550
19532
|
const Dialog = forwardRef(BaseDialog);
|
|
19551
19533
|
Dialog.confirm = (props) => {
|
|
19552
|
-
return confirm
|
|
19534
|
+
return confirm(props);
|
|
19553
19535
|
};
|
|
19554
19536
|
["alert"].forEach((type4) => {
|
|
19555
19537
|
Dialog[type4] = (props) => {
|
|
19556
|
-
return confirm
|
|
19538
|
+
return confirm({
|
|
19557
19539
|
...props,
|
|
19558
19540
|
isNotice: false,
|
|
19559
19541
|
noticeType: type4
|
|
@@ -19756,16 +19738,16 @@ const InfiniteLoading = (props) => {
|
|
|
19756
19738
|
const distance = useRef(0);
|
|
19757
19739
|
const classes = classNames(classPrefix$d, className);
|
|
19758
19740
|
useEffect(() => {
|
|
19759
|
-
var
|
|
19741
|
+
var _a;
|
|
19760
19742
|
if (target && document.getElementById(target)) {
|
|
19761
19743
|
scrollEl.current = document.getElementById(target);
|
|
19762
19744
|
} else {
|
|
19763
19745
|
scrollEl.current = window;
|
|
19764
19746
|
}
|
|
19765
|
-
(
|
|
19747
|
+
(_a = scrollEl.current) == null ? void 0 : _a.addEventListener("scroll", handleScroll, capture);
|
|
19766
19748
|
return () => {
|
|
19767
|
-
var
|
|
19768
|
-
(
|
|
19749
|
+
var _a2;
|
|
19750
|
+
(_a2 = scrollEl.current) == null ? void 0 : _a2.removeEventListener("scroll", handleScroll, capture);
|
|
19769
19751
|
};
|
|
19770
19752
|
}, [hasMore, isInfiniting, onLoadMore]);
|
|
19771
19753
|
useEffect(() => {
|
|
@@ -20317,10 +20299,9 @@ const NoticeBar = (props) => {
|
|
|
20317
20299
|
NoticeBar.defaultProps = defaultProps$z;
|
|
20318
20300
|
NoticeBar.displayName = "NutNoticeBar";
|
|
20319
20301
|
const classPrefix$c = "nut-notify";
|
|
20320
|
-
let Notification$1 =
|
|
20302
|
+
let Notification$1 = class Notification extends React.PureComponent {
|
|
20321
20303
|
constructor(props) {
|
|
20322
20304
|
super(props);
|
|
20323
|
-
__publicField(this, "closeTimer");
|
|
20324
20305
|
this.close = this.close.bind(this);
|
|
20325
20306
|
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
20326
20307
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
@@ -20393,7 +20374,7 @@ let Notification$1 = (_a = class extends React.PureComponent {
|
|
|
20393
20374
|
)
|
|
20394
20375
|
));
|
|
20395
20376
|
}
|
|
20396
|
-
}
|
|
20377
|
+
};
|
|
20397
20378
|
Notification$1.newInstance = (properties, callback) => {
|
|
20398
20379
|
const element = document.createElement("div");
|
|
20399
20380
|
const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
@@ -20559,8 +20540,8 @@ const Popover = (props) => {
|
|
|
20559
20540
|
}
|
|
20560
20541
|
useClickAway(
|
|
20561
20542
|
() => {
|
|
20562
|
-
var
|
|
20563
|
-
(
|
|
20543
|
+
var _a;
|
|
20544
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20564
20545
|
onClose == null ? void 0 : onClose();
|
|
20565
20546
|
},
|
|
20566
20547
|
targetSet,
|
|
@@ -20596,11 +20577,11 @@ const Popover = (props) => {
|
|
|
20596
20577
|
return `${prefixCls2} ${prefixCls2}-${direction} ${prefixCls2}-${location}`;
|
|
20597
20578
|
};
|
|
20598
20579
|
const getRootPosition = () => {
|
|
20599
|
-
var
|
|
20580
|
+
var _a, _b;
|
|
20600
20581
|
const styles = {};
|
|
20601
20582
|
if (!rootPosition)
|
|
20602
20583
|
return {};
|
|
20603
|
-
const contentWidth = (
|
|
20584
|
+
const contentWidth = (_a = popoverContentRef.current) == null ? void 0 : _a.clientWidth;
|
|
20604
20585
|
const contentHeight = (_b = popoverContentRef.current) == null ? void 0 : _b.clientHeight;
|
|
20605
20586
|
const { width, height, left, top, right } = rootPosition;
|
|
20606
20587
|
const direction = location.split("-")[0];
|
|
@@ -20673,12 +20654,12 @@ const Popover = (props) => {
|
|
|
20673
20654
|
return styles;
|
|
20674
20655
|
};
|
|
20675
20656
|
const handleSelect = (item, index) => {
|
|
20676
|
-
var
|
|
20657
|
+
var _a;
|
|
20677
20658
|
if (!item.disabled) {
|
|
20678
20659
|
onSelect == null ? void 0 : onSelect(item, index);
|
|
20679
20660
|
}
|
|
20680
20661
|
if (closeOnActionClick) {
|
|
20681
|
-
(
|
|
20662
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20682
20663
|
onClose == null ? void 0 : onClose();
|
|
20683
20664
|
}
|
|
20684
20665
|
};
|
|
@@ -20688,8 +20669,8 @@ const Popover = (props) => {
|
|
|
20688
20669
|
className: "nut-popover-wrapper",
|
|
20689
20670
|
ref: popoverRef,
|
|
20690
20671
|
onClick: () => {
|
|
20691
|
-
var
|
|
20692
|
-
(
|
|
20672
|
+
var _a;
|
|
20673
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props);
|
|
20693
20674
|
if (!visible) {
|
|
20694
20675
|
onOpen == null ? void 0 : onOpen();
|
|
20695
20676
|
} else {
|
|
@@ -20739,8 +20720,8 @@ const Popover = (props) => {
|
|
|
20739
20720
|
{
|
|
20740
20721
|
className: "nut-popover-menu-item-action-icon",
|
|
20741
20722
|
onClick: (e2) => {
|
|
20742
|
-
var
|
|
20743
|
-
return (_b = (
|
|
20723
|
+
var _a, _b;
|
|
20724
|
+
return (_b = (_a = item.action) == null ? void 0 : _a.onClick) == null ? void 0 : _b.call(_a, e2);
|
|
20744
20725
|
}
|
|
20745
20726
|
},
|
|
20746
20727
|
item.action.icon
|
|
@@ -20817,8 +20798,8 @@ const PullToRefresh = (p) => {
|
|
|
20817
20798
|
const elementRef = useRef(null);
|
|
20818
20799
|
const pullingRef = useRef(false);
|
|
20819
20800
|
useEffect(() => {
|
|
20820
|
-
var
|
|
20821
|
-
(
|
|
20801
|
+
var _a;
|
|
20802
|
+
(_a = elementRef.current) == null ? void 0 : _a.addEventListener("touchmove", () => {
|
|
20822
20803
|
});
|
|
20823
20804
|
}, []);
|
|
20824
20805
|
async function doRefresh() {
|
|
@@ -20901,23 +20882,23 @@ const PullToRefresh = (p) => {
|
|
|
20901
20882
|
axis: "y",
|
|
20902
20883
|
target: elementRef,
|
|
20903
20884
|
enabled: !props.disabled,
|
|
20904
|
-
eventOptions: false
|
|
20885
|
+
eventOptions: passiveSupported ? { passive: false } : false
|
|
20905
20886
|
}
|
|
20906
20887
|
);
|
|
20907
20888
|
const renderIcons = (status2) => {
|
|
20908
20889
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("i", { className: `${classPrefix2}-head-content-icons` }, (status2 === "pulling" || status2 === "complete") && /* @__PURE__ */ React__default.createElement(t$2, null), (status2 === "canRelease" || status2 === "refreshing") && /* @__PURE__ */ React__default.createElement(t$1, null)));
|
|
20909
20890
|
};
|
|
20910
20891
|
const renderStatusIcon = () => {
|
|
20911
|
-
var
|
|
20892
|
+
var _a;
|
|
20912
20893
|
if (props.renderIcon) {
|
|
20913
|
-
return (
|
|
20894
|
+
return (_a = props.renderIcon) == null ? void 0 : _a.call(props, status);
|
|
20914
20895
|
}
|
|
20915
20896
|
return renderIcons(status);
|
|
20916
20897
|
};
|
|
20917
20898
|
const renderStatusText = () => {
|
|
20918
|
-
var
|
|
20899
|
+
var _a;
|
|
20919
20900
|
if (props.renderText) {
|
|
20920
|
-
return (
|
|
20901
|
+
return (_a = props.renderText) == null ? void 0 : _a.call(props, status);
|
|
20921
20902
|
}
|
|
20922
20903
|
if (status === "pulling")
|
|
20923
20904
|
return props.pullingText;
|
|
@@ -20987,7 +20968,7 @@ const defaultProps$v = {
|
|
|
20987
20968
|
};
|
|
20988
20969
|
const classPrefix$9 = `nut-avatar`;
|
|
20989
20970
|
const Avatar = (props) => {
|
|
20990
|
-
var
|
|
20971
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
20991
20972
|
const {
|
|
20992
20973
|
children,
|
|
20993
20974
|
size,
|
|
@@ -21014,7 +20995,7 @@ const Avatar = (props) => {
|
|
|
21014
20995
|
const parent = useContext(AvatarContext);
|
|
21015
20996
|
const sizeValue = ["large", "normal", "small"];
|
|
21016
20997
|
const classes = classNames({
|
|
21017
|
-
[`nut-avatar-${((
|
|
20998
|
+
[`nut-avatar-${((_a = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _a.size) || size || "normal"}`]: true,
|
|
21018
20999
|
[`nut-avatar-${((_b = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _b.shape) || shape}`]: true
|
|
21019
21000
|
});
|
|
21020
21001
|
const cls = classNames(classPrefix$9, classes, className);
|
|
@@ -21032,20 +21013,20 @@ const Avatar = (props) => {
|
|
|
21032
21013
|
color: `${(_g = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _g.maxColor}`
|
|
21033
21014
|
};
|
|
21034
21015
|
useEffect(() => {
|
|
21035
|
-
var
|
|
21036
|
-
const avatarChildren = (
|
|
21016
|
+
var _a2;
|
|
21017
|
+
const avatarChildren = (_a2 = parent == null ? void 0 : parent.avatarGroupRef) == null ? void 0 : _a2.current.children;
|
|
21037
21018
|
if (avatarChildren) {
|
|
21038
21019
|
avatarLength(avatarChildren);
|
|
21039
21020
|
}
|
|
21040
21021
|
}, []);
|
|
21041
21022
|
const avatarLength = (children2) => {
|
|
21042
|
-
var
|
|
21023
|
+
var _a2, _b2, _c2;
|
|
21043
21024
|
for (let i = 0; i < children2.length; i++) {
|
|
21044
21025
|
if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
|
|
21045
21026
|
children2[i].setAttribute("data-index", i + 1);
|
|
21046
21027
|
}
|
|
21047
21028
|
}
|
|
21048
|
-
const index = Number((_b2 = (
|
|
21029
|
+
const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
|
|
21049
21030
|
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.max;
|
|
21050
21031
|
setMaxSum(children2.length);
|
|
21051
21032
|
setAvatarIndex(index);
|
|
@@ -21184,20 +21165,20 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21184
21165
|
const leftWidth = actionWidth.left;
|
|
21185
21166
|
const rightWidth = actionWidth.right;
|
|
21186
21167
|
const onTouchStart = (event) => {
|
|
21187
|
-
var
|
|
21168
|
+
var _a;
|
|
21188
21169
|
if (!props.disabled) {
|
|
21189
21170
|
startOffset.current = state.offset;
|
|
21190
21171
|
touch.start(event);
|
|
21191
|
-
(
|
|
21172
|
+
(_a = props.onTouchStart) == null ? void 0 : _a.call(props, event);
|
|
21192
21173
|
}
|
|
21193
21174
|
};
|
|
21194
21175
|
const onTouchMove = (event) => {
|
|
21195
|
-
var
|
|
21176
|
+
var _a;
|
|
21196
21177
|
if (props.disabled) {
|
|
21197
21178
|
return;
|
|
21198
21179
|
}
|
|
21199
21180
|
touch.move(event);
|
|
21200
|
-
(
|
|
21181
|
+
(_a = props.onTouchMove) == null ? void 0 : _a.call(props, event);
|
|
21201
21182
|
if (touch.isHorizontal()) {
|
|
21202
21183
|
lockClick.current = true;
|
|
21203
21184
|
const newState = { ...state, dragging: true };
|
|
@@ -21214,14 +21195,14 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21214
21195
|
}
|
|
21215
21196
|
};
|
|
21216
21197
|
const onTouchEnd = (event) => {
|
|
21217
|
-
var
|
|
21198
|
+
var _a;
|
|
21218
21199
|
if (state.dragging) {
|
|
21219
21200
|
setState((v) => ({ ...v, dragging: false }));
|
|
21220
21201
|
toggle(state.offset > 0 ? "left" : "right");
|
|
21221
21202
|
setTimeout(() => {
|
|
21222
21203
|
lockClick.current = false;
|
|
21223
21204
|
}, 0);
|
|
21224
|
-
(
|
|
21205
|
+
(_a = props.onTouchEnd) == null ? void 0 : _a.call(props, event);
|
|
21225
21206
|
}
|
|
21226
21207
|
};
|
|
21227
21208
|
const toggle = (side) => {
|
|
@@ -21236,18 +21217,18 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21236
21217
|
}
|
|
21237
21218
|
};
|
|
21238
21219
|
const open = (side) => {
|
|
21239
|
-
var
|
|
21220
|
+
var _a;
|
|
21240
21221
|
opened.current = true;
|
|
21241
21222
|
const offset = side === "left" ? leftWidth : -rightWidth;
|
|
21242
21223
|
const name = props.name;
|
|
21243
|
-
(
|
|
21224
|
+
(_a = props.onOpen) == null ? void 0 : _a.call(props, { name, position: side });
|
|
21244
21225
|
setState((v) => ({ ...v, offset: Number(offset) || 0 }));
|
|
21245
21226
|
};
|
|
21246
21227
|
const close = (position) => {
|
|
21247
|
-
var
|
|
21228
|
+
var _a;
|
|
21248
21229
|
if (opened.current) {
|
|
21249
21230
|
opened.current = false;
|
|
21250
|
-
(
|
|
21231
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props, {
|
|
21251
21232
|
name: props.name,
|
|
21252
21233
|
position: position || "left"
|
|
21253
21234
|
});
|
|
@@ -21338,10 +21319,9 @@ const Swipe = forwardRef((props, instanceRef) => {
|
|
|
21338
21319
|
Swipe.defaultProps = defaultProps$t;
|
|
21339
21320
|
Swipe.displayName = "NutSwipe";
|
|
21340
21321
|
const classPrefix$8 = "nut-toast";
|
|
21341
|
-
class
|
|
21322
|
+
class Notification2 extends React.PureComponent {
|
|
21342
21323
|
constructor(props) {
|
|
21343
21324
|
super(props);
|
|
21344
|
-
__publicField(this, "closeTimer");
|
|
21345
21325
|
this.close = this.close.bind(this);
|
|
21346
21326
|
this.startCloseTimer = this.startCloseTimer.bind(this);
|
|
21347
21327
|
this.clearCloseTimer = this.clearCloseTimer.bind(this);
|
|
@@ -21455,8 +21435,7 @@ class Notification extends React.PureComponent {
|
|
|
21455
21435
|
));
|
|
21456
21436
|
}
|
|
21457
21437
|
}
|
|
21458
|
-
|
|
21459
|
-
Notification.newInstance = (properties, callback) => {
|
|
21438
|
+
Notification2.newInstance = (properties, callback) => {
|
|
21460
21439
|
const element = document.createElement("div");
|
|
21461
21440
|
const id = properties.id ? properties.id : `${(/* @__PURE__ */ new Date()).getTime()}`;
|
|
21462
21441
|
element.id = id;
|
|
@@ -21476,7 +21455,7 @@ Notification.newInstance = (properties, callback) => {
|
|
|
21476
21455
|
}
|
|
21477
21456
|
});
|
|
21478
21457
|
}
|
|
21479
|
-
render(/* @__PURE__ */ React.createElement(
|
|
21458
|
+
render(/* @__PURE__ */ React.createElement(Notification2, { ...properties, ref }), element);
|
|
21480
21459
|
};
|
|
21481
21460
|
let messageInstance = null;
|
|
21482
21461
|
let options = {
|
|
@@ -21502,7 +21481,7 @@ function getInstance(props, callback) {
|
|
|
21502
21481
|
messageInstance.destroy();
|
|
21503
21482
|
messageInstance = null;
|
|
21504
21483
|
}
|
|
21505
|
-
|
|
21484
|
+
Notification2.newInstance(props, (notification) => {
|
|
21506
21485
|
return callback && callback(notification);
|
|
21507
21486
|
});
|
|
21508
21487
|
}
|
|
@@ -21667,7 +21646,7 @@ const CountUp = (props) => {
|
|
|
21667
21646
|
CountUp.defaultProps = defaultProps$r;
|
|
21668
21647
|
CountUp.displayName = "NutCountUp";
|
|
21669
21648
|
const defaultProps$q = {};
|
|
21670
|
-
class
|
|
21649
|
+
const _AnimatingNumbers = class _AnimatingNumbers extends Component {
|
|
21671
21650
|
constructor(props) {
|
|
21672
21651
|
super(props);
|
|
21673
21652
|
this.state = {};
|
|
@@ -21675,10 +21654,11 @@ class AnimatingNumbers extends Component {
|
|
|
21675
21654
|
render() {
|
|
21676
21655
|
return /* @__PURE__ */ React__default.createElement("div", { className: "nut-animatingnumbers" });
|
|
21677
21656
|
}
|
|
21678
|
-
}
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21657
|
+
};
|
|
21658
|
+
_AnimatingNumbers.defaultProps = defaultProps$q;
|
|
21659
|
+
_AnimatingNumbers.displayName = "NutAnimatingNumbers";
|
|
21660
|
+
_AnimatingNumbers.CountUp = CountUp;
|
|
21661
|
+
let AnimatingNumbers = _AnimatingNumbers;
|
|
21682
21662
|
AnimatingNumbers.CountUp = CountUp;
|
|
21683
21663
|
const defaultProps$p = {
|
|
21684
21664
|
...ComponentDefaults,
|
|
@@ -21941,7 +21921,7 @@ const defaultProps$o = {
|
|
|
21941
21921
|
};
|
|
21942
21922
|
const classPrefix$6 = `nut-circleprogress`;
|
|
21943
21923
|
const CircleProgress = (props) => {
|
|
21944
|
-
var
|
|
21924
|
+
var _a;
|
|
21945
21925
|
const {
|
|
21946
21926
|
children,
|
|
21947
21927
|
percent,
|
|
@@ -22000,7 +21980,7 @@ const CircleProgress = (props) => {
|
|
|
22000
21980
|
});
|
|
22001
21981
|
return stopArr;
|
|
22002
21982
|
};
|
|
22003
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (
|
|
21983
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, style: styles, ...restProps }, /* @__PURE__ */ React__default.createElement("svg", { viewBox: "0 0 100 100" }, /* @__PURE__ */ React__default.createElement("defs", null, /* @__PURE__ */ React__default.createElement("linearGradient", { id: refRandomId, x1: "100%", y1: "0%", x2: "0%", y2: "0%" }, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
|
|
22004
21984
|
return /* @__PURE__ */ React__default.createElement("stop", { key: index, offset: item.key, stopColor: item.value });
|
|
22005
21985
|
}))), /* @__PURE__ */ React__default.createElement(
|
|
22006
21986
|
"path",
|
|
@@ -22086,8 +22066,8 @@ const CollapseItem = (props) => {
|
|
|
22086
22066
|
}
|
|
22087
22067
|
};
|
|
22088
22068
|
const getOffsetHeight = () => {
|
|
22089
|
-
var
|
|
22090
|
-
const height = (
|
|
22069
|
+
var _a;
|
|
22070
|
+
const height = (_a = contentRef.current) == null ? void 0 : _a.offsetHeight;
|
|
22091
22071
|
return height ? `${height}px` : "";
|
|
22092
22072
|
};
|
|
22093
22073
|
const toggle = () => {
|
|
@@ -22468,7 +22448,7 @@ const defaultProps$k = {
|
|
|
22468
22448
|
};
|
|
22469
22449
|
const classPrefix$5 = `nut-ellipsis`;
|
|
22470
22450
|
const Ellipsis = (props) => {
|
|
22471
|
-
var
|
|
22451
|
+
var _a, _b;
|
|
22472
22452
|
const {
|
|
22473
22453
|
children,
|
|
22474
22454
|
content,
|
|
@@ -22608,7 +22588,7 @@ const Ellipsis = (props) => {
|
|
|
22608
22588
|
const handleClick2 = () => {
|
|
22609
22589
|
onClick && onClick();
|
|
22610
22590
|
};
|
|
22611
|
-
return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React__default.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (
|
|
22591
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: classes, onClick: handleClick2, ref: root2, ...rest }, /* @__PURE__ */ React__default.createElement("div", null, !exceeded ? content : null, exceeded && !expanded ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (_a = ellipsis.current) == null ? void 0 : _a.leading, expandText ? /* @__PURE__ */ React__default.createElement(
|
|
22612
22592
|
"span",
|
|
22613
22593
|
{
|
|
22614
22594
|
className: "nut-ellipsis-text",
|
|
@@ -22896,7 +22876,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
22896
22876
|
isEmit = false,
|
|
22897
22877
|
movingStatus = false
|
|
22898
22878
|
}) => {
|
|
22899
|
-
var
|
|
22879
|
+
var _a;
|
|
22900
22880
|
if (swiperItemCount <= 1)
|
|
22901
22881
|
return;
|
|
22902
22882
|
const targetActive = getActive(pace);
|
|
@@ -22913,7 +22893,7 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
22913
22893
|
setChildOffset(childOffset);
|
|
22914
22894
|
}
|
|
22915
22895
|
if (isEmit && active !== targetActive) {
|
|
22916
|
-
(
|
|
22896
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, (targetActive + swiperItemCount) % swiperItemCount);
|
|
22917
22897
|
}
|
|
22918
22898
|
active = targetActive;
|
|
22919
22899
|
setActive(targetActive);
|
|
@@ -23074,13 +23054,13 @@ const Swiper = React__default.forwardRef((props, ref) => {
|
|
|
23074
23054
|
{ name: "touchend", e: onTouchEnd }
|
|
23075
23055
|
];
|
|
23076
23056
|
events.forEach((item) => {
|
|
23077
|
-
var
|
|
23078
|
-
(
|
|
23057
|
+
var _a;
|
|
23058
|
+
(_a = container.current) == null ? void 0 : _a.addEventListener(item.name, item.e, false);
|
|
23079
23059
|
});
|
|
23080
23060
|
return () => {
|
|
23081
23061
|
events.forEach((item) => {
|
|
23082
|
-
var
|
|
23083
|
-
(
|
|
23062
|
+
var _a;
|
|
23063
|
+
(_a = container.current) == null ? void 0 : _a.removeEventListener(item.name, item.e, false);
|
|
23084
23064
|
});
|
|
23085
23065
|
};
|
|
23086
23066
|
});
|
|
@@ -23196,8 +23176,8 @@ const ImagePreview = (props) => {
|
|
|
23196
23176
|
defaultValue,
|
|
23197
23177
|
finalValue: defaultValue,
|
|
23198
23178
|
onChange: (val) => {
|
|
23199
|
-
var
|
|
23200
|
-
(
|
|
23179
|
+
var _a;
|
|
23180
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, val);
|
|
23201
23181
|
}
|
|
23202
23182
|
});
|
|
23203
23183
|
const [showPop, setShowPop] = useState(visible);
|
|
@@ -23308,9 +23288,9 @@ const ImagePreview = (props) => {
|
|
|
23308
23288
|
);
|
|
23309
23289
|
};
|
|
23310
23290
|
const slideChangeEnd = (page) => {
|
|
23311
|
-
var
|
|
23291
|
+
var _a;
|
|
23312
23292
|
setActive(page + 1);
|
|
23313
|
-
(
|
|
23293
|
+
(_a = props.onChange) == null ? void 0 : _a.call(props, page + 1);
|
|
23314
23294
|
};
|
|
23315
23295
|
const onCloseInner = () => {
|
|
23316
23296
|
setShowPop(false);
|
|
@@ -23609,8 +23589,8 @@ const Step = (props) => {
|
|
|
23609
23589
|
return index === +parent.propSteps.value ? "process" : "wait";
|
|
23610
23590
|
};
|
|
23611
23591
|
const handleClickStep = () => {
|
|
23612
|
-
var
|
|
23613
|
-
((
|
|
23592
|
+
var _a, _b;
|
|
23593
|
+
((_a = parent.propSteps) == null ? void 0 : _a.onStepClick) && ((_b = parent.propSteps) == null ? void 0 : _b.onStepClick(value));
|
|
23614
23594
|
};
|
|
23615
23595
|
const classPrefix2 = `nut-step`;
|
|
23616
23596
|
const classes = classNames(
|
|
@@ -24327,8 +24307,8 @@ const VirtualList = (props) => {
|
|
|
24327
24307
|
setListTotalSize(totalSize);
|
|
24328
24308
|
}, [list, itemHeight, horizontal]);
|
|
24329
24309
|
const getElement = useCallback(() => {
|
|
24330
|
-
var
|
|
24331
|
-
return ((
|
|
24310
|
+
var _a;
|
|
24311
|
+
return ((_a = scrollRef.current) == null ? void 0 : _a.parentElement) || document.body;
|
|
24332
24312
|
}, []);
|
|
24333
24313
|
useEffect(() => {
|
|
24334
24314
|
if (containerHeight)
|
|
@@ -24505,8 +24485,8 @@ const InternalBarrage = (props, ref) => {
|
|
|
24505
24485
|
barrageCWidth.current = barrageBody.current.offsetWidth;
|
|
24506
24486
|
}
|
|
24507
24487
|
setTimeout(() => {
|
|
24508
|
-
var
|
|
24509
|
-
(
|
|
24488
|
+
var _a;
|
|
24489
|
+
(_a = barrageBody.current) == null ? void 0 : _a.style.setProperty(
|
|
24510
24490
|
"--move-distance",
|
|
24511
24491
|
`-${barrageCWidth.current}px`
|
|
24512
24492
|
);
|
|
@@ -24755,8 +24735,8 @@ const TimeSelect = (props) => {
|
|
|
24755
24735
|
];
|
|
24756
24736
|
}
|
|
24757
24737
|
newActiveTime = newActiveTime.filter((item) => {
|
|
24758
|
-
var
|
|
24759
|
-
return ((
|
|
24738
|
+
var _a;
|
|
24739
|
+
return ((_a = item[optionKey.childrenKey]) == null ? void 0 : _a.length) > 0;
|
|
24760
24740
|
});
|
|
24761
24741
|
setActiveTime(newActiveTime);
|
|
24762
24742
|
onTimeChange && onTimeChange(selectTime, newActiveTime);
|