shineout 3.6.2 → 3.7.0-beta.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'
517
+ version: '3.7.0-beta.1'
518
518
  };
package/dist/shineout.js CHANGED
@@ -7077,6 +7077,9 @@ var config = {
7077
7077
  textarea: {
7078
7078
  Close: icons.CloseFill
7079
7079
  },
7080
+ tag: {
7081
+ Close: icons.Close
7082
+ },
7080
7083
  transfer: {
7081
7084
  DeleteAll: icons.Delete,
7082
7085
  DeleteItem: icons.Close,
@@ -12139,7 +12142,7 @@ var handleStyle = function handleStyle(style) {
12139
12142
  };
12140
12143
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12141
12144
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12142
- /* harmony default export */ var version = ('3.6.2');
12145
+ /* harmony default export */ var version = ('3.7.0-beta.1');
12143
12146
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12144
12147
 
12145
12148
 
@@ -31446,6 +31449,7 @@ var Popover = function Popover(props) {
31446
31449
  trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
31447
31450
  type = props.type,
31448
31451
  destroy = props.destroy,
31452
+ disabled = props.disabled,
31449
31453
  _props$popupGap = props.popupGap,
31450
31454
  popupGap = _props$popupGap === void 0 ? 0 : _props$popupGap,
31451
31455
  _props$showArrow = props.showArrow,
@@ -31531,6 +31535,7 @@ var Popover = function Popover(props) {
31531
31535
  }
31532
31536
  };
31533
31537
  });
31538
+ if (disabled) return;
31534
31539
  var noRender = props.lazy && !open && !context.rendered;
31535
31540
  if (!targetRef.current || !children || noRender) {
31536
31541
  return /*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
@@ -40011,6 +40016,7 @@ var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled"
40011
40016
 
40012
40017
 
40013
40018
 
40019
+
40014
40020
  var tag_devUseWarning = devUseWarning;
40015
40021
  var tag_Done = 2;
40016
40022
  var tag_Pending = 1;
@@ -40109,15 +40115,7 @@ var Tag = function Tag(props) {
40109
40115
  onClick: handleClose,
40110
40116
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
40111
40117
  className: tagStyle.closeIconWrapper,
40112
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("svg", {
40113
- width: "10",
40114
- height: "10",
40115
- viewBox: "0 0 10 10",
40116
- xmlns: "http://www.w3.org/2000/svg",
40117
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
40118
- d: "M1.92204 1.33738L1.96129 1.37204L5 4.41042L8.03871 1.37204C8.20142 1.20932 8.46524 1.20932 8.62796 1.37204C8.77816 1.52224 8.78972 1.75859 8.66262 1.92204L8.62796 1.96129L5.58958 5L8.62796 8.03871C8.79068 8.20142 8.79068 8.46524 8.62796 8.62796C8.47776 8.77816 8.24141 8.78972 8.07796 8.66262L8.03871 8.62796L5 5.58958L1.96129 8.62796C1.79858 8.79068 1.53476 8.79068 1.37204 8.62796C1.22184 8.47776 1.21028 8.24141 1.33738 8.07796L1.37204 8.03871L4.41042 5L1.37204 1.96129C1.20932 1.79858 1.20932 1.53476 1.37204 1.37204C1.52224 1.22184 1.75859 1.21028 1.92204 1.33738Z"
40119
- })
40120
- })
40118
+ children: icons_config.tag.Close
40121
40119
  })
40122
40120
  });
40123
40121
  };
@@ -62280,6 +62278,65 @@ var useTableRow = function useTableRow(props) {
62280
62278
  };
62281
62279
  };
62282
62280
  /* harmony default export */ var use_table_row = (useTableRow);
62281
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-memo/use-memo.ts
62282
+
62283
+ function useMemo(getValue, condition, shouldUpdate) {
62284
+ var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
62285
+ if (!shouldUpdate) return getValue();
62286
+ if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
62287
+ cacheRef.current.value = getValue();
62288
+ cacheRef.current.condition = condition;
62289
+ }
62290
+ return cacheRef.current.value;
62291
+ }
62292
+ ;// CONCATENATED MODULE: ../base/src/table/td.tsx
62293
+
62294
+
62295
+
62296
+
62297
+
62298
+ function Td(props) {
62299
+ var col = props.col,
62300
+ colSpan = props.colSpan,
62301
+ rowSpan = props.rowSpan,
62302
+ className = props.className,
62303
+ style = props.style,
62304
+ direction = props.direction,
62305
+ role = props.role,
62306
+ onClick = props.onClick,
62307
+ onMouseEnter = props.onMouseEnter,
62308
+ onMouseLeave = props.onMouseLeave,
62309
+ renderContent = props.renderContent;
62310
+ var externalDependencies = typeof_default()(props.shouldUpdate) === 'object' && props.shouldUpdate.dependencies ? props.shouldUpdate.dependencies : [];
62311
+ var updateFn = typeof_default()(props.shouldUpdate) === 'object' && 'update' in props.shouldUpdate ? props.shouldUpdate.update : props.shouldUpdate;
62312
+ var $td = useMemo(function () {
62313
+ var content = renderContent(props.col, props.data);
62314
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
62315
+ colSpan: colSpan,
62316
+ rowSpan: rowSpan,
62317
+ onMouseEnter: onMouseEnter,
62318
+ onMouseLeave: onMouseLeave,
62319
+ className: className,
62320
+ style: style,
62321
+ dir: direction,
62322
+ "data-role": role,
62323
+ onClick: onClick,
62324
+ children: content
62325
+ }, col.key);
62326
+ }, [].concat(toConsumableArray_default()(externalDependencies), [className, style, col.type, col.treeColumnsName
62327
+ // onClick,
62328
+ // onMouseEnter,
62329
+ // onMouseLeave,
62330
+ ]), updateFn ? function (prev, next) {
62331
+ if (col.type || col.treeColumnsName) {
62332
+ return true;
62333
+ }
62334
+ return prev.some(function (_, index) {
62335
+ return !shallowEqual(prev[index], next[index]);
62336
+ });
62337
+ } : undefined);
62338
+ return $td;
62339
+ }
62283
62340
  ;// CONCATENATED MODULE: ../base/src/table/tr.tsx
