shineout 3.6.2-beta.5 → 3.6.2-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
@@ -514,5 +514,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
514
514
  // 此文件由脚本自动生成,请勿直接修改。
515
515
  // This file was generated automatically by a script. Please do not modify it directly.
516
516
  var _default = exports.default = {
517
- version: '3.6.2-beta.5'
517
+ version: '3.6.2-fix.1'
518
518
  };
package/dist/shineout.js CHANGED
@@ -12139,7 +12139,7 @@ var handleStyle = function handleStyle(style) {
12139
12139
  };
12140
12140
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12141
12141
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12142
- /* harmony default export */ var version = ('3.6.2-beta.5');
12142
+ /* harmony default export */ var version = ('3.6.2-fix.1');
12143
12143
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12144
12144
 
12145
12145
 
@@ -13262,6 +13262,8 @@ var cascaderTokens = {
13262
13262
  cascaderPaddingY: 'Spacing-2',
13263
13263
  cascaderIconSize: 'Size-7',
13264
13264
  cascaderIconColor: 'Neutral-text-4',
13265
+ cascaderTagMarginY: 'Spacing-2',
13266
+ cascaderTagMarginRight: 'Spacing-4',
13265
13267
  cascaderSmallFontSize: 'Font-12',
13266
13268
  cascaderSmallPaddingX: 'Spacing-8',
13267
13269
  cascaderSmallPaddingY: 'Spacing-1',
@@ -15138,6 +15140,8 @@ var treeSelectTokens = {
15138
15140
  treeSelectIconSize: 'Size-7',
15139
15141
  treeSelectIconColor: 'Neutral-text-4',
15140
15142
  treeSelectIconDisabledColor: 'Neutral-text-2',
15143
+ treeSelectTagMarginY: 'Spacing-2',
15144
+ treeSelectTagMarginRight: 'Spacing-4',
15141
15145
  treeSelectSmallFontSize: 'Font-12',
15142
15146
  treeSelectSmallPaddingX: 'Spacing-8',
15143
15147
  treeSelectSmallPaddingY: 'Spacing-1',
@@ -16059,6 +16063,18 @@ var ButtonStyle = {
16059
16063
  '&:active': {
16060
16064
  transition: 'none'
16061
16065
  },
16066
+ '[data-soui-role="input-group"] > &': {
16067
+ borderWidth: 0,
16068
+ borderRadius: 0,
16069
+ '&:first-child': {
16070
+ borderTopLeftRadius: "calc(".concat(src.buttonBorderRadius, " - 1px)"),
16071
+ borderBottomLeftRadius: "calc(".concat(src.buttonBorderRadius, " - 1px)")
16072
+ },
16073
+ '&:last-child': {
16074
+ borderTopRightRadius: "calc(".concat(src.buttonBorderRadius, " - 1px)"),
16075
+ borderBottomRightRadius: "calc(".concat(src.buttonBorderRadius, " - 1px)")
16076
+ }
16077
+ },
16062
16078
  '[data-soui-role="input-group-seperate"] > &': {
16063
16079
  borderRadius: 0,
16064
16080
  marginLeft: -1,
@@ -16946,14 +16962,13 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
16946
16962
  flex: 1,
16947
16963
  minWidth: 0
16948
16964
  },
16949
- '[data-soui-role="input-group"] [data-soui-input-border] + &': {
16965
+ '[data-soui-role="input-group"] [data-soui-input-border] + &&&': {
16950
16966
  borderLeftWidth: '1px'
16951
16967
  },
16952
16968
  '[data-soui-role="input-group-seperate"] &&&, [data-soui-role="input-group-seperate"] &&&:hover': {
16953
16969
  borderRadius: 0,
16954
16970
  flexShrink: 0,
16955
16971
  width: 'auto',
16956
- flex: 1,
16957
16972
  'margin-left': "-1px",
16958
16973
  '&:hover': {
16959
16974
  zIndex: 1050
@@ -17036,6 +17051,9 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
17036
17051
  boxShadow: "0 0 0 2px ".concat(token.errorFocusShadow),
17037
17052
  borderColor: token.errorFocusBorderColor,
17038
17053
  background: token.errorFocusBackgroundColor
17054
+ // '[data-soui-role="input-group-seperate"]&': {
17055
+ // boxShadow: 'none',
17056
+ // }
17039
17057
  })), "".concat(name, "Disabled"), {
17040
17058
  color: token.disabledFontColor,
17041
17059
  backgroundColor: token.disabledBackgroundColor,
@@ -17215,7 +17233,7 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17215
17233
  }
17216
17234
  },
17217
17235
  wrapperDisabled: objectSpread2_default()(objectSpread2_default()({}, wrapperDisabled), {}, {
17218
- '& $icon, & $arrowIcon': {
17236
+ '& $arrowIcon': {
17219
17237
  color: src.cascaderDisabledFontColor
17220
17238
  }
17221
17239
  })
@@ -17226,15 +17244,7 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17226
17244
  minWidth: 0,
17227
17245
  position: 'relative',
17228
17246
  outline: 'none',
17229
- overflow: 'hidden',
17230
- '&:hover': {
17231
- '& $clear': {
17232
- display: 'inline-flex'
17233
- },
17234
- '& $clear + $icon': {
17235
- display: 'none'
17236
- }
17237
- }
17247
+ overflow: 'hidden'
17238
17248
  },
17239
17249
  result: {
17240
17250
  display: 'flex',
@@ -17478,9 +17488,9 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17478
17488
  marginLeft: 0
17479
17489
  },
17480
17490
  maxWidth: '80%',
17481
- marginRight: 4,
17482
- marginTop: src.cascaderPlaceholderMarginY,
17483
- marginBottom: src.cascaderPlaceholderMarginY,
17491
+ marginRight: src.cascaderTagMarginRight,
17492
+ marginTop: src.cascaderTagMarginY,
17493
+ marginBottom: src.cascaderTagMarginY,
17484
17494
  textWrap: 'nowrap',
17485
17495
  '&$hideTag': {
17486
17496
  marginRight: 0
@@ -20218,6 +20228,16 @@ var groupSpace = function groupSpace(gap) {
20218
20228
  '& > i:last-child, & > span:last-child': {
20219
20229
  paddingRight: gap
20220
20230
  },
20231
+ '[data-soui-role="input-group-seperate"]&': {
20232
+ '& > b:first-child': {
20233
+ marginLeft: 0,
20234
+ borderLeft: "1px solid ".concat(src.inputBorderColor)
20235
+ },
20236
+ '& > b:last-child': {
20237
+ marginRight: 0,
20238
+ borderRight: "1px solid ".concat(src.inputBorderColor)
20239
+ }
20240
+ },
20221
20241
  '& > b': {
20222
20242
  padding: "0 ".concat(gap),
20223
20243
  display: 'flex',
@@ -20228,10 +20248,10 @@ var groupSpace = function groupSpace(gap) {
20228
20248
  fontWeight: 'normal',
20229
20249
  color: src.inputGroupFontColor,
20230
20250
  '&:first-child': {
20231
- marginLeft: '-1px'
20251
+ borderLeft: 'none'
20232
20252
  },
20233
20253
  '&:last-child': {
20234
- marginRight: '-1px'
20254
+ borderRight: 'none'
20235
20255
  }
20236
20256
  },
20237
20257
  '&[dir=ltr] > b': {
@@ -20258,13 +20278,18 @@ var groupSpace = function groupSpace(gap) {
20258
20278
  };
20259
20279
  var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
20260
20280
  rootClass: {},
20261
- wrapper: objectSpread2_default()({
20281
+ wrapper: objectSpread2_default()(objectSpread2_default()({
20262
20282
  display: 'inline-flex',
20263
20283
  width: '100%',
20264
20284
  boxSizing: 'border-box',
20265
20285
  alignItems: 'center',
20266
20286
  position: 'relative'
20267
- }, input_wrapper)
20287
+ }, input_wrapper), {}, {
20288
+ '[data-soui-role="input-group-seperate"] &': {
20289
+ flex: 1,
20290
+ minWidth: 0
20291
+ }
20292
+ })
20268
20293
  }, input_resetWrapper), {}, {
20269
20294
  wrapperNumber: {},
20270
20295
  content: {
@@ -28053,6 +28078,9 @@ var treeStyle = {
28053
28078
  '&::after': {
28054
28079
  width: 12
28055
28080
  }
28081
+ },
28082
+ '&[draggable="true"]': {
28083
+ cursor: 'pointer'
28056
28084
  }
28057
28085
  },
28058
28086
  leaf: {},
@@ -28497,9 +28525,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28497
28525
  marginLeft: 0
28498
28526
  },
28499
28527
  maxWidth: '80%',
28500
- marginRight: 4,
28501
- marginTop: src.treeSelectPlaceholderMarginY,
28502
- marginBottom: src.treeSelectPlaceholderMarginY,
28528
+ marginRight: src.treeSelectTagMarginRight,
28529
+ marginTop: src.treeSelectTagMarginY,
28530
+ marginBottom: src.treeSelectTagMarginY,
28503
28531
  textWrap: 'nowrap',
28504
28532
  '&$hideTag': {
28505
28533
  marginRight: 0
@@ -34709,19 +34737,18 @@ function useInputAble(props) {
34709
34737
  var render = useRender(syncValue);
34710
34738
  var shouldUseState = delay || !control;
34711
34739
  var value = shouldUseState ? stateValue : valuePo;
34712
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
34713
- if (context.timer) {
34714
- clearTimeout(context.timer);
34715
- context.timer = null;
34716
- }
34740
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
34717
34741
  if (delay && control && props.value !== stateValue) {
34718
34742
  changeStateValue(props.value);
34743
+ } else if (context.timer) {
34744
+ clearTimeout(context.timer);
34745
+ context.timer = null;
34719
34746
  }
34720
34747
  }, [props.value, delay, control]);
34721
34748
  var forceDelayChange = use_persist_fn(function () {
34722
- if (context.timer && context.delayChange) {
34749
+ if (context.delayChange) context.delayChange();
34750
+ if (context.timer) {
34723
34751
  clearTimeout(context.timer);
34724
- context.delayChange();
34725
34752
  context.timer = null;
34726
34753
  context.delayChange = null;
34727
34754
  }
@@ -49765,6 +49792,7 @@ var useForm = function useForm(props) {
49765
49792
  }
49766
49793
  context.lastValue = props.value;
49767
49794
  };
49795
+ updateValue();
49768
49796
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
49769
49797
  // 服务端错误更新
49770
49798
  if (!props.error) context.serverErrors = {};else {
@@ -49780,7 +49808,6 @@ var useForm = function useForm(props) {
49780
49808
 
49781
49809
  // 默认值更新
49782
49810
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
49783
- updateValue();
49784
49811
  context.removeLock = false;
49785
49812
  // 内部 onChange 改的 value, 不需要更新
49786
49813
  if (props.value === context.value) return;
@@ -52119,8 +52146,7 @@ var input_input_Input = function Input(props) {
52119
52146
  className = props.className,
52120
52147
  width = props.width,
52121
52148
  style = props.style,
52122
- _props$seperate = props.seperate,
52123
- seperate = _props$seperate === void 0 ? true : _props$seperate;
52149
+ seperate = props.seperate;
52124
52150
  var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.group, seperate && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSeperate), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupLarge), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupDisabled), !!focus && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupFocus), (status === 'error' || error) && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.groupError));
52125
52151
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
52126
52152
  role: seperate ? 'input-group-seperate' : 'input-group'
@@ -53629,6 +53655,7 @@ var Node = function Node(props) {
53629
53655
  dragImage.current = dragEl.cloneNode(true);
53630
53656
  document.body.appendChild(dragImage.current);
53631
53657
  dragImage.current.style.position = 'absolute';
53658
+ dragImage.current.style.zIndex = '99999';
53632
53659
  dragImage.current.style.top = '-1000px';
53633
53660
  dragImage.current.style.left = '-1000px';
53634
53661
  dragImage.current.style.width = "".concat(rect.width, "px");
@@ -53642,13 +53669,9 @@ var Node = function Node(props) {
53642
53669
  });
53643
53670
  }
53644
53671
  e.dataTransfer.setDragImage(dragImage.current, e.clientX - rect.left, e.clientY - rect.top);
53645
- setTimeout(function () {
53646
- element.current.style.display = 'none';
53647
- }, 0);
53648
53672
  if (onDragStart) onDragStart(e, data);
53649
53673
  };
53650
53674
  var handleDragEnd = function handleDragEnd(e) {
53651
- element.current.style.display = '';
53652
53675
  if (!dragLock) return;
53653
53676
  dragLock = false;
53654
53677
  if (!placeElement || !placeElement.parentNode) return;
@@ -62590,8 +62613,18 @@ var Tr = function Tr(props) {
62590
62613
  var _props$rowClickAttr = props.rowClickAttr,
62591
62614
  rowClickAttr = _props$rowClickAttr === void 0 ? '*' : _props$rowClickAttr,
62592
62615
  onRowClick = props.onRowClick;
62616
+ var attributes = Array.isArray(rowClickAttr) ? rowClickAttr : [];
62617
+ if (typeof rowClickAttr === 'string') {
62618
+ attributes.push(rowClickAttr);
62619
+ }
62620
+ var isFireElement = attributes.map(function (v) {
62621
+ return v === '*' ? '' : v;
62622
+ }).find(function (v) {
62623
+ return target.hasAttribute(v);
62624
+ });
62625
+ var isExpandable = !isNotExpandableElement(target) || isFireElement;
62593
62626
  if (onRowClick && rowClickAttr) {
62594
- if (rowClickAttr === true || rowClickAttr === '*') {
62627
+ if ((rowClickAttr === true || rowClickAttr === '*') && isExpandable) {
62595
62628
  onRowClick(props.rawData, props.rowIndex, rowClickAttr);
62596
62629
  } else {
62597
62630
  var arrts = Array.isArray(rowClickAttr) ? rowClickAttr : [rowClickAttr].filter(function (item) {
@@ -62600,13 +62633,12 @@ var Tr = function Tr(props) {
62600
62633
  var attIndex = arrts.findIndex(function (attr) {
62601
62634
  return attr === '*' || target.hasAttribute(attr);
62602
62635
  });
62603
- if (attIndex > -1) {
62636
+ if (attIndex > -1 && isExpandable) {
62604
62637
  onRowClick(props.rawData, props.rowIndex, arrts[attIndex]);
62605
62638
  }
62606
62639
  }
62607
62640
  }
62608
- if (props.rowClickExpand) {
62609
- if (isNotExpandableElement(target)) return;
62641
+ if (props.rowClickExpand && isExpandable) {
62610
62642
  props.handleExpandClick(props.expandCol, props.rawData, props.rowIndex);
62611
62643
  }
62612
62644
  });
@@ -65288,10 +65320,10 @@ var Transfer = function Transfer(props) {
65288
65320
  };
65289
65321
  var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
65290
65322
  return renderList('source');
65291
- }, [source, size, filterSourceText, sourceSelectedKeys, renderFilter, children]);
65323
+ }, [source, loading, size, filterSourceText, sourceSelectedKeys, renderFilter, children]);
65292
65324
  var renderTargetList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
65293
65325
  return renderList('target');
65294
- }, [target, size, filterTargetText, targetSelectedKeys, renderFilter, children]);
65326
+ }, [target, loading, size, filterTargetText, targetSelectedKeys, renderFilter, children]);
65295
65327
  var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
65296
65328
  fieldId = _useContext.fieldId;
65297
65329
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@@ -69719,7 +69751,7 @@ var upload_interface = __webpack_require__(8821);
69719
69751
 
69720
69752
 
69721
69753
  /* harmony default export */ var src_0 = ({
69722
- version: '3.6.2-beta.5'
69754
+ version: '3.6.2-fix.1'
69723
69755
  });
69724
69756
  }();
69725
69757
  /******/ return __webpack_exports__;