shineout 3.1.26 → 3.1.28
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/cjs/index.js +1 -1
- package/dist/shineout.js +94 -34
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
package/cjs/index.js
CHANGED
|
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
476
476
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
477
477
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
478
478
|
var _default = exports.default = {
|
|
479
|
-
version: '3.1.
|
|
479
|
+
version: '3.1.28'
|
|
480
480
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -7096,9 +7096,12 @@ var Alert = function Alert(props) {
|
|
|
7096
7096
|
onClick: handleClose
|
|
7097
7097
|
});
|
|
7098
7098
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7099
|
-
className: alertStyle.
|
|
7100
|
-
|
|
7101
|
-
|
|
7099
|
+
className: alertStyle.closeWrapper,
|
|
7100
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7101
|
+
className: alertStyle.close,
|
|
7102
|
+
onClick: handleClose,
|
|
7103
|
+
children: closeItem || icons_config.alert.Close
|
|
7104
|
+
})
|
|
7102
7105
|
});
|
|
7103
7106
|
};
|
|
7104
7107
|
if (dismiss === HIDE) {
|
|
@@ -11949,7 +11952,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11949
11952
|
};
|
|
11950
11953
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11951
11954
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11952
|
-
/* harmony default export */ var version = ('3.1.
|
|
11955
|
+
/* harmony default export */ var version = ('3.1.28');
|
|
11953
11956
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11954
11957
|
|
|
11955
11958
|
|
|
@@ -12111,7 +12114,7 @@ function replaceNonAlphanumeric(str) {
|
|
|
12111
12114
|
return result;
|
|
12112
12115
|
}
|
|
12113
12116
|
function camelCaseToDash(str) {
|
|
12114
|
-
return str.replace(/(
|
|
12117
|
+
return str.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
12115
12118
|
}
|
|
12116
12119
|
var cssvar = function cssvar(str, value, key, _size) {
|
|
12117
12120
|
var _getConfig = getConfig(),
|
|
@@ -14819,7 +14822,7 @@ var alertStyle = {
|
|
|
14819
14822
|
width: src.alertFontSize,
|
|
14820
14823
|
color: src.alertCloseFontColor,
|
|
14821
14824
|
fontSize: src.alertFontSize,
|
|
14822
|
-
height: src.
|
|
14825
|
+
height: src.alertFontSize,
|
|
14823
14826
|
flex: '0 0 auto',
|
|
14824
14827
|
display: 'flex',
|
|
14825
14828
|
alignItems: 'center',
|
|
@@ -14829,6 +14832,12 @@ var alertStyle = {
|
|
|
14829
14832
|
color: src.alertCloseHoverColor
|
|
14830
14833
|
}
|
|
14831
14834
|
},
|
|
14835
|
+
closeWrapper: {
|
|
14836
|
+
width: src.alertFontSize,
|
|
14837
|
+
height: src.lineHeightDynamic,
|
|
14838
|
+
display: 'flex',
|
|
14839
|
+
alignItems: 'center'
|
|
14840
|
+
},
|
|
14832
14841
|
content: {
|
|
14833
14842
|
flex: '1 1 0',
|
|
14834
14843
|
wordBreak: 'break-all'
|
|
@@ -21715,7 +21724,7 @@ var sliderStyle = {
|
|
|
21715
21724
|
bottom: '100%',
|
|
21716
21725
|
'&[dir=ltr]': {
|
|
21717
21726
|
left: 0,
|
|
21718
|
-
transform: 'translate(-50%, 10px)'
|
|
21727
|
+
transform: 'translate(-50%, -10px)'
|
|
21719
21728
|
},
|
|
21720
21729
|
'&[dir=rtl]': {
|
|
21721
21730
|
right: 0,
|
|
@@ -28339,7 +28348,10 @@ function useClickAway(params) {
|
|
|
28339
28348
|
}
|
|
28340
28349
|
return function () {
|
|
28341
28350
|
// @ts-ignore
|
|
28342
|
-
document.removeEventListener(event, handleClickAway
|
|
28351
|
+
document.removeEventListener(event, handleClickAway, {
|
|
28352
|
+
// 解决 点击后立刻删除dom导致获取不到元素; contains(target) 为 false 的问题
|
|
28353
|
+
capture: true
|
|
28354
|
+
});
|
|
28343
28355
|
};
|
|
28344
28356
|
}, [effect]);
|
|
28345
28357
|
}
|
|
@@ -35335,6 +35347,7 @@ var ResultInput = function ResultInput(props) {
|
|
|
35335
35347
|
onChange: onChange,
|
|
35336
35348
|
onBlur: handleBlur,
|
|
35337
35349
|
open: focus,
|
|
35350
|
+
disabled: props.disabled,
|
|
35338
35351
|
onPaste: handlePaste
|
|
35339
35352
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
35340
35353
|
className: styles.inputMirror,
|
|
@@ -35723,6 +35736,27 @@ var More = function More(props) {
|
|
|
35723
35736
|
});
|
|
35724
35737
|
itemsLength = after.length;
|
|
35725
35738
|
}
|
|
35739
|
+
if (showNum < 0 || showNum >= data.length) {
|
|
35740
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
35741
|
+
children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, {
|
|
35742
|
+
className: styles.tag,
|
|
35743
|
+
jssStyle: jssStyle,
|
|
35744
|
+
size: size,
|
|
35745
|
+
style: {
|
|
35746
|
+
position: 'absolute',
|
|
35747
|
+
zIndex: -100,
|
|
35748
|
+
userSelect: 'none',
|
|
35749
|
+
msUserSelect: 'none',
|
|
35750
|
+
contain: 'layout'
|
|
35751
|
+
},
|
|
35752
|
+
mode: visible ? 'fill' : 'bright',
|
|
35753
|
+
color: visible ? 'info' : 'default',
|
|
35754
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
35755
|
+
children: "+"
|
|
35756
|
+
})
|
|
35757
|
+
}, 'hidden')]
|
|
35758
|
+
});
|
|
35759
|
+
}
|
|
35726
35760
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
35727
35761
|
children: [shouldShowMore ? data : before, /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
35728
35762
|
style: {
|
|
@@ -35876,7 +35910,8 @@ var result_Result = function Result(props) {
|
|
|
35876
35910
|
convertBr: convertBr,
|
|
35877
35911
|
onInputBlur: onInputBlur,
|
|
35878
35912
|
onClearCreatedData: onClearCreatedData,
|
|
35879
|
-
placeholder: placeholder2
|
|
35913
|
+
placeholder: placeholder2,
|
|
35914
|
+
disabled: isFunc(disabled) ? false : !!disabled
|
|
35880
35915
|
})
|
|
35881
35916
|
}, 'input');
|
|
35882
35917
|
};
|
|
@@ -39982,7 +40017,8 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
39982
40017
|
var elRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
39983
40018
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
39984
40019
|
timer: null,
|
|
39985
|
-
changeTimer: null
|
|
40020
|
+
changeTimer: null,
|
|
40021
|
+
controlScroll: false
|
|
39986
40022
|
}),
|
|
39987
40023
|
context = _useRef.current;
|
|
39988
40024
|
var _useResize = useResize({
|
|
@@ -39995,11 +40031,12 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
39995
40031
|
var el = elRef.current;
|
|
39996
40032
|
if (!el) return;
|
|
39997
40033
|
var lineHeight = el.childNodes[0].clientHeight;
|
|
40034
|
+
context.controlScroll = true;
|
|
39998
40035
|
el.scrollTop = lineHeight * index;
|
|
39999
40036
|
}, immudiate ? 0 : 30);
|
|
40000
40037
|
};
|
|
40001
40038
|
var changeToIndex = function changeToIndex(index) {
|
|
40002
|
-
if (!times[index] || times[index].disabled || index === currentIndex) {
|
|
40039
|
+
if (!times[index] || times[index].disabled || index === currentIndex && !props.isEmpty) {
|
|
40003
40040
|
return;
|
|
40004
40041
|
}
|
|
40005
40042
|
onChange(times[index].date);
|
|
@@ -40007,6 +40044,10 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
40007
40044
|
var handleScroll = function handleScroll(e) {
|
|
40008
40045
|
if (context.changeTimer) clearTimeout(context.changeTimer);
|
|
40009
40046
|
var el = e.currentTarget;
|
|
40047
|
+
if (context.controlScroll) {
|
|
40048
|
+
context.controlScroll = false;
|
|
40049
|
+
return;
|
|
40050
|
+
}
|
|
40010
40051
|
context.changeTimer = setTimeout(function () {
|
|
40011
40052
|
if (!el) return;
|
|
40012
40053
|
var lineHeight = el.childNodes[0].clientHeight;
|
|
@@ -40107,6 +40148,7 @@ var Time = function Time(props) {
|
|
|
40107
40148
|
jssStyle: props.jssStyle,
|
|
40108
40149
|
times: item.times,
|
|
40109
40150
|
currentIndex: item.currentIndex,
|
|
40151
|
+
isEmpty: props.value === null || props.value === undefined,
|
|
40110
40152
|
onChange: func.handleChange
|
|
40111
40153
|
}, item.mode);
|
|
40112
40154
|
})
|
|
@@ -44234,6 +44276,13 @@ var useForm = function useForm(props) {
|
|
|
44234
44276
|
size: size
|
|
44235
44277
|
};
|
|
44236
44278
|
}, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size]);
|
|
44279
|
+
var updateValue = function updateValue() {
|
|
44280
|
+
if (props.value !== context.lastValue && props.value !== context.value) {
|
|
44281
|
+
context.value = deepClone(props.value) || emptyObj;
|
|
44282
|
+
context.lastValue = props.value;
|
|
44283
|
+
}
|
|
44284
|
+
};
|
|
44285
|
+
updateValue();
|
|
44237
44286
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
44238
44287
|
// 服务端错误更新
|
|
44239
44288
|
if (!props.error) context.serverErrors = {};else {
|
|
@@ -44250,8 +44299,8 @@ var useForm = function useForm(props) {
|
|
|
44250
44299
|
// 默认值更新
|
|
44251
44300
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
44252
44301
|
context.removeLock = false;
|
|
44253
|
-
|
|
44254
|
-
|
|
44302
|
+
// 内部 onChange 改的 value, 不需要更新
|
|
44303
|
+
if (props.value === context.value) return;
|
|
44255
44304
|
if (initValidate && !context.resetTime) {
|
|
44256
44305
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
44257
44306
|
var oldValue = deepGet(context.lastValue || emptyObj, key);
|
|
@@ -44478,9 +44527,9 @@ var form_item_excluded = ["children", "jssStyle", "className", "style", "label",
|
|
|
44478
44527
|
style: style,
|
|
44479
44528
|
children: [label !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
44480
44529
|
className: classnames_default()(formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.label, labelAlign === 'left' && (formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelLeft)),
|
|
44481
|
-
style: {
|
|
44530
|
+
style: labelAlign !== 'top' || inline ? {
|
|
44482
44531
|
width: labelWidth
|
|
44483
|
-
},
|
|
44532
|
+
} : undefined,
|
|
44484
44533
|
children: label
|
|
44485
44534
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
44486
44535
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.control
|
|
@@ -46749,11 +46798,15 @@ var Scroll = function Scroll(props) {
|
|
|
46749
46798
|
height: '100%',
|
|
46750
46799
|
width: '100%',
|
|
46751
46800
|
display: 'inline-flex',
|
|
46801
|
+
overflow: 'hidden',
|
|
46752
46802
|
position: 'sticky'
|
|
46753
46803
|
}, isRtl ? 'right' : 'left', 0), "top", 0);
|
|
46754
|
-
var placeStyle =
|
|
46755
|
-
marginTop: height > 0 && scrollHeight > 0 ? Math.max(0, Math.floor(scrollHeight - height)) : 0
|
|
46756
|
-
|
|
46804
|
+
var placeStyle = {
|
|
46805
|
+
marginTop: (height > 0 && scrollHeight > 0 ? Math.max(0, Math.floor(scrollHeight - height)) : 0) - 1,
|
|
46806
|
+
width: scrollWidth,
|
|
46807
|
+
height: 1,
|
|
46808
|
+
overflow: 'hidden'
|
|
46809
|
+
};
|
|
46757
46810
|
var handleScroll = usePersistFn(function (e) {
|
|
46758
46811
|
var target = e.currentTarget;
|
|
46759
46812
|
var scrollLeft = target.scrollLeft,
|
|
@@ -51262,9 +51315,11 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51262
51315
|
_this = _super.call(this, props);
|
|
51263
51316
|
defineProperty_default()(assertThisInitialized_default()(_this), "cachedHeight", void 0);
|
|
51264
51317
|
defineProperty_default()(assertThisInitialized_default()(_this), "timeoutMap", void 0);
|
|
51318
|
+
defineProperty_default()(assertThisInitialized_default()(_this), "messages", void 0);
|
|
51265
51319
|
_this.state = {
|
|
51266
51320
|
messages: []
|
|
51267
51321
|
};
|
|
51322
|
+
_this.messages = [];
|
|
51268
51323
|
_this.cachedHeight = {};
|
|
51269
51324
|
_this.timeoutMap = {};
|
|
51270
51325
|
_this.removeMessage = _this.removeMessage.bind(assertThisInitialized_default()(_this));
|
|
@@ -51272,16 +51327,24 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51272
51327
|
return _this;
|
|
51273
51328
|
}
|
|
51274
51329
|
createClass_default()(Message, [{
|
|
51330
|
+
key: "setMessages",
|
|
51331
|
+
value: function setMessages(messages) {
|
|
51332
|
+
this.messages = messages;
|
|
51333
|
+
this.setState({
|
|
51334
|
+
messages: messages
|
|
51335
|
+
});
|
|
51336
|
+
}
|
|
51337
|
+
}, {
|
|
51275
51338
|
key: "addMessage",
|
|
51276
51339
|
value: function addMessage(msg) {
|
|
51277
51340
|
var _this2 = this;
|
|
51278
51341
|
var id = message_getUidStr();
|
|
51279
|
-
var
|
|
51280
|
-
|
|
51342
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
51343
|
+
messages.push(Object.assign({
|
|
51281
51344
|
id: id
|
|
51282
51345
|
}, msg));
|
|
51283
51346
|
});
|
|
51284
|
-
this.
|
|
51347
|
+
this.setMessages(newMessages);
|
|
51285
51348
|
if (msg.duration > 0) {
|
|
51286
51349
|
var closeTimeDelay = setTimeout(function () {
|
|
51287
51350
|
_this2.closeMessageForAnimation(id, dismissDuration, _this2.cachedHeight[id]);
|
|
@@ -51294,7 +51357,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51294
51357
|
key: "removeMessage",
|
|
51295
51358
|
value: function removeMessage(id) {
|
|
51296
51359
|
var callback;
|
|
51297
|
-
var messages = this.
|
|
51360
|
+
var messages = this.messages.filter(function (m) {
|
|
51298
51361
|
if (m.id !== id) return true;
|
|
51299
51362
|
if (m.onClose) {
|
|
51300
51363
|
callback = m.onClose;
|
|
@@ -51305,9 +51368,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51305
51368
|
var _this$props$onDestroy, _this$props;
|
|
51306
51369
|
(_this$props$onDestroy = (_this$props = this.props).onDestroy) === null || _this$props$onDestroy === void 0 || _this$props$onDestroy.call(_this$props);
|
|
51307
51370
|
} else {
|
|
51308
|
-
this.
|
|
51309
|
-
messages: messages
|
|
51310
|
-
});
|
|
51371
|
+
this.setMessages(messages);
|
|
51311
51372
|
}
|
|
51312
51373
|
if (callback) callback();
|
|
51313
51374
|
}
|
|
@@ -51316,16 +51377,15 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51316
51377
|
value: function closeMessageForAnimation(id, duration, msgHeight) {
|
|
51317
51378
|
var _this3 = this;
|
|
51318
51379
|
// duration animation duration time
|
|
51319
|
-
this.
|
|
51320
|
-
|
|
51321
|
-
|
|
51322
|
-
|
|
51323
|
-
|
|
51324
|
-
|
|
51325
|
-
}
|
|
51326
|
-
});
|
|
51380
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
51381
|
+
messages.forEach(function (m) {
|
|
51382
|
+
if (m.id === id) {
|
|
51383
|
+
m.dismiss = true;
|
|
51384
|
+
m.h = msgHeight || 0;
|
|
51385
|
+
}
|
|
51327
51386
|
});
|
|
51328
51387
|
});
|
|
51388
|
+
this.setMessages(newMessages);
|
|
51329
51389
|
setTimeout(function () {
|
|
51330
51390
|
_this3.removeMessage(id);
|
|
51331
51391
|
}, duration);
|
|
@@ -62363,7 +62423,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
62363
62423
|
|
|
62364
62424
|
|
|
62365
62425
|
/* harmony default export */ var src_0 = ({
|
|
62366
|
-
version: '3.1.
|
|
62426
|
+
version: '3.1.28'
|
|
62367
62427
|
});
|
|
62368
62428
|
}();
|
|
62369
62429
|
/******/ return __webpack_exports__;
|