shineout 3.4.4-beta.9 → 3.4.4-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
@@ -492,5 +492,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
492
492
  // 此文件由脚本自动生成,请勿直接修改。
493
493
  // This file was generated automatically by a script. Please do not modify it directly.
494
494
  var _default = exports.default = {
495
- version: '3.4.4-beta.9'
495
+ version: '3.4.4-fix.1'
496
496
  };
package/cjs/list/list.js CHANGED
@@ -23,7 +23,8 @@ var jssStyle = {
23
23
  checkbox: _shineoutStyle.useCheckboxStyle,
24
24
  empty: _shineoutStyle.useEmptyStyle,
25
25
  spin: _shineoutStyle.useSpinStyle,
26
- image: _shineoutStyle.useImageStyle
26
+ image: _shineoutStyle.useImageStyle,
27
+ select: _shineoutStyle.useSelectStyle
27
28
  };
28
29
  var _default = exports.default = function _default(props) {
29
30
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_base.List, _objectSpread({
package/dist/shineout.js CHANGED
@@ -11984,7 +11984,7 @@ var handleStyle = function handleStyle(style) {
11984
11984
  };
11985
11985
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11986
11986
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11987
- /* harmony default export */ var version = ('3.4.4-beta.9');
11987
+ /* harmony default export */ var version = ('3.4.4-fix.1');
11988
11988
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11989
11989
 
11990
11990
 
@@ -19112,16 +19112,16 @@ var ImageStyle = objectSpread2_default()(objectSpread2_default()({}, animation),
19112
19112
  },
19113
19113
  circle: {
19114
19114
  borderRadius: src.imageCircleBorderRadius,
19115
- border: "1px solid ".concat(src.imageBorderColor)
19115
+ outline: "1px solid ".concat(src.imageBorderColor)
19116
19116
  },
19117
19117
  rounded: {
19118
19118
  borderRadius: src.imageBorderRadius,
19119
- border: "1px solid ".concat(src.imageBorderColor)
19119
+ outline: "1px solid ".concat(src.imageBorderColor)
19120
19120
  },
19121
19121
  thumbnail: {
19122
19122
  borderRadius: src.imageBorderRadius,
19123
19123
  backgroundColor: '#FFFFFF',
19124
- border: "1px solid ".concat(src.imageBorderColor),
19124
+ outline: "1px solid ".concat(src.imageBorderColor),
19125
19125
  '& $inner': {
19126
19126
  top: 4,
19127
19127
  left: 4,
@@ -19911,6 +19911,9 @@ var listStyle = {
19911
19911
  border: "".concat(src.listBorderWidth, " solid ").concat(src.listBorderColor),
19912
19912
  borderRadius: src.listBorderRadius
19913
19913
  },
19914
+ wrapperEmpty: {
19915
+ justifyContent: 'center'
19916
+ },
19914
19917
  wrapperSmall: {},
19915
19918
  wrapperLarge: {},
19916
19919
  wrapperStriped: {
@@ -29870,6 +29873,7 @@ var useContainer = function useContainer() {
29870
29873
 
29871
29874
 
29872
29875
  var AbsoluteContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(false);
29876
+ AbsoluteContext.displayName = 'AbsoluteContext';
29873
29877
  /* harmony default export */ var absolute_context = (AbsoluteContext);
29874
29878
  ;// CONCATENATED MODULE: ../base/src/absolute-list/absolute-list.tsx
29875
29879
 
@@ -32488,19 +32492,18 @@ function useInputAble(props) {
32488
32492
  var render = useRender(syncValue);
32489
32493
  var shouldUseState = delay || !control;
32490
32494
  var value = shouldUseState ? stateValue : valuePo;
32491
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
32492
- if (context.timer) {
32493
- clearTimeout(context.timer);
32494
- context.timer = null;
32495
- }
32495
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
32496
32496
  if (delay && control && props.value !== stateValue) {
32497
32497
  changeStateValue(props.value);
32498
+ } else if (context.timer) {
32499
+ clearTimeout(context.timer);
32500
+ context.timer = null;
32498
32501
  }
32499
32502
  }, [props.value, delay, control]);
32500
32503
  var forceDelayChange = use_persist_fn(function () {
32501
- if (context.timer && context.delayChange) {
32504
+ if (context.delayChange) context.delayChange();
32505
+ if (context.timer) {
32502
32506
  clearTimeout(context.timer);
32503
- context.delayChange();
32504
32507
  context.timer = null;
32505
32508
  context.delayChange = null;
32506
32509
  }
@@ -37428,6 +37431,11 @@ var result_isObject = is_isObject,
37428
37431
  result_isUnMatchedData = isUnMatchedData,
37429
37432
  result_isFunc = isFunc,
37430
37433
  result_isArray = isArray;
37434
+ var getValueArr = function getValueArr(v) {
37435
+ return (result_isArray(v) ? v : [v]).filter(function (v) {
37436
+ return v !== undefined && v !== null;
37437
+ });
37438
+ };
37431
37439
  var result_Result = function Result(props) {
37432
37440
  var jssStyle = props.jssStyle,
37433
37441
  multiple = props.multiple,
@@ -37444,6 +37452,7 @@ var result_Result = function Result(props) {
37444
37452
  placeholder = props.placeholder,
37445
37453
  filterText = props.filterText,
37446
37454
  inputText = props.inputText,
37455
+ inputRef = props.inputRef,
37447
37456
  compressed = props.compressed,
37448
37457
  compressedBound = props.compressedBound,
37449
37458
  compressedClassName = props.compressedClassName,
@@ -37613,11 +37622,6 @@ var result_Result = function Result(props) {
37613
37622
  children: content
37614
37623
  }, 'single');
37615
37624
  };
37616
- var getValueArr = function getValueArr(v) {
37617
- return (result_isArray(v) ? v : [v]).filter(function (v) {
37618
- return v !== undefined && v !== null;
37619
- });
37620
- };
37621
37625
  var renderMultipleResult = function renderMultipleResult() {
37622
37626
  if (isEmptyResult()) return renderNbsp();
37623
37627
  // [TODO] separator 处理逻辑后续交给 hooks 处理,此处临时处理
@@ -37688,8 +37692,21 @@ var result_Result = function Result(props) {
37688
37692
  onFilter === null || onFilter === void 0 || onFilter('', 'blur');
37689
37693
  }, 400);
37690
37694
  }
37695
+
37696
+ // 单选场景下,焦点时自动选中input文本
37697
+ if (!multiple && focus && showInput && mounted.current) {
37698
+ var _result2 = getDataByValues(value);
37699
+ if (_result2.length > 0) {
37700
+ var inputTmpText = renderResultContent(_result2[0]);
37701
+ inputTmpText && props.setInputText(inputTmpText);
37702
+ }
37703
+ setTimeout(function () {
37704
+ var _inputRef$current;
37705
+ inputRef === null || inputRef === void 0 || (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.select();
37706
+ }, 10);
37707
+ }
37691
37708
  mounted.current = true;
37692
- }, [focus]);
37709
+ }, [focus, placeholder, multiple]);
37693
37710
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
37694
37711
  handleResetMore();
37695
37712
  }, [valueProp, data]);
@@ -42905,11 +42922,13 @@ var Quick = function Quick(props) {
42905
42922
  format = props.format,
42906
42923
  options = props.options,
42907
42924
  children = props.children,
42908
- type = props.type;
42925
+ type = props.type,
42926
+ closePop = props.closePop;
42909
42927
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
42910
42928
  var quickDateCache = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
42911
42929
  var quickActiveKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
42912
42930
  var handleClick = function handleClick(item, index) {
42931
+ var immediate = item.immediate;
42913
42932
  var itemV = isFunc(item.value) ? item.value() : item.value;
42914
42933
  quickDateCache.current = itemV;
42915
42934
  quickActiveKey.current = index;
@@ -42924,6 +42943,9 @@ var Quick = function Quick(props) {
42924
42943
  });
42925
42944
  props.setDateArr(dateArr);
42926
42945
  props.setCurrentArr(dateArr, 'quick', item);
42946
+ if (immediate && closePop) {
42947
+ closePop();
42948
+ }
42927
42949
  };
42928
42950
  if (!(quickSelect !== null && quickSelect !== void 0 && quickSelect.length)) {
42929
42951
  return children || null;
@@ -43301,6 +43323,7 @@ var Picker = function Picker(props) {
43301
43323
  className: styles === null || styles === void 0 ? void 0 : styles.pickerBox,
43302
43324
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)(quick, {
43303
43325
  quickSelect: props.quickSelect,
43326
+ closePop: props.closePop,
43304
43327
  range: props.range,
43305
43328
  jssStyle: jssStyle,
43306
43329
  dateArr: dateArr,
@@ -51722,6 +51745,7 @@ function Select(props0) {
51722
51745
  allowOnFilter: showInput,
51723
51746
  focusSelected: focusSelected,
51724
51747
  inputText: inputText,
51748
+ inputRef: inputRef,
51725
51749
  filterText: filterText,
51726
51750
  onFilter: handleFilter,
51727
51751
  onRef: inputRef,
@@ -51925,10 +51949,16 @@ var PaginationSizeList = function PaginationSizeList(props) {
51925
51949
  pageSizeList = _props$pageSizeList === void 0 ? [10, 20, 30, 50, 100] : _props$pageSizeList,
51926
51950
  text = props.text,
51927
51951
  size = props.size,
51952
+ select = props.select,
51928
51953
  pageSize = props.pageSize,
51929
51954
  onChange = props.onChange;
51930
51955
  var paginationStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$pagination = jssStyle.pagination) === null || _jssStyle$pagination === void 0 ? void 0 : _jssStyle$pagination.call(jssStyle);
51931
51956
  var rootClasses = classnames_default()(paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.section, paginationStyle === null || paginationStyle === void 0 ? void 0 : paginationStyle.sizeList);
51957
+ var _ref = select || {},
51958
+ absolute = _ref.absolute,
51959
+ position = _ref.position,
51960
+ zIndex = _ref.zIndex;
51961
+ console.log('position', position);
51932
51962
  var handleChange = function handleChange(pageSize) {
51933
51963
  var start = (current - 1) * props.pageSize + 1;
51934
51964
  onChange(Math.ceil(start / pageSize), pageSize);
@@ -51938,7 +51968,9 @@ var PaginationSizeList = function PaginationSizeList(props) {
51938
51968
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_select_select, {
51939
51969
  jssStyle: jssStyle,
51940
51970
  disabled: disabled,
51941
- absolute: true,
51971
+ zIndex: zIndex || undefined,
51972
+ absolute: absolute || true,
51973
+ position: position || undefined,
51942
51974
  autoAdapt: true,
51943
51975
  keygen: true,
51944
51976
  size: size,
@@ -52509,7 +52541,8 @@ var Pagination = function Pagination(props) {
52509
52541
  _props$text = props.text,
52510
52542
  text = _props$text === void 0 ? {} : _props$text,
52511
52543
  pageSizeList = props.pageSizeList,
52512
- style = props.style;
52544
+ style = props.style,
52545
+ select = props.select;
52513
52546
  var _usePagination = use_pagination({
52514
52547
  total: total,
52515
52548
  span: span,
@@ -52574,6 +52607,7 @@ var Pagination = function Pagination(props) {
52574
52607
  total: props.total || 0,
52575
52608
  text: text,
52576
52609
  size: size,
52610
+ select: select,
52577
52611
  current: current || 0,
52578
52612
  pageSize: pageSize,
52579
52613
  pageSizeList: pageSizeList,
@@ -52637,6 +52671,7 @@ var list_list_List = function List(props) {
52637
52671
  _props$pagination = props.pagination,
52638
52672
  pagination = _props$pagination === void 0 ? {} : _props$pagination;
52639
52673
  var listClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$list = _props$jssStyle.list) === null || _props$jssStyle$list === void 0 ? void 0 : _props$jssStyle$list.call(_props$jssStyle);
52674
+ var isEmpty = !isArray(data) || data.length <= 0;
52640
52675
  var inputAble = useInputAble({
52641
52676
  value: props.value,
52642
52677
  onChange: props.onChange,
@@ -52760,6 +52795,7 @@ var list_list_List = function List(props) {
52760
52795
  }
52761
52796
  });
52762
52797
  var renderList = function renderList() {
52798
+ if (isEmpty) return null;
52763
52799
  if (props.fixed) return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
52764
52800
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
52765
52801
  data: columnData,
@@ -52789,7 +52825,7 @@ var list_list_List = function List(props) {
52789
52825
  }), renderFooter()]
52790
52826
  });
52791
52827
  };
52792
- var wrapperClass = classnames_default()(props.className, listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapper, props.bordered && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperBordered), props.size === 'small' && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperSmall), props.size === 'large' && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperLarge), props.striped && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperStriped));
52828
+ var wrapperClass = classnames_default()(props.className, listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapper, isEmpty && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperEmpty), props.bordered && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperBordered), props.size === 'small' && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperSmall), props.size === 'large' && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperLarge), props.striped && (listClasses === null || listClasses === void 0 ? void 0 : listClasses.wrapperStriped));
52793
52829
  var wrapperStyle = objectSpread2_default()(objectSpread2_default()({}, props.style), {}, {
52794
52830
  height: props.height
52795
52831
  });
@@ -52819,7 +52855,8 @@ var list_jssStyle = {
52819
52855
  checkbox: useCheckboxStyle,
52820
52856
  empty: useEmptyStyle,
52821
52857
  spin: useSpinStyle,
52822
- image: useImageStyle
52858
+ image: useImageStyle,
52859
+ select: useSelectStyle
52823
52860
  };
52824
52861
  /* harmony default export */ var src_list_list_0 = (function (props) {
52825
52862
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_list_list, objectSpread2_default()({
@@ -65254,7 +65291,7 @@ var upload_interface = __webpack_require__(8821);
65254
65291
 
65255
65292
 
65256
65293
  /* harmony default export */ var src_0 = ({
65257
- version: '3.4.4-beta.9'
65294
+ version: '3.4.4-fix.1'
65258
65295
  });
65259
65296
  }();
65260
65297
  /******/ return __webpack_exports__;