shineout 3.7.0-beta.9 → 3.7.0-fix.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/cascader/cascader.js +2 -1
- package/cjs/date-picker/date-picker.js +28 -1
- package/cjs/grid/grid.d.ts +6 -1
- package/cjs/grid/grid.js +20 -7
- package/cjs/grid/grid.type.d.ts +1 -1
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +9 -1
- package/cjs/select/select.js +2 -1
- package/cjs/skeleton/index.d.ts +7 -0
- package/cjs/skeleton/index.js +12 -0
- package/cjs/skeleton/interface.d.ts +1 -0
- package/cjs/skeleton/interface.js +5 -0
- package/cjs/skeleton/skeleton.d.ts +3 -0
- package/cjs/skeleton/skeleton.js +25 -0
- package/cjs/skeleton/skeleton.type.d.ts +5 -0
- package/cjs/skeleton/skeleton.type.js +5 -0
- package/cjs/tag/tag.type.d.ts +1 -1
- package/cjs/tree/tree.js +2 -1
- package/cjs/tree-select/tree-select.js +2 -1
- package/cjs/type.d.ts +1 -0
- package/cjs/type.js +3 -1
- package/dist/shineout.js +1675 -564
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/cascader/cascader.js +3 -2
- package/esm/date-picker/date-picker.js +29 -2
- package/esm/grid/grid.d.ts +6 -1
- package/esm/grid/grid.js +19 -1
- package/esm/grid/grid.type.d.ts +1 -1
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/select/select.js +3 -2
- package/esm/skeleton/index.d.ts +7 -0
- package/esm/skeleton/index.js +5 -0
- package/esm/skeleton/interface.d.ts +1 -0
- package/esm/skeleton/interface.js +1 -0
- package/esm/skeleton/skeleton.d.ts +3 -0
- package/esm/skeleton/skeleton.js +18 -0
- package/esm/skeleton/skeleton.type.d.ts +5 -0
- package/esm/skeleton/skeleton.type.js +1 -0
- package/esm/tag/tag.type.d.ts +1 -1
- package/esm/tree/tree.js +3 -2
- package/esm/tree-select/tree-select.js +3 -2
- package/esm/type.d.ts +1 -0
- package/esm/type.js +2 -0
- package/package.json +5 -5
package/dist/shineout.js
CHANGED
|
@@ -261,6 +261,13 @@ return /******/ (function() { // webpackBootstrap
|
|
|
261
261
|
|
|
262
262
|
|
|
263
263
|
|
|
264
|
+
/***/ }),
|
|
265
|
+
|
|
266
|
+
/***/ 6599:
|
|
267
|
+
/***/ (function() {
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
264
271
|
/***/ }),
|
|
265
272
|
|
|
266
273
|
/***/ 5864:
|
|
@@ -6427,7 +6434,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6427
6434
|
Empty: function() { return /* reexport */ src_empty_0; },
|
|
6428
6435
|
Form: function() { return /* reexport */ src_form_0; },
|
|
6429
6436
|
Gap: function() { return /* reexport */ src_gap_0; },
|
|
6430
|
-
Grid: function() { return /* reexport */
|
|
6437
|
+
Grid: function() { return /* reexport */ src_grid_0; },
|
|
6431
6438
|
Icon: function() { return /* reexport */ src_icon_0; },
|
|
6432
6439
|
Image: function() { return /* reexport */ src_image_0; },
|
|
6433
6440
|
Input: function() { return /* reexport */ src_input_0; },
|
|
@@ -6445,6 +6452,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6445
6452
|
Rule: function() { return /* reexport */ Rule; },
|
|
6446
6453
|
Select: function() { return /* reexport */ src_select_0; },
|
|
6447
6454
|
SheetsRegistry: function() { return /* reexport */ SheetsRegistry; },
|
|
6455
|
+
Skeleton: function() { return /* reexport */ src_skeleton_0; },
|
|
6448
6456
|
Slider: function() { return /* reexport */ src_slider_0; },
|
|
6449
6457
|
Spin: function() { return /* reexport */ src_spin_0; },
|
|
6450
6458
|
Steps: function() { return /* reexport */ src_steps_0; },
|
|
@@ -6723,6 +6731,7 @@ __webpack_require__.d(src_type_namespaceObject, {
|
|
|
6723
6731
|
Rate: function() { return rate_interface; },
|
|
6724
6732
|
Rule: function() { return rule_interface; },
|
|
6725
6733
|
Select: function() { return select_interface; },
|
|
6734
|
+
Skeleton: function() { return skeleton_interface; },
|
|
6726
6735
|
Slider: function() { return slider_interface; },
|
|
6727
6736
|
Spin: function() { return spin_interface; },
|
|
6728
6737
|
Steps: function() { return steps_interface; },
|
|
@@ -6967,7 +6976,7 @@ var expand = [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
|
6967
6976
|
clipRule: "evenodd",
|
|
6968
6977
|
d: "M19.5 2C20.8807 2 22 3.11929 22 4.5V19.5C22 20.8807 20.8807 22 19.5 22H4.5C3.11929 22 2 20.8807 2 19.5V4.5C2 3.11929 3.11929 2 4.5 2H19.5ZM19.5 4H4.5C4.22386 4 4 4.22386 4 4.5V19.5C4 19.7761 4.22386 20 4.5 20H19.5C19.7761 20 20 19.7761 20 19.5V4.5C20 4.22386 19.7761 4 19.5 4ZM16 11C16.5523 11 17 11.4477 17 12C17 12.5128 16.614 12.9355 16.1166 12.9933L16 13C10.701 13 12.6557 13 8 13C7.44772 13 7 12.5523 7 12C7 11.4872 7.38604 11.0645 7.88338 11.0067L8 11C12.5606 11 10.8111 11 16 11Z"
|
|
6969
6978
|
}, 0)];
|
|
6970
|
-
var pcHelpCircleFill = ['
|
|
6979
|
+
var pcHelpCircleFill = ['M12 1C14.9562 1 17.7292 2.17289 19.7782 4.22183C21.8271 6.27079 23 9.04381 23 12C23 14.9562 21.8271 17.7292 19.7782 19.7782C17.7292 21.8271 14.9562 23 12 23C9.04381 23 6.27079 21.8271 4.22182 19.7782C2.17289 17.7292 1 14.9562 1 12C1 9.04381 2.17289 6.27079 4.22183 4.22182C6.27079 2.17289 9.04381 1 12 1ZM12 16.3125C11.3097 16.3125 10.75 16.8721 10.75 17.5625C10.75 18.2528 11.3097 18.8125 12 18.8125C12.6903 18.8125 13.25 18.2528 13.25 17.5625C13.25 16.8721 12.6903 16.3125 12 16.3125ZM12 5.31245C9.79086 5.31245 8 7.10332 8 9.31245C8 9.86474 8.44772 10.3125 9 10.3125C9.55229 10.3125 10 9.86474 10 9.31245C10 8.20789 10.8954 7.31245 12 7.31245C13.1046 7.31245 14 8.20789 14 9.31245C14 10.417 13.1046 11.3125 12 11.3125L11.8834 11.3192C11.386 11.3769 11 11.7996 11 12.3125V14.3125L11.0067 14.4291C11.0645 14.9264 11.4872 15.3125 12 15.3125L12.1166 15.3057C12.614 15.248 13 14.8253 13 14.3125V13.185L13.1553 13.1431C14.8012 12.6474 16 11.1199 16 9.31245C16 7.10332 14.2091 5.31245 12 5.31245Z'];
|
|
6971
6980
|
var pcHelpCircleOutline = /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
|
|
6972
6981
|
fillRule: "evenodd",
|
|
6973
6982
|
clipRule: "evenodd",
|
|
@@ -7165,7 +7174,8 @@ var config = {
|
|
|
7165
7174
|
tree: {
|
|
7166
7175
|
LineExpand: icons.Expand,
|
|
7167
7176
|
LineCollapse: icons.Shrink,
|
|
7168
|
-
Expand: icons.ArrowDownFill
|
|
7177
|
+
Expand: icons.ArrowDownFill,
|
|
7178
|
+
Leaf: icons.File
|
|
7169
7179
|
},
|
|
7170
7180
|
treeSelect: {
|
|
7171
7181
|
More: icons.More,
|
|
@@ -7308,7 +7318,7 @@ var Alert = function Alert(props) {
|
|
|
7308
7318
|
};
|
|
7309
7319
|
var type = getType();
|
|
7310
7320
|
var alertStyle = (jssStyle === null || jssStyle === void 0 || (_jssStyle$alert = jssStyle.alert) === null || _jssStyle$alert === void 0 ? void 0 : _jssStyle$alert.call(jssStyle)) || {};
|
|
7311
|
-
var rootClass = classnames_default()(className, alertStyle.rootClass, alertStyle.alert, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, alertStyle[type], true), alertStyle.withTitle, title), alertStyle.pending, dismiss === PENDING), alertStyle.noBordered, bordered === false));
|
|
7321
|
+
var rootClass = classnames_default()(className, alertStyle.rootClass, alertStyle.alert, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, alertStyle[type], true), alertStyle.withTitle, title), alertStyle.pending, dismiss === PENDING), alertStyle.noBordered, bordered === false), alertStyle.noChildren, !children));
|
|
7312
7322
|
var getRootProps = function getRootProps() {
|
|
7313
7323
|
return rest;
|
|
7314
7324
|
};
|
|
@@ -12217,7 +12227,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12217
12227
|
};
|
|
12218
12228
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12219
12229
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12220
|
-
/* harmony default export */ var version = ('3.7.0-
|
|
12230
|
+
/* harmony default export */ var version = ('3.7.0-fix.2');
|
|
12221
12231
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12222
12232
|
|
|
12223
12233
|
|
|
@@ -14122,7 +14132,7 @@ var modalTokens = {
|
|
|
14122
14132
|
modalPanelRadius: 'Radius-default',
|
|
14123
14133
|
modalPanelFontSize: 'Font-14',
|
|
14124
14134
|
modalHeaderIconMarginEnd: 'Spacing-8',
|
|
14125
|
-
modalHeaderIconMarginTop: 'Spacing-
|
|
14135
|
+
modalHeaderIconMarginTop: 'Spacing-3',
|
|
14126
14136
|
modalHeaderIconSize: 'Size-9',
|
|
14127
14137
|
modalHeaderCloseMarginXStart: 'Spacing-16',
|
|
14128
14138
|
modalHeaderCloseSize: 'Size-8',
|
|
@@ -14423,6 +14433,24 @@ var selectTokens = {
|
|
|
14423
14433
|
|
|
14424
14434
|
|
|
14425
14435
|
/* harmony default export */ var src_select = (tokenToVars(select_select, token));
|
|
14436
|
+
;// CONCATENATED MODULE: ../theme/src/skeleton/skeleton.ts
|
|
14437
|
+
// 此文件由脚本自动生成,请勿直接修改。
|
|
14438
|
+
// This file was generated automatically by a script. Please do not modify it directly.
|
|
14439
|
+
|
|
14440
|
+
var skeletonTokens = {
|
|
14441
|
+
skeletonMargin: 'Spacing-12',
|
|
14442
|
+
skeletonHeight: 'Size-8',
|
|
14443
|
+
skeletonBackgroundColor: 'Neutral-fill-2',
|
|
14444
|
+
skeletonBackgroundRadius: 'Radius-default',
|
|
14445
|
+
skeletonAnimationFromColor: 'Neutral-fill-2',
|
|
14446
|
+
skeletonAnimationToColor: 'Neutral-fill-3'
|
|
14447
|
+
};
|
|
14448
|
+
/* harmony default export */ var skeleton = (skeletonTokens);
|
|
14449
|
+
;// CONCATENATED MODULE: ../theme/src/skeleton/index.ts
|
|
14450
|
+
|
|
14451
|
+
|
|
14452
|
+
|
|
14453
|
+
/* harmony default export */ var src_skeleton = (tokenToVars(skeleton, token));
|
|
14426
14454
|
;// CONCATENATED MODULE: ../theme/src/slider/slider.ts
|
|
14427
14455
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
14428
14456
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
@@ -15425,8 +15453,9 @@ var uploadTokens = {
|
|
|
15425
15453
|
|
|
15426
15454
|
|
|
15427
15455
|
|
|
15428
|
-
|
|
15429
|
-
var
|
|
15456
|
+
|
|
15457
|
+
var src_Tokens = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, token_token), src_alert), src_avatar), src_badge), src_breadcrumb), src_button), src_card), src_card_group), src_carousel), src_cascader), src_checkbox), src_collapse), src_common), src_date_picker), src_descriptions), src_divider), src_dropdown), src_editable_area), src_empty), src_form), src_icon), src_image), src_input), src_link), src_list), src_menu), src_message), src_modal), src_pagination), src_popover), src_progress), src_radio), src_rate), src_select), src_skeleton), src_slider), src_spin), src_steps), src_sticky), src_switch), src_table), src_tabs), src_tag), src_textarea), src_tooltip), src_transfer), src_tree), src_tree_select), src_upload);
|
|
15458
|
+
var ComponentTokenMap = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, src_alert_alert), avatar), badge), breadcrumb), button_button), card), card_group), carousel), cascader), checkbox_checkbox), collapse), common_common), date_picker), descriptions), divider), dropdown), editable_area), empty), form_form), icon_icon), image_image), input), link_link), list), menu), message), modal), pagination), popover), progress), radio_radio), rate), select_select), skeleton), slider), spin), steps), sticky), switch_switch), table), tabs), tag), textarea_textarea), tooltip), transfer), tree), tree_select), upload);
|
|
15430
15459
|
|
|
15431
15460
|
|
|
15432
15461
|
|
|
@@ -15593,6 +15622,11 @@ var alertStyle = {
|
|
|
15593
15622
|
noBordered: {
|
|
15594
15623
|
borderColor: 'transparent'
|
|
15595
15624
|
},
|
|
15625
|
+
noChildren: {
|
|
15626
|
+
'&&$confirmwarning': {
|
|
15627
|
+
marginBottom: 0
|
|
15628
|
+
}
|
|
15629
|
+
},
|
|
15596
15630
|
icon: {
|
|
15597
15631
|
width: src.alertIconSize,
|
|
15598
15632
|
display: 'inline-flex',
|
|
@@ -16151,7 +16185,6 @@ var ButtonStyle = {
|
|
|
16151
16185
|
borderRadius: src.buttonBorderRadius,
|
|
16152
16186
|
lineHeight: src.lineHeightDynamic,
|
|
16153
16187
|
padding: "".concat(src.buttonPaddingY, " ").concat(src.buttonPaddingX),
|
|
16154
|
-
transition: 'all .1s linear',
|
|
16155
16188
|
fontFamily: 'inherit',
|
|
16156
16189
|
// height: Token.buttonHeight,
|
|
16157
16190
|
|
|
@@ -16161,6 +16194,9 @@ var ButtonStyle = {
|
|
|
16161
16194
|
'[class*="button-group"] > & + &': {
|
|
16162
16195
|
margin: 0
|
|
16163
16196
|
},
|
|
16197
|
+
'&:hover': {
|
|
16198
|
+
transition: 'all .1s linear'
|
|
16199
|
+
},
|
|
16164
16200
|
'&:active': {
|
|
16165
16201
|
transition: 'none'
|
|
16166
16202
|
},
|
|
@@ -16663,10 +16699,13 @@ var cardGroupStyle = {
|
|
|
16663
16699
|
var useCardGroupStyle = styled(card_group_card_group, 'cardGroup');
|
|
16664
16700
|
|
|
16665
16701
|
/* harmony default export */ var shineout_style_src_card_group = ((/* unused pure expression or super */ null && (useCardGroupStyle)));
|
|
16666
|
-
;// CONCATENATED MODULE: ../shineout-style/src/
|
|
16667
|
-
|
|
16702
|
+
;// CONCATENATED MODULE: ../shineout-style/src/common/common.ts
|
|
16668
16703
|
|
|
16669
|
-
var
|
|
16704
|
+
var collapseStyle = {
|
|
16705
|
+
highlight: {
|
|
16706
|
+
color: src.tagWarningFontColor
|
|
16707
|
+
}
|
|
16708
|
+
};
|
|
16670
16709
|
var animations = {
|
|
16671
16710
|
'@keyframes r2c': {
|
|
16672
16711
|
'0%': {
|
|
@@ -16747,8 +16786,24 @@ var animations = {
|
|
|
16747
16786
|
'100%': {
|
|
16748
16787
|
opacity: 0
|
|
16749
16788
|
}
|
|
16789
|
+
},
|
|
16790
|
+
'@keyframes scale-y-top': {
|
|
16791
|
+
'0%': {
|
|
16792
|
+
opacity: 0,
|
|
16793
|
+
transform: 'translateY(-100%) scaleY(0)'
|
|
16794
|
+
},
|
|
16795
|
+
'100%': {
|
|
16796
|
+
opacity: 1,
|
|
16797
|
+
transform: 'translateY(-100%) scaleY(1)'
|
|
16798
|
+
}
|
|
16750
16799
|
}
|
|
16751
16800
|
};
|
|
16801
|
+
/* harmony default export */ var src_common_common = (collapseStyle);
|
|
16802
|
+
;// CONCATENATED MODULE: ../shineout-style/src/carousel/carousel.ts
|
|
16803
|
+
|
|
16804
|
+
|
|
16805
|
+
|
|
16806
|
+
var carouselDuration = '0.4s';
|
|
16752
16807
|
var carouselStyle = objectSpread2_default()(objectSpread2_default()({
|
|
16753
16808
|
rootClass: {}
|
|
16754
16809
|
}, animations), {}, {
|
|
@@ -17352,6 +17407,7 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17352
17407
|
display: 'flex',
|
|
17353
17408
|
flex: '1',
|
|
17354
17409
|
minWidth: 0,
|
|
17410
|
+
height: '100%',
|
|
17355
17411
|
alignItems: 'center',
|
|
17356
17412
|
lineHeight: src.lineHeightDynamic
|
|
17357
17413
|
},
|
|
@@ -17622,12 +17678,14 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17622
17678
|
visibility: 'hidden'
|
|
17623
17679
|
},
|
|
17624
17680
|
moreWrapper: {
|
|
17625
|
-
|
|
17626
|
-
// height: 72,
|
|
17681
|
+
width: 'max-content',
|
|
17627
17682
|
maxWidth: 400,
|
|
17628
17683
|
maxHeight: 160,
|
|
17629
17684
|
overflow: 'auto',
|
|
17630
|
-
padding: "".concat(src.cascaderMorePaddingY, " ").concat(src.cascaderMorePaddingX)
|
|
17685
|
+
padding: "".concat(src.cascaderMorePaddingY, " ").concat(src.cascaderMorePaddingX),
|
|
17686
|
+
'& $tag': {
|
|
17687
|
+
maxWidth: 'none'
|
|
17688
|
+
}
|
|
17631
17689
|
},
|
|
17632
17690
|
virtualList: {
|
|
17633
17691
|
margin: 0,
|
|
@@ -17895,7 +17953,7 @@ var useCheckboxStyle = styled(src_checkbox_checkbox, 'checkbox');
|
|
|
17895
17953
|
/* harmony default export */ var shineout_style_src_checkbox = ((/* unused pure expression or super */ null && (useCheckboxStyle)));
|
|
17896
17954
|
;// CONCATENATED MODULE: ../shineout-style/src/collapse/collapse.ts
|
|
17897
17955
|
|
|
17898
|
-
var
|
|
17956
|
+
var collapse_collapseStyle = {
|
|
17899
17957
|
rootClass: {},
|
|
17900
17958
|
wrapper: {
|
|
17901
17959
|
overflow: 'hidden',
|
|
@@ -17907,7 +17965,7 @@ var collapseStyle = {
|
|
|
17907
17965
|
border: 'none'
|
|
17908
17966
|
}
|
|
17909
17967
|
};
|
|
17910
|
-
/* harmony default export */ var collapse_collapse = (
|
|
17968
|
+
/* harmony default export */ var collapse_collapse = (collapse_collapseStyle);
|
|
17911
17969
|
;// CONCATENATED MODULE: ../shineout-style/src/collapse/collapse-item.ts
|
|
17912
17970
|
|
|
17913
17971
|
var collapseItemStyle = {
|
|
@@ -18055,11 +18113,18 @@ var useCollapseStyle = styled(collapse_collapse, 'collapse');
|
|
|
18055
18113
|
/* harmony default export */ var shineout_style_src_collapse = ((/* unused pure expression or super */ null && (useCollapseStyle)));
|
|
18056
18114
|
var useCollapseItemStyle = styled(collapse_item, 'collapseItem');
|
|
18057
18115
|
|
|
18116
|
+
;// CONCATENATED MODULE: ../shineout-style/src/common/index.ts
|
|
18117
|
+
|
|
18118
|
+
|
|
18119
|
+
var useCommonStyle = styled(src_common_common, 'common');
|
|
18120
|
+
|
|
18121
|
+
/* harmony default export */ var shineout_style_src_common = ((/* unused pure expression or super */ null && (useCommonStyle)));
|
|
18058
18122
|
;// CONCATENATED MODULE: ../shineout-style/src/date-picker/date-picker.ts
|
|
18059
18123
|
|
|
18060
18124
|
|
|
18061
18125
|
|
|
18062
18126
|
|
|
18127
|
+
|
|
18063
18128
|
var date_picker_inputBorderToken = {
|
|
18064
18129
|
lineHeight: src.lineHeightDynamic,
|
|
18065
18130
|
borderRadius: src.inputBorderRadius,
|
|
@@ -18105,8 +18170,9 @@ var date_picker_wrapper = date_picker_inputBorder.wrapper,
|
|
|
18105
18170
|
date_picker_resetWrapper = objectWithoutProperties_default()(date_picker_inputBorder, ["wrapper", "wrapperDisabled"]);
|
|
18106
18171
|
var leftCircleBackground = "radial-gradient(circle closest-side, ".concat(src.datePickerCellRangeBackgroundColor, " 100%, transparent 0%),\nlinear-gradient(to right, transparent 0%,transparent 50%, ").concat(src.datePickerCellRangeBackgroundColor, " 50%, ").concat(src.datePickerCellRangeBackgroundColor, " 100%)\n");
|
|
18107
18172
|
var rightCircleBackground = "radial-gradient(circle closest-side, ".concat(src.datePickerCellRangeBackgroundColor, " 100%, transparent 0%),\nlinear-gradient(to left, transparent 0%,transparent 50%, ").concat(src.datePickerCellRangeBackgroundColor, " 50%, ").concat(src.datePickerCellRangeBackgroundColor, " 100%)\n");
|
|
18108
|
-
var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
18109
|
-
rootClass: {}
|
|
18173
|
+
var datePickerStyle = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
18174
|
+
rootClass: {}
|
|
18175
|
+
}, animations), {}, {
|
|
18110
18176
|
wrapper: objectSpread2_default()({
|
|
18111
18177
|
display: 'inline-block',
|
|
18112
18178
|
position: 'relative',
|
|
@@ -18724,24 +18790,15 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
18724
18790
|
'&[dir=rtl]': {
|
|
18725
18791
|
right: 0
|
|
18726
18792
|
},
|
|
18727
|
-
|
|
18793
|
+
transformOrigin: 'bottom',
|
|
18794
|
+
animation: '$scale-y-top 0.2s ease-in-out forwards',
|
|
18728
18795
|
backgroundColor: src.datePickerPanelBackgroundColor,
|
|
18729
18796
|
boxShadow: src.datePickerPanelShadow,
|
|
18730
|
-
|
|
18731
|
-
zIndex: '-1',
|
|
18732
|
-
visibility: 'hidden'
|
|
18797
|
+
display: 'none'
|
|
18733
18798
|
},
|
|
18734
18799
|
'&:hover $timePicker': {
|
|
18735
18800
|
zIndex: '1',
|
|
18736
|
-
|
|
18737
|
-
visibility: 'visible'
|
|
18738
|
-
}
|
|
18739
|
-
},
|
|
18740
|
-
datetimeHide: {
|
|
18741
|
-
opacity: '0',
|
|
18742
|
-
pointerEvents: 'none',
|
|
18743
|
-
'& > span': {
|
|
18744
|
-
display: 'none'
|
|
18801
|
+
display: 'block'
|
|
18745
18802
|
}
|
|
18746
18803
|
},
|
|
18747
18804
|
quickPicker: {
|
|
@@ -19615,6 +19672,30 @@ var gapStyle = {
|
|
|
19615
19672
|
var useGapStyle = styled(gap, 'gap');
|
|
19616
19673
|
|
|
19617
19674
|
/* harmony default export */ var src_gap = ((/* unused pure expression or super */ null && (useGapStyle)));
|
|
19675
|
+
;// CONCATENATED MODULE: ../shineout-style/src/grid/grid.ts
|
|
19676
|
+
var grid_gridStyle = {
|
|
19677
|
+
rootClass: {},
|
|
19678
|
+
wrapper: {
|
|
19679
|
+
position: 'relative',
|
|
19680
|
+
display: 'inline-block',
|
|
19681
|
+
zoom: 1,
|
|
19682
|
+
letterSpacing: 'normal',
|
|
19683
|
+
wordSpacing: 'normal',
|
|
19684
|
+
verticalAlign: 'top',
|
|
19685
|
+
textRendering: 'auto',
|
|
19686
|
+
boxSizing: 'border-box'
|
|
19687
|
+
},
|
|
19688
|
+
full: {
|
|
19689
|
+
width: '100%'
|
|
19690
|
+
}
|
|
19691
|
+
};
|
|
19692
|
+
/* harmony default export */ var grid = (grid_gridStyle);
|
|
19693
|
+
;// CONCATENATED MODULE: ../shineout-style/src/grid/index.ts
|
|
19694
|
+
|
|
19695
|
+
|
|
19696
|
+
var useGridStyle = styled(grid, 'grid');
|
|
19697
|
+
|
|
19698
|
+
/* harmony default export */ var src_grid = ((/* unused pure expression or super */ null && (gridStyle)));
|
|
19618
19699
|
;// CONCATENATED MODULE: ../shineout-style/src/icon/icon.ts
|
|
19619
19700
|
|
|
19620
19701
|
var icon_form = {
|
|
@@ -19758,9 +19839,14 @@ var ImageStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
19758
19839
|
},
|
|
19759
19840
|
fill: {
|
|
19760
19841
|
'& $inner': {
|
|
19761
|
-
|
|
19762
|
-
|
|
19763
|
-
|
|
19842
|
+
'& > img': {
|
|
19843
|
+
position: 'absolute',
|
|
19844
|
+
top: '50%',
|
|
19845
|
+
left: '50%',
|
|
19846
|
+
transform: 'translate(-50%, -50%)',
|
|
19847
|
+
maxWidth: 'none',
|
|
19848
|
+
maxHeight: 'none'
|
|
19849
|
+
}
|
|
19764
19850
|
}
|
|
19765
19851
|
},
|
|
19766
19852
|
previewMask: {
|
|
@@ -20757,6 +20843,9 @@ var listStyle = {
|
|
|
20757
20843
|
alignItems: 'center',
|
|
20758
20844
|
justifyContent: 'center'
|
|
20759
20845
|
},
|
|
20846
|
+
loadingBottom: {
|
|
20847
|
+
padding: 16
|
|
20848
|
+
},
|
|
20760
20849
|
empty: {
|
|
20761
20850
|
display: 'flex',
|
|
20762
20851
|
justifyContent: 'center',
|
|
@@ -21758,9 +21847,6 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
21758
21847
|
height: '100vh',
|
|
21759
21848
|
width: '100vw',
|
|
21760
21849
|
overflow: 'auto'
|
|
21761
|
-
},
|
|
21762
|
-
'& $body': {
|
|
21763
|
-
minHeight: 'auto'
|
|
21764
21850
|
}
|
|
21765
21851
|
},
|
|
21766
21852
|
wrapperZoom: {
|
|
@@ -22733,7 +22819,11 @@ var radioStyle = {
|
|
|
22733
22819
|
marginRight: 0
|
|
22734
22820
|
}
|
|
22735
22821
|
},
|
|
22736
|
-
wrapperSmall: {
|
|
22822
|
+
wrapperSmall: {
|
|
22823
|
+
'[data-soui-role="form-control"] > $group > &': {
|
|
22824
|
+
marginTop: 1
|
|
22825
|
+
}
|
|
22826
|
+
},
|
|
22737
22827
|
wrapperLarge: {},
|
|
22738
22828
|
wrapperChecked: {},
|
|
22739
22829
|
wrapperDisabled: {
|
|
@@ -22744,13 +22834,16 @@ var radioStyle = {
|
|
|
22744
22834
|
position: 'relative',
|
|
22745
22835
|
boxSizing: 'border-box',
|
|
22746
22836
|
width: src.radioIconWidth,
|
|
22837
|
+
minWidth: src.radioIconWidth,
|
|
22747
22838
|
height: src.radioIconWidth,
|
|
22748
22839
|
'$wrapperSmall &': {
|
|
22749
22840
|
width: src.radioSmallIconWidth,
|
|
22841
|
+
minWidth: src.radioSmallIconWidth,
|
|
22750
22842
|
height: src.radioSmallIconWidth
|
|
22751
22843
|
},
|
|
22752
22844
|
'$wrapperLarge &': {
|
|
22753
22845
|
width: src.radioLargeIconWidth,
|
|
22846
|
+
minWidth: src.radioLargeIconWidth,
|
|
22754
22847
|
height: src.radioLargeIconWidth
|
|
22755
22848
|
},
|
|
22756
22849
|
marginRight: src.radioIconGap,
|
|
@@ -23151,6 +23244,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23151
23244
|
result: {
|
|
23152
23245
|
display: 'flex',
|
|
23153
23246
|
flex: '1',
|
|
23247
|
+
height: '100%',
|
|
23154
23248
|
minWidth: 0,
|
|
23155
23249
|
alignItems: 'center',
|
|
23156
23250
|
lineHeight: src.lineHeightDynamic
|
|
@@ -23430,10 +23524,14 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23430
23524
|
visibility: 'hidden'
|
|
23431
23525
|
},
|
|
23432
23526
|
moreWrapper: {
|
|
23527
|
+
width: 'max-content',
|
|
23433
23528
|
maxWidth: 400,
|
|
23434
23529
|
maxHeight: 160,
|
|
23435
23530
|
overflow: 'auto',
|
|
23436
23531
|
padding: "".concat(src.selectMorePaddingY, " ").concat(src.selectMorePaddingX),
|
|
23532
|
+
'& $tag': {
|
|
23533
|
+
maxWidth: 'none'
|
|
23534
|
+
},
|
|
23437
23535
|
'&:hover': {
|
|
23438
23536
|
'& $clearIcon': {
|
|
23439
23537
|
display: 'inline-block'
|
|
@@ -23588,6 +23686,113 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23588
23686
|
var useSelectStyle = styled(src_select_select, 'select');
|
|
23589
23687
|
|
|
23590
23688
|
/* harmony default export */ var shineout_style_src_select = ((/* unused pure expression or super */ null && (useSelectStyle)));
|
|
23689
|
+
;// CONCATENATED MODULE: ../shineout-style/src/skeleton/skeleton.ts
|
|
23690
|
+
|
|
23691
|
+
// import token from '@sheinx/theme';
|
|
23692
|
+
|
|
23693
|
+
|
|
23694
|
+
var skeleton_animation = {
|
|
23695
|
+
'@keyframes skeleton-animation': {
|
|
23696
|
+
'0%': {
|
|
23697
|
+
backgroundPosition: '100% 50%'
|
|
23698
|
+
},
|
|
23699
|
+
'100%': {
|
|
23700
|
+
backgroundPosition: '0 50%'
|
|
23701
|
+
}
|
|
23702
|
+
}
|
|
23703
|
+
};
|
|
23704
|
+
var skeletonStyle = objectSpread2_default()(objectSpread2_default()({}, skeleton_animation), {}, {
|
|
23705
|
+
rootClass: {},
|
|
23706
|
+
wrapper: {
|
|
23707
|
+
display: 'flex'
|
|
23708
|
+
},
|
|
23709
|
+
animation: {
|
|
23710
|
+
'& $textItem, & $image, & $buttonItem': {
|
|
23711
|
+
background: "linear-gradient(90deg, ".concat(src.skeletonAnimationFromColor, " 25%, ").concat(src.skeletonAnimationToColor, " 37%, ").concat(src.skeletonAnimationFromColor, " 63%)"),
|
|
23712
|
+
backgroundSize: '400% 100%',
|
|
23713
|
+
animation: '$skeleton-animation 1.4s ease infinite'
|
|
23714
|
+
}
|
|
23715
|
+
},
|
|
23716
|
+
content: {
|
|
23717
|
+
flex: 1,
|
|
23718
|
+
minWidth: 0
|
|
23719
|
+
},
|
|
23720
|
+
text: {
|
|
23721
|
+
margin: 0,
|
|
23722
|
+
padding: 0,
|
|
23723
|
+
listStyle: 'none'
|
|
23724
|
+
},
|
|
23725
|
+
textItem: {
|
|
23726
|
+
height: src.skeletonHeight,
|
|
23727
|
+
marginBottom: src.skeletonMargin,
|
|
23728
|
+
backgroundColor: src.skeletonBackgroundColor,
|
|
23729
|
+
borderRadius: src.skeletonBackgroundRadius,
|
|
23730
|
+
'&:last-child': {
|
|
23731
|
+
marginBottom: 0
|
|
23732
|
+
}
|
|
23733
|
+
},
|
|
23734
|
+
image: {
|
|
23735
|
+
width: 48,
|
|
23736
|
+
height: 48,
|
|
23737
|
+
backgroundColor: src.skeletonBackgroundColor
|
|
23738
|
+
},
|
|
23739
|
+
imageLeft: {
|
|
23740
|
+
marginRight: src.skeletonMargin
|
|
23741
|
+
},
|
|
23742
|
+
imageRight: {
|
|
23743
|
+
marginLeft: src.skeletonMargin
|
|
23744
|
+
},
|
|
23745
|
+
imageCircle: {
|
|
23746
|
+
borderRadius: '50%'
|
|
23747
|
+
},
|
|
23748
|
+
imageSquare: {
|
|
23749
|
+
borderRadius: src.skeletonBackgroundRadius
|
|
23750
|
+
},
|
|
23751
|
+
imageSmall: {
|
|
23752
|
+
width: 32,
|
|
23753
|
+
height: 32
|
|
23754
|
+
},
|
|
23755
|
+
imageLarge: {
|
|
23756
|
+
width: 64,
|
|
23757
|
+
height: 64
|
|
23758
|
+
},
|
|
23759
|
+
button: {
|
|
23760
|
+
display: 'flex',
|
|
23761
|
+
'$text + &': {
|
|
23762
|
+
marginTop: src.skeletonMargin
|
|
23763
|
+
}
|
|
23764
|
+
},
|
|
23765
|
+
buttonItem: {
|
|
23766
|
+
width: 80,
|
|
23767
|
+
height: 32,
|
|
23768
|
+
backgroundColor: src.skeletonBackgroundColor,
|
|
23769
|
+
borderRadius: src.skeletonBackgroundRadius,
|
|
23770
|
+
'& + &': {
|
|
23771
|
+
marginLeft: src.skeletonMargin
|
|
23772
|
+
}
|
|
23773
|
+
},
|
|
23774
|
+
buttonLeft: {
|
|
23775
|
+
justifyContent: 'flex-start'
|
|
23776
|
+
},
|
|
23777
|
+
buttonRight: {
|
|
23778
|
+
justifyContent: 'flex-end'
|
|
23779
|
+
},
|
|
23780
|
+
buttonSmall: {
|
|
23781
|
+
width: 64,
|
|
23782
|
+
height: 24
|
|
23783
|
+
},
|
|
23784
|
+
buttonLarge: {
|
|
23785
|
+
width: 96,
|
|
23786
|
+
height: 40
|
|
23787
|
+
}
|
|
23788
|
+
});
|
|
23789
|
+
/* harmony default export */ var skeleton_skeleton = (skeletonStyle);
|
|
23790
|
+
;// CONCATENATED MODULE: ../shineout-style/src/skeleton/index.ts
|
|
23791
|
+
|
|
23792
|
+
|
|
23793
|
+
var useSkeletonStyle = styled(skeleton_skeleton, 'skeleton');
|
|
23794
|
+
|
|
23795
|
+
/* harmony default export */ var shineout_style_src_skeleton = ((/* unused pure expression or super */ null && (useSkeletonStyle)));
|
|
23591
23796
|
;// CONCATENATED MODULE: ../shineout-style/src/slider/slider.ts
|
|
23592
23797
|
|
|
23593
23798
|
var verticalLabelMargin = 4;
|
|
@@ -25484,7 +25689,10 @@ var switchStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25484
25689
|
padding: "".concat(src.switchSmallPaddingY, " ").concat(src.switchSmallPaddingX),
|
|
25485
25690
|
minWidth: src.switchSmallWidth,
|
|
25486
25691
|
borderRadius: "calc( ".concat(src.switchSmallCircleSize, " / 2 + ").concat(src.switchSmallPaddingY, " )"),
|
|
25487
|
-
fontSize: src.switchSmallFontSize
|
|
25692
|
+
fontSize: src.switchSmallFontSize,
|
|
25693
|
+
'[data-soui-role="form-control"] > &': {
|
|
25694
|
+
marginTop: 8
|
|
25695
|
+
}
|
|
25488
25696
|
},
|
|
25489
25697
|
'$wrapperLarge&': {
|
|
25490
25698
|
height: "calc( ".concat(src.switchLargeCircleSize, " + ").concat(src.switchLargePaddingY, " * 2 )"),
|
|
@@ -25632,9 +25840,19 @@ var switchStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25632
25840
|
var useSwitchStyle = styled(src_switch_switch, 'switch');
|
|
25633
25841
|
|
|
25634
25842
|
/* harmony default export */ var shineout_style_src_switch = ((/* unused pure expression or super */ null && (useSwitchStyle)));
|
|
25843
|
+
;// CONCATENATED MODULE: ../shineout-style/src/mixin/custom-scrollbar.ts
|
|
25844
|
+
function customScrollBar(info) {
|
|
25845
|
+
return {
|
|
25846
|
+
'scrollbar-color': info.background,
|
|
25847
|
+
'&::-webkit-scrollbar': {
|
|
25848
|
+
background: info.background
|
|
25849
|
+
}
|
|
25850
|
+
};
|
|
25851
|
+
}
|
|
25635
25852
|
;// CONCATENATED MODULE: ../shineout-style/src/table/table.ts
|
|
25636
25853
|
|
|
25637
25854
|
|
|
25855
|
+
|
|
25638
25856
|
var cellBaseIndex = 4;
|
|
25639
25857
|
var fixedIndex = 6;
|
|
25640
25858
|
var resizeIndex = 8;
|
|
@@ -25836,7 +26054,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25836
26054
|
'$wrapper & table > tfoot': {
|
|
25837
26055
|
position: 'sticky',
|
|
25838
26056
|
bottom: 0,
|
|
25839
|
-
zIndex:
|
|
26057
|
+
zIndex: fixedFixedIndex + 1
|
|
25840
26058
|
}
|
|
25841
26059
|
},
|
|
25842
26060
|
footWrapper: {
|
|
@@ -25849,6 +26067,23 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25849
26067
|
zIndex: fixedIndex + 1
|
|
25850
26068
|
}
|
|
25851
26069
|
},
|
|
26070
|
+
scrollY: {
|
|
26071
|
+
'&$headWrapper, &$footWrapper': objectSpread2_default()({
|
|
26072
|
+
overflow: 'hidden scroll'
|
|
26073
|
+
}, customScrollBar({
|
|
26074
|
+
background: 'transparent'
|
|
26075
|
+
}))
|
|
26076
|
+
},
|
|
26077
|
+
scrollX: {
|
|
26078
|
+
'&$headWrapper, &$footWrapper': {
|
|
26079
|
+
overflowX: 'hidden'
|
|
26080
|
+
}
|
|
26081
|
+
},
|
|
26082
|
+
emptyHeader: {
|
|
26083
|
+
position: 'sticky',
|
|
26084
|
+
top: 0,
|
|
26085
|
+
zIndex: 1
|
|
26086
|
+
},
|
|
25852
26087
|
emptyWrapper: {
|
|
25853
26088
|
minHeight: '170px',
|
|
25854
26089
|
width: '100%',
|
|
@@ -25857,6 +26092,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
25857
26092
|
left: 0,
|
|
25858
26093
|
top: 0,
|
|
25859
26094
|
justifyContent: 'center',
|
|
26095
|
+
textAlign: 'center',
|
|
25860
26096
|
display: 'flex',
|
|
25861
26097
|
alignItems: 'center',
|
|
25862
26098
|
borderBottom: "1px solid ".concat(src.tableCellBorderColor)
|
|
@@ -27956,10 +28192,26 @@ var useTransferStyle = styled(transfer_transfer, 'transfer');
|
|
|
27956
28192
|
/* harmony default export */ var shineout_style_src_transfer = ((/* unused pure expression or super */ null && (useTransferStyle)));
|
|
27957
28193
|
;// CONCATENATED MODULE: ../shineout-style/src/tree/tree.ts
|
|
27958
28194
|
|
|
28195
|
+
var childNodeMarginLeft = 12;
|
|
27959
28196
|
var treeStyle = {
|
|
27960
28197
|
rootClass: {},
|
|
27961
28198
|
tree: {},
|
|
27962
28199
|
virtual: {},
|
|
28200
|
+
sizeSmall: {
|
|
28201
|
+
'&$line $node': {
|
|
28202
|
+
'&:last-child': {
|
|
28203
|
+
'&::before': {
|
|
28204
|
+
top: 0,
|
|
28205
|
+
height: 14
|
|
28206
|
+
}
|
|
28207
|
+
},
|
|
28208
|
+
'&::before': {
|
|
28209
|
+
top: -2,
|
|
28210
|
+
height: 'calc(100% + 2px)'
|
|
28211
|
+
}
|
|
28212
|
+
}
|
|
28213
|
+
},
|
|
28214
|
+
sizeLarge: {},
|
|
27963
28215
|
notTree: {
|
|
27964
28216
|
'&$root > $node$leaf': {
|
|
27965
28217
|
paddingLeft: 0
|
|
@@ -27969,6 +28221,19 @@ var treeStyle = {
|
|
|
27969
28221
|
}
|
|
27970
28222
|
},
|
|
27971
28223
|
line: {
|
|
28224
|
+
'&$virtual $node': {
|
|
28225
|
+
'&::before, &::after': {
|
|
28226
|
+
display: 'none'
|
|
28227
|
+
}
|
|
28228
|
+
},
|
|
28229
|
+
'&$virtual $leaf $contentWrapper': {
|
|
28230
|
+
marginLeft: 12
|
|
28231
|
+
},
|
|
28232
|
+
'&$virtual $leaf $contentWrapper, &$virtual $childnode$contentWrapper': {
|
|
28233
|
+
'&::after': {
|
|
28234
|
+
display: 'none'
|
|
28235
|
+
}
|
|
28236
|
+
},
|
|
27972
28237
|
'& $node': {
|
|
27973
28238
|
'&[dir=ltr]::before': {
|
|
27974
28239
|
left: 0
|
|
@@ -27983,26 +28248,6 @@ var treeStyle = {
|
|
|
27983
28248
|
height: 'calc(100% + 6px)',
|
|
27984
28249
|
width: 1,
|
|
27985
28250
|
background: src.treeLineBackgroundColor
|
|
27986
|
-
},
|
|
27987
|
-
'&[dir=ltr]::after': {
|
|
27988
|
-
left: 0
|
|
27989
|
-
},
|
|
27990
|
-
'&[dir=rtl]::after': {
|
|
27991
|
-
right: 0
|
|
27992
|
-
},
|
|
27993
|
-
'&::after': {
|
|
27994
|
-
content: '""',
|
|
27995
|
-
position: 'absolute',
|
|
27996
|
-
top: 18,
|
|
27997
|
-
height: 1,
|
|
27998
|
-
width: 16,
|
|
27999
|
-
background: src.treeLineBackgroundColor
|
|
28000
|
-
}
|
|
28001
|
-
},
|
|
28002
|
-
'& $node:first-child': {},
|
|
28003
|
-
'& $node:first-child:last-child': {
|
|
28004
|
-
'&::before,&::after': {
|
|
28005
|
-
display: 'none'
|
|
28006
28251
|
}
|
|
28007
28252
|
},
|
|
28008
28253
|
'& $node:last-child': {
|
|
@@ -28013,19 +28258,123 @@ var treeStyle = {
|
|
|
28013
28258
|
},
|
|
28014
28259
|
'& $contentWrapper': {},
|
|
28015
28260
|
'& $iconWrapper': {
|
|
28261
|
+
width: 24,
|
|
28016
28262
|
'&[dir=ltr]': {
|
|
28017
|
-
left:
|
|
28263
|
+
left: -24
|
|
28018
28264
|
},
|
|
28019
28265
|
'&[dir=rtl]': {
|
|
28020
|
-
right:
|
|
28021
|
-
},
|
|
28022
|
-
width: 24,
|
|
28023
|
-
'& $icon': {
|
|
28024
|
-
// width: 16,
|
|
28266
|
+
right: -24
|
|
28025
28267
|
}
|
|
28026
28268
|
},
|
|
28027
28269
|
'& $childnode': {
|
|
28028
|
-
marginLeft:
|
|
28270
|
+
marginLeft: childNodeMarginLeft,
|
|
28271
|
+
'&$contentWrapper': {
|
|
28272
|
+
position: 'relative',
|
|
28273
|
+
'&::after': {
|
|
28274
|
+
content: '""',
|
|
28275
|
+
position: 'absolute',
|
|
28276
|
+
top: 18,
|
|
28277
|
+
left: 0,
|
|
28278
|
+
marginLeft: -24,
|
|
28279
|
+
transform: 'translate(-100%, 0)',
|
|
28280
|
+
height: 1,
|
|
28281
|
+
width: 16,
|
|
28282
|
+
background: src.treeLineBackgroundColor
|
|
28283
|
+
}
|
|
28284
|
+
}
|
|
28285
|
+
},
|
|
28286
|
+
'& $leaf': {
|
|
28287
|
+
'& $contentWrapper': {
|
|
28288
|
+
position: 'relative',
|
|
28289
|
+
'&::after': {
|
|
28290
|
+
content: '""',
|
|
28291
|
+
position: 'absolute',
|
|
28292
|
+
top: 18,
|
|
28293
|
+
left: 0,
|
|
28294
|
+
marginLeft: -24,
|
|
28295
|
+
transform: 'translate(-100%, 0)',
|
|
28296
|
+
height: 1,
|
|
28297
|
+
width: 16,
|
|
28298
|
+
background: src.treeLineBackgroundColor
|
|
28299
|
+
}
|
|
28300
|
+
}
|
|
28301
|
+
},
|
|
28302
|
+
'& $childnode[dir=rtl]': {
|
|
28303
|
+
'&$contentWrapper': {
|
|
28304
|
+
'&::after': {
|
|
28305
|
+
top: '50%',
|
|
28306
|
+
right: 0,
|
|
28307
|
+
transform: 'translate(100%, -50%)'
|
|
28308
|
+
}
|
|
28309
|
+
}
|
|
28310
|
+
},
|
|
28311
|
+
'&$sizeSmall': {
|
|
28312
|
+
'& $contentWrapper::after': {
|
|
28313
|
+
display: 'none'
|
|
28314
|
+
}
|
|
28315
|
+
},
|
|
28316
|
+
'&$sizeLarge': {
|
|
28317
|
+
'& $node:last-child::before': {
|
|
28318
|
+
height: 21
|
|
28319
|
+
},
|
|
28320
|
+
'& $iconWrapper': {
|
|
28321
|
+
'&[dir=ltr]': {
|
|
28322
|
+
left: -32
|
|
28323
|
+
},
|
|
28324
|
+
'&[dir=rtl]': {
|
|
28325
|
+
right: -32
|
|
28326
|
+
}
|
|
28327
|
+
},
|
|
28328
|
+
'&:not($virtual) $childnode, &:not($virtual) $leaf': {
|
|
28329
|
+
marginLeft: 20
|
|
28330
|
+
},
|
|
28331
|
+
'': {
|
|
28332
|
+
marginLeft: 20
|
|
28333
|
+
},
|
|
28334
|
+
'& $node': {
|
|
28335
|
+
paddingLeft: 32,
|
|
28336
|
+
'&[dir=ltr]::before': {
|
|
28337
|
+
left: 4
|
|
28338
|
+
},
|
|
28339
|
+
'&[dir=rtl]::before': {
|
|
28340
|
+
right: 4
|
|
28341
|
+
},
|
|
28342
|
+
'&::before': {
|
|
28343
|
+
top: -4,
|
|
28344
|
+
height: 'calc(100% + 4px)'
|
|
28345
|
+
}
|
|
28346
|
+
},
|
|
28347
|
+
'& $node$leaf': {
|
|
28348
|
+
'&[dir=ltr]::before': {
|
|
28349
|
+
left: -16
|
|
28350
|
+
},
|
|
28351
|
+
'&[dir=rtl]::before': {
|
|
28352
|
+
right: -16
|
|
28353
|
+
},
|
|
28354
|
+
'&::after': {
|
|
28355
|
+
left: -14
|
|
28356
|
+
}
|
|
28357
|
+
},
|
|
28358
|
+
'& > $root > $node': {
|
|
28359
|
+
paddingLeft: 12
|
|
28360
|
+
},
|
|
28361
|
+
'& $leaf $contentWrapper::after': {
|
|
28362
|
+
left: -24,
|
|
28363
|
+
top: 21,
|
|
28364
|
+
transform: 'translate(0, -50%)'
|
|
28365
|
+
},
|
|
28366
|
+
'& $contentWrapper$childnode::after': {
|
|
28367
|
+
top: 21,
|
|
28368
|
+
marginLeft: -32
|
|
28369
|
+
}
|
|
28370
|
+
},
|
|
28371
|
+
'& > $root > $node': {
|
|
28372
|
+
paddingLeft: 12,
|
|
28373
|
+
'& > $contentWrapper': {
|
|
28374
|
+
'&::after': {
|
|
28375
|
+
display: 'none'
|
|
28376
|
+
}
|
|
28377
|
+
}
|
|
28029
28378
|
}
|
|
28030
28379
|
},
|
|
28031
28380
|
noline: {
|
|
@@ -28059,30 +28408,29 @@ var treeStyle = {
|
|
|
28059
28408
|
'& > $node': {
|
|
28060
28409
|
paddingLeft: 24
|
|
28061
28410
|
}
|
|
28411
|
+
},
|
|
28412
|
+
'&$sizeLarge': {
|
|
28413
|
+
'& > $root > $node, & $node$leaf': {
|
|
28414
|
+
paddingLeft: 32
|
|
28415
|
+
}
|
|
28416
|
+
}
|
|
28417
|
+
},
|
|
28418
|
+
lineIndent: {
|
|
28419
|
+
position: 'absolute',
|
|
28420
|
+
top: 0,
|
|
28421
|
+
width: 1,
|
|
28422
|
+
height: '100%',
|
|
28423
|
+
background: src.treeLineBackgroundColor,
|
|
28424
|
+
'$sizeLarge &': {
|
|
28425
|
+
transform: 'translateX(-4px)'
|
|
28062
28426
|
}
|
|
28063
28427
|
},
|
|
28064
28428
|
root: {
|
|
28065
|
-
// '& > :first-child$node': {
|
|
28066
|
-
// '&::before': {
|
|
28067
|
-
// top: 18,
|
|
28068
|
-
// },
|
|
28069
|
-
// },
|
|
28070
|
-
// '& > :last-child$node': {
|
|
28071
|
-
// '&::before': {},
|
|
28072
|
-
// },
|
|
28073
28429
|
'& > $node': {
|
|
28074
28430
|
paddingLeft: 12,
|
|
28075
28431
|
'&$leaf': {
|
|
28076
28432
|
paddingLeft: 24
|
|
28077
28433
|
},
|
|
28078
|
-
'& > $contentWrapper > $iconWrapper': {
|
|
28079
|
-
'&[dir=ltr]': {
|
|
28080
|
-
left: 0
|
|
28081
|
-
},
|
|
28082
|
-
'&[dir=rtl]': {
|
|
28083
|
-
right: 0
|
|
28084
|
-
}
|
|
28085
|
-
},
|
|
28086
28434
|
'&::before': {
|
|
28087
28435
|
display: 'none'
|
|
28088
28436
|
},
|
|
@@ -28096,7 +28444,13 @@ var treeStyle = {
|
|
|
28096
28444
|
contentWrapper: {
|
|
28097
28445
|
display: 'flex',
|
|
28098
28446
|
alignItems: 'flex-start',
|
|
28099
|
-
padding: '5px 0'
|
|
28447
|
+
padding: '5px 0',
|
|
28448
|
+
'$sizeSmall &': {
|
|
28449
|
+
padding: '1px 0'
|
|
28450
|
+
},
|
|
28451
|
+
'$sizeLarge & $text': {
|
|
28452
|
+
lineHeight: '28px'
|
|
28453
|
+
}
|
|
28100
28454
|
},
|
|
28101
28455
|
inlineContent: {
|
|
28102
28456
|
display: 'inline-flex'
|
|
@@ -28117,15 +28471,6 @@ var treeStyle = {
|
|
|
28117
28471
|
display: 'flex',
|
|
28118
28472
|
alignItems: 'center',
|
|
28119
28473
|
marginLeft: 4,
|
|
28120
|
-
// 'label&': {
|
|
28121
|
-
// cursor: 'pointer',
|
|
28122
|
-
// userSelect: 'none',
|
|
28123
|
-
// },
|
|
28124
|
-
|
|
28125
|
-
// '$iconWrapper + &': {
|
|
28126
|
-
// marginLeft: 4,
|
|
28127
|
-
// },
|
|
28128
|
-
|
|
28129
28474
|
'$contentDisabled &': {
|
|
28130
28475
|
'& $text': {
|
|
28131
28476
|
color: src.treeContentDisabledFontColor
|
|
@@ -28142,7 +28487,11 @@ var treeStyle = {
|
|
|
28142
28487
|
checkbox: {
|
|
28143
28488
|
'&[class*="checkbox-wrapper"]': {
|
|
28144
28489
|
height: 26,
|
|
28490
|
+
alignSelf: 'flex-start',
|
|
28145
28491
|
marginRight: src.treeCheckboxMarginX
|
|
28492
|
+
},
|
|
28493
|
+
'$sizeLarge &': {
|
|
28494
|
+
marginTop: 4
|
|
28146
28495
|
}
|
|
28147
28496
|
},
|
|
28148
28497
|
text: {
|
|
@@ -28161,19 +28510,30 @@ var treeStyle = {
|
|
|
28161
28510
|
background: src.treeContentHoverBackgroundColor
|
|
28162
28511
|
}
|
|
28163
28512
|
},
|
|
28164
|
-
// textDisabled: {
|
|
28165
|
-
// color: Token.treeItemDisabledFontColor,
|
|
28166
|
-
// },
|
|
28167
28513
|
list: {},
|
|
28168
28514
|
node: {
|
|
28169
28515
|
position: 'relative',
|
|
28170
28516
|
paddingLeft: 28,
|
|
28171
|
-
'
|
|
28172
|
-
paddingLeft:
|
|
28173
|
-
'
|
|
28174
|
-
|
|
28517
|
+
'$sizeSmall$line &': {
|
|
28518
|
+
paddingLeft: 12,
|
|
28519
|
+
'&$leaf': {
|
|
28520
|
+
paddingLeft: 24
|
|
28521
|
+
},
|
|
28522
|
+
"&::after": {
|
|
28523
|
+
position: 'absolute',
|
|
28524
|
+
content: '""',
|
|
28525
|
+
top: 28,
|
|
28526
|
+
width: 1,
|
|
28527
|
+
height: 'calc(100% - 28px)',
|
|
28528
|
+
background: src.treeLineBackgroundColor
|
|
28175
28529
|
}
|
|
28176
28530
|
},
|
|
28531
|
+
'$sizeLarge &': {
|
|
28532
|
+
paddingLeft: 32
|
|
28533
|
+
},
|
|
28534
|
+
'&$leaf': {
|
|
28535
|
+
paddingLeft: 40
|
|
28536
|
+
},
|
|
28177
28537
|
'&[draggable="true"]': {
|
|
28178
28538
|
cursor: 'pointer'
|
|
28179
28539
|
}
|
|
@@ -28189,7 +28549,8 @@ var treeStyle = {
|
|
|
28189
28549
|
},
|
|
28190
28550
|
position: 'absolute',
|
|
28191
28551
|
width: 24,
|
|
28192
|
-
height:
|
|
28552
|
+
height: 24,
|
|
28553
|
+
margin: '1px 0',
|
|
28193
28554
|
display: 'inline-flex',
|
|
28194
28555
|
alignItems: 'center',
|
|
28195
28556
|
justifyContent: 'center',
|
|
@@ -28197,11 +28558,16 @@ var treeStyle = {
|
|
|
28197
28558
|
'& $icon': {
|
|
28198
28559
|
transform: 'rotate(0deg)'
|
|
28199
28560
|
}
|
|
28561
|
+
},
|
|
28562
|
+
'$sizeLarge &': {
|
|
28563
|
+
width: 32,
|
|
28564
|
+
height: 32,
|
|
28565
|
+
top: 5
|
|
28200
28566
|
}
|
|
28201
28567
|
},
|
|
28202
28568
|
icon: {
|
|
28203
|
-
width:
|
|
28204
|
-
height:
|
|
28569
|
+
width: '100%',
|
|
28570
|
+
height: '100%',
|
|
28205
28571
|
display: 'inline-flex',
|
|
28206
28572
|
alignItems: 'center',
|
|
28207
28573
|
justifyContent: 'center',
|
|
@@ -28217,7 +28583,10 @@ var treeStyle = {
|
|
|
28217
28583
|
background: src.treeItemActiveBackgroundColor
|
|
28218
28584
|
},
|
|
28219
28585
|
'& svg': {
|
|
28220
|
-
width: 14
|
|
28586
|
+
width: 14,
|
|
28587
|
+
'$sizeLarge &': {
|
|
28588
|
+
width: 16
|
|
28589
|
+
}
|
|
28221
28590
|
}
|
|
28222
28591
|
},
|
|
28223
28592
|
children: {},
|
|
@@ -28396,6 +28765,7 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28396
28765
|
display: 'flex',
|
|
28397
28766
|
flex: '1',
|
|
28398
28767
|
minWidth: 0,
|
|
28768
|
+
height: '100%',
|
|
28399
28769
|
alignItems: 'center',
|
|
28400
28770
|
lineHeight: src.lineHeightDynamic
|
|
28401
28771
|
},
|
|
@@ -28652,10 +29022,14 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28652
29022
|
visibility: 'hidden'
|
|
28653
29023
|
},
|
|
28654
29024
|
moreWrapper: {
|
|
29025
|
+
width: 'max-content',
|
|
28655
29026
|
maxWidth: 400,
|
|
28656
29027
|
maxHeight: 160,
|
|
28657
29028
|
overflow: 'auto',
|
|
28658
|
-
padding: "".concat(src.treeSelectMorePaddingY, " ").concat(src.treeSelectMorePaddingX)
|
|
29029
|
+
padding: "".concat(src.treeSelectMorePaddingY, " ").concat(src.treeSelectMorePaddingX),
|
|
29030
|
+
'& $tag': {
|
|
29031
|
+
maxWidth: 'none'
|
|
29032
|
+
}
|
|
28659
29033
|
},
|
|
28660
29034
|
virtualList: {
|
|
28661
29035
|
margin: 0,
|
|
@@ -29236,6 +29610,9 @@ var useUploadStyle = styled(upload_upload, 'upload');
|
|
|
29236
29610
|
|
|
29237
29611
|
|
|
29238
29612
|
|
|
29613
|
+
|
|
29614
|
+
|
|
29615
|
+
|
|
29239
29616
|
|
|
29240
29617
|
|
|
29241
29618
|
|
|
@@ -29770,6 +30147,8 @@ var getPosition = function getPosition(target) {
|
|
|
29770
30147
|
|
|
29771
30148
|
|
|
29772
30149
|
var defaultContext = {
|
|
30150
|
+
addParent: function addParent(_ref) {},
|
|
30151
|
+
removeParent: function removeParent(_ref) {},
|
|
29773
30152
|
bindChild: function bindChild(_ref) {},
|
|
29774
30153
|
removeChild: function removeChild(_ref) {}
|
|
29775
30154
|
};
|
|
@@ -29800,21 +30179,32 @@ var usePopup = function usePopup(props) {
|
|
|
29800
30179
|
setOpenState = _useState2[1];
|
|
29801
30180
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(popup_context),
|
|
29802
30181
|
bindChild = _useContext.bindChild,
|
|
29803
|
-
removeChild = _useContext.removeChild
|
|
30182
|
+
removeChild = _useContext.removeChild,
|
|
30183
|
+
addParent = _useContext.addParent,
|
|
30184
|
+
removeParent = _useContext.removeParent;
|
|
29804
30185
|
var targetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29805
30186
|
var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
29806
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
29807
|
-
bindChild(popupRef);
|
|
29808
|
-
return function () {
|
|
29809
|
-
removeChild(popupRef);
|
|
29810
|
-
};
|
|
29811
|
-
}, []);
|
|
29812
30187
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
29813
30188
|
triggerTimer: null,
|
|
29814
30189
|
// 记录所有的子popup 点击子 popup 不关闭弹窗
|
|
29815
30190
|
chain: [targetRef, popupRef]
|
|
29816
30191
|
}),
|
|
29817
30192
|
context = _useRef.current;
|
|
30193
|
+
var handleAddParent = function handleAddParent(elRef) {
|
|
30194
|
+
context.chain.push(elRef);
|
|
30195
|
+
|
|
30196
|
+
// 继续向上添加当前的 popupRef 到父级
|
|
30197
|
+
addParent(elRef);
|
|
30198
|
+
};
|
|
30199
|
+
var handleRemoveParent = function handleRemoveParent(elRef) {
|
|
30200
|
+
var index = context.chain.findIndex(function (item) {
|
|
30201
|
+
return item === elRef;
|
|
30202
|
+
});
|
|
30203
|
+
if (index > -1) {
|
|
30204
|
+
context.chain.splice(index, 1);
|
|
30205
|
+
removeParent(elRef);
|
|
30206
|
+
}
|
|
30207
|
+
};
|
|
29818
30208
|
var open = openState;
|
|
29819
30209
|
var changeOpen = function changeOpen(openIn, delay) {
|
|
29820
30210
|
if (context.triggerTimer) clearTimeout(context.triggerTimer);
|
|
@@ -29844,11 +30234,6 @@ var usePopup = function usePopup(props) {
|
|
|
29844
30234
|
updatePosition();
|
|
29845
30235
|
}
|
|
29846
30236
|
setOpenState(!!props.open);
|
|
29847
|
-
|
|
29848
|
-
// 外部传了open时,需要正常的触发onCollapse;触发了onCollapse才能让组件内部的edit状态正确,否则可能会出现弹出层打开了但是用户却无法选择的情况
|
|
29849
|
-
if (props.open !== undefined) {
|
|
29850
|
-
changeOpen(!!props.open);
|
|
29851
|
-
}
|
|
29852
30237
|
}, [props.open]);
|
|
29853
30238
|
|
|
29854
30239
|
// const getPopUpHeight = () => {
|
|
@@ -29953,8 +30338,13 @@ var usePopup = function usePopup(props) {
|
|
|
29953
30338
|
});
|
|
29954
30339
|
var providerValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
29955
30340
|
return {
|
|
30341
|
+
addParent: handleAddParent,
|
|
30342
|
+
removeParent: handleRemoveParent,
|
|
29956
30343
|
bindChild: function bindChild(elRef) {
|
|
29957
|
-
|
|
30344
|
+
if (elRef.current) {
|
|
30345
|
+
addParent(elRef);
|
|
30346
|
+
context.chain.push(elRef);
|
|
30347
|
+
}
|
|
29958
30348
|
},
|
|
29959
30349
|
removeChild: function removeChild(elRef) {
|
|
29960
30350
|
var index = context.chain.findIndex(function (item) {
|
|
@@ -29962,10 +30352,19 @@ var usePopup = function usePopup(props) {
|
|
|
29962
30352
|
});
|
|
29963
30353
|
if (index > -1) {
|
|
29964
30354
|
context.chain.splice(index, 1);
|
|
30355
|
+
removeParent(elRef);
|
|
29965
30356
|
}
|
|
29966
30357
|
}
|
|
29967
30358
|
};
|
|
29968
30359
|
}, []);
|
|
30360
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
30361
|
+
if (open) {
|
|
30362
|
+
bindChild(popupRef);
|
|
30363
|
+
}
|
|
30364
|
+
return function () {
|
|
30365
|
+
removeChild(popupRef);
|
|
30366
|
+
};
|
|
30367
|
+
}, [open]);
|
|
29969
30368
|
return {
|
|
29970
30369
|
open: open,
|
|
29971
30370
|
position: position,
|
|
@@ -30376,6 +30775,61 @@ var useCheckElementBorderWidth = function useCheckElementBorderWidth(elementRef)
|
|
|
30376
30775
|
}, [getBorderWidth]);
|
|
30377
30776
|
return borderWidth;
|
|
30378
30777
|
};
|
|
30778
|
+
;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/check-element-size.ts
|
|
30779
|
+
|
|
30780
|
+
|
|
30781
|
+
var useCheckElementSize = function useCheckElementSize(targetElementRef) {
|
|
30782
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
30783
|
+
var enable = options.enable;
|
|
30784
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
30785
|
+
width: 0,
|
|
30786
|
+
height: 0
|
|
30787
|
+
}),
|
|
30788
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
30789
|
+
size = _useState2[0],
|
|
30790
|
+
setSize = _useState2[1];
|
|
30791
|
+
var lastSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
30792
|
+
width: 0,
|
|
30793
|
+
height: 0
|
|
30794
|
+
});
|
|
30795
|
+
var checkSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
30796
|
+
if (targetElementRef.current) {
|
|
30797
|
+
var rect = targetElementRef.current.getBoundingClientRect();
|
|
30798
|
+
var newSize = {
|
|
30799
|
+
width: rect.width,
|
|
30800
|
+
height: rect.height
|
|
30801
|
+
};
|
|
30802
|
+
if (newSize.width !== lastSize.current.width || newSize.height !== lastSize.current.height) {
|
|
30803
|
+
setSize(newSize);
|
|
30804
|
+
lastSize.current = newSize;
|
|
30805
|
+
}
|
|
30806
|
+
}
|
|
30807
|
+
}, [targetElementRef]);
|
|
30808
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
30809
|
+
var _window;
|
|
30810
|
+
if (!enable) return;
|
|
30811
|
+
var element = targetElementRef.current;
|
|
30812
|
+
if (!element) return;
|
|
30813
|
+
|
|
30814
|
+
// 初始检查
|
|
30815
|
+
checkSize();
|
|
30816
|
+
var resizeObserver = null;
|
|
30817
|
+
if ((_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
|
|
30818
|
+
resizeObserver = new ResizeObserver(checkSize);
|
|
30819
|
+
resizeObserver.observe(element);
|
|
30820
|
+
}
|
|
30821
|
+
|
|
30822
|
+
// 清理函数
|
|
30823
|
+
return function () {
|
|
30824
|
+
var _resizeObserver;
|
|
30825
|
+
(_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
|
|
30826
|
+
};
|
|
30827
|
+
}, [enable, targetElementRef, checkSize]);
|
|
30828
|
+
if (!enable || !targetElementRef) {
|
|
30829
|
+
return null;
|
|
30830
|
+
}
|
|
30831
|
+
return size;
|
|
30832
|
+
};
|
|
30379
30833
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/react-fast-compare@3.2.2/node_modules/react-fast-compare/index.js
|
|
30380
30834
|
var react_fast_compare = __webpack_require__(5284);
|
|
30381
30835
|
var react_fast_compare_default = /*#__PURE__*/__webpack_require__.n(react_fast_compare);
|
|
@@ -30502,6 +30956,7 @@ var getCurrentCSSZoom = function getCurrentCSSZoom() {
|
|
|
30502
30956
|
|
|
30503
30957
|
|
|
30504
30958
|
|
|
30959
|
+
|
|
30505
30960
|
var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top', 'left', 'right'];
|
|
30506
30961
|
var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
|
|
30507
30962
|
var hideStyle = {
|
|
@@ -30556,6 +31011,9 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30556
31011
|
var parentElBorderWidth = useCheckElementBorderWidth(parentElRef, {
|
|
30557
31012
|
direction: 'horizontal'
|
|
30558
31013
|
});
|
|
31014
|
+
var popupElSize = useCheckElementSize(popupElRef, {
|
|
31015
|
+
enable: show
|
|
31016
|
+
});
|
|
30559
31017
|
var adjustPosition = function adjustPosition(position) {
|
|
30560
31018
|
var winHeight = docSize.height;
|
|
30561
31019
|
if (!verticalPosition.includes(position)) return position;
|
|
@@ -30792,7 +31250,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
30792
31250
|
// 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
|
|
30793
31251
|
context.prevParentPosition = parentElNewPosition;
|
|
30794
31252
|
});
|
|
30795
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition]);
|
|
31253
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize]);
|
|
30796
31254
|
return {
|
|
30797
31255
|
style: style
|
|
30798
31256
|
};
|
|
@@ -31586,11 +32044,11 @@ var Popover = function Popover(props) {
|
|
|
31586
32044
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
31587
32045
|
updateKey = _React$useState2[0],
|
|
31588
32046
|
setUpdateKey = _React$useState2[1];
|
|
31589
|
-
var handleUpdateKey = function
|
|
32047
|
+
var handleUpdateKey = usePersistFn(function () {
|
|
31590
32048
|
setUpdateKey(function (prev) {
|
|
31591
32049
|
return (prev + 1) % 2;
|
|
31592
32050
|
});
|
|
31593
|
-
};
|
|
32051
|
+
});
|
|
31594
32052
|
var bindEvents = function bindEvents() {
|
|
31595
32053
|
var _window;
|
|
31596
32054
|
var targetEl = targetRef.current;
|
|
@@ -31603,9 +32061,9 @@ var Popover = function Popover(props) {
|
|
|
31603
32061
|
targetEl.addEventListener('click', closePop);
|
|
31604
32062
|
}
|
|
31605
32063
|
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
31606
|
-
|
|
31607
|
-
|
|
31608
|
-
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
32064
|
+
if (props.adjust) {
|
|
32065
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
32066
|
+
if (scrollContainer) scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
31609
32067
|
}
|
|
31610
32068
|
};
|
|
31611
32069
|
var unbindEvents = function unbindEvents() {
|
|
@@ -31618,9 +32076,9 @@ var Popover = function Popover(props) {
|
|
|
31618
32076
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
31619
32077
|
targetEl.removeEventListener('click', closePop);
|
|
31620
32078
|
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
31621
|
-
|
|
31622
|
-
|
|
31623
|
-
scrollContainer.
|
|
32079
|
+
if (props.adjust) {
|
|
32080
|
+
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
32081
|
+
if (scrollContainer) scrollContainer.removeEventListener('scroll', handleUpdateKey);
|
|
31624
32082
|
}
|
|
31625
32083
|
};
|
|
31626
32084
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -32062,7 +32520,7 @@ var AnimationList = function AnimationList(props) {
|
|
|
32062
32520
|
}
|
|
32063
32521
|
if (type.indexOf('scale-y') >= 0) {
|
|
32064
32522
|
transition.push("transform ".concat(durationNum, "ms ease-in-out"));
|
|
32065
|
-
transition.push("opacity ".concat(durationNum, "ms ease-in-out"));
|
|
32523
|
+
transition.push("opacity ".concat(durationNum / 2, "ms ease-in-out"));
|
|
32066
32524
|
}
|
|
32067
32525
|
if (type.indexOf('collapse') >= 0) {
|
|
32068
32526
|
transition.push("height ".concat(durationNum, "ms ease-in-out"));
|
|
@@ -33925,9 +34383,16 @@ var accordion_jssStyle = {
|
|
|
33925
34383
|
var ModalSubmit = function ModalSubmit(props) {
|
|
33926
34384
|
var modalFormContext = useFormFooter();
|
|
33927
34385
|
var handleClick = usePersistFn(function (e) {
|
|
33928
|
-
var
|
|
33929
|
-
(
|
|
33930
|
-
|
|
34386
|
+
var _modalFormContext$fun;
|
|
34387
|
+
if (modalFormContext !== null && modalFormContext !== void 0 && (_modalFormContext$fun = modalFormContext.func) !== null && _modalFormContext$fun !== void 0 && _modalFormContext$fun.hasSubmit) {
|
|
34388
|
+
modalFormContext === null || modalFormContext === void 0 || modalFormContext.func.submit(true, function () {
|
|
34389
|
+
var _props$onClick;
|
|
34390
|
+
return (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, e);
|
|
34391
|
+
});
|
|
34392
|
+
} else {
|
|
34393
|
+
var _props$onClick2;
|
|
34394
|
+
(_props$onClick2 = props.onClick) === null || _props$onClick2 === void 0 || _props$onClick2.call(props, e);
|
|
34395
|
+
}
|
|
33931
34396
|
});
|
|
33932
34397
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
|
|
33933
34398
|
htmlType: "button",
|
|
@@ -34852,19 +35317,18 @@ function useInputAble(props) {
|
|
|
34852
35317
|
var render = useRender(syncValue);
|
|
34853
35318
|
var shouldUseState = delay || !control;
|
|
34854
35319
|
var value = shouldUseState ? stateValue : valuePo;
|
|
34855
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.
|
|
34856
|
-
if (context.timer) {
|
|
34857
|
-
clearTimeout(context.timer);
|
|
34858
|
-
context.timer = null;
|
|
34859
|
-
}
|
|
35320
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
34860
35321
|
if (delay && control && props.value !== stateValue) {
|
|
34861
35322
|
changeStateValue(props.value);
|
|
35323
|
+
} else if (context.timer) {
|
|
35324
|
+
clearTimeout(context.timer);
|
|
35325
|
+
context.timer = null;
|
|
34862
35326
|
}
|
|
34863
35327
|
}, [props.value, delay, control]);
|
|
34864
35328
|
var forceDelayChange = use_persist_fn(function () {
|
|
34865
|
-
if (context.
|
|
35329
|
+
if (context.delayChange) context.delayChange();
|
|
35330
|
+
if (context.timer) {
|
|
34866
35331
|
clearTimeout(context.timer);
|
|
34867
|
-
context.delayChange();
|
|
34868
35332
|
context.timer = null;
|
|
34869
35333
|
context.delayChange = null;
|
|
34870
35334
|
}
|
|
@@ -34888,15 +35352,15 @@ function useInputAble(props) {
|
|
|
34888
35352
|
changeStateValue(vv);
|
|
34889
35353
|
}
|
|
34890
35354
|
if (!isFunc(onChange)) return;
|
|
34891
|
-
context.delayChange = function () {
|
|
34892
|
-
context.timer = null;
|
|
34893
|
-
context.delayChange = null;
|
|
34894
|
-
onChange.apply(void 0, [vv].concat(other));
|
|
34895
|
-
render();
|
|
34896
|
-
};
|
|
34897
35355
|
if (!delay) {
|
|
34898
35356
|
onChange.apply(void 0, [vv].concat(other));
|
|
34899
35357
|
} else {
|
|
35358
|
+
context.delayChange = function () {
|
|
35359
|
+
context.timer = null;
|
|
35360
|
+
context.delayChange = null;
|
|
35361
|
+
onChange.apply(void 0, [vv].concat(other));
|
|
35362
|
+
render();
|
|
35363
|
+
};
|
|
34900
35364
|
if (context.timer) clearTimeout(context.timer);
|
|
34901
35365
|
context.timer = setTimeout(context.delayChange, delay);
|
|
34902
35366
|
}
|
|
@@ -35476,6 +35940,18 @@ function removeProtocol(url) {
|
|
|
35476
35940
|
return url;
|
|
35477
35941
|
}
|
|
35478
35942
|
}
|
|
35943
|
+
|
|
35944
|
+
/**
|
|
35945
|
+
* Used to match `RegExp`
|
|
35946
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
35947
|
+
*/
|
|
35948
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
35949
|
+
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
35950
|
+
function escapeRegExp() {
|
|
35951
|
+
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
35952
|
+
var string = typeof str === 'string' ? str : str.toString();
|
|
35953
|
+
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
|
|
35954
|
+
}
|
|
35479
35955
|
;// CONCATENATED MODULE: ../base/src/config/locale/zh-CN.ts
|
|
35480
35956
|
/* harmony default export */ var zh_CN = ({
|
|
35481
35957
|
now: '今天',
|
|
@@ -36239,7 +36715,10 @@ var Carousel = function Carousel(props) {
|
|
|
36239
36715
|
_props$indicatorPosit = props.indicatorPosition,
|
|
36240
36716
|
indicatorPosition = _props$indicatorPosit === void 0 ? 'center' : _props$indicatorPosit,
|
|
36241
36717
|
_props$indicatorType = props.indicatorType,
|
|
36242
|
-
indicatorType = _props$indicatorType === void 0 ? 'circle' : _props$indicatorType
|
|
36718
|
+
indicatorType = _props$indicatorType === void 0 ? 'circle' : _props$indicatorType,
|
|
36719
|
+
itemClassName = props.itemClassName,
|
|
36720
|
+
_props$showIndicator = props.showIndicator,
|
|
36721
|
+
showIndicator = _props$showIndicator === void 0 ? true : _props$showIndicator;
|
|
36243
36722
|
var total = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(props.children).length;
|
|
36244
36723
|
var carouselClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$carou = _props$jssStyle.carousel) === null || _props$jssStyle$carou === void 0 ? void 0 : _props$jssStyle$carou.call(_props$jssStyle);
|
|
36245
36724
|
var config = useConfig();
|
|
@@ -36261,7 +36740,7 @@ var Carousel = function Carousel(props) {
|
|
|
36261
36740
|
height: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.height
|
|
36262
36741
|
},
|
|
36263
36742
|
children: external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.map(props.children, function (child, index) {
|
|
36264
|
-
var itemClasses = classnames_default()(carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.item, index === current && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.itemCurrent), index === pre && pre !== current && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.itemPre));
|
|
36743
|
+
var itemClasses = classnames_default()(carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.item, index === current && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.itemCurrent), index === pre && pre !== current && (carouselClasses === null || carouselClasses === void 0 ? void 0 : carouselClasses.itemPre), itemClassName);
|
|
36265
36744
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
36266
36745
|
className: itemClasses,
|
|
36267
36746
|
children: child
|
|
@@ -36301,7 +36780,7 @@ var Carousel = function Carousel(props) {
|
|
|
36301
36780
|
});
|
|
36302
36781
|
};
|
|
36303
36782
|
var renderIndicator = function renderIndicator() {
|
|
36304
|
-
if (total <= 1) return null;
|
|
36783
|
+
if (total <= 1 && typeof indicatorType !== 'function' || showIndicator === false) return null;
|
|
36305
36784
|
var content = null;
|
|
36306
36785
|
if (typeof indicatorType === 'function') {
|
|
36307
36786
|
content = indicatorType(current, func.moveTo);
|
|
@@ -37733,11 +38212,16 @@ var mergeFilteredTree = function mergeFilteredTree(filterData, rawDatum, tiledId
|
|
|
37733
38212
|
draft.map(recursion);
|
|
37734
38213
|
});
|
|
37735
38214
|
};
|
|
38215
|
+
;// CONCATENATED MODULE: ../hooks/src/common/use-filter/use-filter-context.ts
|
|
38216
|
+
|
|
38217
|
+
var FilterContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
|
|
38218
|
+
FilterContext.displayName = 'FilterContext';
|
|
37736
38219
|
;// CONCATENATED MODULE: ../hooks/src/common/use-filter/use-filter.ts
|
|
37737
38220
|
|
|
37738
38221
|
|
|
37739
38222
|
|
|
37740
38223
|
|
|
38224
|
+
|
|
37741
38225
|
var useFilter = function useFilter(props) {
|
|
37742
38226
|
var data = props.data,
|
|
37743
38227
|
groupKey = props.groupKey,
|
|
@@ -37879,6 +38363,7 @@ var useFilter = function useFilter(props) {
|
|
|
37879
38363
|
filterFunc: filterFunc,
|
|
37880
38364
|
onCreate: onCreate ? handleCreate : undefined,
|
|
37881
38365
|
onFilter: onFilter || onCreate ? handleFilter : undefined,
|
|
38366
|
+
FilterProvider: FilterContext.Provider,
|
|
37882
38367
|
// onResetFilter: handleResetData,
|
|
37883
38368
|
onClearCreatedData: handleClearCreatedData
|
|
37884
38369
|
};
|
|
@@ -38189,9 +38674,10 @@ var useTree = function useTree(props) {
|
|
|
38189
38674
|
};
|
|
38190
38675
|
}
|
|
38191
38676
|
if (virtual) {
|
|
38677
|
+
var _context$dataFlatStat;
|
|
38192
38678
|
return {
|
|
38193
38679
|
active: isActive,
|
|
38194
|
-
expanded: context.dataFlatStatusMap.get(id).expanded
|
|
38680
|
+
expanded: !!((_context$dataFlatStat = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat !== void 0 && _context$dataFlatStat.expanded)
|
|
38195
38681
|
};
|
|
38196
38682
|
}
|
|
38197
38683
|
return {
|
|
@@ -38202,11 +38688,12 @@ var useTree = function useTree(props) {
|
|
|
38202
38688
|
|
|
38203
38689
|
// 注册节点
|
|
38204
38690
|
var bindVirtualNode = function bindVirtualNode(id, update) {
|
|
38691
|
+
var _context$dataFlatStat2;
|
|
38205
38692
|
context.updateMap.set(id, update);
|
|
38206
38693
|
var isActive = activeProp === id;
|
|
38207
38694
|
return {
|
|
38208
38695
|
active: isActive,
|
|
38209
|
-
expanded: context.dataFlatStatusMap.get(id).expanded
|
|
38696
|
+
expanded: !!((_context$dataFlatStat2 = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat2 !== void 0 && _context$dataFlatStat2.expanded)
|
|
38210
38697
|
};
|
|
38211
38698
|
};
|
|
38212
38699
|
var get = function get(id) {
|
|
@@ -38578,7 +39065,7 @@ var useTree = function useTree(props) {
|
|
|
38578
39065
|
var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
|
|
38579
39066
|
if (!child) return;
|
|
38580
39067
|
child.forEach(function (item, i) {
|
|
38581
|
-
var _context$
|
|
39068
|
+
var _context$dataFlatStat3;
|
|
38582
39069
|
var childId = getKey(item, pid, i);
|
|
38583
39070
|
var node = {
|
|
38584
39071
|
id: childId,
|
|
@@ -38587,7 +39074,7 @@ var useTree = function useTree(props) {
|
|
|
38587
39074
|
pid: pid
|
|
38588
39075
|
};
|
|
38589
39076
|
insertData.push(node);
|
|
38590
|
-
if ((_context$
|
|
39077
|
+
if ((_context$dataFlatStat3 = context.dataFlatStatusMap.get(childId)) !== null && _context$dataFlatStat3 !== void 0 && _context$dataFlatStat3.expanded && item[childrenKey]) {
|
|
38591
39078
|
appendChildrenExpanded(item[childrenKey], level + 1, childId, insertData);
|
|
38592
39079
|
}
|
|
38593
39080
|
});
|
|
@@ -38670,6 +39157,16 @@ var useTree = function useTree(props) {
|
|
|
38670
39157
|
var getFlatData = function getFlatData() {
|
|
38671
39158
|
return context.dataFlat;
|
|
38672
39159
|
};
|
|
39160
|
+
var updateExpanded = usePersistFn(function (expanded) {
|
|
39161
|
+
var tempExpandMap = new Set(expanded);
|
|
39162
|
+
if (!expanded) return;
|
|
39163
|
+
if (virtual) {
|
|
39164
|
+
expandedFlat(expanded);
|
|
39165
|
+
}
|
|
39166
|
+
context.updateMap.forEach(function (update, id) {
|
|
39167
|
+
update('expanded', tempExpandMap.has(id));
|
|
39168
|
+
});
|
|
39169
|
+
});
|
|
38673
39170
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38674
39171
|
if (defaultExpandAll) {
|
|
38675
39172
|
var nextExpanded = [];
|
|
@@ -38685,8 +39182,13 @@ var useTree = function useTree(props) {
|
|
|
38685
39182
|
if (props.datum) return;
|
|
38686
39183
|
if (!dataUpdate) return;
|
|
38687
39184
|
setData(data);
|
|
39185
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
39186
|
+
if (!shallowEqual(nextExpanded, expanded)) {
|
|
39187
|
+
onExpand(nextExpanded);
|
|
39188
|
+
updateExpanded(nextExpanded);
|
|
39189
|
+
}
|
|
38688
39190
|
updateInnerCheckStatus();
|
|
38689
|
-
}, [data]);
|
|
39191
|
+
}, [props.data]);
|
|
38690
39192
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38691
39193
|
if (props.datum) return;
|
|
38692
39194
|
setValue(value);
|
|
@@ -38711,16 +39213,17 @@ var useTree = function useTree(props) {
|
|
|
38711
39213
|
getChecked: getChecked,
|
|
38712
39214
|
getKey: getKey,
|
|
38713
39215
|
getFlatData: getFlatData,
|
|
39216
|
+
getDataById: getDataById,
|
|
38714
39217
|
getDataByValues: getDataByValues,
|
|
38715
39218
|
setValue: setValue,
|
|
38716
39219
|
setData: setData,
|
|
38717
39220
|
isDisabled: isDisabled,
|
|
39221
|
+
isUnMatched: isUnMatched,
|
|
38718
39222
|
bindNode: bindNode,
|
|
38719
39223
|
bindVirtualNode: bindVirtualNode,
|
|
38720
|
-
getDataById: getDataById,
|
|
38721
39224
|
bindUpdate: bindUpdate,
|
|
38722
39225
|
unBindUpdate: unBindUpdate,
|
|
38723
|
-
|
|
39226
|
+
updateExpanded: updateExpanded,
|
|
38724
39227
|
childrenKey: childrenKey,
|
|
38725
39228
|
data: data,
|
|
38726
39229
|
dataFlat: dataFlat,
|
|
@@ -39226,6 +39729,66 @@ var VirtualList = function VirtualList(props) {
|
|
|
39226
39729
|
return renderList();
|
|
39227
39730
|
};
|
|
39228
39731
|
/* harmony default export */ var virtual_scroll_list = (VirtualList);
|
|
39732
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/highlight.tsx
|
|
39733
|
+
|
|
39734
|
+
|
|
39735
|
+
|
|
39736
|
+
|
|
39737
|
+
|
|
39738
|
+
function getHighlightText(_ref) {
|
|
39739
|
+
var nodeList = _ref.nodeList,
|
|
39740
|
+
searchWords = _ref.searchWords,
|
|
39741
|
+
highlightClassName = _ref.highlightClassName,
|
|
39742
|
+
enable = _ref.enable;
|
|
39743
|
+
if (!enable || !searchWords) {
|
|
39744
|
+
return nodeList;
|
|
39745
|
+
}
|
|
39746
|
+
var transformNode = function transformNode(node) {
|
|
39747
|
+
var _node$props;
|
|
39748
|
+
if (node && typeof ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.children) === 'string') {
|
|
39749
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(node, undefined, /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
|
|
39750
|
+
textToHighlight: node.props.children,
|
|
39751
|
+
searchWords: searchWords,
|
|
39752
|
+
highlightClassName: highlightClassName
|
|
39753
|
+
}));
|
|
39754
|
+
}
|
|
39755
|
+
if (node && typeof node === 'string') {
|
|
39756
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
|
|
39757
|
+
textToHighlight: node,
|
|
39758
|
+
searchWords: searchWords,
|
|
39759
|
+
highlightClassName: highlightClassName
|
|
39760
|
+
});
|
|
39761
|
+
}
|
|
39762
|
+
return node;
|
|
39763
|
+
};
|
|
39764
|
+
return isArray(nodeList) ? nodeList.map(transformNode) : transformNode(nodeList);
|
|
39765
|
+
}
|
|
39766
|
+
function HighlightText(_ref2) {
|
|
39767
|
+
var textToHighlight = _ref2.textToHighlight,
|
|
39768
|
+
searchWords = _ref2.searchWords,
|
|
39769
|
+
highlightClassName = _ref2.highlightClassName;
|
|
39770
|
+
if (!searchWords) return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
39771
|
+
children: textToHighlight
|
|
39772
|
+
});
|
|
39773
|
+
if (searchWords.length > 500) {
|
|
39774
|
+
searchWords = searchWords.slice(0, 500);
|
|
39775
|
+
}
|
|
39776
|
+
|
|
39777
|
+
// 注意这里的括号,这里使用了带capture group功能的正则,来split字符串
|
|
39778
|
+
// 从而在strArr中可以保留匹配文本
|
|
39779
|
+
var re = new RegExp("(".concat(escapeRegExp(searchWords), ")"), 'i');
|
|
39780
|
+
var strArr = textToHighlight.split(re);
|
|
39781
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
39782
|
+
children: strArr.map(function (item, index) {
|
|
39783
|
+
return re.test(item) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39784
|
+
className: highlightClassName,
|
|
39785
|
+
children: item
|
|
39786
|
+
}, index) : /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
39787
|
+
children: item
|
|
39788
|
+
}, index);
|
|
39789
|
+
})
|
|
39790
|
+
});
|
|
39791
|
+
}
|
|
39229
39792
|
;// CONCATENATED MODULE: ../base/src/cascader/node.tsx
|
|
39230
39793
|
|
|
39231
39794
|
|
|
@@ -39240,7 +39803,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
39240
39803
|
|
|
39241
39804
|
var node_getDataAttributeName = getDataAttributeName;
|
|
39242
39805
|
var CascaderNode = function CascaderNode(props) {
|
|
39243
|
-
var _jssStyle$cascader;
|
|
39806
|
+
var _jssStyle$cascader, _jssStyle$common;
|
|
39244
39807
|
var jssStyle = props.jssStyle,
|
|
39245
39808
|
active = props.active,
|
|
39246
39809
|
data = props.data,
|
|
@@ -39266,6 +39829,7 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39266
39829
|
var hasChildren = children && children.length > 0;
|
|
39267
39830
|
var uncertainChildren = loader && !loading && children === undefined;
|
|
39268
39831
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
39832
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
39269
39833
|
var rootClass = classnames_default()(styles.option, active && styles.activeOption, isDisabled && mode !== 4 && styles.optionDisabled);
|
|
39270
39834
|
var handlePathChange = function handlePathChange() {
|
|
39271
39835
|
onPathChange === null || onPathChange === void 0 || onPathChange(id, data, path);
|
|
@@ -39307,11 +39871,19 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39307
39871
|
}
|
|
39308
39872
|
return events;
|
|
39309
39873
|
};
|
|
39874
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
39875
|
+
filterText = _useContext.filterText,
|
|
39876
|
+
highlight = _useContext.highlight;
|
|
39310
39877
|
var renderContent = function renderContent() {
|
|
39311
39878
|
var render = typeof renderItem === 'function' ? renderItem : function (d) {
|
|
39312
39879
|
return d[renderItem];
|
|
39313
39880
|
};
|
|
39314
|
-
return
|
|
39881
|
+
return getHighlightText({
|
|
39882
|
+
enable: highlight,
|
|
39883
|
+
nodeList: render(data, active, id),
|
|
39884
|
+
searchWords: filterText,
|
|
39885
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
39886
|
+
});
|
|
39315
39887
|
};
|
|
39316
39888
|
var renderIcon = function renderIcon() {
|
|
39317
39889
|
if (loading && children === undefined) {
|
|
@@ -39468,8 +40040,9 @@ var CascaderList = function CascaderList(props) {
|
|
|
39468
40040
|
|
|
39469
40041
|
|
|
39470
40042
|
|
|
40043
|
+
|
|
39471
40044
|
var FilterNode = function FilterNode(props) {
|
|
39472
|
-
var _jssStyle$cascader;
|
|
40045
|
+
var _jssStyle$cascader, _jssStyle$common;
|
|
39473
40046
|
var jssStyle = props.jssStyle,
|
|
39474
40047
|
data = props.data,
|
|
39475
40048
|
shouldFinal = props.shouldFinal,
|
|
@@ -39482,6 +40055,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
39482
40055
|
onChange = props.onChange,
|
|
39483
40056
|
onPathChange = props.onPathChange;
|
|
39484
40057
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
40058
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
39485
40059
|
var handleSelectItem = function handleSelectItem(index, d, e) {
|
|
39486
40060
|
var isFinal = data && index === data.length - 1;
|
|
39487
40061
|
if (shouldFinal && !isFinal) return;
|
|
@@ -39510,6 +40084,9 @@ var FilterNode = function FilterNode(props) {
|
|
|
39510
40084
|
var handleSelect = function handleSelect() {
|
|
39511
40085
|
handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
|
|
39512
40086
|
};
|
|
40087
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
40088
|
+
filterText = _useContext.filterText,
|
|
40089
|
+
highlight = _useContext.highlight;
|
|
39513
40090
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
39514
40091
|
className: classnames_default()(styles.option, styles.filterOption),
|
|
39515
40092
|
onClick: handleSelect,
|
|
@@ -39529,11 +40106,16 @@ var FilterNode = function FilterNode(props) {
|
|
|
39529
40106
|
})) || isDisabled;
|
|
39530
40107
|
}
|
|
39531
40108
|
}
|
|
39532
|
-
var content =
|
|
39533
|
-
|
|
39534
|
-
|
|
39535
|
-
|
|
39536
|
-
|
|
40109
|
+
var content = getHighlightText({
|
|
40110
|
+
enable: highlight,
|
|
40111
|
+
nodeList: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40112
|
+
onClick: handleClick,
|
|
40113
|
+
className: classnames_default()(styles.filterOptionItem, isDisabled && styles.filterDisabledOption),
|
|
40114
|
+
children: renderItem(item)
|
|
40115
|
+
}, 'content'),
|
|
40116
|
+
searchWords: filterText,
|
|
40117
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
40118
|
+
});
|
|
39537
40119
|
if (index === 0) return content;
|
|
39538
40120
|
return [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39539
40121
|
className: classnames_default()(styles.filterOptionSeparator),
|
|
@@ -40118,7 +40700,7 @@ var TagInput = function TagInput(props) {
|
|
|
40118
40700
|
|
|
40119
40701
|
|
|
40120
40702
|
|
|
40121
|
-
var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable"];
|
|
40703
|
+
var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable", "onMouseDown"];
|
|
40122
40704
|
|
|
40123
40705
|
|
|
40124
40706
|
|
|
@@ -40149,6 +40731,7 @@ var Tag = function Tag(props) {
|
|
|
40149
40731
|
onCompleted = props.onCompleted,
|
|
40150
40732
|
onEnterPress = props.onEnterPress,
|
|
40151
40733
|
closable = props.closable,
|
|
40734
|
+
onMouseDown = props.onMouseDown,
|
|
40152
40735
|
rest = objectWithoutProperties_default()(props, tag_excluded);
|
|
40153
40736
|
if (props.type) {
|
|
40154
40737
|
tag_devUseWarning.deprecated('type', 'color', 'Tag');
|
|
@@ -40222,6 +40805,7 @@ var Tag = function Tag(props) {
|
|
|
40222
40805
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40223
40806
|
className: tagStyle.closeIcon,
|
|
40224
40807
|
onClick: handleClose,
|
|
40808
|
+
onMouseDown: onMouseDown,
|
|
40225
40809
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
40226
40810
|
className: tagStyle.closeIconWrapper,
|
|
40227
40811
|
children: icons_config.tag.Close
|
|
@@ -40371,7 +40955,7 @@ var More = function More(props) {
|
|
|
40371
40955
|
mode: visible ? 'fill' : 'bright',
|
|
40372
40956
|
color: visible ? 'info' : 'default',
|
|
40373
40957
|
children: shouldShowMore ? '+' : "+".concat(itemsLength)
|
|
40374
|
-
}, 'more'), /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
40958
|
+
}, 'more'), compressed !== 'hide-popover' && /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
40375
40959
|
jssStyle: jssStyle,
|
|
40376
40960
|
className: compressedClassName,
|
|
40377
40961
|
visible: visible,
|
|
@@ -40469,6 +41053,7 @@ var result_Result = function Result(props) {
|
|
|
40469
41053
|
var render = useRender();
|
|
40470
41054
|
var resultRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
40471
41055
|
var prevMore = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(more);
|
|
41056
|
+
var removeLock = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
40472
41057
|
var showInput = allowOnFilter;
|
|
40473
41058
|
var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
40474
41059
|
var styles = props.classes;
|
|
@@ -40544,6 +41129,12 @@ var result_Result = function Result(props) {
|
|
|
40544
41129
|
})
|
|
40545
41130
|
}, 'input');
|
|
40546
41131
|
};
|
|
41132
|
+
var handleCloseMouseDown = function handleCloseMouseDown() {
|
|
41133
|
+
removeLock.current = true;
|
|
41134
|
+
setTimeout(function () {
|
|
41135
|
+
removeLock.current = false;
|
|
41136
|
+
}, 0);
|
|
41137
|
+
};
|
|
40547
41138
|
var renderResultItem = function renderResultItem(item, index, nodes, v) {
|
|
40548
41139
|
var handleClose = function handleClose() {
|
|
40549
41140
|
onRemove === null || onRemove === void 0 || onRemove(item, v);
|
|
@@ -40584,6 +41175,7 @@ var result_Result = function Result(props) {
|
|
|
40584
41175
|
className: classnames_default()(styles.tag, more === 1 && styles.tagOnly, resultClassName),
|
|
40585
41176
|
closable: closeable && 'only',
|
|
40586
41177
|
onClose: closeable && handleClose,
|
|
41178
|
+
onMouseDown: closeable ? handleCloseMouseDown : undefined,
|
|
40587
41179
|
onClick: handleClick,
|
|
40588
41180
|
jssStyle: jssStyle,
|
|
40589
41181
|
inlineStyle: true
|
|
@@ -40699,6 +41291,7 @@ var result_Result = function Result(props) {
|
|
|
40699
41291
|
var handleResetMore = function handleResetMore() {
|
|
40700
41292
|
if (!compressed) return;
|
|
40701
41293
|
if (isCompressedBound()) return;
|
|
41294
|
+
if (removeLock.current) return;
|
|
40702
41295
|
setMore(-1);
|
|
40703
41296
|
setShouldResetMore(true);
|
|
40704
41297
|
};
|
|
@@ -40891,7 +41484,8 @@ var Cascader = function Cascader(props0) {
|
|
|
40891
41484
|
onCollapseProp = props.onCollapse,
|
|
40892
41485
|
size = props.size,
|
|
40893
41486
|
virtual = props.virtual,
|
|
40894
|
-
filterSameChange = props.filterSameChange
|
|
41487
|
+
filterSameChange = props.filterSameChange,
|
|
41488
|
+
beforeChange = props.beforeChange;
|
|
40895
41489
|
var showInput = isFunc(onFilterProp);
|
|
40896
41490
|
var isRealtime = cascader_isOptionalDisabled(props.disabled) ? props.disabled.isRealtime : false;
|
|
40897
41491
|
var disabled = isOptionalDisabled(disabledProp) ? disabledProp.disabled : disabledProp;
|
|
@@ -40930,7 +41524,8 @@ var Cascader = function Cascader(props0) {
|
|
|
40930
41524
|
setInputText = _useFilter.setInputText,
|
|
40931
41525
|
setFilterText = _useFilter.setFilterText,
|
|
40932
41526
|
filterFunc = _useFilter.filterFunc,
|
|
40933
|
-
onFilter = _useFilter.onFilter
|
|
41527
|
+
onFilter = _useFilter.onFilter,
|
|
41528
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
40934
41529
|
var isDataEmpty = !filterData || filterData.length === 0;
|
|
40935
41530
|
var isMultiple = multiple === true || mode !== undefined;
|
|
40936
41531
|
var updateKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
@@ -40946,6 +41541,7 @@ var Cascader = function Cascader(props0) {
|
|
|
40946
41541
|
defaultValue: defaultValue,
|
|
40947
41542
|
childrenKey: childrenKey,
|
|
40948
41543
|
value: valueProp,
|
|
41544
|
+
beforeChange: beforeChange,
|
|
40949
41545
|
onChange: onChangeProp,
|
|
40950
41546
|
filterSameChange: filterSameChange
|
|
40951
41547
|
}),
|
|
@@ -41392,11 +41988,20 @@ var Cascader = function Cascader(props0) {
|
|
|
41392
41988
|
datum.setData(data);
|
|
41393
41989
|
}
|
|
41394
41990
|
}, [data]);
|
|
41991
|
+
|
|
41992
|
+
// 修复外部受控打开的场景下,从外部修改value导致的面板勾选情况没有及时同步
|
|
41993
|
+
if (openProp && !shallowEqual(value, datum.getValue())) {
|
|
41994
|
+
datum.setValue(value);
|
|
41995
|
+
}
|
|
41996
|
+
;
|
|
41395
41997
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41396
41998
|
if (!value) return;
|
|
41397
41999
|
datum.setValue(value);
|
|
41398
42000
|
if (!open) return;
|
|
41399
42001
|
updatePathByValue();
|
|
42002
|
+
if (props.renderOptionList) {
|
|
42003
|
+
updatePath();
|
|
42004
|
+
}
|
|
41400
42005
|
}, [value, open]);
|
|
41401
42006
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41402
42007
|
if (filterText !== undefined) {
|
|
@@ -41434,39 +42039,45 @@ var Cascader = function Cascader(props0) {
|
|
|
41434
42039
|
}
|
|
41435
42040
|
return false;
|
|
41436
42041
|
};
|
|
41437
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
41438
|
-
|
|
41439
|
-
|
|
41440
|
-
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
|
|
41446
|
-
|
|
41447
|
-
|
|
41448
|
-
|
|
41449
|
-
|
|
41450
|
-
|
|
41451
|
-
|
|
41452
|
-
|
|
41453
|
-
|
|
41454
|
-
|
|
41455
|
-
|
|
41456
|
-
|
|
41457
|
-
|
|
41458
|
-
|
|
41459
|
-
|
|
41460
|
-
|
|
41461
|
-
|
|
41462
|
-
|
|
41463
|
-
|
|
41464
|
-
|
|
41465
|
-
|
|
41466
|
-
|
|
41467
|
-
|
|
41468
|
-
|
|
41469
|
-
|
|
42042
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
42043
|
+
value: {
|
|
42044
|
+
filterText: filterText,
|
|
42045
|
+
highlight: props.highlight
|
|
42046
|
+
},
|
|
42047
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
42048
|
+
id: fieldId,
|
|
42049
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
42050
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
42051
|
+
className: rootClass,
|
|
42052
|
+
style: rootStyle,
|
|
42053
|
+
onBlur: handleBlur,
|
|
42054
|
+
onFocus: handleFocus,
|
|
42055
|
+
onKeyDown: handleKeyDown,
|
|
42056
|
+
ref: targetRef,
|
|
42057
|
+
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
42058
|
+
adjust: adjust,
|
|
42059
|
+
focus: open,
|
|
42060
|
+
fixedWidth: getFixedWidth(),
|
|
42061
|
+
absolute: absolute,
|
|
42062
|
+
zIndex: zIndex,
|
|
42063
|
+
position: position,
|
|
42064
|
+
updateKey: updateKey,
|
|
42065
|
+
popupGap: 4,
|
|
42066
|
+
popupElRef: popupRef,
|
|
42067
|
+
parentElRef: targetRef,
|
|
42068
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
|
|
42069
|
+
onRef: popupRef,
|
|
42070
|
+
show: open,
|
|
42071
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper, open && (styles === null || styles === void 0 ? void 0 : styles.pickerWrapperShow)),
|
|
42072
|
+
display: 'block',
|
|
42073
|
+
type: "scale-y",
|
|
42074
|
+
duration: 'fast',
|
|
42075
|
+
style: pickerWrapperStyle,
|
|
42076
|
+
children: renderPanel()
|
|
42077
|
+
})
|
|
42078
|
+
})]
|
|
42079
|
+
}))
|
|
42080
|
+
});
|
|
41470
42081
|
};
|
|
41471
42082
|
/* harmony default export */ var src_cascader_cascader = (Cascader);
|
|
41472
42083
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/form-func-context.ts
|
|
@@ -41894,6 +42505,22 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41894
42505
|
});
|
|
41895
42506
|
};
|
|
41896
42507
|
/* harmony default export */ var utils_validate = ((/* unused pure expression or super */ null && (validate)));
|
|
42508
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/clean-props.ts
|
|
42509
|
+
|
|
42510
|
+
var names = ['delay', 'onDatumBind', 'rules', 'formDatum', 'forceChange', 'trim', 'beforeChange', 'validateHook', 'innerFormNamePath', 'fieldSetValidate', 'combineRules', 'popoverProps', 'inputFocus', 'placeTitle', 'cancelChange', 'integerLimit', 'autoSelect', 'autoFix', 'numType'];
|
|
42511
|
+
|
|
42512
|
+
/**
|
|
42513
|
+
* delete some props if needed, will not modify the pass argument
|
|
42514
|
+
* @param props
|
|
42515
|
+
* @returns {Produced<*, *>}
|
|
42516
|
+
*/
|
|
42517
|
+
function cleanProps(props) {
|
|
42518
|
+
return utils_immer_produce(props, function (draft) {
|
|
42519
|
+
names.forEach(function (p) {
|
|
42520
|
+
return delete draft[p];
|
|
42521
|
+
});
|
|
42522
|
+
});
|
|
42523
|
+
}
|
|
41897
42524
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form-control/use-form-control.ts
|
|
41898
42525
|
|
|
41899
42526
|
|
|
@@ -41909,6 +42536,7 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41909
42536
|
|
|
41910
42537
|
|
|
41911
42538
|
|
|
42539
|
+
|
|
41912
42540
|
var getValue = function getValue(name, formValue) {
|
|
41913
42541
|
if (!name) return undefined;
|
|
41914
42542
|
if (isArray(name)) {
|
|
@@ -42037,7 +42665,7 @@ function useFormControl(props) {
|
|
|
42037
42665
|
}
|
|
42038
42666
|
};
|
|
42039
42667
|
var fullRules = (controlFunc === null || controlFunc === void 0 ? void 0 : controlFunc.combineRules(name, rules || [])) || [];
|
|
42040
|
-
return validate(v, formV, fullRules, validateProps).then(function (res) {
|
|
42668
|
+
return validate(v, formV, fullRules, cleanProps(validateProps)).then(function (res) {
|
|
42041
42669
|
var err = res === true ? undefined : res;
|
|
42042
42670
|
formFunc === null || formFunc === void 0 || formFunc.setError(name, err);
|
|
42043
42671
|
onError === null || onError === void 0 || onError(err);
|
|
@@ -42064,7 +42692,7 @@ function useFormControl(props) {
|
|
|
42064
42692
|
return e;
|
|
42065
42693
|
});
|
|
42066
42694
|
} else {
|
|
42067
|
-
return validate(v, {}, rules || [],
|
|
42695
|
+
return validate(v, {}, rules || [], cleanProps(validateProps)).then(function (res) {
|
|
42068
42696
|
var err = res === true ? undefined : res;
|
|
42069
42697
|
setErrorState(err);
|
|
42070
42698
|
onError === null || onError === void 0 || onError(err);
|
|
@@ -42106,10 +42734,14 @@ function useFormControl(props) {
|
|
|
42106
42734
|
if (isArray(name)) {
|
|
42107
42735
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
42108
42736
|
name.forEach(function (n, index) {
|
|
42109
|
-
|
|
42737
|
+
var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(n);
|
|
42738
|
+
var bindedValue = v === undefined ? dv[index] : v;
|
|
42739
|
+
controlFunc.bind(n, context.mounted ? bindedValue : dv[index], validateField, update);
|
|
42110
42740
|
});
|
|
42111
42741
|
} else {
|
|
42112
|
-
|
|
42742
|
+
var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
42743
|
+
var bindedValue = v === undefined ? defaultValue : v;
|
|
42744
|
+
controlFunc.bind(name, context.mounted ? bindedValue : defaultValue, validateField, update);
|
|
42113
42745
|
}
|
|
42114
42746
|
if (context.mounted) {
|
|
42115
42747
|
devUseWarning.warn('Please avoid modifying the name property after the component has mounted, as this may result in unintended behavior or errors.');
|
|
@@ -42280,7 +42912,8 @@ var cascader_jssStyle = {
|
|
|
42280
42912
|
popover: usePopoverStyle,
|
|
42281
42913
|
checkbox: useCheckboxStyle,
|
|
42282
42914
|
radio: useRadioStyle,
|
|
42283
|
-
spin: useSpinStyle
|
|
42915
|
+
spin: useSpinStyle,
|
|
42916
|
+
common: useCommonStyle
|
|
42284
42917
|
};
|
|
42285
42918
|
var cascader_Cascader = function Cascader(props) {
|
|
42286
42919
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_cascader_cascader, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -44217,6 +44850,18 @@ var getDefaultMode = function getDefaultMode(type) {
|
|
|
44217
44850
|
var mode = getTypeMode(type);
|
|
44218
44851
|
return [mode, mode];
|
|
44219
44852
|
};
|
|
44853
|
+
var getFormatValueArr = function getFormatValueArr(opts) {
|
|
44854
|
+
var dateArr = opts.dateArr,
|
|
44855
|
+
format = opts.format,
|
|
44856
|
+
clearWithUndefined = opts.clearWithUndefined,
|
|
44857
|
+
options = opts.options,
|
|
44858
|
+
type = opts.type;
|
|
44859
|
+
var fmt = use_datepicker_format_getFormat(format, type);
|
|
44860
|
+
return dateArr.map(function (item) {
|
|
44861
|
+
if (!item) return clearWithUndefined ? undefined : '';
|
|
44862
|
+
return util.format(item, fmt, options);
|
|
44863
|
+
});
|
|
44864
|
+
};
|
|
44220
44865
|
var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
44221
44866
|
var value = props.value,
|
|
44222
44867
|
onChange = props.onChange,
|
|
@@ -45285,8 +45930,7 @@ var Day = function Day(props) {
|
|
|
45285
45930
|
}, 'week');
|
|
45286
45931
|
};
|
|
45287
45932
|
var renderFooter = function renderFooter() {
|
|
45288
|
-
var
|
|
45289
|
-
var showLeft = (props.type === 'datetime' || props.type === 'date') && (((_props$rangeDate = props.rangeDate) === null || _props$rangeDate === void 0 ? void 0 : _props$rangeDate[0]) || ((_props$rangeDate2 = props.rangeDate) === null || _props$rangeDate2 === void 0 ? void 0 : _props$rangeDate2[1]));
|
|
45933
|
+
var showLeft = props.type === 'datetime' || props.type === 'date';
|
|
45290
45934
|
var timeStr = func.getTimeStr();
|
|
45291
45935
|
if (!showLeft && !props.showSelNow) return null;
|
|
45292
45936
|
var format = props.format;
|
|
@@ -45307,7 +45951,7 @@ var Day = function Day(props) {
|
|
|
45307
45951
|
marginTop: props.needConfirm && props.range ? -16 : undefined
|
|
45308
45952
|
},
|
|
45309
45953
|
children: [props.type === 'datetime' && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
45310
|
-
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterTime, styles === null || styles === void 0 ? void 0 : styles.datetime
|
|
45954
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterTime, styles === null || styles === void 0 ? void 0 : styles.datetime),
|
|
45311
45955
|
style: {
|
|
45312
45956
|
paddingRight: showNeedConfirm ? 0 : undefined
|
|
45313
45957
|
},
|
|
@@ -45319,7 +45963,7 @@ var Day = function Day(props) {
|
|
|
45319
45963
|
showTitle: false,
|
|
45320
45964
|
format: format
|
|
45321
45965
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
45322
|
-
children: timeStr
|
|
45966
|
+
children: timeStr || '00:00:00'
|
|
45323
45967
|
})]
|
|
45324
45968
|
})
|
|
45325
45969
|
}), props.showSelNow && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -46746,7 +47390,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
46746
47390
|
if (props.open) {
|
|
46747
47391
|
func.startEdit();
|
|
46748
47392
|
}
|
|
46749
|
-
}, []);
|
|
47393
|
+
}, [props.open]);
|
|
46750
47394
|
var _usePopup = use_popup({
|
|
46751
47395
|
open: props.open,
|
|
46752
47396
|
onCollapse: onCollapse,
|
|
@@ -46936,6 +47580,8 @@ var DatePicker = function DatePicker(props0) {
|
|
|
46936
47580
|
|
|
46937
47581
|
|
|
46938
47582
|
|
|
47583
|
+
|
|
47584
|
+
|
|
46939
47585
|
var date_picker_jssStyle = {
|
|
46940
47586
|
datePicker: useDatePickerStyle,
|
|
46941
47587
|
button: useButtonStyle,
|
|
@@ -46949,7 +47595,32 @@ var BaseDatePicker = function BaseDatePicker(props) {
|
|
|
46949
47595
|
}, props));
|
|
46950
47596
|
};
|
|
46951
47597
|
/* harmony default export */ var src_date_picker_date_picker_0 = (function (props) {
|
|
46952
|
-
|
|
47598
|
+
var _useConfig = useConfig(),
|
|
47599
|
+
locale = _useConfig.locale;
|
|
47600
|
+
|
|
47601
|
+
// datepicker 默认值需要提格式化前处理,否则内部会根据 format 进行格式化并再次触发 onChange,参考 v1 v2 的 value hoc 行为
|
|
47602
|
+
var defaultValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
47603
|
+
if (props.defaultValue) {
|
|
47604
|
+
var options = {
|
|
47605
|
+
timeZone: props.timeZone,
|
|
47606
|
+
weekStartsOn: Number(getLocale(locale, 'startOfWeek'))
|
|
47607
|
+
};
|
|
47608
|
+
var type = props.type || 'date';
|
|
47609
|
+
var format = use_datepicker_format_getFormat(props.format, type);
|
|
47610
|
+
var dateArr = convertValueToDateArr(props.defaultValue, format, options);
|
|
47611
|
+
var formattedDefaultValue = getFormatValueArr({
|
|
47612
|
+
dateArr: dateArr,
|
|
47613
|
+
format: format,
|
|
47614
|
+
type: type,
|
|
47615
|
+
options: options
|
|
47616
|
+
});
|
|
47617
|
+
return props.range ? formattedDefaultValue : formattedDefaultValue[0];
|
|
47618
|
+
}
|
|
47619
|
+
return props.defaultValue;
|
|
47620
|
+
}, []);
|
|
47621
|
+
return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
47622
|
+
defaultValue: defaultValue
|
|
47623
|
+
}), BaseDatePicker);
|
|
46953
47624
|
});
|
|
46954
47625
|
;// CONCATENATED MODULE: ./src/date-picker/index.ts
|
|
46955
47626
|
|
|
@@ -47478,7 +48149,8 @@ var Modal = function Modal(props) {
|
|
|
47478
48149
|
renderEd: false,
|
|
47479
48150
|
isMask: false,
|
|
47480
48151
|
mouseDownTarget: null,
|
|
47481
|
-
mouseUpTarget: null
|
|
48152
|
+
mouseUpTarget: null,
|
|
48153
|
+
content: null
|
|
47482
48154
|
}),
|
|
47483
48155
|
context = _useRef.current;
|
|
47484
48156
|
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.visible || props.autoShow),
|
|
@@ -47721,6 +48393,14 @@ var Modal = function Modal(props) {
|
|
|
47721
48393
|
if (props.moveable && !props.fullScreen) {
|
|
47722
48394
|
panelStyle.transform = "translate(".concat(moveInfo.pos.x, "px, ").concat(moveInfo.pos.y, "px)");
|
|
47723
48395
|
}
|
|
48396
|
+
var renderContent = function renderContent() {
|
|
48397
|
+
if (!props.visible && context.content !== null) return context.content;
|
|
48398
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48399
|
+
children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
|
|
48400
|
+
});
|
|
48401
|
+
};
|
|
48402
|
+
var content = renderContent();
|
|
48403
|
+
context.content = content;
|
|
47724
48404
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFooterProvider, {
|
|
47725
48405
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
47726
48406
|
onClick: function onClick(e) {
|
|
@@ -47739,11 +48419,11 @@ var Modal = function Modal(props) {
|
|
|
47739
48419
|
onMouseUp: handleMaskMouseUp,
|
|
47740
48420
|
onClick: handleMaskClick,
|
|
47741
48421
|
onAnimationStart: updateOrigin,
|
|
47742
|
-
children: /*#__PURE__*/(0,jsx_runtime.
|
|
48422
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
47743
48423
|
ref: panelRef,
|
|
47744
48424
|
className: classnames_default()(modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.panel, props.className),
|
|
47745
48425
|
style: panelStyle,
|
|
47746
|
-
children:
|
|
48426
|
+
children: content
|
|
47747
48427
|
})
|
|
47748
48428
|
}))
|
|
47749
48429
|
})
|
|
@@ -47886,6 +48566,9 @@ var method = function method(type, jssStyle) {
|
|
|
47886
48566
|
|
|
47887
48567
|
var modal_devUseWarning = devUseWarning;
|
|
47888
48568
|
var modal_Modal = function Modal(props) {
|
|
48569
|
+
var _props$jssStyle, _props$jssStyle$modal;
|
|
48570
|
+
// inject jssStyle
|
|
48571
|
+
(_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$modal = _props$jssStyle.modal) === null || _props$jssStyle$modal === void 0 || _props$jssStyle$modal.call(_props$jssStyle);
|
|
47889
48572
|
if (props.maskOpacity) {
|
|
47890
48573
|
modal_devUseWarning.deprecated('maskOpacity', 'maskBackground', 'Modal');
|
|
47891
48574
|
}
|
|
@@ -49370,7 +50053,8 @@ var useForm = function useForm(props) {
|
|
|
49370
50053
|
size = props.size,
|
|
49371
50054
|
colon = props.colon,
|
|
49372
50055
|
formName = props.name,
|
|
49373
|
-
scrollParent = props.scrollParent
|
|
50056
|
+
scrollParent = props.scrollParent,
|
|
50057
|
+
isControl = props.isControl;
|
|
49374
50058
|
var deepSetOptions = {
|
|
49375
50059
|
removeUndefined: removeUndefined,
|
|
49376
50060
|
forceSet: true
|
|
@@ -49524,7 +50208,7 @@ var useForm = function useForm(props) {
|
|
|
49524
50208
|
if (errors.length > 0) {
|
|
49525
50209
|
var errorFields = [];
|
|
49526
50210
|
for (var _key in context.errors) {
|
|
49527
|
-
if (context.errors[_key]) {
|
|
50211
|
+
if (context.errors[_key] && context.names.has(_key)) {
|
|
49528
50212
|
var _context$errors$_key;
|
|
49529
50213
|
errorFields.push({
|
|
49530
50214
|
name: _key,
|
|
@@ -49626,13 +50310,16 @@ var useForm = function useForm(props) {
|
|
|
49626
50310
|
var values = Object.keys(vals);
|
|
49627
50311
|
// 针对 name 为数组模式,如 datepicker 的 name={['startTime', 'endTime']} 时,前者校验可能需要依赖后者,因此需要提前将后者数据整合至 draft 用于多字段整合校验
|
|
49628
50312
|
values.forEach(function (key) {
|
|
49629
|
-
|
|
50313
|
+
// upload组件返回的可能是函数: (prev) => [...prev, file]
|
|
50314
|
+
var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
|
|
50315
|
+
deepSet(draft, key, valueOfKey, deepSetOptions);
|
|
49630
50316
|
});
|
|
49631
50317
|
values.forEach(function (key) {
|
|
49632
50318
|
if (option.validate) {
|
|
49633
50319
|
var _context$validateMap$;
|
|
49634
50320
|
(_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
|
|
49635
|
-
|
|
50321
|
+
var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
|
|
50322
|
+
validate(key, valueOfKey, current(draft));
|
|
49636
50323
|
});
|
|
49637
50324
|
}
|
|
49638
50325
|
});
|
|
@@ -49643,7 +50330,11 @@ var useForm = function useForm(props) {
|
|
|
49643
50330
|
fullKeyPaths.forEach(function (key) {
|
|
49644
50331
|
delete context.serverErrors[key];
|
|
49645
50332
|
});
|
|
49646
|
-
|
|
50333
|
+
if (option.forceUpdate) {
|
|
50334
|
+
update();
|
|
50335
|
+
} else {
|
|
50336
|
+
update(fullKeyPaths);
|
|
50337
|
+
}
|
|
49647
50338
|
});
|
|
49648
50339
|
var updateDefaultValue = function updateDefaultValue() {
|
|
49649
50340
|
if (!context.mounted) return;
|
|
@@ -49688,6 +50379,7 @@ var useForm = function useForm(props) {
|
|
|
49688
50379
|
});
|
|
49689
50380
|
var submit = use_persist_fn(function () {
|
|
49690
50381
|
var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
50382
|
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
49691
50383
|
if (disabled) return;
|
|
49692
50384
|
if (context.submitLock) {
|
|
49693
50385
|
return;
|
|
@@ -49705,32 +50397,29 @@ var useForm = function useForm(props) {
|
|
|
49705
50397
|
while (1) switch (_context.prev = _context.next) {
|
|
49706
50398
|
case 0:
|
|
49707
50399
|
if (withValidate) {
|
|
49708
|
-
_context.next =
|
|
50400
|
+
_context.next = 4;
|
|
49709
50401
|
break;
|
|
49710
50402
|
}
|
|
49711
50403
|
(_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 || _props$onSubmit.call(props, (_context$value = context.value) !== null && _context$value !== void 0 ? _context$value : {});
|
|
50404
|
+
callback === null || callback === void 0 || callback();
|
|
49712
50405
|
return _context.abrupt("return");
|
|
49713
|
-
case
|
|
49714
|
-
_context.next =
|
|
50406
|
+
case 4:
|
|
50407
|
+
_context.next = 6;
|
|
49715
50408
|
return validateFields(undefined, {
|
|
49716
50409
|
ignoreBind: true
|
|
49717
50410
|
}).catch(function (e) {
|
|
49718
50411
|
return e;
|
|
49719
50412
|
});
|
|
49720
|
-
case
|
|
50413
|
+
case 6:
|
|
49721
50414
|
result = _context.sent;
|
|
49722
|
-
if (
|
|
49723
|
-
|
|
49724
|
-
|
|
50415
|
+
if (result === true) {
|
|
50416
|
+
(_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
|
|
50417
|
+
if (activeEl) activeEl.focus();
|
|
50418
|
+
} else {
|
|
50419
|
+
handleSubmitError(result);
|
|
49725
50420
|
}
|
|
49726
|
-
|
|
49727
|
-
|
|
49728
|
-
_context.next = 13;
|
|
49729
|
-
break;
|
|
49730
|
-
case 11:
|
|
49731
|
-
handleSubmitError(result);
|
|
49732
|
-
return _context.abrupt("return");
|
|
49733
|
-
case 13:
|
|
50421
|
+
callback === null || callback === void 0 || callback();
|
|
50422
|
+
case 9:
|
|
49734
50423
|
case "end":
|
|
49735
50424
|
return _context.stop();
|
|
49736
50425
|
}
|
|
@@ -49812,10 +50501,8 @@ var useForm = function useForm(props) {
|
|
|
49812
50501
|
context.updateMap[n] = new Set();
|
|
49813
50502
|
}
|
|
49814
50503
|
context.updateMap[n].add(updateFn);
|
|
49815
|
-
var shouldTriggerResetChange = context.removeArr.has(n);
|
|
49816
50504
|
context.removeArr.delete(n);
|
|
49817
|
-
|
|
49818
|
-
if (shouldTriggerDefaultChange || shouldTriggerResetChange) {
|
|
50505
|
+
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
49819
50506
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
49820
50507
|
onChange(function (v) {
|
|
49821
50508
|
deepSet(v, n, df, deepSetOptions);
|
|
@@ -49835,7 +50522,6 @@ var useForm = function useForm(props) {
|
|
|
49835
50522
|
}
|
|
49836
50523
|
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
49837
50524
|
context.names.delete(n);
|
|
49838
|
-
delete context.errors[n];
|
|
49839
50525
|
delete context.defaultValues[n];
|
|
49840
50526
|
}
|
|
49841
50527
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
@@ -49930,7 +50616,10 @@ var useForm = function useForm(props) {
|
|
|
49930
50616
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
49931
50617
|
context.removeLock = false;
|
|
49932
50618
|
// 内部 onChange 改的 value, 不需要更新
|
|
49933
|
-
if (props.value === context.value)
|
|
50619
|
+
if (props.value === context.value) {
|
|
50620
|
+
if (!isControl) update();
|
|
50621
|
+
return;
|
|
50622
|
+
}
|
|
49934
50623
|
if (initValidate && !context.resetTime) {
|
|
49935
50624
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
49936
50625
|
var oldValue = deepGet(preValue || emptyObj, key);
|
|
@@ -50000,11 +50689,12 @@ var Form = function Form(props) {
|
|
|
50000
50689
|
rest = objectWithoutProperties_default()(props, form_excluded);
|
|
50001
50690
|
var formClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$form = jssStyle.form) === null || _jssStyle$form === void 0 ? void 0 : _jssStyle$form.call(jssStyle);
|
|
50002
50691
|
var modalFormContext = useFormFooter();
|
|
50692
|
+
var isControl = ('value' in props);
|
|
50003
50693
|
var inputAbleParams = {
|
|
50004
50694
|
value: props.value,
|
|
50005
50695
|
onChange: props.onChange,
|
|
50006
50696
|
defaultValue: props.defaultValue,
|
|
50007
|
-
control:
|
|
50697
|
+
control: isControl,
|
|
50008
50698
|
beforeChange: undefined,
|
|
50009
50699
|
reserveAble: false
|
|
50010
50700
|
};
|
|
@@ -50015,7 +50705,8 @@ var Form = function Form(props) {
|
|
|
50015
50705
|
var _useForm = use_form(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
50016
50706
|
value: value,
|
|
50017
50707
|
onChange: onChange,
|
|
50018
|
-
formElRef: formElRef
|
|
50708
|
+
formElRef: formElRef,
|
|
50709
|
+
isControl: isControl
|
|
50019
50710
|
})),
|
|
50020
50711
|
Provider = _useForm.Provider,
|
|
50021
50712
|
ProviderProps = _useForm.ProviderProps,
|
|
@@ -50229,11 +50920,11 @@ var Tooltip = function Tooltip(props) {
|
|
|
50229
50920
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
50230
50921
|
updateKey = _React$useState2[0],
|
|
50231
50922
|
setUpdateKey = _React$useState2[1];
|
|
50232
|
-
var handleUpdateKey = function
|
|
50923
|
+
var handleUpdateKey = usePersistFn(function () {
|
|
50233
50924
|
setUpdateKey(function (prev) {
|
|
50234
50925
|
return (prev + 1) % 2;
|
|
50235
50926
|
});
|
|
50236
|
-
};
|
|
50927
|
+
});
|
|
50237
50928
|
var bindEvents = function bindEvents() {
|
|
50238
50929
|
var _window;
|
|
50239
50930
|
var targetEl = targetRef.current;
|
|
@@ -50242,10 +50933,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50242
50933
|
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
50243
50934
|
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
50244
50935
|
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
50245
|
-
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50246
|
-
if (scrollContainer) {
|
|
50247
|
-
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50248
|
-
}
|
|
50249
50936
|
};
|
|
50250
50937
|
var unbindEvents = function unbindEvents() {
|
|
50251
50938
|
var _window2;
|
|
@@ -50257,10 +50944,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50257
50944
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
50258
50945
|
targetEl.removeEventListener('click', closePop);
|
|
50259
50946
|
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
50260
|
-
var scrollContainer = getClosestScrollContainer(targetEl);
|
|
50261
|
-
if (scrollContainer) {
|
|
50262
|
-
scrollContainer.addEventListener('scroll', handleUpdateKey);
|
|
50263
|
-
}
|
|
50264
50947
|
};
|
|
50265
50948
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
50266
50949
|
if (!persistent) return;
|
|
@@ -50371,6 +51054,7 @@ var FormItem = function FormItem(props) {
|
|
|
50371
51054
|
labelVerticalAlign = _labelConfig$rest.labelVerticalAlign,
|
|
50372
51055
|
inline = _labelConfig$rest.inline,
|
|
50373
51056
|
keepErrorHeight = _labelConfig$rest.keepErrorHeight,
|
|
51057
|
+
keepErrorBelow = _labelConfig$rest.keepErrorBelow,
|
|
50374
51058
|
colon = _labelConfig$rest.colon;
|
|
50375
51059
|
var renderLabel = function renderLabel() {
|
|
50376
51060
|
if (label === undefined || label === null || label === '') return null;
|
|
@@ -50436,6 +51120,9 @@ var FormItem = function FormItem(props) {
|
|
|
50436
51120
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
50437
51121
|
value: ProviderValue,
|
|
50438
51122
|
children: children
|
|
51123
|
+
}), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51124
|
+
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
51125
|
+
children: tip
|
|
50439
51126
|
}), showError && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
50440
51127
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
|
|
50441
51128
|
children: errors.map(function (error, index) {
|
|
@@ -50445,9 +51132,6 @@ var FormItem = function FormItem(props) {
|
|
|
50445
51132
|
})
|
|
50446
51133
|
}, index);
|
|
50447
51134
|
})
|
|
50448
|
-
}), !!tip && !showError && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
50449
|
-
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
50450
|
-
children: tip
|
|
50451
51135
|
})]
|
|
50452
51136
|
}))]
|
|
50453
51137
|
}));
|
|
@@ -50874,7 +51558,6 @@ var RESPONSIVE = {
|
|
|
50874
51558
|
xl: '1200'
|
|
50875
51559
|
};
|
|
50876
51560
|
var GridClassName = "".concat(src_config_config.prefix, "-grid");
|
|
50877
|
-
var GridFullClassName = "".concat(src_config_config.prefix, "-grid-full");
|
|
50878
51561
|
var defaultResponsive = 'md';
|
|
50879
51562
|
function util_createStyle(text, id) {
|
|
50880
51563
|
if (!is_isBrowser()) {
|
|
@@ -50888,12 +51571,12 @@ function util_createStyle(text, id) {
|
|
|
50888
51571
|
}
|
|
50889
51572
|
function generateGrid(width, className, responsive) {
|
|
50890
51573
|
var minWidth = RESPONSIVE[responsive];
|
|
50891
|
-
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(className, "{width: ").concat(width, "%} }");
|
|
51574
|
+
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(GridClassName, ".").concat(className, "{width: ").concat(width, "%} }");
|
|
50892
51575
|
util_createStyle(text, className);
|
|
50893
51576
|
}
|
|
50894
51577
|
function generateOffset(width, className, responsive) {
|
|
50895
51578
|
var minWidth = RESPONSIVE[responsive];
|
|
50896
|
-
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(className, "{margin-left: ").concat(width, "%} }");
|
|
51579
|
+
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(GridClassName, ".").concat(className, "{margin-left: ").concat(width, "%} }");
|
|
50897
51580
|
util_createStyle(text, className);
|
|
50898
51581
|
}
|
|
50899
51582
|
function generate(w, type, res) {
|
|
@@ -50934,24 +51617,18 @@ function getGrid(opt) {
|
|
|
50934
51617
|
responsive = _options.responsive;
|
|
50935
51618
|
var gridClass = generate(width, 'grid', responsive);
|
|
50936
51619
|
var offsetClass = generate(offset, 'offset', responsive);
|
|
50937
|
-
return "".concat(
|
|
51620
|
+
return "".concat(gridClass, " ").concat(offsetClass);
|
|
50938
51621
|
}
|
|
50939
|
-
function init() {
|
|
50940
|
-
var text = [];
|
|
50941
|
-
text.push("\n.".concat(GridClassName, " {\n position: relative;\n display: inline-block;\n zoom: 1;\n letter-spacing: normal;\n word-spacing: normal;\n vertical-align: top;\n text-rendering: auto;\n box-sizing: border-box;\n}"));
|
|
50942
|
-
text.push(".".concat(GridFullClassName, "{width:100%}"));
|
|
50943
|
-
util_createStyle(text.join(''), GridClassName);
|
|
50944
|
-
}
|
|
50945
|
-
init();
|
|
50946
51622
|
;// CONCATENATED MODULE: ../base/src/grid/grid.tsx
|
|
50947
51623
|
|
|
50948
51624
|
|
|
50949
|
-
var grid_excluded = ["width", "offset", "responsive", "stretch", "children", "gutter"];
|
|
51625
|
+
var grid_excluded = ["width", "offset", "responsive", "stretch", "children", "gutter", "jssStyle"];
|
|
50950
51626
|
|
|
50951
51627
|
|
|
50952
51628
|
|
|
50953
51629
|
|
|
50954
|
-
var
|
|
51630
|
+
var Grid = function Grid(props) {
|
|
51631
|
+
var _jssStyle$grid;
|
|
50955
51632
|
var _props$width = props.width,
|
|
50956
51633
|
width = _props$width === void 0 ? 1 : _props$width,
|
|
50957
51634
|
offset = props.offset,
|
|
@@ -50959,6 +51636,7 @@ var Gird = function Gird(props) {
|
|
|
50959
51636
|
stretch = props.stretch,
|
|
50960
51637
|
children = props.children,
|
|
50961
51638
|
gutter = props.gutter,
|
|
51639
|
+
jssStyle = props.jssStyle,
|
|
50962
51640
|
other = objectWithoutProperties_default()(props, grid_excluded);
|
|
50963
51641
|
var autoCount = 0;
|
|
50964
51642
|
var settleWidth = 0;
|
|
@@ -50969,7 +51647,8 @@ var Gird = function Gird(props) {
|
|
|
50969
51647
|
}
|
|
50970
51648
|
});
|
|
50971
51649
|
var autoWidth = autoCount > 0 ? (1 - settleWidth) / autoCount : 0;
|
|
50972
|
-
var
|
|
51650
|
+
var gridClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$grid = jssStyle.grid) === null || _jssStyle$grid === void 0 ? void 0 : _jssStyle$grid.call(jssStyle);
|
|
51651
|
+
var className = classnames_default()(props.className, gridClasses === null || gridClasses === void 0 ? void 0 : gridClasses.rootClass, gridClasses === null || gridClasses === void 0 ? void 0 : gridClasses.wrapper, gridClasses === null || gridClasses === void 0 ? void 0 : gridClasses.full, getGrid({
|
|
50973
51652
|
width: width,
|
|
50974
51653
|
offset: offset,
|
|
50975
51654
|
responsive: responsive
|
|
@@ -51007,13 +51686,28 @@ var Gird = function Gird(props) {
|
|
|
51007
51686
|
})
|
|
51008
51687
|
}));
|
|
51009
51688
|
};
|
|
51010
|
-
|
|
51011
|
-
/* harmony default export */ var
|
|
51689
|
+
Grid.isGrid = true;
|
|
51690
|
+
/* harmony default export */ var grid_grid = (Grid);
|
|
51691
|
+
;// CONCATENATED MODULE: ./src/grid/grid.tsx
|
|
51692
|
+
|
|
51693
|
+
|
|
51694
|
+
|
|
51695
|
+
|
|
51696
|
+
var GridWithStyle = function GridWithStyle(props) {
|
|
51697
|
+
var jssStyle = {
|
|
51698
|
+
grid: useGridStyle
|
|
51699
|
+
};
|
|
51700
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(grid_grid, objectSpread2_default()({
|
|
51701
|
+
jssStyle: jssStyle
|
|
51702
|
+
}, props));
|
|
51703
|
+
};
|
|
51704
|
+
GridWithStyle.isGrid = true;
|
|
51705
|
+
/* harmony default export */ var src_grid_grid = (GridWithStyle);
|
|
51012
51706
|
;// CONCATENATED MODULE: ./src/grid/index.ts
|
|
51013
51707
|
|
|
51014
|
-
var GridComp =
|
|
51708
|
+
var GridComp = src_grid_grid;
|
|
51015
51709
|
GridComp.displayName = 'ShineoutGrid';
|
|
51016
|
-
/* harmony default export */ var
|
|
51710
|
+
/* harmony default export */ var src_grid_0 = (GridComp);
|
|
51017
51711
|
;// CONCATENATED MODULE: ../base/src/icon/icon.tsx
|
|
51018
51712
|
|
|
51019
51713
|
|
|
@@ -51156,6 +51850,10 @@ var useImage = function useImage() {
|
|
|
51156
51850
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
51157
51851
|
status = _React$useState2[0],
|
|
51158
51852
|
setStatus = _React$useState2[1];
|
|
51853
|
+
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({}),
|
|
51854
|
+
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
|
|
51855
|
+
imgCoverStyle = _React$useState4[0],
|
|
51856
|
+
setImgCoverStyle = _React$useState4[1];
|
|
51159
51857
|
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
51160
51858
|
var getUrl = function getUrl(url) {
|
|
51161
51859
|
var auto = 'autoSSL' in props ? autoSSL : use_image_config.autoSSL;
|
|
@@ -51190,6 +51888,35 @@ var useImage = function useImage() {
|
|
|
51190
51888
|
};
|
|
51191
51889
|
img.src = getUrl(alt);
|
|
51192
51890
|
};
|
|
51891
|
+
var handleCoverStyle = function handleCoverStyle(img) {
|
|
51892
|
+
var container = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current;
|
|
51893
|
+
if (!container) return;
|
|
51894
|
+
|
|
51895
|
+
// 根据容器的宽高获取宽高比
|
|
51896
|
+
var containerWidth = container.clientWidth;
|
|
51897
|
+
var containerHeight = container.clientHeight;
|
|
51898
|
+
var containerRatio = containerWidth / containerHeight;
|
|
51899
|
+
|
|
51900
|
+
// 根据图片的自然尺寸获取宽高比
|
|
51901
|
+
var imageWidth = img.naturalWidth;
|
|
51902
|
+
var imageHeight = img.naturalHeight;
|
|
51903
|
+
var imageRatio = imageWidth / imageHeight;
|
|
51904
|
+
|
|
51905
|
+
// 判断宽高比,决定图片填充策略
|
|
51906
|
+
if (imageRatio > containerRatio) {
|
|
51907
|
+
// 图片更宽,宽度占满容器,高度自适应
|
|
51908
|
+
setImgCoverStyle({
|
|
51909
|
+
height: '100%',
|
|
51910
|
+
width: 'auto'
|
|
51911
|
+
});
|
|
51912
|
+
} else {
|
|
51913
|
+
// 图片更高,填满容器高度
|
|
51914
|
+
setImgCoverStyle({
|
|
51915
|
+
width: '100%',
|
|
51916
|
+
height: 'auto'
|
|
51917
|
+
});
|
|
51918
|
+
}
|
|
51919
|
+
};
|
|
51193
51920
|
var markToRender = function markToRender() {
|
|
51194
51921
|
if (!src) {
|
|
51195
51922
|
handleAlt();
|
|
@@ -51197,7 +51924,10 @@ var useImage = function useImage() {
|
|
|
51197
51924
|
}
|
|
51198
51925
|
var img = new window.Image();
|
|
51199
51926
|
img.onload = function () {
|
|
51200
|
-
|
|
51927
|
+
setStatus(SRC);
|
|
51928
|
+
if (props.fit === 'fill') {
|
|
51929
|
+
handleCoverStyle(img);
|
|
51930
|
+
}
|
|
51201
51931
|
};
|
|
51202
51932
|
img.onerror = function (e) {
|
|
51203
51933
|
return handleError(SRC, e);
|
|
@@ -51226,7 +51956,9 @@ var useImage = function useImage() {
|
|
|
51226
51956
|
alt: alt,
|
|
51227
51957
|
draggable: !noImgDrag
|
|
51228
51958
|
});
|
|
51229
|
-
return objectSpread2_default()({
|
|
51959
|
+
return objectSpread2_default()({
|
|
51960
|
+
style: imgCoverStyle
|
|
51961
|
+
}, mergedEventHandlers);
|
|
51230
51962
|
};
|
|
51231
51963
|
var getImageDivProps = function getImageDivProps() {
|
|
51232
51964
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -51994,7 +52726,8 @@ var Image = function Image(props) {
|
|
|
51994
52726
|
href: href,
|
|
51995
52727
|
lazy: lazy,
|
|
51996
52728
|
autoSSL: autoSSL,
|
|
51997
|
-
noImgDrag: noImgDrag
|
|
52729
|
+
noImgDrag: noImgDrag,
|
|
52730
|
+
fit: fit
|
|
51998
52731
|
}, rest)),
|
|
51999
52732
|
status = _useImage.status,
|
|
52000
52733
|
getRootProps = _useImage.getRootProps,
|
|
@@ -52073,7 +52806,7 @@ var Image = function Image(props) {
|
|
|
52073
52806
|
|
|
52074
52807
|
// 渲染 img / div 类型的内部标签
|
|
52075
52808
|
var renderInner = function renderInner(src) {
|
|
52076
|
-
return fit === '
|
|
52809
|
+
return fit === 'fit' ? renderDivInnerEl(src) : renderImgeInnerEl(src);
|
|
52077
52810
|
};
|
|
52078
52811
|
|
|
52079
52812
|
// 默认占位图
|
|
@@ -53024,7 +53757,7 @@ var UseSelectGroup = function UseSelectGroup(props) {
|
|
|
53024
53757
|
|
|
53025
53758
|
|
|
53026
53759
|
var ListOption = function ListOption(props) {
|
|
53027
|
-
var _jssStyle$select;
|
|
53760
|
+
var _jssStyle$select, _jssStyle$common;
|
|
53028
53761
|
var jssStyle = props.jssStyle,
|
|
53029
53762
|
datum = props.datum,
|
|
53030
53763
|
index = props.index,
|
|
@@ -53040,6 +53773,7 @@ var ListOption = function ListOption(props) {
|
|
|
53040
53773
|
var optionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
53041
53774
|
var config = useConfig();
|
|
53042
53775
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
53776
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
53043
53777
|
var isChecked = datum.check(data);
|
|
53044
53778
|
var isDisabled = datum.disabledCheck(data);
|
|
53045
53779
|
var rootClass = classnames_default()(styles === null || styles === void 0 ? void 0 : styles.option, "option-".concat(index), defineProperty_default()({}, styles === null || styles === void 0 ? void 0 : styles.optionHover, isHover));
|
|
@@ -53070,7 +53804,15 @@ var ListOption = function ListOption(props) {
|
|
|
53070
53804
|
children: icons_config.select.Check
|
|
53071
53805
|
});
|
|
53072
53806
|
};
|
|
53073
|
-
var
|
|
53807
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
53808
|
+
filterText = _useContext.filterText,
|
|
53809
|
+
highlight = _useContext.highlight;
|
|
53810
|
+
var result = getHighlightText({
|
|
53811
|
+
enable: highlight,
|
|
53812
|
+
nodeList: renderItem(data),
|
|
53813
|
+
searchWords: filterText,
|
|
53814
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
53815
|
+
});
|
|
53074
53816
|
var title = typeof result === 'string' ? result : '';
|
|
53075
53817
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
53076
53818
|
if (!isAnimationFinish) return;
|
|
@@ -53354,7 +54096,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53354
54096
|
id = props.id,
|
|
53355
54097
|
onChange = props.onChange,
|
|
53356
54098
|
disabled = props.disabled,
|
|
53357
|
-
checked = props.checked
|
|
54099
|
+
checked = props.checked,
|
|
54100
|
+
size = props.size;
|
|
53358
54101
|
var _useTreeContext = useTreeContext(),
|
|
53359
54102
|
unBindUpdate = _useTreeContext.unBindUpdate;
|
|
53360
54103
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -53371,7 +54114,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53371
54114
|
checked: checked,
|
|
53372
54115
|
disabled: disabled,
|
|
53373
54116
|
onChange: onChange,
|
|
53374
|
-
needStopPropagation: true
|
|
54117
|
+
needStopPropagation: true,
|
|
54118
|
+
size: size
|
|
53375
54119
|
});
|
|
53376
54120
|
};
|
|
53377
54121
|
/* harmony default export */ var tree_checkbox = (TreeCheckbox);
|
|
@@ -53387,7 +54131,10 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53387
54131
|
|
|
53388
54132
|
|
|
53389
54133
|
|
|
54134
|
+
|
|
54135
|
+
|
|
53390
54136
|
var NodeContent = function NodeContent(props) {
|
|
54137
|
+
var _jssStyle$common;
|
|
53391
54138
|
var jssStyle = props.jssStyle,
|
|
53392
54139
|
id = props.id,
|
|
53393
54140
|
virtual = props.virtual,
|
|
@@ -53418,11 +54165,14 @@ var NodeContent = function NodeContent(props) {
|
|
|
53418
54165
|
var forceUpdate = useRender();
|
|
53419
54166
|
var _useTreeContext = useTreeContext(),
|
|
53420
54167
|
isDisabled = _useTreeContext.isDisabled,
|
|
53421
|
-
bindUpdate = _useTreeContext.bindUpdate
|
|
54168
|
+
bindUpdate = _useTreeContext.bindUpdate,
|
|
54169
|
+
size = _useTreeContext.size,
|
|
54170
|
+
leafIcon = _useTreeContext.leafIcon;
|
|
53422
54171
|
var config = useConfig();
|
|
53423
54172
|
var disabled = isDisabled(id);
|
|
53424
54173
|
bindUpdate(id, forceUpdate);
|
|
53425
54174
|
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
54175
|
+
var commonStyles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle)) || {};
|
|
53426
54176
|
var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode), contentStyle.contentDisabled, disabled));
|
|
53427
54177
|
var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
|
|
53428
54178
|
var hasExpandIcons = expandIcons !== undefined;
|
|
@@ -53459,7 +54209,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
53459
54209
|
var handleNodeCheck = function handleNodeCheck(_, checked) {
|
|
53460
54210
|
set(id, checked ? 1 : 0);
|
|
53461
54211
|
if (onChange) {
|
|
53462
|
-
onChange(getValue());
|
|
54212
|
+
onChange(getValue(), id);
|
|
53463
54213
|
}
|
|
53464
54214
|
};
|
|
53465
54215
|
var checked = getChecked(id);
|
|
@@ -53538,10 +54288,30 @@ var NodeContent = function NodeContent(props) {
|
|
|
53538
54288
|
if (Array.isArray(children) || children === null) return null;
|
|
53539
54289
|
if (fetching && !children) return renderLoading();
|
|
53540
54290
|
if (loader && children === undefined) return indicator;
|
|
54291
|
+
if (leafIcon) {
|
|
54292
|
+
var $iconContent = null;
|
|
54293
|
+
if (leafIcon === true) {
|
|
54294
|
+
$iconContent = icons_config.tree.Leaf;
|
|
54295
|
+
} else if (isFunc(leafIcon)) {
|
|
54296
|
+
$iconContent = leafIcon(data);
|
|
54297
|
+
} else {
|
|
54298
|
+
$iconContent = leafIcon;
|
|
54299
|
+
}
|
|
54300
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54301
|
+
className: contentStyle.iconWrapper,
|
|
54302
|
+
dir: config.direction,
|
|
54303
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54304
|
+
className: classnames_default()(contentStyle.icon, iconClass),
|
|
54305
|
+
dir: config.direction,
|
|
54306
|
+
children: $iconContent
|
|
54307
|
+
})
|
|
54308
|
+
});
|
|
54309
|
+
}
|
|
53541
54310
|
return null;
|
|
53542
54311
|
};
|
|
53543
54312
|
var renderCheckbox = function renderCheckbox() {
|
|
53544
54313
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_checkbox, {
|
|
54314
|
+
size: size,
|
|
53545
54315
|
jssStyle: jssStyle,
|
|
53546
54316
|
id: id,
|
|
53547
54317
|
disabled: disabled,
|
|
@@ -53550,11 +54320,19 @@ var NodeContent = function NodeContent(props) {
|
|
|
53550
54320
|
onChange: handleNodeCheck
|
|
53551
54321
|
});
|
|
53552
54322
|
};
|
|
54323
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
54324
|
+
filterText = _useContext.filterText,
|
|
54325
|
+
highlightFilter = _useContext.highlight;
|
|
53553
54326
|
var renderNode = function renderNode() {
|
|
53554
54327
|
var render = isFunc(renderItem) ? renderItem : function (item) {
|
|
53555
54328
|
return item[renderItem];
|
|
53556
54329
|
};
|
|
53557
|
-
return
|
|
54330
|
+
return getHighlightText({
|
|
54331
|
+
enable: highlightFilter,
|
|
54332
|
+
nodeList: render(data, expanded, active, id),
|
|
54333
|
+
searchWords: filterText,
|
|
54334
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
54335
|
+
});
|
|
53558
54336
|
};
|
|
53559
54337
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
53560
54338
|
className: rootClass,
|
|
@@ -54014,6 +54792,7 @@ var useTreeVirtualNode = function useTreeVirtualNode(props) {
|
|
|
54014
54792
|
|
|
54015
54793
|
|
|
54016
54794
|
|
|
54795
|
+
|
|
54017
54796
|
var tree_virtual_node_placeElement = null;
|
|
54018
54797
|
var VirtualNode = function VirtualNode(props) {
|
|
54019
54798
|
var jssStyle = props.jssStyle,
|
|
@@ -54039,7 +54818,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54039
54818
|
onChange = props.onChange,
|
|
54040
54819
|
onNodeClick = props.onNodeClick,
|
|
54041
54820
|
onToggle = props.onToggle,
|
|
54042
|
-
actionOnClick = props.actionOnClick
|
|
54821
|
+
actionOnClick = props.actionOnClick,
|
|
54822
|
+
size = props.size;
|
|
54043
54823
|
var config = useConfig();
|
|
54044
54824
|
var datum = useTreeContext();
|
|
54045
54825
|
var element = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -54080,14 +54860,28 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54080
54860
|
});
|
|
54081
54861
|
if (onToggle) onToggle(id, nextExpanded);
|
|
54082
54862
|
};
|
|
54083
|
-
|
|
54863
|
+
var indent = size === "large" ? 32 : 24;
|
|
54864
|
+
var $indents;
|
|
54865
|
+
if (line) {
|
|
54866
|
+
$indents = Array.from({
|
|
54867
|
+
length: level - 1
|
|
54868
|
+
}).map(function (_, index) {
|
|
54869
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54870
|
+
className: contentStyle.lineIndent,
|
|
54871
|
+
style: {
|
|
54872
|
+
left: (index + 1) * indent
|
|
54873
|
+
}
|
|
54874
|
+
}, index);
|
|
54875
|
+
});
|
|
54876
|
+
}
|
|
54877
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
54084
54878
|
ref: element,
|
|
54085
54879
|
className: rootClass,
|
|
54086
54880
|
dir: config.direction,
|
|
54087
54881
|
style: {
|
|
54088
|
-
paddingLeft: level *
|
|
54882
|
+
paddingLeft: level * indent
|
|
54089
54883
|
},
|
|
54090
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
54884
|
+
children: [$indents, /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
54091
54885
|
virtual: true,
|
|
54092
54886
|
jssStyle: jssStyle,
|
|
54093
54887
|
isControlled: isControlled,
|
|
@@ -54118,7 +54912,7 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54118
54912
|
onNodeClick: onNodeClick,
|
|
54119
54913
|
onToggle: handleToggle,
|
|
54120
54914
|
actionOnClick: actionOnClick
|
|
54121
|
-
})
|
|
54915
|
+
})]
|
|
54122
54916
|
});
|
|
54123
54917
|
};
|
|
54124
54918
|
/* harmony default export */ var tree_virtual_node = (VirtualNode);
|
|
@@ -54297,11 +55091,15 @@ var Root = function Root(props) {
|
|
|
54297
55091
|
|
|
54298
55092
|
|
|
54299
55093
|
|
|
55094
|
+
var SIZE_MAP = {
|
|
55095
|
+
'small': 28,
|
|
55096
|
+
'default': 36,
|
|
55097
|
+
'large': 42
|
|
55098
|
+
};
|
|
54300
55099
|
var TreeVirtual = function TreeVirtual(props) {
|
|
54301
55100
|
var jssStyle = props.jssStyle,
|
|
54302
55101
|
height = props.height,
|
|
54303
|
-
|
|
54304
|
-
lineHeight = _props$lineHeight === void 0 ? 36 : _props$lineHeight,
|
|
55102
|
+
lineHeightProp = props.lineHeight,
|
|
54305
55103
|
rowsInView = props.rowsInView,
|
|
54306
55104
|
line = props.line,
|
|
54307
55105
|
mode = props.mode,
|
|
@@ -54326,6 +55124,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54326
55124
|
onToggle = props.onToggle,
|
|
54327
55125
|
onChange = props.onChange;
|
|
54328
55126
|
var datum = useTreeContext();
|
|
55127
|
+
var lineHeight = lineHeightProp || SIZE_MAP[datum.size || 'default'];
|
|
54329
55128
|
var renderItem = function renderItem(item, index) {
|
|
54330
55129
|
var id = item.id,
|
|
54331
55130
|
data = item.data,
|
|
@@ -54358,7 +55157,8 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54358
55157
|
expanded: expanded,
|
|
54359
55158
|
onNodeClick: onNodeClick,
|
|
54360
55159
|
onToggle: onToggle,
|
|
54361
|
-
onChange: onChange
|
|
55160
|
+
onChange: onChange,
|
|
55161
|
+
size: datum.size
|
|
54362
55162
|
}, id);
|
|
54363
55163
|
};
|
|
54364
55164
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
@@ -54384,7 +55184,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54384
55184
|
|
|
54385
55185
|
|
|
54386
55186
|
|
|
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"];
|
|
55187
|
+
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", "height"];
|
|
54388
55188
|
|
|
54389
55189
|
|
|
54390
55190
|
|
|
@@ -54450,6 +55250,7 @@ var Tree = function Tree(props) {
|
|
|
54450
55250
|
rowsInView = _props$rowsInView === void 0 ? 20 : _props$rowsInView,
|
|
54451
55251
|
actionOnClick = props.actionOnClick,
|
|
54452
55252
|
tiledData = props.tiledData,
|
|
55253
|
+
height = props.height,
|
|
54453
55254
|
rest = objectWithoutProperties_default()(props, tree_excluded);
|
|
54454
55255
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(propActive),
|
|
54455
55256
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -54490,7 +55291,7 @@ var Tree = function Tree(props) {
|
|
|
54490
55291
|
expanded = _useTree.expanded,
|
|
54491
55292
|
onExpand = _useTree.onExpand;
|
|
54492
55293
|
var treeStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
54493
|
-
var rootClass = classnames_default()(treeStyle.rootClass, treeStyle.tree, className, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, treeStyle.line, line), treeStyle.noline, !line), treeStyle.virtual, virtual));
|
|
55294
|
+
var rootClass = classnames_default()(treeStyle.rootClass, treeStyle.tree, className, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, treeStyle.line, line), treeStyle.noline, !line), treeStyle.virtual, virtual), treeStyle.sizeSmall, props.size === 'small'), treeStyle.sizeLarge, props.size === 'large'));
|
|
54494
55295
|
var getDragImageSelector = function getDragImageSelector(data) {
|
|
54495
55296
|
if (isFunc(dragImageSelector)) return dragImageSelector(data);
|
|
54496
55297
|
return dragImageSelector;
|
|
@@ -54505,16 +55306,6 @@ var Tree = function Tree(props) {
|
|
|
54505
55306
|
}
|
|
54506
55307
|
return props.height || styleHeight;
|
|
54507
55308
|
};
|
|
54508
|
-
var handleUpdateExpanded = function handleUpdateExpanded(expanded) {
|
|
54509
|
-
var tempExpandMap = new Set(expanded);
|
|
54510
|
-
if (!expanded) return;
|
|
54511
|
-
if (virtual) {
|
|
54512
|
-
datum.expandedFlat(expanded);
|
|
54513
|
-
}
|
|
54514
|
-
datum.updateMap.forEach(function (update, id) {
|
|
54515
|
-
update('expanded', tempExpandMap.has(id));
|
|
54516
|
-
});
|
|
54517
|
-
};
|
|
54518
55309
|
var handleUpdateActive = function handleUpdateActive(active, item) {
|
|
54519
55310
|
setActive(active);
|
|
54520
55311
|
if (active !== props.active) {
|
|
@@ -54663,7 +55454,7 @@ var Tree = function Tree(props) {
|
|
|
54663
55454
|
return;
|
|
54664
55455
|
}
|
|
54665
55456
|
if (!props.expanded) return;
|
|
54666
|
-
|
|
55457
|
+
datum.updateExpanded(expanded);
|
|
54667
55458
|
}, [expanded]);
|
|
54668
55459
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
54669
55460
|
// if (!active) return;
|
|
@@ -54681,7 +55472,10 @@ var Tree = function Tree(props) {
|
|
|
54681
55472
|
id: fieldId
|
|
54682
55473
|
}, rest), {}, {
|
|
54683
55474
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_context_Provider, {
|
|
54684
|
-
value: datum,
|
|
55475
|
+
value: objectSpread2_default()(objectSpread2_default()({}, datum), {}, {
|
|
55476
|
+
size: props.size,
|
|
55477
|
+
leafIcon: props.leafIcon
|
|
55478
|
+
}),
|
|
54685
55479
|
children: renderList()
|
|
54686
55480
|
})
|
|
54687
55481
|
}));
|
|
@@ -55151,6 +55945,7 @@ function Select(props0) {
|
|
|
55151
55945
|
compressed = props.compressed,
|
|
55152
55946
|
compressedBound = props.compressedBound,
|
|
55153
55947
|
compressedClassName = props.compressedClassName,
|
|
55948
|
+
renderCompressed = props.renderCompressed,
|
|
55154
55949
|
placeholder = props.placeholder,
|
|
55155
55950
|
emptyAfterSelect = props.emptyAfterSelect,
|
|
55156
55951
|
autoAdapt = props.autoAdapt,
|
|
@@ -55184,6 +55979,7 @@ function Select(props0) {
|
|
|
55184
55979
|
onEnterExpand = props.onEnterExpand,
|
|
55185
55980
|
filterSameChange = props.filterSameChange,
|
|
55186
55981
|
noCache = props.noCache,
|
|
55982
|
+
highlight = props.highlight,
|
|
55187
55983
|
_props$trigger = props.trigger,
|
|
55188
55984
|
trigger = _props$trigger === void 0 ? 'click' : _props$trigger;
|
|
55189
55985
|
var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
|
|
@@ -55230,7 +56026,8 @@ function Select(props0) {
|
|
|
55230
56026
|
setInputText = _useFilter.setInputText,
|
|
55231
56027
|
onCreate = _useFilter.onCreate,
|
|
55232
56028
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
55233
|
-
rawData = _useFilter.rawData
|
|
56029
|
+
rawData = _useFilter.rawData,
|
|
56030
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
55234
56031
|
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
|
|
55235
56032
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
55236
56033
|
absoluteListUpdateKey = _useState8[0],
|
|
@@ -55587,6 +56384,7 @@ function Select(props0) {
|
|
|
55587
56384
|
reFocus: reFocus,
|
|
55588
56385
|
convertBr: convertBr,
|
|
55589
56386
|
compressed: compressed,
|
|
56387
|
+
renderCompressed: renderCompressed,
|
|
55590
56388
|
compressedBound: compressedBound,
|
|
55591
56389
|
compressedClassName: compressedClassName,
|
|
55592
56390
|
multiple: multiple,
|
|
@@ -55749,43 +56547,49 @@ function Select(props0) {
|
|
|
55749
56547
|
var targetProps = getTargetProps();
|
|
55750
56548
|
var onMouseEnter = targetProps.onMouseEnter,
|
|
55751
56549
|
onMouseLeave = targetProps.onMouseLeave;
|
|
55752
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
55753
|
-
|
|
55754
|
-
|
|
55755
|
-
|
|
55756
|
-
|
|
55757
|
-
|
|
55758
|
-
|
|
55759
|
-
|
|
55760
|
-
|
|
55761
|
-
|
|
55762
|
-
|
|
55763
|
-
|
|
55764
|
-
|
|
55765
|
-
|
|
55766
|
-
|
|
55767
|
-
|
|
55768
|
-
|
|
55769
|
-
|
|
55770
|
-
|
|
55771
|
-
|
|
55772
|
-
|
|
55773
|
-
|
|
55774
|
-
|
|
55775
|
-
|
|
55776
|
-
|
|
55777
|
-
|
|
55778
|
-
|
|
55779
|
-
|
|
55780
|
-
|
|
55781
|
-
|
|
55782
|
-
|
|
55783
|
-
|
|
55784
|
-
|
|
55785
|
-
|
|
55786
|
-
|
|
55787
|
-
|
|
55788
|
-
|
|
56550
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
56551
|
+
value: {
|
|
56552
|
+
filterText: filterText,
|
|
56553
|
+
highlight: highlight
|
|
56554
|
+
},
|
|
56555
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
56556
|
+
ref: targetRef,
|
|
56557
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
56558
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
56559
|
+
className: rootClass,
|
|
56560
|
+
style: rootStyle,
|
|
56561
|
+
onKeyDown: handleKeyDown,
|
|
56562
|
+
onKeyUp: handleKeyUp,
|
|
56563
|
+
onBlur: handleBlur,
|
|
56564
|
+
onFocus: handleFocus,
|
|
56565
|
+
onMouseEnter: onMouseEnter,
|
|
56566
|
+
onMouseLeave: onMouseLeave,
|
|
56567
|
+
onMouseDown: preventDefault,
|
|
56568
|
+
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
56569
|
+
adjust: adjust,
|
|
56570
|
+
focus: open,
|
|
56571
|
+
fixedWidth: (!props.columns || props.columns <= 1) && (autoAdapt ? 'min' : true),
|
|
56572
|
+
absolute: props.absolute,
|
|
56573
|
+
zIndex: props.zIndex,
|
|
56574
|
+
position: position,
|
|
56575
|
+
popupGap: 4,
|
|
56576
|
+
popupElRef: popupRef,
|
|
56577
|
+
parentElRef: targetRef,
|
|
56578
|
+
updateKey: absoluteListUpdateKey,
|
|
56579
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(animation_list, {
|
|
56580
|
+
onRef: popupRef,
|
|
56581
|
+
show: open,
|
|
56582
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper, size === 'small' && (styles === null || styles === void 0 ? void 0 : styles.pickerSmall), size === 'large' && (styles === null || styles === void 0 ? void 0 : styles.pickerLarge)),
|
|
56583
|
+
onAnimationAfterEnter: onAnimationAfterEnter,
|
|
56584
|
+
display: 'block',
|
|
56585
|
+
type: "scale-y",
|
|
56586
|
+
duration: 'fast',
|
|
56587
|
+
style: getListStyle(),
|
|
56588
|
+
children: [renderHeader(), renderOptions(), renderFooter()]
|
|
56589
|
+
})
|
|
56590
|
+
})]
|
|
56591
|
+
}))
|
|
56592
|
+
});
|
|
55789
56593
|
}
|
|
55790
56594
|
/* harmony default export */ var base_src_select_select = (Select);
|
|
55791
56595
|
;// CONCATENATED MODULE: ../base/src/pagination/pagination-size-list.tsx
|
|
@@ -56603,10 +57407,10 @@ var list_list_List = function List(props) {
|
|
|
56603
57407
|
return renderItem(item, index);
|
|
56604
57408
|
})
|
|
56605
57409
|
}, columnIndex);
|
|
56606
|
-
return;
|
|
56607
57410
|
});
|
|
56608
|
-
var
|
|
56609
|
-
|
|
57411
|
+
var loadingPosition = props.loadingPosition || 'center';
|
|
57412
|
+
var renderCenterLoading = function renderCenterLoading() {
|
|
57413
|
+
if (!props.loading || loadingPosition !== 'center') return null;
|
|
56610
57414
|
var Loading = props.loading === true ? /*#__PURE__*/(0,jsx_runtime.jsx)(src_spin_spin, {
|
|
56611
57415
|
size: 16,
|
|
56612
57416
|
jssStyle: props.jssStyle
|
|
@@ -56616,6 +57420,17 @@ var list_list_List = function List(props) {
|
|
|
56616
57420
|
children: Loading
|
|
56617
57421
|
});
|
|
56618
57422
|
};
|
|
57423
|
+
var renderBottomLoading = function renderBottomLoading() {
|
|
57424
|
+
if (!props.loading || loadingPosition !== 'bottom') return null;
|
|
57425
|
+
var Loading = props.loading === true ? /*#__PURE__*/(0,jsx_runtime.jsx)(src_spin_spin, {
|
|
57426
|
+
size: 16,
|
|
57427
|
+
jssStyle: props.jssStyle
|
|
57428
|
+
}) : props.loading;
|
|
57429
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
57430
|
+
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.loadingBottom,
|
|
57431
|
+
children: Loading
|
|
57432
|
+
});
|
|
57433
|
+
};
|
|
56619
57434
|
var renderEmpty = function renderEmpty() {
|
|
56620
57435
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) return null;
|
|
56621
57436
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -56677,7 +57492,7 @@ var list_list_List = function List(props) {
|
|
|
56677
57492
|
onScroll: handleListScroll,
|
|
56678
57493
|
children: [columnData.map(function (column, colIndex) {
|
|
56679
57494
|
return renderColumn(column, colIndex);
|
|
56680
|
-
}), renderFooter()]
|
|
57495
|
+
}), renderBottomLoading(), renderFooter()]
|
|
56681
57496
|
});
|
|
56682
57497
|
};
|
|
56683
57498
|
var wrapperClass = classnames_default()(props.className, listClasses === null || listClasses === void 0 ? void 0 : listClasses.rootClass, 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));
|
|
@@ -56688,7 +57503,7 @@ var list_list_List = function List(props) {
|
|
|
56688
57503
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
56689
57504
|
className: wrapperClass,
|
|
56690
57505
|
style: wrapperStyle,
|
|
56691
|
-
children: [renderList(),
|
|
57506
|
+
children: [renderList(), renderCenterLoading(), renderEmpty()]
|
|
56692
57507
|
}), props.pagination && /*#__PURE__*/(0,jsx_runtime.jsx)(src_pagination_pagination, objectSpread2_default()(objectSpread2_default()({
|
|
56693
57508
|
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.pagination,
|
|
56694
57509
|
jssStyle: props.jssStyle
|
|
@@ -58995,7 +59810,8 @@ var select_jssStyle = {
|
|
|
58995
59810
|
checkbox: useCheckboxStyle,
|
|
58996
59811
|
radio: useRadioStyle,
|
|
58997
59812
|
tree: useTreeStyle,
|
|
58998
|
-
spin: useSpinStyle
|
|
59813
|
+
spin: useSpinStyle,
|
|
59814
|
+
common: useCommonStyle
|
|
58999
59815
|
};
|
|
59000
59816
|
function SelectComponent(props) {
|
|
59001
59817
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_select_select, objectSpread2_default()({
|
|
@@ -59011,6 +59827,164 @@ function select_Select(props) {
|
|
|
59011
59827
|
var SelectComp = src_select_select_0;
|
|
59012
59828
|
SelectComp.displayName = 'ShineoutSelect';
|
|
59013
59829
|
/* harmony default export */ var src_select_0 = (SelectComp);
|
|
59830
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/text.tsx
|
|
59831
|
+
|
|
59832
|
+
|
|
59833
|
+
|
|
59834
|
+
function Text(_ref) {
|
|
59835
|
+
var classes = _ref.classes,
|
|
59836
|
+
className = _ref.className,
|
|
59837
|
+
_ref$rows = _ref.rows,
|
|
59838
|
+
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
59839
|
+
width = _ref.width,
|
|
59840
|
+
height = _ref.height,
|
|
59841
|
+
style = _ref.style;
|
|
59842
|
+
var cls = classnames_default()(classes.text, className);
|
|
59843
|
+
var nodes = [];
|
|
59844
|
+
function getTextWidth(index) {
|
|
59845
|
+
if (isArray(width)) {
|
|
59846
|
+
return width[index];
|
|
59847
|
+
}
|
|
59848
|
+
if (rows - 1 === index) {
|
|
59849
|
+
return width;
|
|
59850
|
+
}
|
|
59851
|
+
return undefined;
|
|
59852
|
+
}
|
|
59853
|
+
function getTextHeight(index) {
|
|
59854
|
+
if (isArray(height)) {
|
|
59855
|
+
return height[index];
|
|
59856
|
+
}
|
|
59857
|
+
if (rows - 1 === index) {
|
|
59858
|
+
return height;
|
|
59859
|
+
}
|
|
59860
|
+
return undefined;
|
|
59861
|
+
}
|
|
59862
|
+
for (var i = 0; i < rows; i++) {
|
|
59863
|
+
nodes.push( /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
59864
|
+
className: classes.textItem,
|
|
59865
|
+
style: {
|
|
59866
|
+
width: getTextWidth(i),
|
|
59867
|
+
height: getTextHeight(i)
|
|
59868
|
+
}
|
|
59869
|
+
}, i));
|
|
59870
|
+
}
|
|
59871
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
|
|
59872
|
+
className: cls,
|
|
59873
|
+
style: style,
|
|
59874
|
+
children: nodes
|
|
59875
|
+
});
|
|
59876
|
+
}
|
|
59877
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/image.tsx
|
|
59878
|
+
|
|
59879
|
+
|
|
59880
|
+
|
|
59881
|
+
function skeleton_image_Image(_ref) {
|
|
59882
|
+
var classes = _ref.classes,
|
|
59883
|
+
className = _ref.className,
|
|
59884
|
+
size = _ref.size,
|
|
59885
|
+
position = _ref.position,
|
|
59886
|
+
_ref$shape = _ref.shape,
|
|
59887
|
+
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
59888
|
+
style = _ref.style;
|
|
59889
|
+
var cls = classnames_default()(classes.image, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, classes.imageLeft, position !== 'right'), classes.imageRight, position === 'right'), classes.imageCircle, shape === 'circle'), classes.imageSquare, shape === 'square'), classes.imageSmall, size === 'small'), classes.imageLarge, size === 'large'), className);
|
|
59890
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59891
|
+
className: cls,
|
|
59892
|
+
style: style
|
|
59893
|
+
});
|
|
59894
|
+
}
|
|
59895
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/button.tsx
|
|
59896
|
+
|
|
59897
|
+
|
|
59898
|
+
|
|
59899
|
+
function skeleton_button_Button(_ref) {
|
|
59900
|
+
var classes = _ref.classes,
|
|
59901
|
+
className = _ref.className,
|
|
59902
|
+
size = _ref.size,
|
|
59903
|
+
position = _ref.position,
|
|
59904
|
+
_ref$count = _ref.count,
|
|
59905
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
59906
|
+
style = _ref.style;
|
|
59907
|
+
var cls = classnames_default()(classes.button, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, classes.buttonLeft, position !== 'right'), classes.buttonRight, position === 'right'), classes.buttonSmall, size === 'small'), classes.buttonLarge, size === 'large'), className);
|
|
59908
|
+
var buttons = [];
|
|
59909
|
+
for (var i = 0; i < count; i++) {
|
|
59910
|
+
buttons.push( /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59911
|
+
className: classes.buttonItem
|
|
59912
|
+
}, i));
|
|
59913
|
+
}
|
|
59914
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59915
|
+
className: cls,
|
|
59916
|
+
style: style,
|
|
59917
|
+
children: buttons
|
|
59918
|
+
});
|
|
59919
|
+
}
|
|
59920
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/skeleton.tsx
|
|
59921
|
+
|
|
59922
|
+
|
|
59923
|
+
|
|
59924
|
+
|
|
59925
|
+
|
|
59926
|
+
|
|
59927
|
+
|
|
59928
|
+
|
|
59929
|
+
|
|
59930
|
+
function getComponentProps(prop) {
|
|
59931
|
+
return is_isObject(prop) ? prop : {};
|
|
59932
|
+
}
|
|
59933
|
+
var Skeleton = function Skeleton(props) {
|
|
59934
|
+
var _jssStyle$skeleton;
|
|
59935
|
+
var animation = props.animation,
|
|
59936
|
+
image = props.image,
|
|
59937
|
+
button = props.button,
|
|
59938
|
+
_props$text = props.text,
|
|
59939
|
+
text = _props$text === void 0 ? true : _props$text,
|
|
59940
|
+
children = props.children,
|
|
59941
|
+
loading = props.loading,
|
|
59942
|
+
jssStyle = props.jssStyle;
|
|
59943
|
+
var classes = jssStyle === null || jssStyle === void 0 || (_jssStyle$skeleton = jssStyle.skeleton) === null || _jssStyle$skeleton === void 0 ? void 0 : _jssStyle$skeleton.call(jssStyle);
|
|
59944
|
+
var rootClass = classnames_default()(classes.rootClass, classes.wrapper, props.className, defineProperty_default()({}, classes.animation, animation));
|
|
59945
|
+
var imageProps = getComponentProps(image);
|
|
59946
|
+
var textProps = getComponentProps(text);
|
|
59947
|
+
var buttonProps = getComponentProps(button);
|
|
59948
|
+
if (loading) {
|
|
59949
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
59950
|
+
className: rootClass,
|
|
59951
|
+
style: props.style,
|
|
59952
|
+
children: [image && imageProps.position !== 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
|
|
59953
|
+
classes: classes
|
|
59954
|
+
}, imageProps)), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
59955
|
+
className: classes.content,
|
|
59956
|
+
children: [text && /*#__PURE__*/(0,jsx_runtime.jsx)(Text, objectSpread2_default()({
|
|
59957
|
+
classes: classes
|
|
59958
|
+
}, textProps)), button && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_button_Button, objectSpread2_default()({
|
|
59959
|
+
classes: classes
|
|
59960
|
+
}, buttonProps))]
|
|
59961
|
+
}), image && imageProps.position === 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
|
|
59962
|
+
classes: classes
|
|
59963
|
+
}, imageProps))]
|
|
59964
|
+
});
|
|
59965
|
+
}
|
|
59966
|
+
return children;
|
|
59967
|
+
};
|
|
59968
|
+
/* harmony default export */ var src_skeleton_skeleton = (Skeleton);
|
|
59969
|
+
;// CONCATENATED MODULE: ./src/skeleton/skeleton.tsx
|
|
59970
|
+
|
|
59971
|
+
|
|
59972
|
+
|
|
59973
|
+
|
|
59974
|
+
|
|
59975
|
+
var skeleton_jssStyle = {
|
|
59976
|
+
skeleton: useSkeletonStyle
|
|
59977
|
+
};
|
|
59978
|
+
/* harmony default export */ var src_skeleton_skeleton_0 = (function (props) {
|
|
59979
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_skeleton_skeleton, objectSpread2_default()({
|
|
59980
|
+
jssStyle: skeleton_jssStyle
|
|
59981
|
+
}, props));
|
|
59982
|
+
});
|
|
59983
|
+
;// CONCATENATED MODULE: ./src/skeleton/index.ts
|
|
59984
|
+
|
|
59985
|
+
var SkeletonComp = src_skeleton_skeleton_0;
|
|
59986
|
+
SkeletonComp.displayName = 'ShineoutSkeleton';
|
|
59987
|
+
/* harmony default export */ var src_skeleton_0 = (SkeletonComp);
|
|
59014
59988
|
;// CONCATENATED MODULE: ../hooks/src/components/use-slider/use-slider.ts
|
|
59015
59989
|
|
|
59016
59990
|
|
|
@@ -60313,19 +61287,16 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60313
61287
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60314
61288
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
60315
61289
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60316
|
-
|
|
60317
|
-
|
|
61290
|
+
isMouseDown: false,
|
|
61291
|
+
lastTableHeight: 0
|
|
60318
61292
|
}),
|
|
60319
61293
|
context = _useRef.current;
|
|
60320
|
-
// TODO: keepScrollTop考虑做成Table的新feat?
|
|
60321
61294
|
var _props$scrollHeight = props.scrollHeight,
|
|
60322
61295
|
scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
|
|
60323
61296
|
_props$scrollWidth = props.scrollWidth,
|
|
60324
61297
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
60325
61298
|
_props$defaultHeight = props.defaultHeight,
|
|
60326
|
-
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight
|
|
60327
|
-
_props$keepScrollTop = props.keepScrollTop,
|
|
60328
|
-
keepScrollTop = _props$keepScrollTop === void 0 ? false : _props$keepScrollTop;
|
|
61299
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
60329
61300
|
var _useResize = useResize({
|
|
60330
61301
|
targetRef: containerRef,
|
|
60331
61302
|
timer: 100
|
|
@@ -60348,14 +61319,17 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60348
61319
|
display: 'flex',
|
|
60349
61320
|
position: 'sticky',
|
|
60350
61321
|
flexDirection: 'column',
|
|
61322
|
+
overflow: props.isScrollX ? 'initial' : 'hidden',
|
|
60351
61323
|
top: 0
|
|
60352
61324
|
};
|
|
60353
|
-
|
|
60354
|
-
|
|
60355
|
-
|
|
60356
|
-
|
|
60357
|
-
|
|
60358
|
-
|
|
61325
|
+
var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
|
|
61326
|
+
if (props.isEmpty) {
|
|
61327
|
+
paddingTop = 0;
|
|
61328
|
+
Object.assign(scrollerStyle, {
|
|
61329
|
+
display: 'flex',
|
|
61330
|
+
flexDirection: 'column'
|
|
61331
|
+
});
|
|
61332
|
+
}
|
|
60359
61333
|
var placeStyle = {
|
|
60360
61334
|
paddingTop: paddingTop,
|
|
60361
61335
|
width: scrollWidth,
|
|
@@ -60407,21 +61381,48 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60407
61381
|
scrollRef.current.scrollTop += scrollTop;
|
|
60408
61382
|
}
|
|
60409
61383
|
});
|
|
61384
|
+
var scrollRoleProps = objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
61385
|
+
role: 'scroll'
|
|
61386
|
+
})), {}, {
|
|
61387
|
+
style: scrollerStyle,
|
|
61388
|
+
onScroll: handleScroll,
|
|
61389
|
+
ref: wrapperRef,
|
|
61390
|
+
onMouseDown: function onMouseDown() {
|
|
61391
|
+
context.isMouseDown = true;
|
|
61392
|
+
},
|
|
61393
|
+
onMouseUp: function onMouseUp() {
|
|
61394
|
+
context.isMouseDown = false;
|
|
61395
|
+
}
|
|
61396
|
+
});
|
|
61397
|
+
|
|
61398
|
+
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
61399
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
61400
|
+
if (!props.tableRef.current) return;
|
|
61401
|
+
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
61402
|
+
var container = containerRef.current;
|
|
61403
|
+
// 判断内容滚动高度是否真的超过了容器高度
|
|
61404
|
+
var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
|
|
61405
|
+
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
61406
|
+
if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight && !isRealScroll) {
|
|
61407
|
+
props.setFakeVirtual(true);
|
|
61408
|
+
context.lastTableHeight = 0;
|
|
61409
|
+
} else {
|
|
61410
|
+
context.lastTableHeight = rootTableHeight;
|
|
61411
|
+
}
|
|
61412
|
+
}, [paddingTop]);
|
|
61413
|
+
if (props.isEmpty) {
|
|
61414
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
61415
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61416
|
+
style: {
|
|
61417
|
+
width: scrollWidth
|
|
61418
|
+
}
|
|
61419
|
+
}), props.children]
|
|
61420
|
+
}));
|
|
61421
|
+
}
|
|
60410
61422
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60411
61423
|
className: props.className,
|
|
60412
61424
|
style: props.style,
|
|
60413
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({},
|
|
60414
|
-
role: 'scroll'
|
|
60415
|
-
})), {}, {
|
|
60416
|
-
style: scrollerStyle,
|
|
60417
|
-
onScroll: handleScroll,
|
|
60418
|
-
ref: wrapperRef,
|
|
60419
|
-
onMouseDown: function onMouseDown() {
|
|
60420
|
-
context.isMouseDown = true;
|
|
60421
|
-
},
|
|
60422
|
-
onMouseUp: function onMouseUp() {
|
|
60423
|
-
context.isMouseDown = false;
|
|
60424
|
-
},
|
|
61425
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60425
61426
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60426
61427
|
role: 'scroll-container'
|
|
60427
61428
|
})), {}, {
|
|
@@ -60933,7 +61934,6 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
60933
61934
|
width: tableWidth,
|
|
60934
61935
|
shouldLastColAuto: props.columnResizable && !adjust,
|
|
60935
61936
|
scrollWidth: scrollWidth,
|
|
60936
|
-
// maxScrollLeft: scrollWidth - context.clientWidth,
|
|
60937
61937
|
resizeFlag: resizeFlag
|
|
60938
61938
|
};
|
|
60939
61939
|
};
|
|
@@ -60957,7 +61957,8 @@ var useTableFilter = function useTableFilter(props) {
|
|
|
60957
61957
|
}, [filterInfo]);
|
|
60958
61958
|
var filteredData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
60959
61959
|
var _props$data;
|
|
60960
|
-
|
|
61960
|
+
// why use slice: props.data引用不改变会导致后续的useMemo无法重新计算
|
|
61961
|
+
if (activeFilters.length === 0) return (props.data || []).slice();
|
|
60961
61962
|
return (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.filter(function (item) {
|
|
60962
61963
|
return activeFilters.every(function (key) {
|
|
60963
61964
|
var filter = filterInfo.get(key);
|
|
@@ -61529,7 +62530,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61529
62530
|
var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61530
62531
|
if (props.disabled) return props.data;
|
|
61531
62532
|
return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
61532
|
-
}, [props.data, startIndex, finalRowsInView]);
|
|
62533
|
+
}, [props.data, props.disabled, startIndex, finalRowsInView]);
|
|
61533
62534
|
var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61534
62535
|
var t = innerTop + offsetY;
|
|
61535
62536
|
if (t < 0) {
|
|
@@ -61853,6 +62854,7 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61853
62854
|
last.colSpan += colSpan;
|
|
61854
62855
|
if (col.fixed) last.fixed = col.fixed;
|
|
61855
62856
|
if (col.lastFixed) last.lastFixed = true;
|
|
62857
|
+
if (col.groupProps) last.groupProps = col.groupProps;
|
|
61856
62858
|
} else {
|
|
61857
62859
|
var sub = [];
|
|
61858
62860
|
colSpan = setColumns(sub, col, level + 1, index);
|
|
@@ -61865,7 +62867,8 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61865
62867
|
fixed: col.fixed,
|
|
61866
62868
|
firstFixed: col.firstFixed,
|
|
61867
62869
|
index: index,
|
|
61868
|
-
columns: sub
|
|
62870
|
+
columns: sub,
|
|
62871
|
+
groupProps: col.groupProps
|
|
61869
62872
|
};
|
|
61870
62873
|
columns.push(groupCol);
|
|
61871
62874
|
}
|
|
@@ -61936,33 +62939,17 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
61936
62939
|
var config = filter.config;
|
|
61937
62940
|
var currentFilter = (_props$filterInfo = props.filterInfo) === null || _props$filterInfo === void 0 ? void 0 : _props$filterInfo.get(props.columnKey);
|
|
61938
62941
|
var treeOptions = (config === null || config === void 0 ? void 0 : config.data) || [];
|
|
61939
|
-
var onReset = function onReset() {
|
|
61940
|
-
setTempValue(undefined);
|
|
61941
|
-
props.onFilterChange(props.columnKey, undefined);
|
|
61942
|
-
setPopoverVisible(false);
|
|
61943
|
-
};
|
|
61944
|
-
var onConfirm = function onConfirm() {
|
|
61945
|
-
props.onFilterChange(props.columnKey, tempValue);
|
|
61946
|
-
setPopoverVisible(false);
|
|
61947
|
-
};
|
|
61948
|
-
var onVisibleChange = function onVisibleChange(visible) {
|
|
61949
|
-
// 关闭popover时就提交筛选条件,包括click away触发的
|
|
61950
|
-
if (!visible) {
|
|
61951
|
-
props.onFilterChange(props.columnKey, tempValue);
|
|
61952
|
-
}
|
|
61953
|
-
setPopoverVisible(visible);
|
|
61954
|
-
};
|
|
61955
62942
|
var treeKeygen = function treeKeygen(d) {
|
|
61956
62943
|
return d.value;
|
|
61957
62944
|
};
|
|
61958
62945
|
var treeProps = config !== null && config !== void 0 && config.multiple ? {
|
|
61959
|
-
value:
|
|
62946
|
+
value: tempValue,
|
|
61960
62947
|
onChange: function onChange(v) {
|
|
61961
62948
|
setTempValue(v);
|
|
61962
62949
|
},
|
|
61963
62950
|
renderItem: (config === null || config === void 0 ? void 0 : config.renderItem) || 'label'
|
|
61964
62951
|
} : {
|
|
61965
|
-
active:
|
|
62952
|
+
active: tempValue,
|
|
61966
62953
|
setActive: function setActive(v) {
|
|
61967
62954
|
setTempValue(v);
|
|
61968
62955
|
},
|
|
@@ -61995,7 +62982,24 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
61995
62982
|
onFilter = _useFilter.onFilter,
|
|
61996
62983
|
inputText = _useFilter.inputText,
|
|
61997
62984
|
setInputText = _useFilter.setInputText;
|
|
61998
|
-
var
|
|
62985
|
+
var onReset = function onReset() {
|
|
62986
|
+
setTempValue(undefined);
|
|
62987
|
+
setInputText('');
|
|
62988
|
+
props.onFilterChange(props.columnKey, undefined);
|
|
62989
|
+
setPopoverVisible(false);
|
|
62990
|
+
};
|
|
62991
|
+
var onConfirm = function onConfirm() {
|
|
62992
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
62993
|
+
setPopoverVisible(false);
|
|
62994
|
+
};
|
|
62995
|
+
var onVisibleChange = function onVisibleChange(visible) {
|
|
62996
|
+
// 关闭popover时就提交筛选条件,包括click away触发的
|
|
62997
|
+
if (!visible) {
|
|
62998
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
62999
|
+
}
|
|
63000
|
+
setPopoverVisible(visible);
|
|
63001
|
+
};
|
|
63002
|
+
var displayData = inputText ? filterData || rawData : rawData;
|
|
61999
63003
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(base_src_button_button, {
|
|
62000
63004
|
jssStyle: props.jssStyle,
|
|
62001
63005
|
shape: "circle",
|
|
@@ -62327,6 +63331,7 @@ var thead_toNum = toNum;
|
|
|
62327
63331
|
};
|
|
62328
63332
|
};
|
|
62329
63333
|
var createTh = function createTh(trs, col, level, isLast, columnIndex) {
|
|
63334
|
+
var _colTemp2$groupProps, _colTemp2$groupProps2;
|
|
62330
63335
|
var colTemp = col;
|
|
62331
63336
|
var colTemp2 = col;
|
|
62332
63337
|
var fixedStyle = getFixedStyle(col.fixed, col.index, colTemp2.colSpan || 1, level);
|
|
@@ -62381,8 +63386,11 @@ var thead_toNum = toNum;
|
|
|
62381
63386
|
var style = typeof colTemp2.name === 'string' ? fixedStyle : objectSpread2_default()({
|
|
62382
63387
|
padding: 0
|
|
62383
63388
|
}, fixedStyle);
|
|
63389
|
+
if (colTemp2 !== null && colTemp2 !== void 0 && (_colTemp2$groupProps = colTemp2.groupProps) !== null && _colTemp2$groupProps !== void 0 && _colTemp2$groupProps.style) {
|
|
63390
|
+
style = objectSpread2_default()(objectSpread2_default()({}, style), colTemp2.groupProps.style);
|
|
63391
|
+
}
|
|
62384
63392
|
trs[level].push( /*#__PURE__*/(0,jsx_runtime.jsx)("th", {
|
|
62385
|
-
className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup),
|
|
63393
|
+
className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup, colTemp2 === null || colTemp2 === void 0 || (_colTemp2$groupProps2 = colTemp2.groupProps) === null || _colTemp2$groupProps2 === void 0 ? void 0 : _colTemp2$groupProps2.className),
|
|
62386
63394
|
style: style,
|
|
62387
63395
|
colSpan: colTemp2.colSpan,
|
|
62388
63396
|
dir: config.direction,
|
|
@@ -62579,7 +63587,7 @@ var useTableRow = function useTableRow(props) {
|
|
|
62579
63587
|
/* harmony default export */ var use_table_row = (useTableRow);
|
|
62580
63588
|
;// CONCATENATED MODULE: ../hooks/src/common/use-component-memo/use-memo.ts
|
|
62581
63589
|
|
|
62582
|
-
function
|
|
63590
|
+
function useComponentMemo(getValue, condition, shouldUpdate) {
|
|
62583
63591
|
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
|
|
62584
63592
|
if (!shouldUpdate) return getValue();
|
|
62585
63593
|
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
@@ -62593,8 +63601,6 @@ function useMemo(getValue, condition, shouldUpdate) {
|
|
|
62593
63601
|
|
|
62594
63602
|
|
|
62595
63603
|
|
|
62596
|
-
|
|
62597
|
-
|
|
62598
63604
|
function Td(props) {
|
|
62599
63605
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
|
|
62600
63606
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
@@ -62618,9 +63624,7 @@ function Td(props) {
|
|
|
62618
63624
|
onMouseEnter = props.onMouseEnter,
|
|
62619
63625
|
onMouseLeave = props.onMouseLeave,
|
|
62620
63626
|
renderContent = props.renderContent;
|
|
62621
|
-
var
|
|
62622
|
-
var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
|
|
62623
|
-
var $td = useMemo(function () {
|
|
63627
|
+
var $td = useComponentMemo(function () {
|
|
62624
63628
|
var content = renderContent(props.col, props.data);
|
|
62625
63629
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
62626
63630
|
colSpan: colSpan,
|
|
@@ -62634,16 +63638,13 @@ function Td(props) {
|
|
|
62634
63638
|
onClick: onClick,
|
|
62635
63639
|
children: content
|
|
62636
63640
|
}, col.key);
|
|
62637
|
-
}, [data, className, style, col.type, col.treeColumnsName]
|
|
63641
|
+
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
62638
63642
|
if (col.type || col.treeColumnsName) {
|
|
62639
63643
|
return true;
|
|
62640
63644
|
}
|
|
62641
63645
|
return prev.some(function (_, index) {
|
|
62642
|
-
|
|
62643
|
-
|
|
62644
|
-
}
|
|
62645
|
-
return !shallowEqual(prev[index], next[index]);
|
|
62646
|
-
});
|
|
63646
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
63647
|
+
}) || !props.scrolling;
|
|
62647
63648
|
} : undefined);
|
|
62648
63649
|
return $td;
|
|
62649
63650
|
}
|
|
@@ -62714,6 +63715,8 @@ var Tr = function Tr(props) {
|
|
|
62714
63715
|
});
|
|
62715
63716
|
var setVirtualRowHeight = usePersistFn(function () {
|
|
62716
63717
|
if (props.setRowHeight && trRef.current) {
|
|
63718
|
+
// 祖先元素不可见时(display: none)
|
|
63719
|
+
if (!trRef.current.offsetParent) return;
|
|
62717
63720
|
var expandHeight = expandRef.current ? expandRef.current.getBoundingClientRect().height : 0;
|
|
62718
63721
|
props.setRowHeight(props.rowIndex, trRef.current.getBoundingClientRect().height + expandHeight);
|
|
62719
63722
|
}
|
|
@@ -62885,6 +63888,7 @@ var Tr = function Tr(props) {
|
|
|
62885
63888
|
if (col.treeColumnsName) {
|
|
62886
63889
|
return renderTreeExpand(content, col.treeIndent);
|
|
62887
63890
|
}
|
|
63891
|
+
if (col.render === undefined) return null;
|
|
62888
63892
|
return content;
|
|
62889
63893
|
});
|
|
62890
63894
|
var renderTds = usePersistFn(function (cols, data) {
|
|
@@ -62931,8 +63935,9 @@ var Tr = function Tr(props) {
|
|
|
62931
63935
|
onClick: props.onCellClick ? function () {
|
|
62932
63936
|
return handleCellClick(data[i].data, i);
|
|
62933
63937
|
} : undefined,
|
|
62934
|
-
|
|
62935
|
-
|
|
63938
|
+
renderContent: renderContent,
|
|
63939
|
+
virtual: props.virtual,
|
|
63940
|
+
scrolling: props.scrolling
|
|
62936
63941
|
}, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
|
|
62937
63942
|
tds.push(td);
|
|
62938
63943
|
if (data[i].colSpan) skip = data[i].colSpan - 1;
|
|
@@ -63030,8 +64035,6 @@ var Tr = function Tr(props) {
|
|
|
63030
64035
|
|
|
63031
64036
|
|
|
63032
64037
|
|
|
63033
|
-
|
|
63034
|
-
|
|
63035
64038
|
/* harmony default export */ var tbody = (function (props) {
|
|
63036
64039
|
var _props$columns = props.columns,
|
|
63037
64040
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
@@ -63104,25 +64107,19 @@ var Tr = function Tr(props) {
|
|
|
63104
64107
|
resizeFlag: props.resizeFlag,
|
|
63105
64108
|
treeCheckAll: props.treeCheckAll,
|
|
63106
64109
|
onCellClick: props.onCellClick,
|
|
63107
|
-
|
|
64110
|
+
virtual: props.virtual,
|
|
64111
|
+
scrolling: props.scrolling
|
|
63108
64112
|
}, trRenderKey);
|
|
63109
64113
|
};
|
|
63110
|
-
var
|
|
63111
|
-
var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
|
|
63112
|
-
var $tbody = useMemo(function () {
|
|
64114
|
+
var $tbody = useComponentMemo(function () {
|
|
63113
64115
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
63114
64116
|
children: (props.data || []).map(function (item, index) {
|
|
63115
64117
|
return renderRow(item, index);
|
|
63116
64118
|
})
|
|
63117
64119
|
});
|
|
63118
|
-
}, [props.data, currentIndex]
|
|
64120
|
+
}, [props.data, currentIndex], props.virtual === 'lazy' ? function (prev, next) {
|
|
63119
64121
|
return prev.some(function (_, index) {
|
|
63120
|
-
|
|
63121
|
-
return prev[index].some(function (item, idx) {
|
|
63122
|
-
return updateFn(item, next[index][idx]);
|
|
63123
|
-
});
|
|
63124
|
-
}
|
|
63125
|
-
return !shallowEqual(prev[index], next[index]);
|
|
64122
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
63126
64123
|
}) || !props.scrolling;
|
|
63127
64124
|
} : undefined);
|
|
63128
64125
|
return $tbody;
|
|
@@ -63267,7 +64264,7 @@ var emptyRef = {
|
|
|
63267
64264
|
current: null
|
|
63268
64265
|
};
|
|
63269
64266
|
/* harmony default export */ var src_table_table = (function (props) {
|
|
63270
|
-
var _props$jssStyle, _props$jssStyle$table,
|
|
64267
|
+
var _props$jssStyle, _props$jssStyle$table, _columns$find;
|
|
63271
64268
|
var _props$verticalAlign = props.verticalAlign,
|
|
63272
64269
|
verticalAlign = _props$verticalAlign === void 0 ? 'top' : _props$verticalAlign,
|
|
63273
64270
|
_props$size = props.size,
|
|
@@ -63279,6 +64276,7 @@ var emptyRef = {
|
|
|
63279
64276
|
var tableClasses = props === null || props === void 0 || (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$table = _props$jssStyle.table) === null || _props$jssStyle$table === void 0 ? void 0 : _props$jssStyle$table.call(_props$jssStyle);
|
|
63280
64277
|
var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63281
64278
|
var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
64279
|
+
var theadIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)("thead-container-".concat(generateUUID()));
|
|
63282
64280
|
var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63283
64281
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63284
64282
|
var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -63288,6 +64286,10 @@ var emptyRef = {
|
|
|
63288
64286
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63289
64287
|
scrolling = _useState2[0],
|
|
63290
64288
|
setScrolling = _useState2[1];
|
|
64289
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
64290
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
64291
|
+
fakeVirtual = _useState4[0],
|
|
64292
|
+
setFakeVirtual = _useState4[1];
|
|
63291
64293
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
63292
64294
|
if (props.fixed) {
|
|
63293
64295
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
@@ -63314,7 +64316,7 @@ var emptyRef = {
|
|
|
63314
64316
|
scrollingTimer: null
|
|
63315
64317
|
}),
|
|
63316
64318
|
context = _useRef.current;
|
|
63317
|
-
var virtual =
|
|
64319
|
+
var virtual = !fakeVirtual && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
63318
64320
|
|
|
63319
64321
|
// 虚拟列表高度另外计算
|
|
63320
64322
|
var _useResize = useResize({
|
|
@@ -63445,7 +64447,13 @@ var emptyRef = {
|
|
|
63445
64447
|
});
|
|
63446
64448
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63447
64449
|
var _theadRef$current, _tfootRef$current;
|
|
63448
|
-
|
|
64450
|
+
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
64451
|
+
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
64452
|
+
if (props.sticky) {
|
|
64453
|
+
context.theadAndTfootHeight = tfootHeight;
|
|
64454
|
+
} else {
|
|
64455
|
+
context.theadAndTfootHeight = theadHeight + tfootHeight;
|
|
64456
|
+
}
|
|
63449
64457
|
}, [theadRef.current, tfootRef.current]);
|
|
63450
64458
|
var virtualInfo = use_table_virtual({
|
|
63451
64459
|
disabled: !virtual,
|
|
@@ -63461,10 +64469,14 @@ var emptyRef = {
|
|
|
63461
64469
|
theadAndTfootHeight: context.theadAndTfootHeight
|
|
63462
64470
|
});
|
|
63463
64471
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
63464
|
-
var
|
|
64472
|
+
var _tableRef$current;
|
|
63465
64473
|
if (props.hideHeader || !props.sticky) return;
|
|
63466
|
-
|
|
63467
|
-
|
|
64474
|
+
|
|
64475
|
+
// why use querySelectorAll: thead经历了Sticky组件的渲染再回来时,theadRef就丢失了
|
|
64476
|
+
var theads = tableRef === null || tableRef === void 0 || (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.querySelectorAll("[data-soui-role=".concat(theadIdRef.current, "]"));
|
|
64477
|
+
theads === null || theads === void 0 || theads.forEach(function (item) {
|
|
64478
|
+
item.scrollLeft = left;
|
|
64479
|
+
});
|
|
63468
64480
|
});
|
|
63469
64481
|
|
|
63470
64482
|
// 简单表格的滚动事件
|
|
@@ -63511,28 +64523,33 @@ var emptyRef = {
|
|
|
63511
64523
|
}, 100);
|
|
63512
64524
|
});
|
|
63513
64525
|
var renderEmpty = function renderEmpty() {
|
|
63514
|
-
var _props$
|
|
63515
|
-
if (!((_props$
|
|
64526
|
+
var _props$data;
|
|
64527
|
+
if (!((_props$data = props.data) !== null && _props$data !== void 0 && _props$data.length) || filteredData !== undefined && filteredData.length === 0) {
|
|
64528
|
+
var empty = props.empty !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
64529
|
+
children: props.empty
|
|
64530
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(src_empty_empty, {
|
|
64531
|
+
jssStyle: props.jssStyle
|
|
64532
|
+
});
|
|
63516
64533
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63517
64534
|
className: classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper, isScrollX && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyNoBorder)),
|
|
63518
64535
|
ref: function ref(el) {
|
|
63519
64536
|
context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
|
|
63520
64537
|
},
|
|
63521
|
-
children:
|
|
63522
|
-
jssStyle: props.jssStyle
|
|
63523
|
-
})
|
|
64538
|
+
children: empty
|
|
63524
64539
|
});
|
|
63525
64540
|
}
|
|
63526
64541
|
return null;
|
|
63527
64542
|
};
|
|
64543
|
+
var $empty = renderEmpty();
|
|
63528
64544
|
var renderTable = function renderTable() {
|
|
63529
|
-
var _props$summary, _sticky$top, _props$
|
|
64545
|
+
var _props$summary, _sticky$top, _props$data2;
|
|
63530
64546
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
63531
64547
|
colgroup: colgroup,
|
|
63532
64548
|
columns: columns,
|
|
63533
64549
|
shouldLastColAuto: !!shouldLastColAuto
|
|
63534
64550
|
});
|
|
63535
64551
|
var bodyCommonProps = {
|
|
64552
|
+
virtual: props.virtual,
|
|
63536
64553
|
hover: props.hover,
|
|
63537
64554
|
disabled: props.disabled,
|
|
63538
64555
|
rowClickAttr: props.rowClickAttr,
|
|
@@ -63561,8 +64578,7 @@ var emptyRef = {
|
|
|
63561
64578
|
bodyScrollWidth: scrollWidth,
|
|
63562
64579
|
resizeFlag: resizeFlag,
|
|
63563
64580
|
treeCheckAll: props.treeCheckAll,
|
|
63564
|
-
onCellClick: props.onCellClick
|
|
63565
|
-
shouldCellUpdate: props.shouldCellUpdate
|
|
64581
|
+
onCellClick: props.onCellClick
|
|
63566
64582
|
};
|
|
63567
64583
|
var headCommonProps = {
|
|
63568
64584
|
disabled: props.disabled,
|
|
@@ -63602,16 +64618,22 @@ var emptyRef = {
|
|
|
63602
64618
|
target: sticky === null || sticky === void 0 ? void 0 : sticky.target,
|
|
63603
64619
|
top: (_sticky$top = sticky === null || sticky === void 0 ? void 0 : sticky.top) !== null && _sticky$top !== void 0 ? _sticky$top : 0,
|
|
63604
64620
|
css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
|
|
63605
|
-
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
64621
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
|
|
64622
|
+
onChange: function onChange(isSticky) {
|
|
64623
|
+
if (isSticky) {
|
|
64624
|
+
var _scrollRef$current;
|
|
64625
|
+
syncHeaderScroll(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollLeft) || 0);
|
|
64626
|
+
}
|
|
64627
|
+
}
|
|
63606
64628
|
};
|
|
63607
|
-
var isRenderVirtualTable = virtual || props.sticky || !((_props$
|
|
63608
|
-
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper);
|
|
64629
|
+
var isRenderVirtualTable = virtual || props.sticky || !((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length);
|
|
64630
|
+
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, !!$empty && tableClasses.emptyHeader, props.sticky && isScrollY && tableClasses.scrollY, props.sticky && !isScrollY && tableClasses.scrollX);
|
|
63609
64631
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
63610
64632
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
63611
|
-
var _scrollRef$
|
|
64633
|
+
var _scrollRef$current2, _scrollRef$current3, _scrollRef$current4;
|
|
63612
64634
|
if (!props.showTopScrollbar) return null;
|
|
63613
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
63614
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64635
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth) || 0;
|
|
64636
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth) || 0;
|
|
63615
64637
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
63616
64638
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
63617
64639
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -63636,7 +64658,7 @@ var emptyRef = {
|
|
|
63636
64658
|
ref: headMirrorScrollRef,
|
|
63637
64659
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63638
64660
|
style: {
|
|
63639
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64661
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.scrollWidth,
|
|
63640
64662
|
height: 1
|
|
63641
64663
|
}
|
|
63642
64664
|
})
|
|
@@ -63644,17 +64666,16 @@ var emptyRef = {
|
|
|
63644
64666
|
}));
|
|
63645
64667
|
};
|
|
63646
64668
|
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
63647
|
-
var _scrollRef$
|
|
64669
|
+
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
|
|
63648
64670
|
if (!props.showBottomScrollbar) return null;
|
|
63649
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
63650
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64671
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
|
|
64672
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
|
|
63651
64673
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
63652
64674
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
63653
64675
|
// 开启了双滚,但是没有滚动条,不显示
|
|
63654
64676
|
if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
|
|
63655
64677
|
var options = props.showBottomScrollbar === true ? {} : props.showBottomScrollbar;
|
|
63656
64678
|
var scrollerStickyProps = {
|
|
63657
|
-
scrollContainer: options.scrollContainer || document.body,
|
|
63658
64679
|
bottom: options.bottom || 0,
|
|
63659
64680
|
zIndex: options.zIndex || defaultZIndex + 1,
|
|
63660
64681
|
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
@@ -63676,31 +64697,32 @@ var emptyRef = {
|
|
|
63676
64697
|
ref: bottomMirrorScrollRef,
|
|
63677
64698
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63678
64699
|
style: {
|
|
63679
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64700
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
|
|
63680
64701
|
height: 1
|
|
63681
64702
|
}
|
|
63682
64703
|
})
|
|
63683
64704
|
})
|
|
63684
64705
|
}));
|
|
63685
64706
|
};
|
|
63686
|
-
var $headTable = /*#__PURE__*/(0,jsx_runtime.
|
|
63687
|
-
|
|
63688
|
-
|
|
63689
|
-
|
|
63690
|
-
|
|
63691
|
-
children:
|
|
63692
|
-
|
|
64707
|
+
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
64708
|
+
className: headWrapperClass
|
|
64709
|
+
}, getDataAttribute({
|
|
64710
|
+
role: theadIdRef.current
|
|
64711
|
+
})), {}, {
|
|
64712
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64713
|
+
style: {
|
|
64714
|
+
width: width
|
|
64715
|
+
},
|
|
64716
|
+
ref: theadRef,
|
|
64717
|
+
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
64718
|
+
})
|
|
64719
|
+
}));
|
|
63693
64720
|
if (isRenderVirtualTable) {
|
|
63694
|
-
var _props$
|
|
64721
|
+
var _props$data3;
|
|
64722
|
+
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
63695
64723
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
63696
|
-
children: [renderHeadMirrorScroller(),
|
|
63697
|
-
children:
|
|
63698
|
-
className: headWrapperClass,
|
|
63699
|
-
style: {
|
|
63700
|
-
overflow: 'hidden'
|
|
63701
|
-
},
|
|
63702
|
-
children: $headTable
|
|
63703
|
-
})
|
|
64724
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
|
|
64725
|
+
children: $headTable
|
|
63704
64726
|
})), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
|
|
63705
64727
|
style: {
|
|
63706
64728
|
display: 'flex',
|
|
@@ -63714,10 +64736,11 @@ var emptyRef = {
|
|
|
63714
64736
|
onScroll: handleVirtualScroll,
|
|
63715
64737
|
defaultHeight: context.emptyHeight,
|
|
63716
64738
|
isScrollY: isScrollY,
|
|
63717
|
-
|
|
63718
|
-
|
|
63719
|
-
|
|
63720
|
-
|
|
64739
|
+
isScrollX: isScrollX,
|
|
64740
|
+
isEmpty: !!$empty,
|
|
64741
|
+
tableRef: tableRef,
|
|
64742
|
+
setFakeVirtual: setFakeVirtual,
|
|
64743
|
+
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
63721
64744
|
style: {
|
|
63722
64745
|
width: width,
|
|
63723
64746
|
transform: virtualInfo.translateStyle
|
|
@@ -63738,7 +64761,7 @@ var emptyRef = {
|
|
|
63738
64761
|
ref: tfootRef,
|
|
63739
64762
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63740
64763
|
})
|
|
63741
|
-
}) : null,
|
|
64764
|
+
}) : null, $empty]
|
|
63742
64765
|
}), renderBottomMirrorScroller()]
|
|
63743
64766
|
});
|
|
63744
64767
|
}
|
|
@@ -63754,7 +64777,7 @@ var emptyRef = {
|
|
|
63754
64777
|
ref: tbodyRef,
|
|
63755
64778
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
63756
64779
|
children: renderEmpty()
|
|
63757
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64780
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63758
64781
|
})
|
|
63759
64782
|
}), renderBottomMirrorScroller()]
|
|
63760
64783
|
});
|
|
@@ -63779,10 +64802,10 @@ var emptyRef = {
|
|
|
63779
64802
|
|
|
63780
64803
|
// handle head and foot scroll
|
|
63781
64804
|
var handleHeaderWheel = usePersistFn(function (e) {
|
|
63782
|
-
var _theadRef$
|
|
64805
|
+
var _theadRef$current2;
|
|
63783
64806
|
var scrollEl = scrollRef.current;
|
|
63784
64807
|
if (!scrollEl) return;
|
|
63785
|
-
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$
|
|
64808
|
+
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$current2 = theadRef.current) !== null && _theadRef$current2 !== void 0 && _theadRef$current2.parentElement)) return;
|
|
63786
64809
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
|
63787
64810
|
var scrollLeft = scrollEl.scrollLeft + e.deltaX;
|
|
63788
64811
|
if (scrollLeft === scrollEl.scrollLeft) {
|
|
@@ -63793,6 +64816,12 @@ var emptyRef = {
|
|
|
63793
64816
|
scrollEl.scrollLeft = left;
|
|
63794
64817
|
theadRef.current.parentElement.scrollLeft = left;
|
|
63795
64818
|
});
|
|
64819
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64820
|
+
var _scrollRef$current8;
|
|
64821
|
+
if (!props.sticky || !scrollRef.current || !isScrollX) return;
|
|
64822
|
+
// sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
|
|
64823
|
+
syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
|
|
64824
|
+
}, [isScrollX, props.sticky, $empty]);
|
|
63796
64825
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63797
64826
|
// 绑定 wheel 事件
|
|
63798
64827
|
if (props.sticky && theadRef.current && theadRef.current.parentElement) {
|
|
@@ -63970,7 +64999,8 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
63970
64999
|
active = _useTabsContext.active,
|
|
63971
65000
|
lazy = _useTabsContext.lazy,
|
|
63972
65001
|
setTabs = _useTabsContext.setTabs,
|
|
63973
|
-
color = _useTabsContext.color
|
|
65002
|
+
color = _useTabsContext.color,
|
|
65003
|
+
shape = _useTabsContext.shape;
|
|
63974
65004
|
var isActive = active === id;
|
|
63975
65005
|
var keekAlive = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
63976
65006
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
@@ -63979,7 +65009,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
63979
65009
|
tab: tab,
|
|
63980
65010
|
disabled: props.disabled,
|
|
63981
65011
|
jssStyle: jssStyle,
|
|
63982
|
-
background: background,
|
|
65012
|
+
background: shape !== 'button' && shape !== 'fill' ? background : undefined,
|
|
63983
65013
|
color: props.color || (active === id ? color : undefined)
|
|
63984
65014
|
};
|
|
63985
65015
|
setTabs(function (prev) {
|
|
@@ -64008,7 +65038,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
64008
65038
|
});
|
|
64009
65039
|
});
|
|
64010
65040
|
};
|
|
64011
|
-
}, [id, tab, color, active, props.disabled, props.jssStyle]);
|
|
65041
|
+
}, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
|
|
64012
65042
|
if (!isActive && lazy && !keekAlive.current) {
|
|
64013
65043
|
return null;
|
|
64014
65044
|
}
|
|
@@ -65606,6 +66636,7 @@ var TransferOperate = function TransferOperate(props) {
|
|
|
65606
66636
|
|
|
65607
66637
|
|
|
65608
66638
|
|
|
66639
|
+
|
|
65609
66640
|
var Transfer = function Transfer(props) {
|
|
65610
66641
|
var _jssStyle$transfer;
|
|
65611
66642
|
var jssStyle = props.jssStyle,
|
|
@@ -65680,7 +66711,7 @@ var Transfer = function Transfer(props) {
|
|
|
65680
66711
|
sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
|
|
65681
66712
|
targetSelectedKeys = _useTransfer.targetSelectedKeys,
|
|
65682
66713
|
onFilter = _useTransfer.onFilter,
|
|
65683
|
-
|
|
66714
|
+
_onSelectChange = _useTransfer.onSelectChange;
|
|
65684
66715
|
var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
|
|
65685
66716
|
var rootClass = classnames_default()(styles.rootClass, styles.transfer, className, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.simple, simple), styles.small, size === 'small'), styles.large, size === 'large'), styles.equalPanelWidth, equalPanelWidth));
|
|
65686
66717
|
var renderOperations = function renderOperations() {
|
|
@@ -65754,7 +66785,15 @@ var Transfer = function Transfer(props) {
|
|
|
65754
66785
|
searchPlaceholder: placeholder,
|
|
65755
66786
|
renderFilter: renderFilter,
|
|
65756
66787
|
onFilter: onFilterProp ? onFilter : undefined,
|
|
65757
|
-
onSelectChange: onSelectChange
|
|
66788
|
+
onSelectChange: function onSelectChange(keys) {
|
|
66789
|
+
if (isSource) {
|
|
66790
|
+
var newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(targetSelectedKeys || []))));
|
|
66791
|
+
_onSelectChange(newAllKeys, keys, targetSelectedKeys);
|
|
66792
|
+
} else {
|
|
66793
|
+
var _newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(sourceSelectedKeys || []))));
|
|
66794
|
+
_onSelectChange(_newAllKeys, sourceSelectedKeys, keys);
|
|
66795
|
+
}
|
|
66796
|
+
}
|
|
65758
66797
|
});
|
|
65759
66798
|
};
|
|
65760
66799
|
var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
@@ -65814,7 +66853,8 @@ var tree_Tree = function Tree(props) {
|
|
|
65814
66853
|
return {
|
|
65815
66854
|
tree: treeStyle,
|
|
65816
66855
|
spin: spinStyle,
|
|
65817
|
-
checkbox: checkboxStyle
|
|
66856
|
+
checkbox: checkboxStyle,
|
|
66857
|
+
common: useCommonStyle
|
|
65818
66858
|
};
|
|
65819
66859
|
}, [treeStyle, spinStyle]);
|
|
65820
66860
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_tree, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -65959,6 +66999,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65959
66999
|
onChangeProp = props.onChange,
|
|
65960
67000
|
compressedBound = props.compressedBound,
|
|
65961
67001
|
compressedClassName = props.compressedClassName,
|
|
67002
|
+
renderCompressed = props.renderCompressed,
|
|
65962
67003
|
expandedProp = props.expanded,
|
|
65963
67004
|
defaultExpanded = props.defaultExpanded,
|
|
65964
67005
|
defaultExpandAll = props.defaultExpandAll,
|
|
@@ -65971,6 +67012,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65971
67012
|
onChangeAddition = props.onChangeAddition,
|
|
65972
67013
|
onEnterExpand = props.onEnterExpand,
|
|
65973
67014
|
onExpand = props.onExpand,
|
|
67015
|
+
beforeChange = props.beforeChange,
|
|
65974
67016
|
filterSameChange = props.filterSameChange;
|
|
65975
67017
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$treeSelect = jssStyle.treeSelect) === null || _jssStyle$treeSelect === void 0 ? void 0 : _jssStyle$treeSelect.call(jssStyle);
|
|
65976
67018
|
var rootStyle = Object.assign({
|
|
@@ -65997,7 +67039,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65997
67039
|
defaultValue: defaultValue,
|
|
65998
67040
|
control: 'value' in props,
|
|
65999
67041
|
filterSameChange: filterSameChange,
|
|
66000
|
-
multiple: multiple
|
|
67042
|
+
multiple: multiple,
|
|
67043
|
+
beforeChange: beforeChange
|
|
66001
67044
|
}),
|
|
66002
67045
|
value = _useTreeSelect.value,
|
|
66003
67046
|
onChange = _useTreeSelect.onChange;
|
|
@@ -66028,7 +67071,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66028
67071
|
rawData = _useFilter.rawData,
|
|
66029
67072
|
onFilter = _useFilter.onFilter,
|
|
66030
67073
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
66031
|
-
setInputText = _useFilter.setInputText
|
|
67074
|
+
setInputText = _useFilter.setInputText,
|
|
67075
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
66032
67076
|
var controlExpanded = 'expanded' in props || expanded !== null && expanded !== void 0 && expanded.length ? expanded : undefined;
|
|
66033
67077
|
var renderMoreIcon = function renderMoreIcon() {
|
|
66034
67078
|
return icons_config.treeSelect.More;
|
|
@@ -66366,6 +67410,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66366
67410
|
disabled: disabled,
|
|
66367
67411
|
compressed: compressed,
|
|
66368
67412
|
compressedBound: compressedBound,
|
|
67413
|
+
renderCompressed: renderCompressed,
|
|
66369
67414
|
compressedClassName: compressedClassName,
|
|
66370
67415
|
multiple: multiple,
|
|
66371
67416
|
placeholder: placeholder,
|
|
@@ -66480,7 +67525,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66480
67525
|
parentClickExpand: parentClickExpand,
|
|
66481
67526
|
contentClass: getContentClass,
|
|
66482
67527
|
datum: datum,
|
|
66483
|
-
actionOnClick: props.actionOnClick
|
|
67528
|
+
actionOnClick: props.actionOnClick,
|
|
67529
|
+
size: size
|
|
66484
67530
|
}))
|
|
66485
67531
|
});
|
|
66486
67532
|
};
|
|
@@ -66499,38 +67545,44 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66499
67545
|
}, []);
|
|
66500
67546
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
66501
67547
|
fieldId = _useContext.fieldId;
|
|
66502
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
66503
|
-
|
|
66504
|
-
|
|
66505
|
-
|
|
66506
|
-
|
|
66507
|
-
|
|
66508
|
-
|
|
66509
|
-
|
|
66510
|
-
|
|
66511
|
-
|
|
66512
|
-
|
|
66513
|
-
|
|
66514
|
-
|
|
66515
|
-
|
|
66516
|
-
|
|
66517
|
-
|
|
66518
|
-
|
|
66519
|
-
|
|
66520
|
-
|
|
66521
|
-
|
|
66522
|
-
|
|
66523
|
-
|
|
66524
|
-
|
|
66525
|
-
|
|
66526
|
-
|
|
66527
|
-
|
|
66528
|
-
|
|
66529
|
-
|
|
66530
|
-
|
|
66531
|
-
|
|
66532
|
-
|
|
66533
|
-
|
|
67548
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
67549
|
+
value: {
|
|
67550
|
+
filterText: filterText,
|
|
67551
|
+
highlight: props.highlight
|
|
67552
|
+
},
|
|
67553
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
67554
|
+
id: fieldId,
|
|
67555
|
+
ref: targetRef,
|
|
67556
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
67557
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
67558
|
+
className: rootClass,
|
|
67559
|
+
style: rootStyle,
|
|
67560
|
+
onBlur: handleBlur,
|
|
67561
|
+
onFocus: handleFocus,
|
|
67562
|
+
onKeyDown: handleKeyDown,
|
|
67563
|
+
children: [tipNode, renderResult(), hadOpened && /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
67564
|
+
adjust: adjust,
|
|
67565
|
+
focus: open,
|
|
67566
|
+
fixedWidth: "min",
|
|
67567
|
+
lazy: false,
|
|
67568
|
+
absolute: props.absolute,
|
|
67569
|
+
zIndex: props.zIndex,
|
|
67570
|
+
position: position,
|
|
67571
|
+
popupGap: 4,
|
|
67572
|
+
popupElRef: popupRef,
|
|
67573
|
+
parentElRef: targetRef,
|
|
67574
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
|
|
67575
|
+
onRef: popupRef,
|
|
67576
|
+
show: open,
|
|
67577
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper),
|
|
67578
|
+
display: 'block',
|
|
67579
|
+
type: "scale-y",
|
|
67580
|
+
duration: 'fast',
|
|
67581
|
+
children: renderList()
|
|
67582
|
+
})
|
|
67583
|
+
})]
|
|
67584
|
+
}))
|
|
67585
|
+
});
|
|
66534
67586
|
};
|
|
66535
67587
|
/* harmony default export */ var src_tree_select_tree_select = (TreeSelect);
|
|
66536
67588
|
;// CONCATENATED MODULE: ./src/tree-select/tree-select.tsx
|
|
@@ -66548,7 +67600,8 @@ var tree_select_jssStyle = {
|
|
|
66548
67600
|
checkbox: useCheckboxStyle,
|
|
66549
67601
|
popover: usePopoverStyle,
|
|
66550
67602
|
treeSelect: useTreeSelectStyle,
|
|
66551
|
-
innerTitle: useInnerTitleStyle
|
|
67603
|
+
innerTitle: useInnerTitleStyle,
|
|
67604
|
+
common: useCommonStyle
|
|
66552
67605
|
};
|
|
66553
67606
|
var TreeSelectComponent = function TreeSelectComponent(props) {
|
|
66554
67607
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_select_tree_select, objectSpread2_default()({
|
|
@@ -66657,6 +67710,7 @@ function attrAccept(file, acceptedFiles) {
|
|
|
66657
67710
|
|
|
66658
67711
|
|
|
66659
67712
|
|
|
67713
|
+
|
|
66660
67714
|
var VALIDATORITEMS = [{
|
|
66661
67715
|
key: 'size',
|
|
66662
67716
|
param: function param(blob) {
|
|
@@ -66690,11 +67744,12 @@ var promised = function promised(action) {
|
|
|
66690
67744
|
resolve(true);
|
|
66691
67745
|
});
|
|
66692
67746
|
};
|
|
67747
|
+
var defaultValue = [];
|
|
66693
67748
|
var useUpload = function useUpload(props) {
|
|
66694
67749
|
var _props$limit = props.limit,
|
|
66695
67750
|
limit = _props$limit === void 0 ? 100 : _props$limit,
|
|
66696
67751
|
_props$value = props.value,
|
|
66697
|
-
value = _props$value === void 0 ?
|
|
67752
|
+
value = _props$value === void 0 ? defaultValue : _props$value;
|
|
66698
67753
|
var accept = props.forceAccept || props.accept;
|
|
66699
67754
|
var forceAccept = !!props.forceAccept;
|
|
66700
67755
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
@@ -66814,21 +67869,22 @@ var useUpload = function useUpload(props) {
|
|
|
66814
67869
|
responseType: props.responseType,
|
|
66815
67870
|
onStart: props.onStart,
|
|
66816
67871
|
onProgress: function onProgress(e, msg) {
|
|
66817
|
-
|
|
67872
|
+
var percent = typeof e.percent === 'number' ? e.percent : e.loaded / e.total * 100;
|
|
67873
|
+
if (throttle && percent !== 100) return;
|
|
66818
67874
|
throttle = true;
|
|
66819
67875
|
setTimeout(function () {
|
|
66820
67876
|
throttle = false;
|
|
66821
67877
|
}, 16);
|
|
66822
|
-
|
|
66823
|
-
|
|
66824
|
-
|
|
66825
|
-
|
|
66826
|
-
|
|
66827
|
-
|
|
66828
|
-
|
|
66829
|
-
|
|
66830
|
-
|
|
66831
|
-
}
|
|
67878
|
+
setFiles(function (files) {
|
|
67879
|
+
return utils_immer_produce(files, function (draft) {
|
|
67880
|
+
if (!draft[id]) return draft;
|
|
67881
|
+
draft[id].process = percent;
|
|
67882
|
+
if (msg) draft[id].message = msg;
|
|
67883
|
+
if (typeof props.onProgress === 'function') {
|
|
67884
|
+
props.onProgress(draft[id]);
|
|
67885
|
+
}
|
|
67886
|
+
});
|
|
67887
|
+
});
|
|
66832
67888
|
},
|
|
66833
67889
|
onLoad: function onLoad(xhr) {
|
|
66834
67890
|
if (!/^2|1223/.test("".concat(xhr.status))) {
|
|
@@ -66856,11 +67912,17 @@ var useUpload = function useUpload(props) {
|
|
|
66856
67912
|
delete draft[id];
|
|
66857
67913
|
});
|
|
66858
67914
|
});
|
|
66859
|
-
|
|
66860
|
-
|
|
66861
|
-
|
|
66862
|
-
|
|
66863
|
-
|
|
67915
|
+
if (props.functionalOnChange) {
|
|
67916
|
+
// 回调型 setState不会丢值
|
|
67917
|
+
props.onChange(function (prev) {
|
|
67918
|
+
return [].concat(toConsumableArray_default()(prev || []), [result]);
|
|
67919
|
+
});
|
|
67920
|
+
} else {
|
|
67921
|
+
var latestValue = latestState.value;
|
|
67922
|
+
var newValue = toConsumableArray_default()(latestValue);
|
|
67923
|
+
newValue.push(result);
|
|
67924
|
+
props.onChange(newValue);
|
|
67925
|
+
}
|
|
66864
67926
|
}
|
|
66865
67927
|
},
|
|
66866
67928
|
onError: function onError(xhr) {
|
|
@@ -66978,48 +68040,60 @@ var useUpload = function useUpload(props) {
|
|
|
66978
68040
|
error = _context2.sent;
|
|
66979
68041
|
case 21:
|
|
66980
68042
|
if (!(error instanceof Error)) {
|
|
66981
|
-
_context2.next =
|
|
68043
|
+
_context2.next = 29;
|
|
66982
68044
|
break;
|
|
66983
68045
|
}
|
|
66984
68046
|
if (validatorHandle(error, blob)) {
|
|
66985
|
-
_context2.next =
|
|
68047
|
+
_context2.next = 25;
|
|
66986
68048
|
break;
|
|
66987
68049
|
}
|
|
66988
|
-
|
|
66989
|
-
|
|
68050
|
+
setFiles(function (prev) {
|
|
68051
|
+
return utils_immer_produce(prev, function (draft) {
|
|
68052
|
+
delete draft[id];
|
|
68053
|
+
});
|
|
68054
|
+
});
|
|
66990
68055
|
return _context2.abrupt("return", 0);
|
|
66991
|
-
case
|
|
68056
|
+
case 25:
|
|
66992
68057
|
fileRecord.message = error.message;
|
|
66993
68058
|
fileRecord.status = 3;
|
|
66994
|
-
setFiles(
|
|
68059
|
+
setFiles(function (prev) {
|
|
68060
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68061
|
+
});
|
|
66995
68062
|
return _context2.abrupt("return", 0);
|
|
66996
|
-
case
|
|
68063
|
+
case 29:
|
|
66997
68064
|
if (!props.beforeUpload) {
|
|
66998
|
-
_context2.next =
|
|
68065
|
+
_context2.next = 36;
|
|
66999
68066
|
break;
|
|
67000
68067
|
}
|
|
67001
68068
|
beforeUploadResult = props.beforeUpload(blob); // @ts-ignoreq
|
|
67002
68069
|
if (!(beforeUploadResult && beforeUploadResult.then)) {
|
|
67003
|
-
_context2.next =
|
|
68070
|
+
_context2.next = 34;
|
|
67004
68071
|
break;
|
|
67005
68072
|
}
|
|
67006
68073
|
props.beforeUpload(blob).then(function (args) {
|
|
67007
68074
|
if (args.status !== 'error') {
|
|
67008
68075
|
newFiles[id].xhr = uploadFile(id, blob, fileRecord.src);
|
|
67009
|
-
setFiles(
|
|
68076
|
+
setFiles(function (prev) {
|
|
68077
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68078
|
+
});
|
|
67010
68079
|
}
|
|
67011
68080
|
}).catch(function () {
|
|
67012
|
-
|
|
67013
|
-
|
|
68081
|
+
setFiles(function (prev) {
|
|
68082
|
+
return utils_immer_produce(prev, function (draft) {
|
|
68083
|
+
delete draft[id];
|
|
68084
|
+
});
|
|
68085
|
+
});
|
|
67014
68086
|
});
|
|
67015
68087
|
return _context2.abrupt("return", 0);
|
|
67016
|
-
case
|
|
67017
|
-
_context2.next =
|
|
68088
|
+
case 34:
|
|
68089
|
+
_context2.next = 38;
|
|
67018
68090
|
break;
|
|
67019
|
-
case
|
|
68091
|
+
case 36:
|
|
67020
68092
|
fileRecord.xhr = uploadFile(id, blob, fileRecord.src);
|
|
67021
|
-
setFiles(
|
|
67022
|
-
|
|
68093
|
+
setFiles(function (prev) {
|
|
68094
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68095
|
+
});
|
|
68096
|
+
case 38:
|
|
67023
68097
|
case "end":
|
|
67024
68098
|
return _context2.stop();
|
|
67025
68099
|
}
|
|
@@ -67123,23 +68197,53 @@ var useUpload = function useUpload(props) {
|
|
|
67123
68197
|
|
|
67124
68198
|
|
|
67125
68199
|
|
|
68200
|
+
|
|
68201
|
+
|
|
67126
68202
|
var useDrop = function useDrop(props) {
|
|
67127
68203
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
67128
68204
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
67129
68205
|
isoOver = _useState2[0],
|
|
67130
68206
|
setOver = _useState2[1];
|
|
67131
|
-
var handleFileDrop = function
|
|
67132
|
-
var
|
|
67133
|
-
|
|
67134
|
-
|
|
67135
|
-
|
|
67136
|
-
|
|
67137
|
-
|
|
67138
|
-
|
|
67139
|
-
|
|
67140
|
-
|
|
67141
|
-
|
|
67142
|
-
|
|
68207
|
+
var handleFileDrop = /*#__PURE__*/function () {
|
|
68208
|
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
|
|
68209
|
+
var accept, multiple, beforeDrop, onDrop, dropData, files, filter;
|
|
68210
|
+
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
68211
|
+
while (1) switch (_context.prev = _context.next) {
|
|
68212
|
+
case 0:
|
|
68213
|
+
accept = props.accept, multiple = props.multiple, beforeDrop = props.beforeDrop, onDrop = props.onDrop, dropData = props.dropData;
|
|
68214
|
+
if (!(beforeDrop && isFunc(beforeDrop))) {
|
|
68215
|
+
_context.next = 7;
|
|
68216
|
+
break;
|
|
68217
|
+
}
|
|
68218
|
+
_context.next = 4;
|
|
68219
|
+
return beforeDrop(e);
|
|
68220
|
+
case 4:
|
|
68221
|
+
files = _context.sent;
|
|
68222
|
+
_context.next = 8;
|
|
68223
|
+
break;
|
|
68224
|
+
case 7:
|
|
68225
|
+
files = e.dataTransfer.files;
|
|
68226
|
+
case 8:
|
|
68227
|
+
filter = accept ? Array.prototype.filter.call(files, function (f) {
|
|
68228
|
+
return attrAccept(f, accept);
|
|
68229
|
+
}) : Array.from(files);
|
|
68230
|
+
if (!(!filter || filter.length === 0)) {
|
|
68231
|
+
_context.next = 11;
|
|
68232
|
+
break;
|
|
68233
|
+
}
|
|
68234
|
+
return _context.abrupt("return");
|
|
68235
|
+
case 11:
|
|
68236
|
+
if (onDrop) onDrop(multiple ? filter : [filter[0]], dropData);
|
|
68237
|
+
case 12:
|
|
68238
|
+
case "end":
|
|
68239
|
+
return _context.stop();
|
|
68240
|
+
}
|
|
68241
|
+
}, _callee);
|
|
68242
|
+
}));
|
|
68243
|
+
return function handleFileDrop(_x) {
|
|
68244
|
+
return _ref.apply(this, arguments);
|
|
68245
|
+
};
|
|
68246
|
+
}();
|
|
67143
68247
|
var handleDrag = function handleDrag(e) {
|
|
67144
68248
|
var disabled = props.disabled;
|
|
67145
68249
|
if (disabled) return;
|
|
@@ -67417,7 +68521,8 @@ var Upload = function Upload(props0) {
|
|
|
67417
68521
|
invalidImage: getLocale(locale, 'invalidImage')
|
|
67418
68522
|
},
|
|
67419
68523
|
value: value,
|
|
67420
|
-
onChange: onChange
|
|
68524
|
+
onChange: onChange,
|
|
68525
|
+
functionalOnChange: props.functionalOnChange
|
|
67421
68526
|
})),
|
|
67422
68527
|
func = _useUpload.func,
|
|
67423
68528
|
files = _useUpload.files,
|
|
@@ -67463,6 +68568,7 @@ var Upload = function Upload(props0) {
|
|
|
67463
68568
|
accept: accept,
|
|
67464
68569
|
disabled: props.disabled,
|
|
67465
68570
|
onDrop: func.addFiles,
|
|
68571
|
+
beforeDrop: props.beforeDrop,
|
|
67466
68572
|
multiple: !!props.multiple || limit > 1,
|
|
67467
68573
|
className: classnames_default()(uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.dropItem),
|
|
67468
68574
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", objectSpread2_default()(objectSpread2_default()({
|
|
@@ -70009,6 +71115,8 @@ var rate_interface = __webpack_require__(4188);
|
|
|
70009
71115
|
var rule_interface = __webpack_require__(1645);
|
|
70010
71116
|
// EXTERNAL MODULE: ./src/select/interface.ts
|
|
70011
71117
|
var select_interface = __webpack_require__(7640);
|
|
71118
|
+
// EXTERNAL MODULE: ./src/skeleton/interface.ts
|
|
71119
|
+
var skeleton_interface = __webpack_require__(6599);
|
|
70012
71120
|
// EXTERNAL MODULE: ./src/slider/interface.ts
|
|
70013
71121
|
var slider_interface = __webpack_require__(5864);
|
|
70014
71122
|
// EXTERNAL MODULE: ./src/spin/interface.ts
|
|
@@ -70135,6 +71243,8 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70135
71243
|
|
|
70136
71244
|
|
|
70137
71245
|
|
|
71246
|
+
|
|
71247
|
+
|
|
70138
71248
|
|
|
70139
71249
|
|
|
70140
71250
|
|
|
@@ -70198,10 +71308,11 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70198
71308
|
|
|
70199
71309
|
|
|
70200
71310
|
|
|
71311
|
+
|
|
70201
71312
|
|
|
70202
71313
|
|
|
70203
71314
|
/* harmony default export */ var src_0 = ({
|
|
70204
|
-
version: '3.7.0-
|
|
71315
|
+
version: '3.7.0-fix.2'
|
|
70205
71316
|
});
|
|
70206
71317
|
}();
|
|
70207
71318
|
/******/ return __webpack_exports__;
|