shineout 3.2.2 → 3.2.4
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 +77 -36
- 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.2.
|
|
479
|
+
version: '3.2.4'
|
|
480
480
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -11960,7 +11960,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11960
11960
|
};
|
|
11961
11961
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11962
11962
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11963
|
-
/* harmony default export */ var version = ('3.2.
|
|
11963
|
+
/* harmony default export */ var version = ('3.2.4');
|
|
11964
11964
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11965
11965
|
|
|
11966
11966
|
|
|
@@ -16137,7 +16137,7 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
16137
16137
|
}, "&:not($".concat(name, "Disabled):not($").concat(name, "Error)"), {
|
|
16138
16138
|
backgroundColor: token.hoverBackgroundColor
|
|
16139
16139
|
}),
|
|
16140
|
-
'[data-soui-role="input-group"]
|
|
16140
|
+
'[data-soui-role="input-group"] &&&, [data-soui-role="input-group"] &&&:hover': {
|
|
16141
16141
|
borderWidth: 0,
|
|
16142
16142
|
borderRadius: 0,
|
|
16143
16143
|
boxShadow: 'none',
|
|
@@ -17691,6 +17691,10 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17691
17691
|
visibility: 'visible'
|
|
17692
17692
|
}
|
|
17693
17693
|
},
|
|
17694
|
+
datetimeHide: {
|
|
17695
|
+
opacity: '0',
|
|
17696
|
+
pointerEvents: 'none'
|
|
17697
|
+
},
|
|
17694
17698
|
quickPicker: {
|
|
17695
17699
|
padding: "".concat(src.datePickerQuickPanelPaddingY, " ").concat(src.datePickerQuickPanelPaddingX),
|
|
17696
17700
|
display: 'flex',
|
|
@@ -21775,6 +21779,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
21775
21779
|
display: 'block',
|
|
21776
21780
|
overflow: 'hidden',
|
|
21777
21781
|
textOverflow: 'ellipsis',
|
|
21782
|
+
flex: 1,
|
|
21778
21783
|
whiteSpace: 'nowrap',
|
|
21779
21784
|
marginTop: src.selectPlaceholderMarginY,
|
|
21780
21785
|
marginBottom: src.selectPlaceholderMarginY
|
|
@@ -26550,6 +26555,7 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26550
26555
|
display: 'block',
|
|
26551
26556
|
overflow: 'hidden',
|
|
26552
26557
|
textOverflow: 'ellipsis',
|
|
26558
|
+
flex: 1,
|
|
26553
26559
|
whiteSpace: 'nowrap',
|
|
26554
26560
|
marginTop: src.treeSelectPlaceholderMarginY,
|
|
26555
26561
|
marginBottom: src.treeSelectPlaceholderMarginY
|
|
@@ -39749,6 +39755,19 @@ function formatted(date, fmt, options) {
|
|
|
39749
39755
|
function getStartYear(date, options) {
|
|
39750
39756
|
return Math.floor(getDateInfo(date, 'year', options) / 10) * 10;
|
|
39751
39757
|
}
|
|
39758
|
+
|
|
39759
|
+
// 如果有 value 取 value 的 time 否则取 defaultTime
|
|
39760
|
+
var getDateWithTime = function getDateWithTime(date, value, defaultTime, min, max, options) {
|
|
39761
|
+
var timeDate = value || defaultTime && cloneTime(date, defaultTime, TIME_FORMAT, options);
|
|
39762
|
+
var newDate = util_toDate(date);
|
|
39763
|
+
if (timeDate) {
|
|
39764
|
+
newDate = setTime(newDate, timeDate, options);
|
|
39765
|
+
}
|
|
39766
|
+
// only can select day with the same day of min/max
|
|
39767
|
+
if (min && compareAsc(newDate, min) < 0) newDate = setTime(newDate, min, options);
|
|
39768
|
+
if (max && compareAsc(newDate, max) > 0) newDate = setTime(newDate, max, options);
|
|
39769
|
+
return newDate;
|
|
39770
|
+
};
|
|
39752
39771
|
/* harmony default export */ var util = ({
|
|
39753
39772
|
clearHMS: clearHMS,
|
|
39754
39773
|
addDays: addDays,
|
|
@@ -39785,7 +39804,8 @@ function getStartYear(date, options) {
|
|
|
39785
39804
|
compatibleFmt: compatibleFmt,
|
|
39786
39805
|
transDateWithZone: transDateWithZone,
|
|
39787
39806
|
getStartYear: getStartYear,
|
|
39788
|
-
isValidString: isValidString
|
|
39807
|
+
isValidString: isValidString,
|
|
39808
|
+
getDateWithTime: getDateWithTime
|
|
39789
39809
|
});
|
|
39790
39810
|
;// CONCATENATED MODULE: ../hooks/src/components/use-datepicker/use-datepicker-format.ts
|
|
39791
39811
|
|
|
@@ -39916,6 +39936,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
39916
39936
|
});
|
|
39917
39937
|
var setCurrentArrWithParams = usePersistFn(function (arg, type, quick) {
|
|
39918
39938
|
setCurrentArr(arg);
|
|
39939
|
+
if (!type && !quick) return;
|
|
39919
39940
|
setParams({
|
|
39920
39941
|
type: type,
|
|
39921
39942
|
quick: quick
|
|
@@ -40175,17 +40196,7 @@ var useDate = function useDate(props) {
|
|
|
40175
40196
|
return util.getDateInfo(date, 'week', options);
|
|
40176
40197
|
};
|
|
40177
40198
|
var getDateWithTime = function getDateWithTime(date) {
|
|
40178
|
-
|
|
40179
|
-
max = props.max;
|
|
40180
|
-
var timeDate = props.value || props.defaultTime && util.cloneTime(date, props.defaultTime, util.TIME_FORMAT, options);
|
|
40181
|
-
var newDate = util.toDate(date);
|
|
40182
|
-
if (timeDate) {
|
|
40183
|
-
newDate = util.setTime(newDate, timeDate, options);
|
|
40184
|
-
}
|
|
40185
|
-
// only can select day with the same day of min/max
|
|
40186
|
-
if (min && util.compareAsc(newDate, min) < 0) newDate = util.setTime(newDate, min, options);
|
|
40187
|
-
if (max && util.compareAsc(newDate, max) > 0) newDate = util.setTime(newDate, max, options);
|
|
40188
|
-
return newDate;
|
|
40199
|
+
return util.getDateWithTime(date, props.value, props.defaultTime, props.min, props.max, options);
|
|
40189
40200
|
};
|
|
40190
40201
|
var handleDayClick = function handleDayClick(date) {
|
|
40191
40202
|
var _props$onChange;
|
|
@@ -40763,8 +40774,8 @@ var Day = function Day(props) {
|
|
|
40763
40774
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerFooter,
|
|
40764
40775
|
dir: direction,
|
|
40765
40776
|
children: [props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40766
|
-
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterLeft, styles === null || styles === void 0 ? void 0 : styles.datetime),
|
|
40767
|
-
children:
|
|
40777
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterLeft, styles === null || styles === void 0 ? void 0 : styles.datetime, !timeStr && (styles === null || styles === void 0 ? void 0 : styles.datetimeHide)),
|
|
40778
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
40768
40779
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
40769
40780
|
children: icons_config.datepicker.Time
|
|
40770
40781
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(time, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -40772,7 +40783,7 @@ var Day = function Day(props) {
|
|
|
40772
40783
|
showTitle: false,
|
|
40773
40784
|
format: format
|
|
40774
40785
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
40775
|
-
children:
|
|
40786
|
+
children: timeStr
|
|
40776
40787
|
})]
|
|
40777
40788
|
})
|
|
40778
40789
|
}), showRight && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -41645,7 +41656,7 @@ var useRangePick = function useRangePick(props) {
|
|
|
41645
41656
|
newArr[1] = rangeMax;
|
|
41646
41657
|
}
|
|
41647
41658
|
} else if (date.getTime() > newArr[1].getTime()) {
|
|
41648
|
-
var a = util.cloneTime(new Date(date), defaultTimeArr[1], 'HH:mm:ss', options);
|
|
41659
|
+
var a = util.cloneTime(new Date(date), arr[1] || defaultTimeArr[1], 'HH:mm:ss', options);
|
|
41649
41660
|
newArr[1] = a.getTime() > date.getTime() ? a : new Date(date);
|
|
41650
41661
|
}
|
|
41651
41662
|
}
|
|
@@ -41713,6 +41724,14 @@ var useRangePick = function useRangePick(props) {
|
|
|
41713
41724
|
var setTargetStart = usePersistFn(function (date) {
|
|
41714
41725
|
setTargetArr([date, undefined]);
|
|
41715
41726
|
});
|
|
41727
|
+
var getStartDobule = usePersistFn(function (date) {
|
|
41728
|
+
var end = util.getDateWithTime(date, props.dateArr[1], defaultTimeArr[1], endMin, endMax, options);
|
|
41729
|
+
return end;
|
|
41730
|
+
});
|
|
41731
|
+
var getEndDobule = usePersistFn(function (date) {
|
|
41732
|
+
var start = util.getDateWithTime(date, props.dateArr[1], defaultTimeArr[1], startMin, startMax, options);
|
|
41733
|
+
return start;
|
|
41734
|
+
});
|
|
41716
41735
|
var setTargetEnd = usePersistFn(function (date) {
|
|
41717
41736
|
setTargetArr([undefined, date]);
|
|
41718
41737
|
});
|
|
@@ -41769,7 +41788,9 @@ var useRangePick = function useRangePick(props) {
|
|
|
41769
41788
|
setTargetStart: setTargetStart,
|
|
41770
41789
|
setTargetEnd: setTargetEnd,
|
|
41771
41790
|
startDisabled: startDisabled,
|
|
41772
|
-
endDisabled: endDisabled
|
|
41791
|
+
endDisabled: endDisabled,
|
|
41792
|
+
getStartDobule: getStartDobule,
|
|
41793
|
+
getEndDobule: getEndDobule
|
|
41773
41794
|
});
|
|
41774
41795
|
var minDate = min ? util.toDate(min, options) : undefined;
|
|
41775
41796
|
var maxDate = max ? util.toDate(max, options) : undefined;
|
|
@@ -41913,12 +41934,18 @@ var Picker = function Picker(props) {
|
|
|
41913
41934
|
onDoubleClick: function onDoubleClick(item, type) {
|
|
41914
41935
|
// 双击同时设置开始和结束日期
|
|
41915
41936
|
if (props.range && props.type === 'datetime') {
|
|
41916
|
-
if (position === 'start'
|
|
41917
|
-
func.
|
|
41918
|
-
|
|
41919
|
-
|
|
41920
|
-
|
|
41921
|
-
|
|
41937
|
+
if (position === 'start') {
|
|
41938
|
+
var end = func.getStartDobule(item);
|
|
41939
|
+
if (!isDisabledDate(end, 'end')) {
|
|
41940
|
+
func.setCurrentEnd(end, type);
|
|
41941
|
+
func.setDateEnd(end, true);
|
|
41942
|
+
}
|
|
41943
|
+
} else if (position === 'end') {
|
|
41944
|
+
var start = func.getEndDobule(item);
|
|
41945
|
+
if (!isDisabledDate(start, 'start')) {
|
|
41946
|
+
func.setCurrentStart(start, type);
|
|
41947
|
+
func.setDateStart(start, true);
|
|
41948
|
+
}
|
|
41922
41949
|
}
|
|
41923
41950
|
}
|
|
41924
41951
|
}
|
|
@@ -42764,12 +42791,14 @@ var Modal = function Modal(props) {
|
|
|
42764
42791
|
defaultHeight: height,
|
|
42765
42792
|
panelRef: panelRef
|
|
42766
42793
|
});
|
|
42794
|
+
var rerender = useRender();
|
|
42767
42795
|
var handleMaskVisible = function handleMaskVisible() {
|
|
42768
42796
|
// 多个moal 只有第一个显示的时候才显示遮罩
|
|
42769
42797
|
// context.isMask 用来判断是否是第一个显示的modal
|
|
42770
42798
|
if (visible && !hasMask) {
|
|
42771
42799
|
context.isMask = true;
|
|
42772
42800
|
hasMask = true;
|
|
42801
|
+
rerender();
|
|
42773
42802
|
}
|
|
42774
42803
|
};
|
|
42775
42804
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(handleMaskVisible, [visible]);
|
|
@@ -44473,6 +44502,15 @@ function spliceValue(obj, name, index) {
|
|
|
44473
44502
|
delete obj[n];
|
|
44474
44503
|
});
|
|
44475
44504
|
}
|
|
44505
|
+
;// CONCATENATED MODULE: ../hooks/src/common/use-default-value/use-previous.ts
|
|
44506
|
+
|
|
44507
|
+
function use_previous_usePrevious(value) {
|
|
44508
|
+
var ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
44509
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
44510
|
+
ref.current = value;
|
|
44511
|
+
});
|
|
44512
|
+
return ref.current;
|
|
44513
|
+
}
|
|
44476
44514
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form.ts
|
|
44477
44515
|
|
|
44478
44516
|
|
|
@@ -44484,6 +44522,7 @@ function spliceValue(obj, name, index) {
|
|
|
44484
44522
|
|
|
44485
44523
|
|
|
44486
44524
|
|
|
44525
|
+
|
|
44487
44526
|
var globalKey = '__global__&&@@';
|
|
44488
44527
|
|
|
44489
44528
|
|
|
@@ -44511,6 +44550,7 @@ var useForm = function useForm(props) {
|
|
|
44511
44550
|
removeUndefined: removeUndefined,
|
|
44512
44551
|
forceSet: true
|
|
44513
44552
|
};
|
|
44553
|
+
var preValue = use_previous_usePrevious(props.value);
|
|
44514
44554
|
var formRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef();
|
|
44515
44555
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({
|
|
44516
44556
|
defaultValues: {},
|
|
@@ -44881,8 +44921,8 @@ var useForm = function useForm(props) {
|
|
|
44881
44921
|
var updateValue = function updateValue() {
|
|
44882
44922
|
if (props.value !== context.lastValue && props.value !== context.value) {
|
|
44883
44923
|
context.value = deepClone(props.value) || emptyObj;
|
|
44884
|
-
context.lastValue = props.value;
|
|
44885
44924
|
}
|
|
44925
|
+
context.lastValue = props.value;
|
|
44886
44926
|
};
|
|
44887
44927
|
updateValue();
|
|
44888
44928
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
@@ -44905,14 +44945,13 @@ var useForm = function useForm(props) {
|
|
|
44905
44945
|
if (props.value === context.value) return;
|
|
44906
44946
|
if (initValidate && !context.resetTime) {
|
|
44907
44947
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
44908
|
-
var oldValue = deepGet(
|
|
44948
|
+
var oldValue = deepGet(preValue || emptyObj, key);
|
|
44909
44949
|
var newValue = deepGet(context.value || emptyObj, key);
|
|
44910
44950
|
return !shallowEqual(oldValue, newValue);
|
|
44911
44951
|
});
|
|
44912
44952
|
validateFields(keys).catch(function () {});
|
|
44913
44953
|
}
|
|
44914
44954
|
update();
|
|
44915
|
-
context.lastValue = props.value;
|
|
44916
44955
|
context.resetTime = 0;
|
|
44917
44956
|
}, [props.value]);
|
|
44918
44957
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
@@ -48971,7 +49010,7 @@ var Tree = function Tree(props) {
|
|
|
48971
49010
|
handleUpdateExpanded(expanded);
|
|
48972
49011
|
}, [expanded]);
|
|
48973
49012
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
48974
|
-
if (!active) return;
|
|
49013
|
+
// if (!active) return;
|
|
48975
49014
|
handleUpdateActive(active);
|
|
48976
49015
|
}, [active]);
|
|
48977
49016
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -50581,6 +50620,7 @@ var PaginationSimple = function PaginationSimple(props) {
|
|
|
50581
50620
|
|
|
50582
50621
|
|
|
50583
50622
|
|
|
50623
|
+
|
|
50584
50624
|
var usePagination = function usePagination(props) {
|
|
50585
50625
|
var totalProp = props.total,
|
|
50586
50626
|
pageSizeProp = props.pageSize,
|
|
@@ -50601,14 +50641,15 @@ var usePagination = function usePagination(props) {
|
|
|
50601
50641
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
50602
50642
|
if (pageSizeProp !== pageSize) setPageSize(pageSizeProp);
|
|
50603
50643
|
}, [pageSizeProp]);
|
|
50604
|
-
var handleChange = function
|
|
50605
|
-
|
|
50644
|
+
var handleChange = usePersistFn(function (c, size) {
|
|
50645
|
+
if (c === current && size === undefined) return;
|
|
50646
|
+
setCurrent(c);
|
|
50606
50647
|
setPageSize(size || pageSizeProp);
|
|
50607
50648
|
if (onChange) {
|
|
50608
|
-
var sizeChange = pageSize !== size;
|
|
50609
|
-
onChange(
|
|
50649
|
+
var sizeChange = size !== undefined && pageSize !== size;
|
|
50650
|
+
onChange(c, size || pageSize, sizeChange);
|
|
50610
50651
|
}
|
|
50611
|
-
};
|
|
50652
|
+
});
|
|
50612
50653
|
var getRootProps = function getRootProps() {
|
|
50613
50654
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
50614
50655
|
var externalEventHandlers = extractEventHandlers(externalProps);
|
|
@@ -59412,7 +59453,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
59412
59453
|
keygen: keygen,
|
|
59413
59454
|
unmatch: unmatch,
|
|
59414
59455
|
value: value,
|
|
59415
|
-
highlight:
|
|
59456
|
+
highlight: !multiple,
|
|
59416
59457
|
loader: loader,
|
|
59417
59458
|
onExpand: onExpandTree,
|
|
59418
59459
|
expanded: controlExpanded,
|
|
@@ -63048,7 +63089,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
63048
63089
|
|
|
63049
63090
|
|
|
63050
63091
|
/* harmony default export */ var src_0 = ({
|
|
63051
|
-
version: '3.2.
|
|
63092
|
+
version: '3.2.4'
|
|
63052
63093
|
});
|
|
63053
63094
|
}();
|
|
63054
63095
|
/******/ return __webpack_exports__;
|