@nutui/nutui-react 1.3.5-beta.1 → 1.3.6
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 +7 -0
- package/dist/esm/ActionSheet.js +15 -25
- package/dist/esm/Address.js +151 -221
- package/dist/esm/AnimatingNumbers.js +7 -31
- package/dist/esm/Audio.js +31 -66
- package/dist/esm/Avatar.js +25 -51
- package/dist/esm/AvatarGroup.js +2 -9
- package/dist/esm/BackTop.js +29 -55
- package/dist/esm/Badge.js +9 -20
- package/dist/esm/Barrage.js +8 -20
- package/dist/esm/Button.js +22 -37
- package/dist/esm/Calendar.js +23 -37
- package/dist/esm/CalendarItem.js +86 -186
- package/dist/esm/Card.js +14 -20
- package/dist/esm/Cascader.js +77 -197
- package/dist/esm/Cell.js +20 -30
- package/dist/esm/CellGroup.js +6 -12
- package/dist/esm/Checkbox.js +27 -48
- package/dist/esm/CheckboxGroup.js +12 -30
- package/dist/esm/CircleProgress.js +11 -28
- package/dist/esm/Col.js +11 -22
- package/dist/esm/Collapse.js +11 -27
- package/dist/esm/CollapseItem.js +33 -47
- package/dist/esm/ConfigProvider.js +4 -15
- package/dist/esm/CountDown.js +37 -74
- package/dist/esm/DatePicker.js +44 -106
- package/dist/esm/Dialog.js +31 -89
- package/dist/esm/Divider.js +8 -15
- package/dist/esm/Drag.js +30 -45
- package/dist/esm/Elevator.js +37 -74
- package/dist/esm/Empty.js +11 -24
- package/dist/esm/FixedNav.js +18 -29
- package/dist/esm/Grid.js +13 -28
- package/dist/esm/GridItem.js +18 -34
- package/dist/esm/ImagePreview.js +36 -71
- package/dist/esm/Indicator.js +9 -20
- package/dist/esm/Infiniteloading.js +26 -55
- package/dist/esm/Input.js +62 -106
- package/dist/esm/InputNumber.js +25 -52
- package/dist/esm/Layout.js +0 -6
- package/dist/esm/Menu.js +24 -46
- package/dist/esm/MenuItem.js +29 -52
- package/dist/esm/NavBar.js +18 -34
- package/dist/esm/NoticeBar.js +54 -102
- package/dist/esm/Notify.js +9 -38
- package/dist/esm/NumberKeyboard.js +21 -52
- package/dist/esm/Pagination.js +38 -71
- package/dist/esm/Picker.js +91 -178
- package/dist/esm/Popover.js +32 -72
- package/dist/esm/Popup.js +40 -72
- package/dist/esm/Price.js +7 -24
- package/dist/esm/Progress.js +35 -50
- package/dist/esm/PullToRefresh.js +28 -83
- package/dist/esm/Radio.js +24 -47
- package/dist/esm/RadioGroup.js +14 -24
- package/dist/esm/Range.js +44 -116
- package/dist/esm/Rate.js +21 -39
- package/dist/esm/Row.js +7 -16
- package/dist/esm/SearchBar.js +47 -68
- package/dist/esm/ShortPassword.js +29 -56
- package/dist/esm/SideNavBar.js +9 -16
- package/dist/esm/SideNavBarItem.js +4 -11
- package/dist/esm/Signature.js +13 -43
- package/dist/esm/Skeleton.js +13 -23
- package/dist/esm/Step.js +12 -28
- package/dist/esm/Steps.js +6 -14
- package/dist/esm/Sticky.js +24 -52
- package/dist/esm/SubSideNavBar.js +7 -22
- package/dist/esm/Swipe.js +15 -54
- package/dist/esm/Swiper.js +102 -186
- package/dist/esm/SwiperItem.js +2 -12
- package/dist/esm/Switch.js +13 -27
- package/dist/esm/Tabbar.js +13 -25
- package/dist/esm/TabbarItem.js +15 -23
- package/dist/esm/Table.js +19 -39
- package/dist/esm/Tag.js +19 -36
- package/dist/esm/TextArea.js +19 -43
- package/dist/esm/TimeDetail.js +15 -28
- package/dist/esm/TimePannel.js +5 -12
- package/dist/esm/TimeSelect.js +35 -59
- package/dist/esm/Toast.js +16 -49
- package/dist/esm/Uploader.js +57 -152
- package/dist/esm/Video.js +8 -19
- package/dist/esm/VirtualList.js +84 -118
- package/dist/esm/date-710f8c7c.js +9 -33
- package/dist/esm/get-scroll-parent-3dcd3f53.js +1 -9
- package/dist/esm/icon-8dc4de10.js +11 -21
- package/dist/esm/offsetContext-0e3d04b3.js +0 -3
- package/dist/esm/overlay-ed3eb37d.js +12 -23
- package/dist/esm/render-18227751.js +0 -11
- package/dist/esm/tabpane-c957ab14.js +4 -10
- package/dist/esm/tabs-0896a61b.js +28 -56
- package/dist/esm/types/src/packages/elevator/demo.d.ts +1 -0
- package/dist/esm/types/src/packages/searchbar/searchbar.d.ts +2 -0
- package/dist/esm/useClientRect-839d18c5.js +0 -5
- package/dist/esm/useTouch-a2ea68c6.js +27 -47
- 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 +424 -406
- package/dist/nutui.react.umd.js +416 -398
- package/dist/packages/searchbar/searchbar.scss +20 -3
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/nutui.react.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @nutui/nutui-react v1.3.
|
|
2
|
+
* @nutui/nutui-react v1.3.6 Wed Oct 12 2022 18:06:20 GMT+0800 (中国标准时间)
|
|
3
3
|
* (c) 2022 @jdf2e.
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -338,8 +338,8 @@
|
|
|
338
338
|
function isAbsolute(pathname) {
|
|
339
339
|
return pathname.charAt(0) === "/";
|
|
340
340
|
}
|
|
341
|
-
function spliceOne(list,
|
|
342
|
-
for (var i =
|
|
341
|
+
function spliceOne(list, index) {
|
|
342
|
+
for (var i = index, k2 = i + 1, n2 = list.length; k2 < n2; i += 1, k2 += 1) {
|
|
343
343
|
list[i] = list[k2];
|
|
344
344
|
}
|
|
345
345
|
list.pop();
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
throw new Error(prefix$1);
|
|
401
401
|
}
|
|
402
402
|
var provided = typeof message === "function" ? message() : message;
|
|
403
|
-
var value = provided ? prefix$1
|
|
403
|
+
var value = provided ? "".concat(prefix$1, ": ").concat(provided) : prefix$1;
|
|
404
404
|
throw new Error(value);
|
|
405
405
|
}
|
|
406
406
|
function parsePath(path) {
|
|
@@ -552,7 +552,7 @@
|
|
|
552
552
|
function createKey() {
|
|
553
553
|
return Math.random().toString(36).substr(2, keyLength);
|
|
554
554
|
}
|
|
555
|
-
var
|
|
555
|
+
var index = clamp$1(initialIndex, 0, initialEntries.length - 1);
|
|
556
556
|
var entries = initialEntries.map(function(entry) {
|
|
557
557
|
return typeof entry === "string" ? createLocation(entry, void 0, createKey()) : createLocation(entry, void 0, entry.key || createKey());
|
|
558
558
|
});
|
|
@@ -630,8 +630,8 @@
|
|
|
630
630
|
var history = {
|
|
631
631
|
length: entries.length,
|
|
632
632
|
action: "POP",
|
|
633
|
-
location: entries[
|
|
634
|
-
index
|
|
633
|
+
location: entries[index],
|
|
634
|
+
index,
|
|
635
635
|
entries,
|
|
636
636
|
createHref,
|
|
637
637
|
push,
|
|
@@ -645,136 +645,6 @@
|
|
|
645
645
|
};
|
|
646
646
|
return history;
|
|
647
647
|
}
|
|
648
|
-
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
649
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
650
|
-
function getUniqueId() {
|
|
651
|
-
var key = "__global_unique_id__";
|
|
652
|
-
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
653
|
-
}
|
|
654
|
-
function objectIs(x2, y2) {
|
|
655
|
-
if (x2 === y2) {
|
|
656
|
-
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
657
|
-
} else {
|
|
658
|
-
return x2 !== x2 && y2 !== y2;
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
function createEventEmitter(value) {
|
|
662
|
-
var handlers = [];
|
|
663
|
-
return {
|
|
664
|
-
on: function on(handler) {
|
|
665
|
-
handlers.push(handler);
|
|
666
|
-
},
|
|
667
|
-
off: function off(handler) {
|
|
668
|
-
handlers = handlers.filter(function(h2) {
|
|
669
|
-
return h2 !== handler;
|
|
670
|
-
});
|
|
671
|
-
},
|
|
672
|
-
get: function get() {
|
|
673
|
-
return value;
|
|
674
|
-
},
|
|
675
|
-
set: function set(newValue, changedBits) {
|
|
676
|
-
value = newValue;
|
|
677
|
-
handlers.forEach(function(handler) {
|
|
678
|
-
return handler(value, changedBits);
|
|
679
|
-
});
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
function onlyChild(children) {
|
|
684
|
-
return Array.isArray(children) ? children[0] : children;
|
|
685
|
-
}
|
|
686
|
-
function createReactContext(defaultValue, calculateChangedBits) {
|
|
687
|
-
var _Provider$childContex, _Consumer$contextType;
|
|
688
|
-
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
689
|
-
var Provider = /* @__PURE__ */ function(_Component) {
|
|
690
|
-
_inheritsLoose(Provider2, _Component);
|
|
691
|
-
function Provider2() {
|
|
692
|
-
var _this;
|
|
693
|
-
_this = _Component.apply(this, arguments) || this;
|
|
694
|
-
_this.emitter = createEventEmitter(_this.props.value);
|
|
695
|
-
return _this;
|
|
696
|
-
}
|
|
697
|
-
var _proto = Provider2.prototype;
|
|
698
|
-
_proto.getChildContext = function getChildContext() {
|
|
699
|
-
var _ref;
|
|
700
|
-
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
701
|
-
};
|
|
702
|
-
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
703
|
-
if (this.props.value !== nextProps.value) {
|
|
704
|
-
var oldValue = this.props.value;
|
|
705
|
-
var newValue = nextProps.value;
|
|
706
|
-
var changedBits;
|
|
707
|
-
if (objectIs(oldValue, newValue)) {
|
|
708
|
-
changedBits = 0;
|
|
709
|
-
} else {
|
|
710
|
-
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
711
|
-
changedBits |= 0;
|
|
712
|
-
if (changedBits !== 0) {
|
|
713
|
-
this.emitter.set(nextProps.value, changedBits);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
_proto.render = function render2() {
|
|
719
|
-
return this.props.children;
|
|
720
|
-
};
|
|
721
|
-
return Provider2;
|
|
722
|
-
}(React.Component);
|
|
723
|
-
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
724
|
-
var Consumer = /* @__PURE__ */ function(_Component2) {
|
|
725
|
-
_inheritsLoose(Consumer2, _Component2);
|
|
726
|
-
function Consumer2() {
|
|
727
|
-
var _this2;
|
|
728
|
-
_this2 = _Component2.apply(this, arguments) || this;
|
|
729
|
-
_this2.state = {
|
|
730
|
-
value: _this2.getValue()
|
|
731
|
-
};
|
|
732
|
-
_this2.onUpdate = function(newValue, changedBits) {
|
|
733
|
-
var observedBits = _this2.observedBits | 0;
|
|
734
|
-
if ((observedBits & changedBits) !== 0) {
|
|
735
|
-
_this2.setState({
|
|
736
|
-
value: _this2.getValue()
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
};
|
|
740
|
-
return _this2;
|
|
741
|
-
}
|
|
742
|
-
var _proto2 = Consumer2.prototype;
|
|
743
|
-
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
744
|
-
var observedBits = nextProps.observedBits;
|
|
745
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
746
|
-
};
|
|
747
|
-
_proto2.componentDidMount = function componentDidMount() {
|
|
748
|
-
if (this.context[contextProp]) {
|
|
749
|
-
this.context[contextProp].on(this.onUpdate);
|
|
750
|
-
}
|
|
751
|
-
var observedBits = this.props.observedBits;
|
|
752
|
-
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
753
|
-
};
|
|
754
|
-
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
755
|
-
if (this.context[contextProp]) {
|
|
756
|
-
this.context[contextProp].off(this.onUpdate);
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
_proto2.getValue = function getValue() {
|
|
760
|
-
if (this.context[contextProp]) {
|
|
761
|
-
return this.context[contextProp].get();
|
|
762
|
-
} else {
|
|
763
|
-
return defaultValue;
|
|
764
|
-
}
|
|
765
|
-
};
|
|
766
|
-
_proto2.render = function render2() {
|
|
767
|
-
return onlyChild(this.props.children)(this.state.value);
|
|
768
|
-
};
|
|
769
|
-
return Consumer2;
|
|
770
|
-
}(React.Component);
|
|
771
|
-
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
772
|
-
return {
|
|
773
|
-
Provider,
|
|
774
|
-
Consumer
|
|
775
|
-
};
|
|
776
|
-
}
|
|
777
|
-
var index = React__default["default"].createContext || createReactContext;
|
|
778
648
|
var pathToRegexp$2 = { exports: {} };
|
|
779
649
|
var isarray$1 = Array.isArray || function(arr) {
|
|
780
650
|
return Object.prototype.toString.call(arr) == "[object Array]";
|
|
@@ -792,7 +662,7 @@
|
|
|
792
662
|
function parse$1(str, options2) {
|
|
793
663
|
var tokens = [];
|
|
794
664
|
var key = 0;
|
|
795
|
-
var
|
|
665
|
+
var index = 0;
|
|
796
666
|
var path = "";
|
|
797
667
|
var defaultDelimiter = options2 && options2.delimiter || "/";
|
|
798
668
|
var res;
|
|
@@ -800,13 +670,13 @@
|
|
|
800
670
|
var m2 = res[0];
|
|
801
671
|
var escaped = res[1];
|
|
802
672
|
var offset = res.index;
|
|
803
|
-
path += str.slice(
|
|
804
|
-
|
|
673
|
+
path += str.slice(index, offset);
|
|
674
|
+
index = offset + m2.length;
|
|
805
675
|
if (escaped) {
|
|
806
676
|
path += escaped[1];
|
|
807
677
|
continue;
|
|
808
678
|
}
|
|
809
|
-
var next = str[
|
|
679
|
+
var next = str[index];
|
|
810
680
|
var prefix2 = res[2];
|
|
811
681
|
var name = res[3];
|
|
812
682
|
var capture = res[4];
|
|
@@ -833,8 +703,8 @@
|
|
|
833
703
|
pattern: pattern ? escapeGroup(pattern) : asterisk ? ".*" : "[^" + escapeString(delimiter) + "]+?"
|
|
834
704
|
});
|
|
835
705
|
}
|
|
836
|
-
if (
|
|
837
|
-
path += str.substr(
|
|
706
|
+
if (index < str.length) {
|
|
707
|
+
path += str.substr(index);
|
|
838
708
|
}
|
|
839
709
|
if (path) {
|
|
840
710
|
tokens.push(path);
|
|
@@ -1148,8 +1018,145 @@
|
|
|
1148
1018
|
var TYPE_STATICS = {};
|
|
1149
1019
|
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
1150
1020
|
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
1021
|
+
var MAX_SIGNED_31_BIT_INT = 1073741823;
|
|
1022
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {};
|
|
1023
|
+
function getUniqueId() {
|
|
1024
|
+
var key = "__global_unique_id__";
|
|
1025
|
+
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
|
|
1026
|
+
}
|
|
1027
|
+
function objectIs(x2, y2) {
|
|
1028
|
+
if (x2 === y2) {
|
|
1029
|
+
return x2 !== 0 || 1 / x2 === 1 / y2;
|
|
1030
|
+
} else {
|
|
1031
|
+
return x2 !== x2 && y2 !== y2;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
function createEventEmitter(value) {
|
|
1035
|
+
var handlers = [];
|
|
1036
|
+
return {
|
|
1037
|
+
on: function on(handler) {
|
|
1038
|
+
handlers.push(handler);
|
|
1039
|
+
},
|
|
1040
|
+
off: function off(handler) {
|
|
1041
|
+
handlers = handlers.filter(function(h2) {
|
|
1042
|
+
return h2 !== handler;
|
|
1043
|
+
});
|
|
1044
|
+
},
|
|
1045
|
+
get: function get() {
|
|
1046
|
+
return value;
|
|
1047
|
+
},
|
|
1048
|
+
set: function set(newValue, changedBits) {
|
|
1049
|
+
value = newValue;
|
|
1050
|
+
handlers.forEach(function(handler) {
|
|
1051
|
+
return handler(value, changedBits);
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
function onlyChild(children) {
|
|
1057
|
+
return Array.isArray(children) ? children[0] : children;
|
|
1058
|
+
}
|
|
1059
|
+
function createReactContext(defaultValue, calculateChangedBits) {
|
|
1060
|
+
var _Provider$childContex, _Consumer$contextType;
|
|
1061
|
+
var contextProp = "__create-react-context-" + getUniqueId() + "__";
|
|
1062
|
+
var Provider = /* @__PURE__ */ function(_React$Component) {
|
|
1063
|
+
_inheritsLoose(Provider2, _React$Component);
|
|
1064
|
+
function Provider2() {
|
|
1065
|
+
var _this;
|
|
1066
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1067
|
+
args[_key] = arguments[_key];
|
|
1068
|
+
}
|
|
1069
|
+
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
1070
|
+
_this.emitter = createEventEmitter(_this.props.value);
|
|
1071
|
+
return _this;
|
|
1072
|
+
}
|
|
1073
|
+
var _proto = Provider2.prototype;
|
|
1074
|
+
_proto.getChildContext = function getChildContext() {
|
|
1075
|
+
var _ref;
|
|
1076
|
+
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
|
|
1077
|
+
};
|
|
1078
|
+
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
1079
|
+
if (this.props.value !== nextProps.value) {
|
|
1080
|
+
var oldValue = this.props.value;
|
|
1081
|
+
var newValue = nextProps.value;
|
|
1082
|
+
var changedBits;
|
|
1083
|
+
if (objectIs(oldValue, newValue)) {
|
|
1084
|
+
changedBits = 0;
|
|
1085
|
+
} else {
|
|
1086
|
+
changedBits = typeof calculateChangedBits === "function" ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
|
|
1087
|
+
changedBits |= 0;
|
|
1088
|
+
if (changedBits !== 0) {
|
|
1089
|
+
this.emitter.set(nextProps.value, changedBits);
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
};
|
|
1094
|
+
_proto.render = function render2() {
|
|
1095
|
+
return this.props.children;
|
|
1096
|
+
};
|
|
1097
|
+
return Provider2;
|
|
1098
|
+
}(React__default["default"].Component);
|
|
1099
|
+
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = PropTypes.object.isRequired, _Provider$childContex);
|
|
1100
|
+
var Consumer = /* @__PURE__ */ function(_React$Component2) {
|
|
1101
|
+
_inheritsLoose(Consumer2, _React$Component2);
|
|
1102
|
+
function Consumer2() {
|
|
1103
|
+
var _this2;
|
|
1104
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1105
|
+
args[_key2] = arguments[_key2];
|
|
1106
|
+
}
|
|
1107
|
+
_this2 = _React$Component2.call.apply(_React$Component2, [this].concat(args)) || this;
|
|
1108
|
+
_this2.observedBits = void 0;
|
|
1109
|
+
_this2.state = {
|
|
1110
|
+
value: _this2.getValue()
|
|
1111
|
+
};
|
|
1112
|
+
_this2.onUpdate = function(newValue, changedBits) {
|
|
1113
|
+
var observedBits = _this2.observedBits | 0;
|
|
1114
|
+
if ((observedBits & changedBits) !== 0) {
|
|
1115
|
+
_this2.setState({
|
|
1116
|
+
value: _this2.getValue()
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
1120
|
+
return _this2;
|
|
1121
|
+
}
|
|
1122
|
+
var _proto2 = Consumer2.prototype;
|
|
1123
|
+
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
1124
|
+
var observedBits = nextProps.observedBits;
|
|
1125
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
1126
|
+
};
|
|
1127
|
+
_proto2.componentDidMount = function componentDidMount() {
|
|
1128
|
+
if (this.context[contextProp]) {
|
|
1129
|
+
this.context[contextProp].on(this.onUpdate);
|
|
1130
|
+
}
|
|
1131
|
+
var observedBits = this.props.observedBits;
|
|
1132
|
+
this.observedBits = observedBits === void 0 || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
|
|
1133
|
+
};
|
|
1134
|
+
_proto2.componentWillUnmount = function componentWillUnmount() {
|
|
1135
|
+
if (this.context[contextProp]) {
|
|
1136
|
+
this.context[contextProp].off(this.onUpdate);
|
|
1137
|
+
}
|
|
1138
|
+
};
|
|
1139
|
+
_proto2.getValue = function getValue() {
|
|
1140
|
+
if (this.context[contextProp]) {
|
|
1141
|
+
return this.context[contextProp].get();
|
|
1142
|
+
} else {
|
|
1143
|
+
return defaultValue;
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
_proto2.render = function render2() {
|
|
1147
|
+
return onlyChild(this.props.children)(this.state.value);
|
|
1148
|
+
};
|
|
1149
|
+
return Consumer2;
|
|
1150
|
+
}(React__default["default"].Component);
|
|
1151
|
+
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = PropTypes.object, _Consumer$contextType);
|
|
1152
|
+
return {
|
|
1153
|
+
Provider,
|
|
1154
|
+
Consumer
|
|
1155
|
+
};
|
|
1156
|
+
}
|
|
1157
|
+
var createContext = React__default["default"].createContext || createReactContext;
|
|
1151
1158
|
var createNamedContext = function createNamedContext2(name) {
|
|
1152
|
-
var context2 =
|
|
1159
|
+
var context2 = createContext();
|
|
1153
1160
|
context2.displayName = name;
|
|
1154
1161
|
return context2;
|
|
1155
1162
|
};
|
|
@@ -1319,8 +1326,8 @@
|
|
|
1319
1326
|
path: path2,
|
|
1320
1327
|
url: path2 === "/" && url === "" ? "/" : url,
|
|
1321
1328
|
isExact,
|
|
1322
|
-
params: keys.reduce(function(memo, key,
|
|
1323
|
-
memo[key.name] = values[
|
|
1329
|
+
params: keys.reduce(function(memo, key, index) {
|
|
1330
|
+
memo[key.name] = values[index];
|
|
1324
1331
|
return memo;
|
|
1325
1332
|
}, {})
|
|
1326
1333
|
};
|
|
@@ -2207,13 +2214,13 @@
|
|
|
2207
2214
|
iconClassPrefix,
|
|
2208
2215
|
iconFontClassName
|
|
2209
2216
|
} = props;
|
|
2210
|
-
const [
|
|
2217
|
+
const [index, setIndex] = React.useState(zIndex || _zIndex);
|
|
2211
2218
|
const [innerVisible, setInnerVisible] = React.useState(visible);
|
|
2212
2219
|
const [showChildren, setShowChildren] = React.useState(true);
|
|
2213
2220
|
const [transitionName, setTransitionName] = React.useState("");
|
|
2214
2221
|
const b2 = cn("popup");
|
|
2215
2222
|
const baseStyle = {
|
|
2216
|
-
zIndex:
|
|
2223
|
+
zIndex: index,
|
|
2217
2224
|
animationDuration: `${duration}s`
|
|
2218
2225
|
};
|
|
2219
2226
|
const overlayStyles = {
|
|
@@ -2704,7 +2711,7 @@
|
|
|
2704
2711
|
const {
|
|
2705
2712
|
children,
|
|
2706
2713
|
columnNum,
|
|
2707
|
-
index
|
|
2714
|
+
index,
|
|
2708
2715
|
gutter,
|
|
2709
2716
|
square,
|
|
2710
2717
|
text,
|
|
@@ -2736,7 +2743,7 @@
|
|
|
2736
2743
|
style.paddingTop = `${100 / +columnNum}%`;
|
|
2737
2744
|
} else if (gutter) {
|
|
2738
2745
|
style.paddingRight = pxCheck2(gutter);
|
|
2739
|
-
if (
|
|
2746
|
+
if (index >= columnNum) {
|
|
2740
2747
|
style.marginTop = pxCheck2(gutter);
|
|
2741
2748
|
}
|
|
2742
2749
|
}
|
|
@@ -3146,11 +3153,11 @@
|
|
|
3146
3153
|
className: "list"
|
|
3147
3154
|
}, slotList || /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3148
3155
|
className: "nut-fixednav__list"
|
|
3149
|
-
}, navList.map((item,
|
|
3156
|
+
}, navList.map((item, index) => {
|
|
3150
3157
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3151
3158
|
className: "nut-fixednav__list-item",
|
|
3152
3159
|
onClick: (event) => onSelectCb(event, item),
|
|
3153
|
-
key: item.id ||
|
|
3160
|
+
key: item.id || index
|
|
3154
3161
|
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
3155
3162
|
src: item.icon,
|
|
3156
3163
|
alt: ""
|
|
@@ -3265,7 +3272,7 @@
|
|
|
3265
3272
|
active,
|
|
3266
3273
|
activeColor,
|
|
3267
3274
|
unactiveColor,
|
|
3268
|
-
index
|
|
3275
|
+
index,
|
|
3269
3276
|
handleClick: handleClick2,
|
|
3270
3277
|
iconClassPrefix,
|
|
3271
3278
|
iconFontClassName
|
|
@@ -3291,7 +3298,7 @@
|
|
|
3291
3298
|
color: active ? activeColor : unactiveColor
|
|
3292
3299
|
},
|
|
3293
3300
|
onClick: () => {
|
|
3294
|
-
handleClick2(
|
|
3301
|
+
handleClick2(index);
|
|
3295
3302
|
}
|
|
3296
3303
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
3297
3304
|
className: `${bIcon()}`
|
|
@@ -5452,8 +5459,8 @@
|
|
|
5452
5459
|
return currentFrame.length > 0;
|
|
5453
5460
|
}
|
|
5454
5461
|
function findIndex(arr, test) {
|
|
5455
|
-
const
|
|
5456
|
-
return
|
|
5462
|
+
const index = arr.findIndex(test);
|
|
5463
|
+
return index < 0 ? arr.length : index;
|
|
5457
5464
|
}
|
|
5458
5465
|
const colors = {
|
|
5459
5466
|
transparent: 0,
|
|
@@ -7905,8 +7912,8 @@
|
|
|
7905
7912
|
each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));
|
|
7906
7913
|
return this;
|
|
7907
7914
|
};
|
|
7908
|
-
const _getProps = function _getProps2(arg, ctrl,
|
|
7909
|
-
return is.fun(arg) ? arg(
|
|
7915
|
+
const _getProps = function _getProps2(arg, ctrl, index) {
|
|
7916
|
+
return is.fun(arg) ? arg(index, ctrl) : arg;
|
|
7910
7917
|
};
|
|
7911
7918
|
SpringRef2._getProps = _getProps;
|
|
7912
7919
|
return SpringRef2;
|
|
@@ -8378,18 +8385,18 @@
|
|
|
8378
8385
|
state.current.listHeight.push(height2);
|
|
8379
8386
|
}
|
|
8380
8387
|
};
|
|
8381
|
-
const scrollTo = (
|
|
8382
|
-
if (!
|
|
8388
|
+
const scrollTo = (index) => {
|
|
8389
|
+
if (!index && index !== 0) {
|
|
8383
8390
|
return;
|
|
8384
8391
|
}
|
|
8385
8392
|
if (!state.current.listHeight.length) {
|
|
8386
8393
|
calculateHeight();
|
|
8387
8394
|
}
|
|
8388
|
-
let cacheIndex =
|
|
8389
|
-
if (
|
|
8395
|
+
let cacheIndex = index;
|
|
8396
|
+
if (index < 0) {
|
|
8390
8397
|
cacheIndex = 0;
|
|
8391
8398
|
}
|
|
8392
|
-
if (
|
|
8399
|
+
if (index > state.current.listHeight.length - 2) {
|
|
8393
8400
|
cacheIndex = state.current.listHeight.length - 2;
|
|
8394
8401
|
}
|
|
8395
8402
|
setCodeIndex(cacheIndex);
|
|
@@ -8400,11 +8407,11 @@
|
|
|
8400
8407
|
const bind = useGesture({
|
|
8401
8408
|
onDragStart: ({ target, offset }) => {
|
|
8402
8409
|
setScrollStart(true);
|
|
8403
|
-
const
|
|
8410
|
+
const index = Number(getData(target, "index"));
|
|
8404
8411
|
touchState.current.y1 = offset[1];
|
|
8405
|
-
state.current.anchorIndex = +
|
|
8406
|
-
setCodeIndex((codeIndex2) => codeIndex2 +
|
|
8407
|
-
scrollTo(
|
|
8412
|
+
state.current.anchorIndex = +index;
|
|
8413
|
+
setCodeIndex((codeIndex2) => codeIndex2 + index);
|
|
8414
|
+
scrollTo(index);
|
|
8408
8415
|
},
|
|
8409
8416
|
onDragEnd: ({ offset }) => {
|
|
8410
8417
|
touchState.current.y2 = offset[1];
|
|
@@ -8509,13 +8516,13 @@
|
|
|
8509
8516
|
className: b2("bars__inner"),
|
|
8510
8517
|
...bind(),
|
|
8511
8518
|
style: { touchAction: "pan-y" }
|
|
8512
|
-
}, indexList.map((item,
|
|
8519
|
+
}, indexList.map((item, index) => {
|
|
8513
8520
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8514
8521
|
className: b2("bars__inner__item", {
|
|
8515
8522
|
active: item[acceptKey] === indexList[currentIndex][acceptKey]
|
|
8516
8523
|
}),
|
|
8517
|
-
"data-index":
|
|
8518
|
-
key:
|
|
8524
|
+
"data-index": index,
|
|
8525
|
+
key: index,
|
|
8519
8526
|
onClick: () => handleClickIndex(item[acceptKey])
|
|
8520
8527
|
}, item[acceptKey]);
|
|
8521
8528
|
}))));
|
|
@@ -8641,9 +8648,9 @@
|
|
|
8641
8648
|
onClick: (e2) => selectPage(Number(currentPage) - 1, true)
|
|
8642
8649
|
}, prevText || locale.pagination.prev), mode === "multi" ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8643
8650
|
className: `${paginationBem("contain")}`
|
|
8644
|
-
}, pages.map((item,
|
|
8651
|
+
}, pages.map((item, index) => {
|
|
8645
8652
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8646
|
-
key: `${
|
|
8653
|
+
key: `${index}pagination`,
|
|
8647
8654
|
className: `${paginationBem("item")} ${item.active ? "active" : ""}`,
|
|
8648
8655
|
onClick: (e2) => !item.active ? selectPage(item.number, true) : ""
|
|
8649
8656
|
}, pageNodeRender ? pageNodeRender(item) : item.text);
|
|
@@ -8750,12 +8757,12 @@
|
|
|
8750
8757
|
color: type === "smile" ? color : "",
|
|
8751
8758
|
background: type === "line" ? color : ""
|
|
8752
8759
|
};
|
|
8753
|
-
const
|
|
8760
|
+
const index = titles.current.findIndex((t2) => t2.paneKey === value);
|
|
8754
8761
|
const contentStyle = {
|
|
8755
|
-
transform: direction === "horizontal" ? `translate3d(-${
|
|
8762
|
+
transform: direction === "horizontal" ? `translate3d(-${index * 100}%, 0, 0)` : `translate3d( 0,-${index * 100}%, 0)`,
|
|
8756
8763
|
transitionDuration: `${animatedTime}ms`
|
|
8757
8764
|
};
|
|
8758
|
-
const tabChange = (item,
|
|
8765
|
+
const tabChange = (item, index2) => {
|
|
8759
8766
|
onClick && onClick(item);
|
|
8760
8767
|
if (item.disabled) {
|
|
8761
8768
|
return;
|
|
@@ -8769,7 +8776,7 @@
|
|
|
8769
8776
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8770
8777
|
className: classesTitle,
|
|
8771
8778
|
style: { background }
|
|
8772
|
-
}, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item,
|
|
8779
|
+
}, !!titleNode && typeof titleNode === "function" ? titleNode() : titles.current.map((item, index2) => {
|
|
8773
8780
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
8774
8781
|
style: titleStyle,
|
|
8775
8782
|
onClick: (e2) => tabChange(item),
|
|
@@ -9086,27 +9093,27 @@
|
|
|
9086
9093
|
}, []);
|
|
9087
9094
|
const [itemShow, setItemShow] = React.useState([]);
|
|
9088
9095
|
const [itemTitle, setItemTitle] = React.useState([]);
|
|
9089
|
-
const toggleItemShow = (
|
|
9090
|
-
itemShow[
|
|
9091
|
-
const temp = itemShow.map((i, idx) => idx ===
|
|
9096
|
+
const toggleItemShow = (index) => {
|
|
9097
|
+
itemShow[index] = !itemShow[index];
|
|
9098
|
+
const temp = itemShow.map((i, idx) => idx === index ? i : false);
|
|
9092
9099
|
setItemShow([...temp]);
|
|
9093
9100
|
};
|
|
9094
|
-
const hideItemShow = (
|
|
9095
|
-
itemShow[
|
|
9101
|
+
const hideItemShow = (index) => {
|
|
9102
|
+
itemShow[index] = false;
|
|
9096
9103
|
setItemShow([...itemShow]);
|
|
9097
9104
|
};
|
|
9098
|
-
const updateTitle = (text,
|
|
9099
|
-
itemTitle[
|
|
9105
|
+
const updateTitle = (text, index) => {
|
|
9106
|
+
itemTitle[index] = text;
|
|
9100
9107
|
setItemTitle([...itemTitle]);
|
|
9101
9108
|
};
|
|
9102
9109
|
const parent = () => {
|
|
9103
9110
|
return parentRef;
|
|
9104
9111
|
};
|
|
9105
9112
|
const cloneChildren = () => {
|
|
9106
|
-
return React__default["default"].Children.map(children, (child,
|
|
9113
|
+
return React__default["default"].Children.map(children, (child, index) => {
|
|
9107
9114
|
return React__default["default"].cloneElement(child, {
|
|
9108
|
-
showPopup: itemShow[
|
|
9109
|
-
orderKey:
|
|
9115
|
+
showPopup: itemShow[index],
|
|
9116
|
+
orderKey: index,
|
|
9110
9117
|
activeColor,
|
|
9111
9118
|
parent: {
|
|
9112
9119
|
closeOnClickOverlay,
|
|
@@ -9126,7 +9133,7 @@
|
|
|
9126
9133
|
ref: parentRef
|
|
9127
9134
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9128
9135
|
className: `nut-menu__bar ${itemShow.includes(true) ? "opened" : ""} ${className}`
|
|
9129
|
-
}, React__default["default"].Children.toArray(children).map((child,
|
|
9136
|
+
}, React__default["default"].Children.toArray(children).map((child, index) => {
|
|
9130
9137
|
if (!child)
|
|
9131
9138
|
return null;
|
|
9132
9139
|
const { disabled, title, value, direction, options: options2 } = child.props;
|
|
@@ -9136,25 +9143,25 @@
|
|
|
9136
9143
|
function finallyTitle() {
|
|
9137
9144
|
if (title)
|
|
9138
9145
|
return title;
|
|
9139
|
-
if (itemTitle && itemTitle[
|
|
9140
|
-
return itemTitle[
|
|
9146
|
+
if (itemTitle && itemTitle[index])
|
|
9147
|
+
return itemTitle[index];
|
|
9141
9148
|
if (currentTitle && currentTitle[0] && currentTitle[0].text)
|
|
9142
9149
|
return currentTitle[0].text;
|
|
9143
9150
|
return "";
|
|
9144
9151
|
}
|
|
9145
9152
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9146
9153
|
className: `nut-menu__item ${classNames({
|
|
9147
|
-
active: itemShow[
|
|
9154
|
+
active: itemShow[index],
|
|
9148
9155
|
disabled
|
|
9149
9156
|
})}`,
|
|
9150
|
-
style: { color: itemShow[
|
|
9151
|
-
key:
|
|
9157
|
+
style: { color: itemShow[index] ? activeColor : "" },
|
|
9158
|
+
key: index,
|
|
9152
9159
|
onClick: () => {
|
|
9153
|
-
!disabled && toggleItemShow(
|
|
9160
|
+
!disabled && toggleItemShow(index);
|
|
9154
9161
|
}
|
|
9155
9162
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9156
9163
|
className: `nut-menu__title ${classNames({
|
|
9157
|
-
active: itemShow[
|
|
9164
|
+
active: itemShow[index],
|
|
9158
9165
|
disabled
|
|
9159
9166
|
})}`
|
|
9160
9167
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -9296,7 +9303,7 @@
|
|
|
9296
9303
|
classNames: "menu-item"
|
|
9297
9304
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9298
9305
|
className: "nut-menu-item__content"
|
|
9299
|
-
}, options2 == null ? void 0 : options2.map((item,
|
|
9306
|
+
}, options2 == null ? void 0 : options2.map((item, index) => {
|
|
9300
9307
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9301
9308
|
className: `nut-menu-item__option ${classNames({
|
|
9302
9309
|
active: item.value === _value
|
|
@@ -9920,20 +9927,20 @@
|
|
|
9920
9927
|
})) : null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9921
9928
|
className: "nut-range-bar",
|
|
9922
9929
|
style: barStyle()
|
|
9923
|
-
}, range ? [0, 1].map((item,
|
|
9930
|
+
}, range ? [0, 1].map((item, index) => {
|
|
9924
9931
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9925
9932
|
role: "slider",
|
|
9926
|
-
key:
|
|
9927
|
-
className: `${
|
|
9928
|
-
${
|
|
9933
|
+
key: index,
|
|
9934
|
+
className: `${index === 0 ? "nut-range-button-wrapper-left" : ""}
|
|
9935
|
+
${index === 1 ? "nut-range-button-wrapper-right" : ""}`,
|
|
9929
9936
|
tabIndex: disabled ? -1 : 0,
|
|
9930
9937
|
"aria-valuemin": +min,
|
|
9931
|
-
"aria-valuenow": curValue(
|
|
9938
|
+
"aria-valuenow": curValue(index),
|
|
9932
9939
|
"aria-valuemax": +max,
|
|
9933
9940
|
"aria-orientation": "horizontal",
|
|
9934
9941
|
onTouchStart: (e2) => {
|
|
9935
|
-
if (typeof
|
|
9936
|
-
SetButtonIndex(
|
|
9942
|
+
if (typeof index === "number") {
|
|
9943
|
+
SetButtonIndex(index);
|
|
9937
9944
|
}
|
|
9938
9945
|
onTouchStart(e2);
|
|
9939
9946
|
},
|
|
@@ -9954,7 +9961,7 @@
|
|
|
9954
9961
|
style: buttonStyle()
|
|
9955
9962
|
}, !hiddenTag ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9956
9963
|
className: "number"
|
|
9957
|
-
}, curValue(
|
|
9964
|
+
}, curValue(index)) : null));
|
|
9958
9965
|
}) : /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
9959
9966
|
role: "slider",
|
|
9960
9967
|
className: "nut-range-button-wrapper",
|
|
@@ -9995,7 +10002,7 @@
|
|
|
9995
10002
|
},
|
|
9996
10003
|
getWhatDay(year, month, day) {
|
|
9997
10004
|
const date = new Date(`${year}/${month}/${day}`);
|
|
9998
|
-
const
|
|
10005
|
+
const index = date.getDay();
|
|
9999
10006
|
const dayNames = [
|
|
10000
10007
|
"\u661F\u671F\u65E5",
|
|
10001
10008
|
"\u661F\u671F\u4E00",
|
|
@@ -10005,7 +10012,7 @@
|
|
|
10005
10012
|
"\u661F\u671F\u4E94",
|
|
10006
10013
|
"\u661F\u671F\u516D"
|
|
10007
10014
|
];
|
|
10008
|
-
return dayNames[
|
|
10015
|
+
return dayNames[index];
|
|
10009
10016
|
},
|
|
10010
10017
|
getMonthPreDay(year, month) {
|
|
10011
10018
|
const date = new Date(`${year}/${month}/01`);
|
|
@@ -10249,9 +10256,9 @@
|
|
|
10249
10256
|
if (type2 === "multiple") {
|
|
10250
10257
|
if (state.currDate.length > 0) {
|
|
10251
10258
|
let hasIndex = "";
|
|
10252
|
-
state.currDate.forEach((item,
|
|
10259
|
+
state.currDate.forEach((item, index) => {
|
|
10253
10260
|
if (item === days[3]) {
|
|
10254
|
-
hasIndex =
|
|
10261
|
+
hasIndex = index;
|
|
10255
10262
|
}
|
|
10256
10263
|
});
|
|
10257
10264
|
if (isFirst) {
|
|
@@ -10538,19 +10545,19 @@
|
|
|
10538
10545
|
let current = 0;
|
|
10539
10546
|
let lastCurrent = 0;
|
|
10540
10547
|
if (state.defaultData.length > 0) {
|
|
10541
|
-
state.monthsData.forEach((item,
|
|
10548
|
+
state.monthsData.forEach((item, index) => {
|
|
10542
10549
|
if (item.title === locale.calendaritem.monthTitle(
|
|
10543
10550
|
state.defaultData[0],
|
|
10544
10551
|
state.defaultData[1]
|
|
10545
10552
|
)) {
|
|
10546
|
-
current =
|
|
10553
|
+
current = index;
|
|
10547
10554
|
}
|
|
10548
10555
|
if (props.type === "range") {
|
|
10549
10556
|
if (item.title === locale.calendaritem.monthTitle(
|
|
10550
10557
|
state.defaultData[3],
|
|
10551
10558
|
state.defaultData[4]
|
|
10552
10559
|
)) {
|
|
10553
|
-
lastCurrent =
|
|
10560
|
+
lastCurrent = index;
|
|
10554
10561
|
}
|
|
10555
10562
|
}
|
|
10556
10563
|
});
|
|
@@ -10574,9 +10581,9 @@
|
|
|
10574
10581
|
[...state.currDate].forEach((item) => {
|
|
10575
10582
|
const dateArr = splitDate(item);
|
|
10576
10583
|
let current2 = state.currentIndex;
|
|
10577
|
-
state.monthsData.forEach((item2,
|
|
10584
|
+
state.monthsData.forEach((item2, index) => {
|
|
10578
10585
|
if (item2.title === locale.calendaritem.monthTitle(dateArr[0], dateArr[1])) {
|
|
10579
|
-
current2 =
|
|
10586
|
+
current2 = index;
|
|
10580
10587
|
}
|
|
10581
10588
|
});
|
|
10582
10589
|
chooseDay(
|
|
@@ -10616,10 +10623,10 @@
|
|
|
10616
10623
|
date = state.propEndDate;
|
|
10617
10624
|
}
|
|
10618
10625
|
const dateArr = splitDate(date);
|
|
10619
|
-
state.monthsData.forEach((item,
|
|
10626
|
+
state.monthsData.forEach((item, index) => {
|
|
10620
10627
|
if (item.title === locale.calendaritem.monthTitle(dateArr[0], dateArr[1])) {
|
|
10621
10628
|
if (months.current) {
|
|
10622
|
-
const distance = state.monthsData[
|
|
10629
|
+
const distance = state.monthsData[index].cssScrollHeight - months.current.scrollTop;
|
|
10623
10630
|
if (toDateAnimation) {
|
|
10624
10631
|
let flag = 0;
|
|
10625
10632
|
const interval = setInterval(() => {
|
|
@@ -10631,12 +10638,12 @@
|
|
|
10631
10638
|
if (flag >= 10) {
|
|
10632
10639
|
clearInterval(interval);
|
|
10633
10640
|
if (months.current) {
|
|
10634
|
-
months.current.scrollTop = state.monthsData[
|
|
10641
|
+
months.current.scrollTop = state.monthsData[index].cssScrollHeight;
|
|
10635
10642
|
}
|
|
10636
10643
|
}
|
|
10637
10644
|
}, 40);
|
|
10638
10645
|
} else {
|
|
10639
|
-
months.current.scrollTop = state.monthsData[
|
|
10646
|
+
months.current.scrollTop = state.monthsData[index].cssScrollHeight;
|
|
10640
10647
|
}
|
|
10641
10648
|
}
|
|
10642
10649
|
}
|
|
@@ -11049,8 +11056,8 @@
|
|
|
11049
11056
|
const [startY, setStartY] = React.useState(0);
|
|
11050
11057
|
const transformY = React.useRef(0);
|
|
11051
11058
|
const [scrollDistance, setScrollDistance] = React.useState(0);
|
|
11052
|
-
const isHidden = (
|
|
11053
|
-
if (
|
|
11059
|
+
const isHidden = (index) => {
|
|
11060
|
+
if (index >= currIndex + 8 || index <= currIndex - 8) {
|
|
11054
11061
|
return true;
|
|
11055
11062
|
}
|
|
11056
11063
|
return false;
|
|
@@ -11130,11 +11137,11 @@
|
|
|
11130
11137
|
};
|
|
11131
11138
|
const modifyStatus = (type, val) => {
|
|
11132
11139
|
const value = val || defaultValue;
|
|
11133
|
-
let
|
|
11140
|
+
let index = -1;
|
|
11134
11141
|
if (value) {
|
|
11135
11142
|
listData.some((item, idx) => {
|
|
11136
11143
|
if (item.value === value) {
|
|
11137
|
-
|
|
11144
|
+
index = idx;
|
|
11138
11145
|
return true;
|
|
11139
11146
|
}
|
|
11140
11147
|
return false;
|
|
@@ -11142,12 +11149,12 @@
|
|
|
11142
11149
|
} else {
|
|
11143
11150
|
listData.forEach((item, i) => {
|
|
11144
11151
|
if (item.value === defaultValue) {
|
|
11145
|
-
|
|
11152
|
+
index = i;
|
|
11146
11153
|
}
|
|
11147
11154
|
});
|
|
11148
11155
|
}
|
|
11149
|
-
setCurrIndex(
|
|
11150
|
-
const move =
|
|
11156
|
+
setCurrIndex(index === -1 ? 1 : index + 1);
|
|
11157
|
+
const move = index === -1 ? 0 : index * lineSpacing;
|
|
11151
11158
|
type && setChooseValue(-move);
|
|
11152
11159
|
setMove(-move);
|
|
11153
11160
|
};
|
|
@@ -11199,18 +11206,18 @@
|
|
|
11199
11206
|
ref: rollerRef,
|
|
11200
11207
|
style: threeDimensional ? touchRollerStyle() : touchTileStyle(),
|
|
11201
11208
|
onTransitionEnd: stopMomentum
|
|
11202
|
-
}, threeDimensional && listData.map((item,
|
|
11209
|
+
}, threeDimensional && listData.map((item, index) => {
|
|
11203
11210
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11204
|
-
className: `nut-picker-roller-item ${isHidden(
|
|
11211
|
+
className: `nut-picker-roller-item ${isHidden(index + 1) && "nut-picker-roller-item-hidden"}`,
|
|
11205
11212
|
style: {
|
|
11206
|
-
transform: `rotate3d(1, 0, 0, ${-rotation * (
|
|
11213
|
+
transform: `rotate3d(1, 0, 0, ${-rotation * (index + 1)}deg) translate3d(0px, 0px, 104px)`
|
|
11207
11214
|
},
|
|
11208
|
-
key: item.value ? item.value :
|
|
11215
|
+
key: item.value ? item.value : index
|
|
11209
11216
|
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.text ? item.text : item));
|
|
11210
|
-
}), !threeDimensional && listData.map((item,
|
|
11217
|
+
}), !threeDimensional && listData.map((item, index) => {
|
|
11211
11218
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11212
11219
|
className: "nut-picker-roller-item-tile",
|
|
11213
|
-
key: item.value ? item.value :
|
|
11220
|
+
key: item.value ? item.value : index
|
|
11214
11221
|
}, /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.text ? item.text : item));
|
|
11215
11222
|
})), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11216
11223
|
className: "nut-picker-mask"
|
|
@@ -11222,9 +11229,9 @@
|
|
|
11222
11229
|
function useRefs() {
|
|
11223
11230
|
const refs = React__default["default"].useRef([]);
|
|
11224
11231
|
const setRefs = React__default["default"].useCallback(
|
|
11225
|
-
(
|
|
11232
|
+
(index) => (el) => {
|
|
11226
11233
|
if (el)
|
|
11227
|
-
refs.current[
|
|
11234
|
+
refs.current[index] = el;
|
|
11228
11235
|
},
|
|
11229
11236
|
[]
|
|
11230
11237
|
);
|
|
@@ -11298,10 +11305,10 @@
|
|
|
11298
11305
|
};
|
|
11299
11306
|
const selectedOptions = () => {
|
|
11300
11307
|
const optins = [];
|
|
11301
|
-
columnsList.map((column,
|
|
11308
|
+
columnsList.map((column, index) => {
|
|
11302
11309
|
let currOptions = [];
|
|
11303
11310
|
currOptions = column.filter(
|
|
11304
|
-
(item) => item.value === chooseValueData[
|
|
11311
|
+
(item) => item.value === chooseValueData[index]
|
|
11305
11312
|
);
|
|
11306
11313
|
if (currOptions[0]) {
|
|
11307
11314
|
optins.push(currOptions[0]);
|
|
@@ -11318,17 +11325,17 @@
|
|
|
11318
11325
|
if (columnsType() === "cascade") {
|
|
11319
11326
|
chooseValueData[columnIndex2] = option.value ? option.value : "";
|
|
11320
11327
|
setchooseValueData([...chooseValueData]);
|
|
11321
|
-
let
|
|
11328
|
+
let index = columnIndex2;
|
|
11322
11329
|
let cursor = option;
|
|
11323
11330
|
while (cursor && cursor.children && cursor.children[0]) {
|
|
11324
|
-
chooseValueData[
|
|
11331
|
+
chooseValueData[index + 1] = cursor.children[0].value;
|
|
11325
11332
|
setchooseValueData([...chooseValueData]);
|
|
11326
|
-
|
|
11333
|
+
index++;
|
|
11327
11334
|
const cc = cursor.children[0];
|
|
11328
11335
|
cursor = cc;
|
|
11329
11336
|
}
|
|
11330
11337
|
if (cursor && cursor.children) {
|
|
11331
|
-
chooseValueData[
|
|
11338
|
+
chooseValueData[index + 1] = "";
|
|
11332
11339
|
setchooseValueData([...chooseValueData]);
|
|
11333
11340
|
}
|
|
11334
11341
|
setColumnsList(normalListData());
|
|
@@ -11380,12 +11387,12 @@
|
|
|
11380
11387
|
while (cursor && cursor.children) {
|
|
11381
11388
|
const options2 = cursor.children;
|
|
11382
11389
|
const value = defaultValues[columnIndex2];
|
|
11383
|
-
let
|
|
11390
|
+
let index = options2.findIndex(
|
|
11384
11391
|
(columnItem) => columnItem.value === value
|
|
11385
11392
|
);
|
|
11386
|
-
if (
|
|
11387
|
-
|
|
11388
|
-
cursor = cursor.children[
|
|
11393
|
+
if (index === -1)
|
|
11394
|
+
index = 0;
|
|
11395
|
+
cursor = cursor.children[index];
|
|
11389
11396
|
columnIndex2++;
|
|
11390
11397
|
formatted.push(options2);
|
|
11391
11398
|
}
|
|
@@ -11429,16 +11436,16 @@
|
|
|
11429
11436
|
}, renderToolbar(), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
11430
11437
|
className: b2("panel"),
|
|
11431
11438
|
ref: pickerRef
|
|
11432
|
-
}, columnsList == null ? void 0 : columnsList.map((item,
|
|
11439
|
+
}, columnsList == null ? void 0 : columnsList.map((item, index) => {
|
|
11433
11440
|
return /* @__PURE__ */ React__default["default"].createElement(PickerSlot, {
|
|
11434
|
-
ref: setRefs(
|
|
11435
|
-
defaultValue: chooseValueData == null ? void 0 : chooseValueData[
|
|
11441
|
+
ref: setRefs(index),
|
|
11442
|
+
defaultValue: chooseValueData == null ? void 0 : chooseValueData[index],
|
|
11436
11443
|
listData: item,
|
|
11437
11444
|
threeDimensional,
|
|
11438
|
-
chooseItem: (value,
|
|
11445
|
+
chooseItem: (value, index2) => chooseItem(value, index2),
|
|
11439
11446
|
swipeDuration,
|
|
11440
|
-
key:
|
|
11441
|
-
keyIndex:
|
|
11447
|
+
key: index,
|
|
11448
|
+
keyIndex: index
|
|
11442
11449
|
});
|
|
11443
11450
|
}))));
|
|
11444
11451
|
};
|
|
@@ -11597,7 +11604,7 @@
|
|
|
11597
11604
|
}
|
|
11598
11605
|
return result;
|
|
11599
11606
|
};
|
|
11600
|
-
const updateChooseValueCustmer = (
|
|
11607
|
+
const updateChooseValueCustmer = (index, selectedValue, cacheValueData) => {
|
|
11601
11608
|
if (["date", "datetime", "datehour", "month-day", "year-month"].includes(
|
|
11602
11609
|
type.toLocaleLowerCase()
|
|
11603
11610
|
)) {
|
|
@@ -11636,7 +11643,7 @@
|
|
|
11636
11643
|
const isEqual2 = (currentDate == null ? void 0 : currentDate.getTime()) === (date == null ? void 0 : date.getTime());
|
|
11637
11644
|
date && isDate(date) && !isEqual2 && setCurrentDate(formatValue(date));
|
|
11638
11645
|
}
|
|
11639
|
-
props.onChangeDatePicker && props.onChangeDatePicker(
|
|
11646
|
+
props.onChangeDatePicker && props.onChangeDatePicker(index, selectedValue, cacheValueData);
|
|
11640
11647
|
};
|
|
11641
11648
|
const padZero = (num, targetLength = 2) => {
|
|
11642
11649
|
let str = `${num}`;
|
|
@@ -11662,7 +11669,7 @@
|
|
|
11662
11669
|
const generateValue = (min, max, val, type2, columnIndex) => {
|
|
11663
11670
|
let cmin = min;
|
|
11664
11671
|
const arr = [];
|
|
11665
|
-
let
|
|
11672
|
+
let index = 0;
|
|
11666
11673
|
while (cmin <= max) {
|
|
11667
11674
|
arr.push(formatterOption(type2, cmin));
|
|
11668
11675
|
if (type2 === "minute") {
|
|
@@ -11671,10 +11678,10 @@
|
|
|
11671
11678
|
cmin++;
|
|
11672
11679
|
}
|
|
11673
11680
|
if (cmin <= val) {
|
|
11674
|
-
|
|
11681
|
+
index++;
|
|
11675
11682
|
}
|
|
11676
11683
|
}
|
|
11677
|
-
defaultValue[columnIndex] = arr[
|
|
11684
|
+
defaultValue[columnIndex] = arr[index].value;
|
|
11678
11685
|
setDefaultValue([...defaultValue]);
|
|
11679
11686
|
if (props.filter && props.filter(type2, arr)) {
|
|
11680
11687
|
return props.filter(type2, arr);
|
|
@@ -11736,7 +11743,7 @@
|
|
|
11736
11743
|
onClose: onCloseDatePicker,
|
|
11737
11744
|
defaultValueData: defaultValue,
|
|
11738
11745
|
onConfirm: (values, options2) => onConfirmDatePicker && onConfirmDatePicker(values, options2),
|
|
11739
|
-
onChange: (
|
|
11746
|
+
onChange: (index, value, list) => updateChooseValueCustmer(index, value, list),
|
|
11740
11747
|
threeDimensional,
|
|
11741
11748
|
ref: pickerRef
|
|
11742
11749
|
}));
|
|
@@ -11916,14 +11923,14 @@
|
|
|
11916
11923
|
InputNumber.defaultProps = defaultProps$S;
|
|
11917
11924
|
InputNumber.displayName = "NutInputNumber";
|
|
11918
11925
|
function trimExtraChar(value, char, regExp) {
|
|
11919
|
-
const
|
|
11920
|
-
if (
|
|
11926
|
+
const index = value.indexOf(char);
|
|
11927
|
+
if (index === -1) {
|
|
11921
11928
|
return value;
|
|
11922
11929
|
}
|
|
11923
|
-
if (char === "-" &&
|
|
11924
|
-
return value.slice(0,
|
|
11930
|
+
if (char === "-" && index !== 0) {
|
|
11931
|
+
return value.slice(0, index);
|
|
11925
11932
|
}
|
|
11926
|
-
return value.slice(0,
|
|
11933
|
+
return value.slice(0, index + 1) + value.slice(index).replace(regExp, "");
|
|
11927
11934
|
}
|
|
11928
11935
|
function formatNumber(value, allowDot = true, allowMinus = true) {
|
|
11929
11936
|
if (allowDot) {
|
|
@@ -12275,7 +12282,7 @@
|
|
|
12275
12282
|
return val2State === child.props.value;
|
|
12276
12283
|
}
|
|
12277
12284
|
function cloneChildren() {
|
|
12278
|
-
return React__default["default"].Children.map(children, (child,
|
|
12285
|
+
return React__default["default"].Children.map(children, (child, index) => {
|
|
12279
12286
|
const childChecked = validateChildChecked(child);
|
|
12280
12287
|
if (child.type.displayName !== "NutRadio") {
|
|
12281
12288
|
return React__default["default"].cloneElement(child);
|
|
@@ -12454,14 +12461,14 @@
|
|
|
12454
12461
|
const pxCheck2 = (value) => {
|
|
12455
12462
|
return Number.isNaN(Number(value)) ? String(value) : `${value}px`;
|
|
12456
12463
|
};
|
|
12457
|
-
const onClick = (e2,
|
|
12464
|
+
const onClick = (e2, index) => {
|
|
12458
12465
|
e2.preventDefault();
|
|
12459
12466
|
e2.stopPropagation();
|
|
12460
12467
|
if (disabled || readonly)
|
|
12461
12468
|
return;
|
|
12462
12469
|
let value = 0;
|
|
12463
|
-
if (!(
|
|
12464
|
-
value =
|
|
12470
|
+
if (!(index === 1 && score === index)) {
|
|
12471
|
+
value = index;
|
|
12465
12472
|
if (allowHalf) {
|
|
12466
12473
|
if ((e2 == null ? void 0 : e2.target).className.includes("__icon--half")) {
|
|
12467
12474
|
value -= 0.5;
|
|
@@ -12645,11 +12652,11 @@
|
|
|
12645
12652
|
}), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12646
12653
|
className: b2("input-fake"),
|
|
12647
12654
|
onClick: () => focus()
|
|
12648
|
-
}, [...new Array(comLen).keys()].map((item,
|
|
12655
|
+
}, [...new Array(comLen).keys()].map((item, index) => {
|
|
12649
12656
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12650
12657
|
className: b2("input-fake__li"),
|
|
12651
|
-
key:
|
|
12652
|
-
}, String(inputValue).length >
|
|
12658
|
+
key: index
|
|
12659
|
+
}, String(inputValue).length > index ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
12653
12660
|
className: b2("input-fake__li__icon")
|
|
12654
12661
|
}) : null);
|
|
12655
12662
|
}))), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -13192,9 +13199,9 @@
|
|
|
13192
13199
|
});
|
|
13193
13200
|
}
|
|
13194
13201
|
}));
|
|
13195
|
-
const clearUploadQueue = (
|
|
13196
|
-
if (
|
|
13197
|
-
uploadQueue.splice(
|
|
13202
|
+
const clearUploadQueue = (index = -1) => {
|
|
13203
|
+
if (index > -1) {
|
|
13204
|
+
uploadQueue.splice(index, 1);
|
|
13198
13205
|
setUploadQueue(uploadQueue);
|
|
13199
13206
|
} else {
|
|
13200
13207
|
setUploadQueue([]);
|
|
@@ -13203,7 +13210,7 @@
|
|
|
13203
13210
|
const clearInputValue = (el) => {
|
|
13204
13211
|
el.value = "";
|
|
13205
13212
|
};
|
|
13206
|
-
const executeUpload = (fileItem,
|
|
13213
|
+
const executeUpload = (fileItem, index) => {
|
|
13207
13214
|
const uploadOption = new UploadOptions();
|
|
13208
13215
|
uploadOption.url = url;
|
|
13209
13216
|
for (const [key, value] of Object.entries(data)) {
|
|
@@ -13221,7 +13228,7 @@
|
|
|
13221
13228
|
} catch (error) {
|
|
13222
13229
|
}
|
|
13223
13230
|
uploadOption.onStart = (option) => {
|
|
13224
|
-
clearUploadQueue(
|
|
13231
|
+
clearUploadQueue(index);
|
|
13225
13232
|
setFileList((fileList2) => {
|
|
13226
13233
|
fileList2.map((item) => {
|
|
13227
13234
|
if (item.uid === fileItem.uid) {
|
|
@@ -13294,7 +13301,7 @@
|
|
|
13294
13301
|
}
|
|
13295
13302
|
};
|
|
13296
13303
|
const readFile = (files) => {
|
|
13297
|
-
files.forEach((file,
|
|
13304
|
+
files.forEach((file, index) => {
|
|
13298
13305
|
const formData = new FormData();
|
|
13299
13306
|
formData.append(name, file);
|
|
13300
13307
|
const fileItem = new FileItem();
|
|
@@ -13304,7 +13311,7 @@
|
|
|
13304
13311
|
fileItem.formData = formData;
|
|
13305
13312
|
fileItem.uid = file.lastModified + fileItem.uid;
|
|
13306
13313
|
fileItem.message = locale.uploader.readyUpload;
|
|
13307
|
-
executeUpload(fileItem,
|
|
13314
|
+
executeUpload(fileItem, index);
|
|
13308
13315
|
if (isPreview && file.type.includes("image")) {
|
|
13309
13316
|
const reader = new FileReader();
|
|
13310
13317
|
reader.onload = (event) => {
|
|
@@ -13336,15 +13343,15 @@
|
|
|
13336
13343
|
filterFile.splice(maximum2, filterFile.length - maximum2);
|
|
13337
13344
|
}
|
|
13338
13345
|
if (fileList.length !== 0) {
|
|
13339
|
-
const
|
|
13340
|
-
filterFile.splice(
|
|
13346
|
+
const index = maximum2 - fileList.length;
|
|
13347
|
+
filterFile.splice(index, filterFile.length - index);
|
|
13341
13348
|
}
|
|
13342
13349
|
return filterFile;
|
|
13343
13350
|
};
|
|
13344
|
-
const onDelete = (file,
|
|
13345
|
-
clearUploadQueue(
|
|
13351
|
+
const onDelete = (file, index) => {
|
|
13352
|
+
clearUploadQueue(index);
|
|
13346
13353
|
if (onBeforeDelete && onBeforeDelete(file, fileList)) {
|
|
13347
|
-
fileList.splice(
|
|
13354
|
+
fileList.splice(index, 1);
|
|
13348
13355
|
onRemove && onRemove(file, fileList);
|
|
13349
13356
|
setFileList([...fileList]);
|
|
13350
13357
|
} else {
|
|
@@ -13398,7 +13405,7 @@
|
|
|
13398
13405
|
disabled,
|
|
13399
13406
|
multiple,
|
|
13400
13407
|
onChange: fileChange
|
|
13401
|
-
})))), fileList.length !== 0 && fileList.map((item,
|
|
13408
|
+
})))), fileList.length !== 0 && fileList.map((item, index) => {
|
|
13402
13409
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13403
13410
|
className: `nut-uploader__preview ${listType}`,
|
|
13404
13411
|
key: item.uid
|
|
@@ -13423,7 +13430,7 @@
|
|
|
13423
13430
|
color: "rgba(0,0,0,0.6)",
|
|
13424
13431
|
className: "close",
|
|
13425
13432
|
name: "failure",
|
|
13426
|
-
onClick: () => onDelete(item,
|
|
13433
|
+
onClick: () => onDelete(item, index)
|
|
13427
13434
|
}), item.type.includes("image") ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, item.url && /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
13428
13435
|
className: "nut-uploader__preview-img__c",
|
|
13429
13436
|
src: item.url,
|
|
@@ -13461,7 +13468,7 @@
|
|
|
13461
13468
|
color: "#808080",
|
|
13462
13469
|
className: "nut-uploader__preview-img__file__del",
|
|
13463
13470
|
name: "del",
|
|
13464
|
-
onClick: () => onDelete(item,
|
|
13471
|
+
onClick: () => onDelete(item, index)
|
|
13465
13472
|
}), item.status === "uploading" && /* @__PURE__ */ React__default["default"].createElement(Progress, {
|
|
13466
13473
|
size: "small",
|
|
13467
13474
|
percentage: item.percentage,
|
|
@@ -13843,8 +13850,8 @@
|
|
|
13843
13850
|
}
|
|
13844
13851
|
if (needToSync.length && currentValue2 === value) {
|
|
13845
13852
|
const pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
13846
|
-
pathNodes.forEach((node,
|
|
13847
|
-
state.tabsCursor =
|
|
13853
|
+
pathNodes.forEach((node, index) => {
|
|
13854
|
+
state.tabsCursor = index;
|
|
13848
13855
|
chooseItem(node, true);
|
|
13849
13856
|
});
|
|
13850
13857
|
}
|
|
@@ -13942,12 +13949,12 @@
|
|
|
13942
13949
|
}, title), /* @__PURE__ */ React__default["default"].createElement(Tabs, {
|
|
13943
13950
|
value: tabvalue,
|
|
13944
13951
|
titleNode: () => {
|
|
13945
|
-
return optiosData.map((pane,
|
|
13952
|
+
return optiosData.map((pane, index) => {
|
|
13946
13953
|
var _a, _b;
|
|
13947
13954
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13948
13955
|
onClick: () => {
|
|
13949
13956
|
setTabvalue(pane.paneKey);
|
|
13950
|
-
state.tabsCursor =
|
|
13957
|
+
state.tabsCursor = index;
|
|
13951
13958
|
},
|
|
13952
13959
|
className: `nut-tabs__titles-item ${tabvalue === pane.paneKey ? "active" : ""}`,
|
|
13953
13960
|
key: pane.paneKey
|
|
@@ -13963,10 +13970,10 @@
|
|
|
13963
13970
|
paneKey: pane.paneKey
|
|
13964
13971
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
13965
13972
|
className: classesPane
|
|
13966
|
-
}, pane.nodes && pane.nodes.map((node,
|
|
13973
|
+
}, pane.nodes && pane.nodes.map((node, index) => {
|
|
13967
13974
|
var _a;
|
|
13968
13975
|
return /* @__PURE__ */ React__default["default"].createElement(CascaderItem, {
|
|
13969
|
-
key:
|
|
13976
|
+
key: index,
|
|
13970
13977
|
...props,
|
|
13971
13978
|
data: node,
|
|
13972
13979
|
checked: ((_a = pane.selectedNode) == null ? void 0 : _a.value) === node.value,
|
|
@@ -14032,6 +14039,7 @@
|
|
|
14032
14039
|
onFocus,
|
|
14033
14040
|
onBlur,
|
|
14034
14041
|
onClear,
|
|
14042
|
+
onCancel,
|
|
14035
14043
|
onSearch,
|
|
14036
14044
|
onClickInput,
|
|
14037
14045
|
onClickLeftinIcon,
|
|
@@ -14079,6 +14087,7 @@
|
|
|
14079
14087
|
disabled,
|
|
14080
14088
|
readOnly,
|
|
14081
14089
|
maxLength,
|
|
14090
|
+
onKeyPress: onKeypress,
|
|
14082
14091
|
onChange: (e2) => change(e2),
|
|
14083
14092
|
onFocus: (e2) => focus(e2),
|
|
14084
14093
|
onBlur: (e2) => blur(e2),
|
|
@@ -14157,13 +14166,22 @@
|
|
|
14157
14166
|
if (actionText) {
|
|
14158
14167
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14159
14168
|
className: searchbarBem("action-text"),
|
|
14160
|
-
onClick:
|
|
14169
|
+
onClick: cancel
|
|
14161
14170
|
}, actionText);
|
|
14162
14171
|
}
|
|
14163
14172
|
return null;
|
|
14164
14173
|
};
|
|
14165
|
-
const
|
|
14166
|
-
|
|
14174
|
+
const onKeypress = (e2) => {
|
|
14175
|
+
if (e2.key === "Enter") {
|
|
14176
|
+
const event = e2.nativeEvent;
|
|
14177
|
+
if (typeof event.cancelable !== "boolean" || event.cancelable) {
|
|
14178
|
+
event.preventDefault();
|
|
14179
|
+
}
|
|
14180
|
+
onSearch && onSearch(value);
|
|
14181
|
+
}
|
|
14182
|
+
};
|
|
14183
|
+
const cancel = () => {
|
|
14184
|
+
onCancel && onCancel();
|
|
14167
14185
|
};
|
|
14168
14186
|
const renderLabel = () => {
|
|
14169
14187
|
if (label) {
|
|
@@ -14330,9 +14348,9 @@
|
|
|
14330
14348
|
className: b2("body")
|
|
14331
14349
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14332
14350
|
className: b2("body__keys")
|
|
14333
|
-
}, keysList == null ? void 0 : keysList.map((item,
|
|
14351
|
+
}, keysList == null ? void 0 : keysList.map((item, index) => {
|
|
14334
14352
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14335
|
-
key:
|
|
14353
|
+
key: index,
|
|
14336
14354
|
className: classNames({
|
|
14337
14355
|
"key-board-wrapper": true,
|
|
14338
14356
|
"key-board-wrapper-large": item.id === 0 && type === "rightColumn" && Array.isArray(customKey) && customKey.length === 1
|
|
@@ -14424,9 +14442,9 @@
|
|
|
14424
14442
|
const cancelActionSheet = () => {
|
|
14425
14443
|
onCancel && onCancel();
|
|
14426
14444
|
};
|
|
14427
|
-
const chooseItem = (item,
|
|
14445
|
+
const chooseItem = (item, index) => {
|
|
14428
14446
|
if (!item.disable) {
|
|
14429
|
-
onChoose && onChoose(item,
|
|
14447
|
+
onChoose && onChoose(item, index);
|
|
14430
14448
|
}
|
|
14431
14449
|
};
|
|
14432
14450
|
return /* @__PURE__ */ React__default["default"].createElement(Popup, {
|
|
@@ -14446,12 +14464,12 @@
|
|
|
14446
14464
|
className: `${b2("item")} desc`
|
|
14447
14465
|
}, description), menuItems.length ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14448
14466
|
className: b2("menu")
|
|
14449
|
-
}, menuItems.map((item,
|
|
14467
|
+
}, menuItems.map((item, index) => {
|
|
14450
14468
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14451
14469
|
className: `${b2("item")} ${item.disable ? b2("item-disabled") : ""}`,
|
|
14452
14470
|
style: { color: isHighlight(item) },
|
|
14453
|
-
key:
|
|
14454
|
-
onClick: () => chooseItem(item,
|
|
14471
|
+
key: index,
|
|
14472
|
+
onClick: () => chooseItem(item, index)
|
|
14455
14473
|
}, item[optionTag], /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
14456
14474
|
className: "subdesc"
|
|
14457
14475
|
}, item[optionSubTag]));
|
|
@@ -15848,9 +15866,9 @@
|
|
|
15848
15866
|
y1: "0%",
|
|
15849
15867
|
x2: "0%",
|
|
15850
15868
|
y2: "0%"
|
|
15851
|
-
}, (_a = stop2()) == null ? void 0 : _a.map((item,
|
|
15869
|
+
}, (_a = stop2()) == null ? void 0 : _a.map((item, index) => {
|
|
15852
15870
|
return /* @__PURE__ */ React__default["default"].createElement("stop", {
|
|
15853
|
-
key:
|
|
15871
|
+
key: index,
|
|
15854
15872
|
offset: item.key,
|
|
15855
15873
|
stopColor: item.value
|
|
15856
15874
|
});
|
|
@@ -15957,8 +15975,8 @@
|
|
|
15957
15975
|
};
|
|
15958
15976
|
}, []);
|
|
15959
15977
|
const cloneChild = (listItem, listIndex) => {
|
|
15960
|
-
return React__default["default"].Children.map(children, function(child,
|
|
15961
|
-
if (child &&
|
|
15978
|
+
return React__default["default"].Children.map(children, function(child, index) {
|
|
15979
|
+
if (child && index === listIndex) {
|
|
15962
15980
|
return React__default["default"].cloneElement(child, {
|
|
15963
15981
|
key: listIndex,
|
|
15964
15982
|
children: listItem
|
|
@@ -16137,16 +16155,16 @@
|
|
|
16137
16155
|
}, children ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16138
16156
|
className: "horseLamp_list",
|
|
16139
16157
|
style: horseLampStyle
|
|
16140
|
-
}, scrollList.current.map((item,
|
|
16141
|
-
return cloneChild(item,
|
|
16158
|
+
}, scrollList.current.map((item, index) => {
|
|
16159
|
+
return cloneChild(item, index);
|
|
16142
16160
|
})) : /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
16143
16161
|
className: "horseLamp_list",
|
|
16144
16162
|
style: horseLampStyle
|
|
16145
|
-
}, scrollList.current.map((item,
|
|
16163
|
+
}, scrollList.current.map((item, index) => {
|
|
16146
16164
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
16147
16165
|
className: "horseLamp_list_item",
|
|
16148
16166
|
style: { height },
|
|
16149
|
-
key:
|
|
16167
|
+
key: index,
|
|
16150
16168
|
onClick: () => {
|
|
16151
16169
|
go(item);
|
|
16152
16170
|
}
|
|
@@ -16238,10 +16256,10 @@
|
|
|
16238
16256
|
const parent = React.useContext(DataContext$1);
|
|
16239
16257
|
const dot = parent.propSteps.progressDot;
|
|
16240
16258
|
const getCurrentStatus = () => {
|
|
16241
|
-
const
|
|
16242
|
-
if (
|
|
16259
|
+
const index = activeIndex;
|
|
16260
|
+
if (index < +parent.propSteps.current)
|
|
16243
16261
|
return "finish";
|
|
16244
|
-
return
|
|
16262
|
+
return index === +parent.propSteps.current ? "process" : "wait";
|
|
16245
16263
|
};
|
|
16246
16264
|
const handleClickStep = () => {
|
|
16247
16265
|
var _a, _b;
|
|
@@ -16436,17 +16454,17 @@
|
|
|
16436
16454
|
});
|
|
16437
16455
|
});
|
|
16438
16456
|
};
|
|
16439
|
-
const to2 = (
|
|
16457
|
+
const to2 = (index) => {
|
|
16440
16458
|
resettPosition();
|
|
16441
16459
|
touchReset();
|
|
16442
16460
|
requestFrame(() => {
|
|
16443
16461
|
requestFrame(() => {
|
|
16444
16462
|
_swiper.current.moving = false;
|
|
16445
16463
|
let targetIndex;
|
|
16446
|
-
if (props.loop && childCount ===
|
|
16447
|
-
targetIndex = active === 0 ? 0 :
|
|
16464
|
+
if (props.loop && childCount === index) {
|
|
16465
|
+
targetIndex = active === 0 ? 0 : index;
|
|
16448
16466
|
} else {
|
|
16449
|
-
targetIndex =
|
|
16467
|
+
targetIndex = index % childCount;
|
|
16450
16468
|
}
|
|
16451
16469
|
move({
|
|
16452
16470
|
pace: targetIndex - active,
|
|
@@ -16675,14 +16693,14 @@
|
|
|
16675
16693
|
stopAutoPlay();
|
|
16676
16694
|
};
|
|
16677
16695
|
}, []);
|
|
16678
|
-
const itemStyle = (
|
|
16696
|
+
const itemStyle = (index) => {
|
|
16679
16697
|
const style = {};
|
|
16680
16698
|
const _direction = propSwiper.direction || direction;
|
|
16681
16699
|
const _size = size;
|
|
16682
16700
|
if (_size) {
|
|
16683
16701
|
style[_direction === "horizontal" ? "width" : "height"] = `${_size}px`;
|
|
16684
16702
|
}
|
|
16685
|
-
const offset2 = childOffset[
|
|
16703
|
+
const offset2 = childOffset[index];
|
|
16686
16704
|
if (offset2) {
|
|
16687
16705
|
style.transform = `translate3D${_direction === "horizontal" ? `(${offset2}px,0,0)` : `(0,${offset2}px,0)`}`;
|
|
16688
16706
|
}
|
|
@@ -16702,27 +16720,27 @@
|
|
|
16702
16720
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16703
16721
|
className: contentClass,
|
|
16704
16722
|
ref: innerRef
|
|
16705
|
-
}, React__default["default"].Children.map(childs, (child,
|
|
16723
|
+
}, React__default["default"].Children.map(childs, (child, index) => {
|
|
16706
16724
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16707
16725
|
className: b2("item-wrapper"),
|
|
16708
|
-
style: itemStyle(
|
|
16709
|
-
key:
|
|
16726
|
+
style: itemStyle(index),
|
|
16727
|
+
key: index
|
|
16710
16728
|
}, child);
|
|
16711
16729
|
})), propSwiper.paginationVisible && !("pageContent" in propSwiper) ? /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
16712
16730
|
className: classNames({
|
|
16713
16731
|
[`${b2("pagination")}`]: true,
|
|
16714
16732
|
[`${b2("pagination-vertical")}`]: isVertical
|
|
16715
16733
|
})
|
|
16716
|
-
}, React__default["default"].Children.map(childs, (item,
|
|
16734
|
+
}, React__default["default"].Children.map(childs, (item, index) => {
|
|
16717
16735
|
return /* @__PURE__ */ React__default["default"].createElement("i", {
|
|
16718
|
-
style: (active + childCount) % childCount ===
|
|
16736
|
+
style: (active + childCount) % childCount === index ? {
|
|
16719
16737
|
backgroundColor: propSwiper.paginationColor
|
|
16720
16738
|
} : void 0,
|
|
16721
16739
|
className: classNames({
|
|
16722
16740
|
[`${b2("pagination-item")}`]: true,
|
|
16723
|
-
active: (active + childCount) % childCount ===
|
|
16741
|
+
active: (active + childCount) % childCount === index
|
|
16724
16742
|
}),
|
|
16725
|
-
key:
|
|
16743
|
+
key: index
|
|
16726
16744
|
});
|
|
16727
16745
|
})) : /* @__PURE__ */ React__default["default"].createElement("div", null, pageContent)));
|
|
16728
16746
|
});
|
|
@@ -16828,11 +16846,11 @@
|
|
|
16828
16846
|
children2[i].setAttribute("data-index", i + 1);
|
|
16829
16847
|
}
|
|
16830
16848
|
}
|
|
16831
|
-
const
|
|
16849
|
+
const index = Number((_b2 = (_a2 = avatarRef == null ? void 0 : avatarRef.current) == null ? void 0 : _a2.dataset) == null ? void 0 : _b2.index);
|
|
16832
16850
|
const maxCount = (_c2 = parent == null ? void 0 : parent.propAvatarGroup) == null ? void 0 : _c2.maxCount;
|
|
16833
16851
|
setMaxSum(children2.length);
|
|
16834
|
-
setAvatarIndex(
|
|
16835
|
-
if (
|
|
16852
|
+
setAvatarIndex(index);
|
|
16853
|
+
if (index === children2.length && index !== maxCount && children2.length > maxCount) {
|
|
16836
16854
|
setShowMax(true);
|
|
16837
16855
|
}
|
|
16838
16856
|
};
|
|
@@ -17204,7 +17222,7 @@
|
|
|
17204
17222
|
className: "",
|
|
17205
17223
|
onClick: (e2) => {
|
|
17206
17224
|
},
|
|
17207
|
-
onChoose: (item,
|
|
17225
|
+
onChoose: (item, index) => {
|
|
17208
17226
|
}
|
|
17209
17227
|
};
|
|
17210
17228
|
const Popover = (props) => {
|
|
@@ -17278,9 +17296,9 @@
|
|
|
17278
17296
|
props.onClick(e2);
|
|
17279
17297
|
}
|
|
17280
17298
|
};
|
|
17281
|
-
const handleChoose = (item,
|
|
17299
|
+
const handleChoose = (item, index) => {
|
|
17282
17300
|
if (!item.disabled) {
|
|
17283
|
-
onChoose(item,
|
|
17301
|
+
onChoose(item, index);
|
|
17284
17302
|
}
|
|
17285
17303
|
};
|
|
17286
17304
|
return /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -17394,10 +17412,10 @@
|
|
|
17394
17412
|
className: "skeleton-content-line"
|
|
17395
17413
|
}, title && /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17396
17414
|
className: "skeleton-title"
|
|
17397
|
-
}), repeatLines(row).map((item,
|
|
17415
|
+
}), repeatLines(row).map((item, index) => {
|
|
17398
17416
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
17399
17417
|
className: blockClass,
|
|
17400
|
-
key:
|
|
17418
|
+
key: index,
|
|
17401
17419
|
style: { width, height }
|
|
17402
17420
|
});
|
|
17403
17421
|
})))));
|
|
@@ -17999,29 +18017,29 @@
|
|
|
17999
18017
|
Empty.defaultProps = defaultProps$e;
|
|
18000
18018
|
Empty.displayName = "NutEmpty";
|
|
18001
18019
|
const initPositinoCache = (reaItemSize, length = 0) => {
|
|
18002
|
-
let
|
|
18020
|
+
let index = 0;
|
|
18003
18021
|
const positions = Array(length);
|
|
18004
|
-
while (
|
|
18005
|
-
positions[
|
|
18006
|
-
index
|
|
18022
|
+
while (index < length) {
|
|
18023
|
+
positions[index] = {
|
|
18024
|
+
index,
|
|
18007
18025
|
height: reaItemSize,
|
|
18008
18026
|
width: reaItemSize,
|
|
18009
|
-
top:
|
|
18010
|
-
bottom: (
|
|
18011
|
-
left:
|
|
18012
|
-
right: (
|
|
18027
|
+
top: index * reaItemSize,
|
|
18028
|
+
bottom: (index + 1) * reaItemSize,
|
|
18029
|
+
left: index * reaItemSize,
|
|
18030
|
+
right: (index + 1) * reaItemSize
|
|
18013
18031
|
};
|
|
18014
|
-
|
|
18032
|
+
index++;
|
|
18015
18033
|
}
|
|
18016
18034
|
return positions;
|
|
18017
18035
|
};
|
|
18018
18036
|
const getListTotalSize = (positions, horizontal) => {
|
|
18019
|
-
const
|
|
18037
|
+
const index = positions.length - 1;
|
|
18020
18038
|
let size = 0;
|
|
18021
|
-
if (
|
|
18039
|
+
if (index < 0) {
|
|
18022
18040
|
size = 0;
|
|
18023
18041
|
} else {
|
|
18024
|
-
size = horizontal ? positions[
|
|
18042
|
+
size = horizontal ? positions[index].right : positions[index].bottom;
|
|
18025
18043
|
}
|
|
18026
18044
|
return size;
|
|
18027
18045
|
};
|
|
@@ -18083,25 +18101,25 @@
|
|
|
18083
18101
|
const updateItemSize = (positions, items, sizeKey) => {
|
|
18084
18102
|
const newPos = positions.concat();
|
|
18085
18103
|
Array.from(items).forEach((item) => {
|
|
18086
|
-
const
|
|
18104
|
+
const index = Number(item.getAttribute("data-index"));
|
|
18087
18105
|
const styleVal = item.getAttribute("style");
|
|
18088
18106
|
if (styleVal && styleVal.includes("none"))
|
|
18089
18107
|
return;
|
|
18090
18108
|
const nowSize = item.getBoundingClientRect()[sizeKey];
|
|
18091
|
-
const oldSize = positions[
|
|
18109
|
+
const oldSize = positions[index][sizeKey];
|
|
18092
18110
|
const dValue = oldSize - nowSize;
|
|
18093
18111
|
if (dValue) {
|
|
18094
18112
|
if (sizeKey === "width") {
|
|
18095
|
-
newPos[
|
|
18096
|
-
newPos[
|
|
18097
|
-
for (let k2 =
|
|
18113
|
+
newPos[index].right -= dValue;
|
|
18114
|
+
newPos[index][sizeKey] = nowSize;
|
|
18115
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
18098
18116
|
newPos[k2].left = positions[k2 - 1].right;
|
|
18099
18117
|
newPos[k2].right -= dValue;
|
|
18100
18118
|
}
|
|
18101
18119
|
} else if (sizeKey === "height") {
|
|
18102
|
-
newPos[
|
|
18103
|
-
newPos[
|
|
18104
|
-
for (let k2 =
|
|
18120
|
+
newPos[index].bottom -= dValue;
|
|
18121
|
+
newPos[index][sizeKey] = nowSize;
|
|
18122
|
+
for (let k2 = index + 1; k2 < positions.length; k2++) {
|
|
18105
18123
|
newPos[k2].top = positions[k2 - 1].bottom;
|
|
18106
18124
|
newPos[k2].bottom -= dValue;
|
|
18107
18125
|
}
|
|
@@ -18251,9 +18269,9 @@
|
|
|
18251
18269
|
style: {
|
|
18252
18270
|
transform: horizontal ? `translate3d(${options2.startOffset}px,0,0)` : `translate3d(0,${options2.startOffset}px,0)`
|
|
18253
18271
|
}
|
|
18254
|
-
}, sourceData.slice(options2.overStart, options2.endIndex).map((data,
|
|
18272
|
+
}, sourceData.slice(options2.overStart, options2.endIndex).map((data, index) => {
|
|
18255
18273
|
const { startIndex, overStart } = options2;
|
|
18256
|
-
const dataIndex = overStart +
|
|
18274
|
+
const dataIndex = overStart + index;
|
|
18257
18275
|
const styleVal = dataIndex < startIndex ? "none" : "block";
|
|
18258
18276
|
const keyVal = key && data[key] ? data[key] : dataIndex;
|
|
18259
18277
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
@@ -18330,7 +18348,7 @@
|
|
|
18330
18348
|
return columns.filter((item) => item.key === value)[0];
|
|
18331
18349
|
};
|
|
18332
18350
|
const renderHeadCells = () => {
|
|
18333
|
-
return columns.map((item,
|
|
18351
|
+
return columns.map((item, index) => {
|
|
18334
18352
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18335
18353
|
className: classNames(
|
|
18336
18354
|
"nut-table__main__head__tr__th",
|
|
@@ -18352,7 +18370,7 @@
|
|
|
18352
18370
|
});
|
|
18353
18371
|
};
|
|
18354
18372
|
const renderBodyTds = (item) => {
|
|
18355
|
-
return sortDataItem().map(([value, render2],
|
|
18373
|
+
return sortDataItem().map(([value, render2], index) => {
|
|
18356
18374
|
return /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
18357
18375
|
className: classNames(
|
|
18358
18376
|
"nut-table__main__body__tr__td",
|
|
@@ -18363,10 +18381,10 @@
|
|
|
18363
18381
|
});
|
|
18364
18382
|
};
|
|
18365
18383
|
const renderBoyTrs = () => {
|
|
18366
|
-
return curData.map((item,
|
|
18384
|
+
return curData.map((item, index) => {
|
|
18367
18385
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18368
18386
|
className: "nut-table__main__body__tr",
|
|
18369
|
-
key:
|
|
18387
|
+
key: index
|
|
18370
18388
|
}, renderBodyTds(item));
|
|
18371
18389
|
});
|
|
18372
18390
|
};
|
|
@@ -18893,17 +18911,17 @@
|
|
|
18893
18911
|
initPage: initNo && (initNo > maxNo ? maxNo - 1 : initNo - 1),
|
|
18894
18912
|
paginationColor,
|
|
18895
18913
|
paginationVisible
|
|
18896
|
-
}, (videos && videos.length > 0 ? videos.map((item,
|
|
18914
|
+
}, (videos && videos.length > 0 ? videos.map((item, index) => {
|
|
18897
18915
|
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18898
|
-
key:
|
|
18916
|
+
key: index
|
|
18899
18917
|
}, /* @__PURE__ */ React__default["default"].createElement(Video, {
|
|
18900
18918
|
source: item.source,
|
|
18901
18919
|
options: item.options
|
|
18902
18920
|
}));
|
|
18903
18921
|
}) : []).concat(
|
|
18904
|
-
images && images.length > 0 ? images.map((item,
|
|
18922
|
+
images && images.length > 0 ? images.map((item, index) => {
|
|
18905
18923
|
return /* @__PURE__ */ React__default["default"].createElement(SwiperItem, {
|
|
18906
|
-
key:
|
|
18924
|
+
key: index
|
|
18907
18925
|
}, /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
18908
18926
|
src: item.src,
|
|
18909
18927
|
alt: "",
|
|
@@ -18950,7 +18968,7 @@
|
|
|
18950
18968
|
addressDetail: "",
|
|
18951
18969
|
selectedAddress: false
|
|
18952
18970
|
};
|
|
18953
|
-
copyExistAdd.forEach((list,
|
|
18971
|
+
copyExistAdd.forEach((list, index) => {
|
|
18954
18972
|
if (list && list.selectedAddress) {
|
|
18955
18973
|
prevExistAdd = list;
|
|
18956
18974
|
}
|
|
@@ -18970,10 +18988,10 @@
|
|
|
18970
18988
|
className: b2("exist-group")
|
|
18971
18989
|
}, /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
18972
18990
|
className: b2("exist-ul")
|
|
18973
|
-
}, existAddress.map((item,
|
|
18991
|
+
}, existAddress.map((item, index) => {
|
|
18974
18992
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
18975
18993
|
className: b2("exist-item"),
|
|
18976
|
-
key:
|
|
18994
|
+
key: index
|
|
18977
18995
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
18978
18996
|
onClick: () => selectedExist(item)
|
|
18979
18997
|
}, /* @__PURE__ */ React__default["default"].createElement(Icon$1, {
|
|
@@ -19056,18 +19074,18 @@
|
|
|
19056
19074
|
return a.title.localeCompare(b22.title);
|
|
19057
19075
|
});
|
|
19058
19076
|
data.forEach((item) => {
|
|
19059
|
-
const
|
|
19077
|
+
const index = newData.findIndex(
|
|
19060
19078
|
(value) => value.title === item.title
|
|
19061
19079
|
);
|
|
19062
|
-
if (
|
|
19080
|
+
if (index <= -1) {
|
|
19063
19081
|
newData.push({
|
|
19064
19082
|
title: item.title,
|
|
19065
19083
|
list: [].concat(item)
|
|
19066
19084
|
});
|
|
19067
19085
|
} else {
|
|
19068
|
-
newData[
|
|
19086
|
+
newData[index] = {
|
|
19069
19087
|
title: item.title,
|
|
19070
|
-
list: newData[
|
|
19088
|
+
list: newData[index].list.concat(item)
|
|
19071
19089
|
};
|
|
19072
19090
|
}
|
|
19073
19091
|
});
|
|
@@ -19086,8 +19104,8 @@
|
|
|
19086
19104
|
town: { name: "" }
|
|
19087
19105
|
});
|
|
19088
19106
|
const [lineDistance, setLineDistance] = React.useState(20);
|
|
19089
|
-
const getTabName = (item,
|
|
19090
|
-
if (tabIndex >
|
|
19107
|
+
const getTabName = (item, index) => {
|
|
19108
|
+
if (tabIndex > index) {
|
|
19091
19109
|
return item.name;
|
|
19092
19110
|
}
|
|
19093
19111
|
return locale.select;
|
|
@@ -19098,9 +19116,9 @@
|
|
|
19098
19116
|
country: countryRef,
|
|
19099
19117
|
town: townRef
|
|
19100
19118
|
};
|
|
19101
|
-
const lineAnimation = (
|
|
19119
|
+
const lineAnimation = (index) => {
|
|
19102
19120
|
setTimeout(() => {
|
|
19103
|
-
const name = tabName[
|
|
19121
|
+
const name = tabName[index];
|
|
19104
19122
|
const refD = mapRef;
|
|
19105
19123
|
if (name && refD[name] && refD[name].current) {
|
|
19106
19124
|
const distance = refD[name].current.offsetLeft;
|
|
@@ -19149,10 +19167,10 @@
|
|
|
19149
19167
|
onClose && onClose();
|
|
19150
19168
|
}
|
|
19151
19169
|
};
|
|
19152
|
-
const changeRegionTab = (item,
|
|
19153
|
-
if (getTabName(item,
|
|
19154
|
-
setTabIndex(
|
|
19155
|
-
lineAnimation(
|
|
19170
|
+
const changeRegionTab = (item, index, key) => {
|
|
19171
|
+
if (getTabName(item, index)) {
|
|
19172
|
+
setTabIndex(index);
|
|
19173
|
+
lineAnimation(index);
|
|
19156
19174
|
}
|
|
19157
19175
|
onTabClick && onTabClick(key);
|
|
19158
19176
|
};
|
|
@@ -19160,16 +19178,16 @@
|
|
|
19160
19178
|
if (modelValue.length > 0) {
|
|
19161
19179
|
let tagIndex = 0;
|
|
19162
19180
|
const selectedRegionC = selectedRegion && Object.assign(selectedRegion);
|
|
19163
|
-
for (let
|
|
19164
|
-
if (regionList[tabName[
|
|
19165
|
-
tagIndex =
|
|
19166
|
-
setTabIndex(
|
|
19181
|
+
for (let index = 0; index < modelValue.length; index++) {
|
|
19182
|
+
if (regionList[tabName[index]].length === 0) {
|
|
19183
|
+
tagIndex = index - 1;
|
|
19184
|
+
setTabIndex(index - 1);
|
|
19167
19185
|
break;
|
|
19168
19186
|
} else {
|
|
19169
|
-
const val = modelValue[
|
|
19170
|
-
const arr = regionList[tabName[
|
|
19187
|
+
const val = modelValue[index];
|
|
19188
|
+
const arr = regionList[tabName[index]];
|
|
19171
19189
|
if (privateType === "custom") {
|
|
19172
|
-
selectedRegionC[[tabName[
|
|
19190
|
+
selectedRegionC[[tabName[index]]] = arr.filter(
|
|
19173
19191
|
(item) => item.id === val
|
|
19174
19192
|
)[0];
|
|
19175
19193
|
} else if (privateType === "custom2") {
|
|
@@ -19177,11 +19195,11 @@
|
|
|
19177
19195
|
arr.forEach((item) => {
|
|
19178
19196
|
sumArr.push(...item.list);
|
|
19179
19197
|
});
|
|
19180
|
-
selectedRegionC[[tabName[
|
|
19198
|
+
selectedRegionC[[tabName[index]]] = sumArr.filter(
|
|
19181
19199
|
(item) => item.id === val
|
|
19182
19200
|
)[0];
|
|
19183
19201
|
}
|
|
19184
|
-
tagIndex =
|
|
19202
|
+
tagIndex = index;
|
|
19185
19203
|
setSelectedRegion(selectedRegionC);
|
|
19186
19204
|
}
|
|
19187
19205
|
}
|
|
@@ -19228,19 +19246,19 @@
|
|
|
19228
19246
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19229
19247
|
className: b2("region-tab")
|
|
19230
19248
|
}, selectedRegion && Object.keys(selectedRegion).map(
|
|
19231
|
-
(key,
|
|
19249
|
+
(key, index) => {
|
|
19232
19250
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19233
|
-
className: `${b2("tab-item")} ${
|
|
19234
|
-
key:
|
|
19251
|
+
className: `${b2("tab-item")} ${index === tabIndex ? "active" : ""}`,
|
|
19252
|
+
key: index,
|
|
19235
19253
|
ref: mapRef[key],
|
|
19236
19254
|
onClick: () => changeRegionTab(
|
|
19237
19255
|
selectedRegion[key],
|
|
19238
|
-
|
|
19256
|
+
index,
|
|
19239
19257
|
key
|
|
19240
19258
|
)
|
|
19241
|
-
},
|
|
19259
|
+
}, index <= tabIndex && /* @__PURE__ */ React__default["default"].createElement("div", null, getTabName(
|
|
19242
19260
|
selectedRegion[key],
|
|
19243
|
-
|
|
19261
|
+
index
|
|
19244
19262
|
)));
|
|
19245
19263
|
}
|
|
19246
19264
|
), /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -19252,9 +19270,9 @@
|
|
|
19252
19270
|
}, /* @__PURE__ */ React__default["default"].createElement("ul", {
|
|
19253
19271
|
className: b2("region-group")
|
|
19254
19272
|
}, regionList[tabName[tabIndex]].map(
|
|
19255
|
-
(item,
|
|
19273
|
+
(item, index) => {
|
|
19256
19274
|
return /* @__PURE__ */ React__default["default"].createElement("li", {
|
|
19257
|
-
key:
|
|
19275
|
+
key: index,
|
|
19258
19276
|
className: b2("region-item")
|
|
19259
19277
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19260
19278
|
onClick: () => {
|
|
@@ -19512,12 +19530,12 @@
|
|
|
19512
19530
|
const barrageContainer = React.useRef(null);
|
|
19513
19531
|
const barrageCWidth = React.useRef(0);
|
|
19514
19532
|
const timer = React.useRef(0);
|
|
19515
|
-
const
|
|
19533
|
+
const index = React.useRef(0);
|
|
19516
19534
|
const b2 = cn("barrage");
|
|
19517
19535
|
const classes = classNames(className, b2(""));
|
|
19518
19536
|
React.useImperativeHandle(ref, () => ({
|
|
19519
19537
|
add: (word) => {
|
|
19520
|
-
const _index =
|
|
19538
|
+
const _index = index.current % barrageList.length;
|
|
19521
19539
|
barrageList.splice(_index, 0, word);
|
|
19522
19540
|
}
|
|
19523
19541
|
}));
|
|
@@ -19538,7 +19556,7 @@
|
|
|
19538
19556
|
}, frequency);
|
|
19539
19557
|
};
|
|
19540
19558
|
const play = () => {
|
|
19541
|
-
const _index = loop2 ?
|
|
19559
|
+
const _index = loop2 ? index.current % barrageList.length : index.current;
|
|
19542
19560
|
const el = document.createElement(`div`);
|
|
19543
19561
|
el.innerHTML = barrageList[_index];
|
|
19544
19562
|
el.classList.add("barrage-item");
|
|
@@ -19554,7 +19572,7 @@
|
|
|
19554
19572
|
el.addEventListener("animationend", () => {
|
|
19555
19573
|
barrageContainer.current.removeChild(el);
|
|
19556
19574
|
});
|
|
19557
|
-
|
|
19575
|
+
index.current++;
|
|
19558
19576
|
};
|
|
19559
19577
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19560
19578
|
className: classes,
|
|
@@ -19804,7 +19822,7 @@
|
|
|
19804
19822
|
};
|
|
19805
19823
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19806
19824
|
className: `${b2()} ${className || ""}`
|
|
19807
|
-
}, renderData.map((item,
|
|
19825
|
+
}, renderData.map((item, index) => /* @__PURE__ */ React__default["default"].createElement("span", {
|
|
19808
19826
|
className: getDetailClass(item),
|
|
19809
19827
|
key: item,
|
|
19810
19828
|
onClick: () => handleTime(item)
|
|
@@ -19936,11 +19954,11 @@
|
|
|
19936
19954
|
className: "nut-timeselect__content"
|
|
19937
19955
|
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
19938
19956
|
className: "nut-timeselect__content-left"
|
|
19939
|
-
}, dates.map((dataItem,
|
|
19957
|
+
}, dates.map((dataItem, index) => /* @__PURE__ */ React__default["default"].createElement(TimePannel, {
|
|
19940
19958
|
date: dataItem.date,
|
|
19941
19959
|
className: getTimePannelClass(dataItem),
|
|
19942
|
-
key: String(dataItem["pannel-key"] ||
|
|
19943
|
-
curKey: String(dataItem["pannel-key"] ||
|
|
19960
|
+
key: String(dataItem["pannel-key"] || index),
|
|
19961
|
+
curKey: String(dataItem["pannel-key"] || index),
|
|
19944
19962
|
change: handleChange
|
|
19945
19963
|
}))), /* @__PURE__ */ React__default["default"].createElement(TimeDetail, {
|
|
19946
19964
|
times,
|