62284
62341
 
62285
62342
 
@@ -62298,6 +62355,7 @@ var useTableRow = function useTableRow(props) {
62298
62355
 
62299
62356
 
62300
62357
 
62358
+
62301
62359
  var tr_toNum = toNum;
62302
62360
  var Tr = function Tr(props) {
62303
62361
  var _props$jssStyle, _props$jssStyle$table, _jssStyle$input, _jssStyle$select, _jssStyle$datePicker, _jssStyle$treeSelect, _jssStyle$switch, _jssStyle$checkbox, _jssStyle$radio, _jssStyle$cascader, _props$rowClassName;
@@ -62544,8 +62602,9 @@ var Tr = function Tr(props) {
62544
62602
  if (data[i]) {
62545
62603
  var last = cols[i + (data[i].colSpan || 1) - 1] || {};
62546
62604
  var isRowSpanTd = data[i].rowSpan > 1;
62547
- var $tdContent = renderContent(col, data[i].data);
62548
- var td = /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
62605
+ var td = /*#__PURE__*/(0,jsx_runtime.jsx)(Td, {
62606
+ col: col,
62607
+ data: data[i].data,
62549
62608
  colSpan: data[i].colSpan,
62550
62609
  rowSpan: data[i].rowSpan,
62551
62610
  onMouseEnter: props.hover && hasSiblingRowSpan || isRowSpanTd ? function () {
@@ -62556,13 +62615,14 @@ var Tr = function Tr(props) {
62556
62615
  } : undefined,
62557
62616
  className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), props.hoverIndex.has(props.rowIndex) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover), isRowSpanTd && props.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
62558
62617
  style: getTdStyle(col, data[i].colSpan),
62559
- dir: config.direction,
62618
+ direction: config.direction,
62560
62619
  "data-role": col.type === 'checkbox' ? 'checkbox' : undefined,
62561
62620
  onClick: props.onCellClick ? function () {
62562
62621
  return handleCellClick(data[i].data, i);
62563
62622
  } : undefined,
62564
- children: $tdContent
62565
- }, col.key);
62623
+ shouldUpdate: col.shouldUpdate,
62624
+ renderContent: renderContent
62625
+ });
62566
62626
  tds.push(td);
62567
62627
  if (data[i].colSpan) skip = data[i].colSpan - 1;
62568
62628
  }
@@ -69752,7 +69812,7 @@ var upload_interface = __webpack_require__(8821);
69752
69812
 
69753
69813
 
69754
69814
  /* harmony default export */ var src_0 = ({
69755
- version: '3.6.2'
69815
+ version: '3.7.0-beta.1'
69756
69816
  });
69757
69817
  }();
69758
69818
  /******/ return __webpack_exports__;