shineout 3.7.0-beta.6 → 3.7.0-beta.7
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 +172 -62
- 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.7.0-beta.
|
|
517
|
+
version: '3.7.0-beta.7'
|
|
518
518
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12217,7 +12217,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12217
12217
|
};
|
|
12218
12218
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12219
12219
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12220
|
-
/* harmony default export */ var version = ('3.7.0-beta.
|
|
12220
|
+
/* harmony default export */ var version = ('3.7.0-beta.7');
|
|
12221
12221
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12222
12222
|
|
|
12223
12223
|
|
|
@@ -25795,8 +25795,11 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25795
25795
|
borderTop: "1px solid ".concat(src.tableCellBorderColor)
|
|
25796
25796
|
}
|
|
25797
25797
|
},
|
|
25798
|
-
|
|
25799
|
-
overflow: 'scroll hidden'
|
|
25798
|
+
mirrorScroller: {
|
|
25799
|
+
overflow: 'scroll hidden',
|
|
25800
|
+
'[data-soui-sticky="false"] &': {
|
|
25801
|
+
display: 'none'
|
|
25802
|
+
}
|
|
25800
25803
|
},
|
|
25801
25804
|
headWrapper: {
|
|
25802
25805
|
flex: '0 0 auto',
|
|
@@ -28649,8 +28652,8 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28649
28652
|
visibility: 'hidden'
|
|
28650
28653
|
},
|
|
28651
28654
|
moreWrapper: {
|
|
28652
|
-
|
|
28653
|
-
|
|
28655
|
+
maxWidth: 400,
|
|
28656
|
+
maxHeight: 160,
|
|
28654
28657
|
overflow: 'auto',
|
|
28655
28658
|
padding: "".concat(src.treeSelectMorePaddingY, " ").concat(src.treeSelectMorePaddingX)
|
|
28656
28659
|
},
|
|
@@ -29976,19 +29979,6 @@ var usePopup = function usePopup(props) {
|
|
|
29976
29979
|
};
|
|
29977
29980
|
};
|
|
29978
29981
|
/* harmony default export */ var use_popup = (usePopup);
|
|
29979
|
-
;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
|
|
29980
|
-
var getDataAttribute = function getDataAttribute(attrs) {
|
|
29981
|
-
return Object.keys(attrs).reduce(function (acc, key) {
|
|
29982
|
-
var ns = "data-soui-".concat(key);
|
|
29983
|
-
if (attrs[key] !== undefined) {
|
|
29984
|
-
acc[ns] = attrs[key];
|
|
29985
|
-
}
|
|
29986
|
-
return acc;
|
|
29987
|
-
}, {});
|
|
29988
|
-
};
|
|
29989
|
-
var getDataAttributeName = function getDataAttributeName(name) {
|
|
29990
|
-
return "data-soui-".concat(name);
|
|
29991
|
-
};
|
|
29992
29982
|
;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
|
|
29993
29983
|
// 节流函数
|
|
29994
29984
|
var throttle = function throttle(func, wait) {
|
|
@@ -30207,6 +30197,19 @@ var getFieldId = function getFieldId(name, formName) {
|
|
|
30207
30197
|
if (!name) return undefined;
|
|
30208
30198
|
return "".concat(formName ? "".concat(formName, "_") : '').concat(name);
|
|
30209
30199
|
};
|
|
30200
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
|
|
30201
|
+
var getDataAttribute = function getDataAttribute(attrs) {
|
|
30202
|
+
return Object.keys(attrs).reduce(function (acc, key) {
|
|
30203
|
+
var ns = "data-soui-".concat(key);
|
|
30204
|
+
if (attrs[key] !== undefined) {
|
|
30205
|
+
acc[ns] = attrs[key];
|
|
30206
|
+
}
|
|
30207
|
+
return acc;
|
|
30208
|
+
}, {});
|
|
30209
|
+
};
|
|
30210
|
+
var getDataAttributeName = function getDataAttributeName(name) {
|
|
30211
|
+
return "data-soui-".concat(name);
|
|
30212
|
+
};
|
|
30210
30213
|
;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/get-position-style.ts
|
|
30211
30214
|
|
|
30212
30215
|
var ReverseDir = {
|
|
@@ -30648,13 +30651,6 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30648
30651
|
style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
|
|
30649
30652
|
style.left = 'auto';
|
|
30650
30653
|
style.transform = '';
|
|
30651
|
-
if (adjust) {
|
|
30652
|
-
overLeft = bodyRect.left - (rect.right - context.popUpWidth);
|
|
30653
|
-
if (style.right < 0 && targetRect) {
|
|
30654
|
-
style.left = bodyRect.width - targetRect.width;
|
|
30655
|
-
style.right = 'auto';
|
|
30656
|
-
}
|
|
30657
|
-
}
|
|
30658
30654
|
} else {
|
|
30659
30655
|
// 居中对齐
|
|
30660
30656
|
style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
|
|
@@ -31526,6 +31522,7 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
31526
31522
|
|
|
31527
31523
|
|
|
31528
31524
|
|
|
31525
|
+
|
|
31529
31526
|
var emptyEvent = function emptyEvent(e) {
|
|
31530
31527
|
return e.stopPropagation();
|
|
31531
31528
|
};
|
|
@@ -31585,7 +31582,17 @@ var Popover = function Popover(props) {
|
|
|
31585
31582
|
Provider = _usePopup.Provider,
|
|
31586
31583
|
providerValue = _usePopup.providerValue;
|
|
31587
31584
|
var events = getTargetProps();
|
|
31585
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
31586
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
31587
|
+
updateKey = _React$useState2[0],
|
|
31588
|
+
setUpdateKey = _React$useState2[1];
|
|
31589
|
+
var handleUpdateKey = function handleUpdateKey() {
|
|
31590
|
+
setUpdateKey(function (prev) {
|
|
31591
|
+
return (prev + 1) % 2;
|
|
31592
|
+
});
|
|
31593
|
+
};
|
|
31588
31594
|
var bindEvents = function bindEvents() {
|
|
31595
|
+
var _window;
|
|
31589
31596
|
var targetEl = targetRef.current;
|
|
31590
31597
|
if (!targetEl) return;
|
|
31591
31598
|
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
@@ -31595,8 +31602,14 @@ var Popover = function Popover(props) {
|
|
|
31595
31602
|
if (trigger === 'hover' && props.clickToCancelDelay && props.mouseEnterDelay) {
|
|
31596
31603
|
targetEl.addEventListener('click', closePop);
|
|
31597
31604
|
}
|
|
31605
|
+
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
31606
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
31607
|
+
if (scrollContainer) {
|
|
31608
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
31609
|
+
}
|
|
31598
31610
|
};
|
|
31599
31611
|
var unbindEvents = function unbindEvents() {
|
|
31612
|
+
var _window2;
|
|
31600
31613
|
var targetEl = targetRef.current;
|
|
31601
31614
|
if (!targetEl) return;
|
|
31602
31615
|
var events = getTargetProps();
|
|
@@ -31604,6 +31617,11 @@ var Popover = function Popover(props) {
|
|
|
31604
31617
|
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
31605
31618
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
31606
31619
|
targetEl.removeEventListener('click', closePop);
|
|
31620
|
+
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
31621
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
31622
|
+
if (scrollContainer) {
|
|
31623
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
31624
|
+
}
|
|
31607
31625
|
};
|
|
31608
31626
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
31609
31627
|
bindEvents();
|
|
@@ -31665,6 +31683,7 @@ var Popover = function Popover(props) {
|
|
|
31665
31683
|
adjust: props.adjust,
|
|
31666
31684
|
lazy: props.lazy,
|
|
31667
31685
|
offset: props.offset,
|
|
31686
|
+
updateKey: updateKey,
|
|
31668
31687
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
31669
31688
|
className: classnames_default()(className, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.rootClass, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapper, open && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapperOpen), !showArrow && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.hideArrow)),
|
|
31670
31689
|
style: containerStyle
|
|
@@ -41376,8 +41395,9 @@ var Cascader = function Cascader(props0) {
|
|
|
41376
41395
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41377
41396
|
if (!value) return;
|
|
41378
41397
|
datum.setValue(value);
|
|
41398
|
+
if (!open) return;
|
|
41379
41399
|
updatePathByValue();
|
|
41380
|
-
}, [value]);
|
|
41400
|
+
}, [value, open]);
|
|
41381
41401
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41382
41402
|
if (filterText !== undefined) {
|
|
41383
41403
|
updatePath();
|
|
@@ -41888,6 +41908,7 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41888
41908
|
|
|
41889
41909
|
|
|
41890
41910
|
|
|
41911
|
+
|
|
41891
41912
|
var getValue = function getValue(name, formValue) {
|
|
41892
41913
|
if (!name) return undefined;
|
|
41893
41914
|
if (isArray(name)) {
|
|
@@ -41927,6 +41948,10 @@ function useFormControl(props) {
|
|
|
41927
41948
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
41928
41949
|
errorState = _React$useState2[0],
|
|
41929
41950
|
setErrorState = _React$useState2[1];
|
|
41951
|
+
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
41952
|
+
mounted: false
|
|
41953
|
+
}),
|
|
41954
|
+
context = _React$useRef.current;
|
|
41930
41955
|
var value;
|
|
41931
41956
|
var error = errorState;
|
|
41932
41957
|
var inForm = false;
|
|
@@ -42086,7 +42111,11 @@ function useFormControl(props) {
|
|
|
42086
42111
|
} else {
|
|
42087
42112
|
controlFunc.bind(name, defaultValue, validateField, update);
|
|
42088
42113
|
}
|
|
42114
|
+
if (context.mounted) {
|
|
42115
|
+
devUseWarning.warn('Please avoid modifying the name property after the component has mounted, as this may result in unintended behavior or errors.');
|
|
42116
|
+
}
|
|
42089
42117
|
}
|
|
42118
|
+
context.mounted = true;
|
|
42090
42119
|
return function () {
|
|
42091
42120
|
if (inForm && controlFunc) {
|
|
42092
42121
|
if (isArray(name)) {
|
|
@@ -49783,8 +49812,10 @@ var useForm = function useForm(props) {
|
|
|
49783
49812
|
context.updateMap[n] = new Set();
|
|
49784
49813
|
}
|
|
49785
49814
|
context.updateMap[n].add(updateFn);
|
|
49815
|
+
var shouldTriggerResetChange = context.removeArr.has(n);
|
|
49786
49816
|
context.removeArr.delete(n);
|
|
49787
|
-
|
|
49817
|
+
var shouldTriggerDefaultChange = df !== undefined && deepGet(context.value, n) === undefined;
|
|
49818
|
+
if (shouldTriggerDefaultChange || shouldTriggerResetChange) {
|
|
49788
49819
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
49789
49820
|
onChange(function (v) {
|
|
49790
49821
|
deepSet(v, n, df, deepSetOptions);
|
|
@@ -50152,6 +50183,7 @@ var UseFormItem = function UseFormItem() {
|
|
|
50152
50183
|
|
|
50153
50184
|
|
|
50154
50185
|
|
|
50186
|
+
|
|
50155
50187
|
var tooltip_devUseWarning = devUseWarning;
|
|
50156
50188
|
var defaultDelay = 0;
|
|
50157
50189
|
var Tooltip = function Tooltip(props) {
|
|
@@ -50193,14 +50225,30 @@ var Tooltip = function Tooltip(props) {
|
|
|
50193
50225
|
popupRef = _usePopup.popupRef,
|
|
50194
50226
|
closePop = _usePopup.closePop;
|
|
50195
50227
|
var events = getTargetProps();
|
|
50228
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
50229
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
50230
|
+
updateKey = _React$useState2[0],
|
|
50231
|
+
setUpdateKey = _React$useState2[1];
|
|
50232
|
+
var handleUpdateKey = function handleUpdateKey() {
|
|
50233
|
+
setUpdateKey(function (prev) {
|
|
50234
|
+
return (prev + 1) % 2;
|
|
50235
|
+
});
|
|
50236
|
+
};
|
|
50196
50237
|
var bindEvents = function bindEvents() {
|
|
50238
|
+
var _window;
|
|
50197
50239
|
var targetEl = targetRef.current;
|
|
50198
50240
|
if (!targetEl) return;
|
|
50199
50241
|
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
50200
50242
|
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
50201
50243
|
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
50244
|
+
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
50245
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50246
|
+
if (scrollContainer) {
|
|
50247
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50248
|
+
}
|
|
50202
50249
|
};
|
|
50203
50250
|
var unbindEvents = function unbindEvents() {
|
|
50251
|
+
var _window2;
|
|
50204
50252
|
var targetEl = targetRef.current;
|
|
50205
50253
|
if (!targetEl) return;
|
|
50206
50254
|
var events = getTargetProps();
|
|
@@ -50208,6 +50256,11 @@ var Tooltip = function Tooltip(props) {
|
|
|
50208
50256
|
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
50209
50257
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
50210
50258
|
targetEl.removeEventListener('click', closePop);
|
|
50259
|
+
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
50260
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50261
|
+
if (scrollContainer) {
|
|
50262
|
+
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50263
|
+
}
|
|
50211
50264
|
};
|
|
50212
50265
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
50213
50266
|
if (!persistent) return;
|
|
@@ -50251,6 +50304,7 @@ var Tooltip = function Tooltip(props) {
|
|
|
50251
50304
|
popupGap: 0,
|
|
50252
50305
|
zIndex: zIndex,
|
|
50253
50306
|
adjust: popsitionProps === 'auto',
|
|
50307
|
+
updateKey: updateKey,
|
|
50254
50308
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
50255
50309
|
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
|
|
50256
50310
|
style: {
|
|
@@ -54248,6 +54302,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54248
54302
|
height = props.height,
|
|
54249
54303
|
_props$lineHeight = props.lineHeight,
|
|
54250
54304
|
lineHeight = _props$lineHeight === void 0 ? 36 : _props$lineHeight,
|
|
54305
|
+
rowsInView = props.rowsInView,
|
|
54251
54306
|
line = props.line,
|
|
54252
54307
|
mode = props.mode,
|
|
54253
54308
|
contentClass = props.contentClass,
|
|
@@ -54309,7 +54364,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54309
54364
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
54310
54365
|
data: datum.dataFlat,
|
|
54311
54366
|
height: height,
|
|
54312
|
-
rowsInView:
|
|
54367
|
+
rowsInView: rowsInView,
|
|
54313
54368
|
scrollerStyle: {
|
|
54314
54369
|
height: '100%',
|
|
54315
54370
|
width: '100%',
|
|
@@ -54329,7 +54384,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54329
54384
|
|
|
54330
54385
|
|
|
54331
54386
|
|
|
54332
|
-
var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "ignoreSetFlat", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum", "actionOnClick", "tiledData"];
|
|
54387
|
+
var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "ignoreSetFlat", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum", "rowsInView", "actionOnClick", "tiledData"];
|
|
54333
54388
|
|
|
54334
54389
|
|
|
54335
54390
|
|
|
@@ -54391,6 +54446,8 @@ var Tree = function Tree(props) {
|
|
|
54391
54446
|
onDragOver = props.onDragOver,
|
|
54392
54447
|
onDragStart = props.onDragStart,
|
|
54393
54448
|
propsDatum = props.datum,
|
|
54449
|
+
_props$rowsInView = props.rowsInView,
|
|
54450
|
+
rowsInView = _props$rowsInView === void 0 ? 20 : _props$rowsInView,
|
|
54394
54451
|
actionOnClick = props.actionOnClick,
|
|
54395
54452
|
tiledData = props.tiledData,
|
|
54396
54453
|
rest = objectWithoutProperties_default()(props, tree_excluded);
|
|
@@ -54550,6 +54607,7 @@ var Tree = function Tree(props) {
|
|
|
54550
54607
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_virtual, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
54551
54608
|
data: data,
|
|
54552
54609
|
line: line,
|
|
54610
|
+
rowsInView: rowsInView,
|
|
54553
54611
|
expanded: expanded,
|
|
54554
54612
|
height: realHeight,
|
|
54555
54613
|
childrenKey: props.childrenKey || 'children',
|
|
@@ -60097,12 +60155,15 @@ var Sticky = function Sticky(props) {
|
|
|
60097
60155
|
pointerEvents: 'none'
|
|
60098
60156
|
};
|
|
60099
60157
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
60100
|
-
children: [isFixed ? StickyEl : context.target && context.div && /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(StickyEl, context.div), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60158
|
+
children: [isFixed ? StickyEl : context.target && context.div && /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(StickyEl, context.div), /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
60101
60159
|
className: props.className,
|
|
60102
60160
|
style: objectSpread2_default()(objectSpread2_default()({}, props.style), show && parentVisible ? hideStyle : {}),
|
|
60103
|
-
ref: handleElementRef
|
|
60161
|
+
ref: handleElementRef
|
|
60162
|
+
}, getDataAttribute({
|
|
60163
|
+
sticky: show && parentVisible ? 'true' : 'false'
|
|
60164
|
+
})), {}, {
|
|
60104
60165
|
children: children
|
|
60105
|
-
})]
|
|
60166
|
+
}))]
|
|
60106
60167
|
});
|
|
60107
60168
|
};
|
|
60108
60169
|
/* harmony default export */ var src_sticky_sticky = (Sticky);
|
|
@@ -61229,13 +61290,6 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61229
61290
|
autoAddRows: 0
|
|
61230
61291
|
}),
|
|
61231
61292
|
context = _useRef.current;
|
|
61232
|
-
var getTranslate = usePersistFn(function (left, top) {
|
|
61233
|
-
var t = top === undefined ? innerTop + offsetY : top;
|
|
61234
|
-
if (t < 0) {
|
|
61235
|
-
t = 0;
|
|
61236
|
-
}
|
|
61237
|
-
return "translate3d(0, ".concat(0 - t, "px, 0)");
|
|
61238
|
-
});
|
|
61239
61293
|
var getContentHeight = function getContentHeight(index) {
|
|
61240
61294
|
if (props.disabled) return 0;
|
|
61241
61295
|
var sum = 0;
|
|
@@ -61335,7 +61389,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61335
61389
|
};
|
|
61336
61390
|
setHeight(sumHeight);
|
|
61337
61391
|
});
|
|
61338
|
-
var handleScroll = function
|
|
61392
|
+
var handleScroll = usePersistFn(function (info) {
|
|
61339
61393
|
var height = info.height,
|
|
61340
61394
|
y = info.y,
|
|
61341
61395
|
fromDrag = info.fromDrag;
|
|
@@ -61369,7 +61423,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61369
61423
|
} else {
|
|
61370
61424
|
updateIndexAndTopFromTop(scrollTop);
|
|
61371
61425
|
}
|
|
61372
|
-
};
|
|
61426
|
+
});
|
|
61373
61427
|
var scrollToIndex = usePersistFn(function (index, callback) {
|
|
61374
61428
|
if (props.disabled) return;
|
|
61375
61429
|
if (props.scrollRef.current) {
|
|
@@ -61474,15 +61528,24 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61474
61528
|
}
|
|
61475
61529
|
}, [scrollHeight]);
|
|
61476
61530
|
var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
|
|
61477
|
-
var renderData =
|
|
61531
|
+
var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61532
|
+
if (props.disabled) return props.data;
|
|
61533
|
+
return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
61534
|
+
}, [props.data, startIndex, finalRowsInView]);
|
|
61535
|
+
var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61536
|
+
var t = innerTop + offsetY;
|
|
61537
|
+
if (t < 0) {
|
|
61538
|
+
t = 0;
|
|
61539
|
+
}
|
|
61540
|
+
return "translate3d(0, ".concat(0 - t, "px, 0)");
|
|
61541
|
+
}, [innerTop]);
|
|
61478
61542
|
return {
|
|
61479
61543
|
scrollHeight: scrollHeight,
|
|
61480
61544
|
startIndex: startIndex,
|
|
61481
|
-
|
|
61545
|
+
translateStyle: translateStyle,
|
|
61482
61546
|
data: renderData,
|
|
61483
61547
|
handleScroll: handleScroll,
|
|
61484
61548
|
setRowHeight: setRowHeight,
|
|
61485
|
-
getTranslate: getTranslate,
|
|
61486
61549
|
scrollToIndex: scrollToIndex,
|
|
61487
61550
|
scrollColumnByLeft: scrollColumnByLeft,
|
|
61488
61551
|
scrollColumnIntoView: scrollColumnIntoView
|
|
@@ -62516,7 +62579,7 @@ var useTableRow = function useTableRow(props) {
|
|
|
62516
62579
|
};
|
|
62517
62580
|
};
|
|
62518
62581
|
/* harmony default export */ var use_table_row = (useTableRow);
|
|
62519
|
-
;// CONCATENATED MODULE: ../hooks/src/common/use-memo/use-memo.ts
|
|
62582
|
+
;// CONCATENATED MODULE: ../hooks/src/common/use-component-memo/use-memo.ts
|
|
62520
62583
|
|
|
62521
62584
|
function useMemo(getValue, condition, shouldUpdate) {
|
|
62522
62585
|
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
|
|
@@ -62552,6 +62615,7 @@ function Td(props) {
|
|
|
62552
62615
|
className = props.className,
|
|
62553
62616
|
direction = props.direction,
|
|
62554
62617
|
role = props.role,
|
|
62618
|
+
data = props.data,
|
|
62555
62619
|
onClick = props.onClick,
|
|
62556
62620
|
onMouseEnter = props.onMouseEnter,
|
|
62557
62621
|
onMouseLeave = props.onMouseLeave,
|
|
@@ -62572,15 +62636,14 @@ function Td(props) {
|
|
|
62572
62636
|
onClick: onClick,
|
|
62573
62637
|
children: content
|
|
62574
62638
|
}, col.key);
|
|
62575
|
-
}, [].concat(toConsumableArray_default()(externalDependencies),
|
|
62576
|
-
// onClick,
|
|
62577
|
-
// onMouseEnter,
|
|
62578
|
-
// onMouseLeave,
|
|
62579
|
-
]), updateFn ? function (prev, next) {
|
|
62639
|
+
}, [data, className, style, col.type, col.treeColumnsName].concat(toConsumableArray_default()(externalDependencies)), updateFn ? function (prev, next) {
|
|
62580
62640
|
if (col.type || col.treeColumnsName) {
|
|
62581
62641
|
return true;
|
|
62582
62642
|
}
|
|
62583
62643
|
return prev.some(function (_, index) {
|
|
62644
|
+
if (index === 0) {
|
|
62645
|
+
return updateFn(prev[index], next[index]);
|
|
62646
|
+
}
|
|
62584
62647
|
return !shallowEqual(prev[index], next[index]);
|
|
62585
62648
|
});
|
|
62586
62649
|
} : undefined);
|
|
@@ -63202,7 +63265,8 @@ var emptyRef = {
|
|
|
63202
63265
|
var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63203
63266
|
var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63204
63267
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63205
|
-
var
|
|
63268
|
+
var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63269
|
+
var bottomMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63206
63270
|
var tableRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63207
63271
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
63208
63272
|
if (props.fixed) {
|
|
@@ -63381,8 +63445,11 @@ var emptyRef = {
|
|
|
63381
63445
|
var target = e.currentTarget;
|
|
63382
63446
|
if (!target) return;
|
|
63383
63447
|
layoutFunc.checkFloat();
|
|
63384
|
-
if (
|
|
63385
|
-
|
|
63448
|
+
if (headMirrorScrollRef.current) {
|
|
63449
|
+
headMirrorScrollRef.current.scrollLeft = target.scrollLeft;
|
|
63450
|
+
}
|
|
63451
|
+
if (bottomMirrorScrollRef.current) {
|
|
63452
|
+
bottomMirrorScrollRef.current.scrollLeft = target.scrollLeft;
|
|
63386
63453
|
}
|
|
63387
63454
|
if (props.onScroll && typeof props.onScroll === 'function') {
|
|
63388
63455
|
var maxWidth = target.scrollWidth - target.clientWidth;
|
|
@@ -63397,8 +63464,11 @@ var emptyRef = {
|
|
|
63397
63464
|
var handleVirtualScroll = usePersistFn(function (info) {
|
|
63398
63465
|
virtualInfo.handleScroll(info);
|
|
63399
63466
|
layoutFunc.checkFloat();
|
|
63400
|
-
if (
|
|
63401
|
-
|
|
63467
|
+
if (headMirrorScrollRef.current) {
|
|
63468
|
+
headMirrorScrollRef.current.scrollLeft = info.scrollLeft;
|
|
63469
|
+
}
|
|
63470
|
+
if (bottomMirrorScrollRef.current) {
|
|
63471
|
+
bottomMirrorScrollRef.current.scrollLeft = info.scrollLeft;
|
|
63402
63472
|
}
|
|
63403
63473
|
if (props.onScroll && typeof props.onScroll === 'function') {
|
|
63404
63474
|
props.onScroll(info.x, info.y, info.scrollLeft, info.scrollTop);
|
|
@@ -63516,7 +63586,7 @@ var emptyRef = {
|
|
|
63516
63586
|
});
|
|
63517
63587
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? scrollerStickyProps : {}), {}, {
|
|
63518
63588
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63519
|
-
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.
|
|
63589
|
+
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.mirrorScroller,
|
|
63520
63590
|
style: {
|
|
63521
63591
|
height: browserScrollbarWidth,
|
|
63522
63592
|
width: mirrorScrollRefWidth
|
|
@@ -63527,7 +63597,7 @@ var emptyRef = {
|
|
|
63527
63597
|
scrollRef.current.scrollLeft = target.scrollLeft;
|
|
63528
63598
|
}
|
|
63529
63599
|
},
|
|
63530
|
-
ref:
|
|
63600
|
+
ref: headMirrorScrollRef,
|
|
63531
63601
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63532
63602
|
style: {
|
|
63533
63603
|
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth,
|
|
@@ -63537,6 +63607,46 @@ var emptyRef = {
|
|
|
63537
63607
|
})
|
|
63538
63608
|
}));
|
|
63539
63609
|
};
|
|
63610
|
+
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
63611
|
+
var _scrollRef$current4, _scrollRef$current5, _scrollRef$current6;
|
|
63612
|
+
if (!props.showBottomScrollbar) return null;
|
|
63613
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.clientWidth) || 0;
|
|
63614
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.scrollWidth) || 0;
|
|
63615
|
+
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
63616
|
+
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
63617
|
+
// 开启了双滚,但是没有滚动条,不显示
|
|
63618
|
+
if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
|
|
63619
|
+
var options = props.showBottomScrollbar === true ? {} : props.showBottomScrollbar;
|
|
63620
|
+
var scrollerStickyProps = {
|
|
63621
|
+
scrollContainer: options.scrollContainer || document.body,
|
|
63622
|
+
bottom: options.bottom || 0,
|
|
63623
|
+
zIndex: options.zIndex || defaultZIndex + 1,
|
|
63624
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
63625
|
+
};
|
|
63626
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, scrollerStickyProps), {}, {
|
|
63627
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63628
|
+
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.mirrorScroller,
|
|
63629
|
+
style: {
|
|
63630
|
+
height: browserScrollbarWidth,
|
|
63631
|
+
width: mirrorScrollRefWidth,
|
|
63632
|
+
marginTop: -browserScrollbarWidth
|
|
63633
|
+
},
|
|
63634
|
+
onScroll: function onScroll(e) {
|
|
63635
|
+
var target = e.currentTarget;
|
|
63636
|
+
if (scrollRef !== null && scrollRef !== void 0 && scrollRef.current && scrollRef.current.scrollLeft !== target.scrollLeft) {
|
|
63637
|
+
scrollRef.current.scrollLeft = target.scrollLeft;
|
|
63638
|
+
}
|
|
63639
|
+
},
|
|
63640
|
+
ref: bottomMirrorScrollRef,
|
|
63641
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63642
|
+
style: {
|
|
63643
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth,
|
|
63644
|
+
height: 1
|
|
63645
|
+
}
|
|
63646
|
+
})
|
|
63647
|
+
})
|
|
63648
|
+
}));
|
|
63649
|
+
};
|
|
63540
63650
|
if (isRenderVirtualTable) {
|
|
63541
63651
|
var _props$data4, _props$data5;
|
|
63542
63652
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
@@ -63563,7 +63673,7 @@ var emptyRef = {
|
|
|
63563
63673
|
})), !!((_props$data5 = props.data) !== null && _props$data5 !== void 0 && _props$data5.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63564
63674
|
style: {
|
|
63565
63675
|
width: width,
|
|
63566
|
-
transform: virtualInfo.
|
|
63676
|
+
transform: virtualInfo.translateStyle
|
|
63567
63677
|
},
|
|
63568
63678
|
ref: tbodyRef,
|
|
63569
63679
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
|
|
@@ -63581,7 +63691,7 @@ var emptyRef = {
|
|
|
63581
63691
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63582
63692
|
})
|
|
63583
63693
|
}) : null, renderEmpty()]
|
|
63584
|
-
})]
|
|
63694
|
+
}), renderBottomMirrorScroller()]
|
|
63585
63695
|
});
|
|
63586
63696
|
}
|
|
63587
63697
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
@@ -63598,7 +63708,7 @@ var emptyRef = {
|
|
|
63598
63708
|
children: renderEmpty()
|
|
63599
63709
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63600
63710
|
})
|
|
63601
|
-
})]
|
|
63711
|
+
}), renderBottomMirrorScroller()]
|
|
63602
63712
|
});
|
|
63603
63713
|
};
|
|
63604
63714
|
var renderLoading = function renderLoading() {
|
|
@@ -66085,7 +66195,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66085
66195
|
if (from !== 'blur') {
|
|
66086
66196
|
focusAndOpen();
|
|
66087
66197
|
}
|
|
66088
|
-
onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text);
|
|
66198
|
+
onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text, from);
|
|
66089
66199
|
};
|
|
66090
66200
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
66091
66201
|
if (virtual && expanded) {
|
|
@@ -70004,7 +70114,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70004
70114
|
|
|
70005
70115
|
|
|
70006
70116
|
/* harmony default export */ var src_0 = ({
|
|
70007
|
-
version: '3.7.0-beta.
|
|
70117
|
+
version: '3.7.0-beta.7'
|
|
70008
70118
|
});
|
|
70009
70119
|
}();
|
|
70010
70120
|
/******/ return __webpack_exports__;
|