shineout 3.6.2 → 3.7.0-beta.2
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 +1 -1
- package/dist/shineout.js +103 -43
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
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.
|
|
517
|
+
version: '3.7.0-beta.2'
|
|
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.
|
|
12145
|
+
/* harmony default export */ var version = ('3.7.0-beta.2');
|
|
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:
|
|
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
|
};
|
|
@@ -61978,10 +61976,10 @@ var thead_toNum = toNum;
|
|
|
61978
61976
|
};
|
|
61979
61977
|
var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
|
|
61980
61978
|
if (fixed === 'left') {
|
|
61981
|
-
if (props.
|
|
61979
|
+
if (props.virtual) {
|
|
61982
61980
|
// 这是virtual table场景下的th样式
|
|
61983
61981
|
return {
|
|
61984
|
-
transform: "translate3d(
|
|
61982
|
+
transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
|
|
61985
61983
|
};
|
|
61986
61984
|
}
|
|
61987
61985
|
var left = colgroup.slice(0, index).reduce(function (a, b) {
|
|
@@ -61995,10 +61993,10 @@ var thead_toNum = toNum;
|
|
|
61995
61993
|
};
|
|
61996
61994
|
}
|
|
61997
61995
|
if (fixed === 'right') {
|
|
61998
|
-
if (props.
|
|
61996
|
+
if (props.virtual) {
|
|
61999
61997
|
// 这是virtual table场景下的th样式
|
|
62000
61998
|
return {
|
|
62001
|
-
transform: "translate3d(
|
|
61999
|
+
transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
|
|
62002
62000
|
};
|
|
62003
62001
|
}
|
|
62004
62002
|
var right = colgroup.slice(index + colSpan).reduce(function (a, b) {
|
|
@@ -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;
|
|
@@ -62311,9 +62369,9 @@ var Tr = function Tr(props) {
|
|
|
62311
62369
|
var getFixedStyle = function getFixedStyle(fixed, index, colSpan) {
|
|
62312
62370
|
if (!props.isScrollX) return;
|
|
62313
62371
|
if (fixed === 'left') {
|
|
62314
|
-
if (props.
|
|
62372
|
+
if (props.virtual) {
|
|
62315
62373
|
return {
|
|
62316
|
-
transform: "translate3d(
|
|
62374
|
+
transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
|
|
62317
62375
|
};
|
|
62318
62376
|
}
|
|
62319
62377
|
var left = props.colgroup.slice(0, index).reduce(function (a, b) {
|
|
@@ -62325,9 +62383,9 @@ var Tr = function Tr(props) {
|
|
|
62325
62383
|
};
|
|
62326
62384
|
}
|
|
62327
62385
|
if (fixed === 'right') {
|
|
62328
|
-
if (props.
|
|
62386
|
+
if (props.virtual) {
|
|
62329
62387
|
return {
|
|
62330
|
-
transform: "translate3d(
|
|
62388
|
+
transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
|
|
62331
62389
|
};
|
|
62332
62390
|
}
|
|
62333
62391
|
var right = props.colgroup.slice(index + colSpan).reduce(function (a, b) {
|
|
@@ -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
|
|
62548
|
-
|
|
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
|
-
|
|
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
|
-
|
|
62565
|
-
|
|
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
|
}
|
|
@@ -62715,8 +62775,7 @@ var Tr = function Tr(props) {
|
|
|
62715
62775
|
isEmptyTree: props.isEmptyTree,
|
|
62716
62776
|
treeColumnsName: props.treeColumnsName,
|
|
62717
62777
|
setRowHeight: props.setRowHeight,
|
|
62718
|
-
|
|
62719
|
-
fixRightNum: props.fixRightNum,
|
|
62778
|
+
virtual: props.virtual,
|
|
62720
62779
|
striped: props.striped,
|
|
62721
62780
|
radio: props.radio,
|
|
62722
62781
|
isCellHover: isCellHover,
|
|
@@ -62757,9 +62816,9 @@ var tfoot_isArray = isArray,
|
|
|
62757
62816
|
var getFixedStyle = function getFixedStyle(fixed, index, colSpan) {
|
|
62758
62817
|
var colgroup = props.colgroup;
|
|
62759
62818
|
if (fixed === 'left') {
|
|
62760
|
-
if (props.
|
|
62819
|
+
if (props.virtual) {
|
|
62761
62820
|
return {
|
|
62762
|
-
transform: "translate3d(
|
|
62821
|
+
transform: "translate3d(var(--virtual-fixed-left, 0), 0, 0)"
|
|
62763
62822
|
};
|
|
62764
62823
|
}
|
|
62765
62824
|
var left = colgroup.slice(0, index).reduce(function (a, b) {
|
|
@@ -62771,9 +62830,9 @@ var tfoot_isArray = isArray,
|
|
|
62771
62830
|
};
|
|
62772
62831
|
}
|
|
62773
62832
|
if (fixed === 'right') {
|
|
62774
|
-
if (props.
|
|
62833
|
+
if (props.virtual) {
|
|
62775
62834
|
return {
|
|
62776
|
-
transform: "translate3d(-
|
|
62835
|
+
transform: "translate3d(var(--virtual-fixed-right, 0), 0, 0)"
|
|
62777
62836
|
};
|
|
62778
62837
|
}
|
|
62779
62838
|
var right = colgroup.slice(index + colSpan).reduce(function (a, b) {
|
|
@@ -63267,19 +63326,22 @@ var emptyRef = {
|
|
|
63267
63326
|
};
|
|
63268
63327
|
if (isRenderVirtualTable) {
|
|
63269
63328
|
var _props$data4;
|
|
63329
|
+
var virtualCssVar = {
|
|
63330
|
+
'--virtual-fixed-left': "".concat(virtualInfo.innerLeft, "px"),
|
|
63331
|
+
'--virtual-fixed-right': fixRightNum > 0 ? "-".concat(fixRightNum, "px") : "".concat(fixRightNum, "px")
|
|
63332
|
+
};
|
|
63270
63333
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63271
63334
|
children: [renderHeadMirrorScroller(), !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? stickyProps : {}), {}, {
|
|
63272
63335
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63273
63336
|
className: headWrapperClass,
|
|
63274
63337
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63275
|
-
style: {
|
|
63338
|
+
style: objectSpread2_default()({
|
|
63276
63339
|
width: width,
|
|
63277
|
-
transform: "translate3d(".concat(
|
|
63278
|
-
},
|
|
63340
|
+
transform: "translate3d(-".concat(virtualInfo.innerLeft, "px, 0, 0)")
|
|
63341
|
+
}, virtualCssVar),
|
|
63279
63342
|
ref: theadRef,
|
|
63280
63343
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()(objectSpread2_default()({}, headCommonProps), {}, {
|
|
63281
|
-
|
|
63282
|
-
fixRightNum: fixRightNum
|
|
63344
|
+
virtual: true
|
|
63283
63345
|
}))]
|
|
63284
63346
|
})
|
|
63285
63347
|
})
|
|
@@ -63293,30 +63355,28 @@ var emptyRef = {
|
|
|
63293
63355
|
defaultHeight: context.emptyHeight,
|
|
63294
63356
|
isScrollY: isScrollY,
|
|
63295
63357
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63296
|
-
style: {
|
|
63358
|
+
style: objectSpread2_default()({
|
|
63297
63359
|
width: width,
|
|
63298
63360
|
transform: virtualInfo.getTranslate()
|
|
63299
|
-
},
|
|
63361
|
+
}, virtualCssVar),
|
|
63300
63362
|
ref: tbodyRef,
|
|
63301
63363
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
|
|
63302
63364
|
currentIndex: virtualInfo.startIndex,
|
|
63303
63365
|
data: virtualInfo.data,
|
|
63304
63366
|
setRowHeight: virtualInfo.setRowHeight,
|
|
63305
|
-
|
|
63306
|
-
fixRightNum: fixRightNum
|
|
63367
|
+
virtual: true
|
|
63307
63368
|
}))]
|
|
63308
63369
|
})
|
|
63309
63370
|
}), renderEmpty(), showFoot ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63310
63371
|
className: footWrapperClass,
|
|
63311
63372
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63312
|
-
style: {
|
|
63373
|
+
style: objectSpread2_default()({
|
|
63313
63374
|
width: width,
|
|
63314
63375
|
transform: "translate3d(-".concat(virtualInfo.innerLeft, "px, 0, 0)")
|
|
63315
|
-
},
|
|
63376
|
+
}, virtualCssVar),
|
|
63316
63377
|
ref: tfootRef,
|
|
63317
63378
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()(objectSpread2_default()({}, footCommonProps), {}, {
|
|
63318
|
-
|
|
63319
|
-
fixRightNum: fixRightNum
|
|
63379
|
+
virtual: true
|
|
63320
63380
|
}))]
|
|
63321
63381
|
})
|
|
63322
63382
|
}) : null]
|
|
@@ -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.
|
|
69815
|
+
version: '3.7.0-beta.2'
|
|
69756
69816
|
});
|
|
69757
69817
|
}();
|
|
69758
69818
|
/******/ return __webpack_exports__;
|