shineout 3.5.6-beta.1 → 3.5.6-beta.11

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.1'
510
+ version: '3.5.6-beta.11'
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.1');
12043
+ /* harmony default export */ var version = ('3.5.6-beta.11');
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: '" "',
@@ -23529,10 +23529,9 @@ var scale_circle_loop = function loop() {
23529
23529
  boxSizing: 'border-box',
23530
23530
  position: 'relative',
23531
23531
  borderStyle: 'solid',
23532
- borderColor: src.spinColor,
23532
+ borderColor: "transparent ".concat(src.spinColor, " ").concat(src.spinColor, " ").concat(src.spinColor),
23533
23533
  borderRadius: '50%',
23534
- animation: '$ring 1s linear infinite',
23535
- borderTopColor: 'transparent'
23534
+ animation: '$ring 1s linear infinite'
23536
23535
  });
23537
23536
  ;// CONCATENATED MODULE: ../shineout-style/src/spin/tree-bounce.ts
23538
23537
 
@@ -23959,16 +23958,66 @@ var stepsStyle = {
23959
23958
  small: {
23960
23959
  fontSize: src.stepsIconFontSize,
23961
23960
  '&$arrow': {
23961
+ '& $step[dir=rtl]:after': {
23962
+ left: -12
23963
+ },
23962
23964
  '& $step:not(:last-child)': {
23965
+ '&$widthDescription': {
23966
+ '&:after': {
23967
+ borderLeftWidth: 22,
23968
+ borderTopWidth: 28,
23969
+ borderBottomWidth: 28
23970
+ },
23971
+ '&:before': {
23972
+ borderLeftWidth: 22,
23973
+ borderTopWidth: 28,
23974
+ borderBottomWidth: 28
23975
+ },
23976
+ '&[dir=ltr]:after': {
23977
+ right: -22
23978
+ },
23979
+ '&[dir=rtl]:after': {
23980
+ left: -22
23981
+ }
23982
+ },
23983
+ '&[dir=rtl]:after': {
23984
+ left: -12,
23985
+ right: 'auto'
23986
+ },
23963
23987
  '&:after': {
23964
- top: "calc(100% - 28px)",
23965
- width: 56,
23966
- height: 56
23988
+ top: 0,
23989
+ right: -12,
23990
+ width: 12,
23991
+ height: 32,
23992
+ borderLeftWidth: 12,
23993
+ borderTopWidth: 16,
23994
+ borderBottomWidth: 16
23995
+ },
23996
+ '&:before': {
23997
+ top: 0,
23998
+ width: 12,
23999
+ height: 32,
24000
+ borderLeftWidth: 12,
24001
+ borderTopWidth: 16,
24002
+ borderBottomWidth: 16,
24003
+ right: -12
24004
+ },
24005
+ '&[dir=rtl]:before': {
24006
+ right: 0
24007
+ }
24008
+ },
24009
+ '& $step:last-child': {
24010
+ '&$widthDescription': {
24011
+ '&:before': {
24012
+ borderLeftWidth: 22,
24013
+ borderTopWidth: 28,
24014
+ borderBottomWidth: 28
24015
+ }
23967
24016
  },
23968
24017
  '&:before': {
23969
- top: "calc(100% - 28px)",
23970
- width: 56,
23971
- height: 56
24018
+ borderLeftWidth: 12,
24019
+ borderTopWidth: 16,
24020
+ borderBottomWidth: 16
23972
24021
  }
23973
24022
  },
23974
24023
  '& $content': {
@@ -24057,9 +24106,67 @@ var stepsStyle = {
24057
24106
  },
24058
24107
  large: {
24059
24108
  '&$arrow': {
24060
- '& $step': {
24061
- '&:after': {},
24062
- '&:before': {}
24109
+ '& $step:not(:last-child)': {
24110
+ '&$widthDescription': {
24111
+ '&:after': {
24112
+ top: 0,
24113
+ width: 30,
24114
+ height: 72,
24115
+ borderLeftWidth: 30,
24116
+ borderTopWidth: 36,
24117
+ borderBottomWidth: 36
24118
+ },
24119
+ '&:before': {
24120
+ borderLeftWidth: 30,
24121
+ borderTopWidth: 36,
24122
+ borderBottomWidth: 36
24123
+ },
24124
+ '&[dir=ltr]:after': {
24125
+ right: -30
24126
+ },
24127
+ '&[dir=rtl]:after': {
24128
+ left: -30
24129
+ }
24130
+ },
24131
+ '&[dir=rtl]:after': {
24132
+ left: -20,
24133
+ right: 'auto'
24134
+ },
24135
+ '&[dir=rtl]:before': {
24136
+ right: 0
24137
+ },
24138
+ '&:after': {
24139
+ top: 0,
24140
+ width: 20,
24141
+ height: 48,
24142
+ borderLeftWidth: 20,
24143
+ borderTopWidth: 24,
24144
+ borderBottomWidth: 24,
24145
+ right: -20
24146
+ },
24147
+ '&:before': {
24148
+ top: 0,
24149
+ width: 20,
24150
+ height: 48,
24151
+ borderLeftWidth: 20,
24152
+ borderTopWidth: 24,
24153
+ borderBottomWidth: 24,
24154
+ right: -20
24155
+ }
24156
+ },
24157
+ '& $step:last-child': {
24158
+ '&$widthDescription': {
24159
+ '&:before': {
24160
+ borderLeftWidth: 30,
24161
+ borderTopWidth: 36,
24162
+ borderBottomWidth: 36
24163
+ }
24164
+ },
24165
+ '&:before': {
24166
+ borderLeftWidth: 20,
24167
+ borderTopWidth: 24,
24168
+ borderBottomWidth: 24
24169
+ }
24063
24170
  },
24064
24171
  '& $content': {
24065
24172
  padding: "".concat(src.stepsLargeArrowPaddingY, " ").concat(src.stepsLargeArrowPaddingX),
@@ -37909,7 +38016,7 @@ var FilterNode = function FilterNode(props) {
37909
38016
  onChange = props.onChange,
37910
38017
  onPathChange = props.onPathChange;
37911
38018
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
37912
- var handleSelectItem = function handleSelectItem(index, e) {
38019
+ var handleSelectItem = function handleSelectItem(index, d, e) {
37913
38020
  var isFinal = data && index === data.length - 1;
37914
38021
  if (shouldFinal && !isFinal) return;
37915
38022
  if (e) e.stopPropagation();
@@ -37919,13 +38026,13 @@ var FilterNode = function FilterNode(props) {
37919
38026
  var keys = data.slice(0, index + 1).map(function (i) {
37920
38027
  return datum.getKey(i);
37921
38028
  });
37922
- if (onChange) onChange(keys);
38029
+ if (onChange) onChange(keys, d);
37923
38030
  onPathChange(datum.getKey(item), item, keys.slice(0, keys.length - 1), true);
37924
38031
  setInputText('');
37925
38032
  setFilterText('');
37926
38033
  };
37927
38034
  var handleSelect = function handleSelect() {
37928
- handleSelectItem(data.length - 1);
38035
+ handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
37929
38036
  };
37930
38037
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
37931
38038
  className: classnames_default()(styles.option, styles.filterOption),
@@ -37934,7 +38041,7 @@ var FilterNode = function FilterNode(props) {
37934
38041
  className: classnames_default()(styles.optionInner),
37935
38042
  children: data.map(function (item, index) {
37936
38043
  var handleClick = function handleClick(e) {
37937
- handleSelectItem(index, e);
38044
+ handleSelectItem(index, item, e);
37938
38045
  };
37939
38046
  var isDisabled = datum.isDisabled(datum.getKey(item));
37940
38047
  var content = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@@ -39153,6 +39260,13 @@ var result_Result = function Result(props) {
39153
39260
  }
39154
39261
  mounted.current = true;
39155
39262
  }, [focus, placeholder, multiple]);
39263
+
39264
+ // Select多选模式下,且开启了onFilter,自动聚焦
39265
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
39266
+ if (multiple && focus && inputRef !== null && inputRef !== void 0 && inputRef.current) {
39267
+ inputRef.current.focus();
39268
+ }
39269
+ }, [focus, multiple]);
39156
39270
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
39157
39271
  handleResetMore();
39158
39272
  }, [valueProp, data]);
@@ -39556,12 +39670,13 @@ var Cascader = function Cascader(props0) {
39556
39670
  onClick: handleResultClick,
39557
39671
  children: defaultIcon
39558
39672
  });
39673
+ var close = /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
39674
+ className: styles.clearIcon,
39675
+ onClick: handleClear,
39676
+ children: icons_config.cascader.Close
39677
+ });
39559
39678
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
39560
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
39561
- className: styles.clearIcon,
39562
- onClick: handleClear,
39563
- children: icons_config.cascader.Close
39564
- }), !open && !isEmpty && arrow]
39679
+ children: [close, !open && !isEmpty && !focused && arrow]
39565
39680
  });
