shineout 3.5.6-beta.8 → 3.5.6-fix.1

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 CHANGED
@@ -507,5 +507,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
507
507
  // 此文件由脚本自动生成,请勿直接修改。
508
508
  // This file was generated automatically by a script. Please do not modify it directly.
509
509
  var _default = exports.default = {
510
- version: '3.5.6-beta.8'
510
+ version: '3.5.6-fix.1'
511
511
  };
package/dist/shineout.js CHANGED
@@ -12040,7 +12040,7 @@ var handleStyle = function handleStyle(style) {
12040
12040
  };
12041
12041
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12042
12042
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12043
- /* harmony default export */ var version = ('3.5.6-beta.8');
12043
+ /* harmony default export */ var version = ('3.5.6-fix.1');
12044
12044
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12045
12045
 
12046
12046
 
@@ -21777,7 +21777,7 @@ var popoverStyle = {
21777
21777
  },
21778
21778
  '&::after': {
21779
21779
  // left: arrowGap * -1,
21780
- left: "calc(".concat(hideArrowGap, " * -1)"),
21780
+ right: "calc(".concat(hideArrowGap, " * -1)"),
21781
21781
  top: '0',
21782
21782
  bottom: '0',
21783
21783
  content: '" "',
@@ -33557,19 +33557,18 @@ function useInputAble(props) {
33557
33557
  var render = useRender(syncValue);
33558
33558
  var shouldUseState = delay || !control;
33559
33559
  var value = shouldUseState ? stateValue : valuePo;
33560
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
33561
- if (context.timer) {
33562
- clearTimeout(context.timer);
33563
- context.timer = null;
33564
- }
33560
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
33565
33561
  if (delay && control && props.value !== stateValue) {
33566
33562
  changeStateValue(props.value);
33563
+ } else if (context.timer) {
33564
+ clearTimeout(context.timer);
33565
+ context.timer = null;
33567
33566
  }
33568
33567
  }, [props.value, delay, control]);
33569
33568
  var forceDelayChange = use_persist_fn(function () {
33570
- if (context.timer && context.delayChange) {
33569
+ if (context.delayChange) context.delayChange();
33570
+ if (context.timer) {
33571
33571
  clearTimeout(context.timer);
33572
- context.delayChange();
33573
33572
  context.timer = null;
33574
33573
  context.delayChange = null;
33575
33574
  }
@@ -34972,6 +34971,9 @@ var checkbox_Checkbox = function Checkbox(props) {
34972
34971
  if ('value' in props && props.checked === undefined) {
34973
34972
  onInputableCheckboxChange(checked);
34974
34973
  }
34974
+ if (props.onRawChange) {
34975
+ props.onRawChange(checked ? htmlValue : undefined, checked, htmlValue);
34976
+ }
34975
34977
  onChange === null || onChange === void 0 || onChange(checked ? htmlValue : undefined, checked, htmlValue);
34976
34978
  });
34977
34979
  var getChecked = function getChecked() {
@@ -35012,7 +35014,10 @@ var checkbox_Checkbox = function Checkbox(props) {
35012
35014
  var CheckboxWithContext = function CheckboxWithContext(props) {
35013
35015
  return /*#__PURE__*/(0,jsx_runtime.jsx)(group_context.Consumer, {
35014
35016
  children: function children(value) {
35015
- return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()({}, props), value));
35017
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(checkbox_Checkbox, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, props), value), {}, {
35018
+ onRawChange: props.onChange,
35019
+ checked: 'checked' in props ? props.checked : value.checked
35020
+ }));
35016
35021
  }
35017
35022
  });
35018
35023
  };
@@ -38016,7 +38021,7 @@ var FilterNode = function FilterNode(props) {
38016
38021
  onChange = props.onChange,
38017
38022
  onPathChange = props.onPathChange;
38018
38023
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
38019
- var handleSelectItem = function handleSelectItem(index, e) {
38024
+ var handleSelectItem = function handleSelectItem(index, d, e) {
38020
38025
  var isFinal = data && index === data.length - 1;
38021
38026
  if (shouldFinal && !isFinal) return;
38022
38027
  if (e) e.stopPropagation();
@@ -38026,13 +38031,13 @@ var FilterNode = function FilterNode(props) {
38026
38031
  var keys = data.slice(0, index + 1).map(function (i) {
38027
38032
  return datum.getKey(i);
38028
38033
  });
38029
- if (onChange) onChange(keys);
38034
+ if (onChange) onChange(keys, d);
38030
38035
  onPathChange(datum.getKey(item), item, keys.slice(0, keys.length - 1), true);
38031
38036
  setInputText('');
38032
38037
  setFilterText('');
38033
38038
  };
38034
38039
  var handleSelect = function handleSelect() {
38035
- handleSelectItem(data.length - 1);
38040
+ handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
38036
38041
  };
38037
38042
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
38038
38043
  className: classnames_default()(styles.option, styles.filterOption),
@@ -38041,7 +38046,7 @@ var FilterNode = function FilterNode(props) {
38041
38046
  className: classnames_default()(styles.optionInner),
38042
38047
  children: data.map(function (item, index) {
38043
38048
  var handleClick = function handleClick(e) {
38044
- handleSelectItem(index, e);
38049
+ handleSelectItem(index, item, e);
38045
38050
  };
38046
38051
  var isDisabled = datum.isDisabled(datum.getKey(item));
38047
38052
  var content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -39670,12 +39675,13 @@ var Cascader = function Cascader(props0) {
39670
39675
  onClick: handleResultClick,
39671
39676
  children: defaultIcon
39672
39677
  });
39678
+ var close = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
39679
+ className: styles.clearIcon,
39680
+ onClick: handleClear,
39681
+ children: icons_config.cascader.Close
39682
+ });
39673
39683
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
39674
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
39675
- className: styles.clearIcon,
39676
- onClick: handleClear,
39677
- children: icons_config.cascader.Close
39678
- }), !open && !isEmpty && arrow]
39684
+ children: [close, !open && !isEmpty && !focused && arrow]
39679
39685
  });
39680
39686
  };
39681
39687
  var renderIcon = function renderIcon() {
@@ -67324,7 +67330,7 @@ var upload_interface = __webpack_require__(8821);
67324
67330
 
67325
67331
 
67326
67332
  /* harmony default export */ var src_0 = ({
67327
- version: '3.5.6-beta.8'
67333
+ version: '3.5.6-fix.1'
67328
67334
  });
67329
67335
  }();
67330
67336
  /******/ return __webpack_exports__;