@nutui/nutui-react 1.3.7 → 1.3.9-beta.0
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 +26 -0
- package/dist/esm/Avatar.js +4 -5
- package/dist/esm/Button.js +1 -2
- package/dist/esm/Card/style/index.js +2 -2
- package/dist/esm/Cascader.js +2 -2
- package/dist/esm/Cell.js +5 -2
- package/dist/esm/CellGroup.js +5 -5
- package/dist/esm/Collapse.js +7 -3
- package/dist/esm/DatePicker.js +3 -3
- package/dist/esm/GridItem.js +9 -3
- package/dist/esm/Input.js +39 -23
- package/dist/esm/InputNumber.js +15 -1
- package/dist/esm/NoticeBar.js +6 -0
- package/dist/esm/Radio.js +2 -2
- package/dist/esm/Range.js +7 -1
- package/dist/esm/SideNavBar.js +3 -3
- package/dist/esm/SideNavBarItem.js +3 -3
- package/dist/esm/Signature.js +14 -8
- package/dist/esm/Step.js +3 -5
- package/dist/esm/Steps.js +2 -1
- package/dist/esm/SubSideNavBar.js +3 -3
- package/dist/esm/Switch.js +2 -2
- package/dist/esm/TabPane.js +2 -2
- package/dist/esm/Tabbar.js +5 -2
- package/dist/esm/Tabs.js +2 -2
- package/dist/esm/TimeSelect.js +20 -5
- package/dist/esm/Uploader.js +1 -1
- package/dist/esm/Video.js +7 -1
- package/dist/esm/VirtualList.js +11 -6
- package/dist/esm/date-710f8c7c.js +18 -9
- package/dist/esm/{tabpane-c957ab14.js → tabpane-9b8ca8a8.js} +3 -2
- package/dist/esm/{tabs-0896a61b.js → tabs-ee05fd2f.js} +8 -4
- package/dist/esm/types/src/packages/avatar/avatar.d.ts +1 -0
- package/dist/esm/types/src/packages/cell/cell.d.ts +1 -0
- package/dist/esm/types/src/packages/cellgroup/cellgroup.d.ts +1 -1
- package/dist/esm/types/src/packages/collapse/collapse.d.ts +3 -1
- package/dist/esm/types/src/packages/datepicker/datepicker.d.ts +2 -2
- package/dist/esm/types/src/packages/input/input.d.ts +10 -2
- package/dist/esm/types/src/packages/inputnumber/inputnumber.d.ts +6 -0
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +3 -1
- package/dist/esm/types/src/packages/range/range.d.ts +4 -1
- package/dist/esm/types/src/packages/sidenavbar/sidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/sidenavbaritem/sidenavbaritem.d.ts +1 -1
- package/dist/esm/types/src/packages/signature/signature.d.ts +2 -0
- package/dist/esm/types/src/packages/steps/steps.d.ts +1 -0
- package/dist/esm/types/src/packages/subsidenavbar/subsidenavbar.d.ts +1 -1
- package/dist/esm/types/src/packages/switch/switch.d.ts +1 -1
- package/dist/esm/types/src/packages/tabbar/tabbar.d.ts +1 -0
- package/dist/esm/types/src/packages/tabpane/tabpane.d.ts +6 -2
- package/dist/esm/types/src/packages/tabs/tabs.d.ts +1 -0
- package/dist/esm/types/src/packages/timeselect/timeselect.d.ts +5 -1
- package/dist/esm/types/src/packages/video/video.d.ts +3 -0
- package/dist/esm/types/src/packages/virtuallist/type.d.ts +3 -1
- package/dist/esm/types/src/packages/virtuallist/virtuallist.d.ts +2 -2
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/nutui.react.es.js +180 -79
- package/dist/nutui.react.umd.js +180 -79
- package/dist/packages/actionsheet/actionsheet.scss +17 -0
- package/dist/packages/address/address.scss +42 -0
- package/dist/packages/badge/badge.scss +8 -0
- package/dist/packages/calendar/calendar.scss +27 -0
- package/dist/packages/card/card.scss +8 -0
- package/dist/packages/cascader/cascader.scss +16 -0
- package/dist/packages/cell/cell.scss +7 -0
- package/dist/packages/checkbox/checkbox.scss +11 -0
- package/dist/packages/circleprogress/circleprogress.scss +6 -0
- package/dist/packages/collapseitem/collapseitem.scss +21 -0
- package/dist/packages/divider/divider.scss +2 -1
- package/dist/packages/elevator/elevator.scss +17 -1
- package/dist/packages/empty/empty.scss +6 -0
- package/dist/packages/infiniteloading/infiniteloading.scss +18 -0
- package/dist/packages/inputnumber/inputnumber.scss +22 -0
- package/dist/packages/navbar/navbar.scss +9 -0
- package/dist/packages/noticebar/noticebar.scss +4 -1
- package/dist/packages/numberkeyboard/numberkeyboard.scss +10 -0
- package/dist/packages/pagination/pagination.scss +21 -1
- package/dist/packages/picker/picker.scss +39 -0
- package/dist/packages/popup/popup.scss +11 -0
- package/dist/packages/radio/radio.scss +18 -0
- package/dist/packages/shortpassword/shortpassword.scss +62 -0
- package/dist/packages/sidenavbaritem/sidenavbaritem.scss +9 -0
- package/dist/packages/subsidenavbar/subsidenavbar.scss +12 -0
- package/dist/packages/tabbar/tabbar.scss +5 -0
- package/dist/packages/tabbaritem/tabbaritem.scss +7 -0
- package/dist/packages/table/table.scss +38 -0
- package/dist/packages/tabpane/tabpane.scss +5 -0
- package/dist/packages/tabs/tabs.scss +31 -2
- package/dist/packages/timedetail/timedetail.scss +16 -0
- package/dist/packages/timepannel/timepannel.scss +10 -0
- package/dist/packages/timeselect/timeselect.scss +18 -0
- package/dist/packages/uploader/uploader.scss +9 -1
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/variables.scss +110 -101
- package/dist/types/index.d.ts +57 -17
- package/package.json +10 -1
package/dist/nutui.react.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.3.
|
|
2
|
+
* @nutui/nutui-react v1.3.9-beta.0 Wed Nov 02 2022 15:15:31 GMT+0800 (China Standard Time)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -214,8 +214,7 @@ const Button = (props) => {
|
|
|
214
214
|
...rest,
|
|
215
215
|
onClick: (e2) => handleClick2(e2)
|
|
216
216
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
217
|
-
className: "nut-button__warp"
|
|
218
|
-
style: getStyle()
|
|
217
|
+
className: "nut-button__warp"
|
|
219
218
|
}, loading && /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
220
219
|
classPrefix: iconClassPrefix,
|
|
221
220
|
fontClassName: iconFontClassName,
|
|
@@ -1469,12 +1468,15 @@ const defaultProps$1j = {
|
|
|
1469
1468
|
iconSlot: null,
|
|
1470
1469
|
linkSlot: null,
|
|
1471
1470
|
click: (event) => {
|
|
1471
|
+
},
|
|
1472
|
+
onClick: (event) => {
|
|
1472
1473
|
}
|
|
1473
1474
|
};
|
|
1474
1475
|
const Cell = (props) => {
|
|
1475
1476
|
const {
|
|
1476
1477
|
children,
|
|
1477
1478
|
click,
|
|
1479
|
+
onClick,
|
|
1478
1480
|
title,
|
|
1479
1481
|
subTitle,
|
|
1480
1482
|
desc,
|
|
@@ -1501,6 +1503,7 @@ const Cell = (props) => {
|
|
|
1501
1503
|
const history = useHistory();
|
|
1502
1504
|
const handleClick2 = (event) => {
|
|
1503
1505
|
click(event);
|
|
1506
|
+
onClick(event);
|
|
1504
1507
|
if (to2 && history) {
|
|
1505
1508
|
history[replace ? "replace" : "push"](to2);
|
|
1506
1509
|
} else if (url) {
|
|
@@ -1552,21 +1555,21 @@ Cell.displayName = "NutCell";
|
|
|
1552
1555
|
const defaultProps$1i = {
|
|
1553
1556
|
title: "",
|
|
1554
1557
|
desc: "",
|
|
1558
|
+
className: "",
|
|
1555
1559
|
titleSlot: null,
|
|
1556
|
-
descSlot: null
|
|
1557
|
-
classPrefix: "nutui-cell-group"
|
|
1560
|
+
descSlot: null
|
|
1558
1561
|
};
|
|
1559
1562
|
const CellGroup = (props) => {
|
|
1560
|
-
const { children,
|
|
1563
|
+
const { children, className, title, desc, titleSlot, descSlot } = {
|
|
1561
1564
|
...defaultProps$1i,
|
|
1562
1565
|
...props
|
|
1563
1566
|
};
|
|
1564
1567
|
const b2 = cn("cell-group");
|
|
1565
1568
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
1566
|
-
className: b2(null, [
|
|
1569
|
+
className: b2(null, [className])
|
|
1567
1570
|
}, titleSlot || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, title ? /* @__PURE__ */ React__default.createElement("div", {
|
|
1568
1571
|
className: b2("title")
|
|
1569
|
-
}, title) : null), descSlot || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null,
|
|
1572
|
+
}, title) : null), descSlot || /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, desc ? /* @__PURE__ */ React__default.createElement("div", {
|
|
1570
1573
|
className: b2("desc")
|
|
1571
1574
|
}, desc) : null), /* @__PURE__ */ React__default.createElement("div", {
|
|
1572
1575
|
className: b2("wrap")
|
|
@@ -2699,6 +2702,7 @@ const GridItem = (props) => {
|
|
|
2699
2702
|
direction,
|
|
2700
2703
|
iconClassPrefix,
|
|
2701
2704
|
iconFontClassName,
|
|
2705
|
+
onClick,
|
|
2702
2706
|
...rest
|
|
2703
2707
|
} = {
|
|
2704
2708
|
...defaultProps$1a,
|
|
@@ -2729,10 +2733,14 @@ const GridItem = (props) => {
|
|
|
2729
2733
|
const isIconName = () => {
|
|
2730
2734
|
return typeof icon === "string";
|
|
2731
2735
|
};
|
|
2736
|
+
const handleClick2 = (e2) => {
|
|
2737
|
+
onClick && onClick(e2);
|
|
2738
|
+
};
|
|
2732
2739
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2733
2740
|
className: b2(),
|
|
2734
2741
|
style: rootStyle(),
|
|
2735
|
-
...rest
|
|
2742
|
+
...rest,
|
|
2743
|
+
onClick: handleClick2
|
|
2736
2744
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
2737
2745
|
className: contentClass()
|
|
2738
2746
|
}, icon && isIconName() ? /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
@@ -3163,6 +3171,8 @@ const defaultProps$17 = {
|
|
|
3163
3171
|
className: "",
|
|
3164
3172
|
style: {},
|
|
3165
3173
|
tabSwitch: () => {
|
|
3174
|
+
},
|
|
3175
|
+
onSwitch: () => {
|
|
3166
3176
|
}
|
|
3167
3177
|
};
|
|
3168
3178
|
const Tabbar = (props) => {
|
|
@@ -3176,7 +3186,8 @@ const Tabbar = (props) => {
|
|
|
3176
3186
|
safeAreaInsetBottom,
|
|
3177
3187
|
className,
|
|
3178
3188
|
style,
|
|
3179
|
-
tabSwitch
|
|
3189
|
+
tabSwitch,
|
|
3190
|
+
onSwitch
|
|
3180
3191
|
} = {
|
|
3181
3192
|
...defaultProps$17,
|
|
3182
3193
|
...props
|
|
@@ -3208,6 +3219,7 @@ const Tabbar = (props) => {
|
|
|
3208
3219
|
handleClick: () => {
|
|
3209
3220
|
handleClick2(idx);
|
|
3210
3221
|
tabSwitch(child, idx);
|
|
3222
|
+
onSwitch(child, idx);
|
|
3211
3223
|
}
|
|
3212
3224
|
};
|
|
3213
3225
|
return React__default.cloneElement(child, childProps);
|
|
@@ -8648,6 +8660,7 @@ class Title {
|
|
|
8648
8660
|
}
|
|
8649
8661
|
const defaultProps$13 = {
|
|
8650
8662
|
...ComponentDefaults,
|
|
8663
|
+
tabStyle: {},
|
|
8651
8664
|
value: 0,
|
|
8652
8665
|
color: "",
|
|
8653
8666
|
background: "",
|
|
@@ -8667,6 +8680,7 @@ const Tabs = (props) => {
|
|
|
8667
8680
|
const {
|
|
8668
8681
|
value,
|
|
8669
8682
|
color,
|
|
8683
|
+
tabStyle,
|
|
8670
8684
|
background,
|
|
8671
8685
|
direction,
|
|
8672
8686
|
type,
|
|
@@ -8748,7 +8762,7 @@ const Tabs = (props) => {
|
|
|
8748
8762
|
...rest
|
|
8749
8763
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8750
8764
|
className: classesTitle,
|
|
8751
|
-
style: { background }
|
|
8765
|
+
style: { ...tabStyle, background }
|
|
8752
8766
|
}, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item, index2) => {
|
|
8753
8767
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
8754
8768
|
style: titleStyle,
|
|
@@ -8781,6 +8795,8 @@ const Tabs = (props) => {
|
|
|
8781
8795
|
)
|
|
8782
8796
|
}, item.title));
|
|
8783
8797
|
})), /* @__PURE__ */ React__default.createElement("div", {
|
|
8798
|
+
className: `${b2("")}__content__wrap`
|
|
8799
|
+
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8784
8800
|
className: `${b2("")}__content`,
|
|
8785
8801
|
style: contentStyle
|
|
8786
8802
|
}, React__default.Children.map(children, (child, idx) => {
|
|
@@ -8799,7 +8815,7 @@ const Tabs = (props) => {
|
|
|
8799
8815
|
};
|
|
8800
8816
|
}
|
|
8801
8817
|
return React__default.cloneElement(child, childProps);
|
|
8802
|
-
})));
|
|
8818
|
+
}))));
|
|
8803
8819
|
};
|
|
8804
8820
|
Tabs.defaultProps = defaultProps$13;
|
|
8805
8821
|
Tabs.displayName = "NutTabs";
|
|
@@ -8810,7 +8826,7 @@ const defaultProps$12 = {
|
|
|
8810
8826
|
disabled: false
|
|
8811
8827
|
};
|
|
8812
8828
|
const TabPane = (props) => {
|
|
8813
|
-
const { children, paneKey, activeKey, autoHeightClassName } = {
|
|
8829
|
+
const { children, paneKey, activeKey, autoHeightClassName, className } = {
|
|
8814
8830
|
...defaultProps$12,
|
|
8815
8831
|
...props
|
|
8816
8832
|
};
|
|
@@ -8820,7 +8836,8 @@ const TabPane = (props) => {
|
|
|
8820
8836
|
active: paneKey === activeKey
|
|
8821
8837
|
},
|
|
8822
8838
|
b2(""),
|
|
8823
|
-
autoHeightClassName
|
|
8839
|
+
autoHeightClassName,
|
|
8840
|
+
className
|
|
8824
8841
|
);
|
|
8825
8842
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
8826
8843
|
className: classes
|
|
@@ -8911,7 +8928,7 @@ const SideNavBar = (props) => {
|
|
|
8911
8928
|
children,
|
|
8912
8929
|
className,
|
|
8913
8930
|
showhead,
|
|
8914
|
-
|
|
8931
|
+
onClose,
|
|
8915
8932
|
...rest
|
|
8916
8933
|
} = {
|
|
8917
8934
|
...defaultProps$10,
|
|
@@ -8922,7 +8939,7 @@ const SideNavBar = (props) => {
|
|
|
8922
8939
|
visible,
|
|
8923
8940
|
style: { width, height: "100%" },
|
|
8924
8941
|
position,
|
|
8925
|
-
onClose
|
|
8942
|
+
onClose
|
|
8926
8943
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
8927
8944
|
className: className ? `${className} nut-sidenavbar` : "nut-sidenavbar",
|
|
8928
8945
|
...rest
|
|
@@ -8948,7 +8965,7 @@ const defaultProps$$ = {
|
|
|
8948
8965
|
open: true
|
|
8949
8966
|
};
|
|
8950
8967
|
const SubSideNavBar = (props) => {
|
|
8951
|
-
const { title, ikey, children,
|
|
8968
|
+
const { title, ikey, children, onClick, open, ...rest } = {
|
|
8952
8969
|
...defaultProps$$,
|
|
8953
8970
|
...props
|
|
8954
8971
|
};
|
|
@@ -8985,7 +9002,7 @@ const SubSideNavBar = (props) => {
|
|
|
8985
9002
|
handleClick(e2);
|
|
8986
9003
|
const currentClass = e2.currentTarget.className;
|
|
8987
9004
|
const isShow = currentClass.includes("nutShow");
|
|
8988
|
-
|
|
9005
|
+
onClick && onClick({ title, ikey, isShow });
|
|
8989
9006
|
};
|
|
8990
9007
|
useEffect(() => {
|
|
8991
9008
|
var _a, _b;
|
|
@@ -9009,10 +9026,10 @@ const SubSideNavBar = (props) => {
|
|
|
9009
9026
|
}, children));
|
|
9010
9027
|
};
|
|
9011
9028
|
const SideNavBarItem = (props) => {
|
|
9012
|
-
const { title, ikey, children,
|
|
9029
|
+
const { title, ikey, children, onClick, ...rest } = props;
|
|
9013
9030
|
const clickFn = (e2) => {
|
|
9014
9031
|
e2.stopPropagation();
|
|
9015
|
-
|
|
9032
|
+
onClick && onClick({ title, ikey });
|
|
9016
9033
|
};
|
|
9017
9034
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
9018
9035
|
className: "nut-subsidenavbar__item border-bt",
|
|
@@ -9628,7 +9645,10 @@ const Range = (props) => {
|
|
|
9628
9645
|
marks,
|
|
9629
9646
|
change,
|
|
9630
9647
|
dragStart,
|
|
9631
|
-
dragEnd
|
|
9648
|
+
dragEnd,
|
|
9649
|
+
onChange,
|
|
9650
|
+
onDragStart,
|
|
9651
|
+
onDragEnd
|
|
9632
9652
|
} = { ...defaultProps$Y, ...props };
|
|
9633
9653
|
let { min, max, step } = { ...defaultProps$Y, ...props };
|
|
9634
9654
|
min = Number(min);
|
|
@@ -9792,6 +9812,7 @@ const Range = (props) => {
|
|
|
9792
9812
|
}
|
|
9793
9813
|
if ((marks || end) && !isSameValue(value, startValue)) {
|
|
9794
9814
|
change && change(value);
|
|
9815
|
+
onChange && onChange(value);
|
|
9795
9816
|
}
|
|
9796
9817
|
};
|
|
9797
9818
|
const click = (event) => {
|
|
@@ -9839,6 +9860,7 @@ const Range = (props) => {
|
|
|
9839
9860
|
}
|
|
9840
9861
|
if (dragStatus === "start") {
|
|
9841
9862
|
dragStart && dragStart();
|
|
9863
|
+
onDragStart && onDragStart();
|
|
9842
9864
|
}
|
|
9843
9865
|
touch.move(event);
|
|
9844
9866
|
SetDragStatus("draging");
|
|
@@ -9865,6 +9887,7 @@ const Range = (props) => {
|
|
|
9865
9887
|
if (dragStatus === "draging") {
|
|
9866
9888
|
updateValue(currentValue, true);
|
|
9867
9889
|
dragEnd && dragEnd();
|
|
9890
|
+
onDragEnd && onDragEnd();
|
|
9868
9891
|
}
|
|
9869
9892
|
SetDragStatus("");
|
|
9870
9893
|
};
|
|
@@ -11447,6 +11470,7 @@ const DatePicker = (props) => {
|
|
|
11447
11470
|
onCloseDatePicker,
|
|
11448
11471
|
onConfirmDatePicker,
|
|
11449
11472
|
filter,
|
|
11473
|
+
onChange,
|
|
11450
11474
|
threeDimensional,
|
|
11451
11475
|
className,
|
|
11452
11476
|
style,
|
|
@@ -11522,7 +11546,6 @@ const DatePicker = (props) => {
|
|
|
11522
11546
|
};
|
|
11523
11547
|
const ranges = (date) => {
|
|
11524
11548
|
const curDate = date || currentDate;
|
|
11525
|
-
console.log(11, currentDate);
|
|
11526
11549
|
if (!curDate)
|
|
11527
11550
|
return [];
|
|
11528
11551
|
const { maxYear, maxDate: maxDate2, maxMonth, maxHour, maxMinute, maxSeconds } = getBoundary("max", curDate);
|
|
@@ -11614,7 +11637,7 @@ const DatePicker = (props) => {
|
|
|
11614
11637
|
const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
|
|
11615
11638
|
date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
|
|
11616
11639
|
}
|
|
11617
|
-
props.
|
|
11640
|
+
props.onChange && props.onChange(index, selectedValue, cacheValueData);
|
|
11618
11641
|
};
|
|
11619
11642
|
const padZero = (num, targetLength = 2) => {
|
|
11620
11643
|
let str = `${num}`;
|
|
@@ -11758,6 +11781,12 @@ const InputNumber = (props) => {
|
|
|
11758
11781
|
overlimit,
|
|
11759
11782
|
blur,
|
|
11760
11783
|
focus,
|
|
11784
|
+
onAdd,
|
|
11785
|
+
onReduce,
|
|
11786
|
+
onOverlimit,
|
|
11787
|
+
onBlurFuc,
|
|
11788
|
+
onFocus,
|
|
11789
|
+
onChangeFuc,
|
|
11761
11790
|
iconClassPrefix,
|
|
11762
11791
|
iconFontClassName,
|
|
11763
11792
|
...restProps
|
|
@@ -11798,6 +11827,7 @@ const InputNumber = (props) => {
|
|
|
11798
11827
|
};
|
|
11799
11828
|
const emitChange = (value, e2) => {
|
|
11800
11829
|
const outputValue = fixedDecimalPlaces(value);
|
|
11830
|
+
onChangeFuc && onChangeFuc(outputValue, e2);
|
|
11801
11831
|
change && change(outputValue, e2);
|
|
11802
11832
|
if (!isAsync) {
|
|
11803
11833
|
if (Number(outputValue) < Number(min)) {
|
|
@@ -11810,26 +11840,31 @@ const InputNumber = (props) => {
|
|
|
11810
11840
|
}
|
|
11811
11841
|
};
|
|
11812
11842
|
const reduceNumber = (e2) => {
|
|
11843
|
+
onReduce && onReduce(e2);
|
|
11813
11844
|
reduce && reduce(e2);
|
|
11814
11845
|
if (reduceAllow()) {
|
|
11815
11846
|
const outputValue = Number(inputValue) - Number(step);
|
|
11816
11847
|
emitChange(outputValue, e2);
|
|
11817
11848
|
} else {
|
|
11849
|
+
onOverlimit && onOverlimit(e2);
|
|
11818
11850
|
overlimit && overlimit(e2);
|
|
11819
11851
|
}
|
|
11820
11852
|
};
|
|
11821
11853
|
const addNumber = (e2) => {
|
|
11854
|
+
onAdd && onAdd(e2);
|
|
11822
11855
|
add && add(e2);
|
|
11823
11856
|
if (addAllow()) {
|
|
11824
11857
|
const outputValue = Number(inputValue) + Number(step);
|
|
11825
11858
|
emitChange(outputValue, e2);
|
|
11826
11859
|
} else {
|
|
11860
|
+
onOverlimit && onOverlimit(e2);
|
|
11827
11861
|
overlimit && overlimit(e2);
|
|
11828
11862
|
}
|
|
11829
11863
|
};
|
|
11830
11864
|
const changeValue = (e2) => {
|
|
11831
11865
|
const input = e2.target;
|
|
11832
11866
|
change && change(input.valueAsNumber, e2);
|
|
11867
|
+
onChangeFuc && onChangeFuc(input.valueAsNumber, e2);
|
|
11833
11868
|
if (!isAsync) {
|
|
11834
11869
|
if (Number.isNaN(input.valueAsNumber)) {
|
|
11835
11870
|
setInputValue(inputValue);
|
|
@@ -11843,6 +11878,7 @@ const InputNumber = (props) => {
|
|
|
11843
11878
|
return;
|
|
11844
11879
|
if (readonly)
|
|
11845
11880
|
return;
|
|
11881
|
+
onFocus && onFocus(e2);
|
|
11846
11882
|
focus && focus(e2);
|
|
11847
11883
|
};
|
|
11848
11884
|
const burValue = (e2) => {
|
|
@@ -11858,6 +11894,7 @@ const InputNumber = (props) => {
|
|
|
11858
11894
|
value = Number(max);
|
|
11859
11895
|
}
|
|
11860
11896
|
emitChange(value, e2);
|
|
11897
|
+
onBlurFuc && onBlurFuc(e2);
|
|
11861
11898
|
blur && blur(e2);
|
|
11862
11899
|
};
|
|
11863
11900
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -11990,12 +12027,20 @@ const Input = (props) => {
|
|
|
11990
12027
|
rows,
|
|
11991
12028
|
slotButton,
|
|
11992
12029
|
slotInput,
|
|
12030
|
+
onChange,
|
|
12031
|
+
onBlur,
|
|
12032
|
+
onFocus,
|
|
12033
|
+
onClear,
|
|
12034
|
+
formatter,
|
|
12035
|
+
keypress,
|
|
12036
|
+
onClickInput,
|
|
12037
|
+
onClickLeftIcon,
|
|
12038
|
+
onClickRightIcon,
|
|
12039
|
+
onClick,
|
|
11993
12040
|
change,
|
|
11994
12041
|
blur,
|
|
11995
12042
|
focus,
|
|
11996
12043
|
clear,
|
|
11997
|
-
formatter,
|
|
11998
|
-
keypress,
|
|
11999
12044
|
clickInput,
|
|
12000
12045
|
clickLeftIcon,
|
|
12001
12046
|
clickRightIcon,
|
|
@@ -12061,20 +12106,22 @@ const Input = (props) => {
|
|
|
12061
12106
|
}
|
|
12062
12107
|
SetInputValue(val);
|
|
12063
12108
|
};
|
|
12064
|
-
const
|
|
12109
|
+
const handleFocus = (event) => {
|
|
12065
12110
|
const val = event.target.value;
|
|
12066
12111
|
SetActive(true);
|
|
12112
|
+
onFocus && onFocus(val, event);
|
|
12067
12113
|
focus && focus(val, event);
|
|
12068
12114
|
};
|
|
12069
|
-
const
|
|
12115
|
+
const handleInput = (event) => {
|
|
12070
12116
|
let val = event.target.value;
|
|
12071
12117
|
if (maxlength && val.length > Number(maxlength)) {
|
|
12072
12118
|
val = val.slice(0, Number(maxlength));
|
|
12073
12119
|
}
|
|
12074
12120
|
updateValue(val);
|
|
12121
|
+
onChange && onChange(val, event);
|
|
12075
12122
|
change && change(val, event);
|
|
12076
12123
|
};
|
|
12077
|
-
const
|
|
12124
|
+
const handleBlur = (event) => {
|
|
12078
12125
|
setTimeout(() => {
|
|
12079
12126
|
SetActive(false);
|
|
12080
12127
|
}, 200);
|
|
@@ -12083,15 +12130,19 @@ const Input = (props) => {
|
|
|
12083
12130
|
val = val.slice(0, Number(maxlength));
|
|
12084
12131
|
}
|
|
12085
12132
|
updateValue(getModelValue(), "onBlur");
|
|
12133
|
+
onBlur && onBlur(val, event);
|
|
12086
12134
|
blur && blur(val, event);
|
|
12087
12135
|
};
|
|
12088
|
-
const
|
|
12136
|
+
const handleClickInput = (event) => {
|
|
12137
|
+
onClickInput && onClickInput(event);
|
|
12089
12138
|
clickInput && clickInput(event);
|
|
12090
12139
|
};
|
|
12091
|
-
const
|
|
12140
|
+
const handleClickLeftIcon = (event) => {
|
|
12141
|
+
onClickLeftIcon && onClickLeftIcon(event);
|
|
12092
12142
|
clickLeftIcon && clickLeftIcon(event);
|
|
12093
12143
|
};
|
|
12094
|
-
const
|
|
12144
|
+
const handleClickRightIcon = (event) => {
|
|
12145
|
+
onClickRightIcon && onClickRightIcon(event);
|
|
12095
12146
|
clickRightIcon && clickRightIcon(event);
|
|
12096
12147
|
};
|
|
12097
12148
|
const resetValidation = () => {
|
|
@@ -12107,6 +12158,7 @@ const Input = (props) => {
|
|
|
12107
12158
|
};
|
|
12108
12159
|
const handleClear = (event) => {
|
|
12109
12160
|
updateValue("");
|
|
12161
|
+
onClear && onClear("", event);
|
|
12110
12162
|
clear && clear("", event);
|
|
12111
12163
|
};
|
|
12112
12164
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -12114,41 +12166,42 @@ const Input = (props) => {
|
|
|
12114
12166
|
style,
|
|
12115
12167
|
...rest,
|
|
12116
12168
|
onClick: (e2) => {
|
|
12169
|
+
onClick && onClick(e2);
|
|
12117
12170
|
click && click(e2);
|
|
12118
12171
|
}
|
|
12119
|
-
}, slotInput ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement("div", {
|
|
12172
|
+
}, slotInput ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12120
12173
|
className: `nut-input-label ${labelClass}`,
|
|
12121
12174
|
style: { width: `${labelWidth}px`, textAlign: labelAlign }
|
|
12122
12175
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12123
12176
|
className: "label-string"
|
|
12124
|
-
}, label, colon ? ":" : "")), /* @__PURE__ */ React__default.createElement("div", {
|
|
12177
|
+
}, label, colon ? ":" : "")) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
12125
12178
|
className: "nut-input-value"
|
|
12126
12179
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12127
12180
|
className: "nut-input-inner",
|
|
12128
12181
|
onClick: (e2) => {
|
|
12129
|
-
|
|
12182
|
+
handleClickInput(e2);
|
|
12130
12183
|
}
|
|
12131
12184
|
}, slotInput))) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, leftIcon && leftIcon.length > 0 ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12132
12185
|
className: "nut-input-left-icon",
|
|
12133
12186
|
onClick: (e2) => {
|
|
12134
|
-
|
|
12187
|
+
handleClickLeftIcon(e2);
|
|
12135
12188
|
}
|
|
12136
12189
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
12137
12190
|
classPrefix: iconClassPrefix,
|
|
12138
12191
|
fontClassName: iconFontClassName,
|
|
12139
12192
|
name: leftIcon,
|
|
12140
12193
|
size: leftIconSize
|
|
12141
|
-
})) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
12194
|
+
})) : null, label ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12142
12195
|
className: `nut-input-label ${labelClass}`,
|
|
12143
12196
|
style: { width: `${labelWidth}px`, textAlign: labelAlign }
|
|
12144
12197
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12145
12198
|
className: "label-string"
|
|
12146
|
-
}, label, colon ? ":" : "")), /* @__PURE__ */ React__default.createElement("div", {
|
|
12199
|
+
}, label, colon ? ":" : "")) : null, /* @__PURE__ */ React__default.createElement("div", {
|
|
12147
12200
|
className: "nut-input-value"
|
|
12148
12201
|
}, /* @__PURE__ */ React__default.createElement("div", {
|
|
12149
12202
|
className: "nut-input-inner",
|
|
12150
12203
|
onClick: (e2) => {
|
|
12151
|
-
|
|
12204
|
+
handleClickInput(e2);
|
|
12152
12205
|
}
|
|
12153
12206
|
}, type === "textarea" ? /* @__PURE__ */ React__default.createElement("textarea", {
|
|
12154
12207
|
className: "input-text",
|
|
@@ -12164,13 +12217,13 @@ const Input = (props) => {
|
|
|
12164
12217
|
value: inputValue,
|
|
12165
12218
|
autoFocus: autofocus,
|
|
12166
12219
|
onBlur: (e2) => {
|
|
12167
|
-
|
|
12220
|
+
handleBlur(e2);
|
|
12168
12221
|
},
|
|
12169
12222
|
onFocus: (e2) => {
|
|
12170
|
-
|
|
12223
|
+
handleFocus(e2);
|
|
12171
12224
|
},
|
|
12172
12225
|
onInput: (e2) => {
|
|
12173
|
-
|
|
12226
|
+
handleInput(e2);
|
|
12174
12227
|
}
|
|
12175
12228
|
}) : /* @__PURE__ */ React__default.createElement("input", {
|
|
12176
12229
|
className: "input-text",
|
|
@@ -12184,13 +12237,13 @@ const Input = (props) => {
|
|
|
12184
12237
|
value: inputValue,
|
|
12185
12238
|
autoFocus: autofocus,
|
|
12186
12239
|
onBlur: (e2) => {
|
|
12187
|
-
|
|
12240
|
+
handleBlur(e2);
|
|
12188
12241
|
},
|
|
12189
12242
|
onFocus: (e2) => {
|
|
12190
|
-
|
|
12243
|
+
handleFocus(e2);
|
|
12191
12244
|
},
|
|
12192
12245
|
onInput: (e2) => {
|
|
12193
|
-
|
|
12246
|
+
handleInput(e2);
|
|
12194
12247
|
}
|
|
12195
12248
|
}), clearable && !readonly && active && inputValue.length > 0 ? /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
12196
12249
|
classPrefix: iconClassPrefix,
|
|
@@ -12204,7 +12257,7 @@ const Input = (props) => {
|
|
|
12204
12257
|
}) : null, rightIcon && rightIcon.length > 0 ? /* @__PURE__ */ React__default.createElement("div", {
|
|
12205
12258
|
className: "nut-input-right-icon",
|
|
12206
12259
|
onClick: (e2) => {
|
|
12207
|
-
|
|
12260
|
+
handleClickRightIcon(e2);
|
|
12208
12261
|
}
|
|
12209
12262
|
}, /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
12210
12263
|
classPrefix: iconClassPrefix,
|
|
@@ -12358,9 +12411,9 @@ const Radio = (props) => {
|
|
|
12358
12411
|
return renderButton();
|
|
12359
12412
|
}
|
|
12360
12413
|
if (reverseState) {
|
|
12361
|
-
return
|
|
12414
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderLabel(), renderIcon());
|
|
12362
12415
|
}
|
|
12363
|
-
return
|
|
12416
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, renderIcon(), renderLabel());
|
|
12364
12417
|
};
|
|
12365
12418
|
const handleClick2 = (e2) => {
|
|
12366
12419
|
if (disabledStatement || checkedStatement)
|
|
@@ -13433,7 +13486,7 @@ const InternalUploader = (props, ref) => {
|
|
|
13433
13486
|
classPrefix: iconClassPrefix,
|
|
13434
13487
|
fontClassName: iconFontClassName,
|
|
13435
13488
|
name: "link"
|
|
13436
|
-
}), "\xA0", item.name), /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
13489
|
+
}), "\xA0", item.name), isDeletable && /* @__PURE__ */ React__default.createElement(Icon$1, {
|
|
13437
13490
|
classPrefix: iconClassPrefix,
|
|
13438
13491
|
fontClassName: iconFontClassName,
|
|
13439
13492
|
color: "#808080",
|
|
@@ -15328,7 +15381,7 @@ const Switch = (props) => {
|
|
|
15328
15381
|
inactiveColor,
|
|
15329
15382
|
activeText,
|
|
15330
15383
|
inactiveText,
|
|
15331
|
-
|
|
15384
|
+
onChange,
|
|
15332
15385
|
className,
|
|
15333
15386
|
style
|
|
15334
15387
|
} = {
|
|
@@ -15356,7 +15409,7 @@ const Switch = (props) => {
|
|
|
15356
15409
|
if (!isAsync) {
|
|
15357
15410
|
setValue(!value);
|
|
15358
15411
|
}
|
|
15359
|
-
|
|
15412
|
+
onChange && onChange(!value, event);
|
|
15360
15413
|
};
|
|
15361
15414
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
15362
15415
|
className: classes(),
|
|
@@ -15903,6 +15956,8 @@ const NoticeBar = (props) => {
|
|
|
15903
15956
|
rightIcon,
|
|
15904
15957
|
close,
|
|
15905
15958
|
click,
|
|
15959
|
+
onClose,
|
|
15960
|
+
onClick,
|
|
15906
15961
|
iconClassPrefix,
|
|
15907
15962
|
iconFontClassName
|
|
15908
15963
|
} = {
|
|
@@ -15988,11 +16043,13 @@ const NoticeBar = (props) => {
|
|
|
15988
16043
|
};
|
|
15989
16044
|
const handleClick2 = (event) => {
|
|
15990
16045
|
click && click(event);
|
|
16046
|
+
onClick && onClick(event);
|
|
15991
16047
|
};
|
|
15992
16048
|
const onClickIcon = (event) => {
|
|
15993
16049
|
event.stopPropagation();
|
|
15994
16050
|
SetShowNoticeBar(!closeMode);
|
|
15995
16051
|
close && close(event);
|
|
16052
|
+
onClose && onClose(event);
|
|
15996
16053
|
};
|
|
15997
16054
|
const onAnimationEnd = () => {
|
|
15998
16055
|
SetFirstRound(false);
|
|
@@ -16042,9 +16099,11 @@ const NoticeBar = (props) => {
|
|
|
16042
16099
|
};
|
|
16043
16100
|
const go = (item) => {
|
|
16044
16101
|
click && click(item);
|
|
16102
|
+
onClick && onClick(item);
|
|
16045
16103
|
};
|
|
16046
16104
|
const handleClickIcon = () => {
|
|
16047
16105
|
close && close(scrollList[0]);
|
|
16106
|
+
onClose && onClose(scrollList[0]);
|
|
16048
16107
|
};
|
|
16049
16108
|
const iconShow = () => {
|
|
16050
16109
|
if (leftIcon === "close") {
|
|
@@ -16170,6 +16229,7 @@ const Steps = (props) => {
|
|
|
16170
16229
|
className,
|
|
16171
16230
|
progressDot,
|
|
16172
16231
|
clickStep,
|
|
16232
|
+
onClickStep,
|
|
16173
16233
|
...restProps
|
|
16174
16234
|
} = propSteps;
|
|
16175
16235
|
const parentSteps = {
|
|
@@ -16233,10 +16293,9 @@ const Step = (props) => {
|
|
|
16233
16293
|
return index === +parent.propSteps.current ? "process" : "wait";
|
|
16234
16294
|
};
|
|
16235
16295
|
const handleClickStep = () => {
|
|
16236
|
-
var _a, _b;
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
}
|
|
16296
|
+
var _a, _b, _c, _d;
|
|
16297
|
+
((_a = parent.propSteps) == null ? void 0 : _a.onClickStep) && ((_b = parent.propSteps) == null ? void 0 : _b.onClickStep(activeIndex));
|
|
16298
|
+
((_c = parent.propSteps) == null ? void 0 : _c.clickStep) && ((_d = parent.propSteps) == null ? void 0 : _d.clickStep(activeIndex));
|
|
16240
16299
|
};
|
|
16241
16300
|
const b2 = cn("step");
|
|
16242
16301
|
const classes = classNames(
|
|
@@ -16768,6 +16827,7 @@ const Avatar = (props) => {
|
|
|
16768
16827
|
className,
|
|
16769
16828
|
style,
|
|
16770
16829
|
activeAvatar,
|
|
16830
|
+
onActiveAvatar,
|
|
16771
16831
|
onError,
|
|
16772
16832
|
iconClassPrefix,
|
|
16773
16833
|
iconFontClassName,
|
|
@@ -16812,7 +16872,6 @@ const Avatar = (props) => {
|
|
|
16812
16872
|
const avatarLength = (children2) => {
|
|
16813
16873
|
var _a2, _b2, _c2;
|
|
16814
16874
|
for (let i = 0; i < children2.length; i++) {
|
|
16815
|
-
console.log("child", children2[i], children2[i].classList);
|
|
16816
16875
|
if (children2[i] && children2[i].classList && children2[i].classList[0] === "nut-avatar") {
|
|
16817
16876
|
children2[i].setAttribute("data-index", i + 1);
|
|
16818
16877
|
}
|
|
@@ -16831,9 +16890,8 @@ const Avatar = (props) => {
|
|
|
16831
16890
|
}
|
|
16832
16891
|
};
|
|
16833
16892
|
const clickAvatar = (e2) => {
|
|
16834
|
-
|
|
16835
|
-
|
|
16836
|
-
}
|
|
16893
|
+
activeAvatar && activeAvatar(e2);
|
|
16894
|
+
onActiveAvatar && onActiveAvatar(e2);
|
|
16837
16895
|
};
|
|
16838
16896
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, (showMax || !((_h = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _h.maxCount) || avatarIndex <= ((_i = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _i.maxCount)) && /* @__PURE__ */ React__default.createElement("div", {
|
|
16839
16897
|
className: cls,
|
|
@@ -17619,6 +17677,7 @@ const CountDown = React__default.forwardRef(InternalCountDown);
|
|
|
17619
17677
|
CountDown.defaultProps = defaultProps$j;
|
|
17620
17678
|
CountDown.displayName = "NutCountDown";
|
|
17621
17679
|
const defaultProps$i = {
|
|
17680
|
+
style: {},
|
|
17622
17681
|
activeName: ["0"],
|
|
17623
17682
|
accordion: false,
|
|
17624
17683
|
icon: "",
|
|
@@ -17632,6 +17691,8 @@ function areEqual(prevProps, nextProps) {
|
|
|
17632
17691
|
const Collapse = memo(
|
|
17633
17692
|
(props) => {
|
|
17634
17693
|
const {
|
|
17694
|
+
className,
|
|
17695
|
+
style,
|
|
17635
17696
|
children,
|
|
17636
17697
|
activeName,
|
|
17637
17698
|
accordion,
|
|
@@ -17639,7 +17700,7 @@ const Collapse = memo(
|
|
|
17639
17700
|
rotate,
|
|
17640
17701
|
iconSize,
|
|
17641
17702
|
iconColor,
|
|
17642
|
-
|
|
17703
|
+
onChange
|
|
17643
17704
|
} = {
|
|
17644
17705
|
...defaultProps$i,
|
|
17645
17706
|
...props
|
|
@@ -17681,10 +17742,11 @@ const Collapse = memo(
|
|
|
17681
17742
|
}
|
|
17682
17743
|
}
|
|
17683
17744
|
setDefaultOpenIndex(newOpenIndex);
|
|
17684
|
-
|
|
17745
|
+
onChange && onChange(!isOpen, name);
|
|
17685
17746
|
};
|
|
17686
17747
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
17687
|
-
className: colBem()
|
|
17748
|
+
className: `${colBem()} ${className}`,
|
|
17749
|
+
style
|
|
17688
17750
|
}, childrenDom.map((item) => {
|
|
17689
17751
|
return React__default.cloneElement(item, {
|
|
17690
17752
|
isOpen: defaultOpenIndex.includes(item.props.name),
|
|
@@ -18109,6 +18171,7 @@ const VirtualList = (props) => {
|
|
|
18109
18171
|
overscan = 2,
|
|
18110
18172
|
key,
|
|
18111
18173
|
handleScroll,
|
|
18174
|
+
onScroll,
|
|
18112
18175
|
className,
|
|
18113
18176
|
containerSize,
|
|
18114
18177
|
...rest
|
|
@@ -18175,7 +18238,7 @@ const VirtualList = (props) => {
|
|
|
18175
18238
|
const totalSize = getListTotalSize(positions, horizontal);
|
|
18176
18239
|
setListTotalSize(totalSize);
|
|
18177
18240
|
}, [positions, sizeKey, horizontal]);
|
|
18178
|
-
const
|
|
18241
|
+
const scroll = useCallback(() => {
|
|
18179
18242
|
requestAnimationFrame((e2) => {
|
|
18180
18243
|
const scrollSize = getElement()[scrollKey];
|
|
18181
18244
|
const startIndex = binarySearch(positions, scrollSize, horizontal);
|
|
@@ -18196,7 +18259,11 @@ const VirtualList = (props) => {
|
|
|
18196
18259
|
const startOffset = positions[startIndex][offsetKey];
|
|
18197
18260
|
setOptions({ startOffset, startIndex, overStart, endIndex });
|
|
18198
18261
|
if (endIndex > sourceData.length - 1) {
|
|
18199
|
-
|
|
18262
|
+
if (onScroll) {
|
|
18263
|
+
onScroll();
|
|
18264
|
+
} else if (handleScroll) {
|
|
18265
|
+
handleScroll();
|
|
18266
|
+
}
|
|
18200
18267
|
}
|
|
18201
18268
|
});
|
|
18202
18269
|
}, [
|
|
@@ -18216,11 +18283,11 @@ const VirtualList = (props) => {
|
|
|
18216
18283
|
]);
|
|
18217
18284
|
useEffect(() => {
|
|
18218
18285
|
const element = getElement();
|
|
18219
|
-
element.addEventListener("scroll",
|
|
18286
|
+
element.addEventListener("scroll", scroll, false);
|
|
18220
18287
|
return () => {
|
|
18221
|
-
element.removeEventListener("scroll",
|
|
18288
|
+
element.removeEventListener("scroll", scroll, false);
|
|
18222
18289
|
};
|
|
18223
|
-
}, [getElement,
|
|
18290
|
+
}, [getElement, scroll]);
|
|
18224
18291
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
18225
18292
|
className: className ? `${className} nut-virtualList-box` : "nut-virtualList-box",
|
|
18226
18293
|
...rest,
|
|
@@ -18410,6 +18477,9 @@ const Video = (props) => {
|
|
|
18410
18477
|
play,
|
|
18411
18478
|
pause,
|
|
18412
18479
|
playend,
|
|
18480
|
+
onPlayFuc,
|
|
18481
|
+
onPauseFuc,
|
|
18482
|
+
onPlayend,
|
|
18413
18483
|
...restProps
|
|
18414
18484
|
} = {
|
|
18415
18485
|
...defaultProps$b,
|
|
@@ -18436,13 +18506,16 @@ const Video = (props) => {
|
|
|
18436
18506
|
videoRef.setAttribute("x5-video-player-fullscreen", "false");
|
|
18437
18507
|
}
|
|
18438
18508
|
videoRef.addEventListener("play", () => {
|
|
18509
|
+
onPlayFuc && onPlayFuc(videoRef);
|
|
18439
18510
|
play && play(videoRef);
|
|
18440
18511
|
});
|
|
18441
18512
|
videoRef.addEventListener("pause", () => {
|
|
18513
|
+
onPauseFuc && onPauseFuc(videoRef);
|
|
18442
18514
|
pause && pause(videoRef);
|
|
18443
18515
|
});
|
|
18444
18516
|
videoRef.addEventListener("ended", () => {
|
|
18445
18517
|
videoRef.currentTime = 0;
|
|
18518
|
+
onPlayend && onPlayend(videoRef);
|
|
18446
18519
|
playend && playend(videoRef);
|
|
18447
18520
|
});
|
|
18448
18521
|
}
|
|
@@ -19566,7 +19639,18 @@ const defaultProps$4 = {
|
|
|
19566
19639
|
};
|
|
19567
19640
|
const Signature = (props) => {
|
|
19568
19641
|
const { locale } = useConfig();
|
|
19569
|
-
const {
|
|
19642
|
+
const {
|
|
19643
|
+
type,
|
|
19644
|
+
lineWidth,
|
|
19645
|
+
strokeStyle,
|
|
19646
|
+
unSupportTpl,
|
|
19647
|
+
className,
|
|
19648
|
+
confirm: confirm2,
|
|
19649
|
+
clear,
|
|
19650
|
+
onConfirm,
|
|
19651
|
+
onClear,
|
|
19652
|
+
...rest
|
|
19653
|
+
} = {
|
|
19570
19654
|
...defaultProps$4,
|
|
19571
19655
|
...props
|
|
19572
19656
|
};
|
|
@@ -19631,15 +19715,16 @@ const Signature = (props) => {
|
|
|
19631
19715
|
canvasRef.current.removeEventListener(events[2], endEventHandler, false);
|
|
19632
19716
|
}
|
|
19633
19717
|
};
|
|
19634
|
-
const
|
|
19718
|
+
const handleClearBtn = () => {
|
|
19635
19719
|
if (canvasRef.current && ctx2.current) {
|
|
19636
19720
|
canvasRef.current.addEventListener(events[2], endEventHandler, false);
|
|
19637
19721
|
ctx2.current.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
19638
19722
|
ctx2.current.closePath();
|
|
19639
19723
|
}
|
|
19640
|
-
|
|
19724
|
+
clear && clear();
|
|
19725
|
+
onClear && onClear();
|
|
19641
19726
|
};
|
|
19642
|
-
const
|
|
19727
|
+
const handleConfirmBtn = () => {
|
|
19643
19728
|
onSave(canvasRef.current);
|
|
19644
19729
|
};
|
|
19645
19730
|
const onSave = (canvas) => {
|
|
@@ -19654,8 +19739,9 @@ const Signature = (props) => {
|
|
|
19654
19739
|
default:
|
|
19655
19740
|
dataurl = canvas.toDataURL("image/png");
|
|
19656
19741
|
}
|
|
19657
|
-
|
|
19658
|
-
|
|
19742
|
+
handleClearBtn();
|
|
19743
|
+
confirm2 && confirm2(canvas, dataurl);
|
|
19744
|
+
onConfirm && onConfirm(canvas, dataurl);
|
|
19659
19745
|
};
|
|
19660
19746
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
19661
19747
|
className: `${b2()} ${className}`,
|
|
@@ -19672,11 +19758,11 @@ const Signature = (props) => {
|
|
|
19672
19758
|
}, locale.signature.unSupportTpl || unSupportTpl)), /* @__PURE__ */ React__default.createElement(Button, {
|
|
19673
19759
|
className: `${b2("btn")}`,
|
|
19674
19760
|
type: "default",
|
|
19675
|
-
onClick: () =>
|
|
19761
|
+
onClick: () => handleClearBtn()
|
|
19676
19762
|
}, locale.signature.reSign), /* @__PURE__ */ React__default.createElement(Button, {
|
|
19677
19763
|
className: `${b2("btn")}`,
|
|
19678
19764
|
type: "primary",
|
|
19679
|
-
onClick: () =>
|
|
19765
|
+
onClick: () => handleConfirmBtn()
|
|
19680
19766
|
}, locale.confirm));
|
|
19681
19767
|
};
|
|
19682
19768
|
Signature.defaultProps = defaultProps$4;
|
|
@@ -19803,6 +19889,7 @@ TimeDetail.defaultProps = defaultProps$1;
|
|
|
19803
19889
|
TimeDetail.displayName = "NutTimeDetail";
|
|
19804
19890
|
const defaultProps = {
|
|
19805
19891
|
className: "",
|
|
19892
|
+
style: {},
|
|
19806
19893
|
visible: false,
|
|
19807
19894
|
height: "20%",
|
|
19808
19895
|
multiple: false,
|
|
@@ -19815,7 +19902,6 @@ const defaultProps = {
|
|
|
19815
19902
|
const TimeSelect = (props) => {
|
|
19816
19903
|
useConfig();
|
|
19817
19904
|
const {
|
|
19818
|
-
children,
|
|
19819
19905
|
visible,
|
|
19820
19906
|
className,
|
|
19821
19907
|
height,
|
|
@@ -19827,7 +19913,10 @@ const TimeSelect = (props) => {
|
|
|
19827
19913
|
multiple,
|
|
19828
19914
|
select,
|
|
19829
19915
|
pannelChange,
|
|
19830
|
-
timeChange
|
|
19916
|
+
timeChange,
|
|
19917
|
+
onSelect,
|
|
19918
|
+
onPannelChange,
|
|
19919
|
+
onTimeChange
|
|
19831
19920
|
} = {
|
|
19832
19921
|
...defaultProps,
|
|
19833
19922
|
...props
|
|
@@ -19848,7 +19937,11 @@ const TimeSelect = (props) => {
|
|
|
19848
19937
|
};
|
|
19849
19938
|
const b2 = cn("timeselect");
|
|
19850
19939
|
const closeFun = () => {
|
|
19851
|
-
|
|
19940
|
+
if (onSelect) {
|
|
19941
|
+
onSelect(activeTime);
|
|
19942
|
+
} else if (select) {
|
|
19943
|
+
select(activeTime);
|
|
19944
|
+
}
|
|
19852
19945
|
};
|
|
19853
19946
|
const handleSelectTime = (time) => {
|
|
19854
19947
|
let curTimeData = {};
|
|
@@ -19871,7 +19964,11 @@ const TimeSelect = (props) => {
|
|
|
19871
19964
|
const resultTimeData = [...activeTime];
|
|
19872
19965
|
resultTimeData.splice(curIndex, 1, curTimeData);
|
|
19873
19966
|
setActiveTime(resultTimeData);
|
|
19874
|
-
|
|
19967
|
+
if (onTimeChange) {
|
|
19968
|
+
onTimeChange(time, resultTimeData);
|
|
19969
|
+
} else if (timeChange) {
|
|
19970
|
+
timeChange(time, resultTimeData);
|
|
19971
|
+
}
|
|
19875
19972
|
};
|
|
19876
19973
|
const handleChange = (pannelKey) => {
|
|
19877
19974
|
const resultTimeData = [...activeTime];
|
|
@@ -19897,7 +19994,11 @@ const TimeSelect = (props) => {
|
|
|
19897
19994
|
]);
|
|
19898
19995
|
}
|
|
19899
19996
|
}
|
|
19900
|
-
|
|
19997
|
+
if (onPannelChange) {
|
|
19998
|
+
onPannelChange(pannelKey, resultTimeData);
|
|
19999
|
+
} else if (pannelChange) {
|
|
20000
|
+
pannelChange(pannelKey, resultTimeData);
|
|
20001
|
+
}
|
|
19901
20002
|
};
|
|
19902
20003
|
const getTimePannelClass = (dataItem) => {
|
|
19903
20004
|
if (String(dataItem["pannel-key"]) === String(activeKey)) {
|