39566
39681
  };
39567
39682
  var renderIcon = function renderIcon() {
@@ -45075,11 +45190,23 @@ var DatePicker = function DatePicker(props0) {
45075
45190
  }
45076
45191
  } else {
45077
45192
  func.finishEdit();
45193
+
45194
+ // 如果是通过 props.open 控制的,那么需要在关闭时,将组件再次进入编辑状态
45195
+ if (props.open === true) {
45196
+ func.startEdit();
45197
+ }
45078
45198
  }
45079
45199
  setIsCloseFromConfirm(false);
45080
45200
  }
45081
45201
  (_props$onCollapse = props.onCollapse) === null || _props$onCollapse === void 0 || _props$onCollapse.call(props, isOpen);
45082
45202
  });
45203
+
45204
+ // 如果一开始就打开了板子,那么需要初始化让组件进入编辑状态
45205
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
45206
+ if (props.open) {
45207
+ func.startEdit();
45208
+ }
45209
+ }, []);
45083
45210
  var _usePopup = use_popup({
45084
45211
  open: props.open,
45085
45212
  onCollapse: onCollapse,
@@ -47688,10 +47815,21 @@ var useForm = function useForm(props) {
47688
47815
  } else {
47689
47816
  var names = isArray(name) ? name : [name];
47690
47817
  names.forEach(function (key) {
47691
- var _context$updateMap$ke2, _context$flowMap$key;
47692
- (_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
47693
- update(context.value, context.errors, context.serverErrors);
47694
- });
47818
+ var _context$flowMap$key;
47819
+ // 外部直接设置user.name这种格式的,但是又没有显性的声明user.name绑定的表单元素;
47820
+ // 这里需要手动触发,否则会导致Input输入过程中光标跳到末尾的异常
47821
+ if (!context.updateMap[key]) {
47822
+ var _context$updateMap$pa;
47823
+ var parentKey = key.split('.')[0];
47824
+ (_context$updateMap$pa = context.updateMap[parentKey]) === null || _context$updateMap$pa === void 0 || _context$updateMap$pa.forEach(function (update) {
47825
+ update(context.value, context.errors, context.serverErrors);
47826
+ });
47827
+ } else {
47828
+ var _context$updateMap$ke2;
47829
+ (_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
47830
+ update(context.value, context.errors, context.serverErrors);
47831
+ });
47832
+ }
47695
47833
  (_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
47696
47834
  update();
47697
47835
  });
@@ -56330,6 +56468,7 @@ var radio_group_Group = function Group(props0) {
56330
56468
  checked: datum.check(d),
56331
56469
  disabled: datum.disabledCheck(d),
56332
56470
  htmlValue: i,
56471
+ size: size,
56333
56472
  onChange: handleIndexChange,
56334
56473
  renderRadio: renderRadio,
56335
56474
  children: getContent(d, i)
@@ -67186,7 +67325,7 @@ var upload_interface = __webpack_require__(8821);
67186
67325
 
67187
67326
 
67188
67327
  /* harmony default export */ var src_0 = ({
67189
- version: '3.5.6-beta.1'
67328
+ version: '3.5.6-beta.11'
67190
67329
  });
67191
67330
  }();
67192
67331
  /******/ return __webpack_exports__;