shineout 3.7.7 → 3.7.8-beta.2

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/README-zh_CN.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/v/shineout.svg?style=flat-square"></a>
13
13
  <a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/dm/shineout.svg?style=flat-square"></a>
14
- <img src="https://img.shields.io/badge/React-%3E%3D16.8.0-green.svg?style=flat-square">
14
+ <img src="https://img.shields.io/badge/React-%3E%3D16.14.0-green.svg?style=flat-square">
15
15
  </p>
16
16
 
17
17
  ## ✨ 特性
package/README.md CHANGED
@@ -11,7 +11,7 @@ English | [简体中文](./README-zh_CN.md)
11
11
  <p align="center">
12
12
  <a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/v/shineout.svg?style=flat-square"></a>
13
13
  <a href="https://www.npmjs.com/package/shineout"><img src="https://img.shields.io/npm/dm/shineout.svg?style=flat-square"></a>
14
- <img src="https://img.shields.io/badge/React-%3E%3D16.8.0-green.svg?style=flat-square">
14
+ <img src="https://img.shields.io/badge/React-%3E%3D16.14.0-green.svg?style=flat-square">
15
15
  </p>
16
16
 
17
17
  ## ✨ Features
package/cjs/index.js CHANGED
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.7.7'
525
+ version: '3.7.8-beta.2'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.7');
12237
+ /* harmony default export */ var version = ('3.7.8-beta.2');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -45939,7 +45939,9 @@ var useTime = function useTime(props) {
45939
45939
  _props$secondStep = props.secondStep,
45940
45940
  secondStep = _props$secondStep === void 0 ? 1 : _props$secondStep,
45941
45941
  staticMin = props.staticMin,
45942
- staticMax = props.staticMax;
45942
+ staticMax = props.staticMax,
45943
+ position = props.position,
45944
+ rangeDate = props.rangeDate;
45943
45945
  var min = util.resetTimeByFormat(mi, format, options);
45944
45946
  var max = util.resetTimeByFormat(ma, format, options);
45945
45947
  var current = props.value || util.newDate(undefined, options);
@@ -45965,7 +45967,7 @@ var useTime = function useTime(props) {
45965
45967
  disabledTime = props.disabledTime;
45966
45968
  if (disabledTime) {
45967
45969
  var _time = util.format(date, util.TIME_FORMAT, options);
45968
- if (typeof disabledTime === 'function') return disabledTime(_time);
45970
+ if (typeof disabledTime === 'function') return disabledTime(_time, position, rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[0], rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[1]);
45969
45971
  return disabledTime === _time;
45970
45972
  }
45971
45973
  var isDis = disabled && typeof disabled === 'function' ? disabled(date) : false;
@@ -46316,7 +46318,9 @@ var Time = function Time(props) {
46316
46318
  disabledTime: props.disabledTime,
46317
46319
  hourStep: props.hourStep,
46318
46320
  minuteStep: props.minuteStep,
46319
- secondStep: props.secondStep
46321
+ secondStep: props.secondStep,
46322
+ position: props.position,
46323
+ rangeDate: props.rangeDate
46320
46324
  }),
46321
46325
  func = _useTimePick.func,
46322
46326
  times = _useTimePick.times;
@@ -50831,7 +50835,7 @@ var useForm = function useForm(props) {
50831
50835
  var _props$onChange;
50832
50836
  var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
50833
50837
  context.value = newValue;
50834
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, context.value);
50838
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, deepClone(context.value));
50835
50839
  });
50836
50840
  var scrollToField = use_persist_fn(function (name) {
50837
50841
  var _document;
@@ -51211,11 +51215,6 @@ var useForm = function useForm(props) {
51211
51215
  // 默认值更新
51212
51216
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
51213
51217
  context.removeLock = false;
51214
- // 内部 onChange 改的 value, 不需要更新
51215
- if (props.value === context.value) {
51216
- if (!isControl) update();
51217
- return;
51218
- }
51219
51218
  if (initValidate && !context.resetTime) {
51220
51219
  var keys = Object.keys(context.validateMap).filter(function (key) {
51221
51220
  var oldValue = deepGet(preValue || emptyObj, key);
@@ -51225,6 +51224,7 @@ var useForm = function useForm(props) {
51225
51224
  validateFields(keys).catch(function () {});
51226
51225
  }
51227
51226
  update();
51227
+ if (!isControl) return;
51228
51228
  // 默认值上位时会提前触发外部的onChange, 导致外部的多次setFormValue不能合并后生效的问题(ReactDOM.render方式渲染)
51229
51229
  setTimeout(updateDefaultValue);
51230
51230
  context.resetTime = 0;
@@ -71838,7 +71838,7 @@ var upload_interface = __webpack_require__(8821);
71838
71838
 
71839
71839
 
71840
71840
  /* harmony default export */ var src_0 = ({
71841
- version: '3.7.7'
71841
+ version: '3.7.8-beta.2'
71842
71842
  });
71843
71843
  }();
71844
71844
  /******/ return __webpack_exports__;