shineout 3.8.0-beta.17 → 3.8.0-beta.18

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.8.0-beta.17'
525
+ version: '3.8.0-beta.18'
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.8.0-beta.17');
12237
+ /* harmony default export */ var version = ('3.8.0-beta.18');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -26356,7 +26356,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
26356
26356
  boxSizing: 'border-box',
26357
26357
  lineHeight: src.lineHeightDynamic,
26358
26358
  '$bordered&': {
26359
- '&::after': {
26359
+ '&:not(:last-child)::after': {
26360
26360
  content: '""',
26361
26361
  position: 'absolute',
26362
26362
  zIndex: cellBaseIndex,
@@ -26700,6 +26700,9 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
26700
26700
  color: src.tableFilterIconActiveColor
26701
26701
  }
26702
26702
  },
26703
+ filterOpened: {
26704
+ background: src.buttonSecondaryHoverBackgroundColor
26705
+ },
26703
26706
  filterContainer: {
26704
26707
  minWidth: '120px'
26705
26708
  },
@@ -26712,7 +26715,19 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
26712
26715
  filterBody: {
26713
26716
  padding: "".concat(src.tableFilterBodyPaddingY, " ").concat(src.tableFilterBodyPaddingX),
26714
26717
  maxHeight: '300px',
26715
- overflow: 'auto'
26718
+ overflow: 'auto',
26719
+ // 特调Tree在Table filter中样式,以满足设计要求
26720
+ '& [class*=tree-content-wrapper]': {
26721
+ paddingTop: 1,
26722
+ paddingBottom: 1
26723
+ },
26724
+ '&& [class*=tree-checkbox]': {
26725
+ alignSelf: 'center'
26726
+ },
26727
+ '& [class*=tree-text]': {
26728
+ paddingTop: 5,
26729
+ paddingBottom: 5
26730
+ }
26716
26731
  },
26717
26732
  filterFooter: {
26718
26733
  display: 'flex',
@@ -30518,20 +30533,20 @@ var usePopup = function usePopup(props) {
30518
30533
  }
30519
30534
  };
30520
30535
  var handleMouseEnter = use_persist_fn(function (e) {
30521
- var _targetEvents$onMouse, _targetRef$current;
30536
+ var _targetEvents$onMouse, _targetRef$current, _popupRef$current2;
30522
30537
  targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse = targetEvents.onMouseEnter) === null || _targetEvents$onMouse === void 0 || _targetEvents$onMouse.call(targetEvents, e);
30523
30538
  if (trigger !== 'hover') return;
30524
30539
  var isParentContainsCurrent = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.contains(e.target);
30525
- if (isParentContainsCurrent) {
30540
+ if (isParentContainsCurrent || popupRef !== null && popupRef !== void 0 && (_popupRef$current2 = popupRef.current) !== null && _popupRef$current2 !== void 0 && _popupRef$current2.contains(e.target)) {
30526
30541
  handleHoverToggle(true);
30527
30542
  }
30528
30543
  });
30529
30544
  var handleMouseLeave = use_persist_fn(function (e) {
30530
- var _targetEvents$onMouse2, _popupRef$current2;
30545
+ var _targetEvents$onMouse2, _popupRef$current3;
30531
30546
  targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse2 = targetEvents.onMouseLeave) === null || _targetEvents$onMouse2 === void 0 || _targetEvents$onMouse2.call(targetEvents, e);
30532
30547
  if (trigger !== 'hover') return;
30533
30548
  // @ts-ignore
30534
- if (e.relatedTarget instanceof HTMLElement && (_popupRef$current2 = popupRef.current) !== null && _popupRef$current2 !== void 0 && _popupRef$current2.contains(e.relatedTarget)) {
30549
+ if (e.relatedTarget instanceof HTMLElement && (_popupRef$current3 = popupRef.current) !== null && _popupRef$current3 !== void 0 && _popupRef$current3.contains(e.relatedTarget)) {
30535
30550
  return;
30536
30551
  }
30537
30552
  handleHoverToggle(false);
@@ -36637,9 +36652,11 @@ function escapeRegExp() {
36637
36652
  timeOfDayValues: ['上午', '下午'],
36638
36653
  ok: '确定',
36639
36654
  cancel: '取消',
36655
+ reset: '重置',
36640
36656
  noData: '暂无数据',
36641
36657
  selectAll: '全选',
36642
36658
  loading: '加载中...',
36659
+ searchPlaceholder: '在筛选项中搜索',
36643
36660
  rules: {
36644
36661
  required: {
36645
36662
  array: '{title} 不能为空',
@@ -36703,9 +36720,11 @@ function escapeRegExp() {
36703
36720
  timeOfDayValues: ['a.m.', 'p.m.'],
36704
36721
  ok: 'Ok',
36705
36722
  cancel: 'Cancel',
36723
+ reset: 'Reset',
36706
36724
  noData: 'Data not found',
36707
36725
  selectAll: 'Select All',
36708
36726
  loading: 'loading...',
36727
+ searchPlaceholder: 'Search in filter options',
36709
36728
  rules: {
36710
36729
  required: {
36711
36730
  array: 'Please select {title}',
@@ -39722,7 +39741,7 @@ var useTree = function useTree(props) {
39722
39741
  (_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
39723
39742
  var _ref3 = context.pathMap.get(id),
39724
39743
  children = _ref3.children;
39725
- if (children.length) {
39744
+ if (children && children.length) {
39726
39745
  var noCheckedChildren = children.filter(function (cid) {
39727
39746
  var _context$value2;
39728
39747
  return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
@@ -42695,8 +42714,8 @@ var Cascader = function Cascader(props0) {
42695
42714
  }
42696
42715
  }, [data]);
42697
42716
 
42698
- // 修复外部受控打开的场景下,从外部修改value导致的面板勾选情况没有及时同步
42699
- if (openProp && !shallowEqual(value, datum.getValue())) {
42717
+ // 修复外部受控打开或renderOptionList做全选的场景下,从外部修改value导致的面板勾选情况没有及时同步
42718
+ if ((openProp || props.renderOptionList) && !shallowEqual(value, datum.getValue())) {
42700
42719
  datum.setValue(value);
42701
42720
  }
42702
42721
  ;
@@ -42705,9 +42724,6 @@ var Cascader = function Cascader(props0) {
42705
42724
  datum.setValue(value);
42706
42725
  if (!open) return;
42707
42726
  updatePathByValue();
42708
- if (props.renderOptionList) {
42709
- updatePath();
42710
- }
42711
42727
  }, [value, open]);
42712
42728
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
42713
42729
  if (filterText !== undefined) {
@@ -46122,7 +46138,9 @@ var useTime = function useTime(props) {
46122
46138
  _props$secondStep = props.secondStep,
46123
46139
  secondStep = _props$secondStep === void 0 ? 1 : _props$secondStep,
46124
46140
  staticMin = props.staticMin,
46125
- staticMax = props.staticMax;
46141
+ staticMax = props.staticMax,
46142
+ position = props.position,
46143
+ rangeDate = props.rangeDate;
46126
46144
  var min = util.resetTimeByFormat(mi, format, options);
46127
46145
  var max = util.resetTimeByFormat(ma, format, options);
46128
46146
  var current = props.value || util.newDate(undefined, options);
@@ -46148,7 +46166,7 @@ var useTime = function useTime(props) {
46148
46166
  disabledTime = props.disabledTime;
46149
46167
  if (disabledTime) {
46150
46168
  var _time = util.format(date, util.TIME_FORMAT, options);
46151
- if (typeof disabledTime === 'function') return disabledTime(_time);
46169
+ 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]);
46152
46170
  return disabledTime === _time;
46153
46171
  }
46154
46172
  var isDis = disabled && typeof disabled === 'function' ? disabled(date) : false;
@@ -46499,7 +46517,9 @@ var Time = function Time(props) {
46499
46517
  disabledTime: props.disabledTime,
46500
46518
  hourStep: props.hourStep,
46501
46519
  minuteStep: props.minuteStep,
46502
- secondStep: props.secondStep
46520
+ secondStep: props.secondStep,
46521
+ position: props.position,
46522
+ rangeDate: props.rangeDate
46503
46523
  }),
46504
46524
  func = _useTimePick.func,
46505
46525
  times = _useTimePick.times;
@@ -63684,8 +63704,11 @@ var useTableGroup = function useTableGroup(props) {
63684
63704
 
63685
63705
 
63686
63706
 
63707
+
63687
63708
  var FilterFooter = function FilterFooter(props) {
63688
63709
  var tableClasses = props.tableClasses;
63710
+ var _useConfig = useConfig(),
63711
+ locale = _useConfig.locale;
63689
63712
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("footer", {
63690
63713
  className: tableClasses.filterFooter,
63691
63714
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
@@ -63694,18 +63717,21 @@ var FilterFooter = function FilterFooter(props) {
63694
63717
  size: "small",
63695
63718
  onClick: props.onReset,
63696
63719
  disabled: !props.resetable,
63697
- children: "\u91CD\u7F6E"
63720
+ mode: "outline",
63721
+ children: getLocale(locale, 'reset')
63698
63722
  }), /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
63699
63723
  jssStyle: props.jssStyle,
63700
63724
  size: "small",
63701
63725
  type: "primary",
63702
63726
  onClick: props.onConfirm,
63703
- children: "\u786E\u5B9A"
63727
+ children: getLocale(locale, 'ok')
63704
63728
  })]
63705
63729
  });
63706
63730
  };
63707
63731
  var FilterSelect = function FilterSelect(props) {
63708
63732
  var _props$filterInfo;
63733
+ var _useConfig2 = useConfig(),
63734
+ locale = _useConfig2.locale;
63709
63735
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
63710
63736
  _useState2 = slicedToArray_default()(_useState, 2),
63711
63737
  popoverVisible = _useState2[0],
@@ -63784,7 +63810,7 @@ var FilterSelect = function FilterSelect(props) {
63784
63810
  jssStyle: props.jssStyle,
63785
63811
  shape: "circle",
63786
63812
  size: "small",
63787
- className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
63813
+ className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
63788
63814
  style: {
63789
63815
  border: 'none'
63790
63816
  },
@@ -63802,13 +63828,14 @@ var FilterSelect = function FilterSelect(props) {
63802
63828
  children: [(config === null || config === void 0 ? void 0 : config.search) && /*#__PURE__*/(0,jsx_runtime.jsx)("header", {
63803
63829
  className: tableClasses.filterHeader,
63804
63830
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
63831
+ showClear: true,
63805
63832
  value: inputText,
63806
63833
  onChange: function onChange(v) {
63807
63834
  if (onFilter) onFilter(v || '');
63808
63835
  setInputText(v);
63809
63836
  },
63810
63837
  jssStyle: props.jssStyle,
63811
- placeholder: "\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",
63838
+ placeholder: getLocale(locale, 'searchPlaceholder'),
63812
63839
  className: tableClasses.filterInput,
63813
63840
  prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
63814
63841
  className: tableClasses.filterInputIcon,
@@ -63844,6 +63871,8 @@ var FilterSelect = function FilterSelect(props) {
63844
63871
  };
63845
63872
  var FilterSearch = function FilterSearch(props) {
63846
63873
  var _props$filterInfo2;
63874
+ var _useConfig3 = useConfig(),
63875
+ locale = _useConfig3.locale;
63847
63876
  var tableClasses = props.tableClasses,
63848
63877
  filter = props.filter;
63849
63878
  var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
@@ -63890,7 +63919,7 @@ var FilterSearch = function FilterSearch(props) {
63890
63919
  jssStyle: props.jssStyle,
63891
63920
  shape: "circle",
63892
63921
  size: "small",
63893
- className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
63922
+ className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
63894
63923
  style: {
63895
63924
  border: 'none'
63896
63925
  },
@@ -63909,7 +63938,7 @@ var FilterSearch = function FilterSearch(props) {
63909
63938
  className: tableClasses.filterHeader,
63910
63939
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
63911
63940
  jssStyle: props.jssStyle,
63912
- placeholder: "\u5728\u7B5B\u9009\u9879\u4E2D\u641C\u7D22",
63941
+ placeholder: getLocale(locale, 'searchPlaceholder'),
63913
63942
  className: tableClasses.filterInput,
63914
63943
  prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
63915
63944
  className: tableClasses.filterInputIcon,
@@ -63918,7 +63947,8 @@ var FilterSearch = function FilterSearch(props) {
63918
63947
  value: tempValue,
63919
63948
  onChange: setTempValue,
63920
63949
  onEnterPress: onConfirm,
63921
- forwardRef: inputRef
63950
+ forwardRef: inputRef,
63951
+ showClear: true
63922
63952
  })
63923
63953
  }), /*#__PURE__*/(0,jsx_runtime.jsx)(FilterFooter, {
63924
63954
  jssStyle: props.jssStyle,
@@ -72163,7 +72193,7 @@ var upload_interface = __webpack_require__(8821);
72163
72193
 
72164
72194
 
72165
72195
  /* harmony default export */ var src_0 = ({
72166
- version: '3.8.0-beta.17'
72196
+ version: '3.8.0-beta.18'
72167
72197
  });
72168
72198
  }();
72169
72199
  /******/ return __webpack_exports__;