@nutui/nutui-react 2.6.14 → 2.6.16
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 +931 -909
- package/README.md +21 -28
- package/dist/esm/Audio.js +10 -11
- package/dist/esm/CalendarItem.js +3 -1
- package/dist/esm/CheckboxGroup.js +4 -5
- package/dist/esm/DatePicker.js +3 -4
- package/dist/esm/Dialog.js +1 -2
- package/dist/esm/InputNumber.js +26 -9
- package/dist/esm/Menu.js +11 -4
- package/dist/esm/NumberKeyboard.js +38 -27
- package/dist/esm/PullToRefresh.js +0 -1
- package/dist/esm/RadioGroup.js +0 -1
- package/dist/esm/Sticky.js +24 -30
- package/dist/esm/Swipe.js +0 -1
- package/dist/esm/Swiper.js +0 -1
- package/dist/esm/SwiperItem.js +0 -1
- package/dist/esm/Table.js +6 -5
- package/dist/esm/Uploader/style/style.css +1 -1
- package/dist/esm/Uploader.js +12 -11
- package/dist/esm/WaterMark.js +3 -3
- package/dist/esm/formitem2.js +2 -2
- package/dist/esm/menuitem2.js +1 -1
- package/dist/esm/radio2.js +0 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/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 +257 -224
- package/dist/nutui.react.umd.js +257 -224
- package/dist/packages/uploader/uploader.scss +3 -1
- package/dist/style.css +1 -1
- package/dist/types/packages/cell/cell.d.ts +2 -2
- package/dist/types/packages/cell/cell.taro.d.ts +1 -1
- package/dist/types/packages/formitem/formitem.d.ts +5 -0
- package/dist/types/packages/formitem/formitem.taro.d.ts +1 -0
- package/dist/types/packages/inputnumber/inputnumber.d.ts +1 -1
- package/dist/types/packages/inputnumber/inputnumber.taro.d.ts +1 -1
- package/dist/types/packages/menuitem/menuitem.d.ts +5 -0
- package/dist/types/packages/menuitem/menuitem.taro.d.ts +1 -0
- package/dist/types/packages/swiper/swiper.taro.d.ts +2 -1
- package/dist/types/packages/swiperitem/swiperitem.d.ts +0 -1
- package/dist/types/packages/watermark/watermark.d.ts +10 -0
- package/dist/types/packages/watermark/watermark.taro.d.ts +2 -0
- package/dist/types/utils/get-scroll-parent.d.ts +1 -1
- package/dist/types/utils/use-client-rect.d.ts +1 -1
- package/package.json +2 -2
package/dist/nutui.react.umd.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("react-dom")) : typeof define === "function" && define.amd ? define(["exports", "react", "react-dom"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.nutui = {}, global2.React, global2.ReactDOM));
|
|
3
3
|
})(this, function(exports2, React, ReactDOM) {
|
|
4
4
|
"use strict";/*!
|
|
5
|
-
* @nutui/nutui-react v2.6.
|
|
5
|
+
* @nutui/nutui-react v2.6.16 Sat Aug 03 2024 09:49:59 GMT+0800 (China Standard Time)
|
|
6
6
|
* (c) 2023 @jdf2e.
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
style: {}
|
|
549
549
|
};
|
|
550
550
|
const prefixCls$2 = "nut-button";
|
|
551
|
-
const defaultProps$
|
|
551
|
+
const defaultProps$1u = {
|
|
552
552
|
...ComponentDefaults,
|
|
553
553
|
color: "",
|
|
554
554
|
type: "default",
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
onClick,
|
|
585
585
|
...rest
|
|
586
586
|
} = {
|
|
587
|
-
...defaultProps$
|
|
587
|
+
...defaultProps$1u,
|
|
588
588
|
...props
|
|
589
589
|
};
|
|
590
590
|
const getStyle = React.useCallback(() => {
|
|
@@ -643,7 +643,7 @@
|
|
|
643
643
|
);
|
|
644
644
|
Button.displayName = "NutButton";
|
|
645
645
|
const CellGroupContext = React.createContext(null);
|
|
646
|
-
const defaultProps$
|
|
646
|
+
const defaultProps$1t = {
|
|
647
647
|
...ComponentDefaults,
|
|
648
648
|
title: "",
|
|
649
649
|
description: "",
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
const classPrefix$r = "nut-cell-group";
|
|
653
653
|
const CellGroup = (props) => {
|
|
654
654
|
const { children, className, title, description, divider, ...rest } = {
|
|
655
|
-
...defaultProps$
|
|
655
|
+
...defaultProps$1t,
|
|
656
656
|
...props
|
|
657
657
|
};
|
|
658
658
|
return /* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix$r, className), ...rest }, title ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-title` }, title) : null, description ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix$r}-description` }, description) : null, /* @__PURE__ */ React.createElement(
|
|
@@ -664,7 +664,7 @@
|
|
|
664
664
|
));
|
|
665
665
|
};
|
|
666
666
|
CellGroup.displayName = "NutCellGroup";
|
|
667
|
-
const defaultProps$
|
|
667
|
+
const defaultProps$1s = {
|
|
668
668
|
...ComponentDefaults,
|
|
669
669
|
title: null,
|
|
670
670
|
description: null,
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
style,
|
|
690
690
|
...rest
|
|
691
691
|
} = {
|
|
692
|
-
...defaultProps$
|
|
692
|
+
...defaultProps$1s,
|
|
693
693
|
...props
|
|
694
694
|
};
|
|
695
695
|
const handleClick2 = (event) => {
|
|
@@ -1880,7 +1880,7 @@
|
|
|
1880
1880
|
const pxCheck = (value) => {
|
|
1881
1881
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
1882
1882
|
};
|
|
1883
|
-
const defaultProps$
|
|
1883
|
+
const defaultProps$1r = {
|
|
1884
1884
|
...ComponentDefaults,
|
|
1885
1885
|
fit: "fill",
|
|
1886
1886
|
position: "center",
|
|
@@ -1910,7 +1910,7 @@
|
|
|
1910
1910
|
onClick,
|
|
1911
1911
|
onLoad,
|
|
1912
1912
|
onError
|
|
1913
|
-
} = { ...defaultProps$
|
|
1913
|
+
} = { ...defaultProps$1r, ...props };
|
|
1914
1914
|
const [innerLoading, setInnerLoading] = React.useState(false);
|
|
1915
1915
|
const [isError, setIsError] = React.useState(false);
|
|
1916
1916
|
const [complete, setComplete] = React.useState(false);
|
|
@@ -2772,7 +2772,7 @@
|
|
|
2772
2772
|
};
|
|
2773
2773
|
Overlay.displayName = "NutOverlay";
|
|
2774
2774
|
const DataContext$1 = React.createContext({});
|
|
2775
|
-
const defaultProps$
|
|
2775
|
+
const defaultProps$1q = {
|
|
2776
2776
|
...ComponentDefaults,
|
|
2777
2777
|
span: "24",
|
|
2778
2778
|
offset: "0",
|
|
@@ -2780,7 +2780,7 @@
|
|
|
2780
2780
|
};
|
|
2781
2781
|
const Col = (props) => {
|
|
2782
2782
|
const { className, style, span, offset, children, onClick } = {
|
|
2783
|
-
...defaultProps$
|
|
2783
|
+
...defaultProps$1q,
|
|
2784
2784
|
...props
|
|
2785
2785
|
};
|
|
2786
2786
|
const [colName, setColName] = React.useState("");
|
|
@@ -2813,7 +2813,7 @@
|
|
|
2813
2813
|
);
|
|
2814
2814
|
};
|
|
2815
2815
|
Col.displayName = "NutCol";
|
|
2816
|
-
const defaultProps$
|
|
2816
|
+
const defaultProps$1p = {
|
|
2817
2817
|
...ComponentDefaults,
|
|
2818
2818
|
contentPosition: "center",
|
|
2819
2819
|
direction: "horizontal"
|
|
@@ -2821,7 +2821,7 @@
|
|
|
2821
2821
|
const classPrefix$n = `nut-divider`;
|
|
2822
2822
|
const Divider = (props) => {
|
|
2823
2823
|
const { children, contentPosition, style, className, direction, ...rest } = {
|
|
2824
|
-
...defaultProps$
|
|
2824
|
+
...defaultProps$1p,
|
|
2825
2825
|
...props
|
|
2826
2826
|
};
|
|
2827
2827
|
const classes = direction === "horizontal" ? classNames({
|
|
@@ -2842,7 +2842,7 @@
|
|
|
2842
2842
|
}
|
|
2843
2843
|
};
|
|
2844
2844
|
const GridContext = React.createContext(gridContext);
|
|
2845
|
-
const defaultProps$
|
|
2845
|
+
const defaultProps$1o = {
|
|
2846
2846
|
text: "",
|
|
2847
2847
|
columns: 4,
|
|
2848
2848
|
gap: 0,
|
|
@@ -2868,7 +2868,7 @@
|
|
|
2868
2868
|
onClick,
|
|
2869
2869
|
...rest
|
|
2870
2870
|
} = {
|
|
2871
|
-
...defaultProps$
|
|
2871
|
+
...defaultProps$1o,
|
|
2872
2872
|
...props
|
|
2873
2873
|
};
|
|
2874
2874
|
const classPrefix2 = "nut-grid-item";
|
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
);
|
|
2928
2928
|
};
|
|
2929
2929
|
GridItem.displayName = "NutGridItem";
|
|
2930
|
-
const defaultProps$
|
|
2930
|
+
const defaultProps$1n = {
|
|
2931
2931
|
columns: 4,
|
|
2932
2932
|
gap: 0,
|
|
2933
2933
|
center: true,
|
|
@@ -2948,7 +2948,7 @@
|
|
|
2948
2948
|
className,
|
|
2949
2949
|
onClick,
|
|
2950
2950
|
...rest
|
|
2951
|
-
} = { ...defaultProps$
|
|
2951
|
+
} = { ...defaultProps$1n, ...props };
|
|
2952
2952
|
const childrenDom = React.Children.toArray(children);
|
|
2953
2953
|
const classPrefix2 = "nut-grid";
|
|
2954
2954
|
const rootClass = () => {
|
|
@@ -2984,14 +2984,14 @@
|
|
|
2984
2984
|
};
|
|
2985
2985
|
Grid.displayName = "NutGrid";
|
|
2986
2986
|
Grid.Item = GridItem;
|
|
2987
|
-
const defaultProps$
|
|
2987
|
+
const defaultProps$1m = {};
|
|
2988
2988
|
const Layout = (props) => {
|
|
2989
|
-
({ ...defaultProps$
|
|
2989
|
+
({ ...defaultProps$1m, ...props });
|
|
2990
2990
|
return /* @__PURE__ */ React.createElement("div", { className: "nut-layout" }, "Layout");
|
|
2991
2991
|
};
|
|
2992
2992
|
Layout.displayName = "NutLayout";
|
|
2993
2993
|
const classPrefix$m = "nut-row";
|
|
2994
|
-
const defaultProps$
|
|
2994
|
+
const defaultProps$1l = {
|
|
2995
2995
|
...ComponentDefaults,
|
|
2996
2996
|
type: "",
|
|
2997
2997
|
justify: "start",
|
|
@@ -3011,7 +3011,7 @@
|
|
|
3011
3011
|
gutter,
|
|
3012
3012
|
onClick
|
|
3013
3013
|
} = {
|
|
3014
|
-
...defaultProps$
|
|
3014
|
+
...defaultProps$1l,
|
|
3015
3015
|
...props
|
|
3016
3016
|
};
|
|
3017
3017
|
const getClass = (prefix2, type22) => {
|
|
@@ -3045,12 +3045,12 @@
|
|
|
3045
3045
|
};
|
|
3046
3046
|
Row.displayName = "NutRow";
|
|
3047
3047
|
const prefixCls$1 = "nut-space";
|
|
3048
|
-
const defaultProps$
|
|
3048
|
+
const defaultProps$1k = {
|
|
3049
3049
|
direction: "horizontal"
|
|
3050
3050
|
};
|
|
3051
3051
|
const Space = (props) => {
|
|
3052
3052
|
const { className, style, children, wrap, align, direction, justify } = {
|
|
3053
|
-
...defaultProps$
|
|
3053
|
+
...defaultProps$1k,
|
|
3054
3054
|
...props
|
|
3055
3055
|
};
|
|
3056
3056
|
const cls = classNames(
|
|
@@ -3118,7 +3118,7 @@
|
|
|
3118
3118
|
stop2.current = true;
|
|
3119
3119
|
};
|
|
3120
3120
|
}
|
|
3121
|
-
const defaultProps$
|
|
3121
|
+
const defaultProps$1j = {
|
|
3122
3122
|
...ComponentDefaults,
|
|
3123
3123
|
position: "top",
|
|
3124
3124
|
threshold: 0,
|
|
@@ -3136,7 +3136,7 @@
|
|
|
3136
3136
|
threshold,
|
|
3137
3137
|
onChange,
|
|
3138
3138
|
...rest
|
|
3139
|
-
} = { ...defaultProps$
|
|
3139
|
+
} = { ...defaultProps$1j, ...props };
|
|
3140
3140
|
const stickyRef = React.useRef(null);
|
|
3141
3141
|
const rootRef = React.useRef(null);
|
|
3142
3142
|
const [isFixed, setIsFixed] = React.useState(false);
|
|
@@ -3150,13 +3150,14 @@
|
|
|
3150
3150
|
}, []);
|
|
3151
3151
|
React.useEffect(() => {
|
|
3152
3152
|
if (position === "top") return;
|
|
3153
|
-
const containerEle = container
|
|
3154
|
-
|
|
3155
|
-
const
|
|
3153
|
+
const containerEle = container && container.current;
|
|
3154
|
+
const rootEle = rootRef.current;
|
|
3155
|
+
const stickyEle = stickyRef.current;
|
|
3156
|
+
if (!rootEle && !containerEle) return;
|
|
3157
|
+
const rootRect = getRect(rootEle);
|
|
3156
3158
|
const containerRect = getRect(containerEle);
|
|
3157
3159
|
const clientHeight = document.documentElement.clientHeight;
|
|
3158
|
-
const
|
|
3159
|
-
const stickyRect = getRect(stCurrent);
|
|
3160
|
+
const stickyRect = getRect(stickyEle);
|
|
3160
3161
|
let fixed = clientHeight - threshold < rootRect.bottom;
|
|
3161
3162
|
if (containerEle) {
|
|
3162
3163
|
fixed = containerRect.bottom > clientHeight - threshold - stickyRect.height && clientHeight - threshold - stickyRect.height > containerRect.top;
|
|
@@ -3171,19 +3172,18 @@
|
|
|
3171
3172
|
setIsFixed(fixed);
|
|
3172
3173
|
}, [position, container, threshold]);
|
|
3173
3174
|
const handleScroll = React.useCallback(() => {
|
|
3174
|
-
const containerEle = container
|
|
3175
|
-
|
|
3176
|
-
const
|
|
3177
|
-
|
|
3178
|
-
const
|
|
3175
|
+
const containerEle = container && container.current;
|
|
3176
|
+
const rootEle = rootRef.current;
|
|
3177
|
+
const stickyEle = stickyRef.current;
|
|
3178
|
+
if (!rootEle && !containerEle) return;
|
|
3179
|
+
const rootRect = getRect(rootEle);
|
|
3180
|
+
const stickyRect = getRect(stickyEle);
|
|
3179
3181
|
const containerRect = getRect(containerEle);
|
|
3180
3182
|
if (rootRect.height) {
|
|
3181
|
-
setRootStyle((prev) => {
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
};
|
|
3186
|
-
});
|
|
3183
|
+
setRootStyle((prev) => ({
|
|
3184
|
+
...prev,
|
|
3185
|
+
height: rootRect.height
|
|
3186
|
+
}));
|
|
3187
3187
|
}
|
|
3188
3188
|
const getFixed = () => {
|
|
3189
3189
|
let fixed2 = false;
|
|
@@ -3199,22 +3199,16 @@
|
|
|
3199
3199
|
};
|
|
3200
3200
|
};
|
|
3201
3201
|
const getTransform = () => {
|
|
3202
|
-
if (position === "top") {
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3207
|
-
}
|
|
3208
|
-
return {};
|
|
3202
|
+
if (position === "top" && containerEle) {
|
|
3203
|
+
const diff = containerRect.bottom - threshold - stickyRect.height;
|
|
3204
|
+
const transform = diff < 0 ? diff : 0;
|
|
3205
|
+
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3209
3206
|
}
|
|
3210
|
-
if (position === "bottom") {
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3216
|
-
}
|
|
3217
|
-
return {};
|
|
3207
|
+
if (position === "bottom" && containerEle) {
|
|
3208
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
3209
|
+
const diff = containerRect.bottom - (clientHeight - threshold);
|
|
3210
|
+
const transform = diff < 0 ? diff : 0;
|
|
3211
|
+
return { transform: `translate3d(0, ${transform}px, 0)` };
|
|
3218
3212
|
}
|
|
3219
3213
|
return {};
|
|
3220
3214
|
};
|
|
@@ -3233,9 +3227,9 @@
|
|
|
3233
3227
|
});
|
|
3234
3228
|
React.useEffect(() => {
|
|
3235
3229
|
const el = getElement();
|
|
3236
|
-
el.addEventListener("scroll", handleScroll, false);
|
|
3230
|
+
el == null ? void 0 : el.addEventListener("scroll", handleScroll, false);
|
|
3237
3231
|
return () => {
|
|
3238
|
-
el.removeEventListener("scroll", handleScroll);
|
|
3232
|
+
el == null ? void 0 : el.removeEventListener("scroll", handleScroll);
|
|
3239
3233
|
};
|
|
3240
3234
|
}, [getElement, handleScroll]);
|
|
3241
3235
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -3263,7 +3257,7 @@
|
|
|
3263
3257
|
);
|
|
3264
3258
|
};
|
|
3265
3259
|
SafeArea.displayName = "NutSafeArea";
|
|
3266
|
-
const defaultProps$
|
|
3260
|
+
const defaultProps$1i = {
|
|
3267
3261
|
...ComponentDefaults,
|
|
3268
3262
|
target: "",
|
|
3269
3263
|
threshold: 200,
|
|
@@ -3282,7 +3276,7 @@
|
|
|
3282
3276
|
style,
|
|
3283
3277
|
onClick
|
|
3284
3278
|
} = {
|
|
3285
|
-
...defaultProps$
|
|
3279
|
+
...defaultProps$1i,
|
|
3286
3280
|
...props
|
|
3287
3281
|
};
|
|
3288
3282
|
const classPrefix2 = "nut-backtop";
|
|
@@ -8200,7 +8194,7 @@
|
|
|
8200
8194
|
});
|
|
8201
8195
|
const animated = host.animated;
|
|
8202
8196
|
const elevatorContext = React.createContext({});
|
|
8203
|
-
const defaultProps$
|
|
8197
|
+
const defaultProps$1h = {
|
|
8204
8198
|
...ComponentDefaults,
|
|
8205
8199
|
height: "200px",
|
|
8206
8200
|
floorKey: "title",
|
|
@@ -8226,7 +8220,7 @@
|
|
|
8226
8220
|
children,
|
|
8227
8221
|
...rest
|
|
8228
8222
|
} = {
|
|
8229
|
-
...defaultProps$
|
|
8223
|
+
...defaultProps$1h,
|
|
8230
8224
|
...props
|
|
8231
8225
|
};
|
|
8232
8226
|
const classPrefix2 = "nut-elevator";
|
|
@@ -8404,7 +8398,7 @@
|
|
|
8404
8398
|
};
|
|
8405
8399
|
Elevator.displayName = "NutElevator";
|
|
8406
8400
|
Elevator.Context = elevatorContext;
|
|
8407
|
-
const defaultProps$
|
|
8401
|
+
const defaultProps$1g = {
|
|
8408
8402
|
...ComponentDefaults,
|
|
8409
8403
|
activeText: "",
|
|
8410
8404
|
inactiveText: "",
|
|
@@ -8432,7 +8426,7 @@
|
|
|
8432
8426
|
content,
|
|
8433
8427
|
...rest
|
|
8434
8428
|
} = {
|
|
8435
|
-
...defaultProps$
|
|
8429
|
+
...defaultProps$1g,
|
|
8436
8430
|
...props
|
|
8437
8431
|
};
|
|
8438
8432
|
const classPrefix2 = "nut-fixednav";
|
|
@@ -8485,7 +8479,7 @@
|
|
|
8485
8479
|
);
|
|
8486
8480
|
};
|
|
8487
8481
|
FixedNav.displayName = "NutFixedNav";
|
|
8488
|
-
const defaultProps$
|
|
8482
|
+
const defaultProps$1f = {
|
|
8489
8483
|
...ComponentDefaults,
|
|
8490
8484
|
left: "",
|
|
8491
8485
|
right: "",
|
|
@@ -8510,7 +8504,7 @@
|
|
|
8510
8504
|
zIndex,
|
|
8511
8505
|
onBackClick
|
|
8512
8506
|
} = {
|
|
8513
|
-
...defaultProps$
|
|
8507
|
+
...defaultProps$1f,
|
|
8514
8508
|
...props
|
|
8515
8509
|
};
|
|
8516
8510
|
const classPrefix2 = "nut-navbar";
|
|
@@ -8587,7 +8581,7 @@
|
|
|
8587
8581
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, fixed && placeholder ? /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-placeholder` }, renderWrapper()) : renderWrapper());
|
|
8588
8582
|
};
|
|
8589
8583
|
NavBar.displayName = "NutNavBar";
|
|
8590
|
-
const defaultProps$
|
|
8584
|
+
const defaultProps$1e = {
|
|
8591
8585
|
...ComponentDefaults,
|
|
8592
8586
|
position: "center",
|
|
8593
8587
|
transition: "",
|
|
@@ -8640,7 +8634,7 @@
|
|
|
8640
8634
|
afterShow,
|
|
8641
8635
|
afterClose,
|
|
8642
8636
|
onClick
|
|
8643
|
-
} = { ...defaultProps$
|
|
8637
|
+
} = { ...defaultProps$1e, ...props };
|
|
8644
8638
|
const nodeRef = React.useRef(null);
|
|
8645
8639
|
let innerIndex = zIndex || _zIndex;
|
|
8646
8640
|
const [index, setIndex] = React.useState(innerIndex);
|
|
@@ -8796,7 +8790,7 @@
|
|
|
8796
8790
|
}
|
|
8797
8791
|
};
|
|
8798
8792
|
const OffsetContext = React.createContext(20);
|
|
8799
|
-
const defaultProps$
|
|
8793
|
+
const defaultProps$1d = {
|
|
8800
8794
|
...ComponentDefaults,
|
|
8801
8795
|
position: "left",
|
|
8802
8796
|
width: "80%"
|
|
@@ -8814,7 +8808,7 @@
|
|
|
8814
8808
|
indent,
|
|
8815
8809
|
...rest
|
|
8816
8810
|
} = {
|
|
8817
|
-
...defaultProps$
|
|
8811
|
+
...defaultProps$1d,
|
|
8818
8812
|
...props
|
|
8819
8813
|
};
|
|
8820
8814
|
const innerIndent = indent ? Number(indent) : 20;
|
|
@@ -8864,13 +8858,13 @@
|
|
|
8864
8858
|
title
|
|
8865
8859
|
);
|
|
8866
8860
|
};
|
|
8867
|
-
const defaultProps$
|
|
8861
|
+
const defaultProps$1c = {
|
|
8868
8862
|
open: true
|
|
8869
8863
|
};
|
|
8870
8864
|
const SubSideNavBar = (props) => {
|
|
8871
8865
|
const classPrefix2 = "nut-subsidenavbar";
|
|
8872
8866
|
const { title, value, children, onClick, open, ...rest } = {
|
|
8873
|
-
...defaultProps$
|
|
8867
|
+
...defaultProps$1c,
|
|
8874
8868
|
...props
|
|
8875
8869
|
};
|
|
8876
8870
|
const offset = React.useContext(OffsetContext);
|
|
@@ -8947,7 +8941,7 @@
|
|
|
8947
8941
|
);
|
|
8948
8942
|
return [stateRef.current, setState];
|
|
8949
8943
|
}
|
|
8950
|
-
const defaultProps$
|
|
8944
|
+
const defaultProps$1b = {
|
|
8951
8945
|
...ComponentDefaults,
|
|
8952
8946
|
value: "",
|
|
8953
8947
|
dot: false,
|
|
@@ -8972,7 +8966,7 @@
|
|
|
8972
8966
|
color,
|
|
8973
8967
|
fill
|
|
8974
8968
|
} = {
|
|
8975
|
-
...defaultProps$
|
|
8969
|
+
...defaultProps$1b,
|
|
8976
8970
|
...props
|
|
8977
8971
|
};
|
|
8978
8972
|
const classPrefix2 = "nut-badge";
|
|
@@ -9026,7 +9020,7 @@
|
|
|
9026
9020
|
};
|
|
9027
9021
|
Badge.displayName = "NutBadge";
|
|
9028
9022
|
const TabbarContext = React.createContext(null);
|
|
9029
|
-
const defaultProps$
|
|
9023
|
+
const defaultProps$1a = {
|
|
9030
9024
|
...ComponentDefaults,
|
|
9031
9025
|
title: "",
|
|
9032
9026
|
icon: null,
|
|
@@ -9052,7 +9046,7 @@
|
|
|
9052
9046
|
index,
|
|
9053
9047
|
...rest
|
|
9054
9048
|
} = {
|
|
9055
|
-
...defaultProps$
|
|
9049
|
+
...defaultProps$1a,
|
|
9056
9050
|
...props
|
|
9057
9051
|
};
|
|
9058
9052
|
const active = index === (ctx2 == null ? void 0 : ctx2.selectIndex);
|
|
@@ -9090,7 +9084,7 @@
|
|
|
9090
9084
|
icon ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: boxPrefix }, icon)), /* @__PURE__ */ React.createElement("div", { className: titleClass }, title)) : /* @__PURE__ */ React.createElement(Badge, { ...badgeProps }, /* @__PURE__ */ React.createElement("div", { className: titleClass }, title))
|
|
9091
9085
|
);
|
|
9092
9086
|
};
|
|
9093
|
-
const defaultProps$
|
|
9087
|
+
const defaultProps$19 = {
|
|
9094
9088
|
...ComponentDefaults,
|
|
9095
9089
|
defaultValue: 0,
|
|
9096
9090
|
fixed: false,
|
|
@@ -9113,7 +9107,7 @@
|
|
|
9113
9107
|
style,
|
|
9114
9108
|
onSwitch
|
|
9115
9109
|
} = {
|
|
9116
|
-
...defaultProps$
|
|
9110
|
+
...defaultProps$19,
|
|
9117
9111
|
...props
|
|
9118
9112
|
};
|
|
9119
9113
|
const classPrefix2 = "nut-tabbar";
|
|
@@ -9155,14 +9149,14 @@
|
|
|
9155
9149
|
};
|
|
9156
9150
|
Tabbar.displayName = "NutTabbar";
|
|
9157
9151
|
Tabbar.Item = TabbarItem;
|
|
9158
|
-
const defaultProps$
|
|
9152
|
+
const defaultProps$18 = {
|
|
9159
9153
|
title: "",
|
|
9160
9154
|
value: "",
|
|
9161
9155
|
disabled: false
|
|
9162
9156
|
};
|
|
9163
9157
|
const TabPane = (props) => {
|
|
9164
9158
|
const { children, autoHeightClassName, className, disabled } = {
|
|
9165
|
-
...defaultProps$
|
|
9159
|
+
...defaultProps$18,
|
|
9166
9160
|
...props
|
|
9167
9161
|
};
|
|
9168
9162
|
const classPrefix2 = "nut-tabpane";
|
|
@@ -9176,7 +9170,7 @@
|
|
|
9176
9170
|
);
|
|
9177
9171
|
return children ? /* @__PURE__ */ React.createElement("div", { className: classes }, !disabled && children) : null;
|
|
9178
9172
|
};
|
|
9179
|
-
const defaultProps$
|
|
9173
|
+
const defaultProps$17 = {
|
|
9180
9174
|
...ComponentDefaults,
|
|
9181
9175
|
tabStyle: {},
|
|
9182
9176
|
activeColor: "",
|
|
@@ -9205,7 +9199,7 @@
|
|
|
9205
9199
|
defaultValue: outerDefaultValue,
|
|
9206
9200
|
...rest
|
|
9207
9201
|
} = {
|
|
9208
|
-
...defaultProps$
|
|
9202
|
+
...defaultProps$17,
|
|
9209
9203
|
...props
|
|
9210
9204
|
};
|
|
9211
9205
|
const [value, setValue] = usePropsValue({
|
|
@@ -9513,7 +9507,7 @@
|
|
|
9513
9507
|
return pathNodes;
|
|
9514
9508
|
}
|
|
9515
9509
|
}
|
|
9516
|
-
const defaultProps$
|
|
9510
|
+
const defaultProps$16 = {
|
|
9517
9511
|
...ComponentDefaults,
|
|
9518
9512
|
activeColor: "",
|
|
9519
9513
|
activeIcon: "checklist",
|
|
@@ -9558,7 +9552,7 @@
|
|
|
9558
9552
|
onClose,
|
|
9559
9553
|
onChange,
|
|
9560
9554
|
onPathChange
|
|
9561
|
-
} = { ...defaultProps$
|
|
9555
|
+
} = { ...defaultProps$16, ...props };
|
|
9562
9556
|
const [tabvalue, setTabvalue] = React.useState("c1");
|
|
9563
9557
|
const [optionsData, setOptionsData] = React.useState([]);
|
|
9564
9558
|
const isLazy = () => state.configs.lazy && Boolean(state.configs.onLoad);
|
|
@@ -9865,7 +9859,7 @@
|
|
|
9865
9859
|
};
|
|
9866
9860
|
const Cascader = React.forwardRef(InternalCascader);
|
|
9867
9861
|
Cascader.displayName = "NutCascader";
|
|
9868
|
-
const defaultProps$
|
|
9862
|
+
const defaultProps$15 = {
|
|
9869
9863
|
...ComponentDefaults,
|
|
9870
9864
|
visible: false,
|
|
9871
9865
|
type: "custom",
|
|
@@ -9892,7 +9886,7 @@
|
|
|
9892
9886
|
onPathChange,
|
|
9893
9887
|
...rest
|
|
9894
9888
|
} = {
|
|
9895
|
-
...defaultProps$
|
|
9889
|
+
...defaultProps$15,
|
|
9896
9890
|
...props
|
|
9897
9891
|
};
|
|
9898
9892
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, type === "custom" && /* @__PURE__ */ React.createElement(
|
|
@@ -9917,7 +9911,7 @@
|
|
|
9917
9911
|
}
|
|
9918
9912
|
));
|
|
9919
9913
|
};
|
|
9920
|
-
const defaultProps$
|
|
9914
|
+
const defaultProps$14 = {
|
|
9921
9915
|
type: "custom",
|
|
9922
9916
|
existList: [],
|
|
9923
9917
|
defaultIcon: null,
|
|
@@ -9936,7 +9930,7 @@
|
|
|
9936
9930
|
onSelect,
|
|
9937
9931
|
onSwitch,
|
|
9938
9932
|
...rest
|
|
9939
|
-
} = { ...defaultProps$
|
|
9933
|
+
} = { ...defaultProps$14, ...props };
|
|
9940
9934
|
const classPrefix2 = "nut-address";
|
|
9941
9935
|
const selectedExist = (item) => {
|
|
9942
9936
|
existList.forEach((list, index) => {
|
|
@@ -9965,7 +9959,7 @@
|
|
|
9965
9959
|
);
|
|
9966
9960
|
})), (custom || custom && locale.address.chooseAnotherAddress) && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer`, onClick }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-footer-btn` }, custom)));
|
|
9967
9961
|
};
|
|
9968
|
-
const defaultProps$
|
|
9962
|
+
const defaultProps$13 = {
|
|
9969
9963
|
...ComponentDefaults,
|
|
9970
9964
|
defaultValue: [],
|
|
9971
9965
|
type: "custom",
|
|
@@ -10007,7 +10001,7 @@
|
|
|
10007
10001
|
onSwitch,
|
|
10008
10002
|
...rest
|
|
10009
10003
|
} = {
|
|
10010
|
-
...defaultProps$
|
|
10004
|
+
...defaultProps$13,
|
|
10011
10005
|
...props
|
|
10012
10006
|
};
|
|
10013
10007
|
const classPrefix2 = "nut-address";
|
|
@@ -10345,7 +10339,7 @@
|
|
|
10345
10339
|
const isStartAndEnd = (days) => {
|
|
10346
10340
|
return days.length >= 2 && Utils.isEqual(days[0], days[1]);
|
|
10347
10341
|
};
|
|
10348
|
-
const defaultProps$
|
|
10342
|
+
const defaultProps$12 = {
|
|
10349
10343
|
...ComponentDefaults,
|
|
10350
10344
|
type: "single",
|
|
10351
10345
|
autoBackfill: false,
|
|
@@ -10406,7 +10400,7 @@
|
|
|
10406
10400
|
onUpdate,
|
|
10407
10401
|
onDayClick,
|
|
10408
10402
|
onPageChange
|
|
10409
|
-
} = { ...defaultProps$
|
|
10403
|
+
} = { ...defaultProps$12, ...props };
|
|
10410
10404
|
const weekdays = locale.calendaritem.weekdays;
|
|
10411
10405
|
const weeks = [
|
|
10412
10406
|
...weekdays.slice(firstDayOfWeek, 7),
|
|
@@ -10698,8 +10692,10 @@
|
|
|
10698
10692
|
};
|
|
10699
10693
|
React.useEffect(() => {
|
|
10700
10694
|
setCurrentDate(resetDefaultValue() || []);
|
|
10701
|
-
popup && resetRender();
|
|
10702
10695
|
}, [defaultValue]);
|
|
10696
|
+
React.useEffect(() => {
|
|
10697
|
+
popup && resetRender();
|
|
10698
|
+
}, [currentDate]);
|
|
10703
10699
|
const scrollToDate = (date) => {
|
|
10704
10700
|
if (Utils.compareDate(date, propStartDate)) {
|
|
10705
10701
|
date = propStartDate;
|
|
@@ -10943,7 +10939,7 @@
|
|
|
10943
10939
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { className: classes, style }, renderHeader(), renderContent(), popup && !autoBackfill ? renderFooter() : ""));
|
|
10944
10940
|
});
|
|
10945
10941
|
CalendarItem.displayName = "NutCalendarItem";
|
|
10946
|
-
const defaultProps$
|
|
10942
|
+
const defaultProps$11 = {
|
|
10947
10943
|
...ComponentDefaults,
|
|
10948
10944
|
type: "single",
|
|
10949
10945
|
autoBackfill: false,
|
|
@@ -11006,7 +11002,7 @@
|
|
|
11006
11002
|
onConfirm,
|
|
11007
11003
|
onDayClick,
|
|
11008
11004
|
onPageChange
|
|
11009
|
-
} = { ...defaultProps$
|
|
11005
|
+
} = { ...defaultProps$11, ...props };
|
|
11010
11006
|
const calendarRef = React.useRef(null);
|
|
11011
11007
|
const close = () => {
|
|
11012
11008
|
onClose && onClose();
|
|
@@ -11186,7 +11182,7 @@
|
|
|
11186
11182
|
)
|
|
11187
11183
|
];
|
|
11188
11184
|
};
|
|
11189
|
-
const defaultProps
|
|
11185
|
+
const defaultProps$10 = {
|
|
11190
11186
|
...ComponentDefaults,
|
|
11191
11187
|
type: "single",
|
|
11192
11188
|
firstDayOfWeek: 0
|
|
@@ -11210,7 +11206,7 @@
|
|
|
11210
11206
|
onDayClick,
|
|
11211
11207
|
onPageChange,
|
|
11212
11208
|
onChange
|
|
11213
|
-
} = { ...defaultProps
|
|
11209
|
+
} = { ...defaultProps$10, ...props };
|
|
11214
11210
|
const [month, setMonth] = React.useState(() => {
|
|
11215
11211
|
let date = new Date(Date.now());
|
|
11216
11212
|
const val = value || defaultValue;
|
|
@@ -11514,7 +11510,7 @@
|
|
|
11514
11510
|
});
|
|
11515
11511
|
CalendarCard.displayName = "NutCalendarCard";
|
|
11516
11512
|
const CheckboxGroupContext = React.createContext(null);
|
|
11517
|
-
const defaultProps
|
|
11513
|
+
const defaultProps$$ = {
|
|
11518
11514
|
max: void 0,
|
|
11519
11515
|
min: void 0,
|
|
11520
11516
|
list: false,
|
|
@@ -11534,17 +11530,17 @@
|
|
|
11534
11530
|
className,
|
|
11535
11531
|
disabled,
|
|
11536
11532
|
list,
|
|
11537
|
-
onChange,
|
|
11538
11533
|
value,
|
|
11539
11534
|
defaultValue,
|
|
11540
11535
|
max,
|
|
11541
11536
|
min,
|
|
11542
|
-
onLimit,
|
|
11543
11537
|
labelPosition,
|
|
11544
11538
|
direction,
|
|
11545
11539
|
options: options2,
|
|
11540
|
+
onChange,
|
|
11541
|
+
onLimit,
|
|
11546
11542
|
...rest
|
|
11547
|
-
} = { ...defaultProps
|
|
11543
|
+
} = { ...defaultProps$$, ...props };
|
|
11548
11544
|
React.useImperativeHandle(ref, () => ({
|
|
11549
11545
|
toggle(state) {
|
|
11550
11546
|
if (state === false) {
|
|
@@ -11571,8 +11567,8 @@
|
|
|
11571
11567
|
}
|
|
11572
11568
|
}));
|
|
11573
11569
|
const [_value, setValue] = usePropsValue({
|
|
11574
|
-
value
|
|
11575
|
-
defaultValue
|
|
11570
|
+
value,
|
|
11571
|
+
defaultValue,
|
|
11576
11572
|
finalValue: [],
|
|
11577
11573
|
onChange
|
|
11578
11574
|
});
|
|
@@ -11624,7 +11620,7 @@
|
|
|
11624
11620
|
className: classNames(
|
|
11625
11621
|
classPrefix$i,
|
|
11626
11622
|
{
|
|
11627
|
-
[`nut-checkboxgroup-${
|
|
11623
|
+
[`nut-checkboxgroup-${direction}`]: direction,
|
|
11628
11624
|
[`nut-checkboxgroup-list`]: list
|
|
11629
11625
|
},
|
|
11630
11626
|
className
|
|
@@ -11636,9 +11632,8 @@
|
|
|
11636
11632
|
);
|
|
11637
11633
|
}
|
|
11638
11634
|
);
|
|
11639
|
-
CheckboxGroup.defaultProps = defaultProps$_;
|
|
11640
11635
|
CheckboxGroup.displayName = "NutCheckboxGroup";
|
|
11641
|
-
const defaultProps$
|
|
11636
|
+
const defaultProps$_ = {
|
|
11642
11637
|
...ComponentDefaults,
|
|
11643
11638
|
disabled: false,
|
|
11644
11639
|
shape: "round",
|
|
@@ -11652,7 +11647,7 @@
|
|
|
11652
11647
|
const classPrefix$h = "nut-checkbox";
|
|
11653
11648
|
const Checkbox = (props) => {
|
|
11654
11649
|
const { children } = {
|
|
11655
|
-
...defaultProps$
|
|
11650
|
+
...defaultProps$_,
|
|
11656
11651
|
...props
|
|
11657
11652
|
};
|
|
11658
11653
|
const {
|
|
@@ -12029,7 +12024,7 @@
|
|
|
12029
12024
|
}, []);
|
|
12030
12025
|
return [refs.current, setRefs, reset];
|
|
12031
12026
|
}
|
|
12032
|
-
const defaultProps$
|
|
12027
|
+
const defaultProps$Z = {
|
|
12033
12028
|
...ComponentDefaults,
|
|
12034
12029
|
title: "",
|
|
12035
12030
|
options: [],
|
|
@@ -12059,7 +12054,7 @@
|
|
|
12059
12054
|
afterClose,
|
|
12060
12055
|
onChange,
|
|
12061
12056
|
...rest
|
|
12062
|
-
} = { ...defaultProps$
|
|
12057
|
+
} = { ...defaultProps$Z, ...props };
|
|
12063
12058
|
const classPrefix2 = "nut-picker";
|
|
12064
12059
|
const classes = classNames(classPrefix2, className);
|
|
12065
12060
|
const [selectedValue, setSelectedValue] = usePropsValue({
|
|
@@ -12300,7 +12295,7 @@
|
|
|
12300
12295
|
return str;
|
|
12301
12296
|
};
|
|
12302
12297
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
12303
|
-
const defaultProps$
|
|
12298
|
+
const defaultProps$Y = {
|
|
12304
12299
|
...ComponentDefaults,
|
|
12305
12300
|
visible: false,
|
|
12306
12301
|
title: "",
|
|
@@ -12333,7 +12328,7 @@
|
|
|
12333
12328
|
style,
|
|
12334
12329
|
...rest
|
|
12335
12330
|
} = {
|
|
12336
|
-
...defaultProps$
|
|
12331
|
+
...defaultProps$Y,
|
|
12337
12332
|
...props
|
|
12338
12333
|
};
|
|
12339
12334
|
const { locale } = useConfig();
|
|
@@ -12457,7 +12452,7 @@
|
|
|
12457
12452
|
if (!isEqual2) {
|
|
12458
12453
|
setSelectedDate(formatValue(newDate));
|
|
12459
12454
|
}
|
|
12460
|
-
|
|
12455
|
+
onChange == null ? void 0 : onChange(
|
|
12461
12456
|
selectedOptions,
|
|
12462
12457
|
[
|
|
12463
12458
|
String(newDate.getFullYear()),
|
|
@@ -12554,8 +12549,8 @@
|
|
|
12554
12549
|
}
|
|
12555
12550
|
pickerValue[columnIndex] = (_a = arr[index]) == null ? void 0 : _a.value;
|
|
12556
12551
|
setPickerValue([...pickerValue]);
|
|
12557
|
-
if (
|
|
12558
|
-
return
|
|
12552
|
+
if (filter == null ? void 0 : filter(type22, arr)) {
|
|
12553
|
+
return filter == null ? void 0 : filter(type22, arr);
|
|
12559
12554
|
}
|
|
12560
12555
|
return arr;
|
|
12561
12556
|
};
|
|
@@ -12613,7 +12608,6 @@
|
|
|
12613
12608
|
}
|
|
12614
12609
|
));
|
|
12615
12610
|
};
|
|
12616
|
-
DatePicker.defaultProps = defaultProps$X;
|
|
12617
12611
|
DatePicker.displayName = "NutDatePicker";
|
|
12618
12612
|
const Context = React.createContext({});
|
|
12619
12613
|
function _extends() {
|
|
@@ -13845,7 +13839,7 @@
|
|
|
13845
13839
|
}
|
|
13846
13840
|
return [formRef.current];
|
|
13847
13841
|
};
|
|
13848
|
-
const defaultProps$
|
|
13842
|
+
const defaultProps$X = {
|
|
13849
13843
|
...ComponentDefaults,
|
|
13850
13844
|
labelPosition: "right",
|
|
13851
13845
|
starPosition: "left",
|
|
@@ -13876,7 +13870,7 @@
|
|
|
13876
13870
|
starPosition,
|
|
13877
13871
|
form
|
|
13878
13872
|
} = {
|
|
13879
|
-
...defaultProps$
|
|
13873
|
+
...defaultProps$X,
|
|
13880
13874
|
...props
|
|
13881
13875
|
};
|
|
13882
13876
|
let formInstance;
|
|
@@ -13932,7 +13926,7 @@
|
|
|
13932
13926
|
}
|
|
13933
13927
|
).$$typeof === component.type.$$typeof;
|
|
13934
13928
|
}
|
|
13935
|
-
const defaultProps$
|
|
13929
|
+
const defaultProps$W = {
|
|
13936
13930
|
...ComponentDefaults,
|
|
13937
13931
|
required: false,
|
|
13938
13932
|
name: "",
|
|
@@ -14025,9 +14019,10 @@
|
|
|
14025
14019
|
rules: rules2,
|
|
14026
14020
|
className,
|
|
14027
14021
|
style,
|
|
14028
|
-
errorMessageAlign
|
|
14022
|
+
errorMessageAlign,
|
|
14023
|
+
align
|
|
14029
14024
|
} = {
|
|
14030
|
-
...defaultProps$
|
|
14025
|
+
...defaultProps$W,
|
|
14031
14026
|
...this.props
|
|
14032
14027
|
};
|
|
14033
14028
|
const requiredInRules = rules2 == null ? void 0 : rules2.some((rule) => rule.required);
|
|
@@ -14040,6 +14035,7 @@
|
|
|
14040
14035
|
{
|
|
14041
14036
|
className: `nut-form-item ${className}`,
|
|
14042
14037
|
style,
|
|
14038
|
+
align,
|
|
14043
14039
|
onClick: (e2) => this.props.onClick && this.props.onClick(e2, this.componentRef)
|
|
14044
14040
|
},
|
|
14045
14041
|
label ? /* @__PURE__ */ React.createElement("div", { className: "nut-cell-title nut-form-item-label" }, renderLabel) : null,
|
|
@@ -14093,7 +14089,7 @@
|
|
|
14093
14089
|
return /* @__PURE__ */ React.createElement(React.Fragment, { key: this.state.resetCount }, this.props.noStyle ? returnChildNode : this.renderLayout(returnChildNode));
|
|
14094
14090
|
}
|
|
14095
14091
|
};
|
|
14096
|
-
_FormItem.defaultProps = defaultProps$
|
|
14092
|
+
_FormItem.defaultProps = defaultProps$W;
|
|
14097
14093
|
_FormItem.contextType = Context;
|
|
14098
14094
|
let FormItem = _FormItem;
|
|
14099
14095
|
const InnerForm = Form;
|
|
@@ -14123,7 +14119,7 @@
|
|
|
14123
14119
|
const regExp = allowDot ? /[^-0-9.]/g : /[^-0-9]/g;
|
|
14124
14120
|
return value.replace(regExp, "");
|
|
14125
14121
|
}
|
|
14126
|
-
const defaultProps$
|
|
14122
|
+
const defaultProps$V = {
|
|
14127
14123
|
...ComponentDefaults,
|
|
14128
14124
|
type: "text",
|
|
14129
14125
|
name: "",
|
|
@@ -14169,7 +14165,7 @@
|
|
|
14169
14165
|
onCompositionEnd,
|
|
14170
14166
|
...rest
|
|
14171
14167
|
} = {
|
|
14172
|
-
...defaultProps$
|
|
14168
|
+
...defaultProps$V,
|
|
14173
14169
|
...props
|
|
14174
14170
|
};
|
|
14175
14171
|
const [value, setValue] = usePropsValue({
|
|
@@ -14314,7 +14310,7 @@
|
|
|
14314
14310
|
}
|
|
14315
14311
|
);
|
|
14316
14312
|
Input.displayName = "NutInput";
|
|
14317
|
-
const defaultProps$
|
|
14313
|
+
const defaultProps$U = {
|
|
14318
14314
|
...ComponentDefaults,
|
|
14319
14315
|
disabled: false,
|
|
14320
14316
|
readOnly: false,
|
|
@@ -14350,7 +14346,7 @@
|
|
|
14350
14346
|
onChange,
|
|
14351
14347
|
...restProps
|
|
14352
14348
|
} = {
|
|
14353
|
-
...defaultProps$
|
|
14349
|
+
...defaultProps$U,
|
|
14354
14350
|
...props
|
|
14355
14351
|
};
|
|
14356
14352
|
const classes = classNames(classPrefix$g, className, {
|
|
@@ -14441,6 +14437,17 @@
|
|
|
14441
14437
|
if (text === "-") return null;
|
|
14442
14438
|
return text;
|
|
14443
14439
|
};
|
|
14440
|
+
const clampValue = (valueStr) => {
|
|
14441
|
+
if (valueStr === null) return defaultValue;
|
|
14442
|
+
const val = Number(parseFloat(valueStr || "0").toFixed(digits));
|
|
14443
|
+
return Math.max(Number(min), Math.min(Number(max), val));
|
|
14444
|
+
};
|
|
14445
|
+
const handleValueChange = (valueStr, e2) => {
|
|
14446
|
+
const val = clampValue(valueStr);
|
|
14447
|
+
if (val !== Number(shadowValue)) {
|
|
14448
|
+
onChange == null ? void 0 : onChange(val, e2);
|
|
14449
|
+
}
|
|
14450
|
+
};
|
|
14444
14451
|
const handleInputChange = (e2) => {
|
|
14445
14452
|
setInputValue(e2.target.value);
|
|
14446
14453
|
const valueStr = parseValue(e2.target.value);
|
|
@@ -14451,26 +14458,31 @@
|
|
|
14451
14458
|
setShadowValue(defaultValue);
|
|
14452
14459
|
}
|
|
14453
14460
|
} else {
|
|
14454
|
-
setShadowValue(valueStr);
|
|
14455
|
-
}
|
|
14456
|
-
if (!async) {
|
|
14457
|
-
onChange == null ? void 0 : onChange(parseFloat(valueStr || "0").toFixed(digits), e2);
|
|
14461
|
+
setShadowValue(clampValue(valueStr));
|
|
14458
14462
|
}
|
|
14463
|
+
!async && handleValueChange(valueStr, e2);
|
|
14459
14464
|
};
|
|
14460
14465
|
const handleFocus = (e2) => {
|
|
14461
14466
|
setFocused(true);
|
|
14462
14467
|
setInputValue(
|
|
14463
14468
|
shadowValue !== void 0 && shadowValue !== null ? bound2(Number(shadowValue), Number(min), Number(max)).toString() : ""
|
|
14464
14469
|
);
|
|
14465
|
-
onFocus
|
|
14470
|
+
onFocus == null ? void 0 : onFocus(e2);
|
|
14466
14471
|
};
|
|
14467
14472
|
const handleBlur = (e2) => {
|
|
14468
14473
|
setFocused(false);
|
|
14469
|
-
onBlur
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14474
|
+
onBlur == null ? void 0 : onBlur(e2);
|
|
14475
|
+
const valueStr = parseValue(e2.target.value);
|
|
14476
|
+
if (valueStr === null) {
|
|
14477
|
+
if (allowEmpty) {
|
|
14478
|
+
setShadowValue(null);
|
|
14479
|
+
} else {
|
|
14480
|
+
setShadowValue(defaultValue);
|
|
14481
|
+
}
|
|
14482
|
+
} else {
|
|
14483
|
+
setShadowValue(clampValue(valueStr));
|
|
14473
14484
|
}
|
|
14485
|
+
async && handleValueChange(valueStr, e2);
|
|
14474
14486
|
};
|
|
14475
14487
|
return /* @__PURE__ */ React.createElement("div", { className: classes, style, ...restProps }, /* @__PURE__ */ React.createElement("div", { className: "nut-input-minus", onClick: handleReduce }, /* @__PURE__ */ React.createElement(
|
|
14476
14488
|
e$6,
|
|
@@ -14550,8 +14562,9 @@
|
|
|
14550
14562
|
};
|
|
14551
14563
|
}, [target]);
|
|
14552
14564
|
}
|
|
14553
|
-
const defaultProps$
|
|
14565
|
+
const defaultProps$T = {
|
|
14554
14566
|
...ComponentDefaults,
|
|
14567
|
+
titleIcon: null,
|
|
14555
14568
|
columns: 1,
|
|
14556
14569
|
direction: "down",
|
|
14557
14570
|
icon: null,
|
|
@@ -14581,7 +14594,7 @@
|
|
|
14581
14594
|
parent,
|
|
14582
14595
|
index
|
|
14583
14596
|
} = {
|
|
14584
|
-
...defaultProps$
|
|
14597
|
+
...defaultProps$T,
|
|
14585
14598
|
...props
|
|
14586
14599
|
};
|
|
14587
14600
|
const [showPopup, setShowPopup] = React.useState(show2);
|
|
@@ -14750,7 +14763,7 @@
|
|
|
14750
14763
|
));
|
|
14751
14764
|
});
|
|
14752
14765
|
MenuItem.displayName = "NutMenuItem";
|
|
14753
|
-
const defaultProps$
|
|
14766
|
+
const defaultProps$S = {
|
|
14754
14767
|
...ComponentDefaults,
|
|
14755
14768
|
activeColor: "",
|
|
14756
14769
|
closeOnOverlayClick: true,
|
|
@@ -14777,7 +14790,7 @@
|
|
|
14777
14790
|
onOpen,
|
|
14778
14791
|
...rest
|
|
14779
14792
|
} = {
|
|
14780
|
-
...defaultProps$
|
|
14793
|
+
...defaultProps$S,
|
|
14781
14794
|
...props
|
|
14782
14795
|
};
|
|
14783
14796
|
const menuRef = React.useRef(null);
|
|
@@ -14842,7 +14855,15 @@
|
|
|
14842
14855
|
const menuTitle = () => {
|
|
14843
14856
|
return React.Children.map(children, (child, index) => {
|
|
14844
14857
|
if (React.isValidElement(child)) {
|
|
14845
|
-
const {
|
|
14858
|
+
const {
|
|
14859
|
+
title,
|
|
14860
|
+
titleIcon,
|
|
14861
|
+
options: options2,
|
|
14862
|
+
value,
|
|
14863
|
+
defaultValue,
|
|
14864
|
+
disabled,
|
|
14865
|
+
direction
|
|
14866
|
+
} = child.props;
|
|
14846
14867
|
const selected = options2 == null ? void 0 : options2.filter(
|
|
14847
14868
|
(option) => option.value === (value !== void 0 ? value : defaultValue)
|
|
14848
14869
|
);
|
|
@@ -14853,27 +14874,10 @@
|
|
|
14853
14874
|
return selected[0].text;
|
|
14854
14875
|
return "";
|
|
14855
14876
|
};
|
|
14856
|
-
|
|
14857
|
-
|
|
14858
|
-
|
|
14859
|
-
|
|
14860
|
-
"nut-menu-title ",
|
|
14861
|
-
{
|
|
14862
|
-
active: showMenuItem[index],
|
|
14863
|
-
disabled
|
|
14864
|
-
},
|
|
14865
|
-
className
|
|
14866
|
-
),
|
|
14867
|
-
style: { color: showMenuItem[index] ? activeColor : "" },
|
|
14868
|
-
key: index,
|
|
14869
|
-
onClick: (e2) => {
|
|
14870
|
-
e2.stopPropagation();
|
|
14871
|
-
if ((!options2 || !options2.length) && !child.props.children) return;
|
|
14872
|
-
!disabled && toggleMenuItem(index);
|
|
14873
|
-
}
|
|
14874
|
-
},
|
|
14875
|
-
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
14876
|
-
icon || (direction === "up" ? /* @__PURE__ */ React.createElement(
|
|
14877
|
+
const finallyIcon = () => {
|
|
14878
|
+
if (titleIcon) return titleIcon;
|
|
14879
|
+
if (icon) return icon;
|
|
14880
|
+
return direction === "up" ? /* @__PURE__ */ React.createElement(
|
|
14877
14881
|
l$2,
|
|
14878
14882
|
{
|
|
14879
14883
|
className: "nut-menu-title-icon",
|
|
@@ -14887,7 +14891,25 @@
|
|
|
14887
14891
|
width: "12px",
|
|
14888
14892
|
height: "12px"
|
|
14889
14893
|
}
|
|
14890
|
-
)
|
|
14894
|
+
);
|
|
14895
|
+
};
|
|
14896
|
+
return /* @__PURE__ */ React.createElement(
|
|
14897
|
+
"div",
|
|
14898
|
+
{
|
|
14899
|
+
className: classNames("nut-menu-title", `nut-menu-title-${index}`, {
|
|
14900
|
+
active: showMenuItem[index],
|
|
14901
|
+
disabled
|
|
14902
|
+
}),
|
|
14903
|
+
style: { color: showMenuItem[index] ? activeColor : "" },
|
|
14904
|
+
key: index,
|
|
14905
|
+
onClick: (e2) => {
|
|
14906
|
+
e2.stopPropagation();
|
|
14907
|
+
if ((!options2 || !options2.length) && !child.props.children) return;
|
|
14908
|
+
!disabled && toggleMenuItem(index);
|
|
14909
|
+
}
|
|
14910
|
+
},
|
|
14911
|
+
/* @__PURE__ */ React.createElement("div", { className: "nut-menu-title-text" }, finallyTitle()),
|
|
14912
|
+
finallyIcon()
|
|
14891
14913
|
);
|
|
14892
14914
|
}
|
|
14893
14915
|
return null;
|
|
@@ -14916,6 +14938,16 @@
|
|
|
14916
14938
|
};
|
|
14917
14939
|
Menu.displayName = "NutMenu";
|
|
14918
14940
|
Menu.Item = MenuItem;
|
|
14941
|
+
const defaultProps$R = {
|
|
14942
|
+
...ComponentDefaults,
|
|
14943
|
+
visible: false,
|
|
14944
|
+
rightActions: "",
|
|
14945
|
+
type: "default",
|
|
14946
|
+
custom: [],
|
|
14947
|
+
random: false,
|
|
14948
|
+
onClose: () => {
|
|
14949
|
+
}
|
|
14950
|
+
};
|
|
14919
14951
|
const NumberKeyboard = (props) => {
|
|
14920
14952
|
const { locale } = useConfig();
|
|
14921
14953
|
const {
|
|
@@ -14933,7 +14965,7 @@
|
|
|
14933
14965
|
onClose,
|
|
14934
14966
|
onConfirm,
|
|
14935
14967
|
...rest
|
|
14936
|
-
} = props;
|
|
14968
|
+
} = { ...defaultProps$R, ...props };
|
|
14937
14969
|
const classPrefix2 = "nut-numberkeyboard";
|
|
14938
14970
|
const getBasicKeys = () => {
|
|
14939
14971
|
const keys = new Array(9).fill(0).map((_, index) => {
|
|
@@ -14985,17 +15017,35 @@
|
|
|
14985
15017
|
};
|
|
14986
15018
|
const onTouchEnd = (item2) => {
|
|
14987
15019
|
setActive(false);
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
15020
|
+
switch (item2.type) {
|
|
15021
|
+
case "num":
|
|
15022
|
+
case "custom":
|
|
15023
|
+
onChange == null ? void 0 : onChange(item2.id);
|
|
15024
|
+
break;
|
|
15025
|
+
case "close":
|
|
15026
|
+
onClose == null ? void 0 : onClose();
|
|
15027
|
+
break;
|
|
15028
|
+
case "delete":
|
|
15029
|
+
onDelete == null ? void 0 : onDelete();
|
|
15030
|
+
break;
|
|
15031
|
+
case "confirm":
|
|
15032
|
+
onConfirm == null ? void 0 : onConfirm();
|
|
15033
|
+
break;
|
|
14996
15034
|
}
|
|
14997
|
-
|
|
14998
|
-
|
|
15035
|
+
};
|
|
15036
|
+
const renderContent = (item2) => {
|
|
15037
|
+
switch (item2.type) {
|
|
15038
|
+
case "num":
|
|
15039
|
+
case "custom":
|
|
15040
|
+
return /* @__PURE__ */ React.createElement("div", null, item2.id);
|
|
15041
|
+
case "delete":
|
|
15042
|
+
return /* @__PURE__ */ React.createElement(DeleteIcon, null);
|
|
15043
|
+
case "close":
|
|
15044
|
+
return /* @__PURE__ */ React.createElement(l$3, { width: 18, height: 18 });
|
|
15045
|
+
case "confirm":
|
|
15046
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done);
|
|
15047
|
+
default:
|
|
15048
|
+
return null;
|
|
14999
15049
|
}
|
|
15000
15050
|
};
|
|
15001
15051
|
return /* @__PURE__ */ React.createElement("div", { key: item.id, className: `${classPrefix2}-body-wrapper` }, /* @__PURE__ */ React.createElement(
|
|
@@ -15012,22 +15062,19 @@
|
|
|
15012
15062
|
onTouchEnd: () => onTouchEnd(item),
|
|
15013
15063
|
onTouchCancel: () => onTouchEnd(item)
|
|
15014
15064
|
},
|
|
15015
|
-
(item
|
|
15016
|
-
item.type === "delete" && /* @__PURE__ */ React.createElement(DeleteIcon, null),
|
|
15017
|
-
item.type === "close" && /* @__PURE__ */ React.createElement(l$3, { width: 18, height: 18 }),
|
|
15018
|
-
item.type === "confirm" && /* @__PURE__ */ React.createElement(React.Fragment, null, confirmText || locale.done)
|
|
15065
|
+
renderContent(item)
|
|
15019
15066
|
));
|
|
15020
15067
|
};
|
|
15021
15068
|
return /* @__PURE__ */ React.createElement(
|
|
15022
15069
|
Popup,
|
|
15023
15070
|
{
|
|
15071
|
+
...rest,
|
|
15024
15072
|
visible,
|
|
15025
15073
|
position: "bottom",
|
|
15026
15074
|
onOverlayClick: onClose,
|
|
15027
15075
|
onCloseIconClick: onClose,
|
|
15028
15076
|
zIndex: 9999,
|
|
15029
|
-
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15030
|
-
...rest
|
|
15077
|
+
overlayStyle: { backgroundColor: "rgba(0, 0, 0, 0)" }
|
|
15031
15078
|
},
|
|
15032
15079
|
/* @__PURE__ */ React.createElement("div", { className: classNames(classPrefix2, className), style }, title && /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header` }, /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-header-title` }, title), type === "default" && /* @__PURE__ */ React.createElement(
|
|
15033
15080
|
"span",
|
|
@@ -15140,7 +15187,6 @@
|
|
|
15140
15187
|
);
|
|
15141
15188
|
}
|
|
15142
15189
|
);
|
|
15143
|
-
RadioGroup.defaultProps = defaultProps$Q;
|
|
15144
15190
|
RadioGroup.displayName = "NutRadioGroup";
|
|
15145
15191
|
const defaultProps$P = {
|
|
15146
15192
|
...ComponentDefaults,
|
|
@@ -15268,7 +15314,6 @@
|
|
|
15268
15314
|
renderRadioItem()
|
|
15269
15315
|
);
|
|
15270
15316
|
};
|
|
15271
|
-
Radio.defaultProps = defaultProps$P;
|
|
15272
15317
|
Radio.displayName = "NutRadio";
|
|
15273
15318
|
Radio.Group = RadioGroup;
|
|
15274
15319
|
const defaultProps$O = {
|
|
@@ -16647,6 +16692,7 @@
|
|
|
16647
16692
|
};
|
|
16648
16693
|
const InternalUploader = (props, ref) => {
|
|
16649
16694
|
const { locale } = useConfig();
|
|
16695
|
+
const fileListRef = React.useRef([]);
|
|
16650
16696
|
const {
|
|
16651
16697
|
children,
|
|
16652
16698
|
uploadIcon,
|
|
@@ -16699,6 +16745,9 @@
|
|
|
16699
16745
|
});
|
|
16700
16746
|
const [uploadQueue, setUploadQueue] = React.useState([]);
|
|
16701
16747
|
const classes = classNames(className, "nut-uploader");
|
|
16748
|
+
React.useEffect(() => {
|
|
16749
|
+
fileListRef.current = fileList;
|
|
16750
|
+
}, [fileList]);
|
|
16702
16751
|
React.useImperativeHandle(ref, () => ({
|
|
16703
16752
|
submit: () => {
|
|
16704
16753
|
Promise.all(uploadQueue).then((res) => {
|
|
@@ -16743,7 +16792,7 @@
|
|
|
16743
16792
|
uploadOption.onStart = (option) => {
|
|
16744
16793
|
clearUploadQueue(index);
|
|
16745
16794
|
setFileList(
|
|
16746
|
-
|
|
16795
|
+
fileListRef.current.map((item) => {
|
|
16747
16796
|
if (item.uid === fileItem.uid) {
|
|
16748
16797
|
item.status = "ready";
|
|
16749
16798
|
item.message = locale.uploader.readyUpload;
|
|
@@ -16751,23 +16800,23 @@
|
|
|
16751
16800
|
return item;
|
|
16752
16801
|
})
|
|
16753
16802
|
);
|
|
16754
|
-
onStart
|
|
16803
|
+
onStart == null ? void 0 : onStart(option);
|
|
16755
16804
|
};
|
|
16756
16805
|
uploadOption.onProgress = (e2, option) => {
|
|
16757
16806
|
setFileList(
|
|
16758
|
-
|
|
16807
|
+
fileListRef.current.map((item) => {
|
|
16759
16808
|
if (item.uid === fileItem.uid) {
|
|
16760
16809
|
item.status = UPLOADING;
|
|
16761
16810
|
item.message = locale.uploader.uploading;
|
|
16762
16811
|
item.percentage = (e2.loaded / e2.total * 100).toFixed(0);
|
|
16763
|
-
onProgress
|
|
16812
|
+
onProgress == null ? void 0 : onProgress({ e: e2, option, percentage: item.percentage });
|
|
16764
16813
|
}
|
|
16765
16814
|
return item;
|
|
16766
16815
|
})
|
|
16767
16816
|
);
|
|
16768
16817
|
};
|
|
16769
16818
|
uploadOption.onSuccess = (responseText, option) => {
|
|
16770
|
-
const list =
|
|
16819
|
+
const list = fileListRef.current.map((item) => {
|
|
16771
16820
|
if (item.uid === fileItem.uid) {
|
|
16772
16821
|
item.status = SUCCESS;
|
|
16773
16822
|
item.message = locale.uploader.success;
|
|
@@ -16784,7 +16833,7 @@
|
|
|
16784
16833
|
});
|
|
16785
16834
|
};
|
|
16786
16835
|
uploadOption.onFailure = (responseText, option) => {
|
|
16787
|
-
const list =
|
|
16836
|
+
const list = fileListRef.current.map((item) => {
|
|
16788
16837
|
if (item.uid === fileItem.uid) {
|
|
16789
16838
|
item.status = ERROR;
|
|
16790
16839
|
item.message = locale.uploader.error;
|
|
@@ -16846,9 +16895,7 @@
|
|
|
16846
16895
|
}
|
|
16847
16896
|
return true;
|
|
16848
16897
|
});
|
|
16849
|
-
|
|
16850
|
-
onOversize && onOversize(files);
|
|
16851
|
-
}
|
|
16898
|
+
oversizes.length && (onOversize == null ? void 0 : onOversize(files));
|
|
16852
16899
|
if (filterFile.length > maximum) {
|
|
16853
16900
|
filterFile.splice(maximum, filterFile.length - maximum);
|
|
16854
16901
|
}
|
|
@@ -16887,7 +16934,6 @@
|
|
|
16887
16934
|
const _files = filterFiles(new Array().slice.call(files));
|
|
16888
16935
|
readFile(_files);
|
|
16889
16936
|
}
|
|
16890
|
-
setFileList(fileList);
|
|
16891
16937
|
if (clearInput) {
|
|
16892
16938
|
clearInputValue($el);
|
|
16893
16939
|
}
|
|
@@ -17212,18 +17258,6 @@
|
|
|
17212
17258
|
);
|
|
17213
17259
|
};
|
|
17214
17260
|
Content.displayName = "NutContent";
|
|
17215
|
-
const defaultDialogProps = {
|
|
17216
|
-
...ComponentDefaults,
|
|
17217
|
-
overlay: true,
|
|
17218
|
-
overlayStyle: {},
|
|
17219
|
-
overlayClassName: "",
|
|
17220
|
-
onCancel: () => {
|
|
17221
|
-
},
|
|
17222
|
-
onClose: () => {
|
|
17223
|
-
},
|
|
17224
|
-
onOverlayClick: (e2) => true,
|
|
17225
|
-
...defaultOverlayProps
|
|
17226
|
-
};
|
|
17227
17261
|
const DialogWrap = (props) => {
|
|
17228
17262
|
const {
|
|
17229
17263
|
visible,
|
|
@@ -17265,7 +17299,6 @@
|
|
|
17265
17299
|
/* @__PURE__ */ React.createElement(Content, { ...props, visible })
|
|
17266
17300
|
));
|
|
17267
17301
|
};
|
|
17268
|
-
DialogWrap.defaultProps = defaultDialogProps;
|
|
17269
17302
|
DialogWrap.displayName = "NutDialogWrap";
|
|
17270
17303
|
const defaultProps$E = {
|
|
17271
17304
|
...ComponentDefaults,
|
|
@@ -18798,7 +18831,6 @@
|
|
|
18798
18831
|
/* @__PURE__ */ React.createElement("div", null, renderStatusText())
|
|
18799
18832
|
)), /* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-content` }, props.children));
|
|
18800
18833
|
};
|
|
18801
|
-
PullToRefresh.defaultProps = defaultProps$x;
|
|
18802
18834
|
PullToRefresh.displayName = "NutPullToRefresh";
|
|
18803
18835
|
const AvatarContext = React.createContext({});
|
|
18804
18836
|
const defaultProps$w = {
|
|
@@ -19182,7 +19214,6 @@
|
|
|
19182
19214
|
/* @__PURE__ */ React.createElement("div", { className: `${classPrefix2}-wrapper`, style: wrapperStyle }, renderActionContent("left", leftRef), children, renderActionContent("right", rightRef))
|
|
19183
19215
|
);
|
|
19184
19216
|
});
|
|
19185
|
-
Swipe.defaultProps = defaultProps$t;
|
|
19186
19217
|
Swipe.displayName = "NutSwipe";
|
|
19187
19218
|
const classPrefix$8 = "nut-toast";
|
|
19188
19219
|
class Notification extends React__namespace.PureComponent {
|
|
@@ -19582,16 +19613,16 @@
|
|
|
19582
19613
|
percent: 0,
|
|
19583
19614
|
duration: "00:00:00",
|
|
19584
19615
|
second: 0,
|
|
19585
|
-
hanMuted:
|
|
19586
|
-
playing:
|
|
19616
|
+
hanMuted: muted,
|
|
19617
|
+
playing: autoPlay,
|
|
19587
19618
|
handPlaying: false
|
|
19588
19619
|
});
|
|
19589
19620
|
const classPrefix2 = "nut-audio";
|
|
19590
19621
|
const handleEnded = (e2) => {
|
|
19591
|
-
if (
|
|
19622
|
+
if (loop2) {
|
|
19592
19623
|
console.warn(locale.audio.tips || "onPlayEnd事件在loop=false时才会触发");
|
|
19593
19624
|
} else {
|
|
19594
|
-
|
|
19625
|
+
onEnd == null ? void 0 : onEnd(e2);
|
|
19595
19626
|
}
|
|
19596
19627
|
};
|
|
19597
19628
|
function watch() {
|
|
@@ -19632,25 +19663,25 @@
|
|
|
19632
19663
|
if (statusRef.current.currentTime > 0 && AudioRef.current) {
|
|
19633
19664
|
statusRef.current.currentTime--;
|
|
19634
19665
|
AudioRef.current.currentTime = statusRef.current.currentTime;
|
|
19635
|
-
|
|
19666
|
+
onBack == null ? void 0 : onBack(AudioRef.current);
|
|
19636
19667
|
}
|
|
19637
19668
|
};
|
|
19638
19669
|
const handleForward = () => {
|
|
19639
19670
|
if (AudioRef.current) {
|
|
19640
19671
|
statusRef.current.currentTime++;
|
|
19641
19672
|
AudioRef.current.currentTime = statusRef.current.currentTime;
|
|
19642
|
-
|
|
19673
|
+
onForward == null ? void 0 : onForward(AudioRef.current);
|
|
19643
19674
|
}
|
|
19644
19675
|
};
|
|
19645
19676
|
const handleMute = () => {
|
|
19646
19677
|
if (AudioRef.current) {
|
|
19647
19678
|
AudioRef.current.muted = !AudioRef.current.muted;
|
|
19648
|
-
|
|
19679
|
+
onMute == null ? void 0 : onMute(AudioRef.current);
|
|
19649
19680
|
}
|
|
19650
19681
|
};
|
|
19651
19682
|
const handlePause = (e2) => {
|
|
19652
19683
|
setPlaying(false);
|
|
19653
|
-
|
|
19684
|
+
onPause == null ? void 0 : onPause(e2);
|
|
19654
19685
|
};
|
|
19655
19686
|
const formatSeconds = (value) => {
|
|
19656
19687
|
if (!value) {
|
|
@@ -19739,12 +19770,12 @@
|
|
|
19739
19770
|
};
|
|
19740
19771
|
const handleCanplay = (e2) => {
|
|
19741
19772
|
setIsCanPlay(true);
|
|
19742
|
-
if (
|
|
19773
|
+
if (autoPlay && !playing) {
|
|
19743
19774
|
AudioRef && AudioRef.current && AudioRef.current.play();
|
|
19744
19775
|
}
|
|
19745
19776
|
if (AudioRef.current) {
|
|
19746
19777
|
statusRef.current.second = AudioRef.current.duration || 0;
|
|
19747
|
-
|
|
19778
|
+
onCanPlay == null ? void 0 : onCanPlay(e2);
|
|
19748
19779
|
}
|
|
19749
19780
|
};
|
|
19750
19781
|
const onTimeupdate = (e2) => {
|
|
@@ -19773,7 +19804,6 @@
|
|
|
19773
19804
|
/* @__PURE__ */ React.createElement("track", { kind: "captions" })
|
|
19774
19805
|
));
|
|
19775
19806
|
};
|
|
19776
|
-
Audio.defaultProps = defaultProps$p;
|
|
19777
19807
|
Audio.displayName = "NutAudio";
|
|
19778
19808
|
const defaultProps$o = {
|
|
19779
19809
|
...ComponentDefaults,
|
|
@@ -20969,7 +20999,6 @@
|
|
|
20969
20999
|
);
|
|
20970
21000
|
}
|
|
20971
21001
|
);
|
|
20972
|
-
Swiper.defaultProps = defaultProps$h;
|
|
20973
21002
|
Swiper.displayName = "NutSwiper";
|
|
20974
21003
|
const defaultProps$g = {
|
|
20975
21004
|
onClick: (e2) => void 0
|
|
@@ -20980,7 +21009,6 @@
|
|
|
20980
21009
|
const classes = classNames(classPrefix2, className);
|
|
20981
21010
|
return /* @__PURE__ */ React.createElement("div", { className: classes, onClick: props.onClick, style }, children);
|
|
20982
21011
|
};
|
|
20983
|
-
SwiperItem.defaultProps = defaultProps$g;
|
|
20984
21012
|
SwiperItem.displayName = "NutSwiperItem";
|
|
20985
21013
|
const InnerSwiper = Swiper;
|
|
20986
21014
|
InnerSwiper.Item = SwiperItem;
|
|
@@ -21676,10 +21704,6 @@
|
|
|
21676
21704
|
});
|
|
21677
21705
|
};
|
|
21678
21706
|
const renderBodyTds = (item, rowIndex) => {
|
|
21679
|
-
const { rowRender } = item;
|
|
21680
|
-
if (rowRender && typeof rowRender === "function") {
|
|
21681
|
-
return rowRender(item, rowIndex);
|
|
21682
|
-
}
|
|
21683
21707
|
return sortDataItem().map(([value, render2]) => {
|
|
21684
21708
|
return /* @__PURE__ */ React.createElement(
|
|
21685
21709
|
"div",
|
|
@@ -21698,7 +21722,12 @@
|
|
|
21698
21722
|
};
|
|
21699
21723
|
const renderBodyTrs = () => {
|
|
21700
21724
|
return innerValue.map((item, index) => {
|
|
21701
|
-
|
|
21725
|
+
const inner = renderBodyTds(item, index);
|
|
21726
|
+
const { rowRender } = item;
|
|
21727
|
+
if (rowRender && typeof rowRender === "function") {
|
|
21728
|
+
return rowRender(item, index, { inner });
|
|
21729
|
+
}
|
|
21730
|
+
return /* @__PURE__ */ React.createElement("div", { className: bodyClassPrefix, key: index }, inner);
|
|
21702
21731
|
});
|
|
21703
21732
|
};
|
|
21704
21733
|
return /* @__PURE__ */ React.createElement("div", { className: cls, ...rest }, /* @__PURE__ */ React.createElement(
|
|
@@ -22722,6 +22751,8 @@
|
|
|
22722
22751
|
gapY: 48,
|
|
22723
22752
|
width: 120,
|
|
22724
22753
|
height: 64,
|
|
22754
|
+
startX: 0,
|
|
22755
|
+
startY: 0,
|
|
22725
22756
|
image: "",
|
|
22726
22757
|
imageWidth: 120,
|
|
22727
22758
|
imageHeight: 64,
|
|
@@ -22740,6 +22771,8 @@
|
|
|
22740
22771
|
className,
|
|
22741
22772
|
gapX,
|
|
22742
22773
|
gapY,
|
|
22774
|
+
startX,
|
|
22775
|
+
startY,
|
|
22743
22776
|
width,
|
|
22744
22777
|
height,
|
|
22745
22778
|
image,
|
|
@@ -22802,7 +22835,7 @@
|
|
|
22802
22835
|
const markSize = Number(fontSize) * ratio;
|
|
22803
22836
|
ctx2.font = `${fontStyle} normal ${fontWeight} ${markSize}px/${markHeight}px ${fontFamily}`;
|
|
22804
22837
|
ctx2.fillStyle = color;
|
|
22805
|
-
ctx2.fillText(content,
|
|
22838
|
+
ctx2.fillText(content, startX, startY);
|
|
22806
22839
|
ctx2.restore();
|
|
22807
22840
|
setBase64Url(canvas.toDataURL());
|
|
22808
22841
|
}
|