taro-ui 3.1.0-beta.6 → 3.1.0-beta.8
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/dist/index.esm.js +20 -15
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +20 -15
- package/dist/index.js.map +1 -1
- package/dist/style/common.scss +10 -0
- package/lib/components/calendar/common/plugins.js +8 -9
- package/lib/components/calendar/common/plugins.js.map +1 -1
- package/lib/components/nav-bar/index.js +6 -2
- package/lib/components/nav-bar/index.js.map +1 -1
- package/lib/components/search-bar/index.js +6 -4
- package/lib/components/search-bar/index.js.map +1 -1
- package/lib/tsconfig.build.tsbuildinfo +39904 -0
- package/package.json +1 -1
- package/rn/components/calendar/common/plugins.ts +8 -8
- package/rn/components/nav-bar/index.tsx +26 -18
- package/rn/components/toast/index.tsx +1 -1
- package/types/calendar.d.ts +8 -8
- package/types/nav-bar.d.ts +6 -1
- package/types/search-bar.d.ts +10 -2
package/dist/index.esm.js
CHANGED
|
@@ -3728,6 +3728,9 @@ var AtNavBar = /** @class */ (function (_super) {
|
|
|
3728
3728
|
AtNavBar.prototype.handleClickNd = function (event) {
|
|
3729
3729
|
this.props.onClickRgIconNd && this.props.onClickRgIconNd(event);
|
|
3730
3730
|
};
|
|
3731
|
+
AtNavBar.prototype.handleClickTitle = function (event) {
|
|
3732
|
+
this.props.onClickTitle && this.props.onClickTitle(event);
|
|
3733
|
+
};
|
|
3731
3734
|
AtNavBar.prototype.render = function () {
|
|
3732
3735
|
var _a, _b, _c;
|
|
3733
3736
|
var _d = this.props, customStyle = _d.customStyle, className = _d.className, color = _d.color, fixed = _d.fixed, border = _d.border, leftIconType = _d.leftIconType, leftText = _d.leftText, title = _d.title, rightFirstIconType = _d.rightFirstIconType, rightSecondIconType = _d.rightSecondIconType;
|
|
@@ -3766,7 +3769,7 @@ var AtNavBar = /** @class */ (function (_super) {
|
|
|
3766
3769
|
fontSize: "" + pxTransform(parseInt(leftIconInfo.size.toString()) * 2)
|
|
3767
3770
|
}, leftIconInfo.customStyle) })),
|
|
3768
3771
|
React.createElement(Text, { className: 'at-nav-bar__text' }, leftText)),
|
|
3769
|
-
React.createElement(View, { className: 'at-nav-bar__title' }, title || this.props.children),
|
|
3772
|
+
React.createElement(View, { className: 'at-nav-bar__title', onClick: this.handleClickTitle.bind(this) }, title || this.props.children),
|
|
3770
3773
|
React.createElement(View, { className: 'at-nav-bar__right-view' },
|
|
3771
3774
|
React.createElement(View, { className: classnames({
|
|
3772
3775
|
'at-nav-bar__container': true,
|
|
@@ -3813,7 +3816,8 @@ AtNavBar.propTypes = {
|
|
|
3813
3816
|
]),
|
|
3814
3817
|
onClickLeftIcon: PropTypes.func,
|
|
3815
3818
|
onClickRgIconSt: PropTypes.func,
|
|
3816
|
-
onClickRgIconNd: PropTypes.func
|
|
3819
|
+
onClickRgIconNd: PropTypes.func,
|
|
3820
|
+
onClickTitle: PropTypes.func
|
|
3817
3821
|
};
|
|
3818
3822
|
|
|
3819
3823
|
var AtNoticebar = /** @class */ (function (_super) {
|
|
@@ -5455,7 +5459,7 @@ var AtSearchBar = /** @class */ (function (_super) {
|
|
|
5455
5459
|
};
|
|
5456
5460
|
AtSearchBar.prototype.render = function () {
|
|
5457
5461
|
var _a = this.props, value = _a.value, placeholder = _a.placeholder, maxLength = _a.maxLength, fixed = _a.fixed, disabled = _a.disabled, showActionButton = _a.showActionButton, _b = _a.actionName, actionName = _b === void 0 ? '搜索' : _b, inputType = _a.inputType, // 处理issue#464
|
|
5458
|
-
className = _a.className, customStyle = _a.customStyle;
|
|
5462
|
+
className = _a.className, customStyle = _a.customStyle, enableNative = _a.enableNative;
|
|
5459
5463
|
var isFocus = this.state.isFocus;
|
|
5460
5464
|
var fontSize = 14;
|
|
5461
5465
|
var rootCls = classnames('at-search-bar', {
|
|
@@ -5488,7 +5492,7 @@ var AtSearchBar = /** @class */ (function (_super) {
|
|
|
5488
5492
|
React.createElement(View, { className: 'at-search-bar__placeholder-wrap', style: placeholderWrapStyle },
|
|
5489
5493
|
React.createElement(Text, { className: 'at-icon at-icon-search' }),
|
|
5490
5494
|
React.createElement(Text, { className: 'at-search-bar__placeholder', style: placeholderStyle }, isFocus ? '' : placeholder)),
|
|
5491
|
-
React.createElement(Input, { className: 'at-search-bar__input', type: inputType, confirmType: 'search', value: value, focus: isFocus, disabled: disabled, maxlength: maxLength, onInput: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onConfirm: this.handleConfirm }),
|
|
5495
|
+
React.createElement(Input, { className: 'at-search-bar__input', type: inputType, confirmType: 'search', value: value, focus: isFocus, disabled: disabled, maxlength: maxLength, enableNative: enableNative, onInput: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur, onConfirm: this.handleConfirm }),
|
|
5492
5496
|
React.createElement(View, { className: 'at-search-bar__clear', style: clearIconStyle, onTouchStart: this.handleClear },
|
|
5493
5497
|
React.createElement(Text, { className: 'at-icon at-icon-close-circle' }))),
|
|
5494
5498
|
React.createElement(View, { className: 'at-search-bar__action', style: actionStyle, onClick: this.handleActionClick }, actionName)));
|
|
@@ -5506,7 +5510,8 @@ AtSearchBar.defaultProps = {
|
|
|
5506
5510
|
actionName: '搜索',
|
|
5507
5511
|
inputType: 'text',
|
|
5508
5512
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
5509
|
-
onChange: function () { }
|
|
5513
|
+
onChange: function () { },
|
|
5514
|
+
enableNative: true
|
|
5510
5515
|
};
|
|
5511
5516
|
AtSearchBar.propTypes = {
|
|
5512
5517
|
value: PropTypes.string,
|
|
@@ -5523,7 +5528,8 @@ AtSearchBar.propTypes = {
|
|
|
5523
5528
|
onBlur: PropTypes.func,
|
|
5524
5529
|
onConfirm: PropTypes.func,
|
|
5525
5530
|
onActionClick: PropTypes.func,
|
|
5526
|
-
onClear: PropTypes.func
|
|
5531
|
+
onClear: PropTypes.func,
|
|
5532
|
+
enableNative: PropTypes.bool
|
|
5527
5533
|
};
|
|
5528
5534
|
|
|
5529
5535
|
var AtLoadMore = /** @class */ (function (_super) {
|
|
@@ -7743,12 +7749,11 @@ function handleActive(args, item) {
|
|
|
7743
7749
|
var dayjsEnd = dayjs_min(end);
|
|
7744
7750
|
var dayjsStart = start ? dayjs_min(start) : dayjsEnd;
|
|
7745
7751
|
item.isSelected =
|
|
7746
|
-
_value.isSame(dayjsEnd) ||
|
|
7747
|
-
_value.
|
|
7748
|
-
|
|
7749
|
-
item.
|
|
7750
|
-
item.
|
|
7751
|
-
item.isToday = _value.diff(dayjs_min(Date.now()).startOf('day'), 'day') === 0;
|
|
7752
|
+
(_value === null || _value === void 0 ? void 0 : _value.isSame(dayjsEnd)) || (_value === null || _value === void 0 ? void 0 : _value.isSame(dayjsStart)) ||
|
|
7753
|
+
((_value === null || _value === void 0 ? void 0 : _value.isAfter(dayjsStart)) && (_value === null || _value === void 0 ? void 0 : _value.isBefore(dayjsEnd)));
|
|
7754
|
+
item.isSelectedHead = _value === null || _value === void 0 ? void 0 : _value.isSame(dayjsStart);
|
|
7755
|
+
item.isSelectedTail = _value === null || _value === void 0 ? void 0 : _value.isSame(dayjsEnd);
|
|
7756
|
+
item.isToday = (_value === null || _value === void 0 ? void 0 : _value.diff(dayjs_min(Date.now()).startOf('day'), 'day')) === 0;
|
|
7752
7757
|
return item;
|
|
7753
7758
|
}
|
|
7754
7759
|
function handleMarks(args, item) {
|
|
@@ -7790,8 +7795,8 @@ function handleDisabled(args, item) {
|
|
|
7790
7795
|
var dayjsMinDate = dayjs_min(minDate);
|
|
7791
7796
|
var dayjsMaxDate = dayjs_min(maxDate);
|
|
7792
7797
|
item.isDisabled =
|
|
7793
|
-
!!(minDate && _value.isBefore(dayjsMinDate)) ||
|
|
7794
|
-
!!(maxDate && _value.isAfter(dayjsMaxDate));
|
|
7798
|
+
!!(minDate && (_value === null || _value === void 0 ? void 0 : _value.isBefore(dayjsMinDate))) ||
|
|
7799
|
+
!!(maxDate && (_value === null || _value === void 0 ? void 0 : _value.isAfter(dayjsMaxDate)));
|
|
7795
7800
|
return item;
|
|
7796
7801
|
}
|
|
7797
7802
|
function handleValid(args, item) {
|
|
@@ -7804,7 +7809,7 @@ function handleValid(args, item) {
|
|
|
7804
7809
|
});
|
|
7805
7810
|
item.isDisabled = !isInclude;
|
|
7806
7811
|
}
|
|
7807
|
-
|
|
7812
|
+
delete item._value;
|
|
7808
7813
|
return item;
|
|
7809
7814
|
}
|
|
7810
7815
|
var plugins = [handleActive, handleMarks, handleDisabled, handleValid];
|