shineout 3.7.0-beta.9 → 3.7.0
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 +1663 -551
- 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');
|
|
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",
|
|
@@ -35476,6 +35941,18 @@ function removeProtocol(url) {
|
|
|
35476
35941
|
return url;
|
|
35477
35942
|
}
|
|
35478
35943
|
}
|
|
35944
|
+
|
|
35945
|
+
/**
|
|
35946
|
+
* Used to match `RegExp`
|
|
35947
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
35948
|
+
*/
|
|
35949
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
35950
|
+
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
35951
|
+
function escapeRegExp() {
|
|
35952
|
+
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
35953
|
+
var string = typeof str === 'string' ? str : str.toString();
|
|
35954
|
+
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;
|
|
35955
|
+
}
|
|
35479
35956
|
;// CONCATENATED MODULE: ../base/src/config/locale/zh-CN.ts
|
|
35480
35957
|
/* harmony default export */ var zh_CN = ({
|
|
35481
35958
|
now: '今天',
|
|
@@ -36239,7 +36716,10 @@ var Carousel = function Carousel(props) {
|
|
|
36239
36716
|
_props$indicatorPosit = props.indicatorPosition,
|
|
36240
36717
|
indicatorPosition = _props$indicatorPosit === void 0 ? 'center' : _props$indicatorPosit,
|
|
36241
36718
|
_props$indicatorType = props.indicatorType,
|
|
36242
|
-
indicatorType = _props$indicatorType === void 0 ? 'circle' : _props$indicatorType
|
|
36719
|
+
indicatorType = _props$indicatorType === void 0 ? 'circle' : _props$indicatorType,
|
|
36720
|
+
itemClassName = props.itemClassName,
|
|
36721
|
+
_props$showIndicator = props.showIndicator,
|
|
36722
|
+
showIndicator = _props$showIndicator === void 0 ? true : _props$showIndicator;
|
|
36243
36723
|
var total = external_root_React_commonjs2_react_commonjs_react_amd_react_default().Children.toArray(props.children).length;
|
|
36244
36724
|
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
36725
|
var config = useConfig();
|
|
@@ -36261,7 +36741,7 @@ var Carousel = function Carousel(props) {
|
|
|
36261
36741
|
height: (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.height
|
|
36262
36742
|
},
|
|
36263
36743
|
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));
|
|
36744
|
+
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
36745
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
36266
36746
|
className: itemClasses,
|
|
36267
36747
|
children: child
|
|
@@ -36301,7 +36781,7 @@ var Carousel = function Carousel(props) {
|
|
|
36301
36781
|
});
|
|
36302
36782
|
};
|
|
36303
36783
|
var renderIndicator = function renderIndicator() {
|
|
36304
|
-
if (total <= 1) return null;
|
|
36784
|
+
if (total <= 1 && typeof indicatorType !== 'function' || showIndicator === false) return null;
|
|
36305
36785
|
var content = null;
|
|
36306
36786
|
if (typeof indicatorType === 'function') {
|
|
36307
36787
|
content = indicatorType(current, func.moveTo);
|
|
@@ -37733,11 +38213,16 @@ var mergeFilteredTree = function mergeFilteredTree(filterData, rawDatum, tiledId
|
|
|
37733
38213
|
draft.map(recursion);
|
|
37734
38214
|
});
|
|
37735
38215
|
};
|
|
38216
|
+
;// CONCATENATED MODULE: ../hooks/src/common/use-filter/use-filter-context.ts
|
|
38217
|
+
|
|
38218
|
+
var FilterContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
|
|
38219
|
+
FilterContext.displayName = 'FilterContext';
|
|
37736
38220
|
;// CONCATENATED MODULE: ../hooks/src/common/use-filter/use-filter.ts
|
|
37737
38221
|
|
|
37738
38222
|
|
|
37739
38223
|
|
|
37740
38224
|
|
|
38225
|
+
|
|
37741
38226
|
var useFilter = function useFilter(props) {
|
|
37742
38227
|
var data = props.data,
|
|
37743
38228
|
groupKey = props.groupKey,
|
|
@@ -37879,6 +38364,7 @@ var useFilter = function useFilter(props) {
|
|
|
37879
38364
|
filterFunc: filterFunc,
|
|
37880
38365
|
onCreate: onCreate ? handleCreate : undefined,
|
|
37881
38366
|
onFilter: onFilter || onCreate ? handleFilter : undefined,
|
|
38367
|
+
FilterProvider: FilterContext.Provider,
|
|
37882
38368
|
// onResetFilter: handleResetData,
|
|
37883
38369
|
onClearCreatedData: handleClearCreatedData
|
|
37884
38370
|
};
|
|
@@ -38189,9 +38675,10 @@ var useTree = function useTree(props) {
|
|
|
38189
38675
|
};
|
|
38190
38676
|
}
|
|
38191
38677
|
if (virtual) {
|
|
38678
|
+
var _context$dataFlatStat;
|
|
38192
38679
|
return {
|
|
38193
38680
|
active: isActive,
|
|
38194
|
-
expanded: context.dataFlatStatusMap.get(id).expanded
|
|
38681
|
+
expanded: !!((_context$dataFlatStat = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat !== void 0 && _context$dataFlatStat.expanded)
|
|
38195
38682
|
};
|
|
38196
38683
|
}
|
|
38197
38684
|
return {
|
|
@@ -38202,11 +38689,12 @@ var useTree = function useTree(props) {
|
|
|
38202
38689
|
|
|
38203
38690
|
// 注册节点
|
|
38204
38691
|
var bindVirtualNode = function bindVirtualNode(id, update) {
|
|
38692
|
+
var _context$dataFlatStat2;
|
|
38205
38693
|
context.updateMap.set(id, update);
|
|
38206
38694
|
var isActive = activeProp === id;
|
|
38207
38695
|
return {
|
|
38208
38696
|
active: isActive,
|
|
38209
|
-
expanded: context.dataFlatStatusMap.get(id).expanded
|
|
38697
|
+
expanded: !!((_context$dataFlatStat2 = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat2 !== void 0 && _context$dataFlatStat2.expanded)
|
|
38210
38698
|
};
|
|
38211
38699
|
};
|
|
38212
38700
|
var get = function get(id) {
|
|
@@ -38578,7 +39066,7 @@ var useTree = function useTree(props) {
|
|
|
38578
39066
|
var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
|
|
38579
39067
|
if (!child) return;
|
|
38580
39068
|
child.forEach(function (item, i) {
|
|
38581
|
-
var _context$
|
|
39069
|
+
var _context$dataFlatStat3;
|
|
38582
39070
|
var childId = getKey(item, pid, i);
|
|
38583
39071
|
var node = {
|
|
38584
39072
|
id: childId,
|
|
@@ -38587,7 +39075,7 @@ var useTree = function useTree(props) {
|
|
|
38587
39075
|
pid: pid
|
|
38588
39076
|
};
|
|
38589
39077
|
insertData.push(node);
|
|
38590
|
-
if ((_context$
|
|
39078
|
+
if ((_context$dataFlatStat3 = context.dataFlatStatusMap.get(childId)) !== null && _context$dataFlatStat3 !== void 0 && _context$dataFlatStat3.expanded && item[childrenKey]) {
|
|
38591
39079
|
appendChildrenExpanded(item[childrenKey], level + 1, childId, insertData);
|
|
38592
39080
|
}
|
|
38593
39081
|
});
|
|
@@ -38670,6 +39158,16 @@ var useTree = function useTree(props) {
|
|
|
38670
39158
|
var getFlatData = function getFlatData() {
|
|
38671
39159
|
return context.dataFlat;
|
|
38672
39160
|
};
|
|
39161
|
+
var updateExpanded = usePersistFn(function (expanded) {
|
|
39162
|
+
var tempExpandMap = new Set(expanded);
|
|
39163
|
+
if (!expanded) return;
|
|
39164
|
+
if (virtual) {
|
|
39165
|
+
expandedFlat(expanded);
|
|
39166
|
+
}
|
|
39167
|
+
context.updateMap.forEach(function (update, id) {
|
|
39168
|
+
update('expanded', tempExpandMap.has(id));
|
|
39169
|
+
});
|
|
39170
|
+
});
|
|
38673
39171
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38674
39172
|
if (defaultExpandAll) {
|
|
38675
39173
|
var nextExpanded = [];
|
|
@@ -38685,8 +39183,13 @@ var useTree = function useTree(props) {
|
|
|
38685
39183
|
if (props.datum) return;
|
|
38686
39184
|
if (!dataUpdate) return;
|
|
38687
39185
|
setData(data);
|
|
39186
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
39187
|
+
if (!shallowEqual(nextExpanded, expanded)) {
|
|
39188
|
+
onExpand(nextExpanded);
|
|
39189
|
+
updateExpanded(nextExpanded);
|
|
39190
|
+
}
|
|
38688
39191
|
updateInnerCheckStatus();
|
|
38689
|
-
}, [data]);
|
|
39192
|
+
}, [props.data]);
|
|
38690
39193
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
38691
39194
|
if (props.datum) return;
|
|
38692
39195
|
setValue(value);
|
|
@@ -38711,16 +39214,17 @@ var useTree = function useTree(props) {
|
|
|
38711
39214
|
getChecked: getChecked,
|
|
38712
39215
|
getKey: getKey,
|
|
38713
39216
|
getFlatData: getFlatData,
|
|
39217
|
+
getDataById: getDataById,
|
|
38714
39218
|
getDataByValues: getDataByValues,
|
|
38715
39219
|
setValue: setValue,
|
|
38716
39220
|
setData: setData,
|
|
38717
39221
|
isDisabled: isDisabled,
|
|
39222
|
+
isUnMatched: isUnMatched,
|
|
38718
39223
|
bindNode: bindNode,
|
|
38719
39224
|
bindVirtualNode: bindVirtualNode,
|
|
38720
|
-
getDataById: getDataById,
|
|
38721
39225
|
bindUpdate: bindUpdate,
|
|
38722
39226
|
unBindUpdate: unBindUpdate,
|
|
38723
|
-
|
|
39227
|
+
updateExpanded: updateExpanded,
|
|
38724
39228
|
childrenKey: childrenKey,
|
|
38725
39229
|
data: data,
|
|
38726
39230
|
dataFlat: dataFlat,
|
|
@@ -39226,6 +39730,66 @@ var VirtualList = function VirtualList(props) {
|
|
|
39226
39730
|
return renderList();
|
|
39227
39731
|
};
|
|
39228
39732
|
/* harmony default export */ var virtual_scroll_list = (VirtualList);
|
|
39733
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/highlight.tsx
|
|
39734
|
+
|
|
39735
|
+
|
|
39736
|
+
|
|
39737
|
+
|
|
39738
|
+
|
|
39739
|
+
function getHighlightText(_ref) {
|
|
39740
|
+
var nodeList = _ref.nodeList,
|
|
39741
|
+
searchWords = _ref.searchWords,
|
|
39742
|
+
highlightClassName = _ref.highlightClassName,
|
|
39743
|
+
enable = _ref.enable;
|
|
39744
|
+
if (!enable || !searchWords) {
|
|
39745
|
+
return nodeList;
|
|
39746
|
+
}
|
|
39747
|
+
var transformNode = function transformNode(node) {
|
|
39748
|
+
var _node$props;
|
|
39749
|
+
if (node && typeof ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.children) === 'string') {
|
|
39750
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(node, undefined, /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
|
|
39751
|
+
textToHighlight: node.props.children,
|
|
39752
|
+
searchWords: searchWords,
|
|
39753
|
+
highlightClassName: highlightClassName
|
|
39754
|
+
}));
|
|
39755
|
+
}
|
|
39756
|
+
if (node && typeof node === 'string') {
|
|
39757
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
|
|
39758
|
+
textToHighlight: node,
|
|
39759
|
+
searchWords: searchWords,
|
|
39760
|
+
highlightClassName: highlightClassName
|
|
39761
|
+
});
|
|
39762
|
+
}
|
|
39763
|
+
return node;
|
|
39764
|
+
};
|
|
39765
|
+
return isArray(nodeList) ? nodeList.map(transformNode) : transformNode(nodeList);
|
|
39766
|
+
}
|
|
39767
|
+
function HighlightText(_ref2) {
|
|
39768
|
+
var textToHighlight = _ref2.textToHighlight,
|
|
39769
|
+
searchWords = _ref2.searchWords,
|
|
39770
|
+
highlightClassName = _ref2.highlightClassName;
|
|
39771
|
+
if (!searchWords) return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
39772
|
+
children: textToHighlight
|
|
39773
|
+
});
|
|
39774
|
+
if (searchWords.length > 500) {
|
|
39775
|
+
searchWords = searchWords.slice(0, 500);
|
|
39776
|
+
}
|
|
39777
|
+
|
|
39778
|
+
// 注意这里的括号,这里使用了带capture group功能的正则,来split字符串
|
|
39779
|
+
// 从而在strArr中可以保留匹配文本
|
|
39780
|
+
var re = new RegExp("(".concat(escapeRegExp(searchWords), ")"), 'i');
|
|
39781
|
+
var strArr = textToHighlight.split(re);
|
|
39782
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
39783
|
+
children: strArr.map(function (item, index) {
|
|
39784
|
+
return re.test(item) ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39785
|
+
className: highlightClassName,
|
|
39786
|
+
children: item
|
|
39787
|
+
}, index) : /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
39788
|
+
children: item
|
|
39789
|
+
}, index);
|
|
39790
|
+
})
|
|
39791
|
+
});
|
|
39792
|
+
}
|
|
39229
39793
|
;// CONCATENATED MODULE: ../base/src/cascader/node.tsx
|
|
39230
39794
|
|
|
39231
39795
|
|
|
@@ -39240,7 +39804,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
39240
39804
|
|
|
39241
39805
|
var node_getDataAttributeName = getDataAttributeName;
|
|
39242
39806
|
var CascaderNode = function CascaderNode(props) {
|
|
39243
|
-
var _jssStyle$cascader;
|
|
39807
|
+
var _jssStyle$cascader, _jssStyle$common;
|
|
39244
39808
|
var jssStyle = props.jssStyle,
|
|
39245
39809
|
active = props.active,
|
|
39246
39810
|
data = props.data,
|
|
@@ -39266,6 +39830,7 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39266
39830
|
var hasChildren = children && children.length > 0;
|
|
39267
39831
|
var uncertainChildren = loader && !loading && children === undefined;
|
|
39268
39832
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
39833
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
39269
39834
|
var rootClass = classnames_default()(styles.option, active && styles.activeOption, isDisabled && mode !== 4 && styles.optionDisabled);
|
|
39270
39835
|
var handlePathChange = function handlePathChange() {
|
|
39271
39836
|
onPathChange === null || onPathChange === void 0 || onPathChange(id, data, path);
|
|
@@ -39307,11 +39872,19 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39307
39872
|
}
|
|
39308
39873
|
return events;
|
|
39309
39874
|
};
|
|
39875
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
39876
|
+
filterText = _useContext.filterText,
|
|
39877
|
+
highlight = _useContext.highlight;
|
|
39310
39878
|
var renderContent = function renderContent() {
|
|
39311
39879
|
var render = typeof renderItem === 'function' ? renderItem : function (d) {
|
|
39312
39880
|
return d[renderItem];
|
|
39313
39881
|
};
|
|
39314
|
-
return
|
|
39882
|
+
return getHighlightText({
|
|
39883
|
+
enable: highlight,
|
|
39884
|
+
nodeList: render(data, active, id),
|
|
39885
|
+
searchWords: filterText,
|
|
39886
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
39887
|
+
});
|
|
39315
39888
|
};
|
|
39316
39889
|
var renderIcon = function renderIcon() {
|
|
39317
39890
|
if (loading && children === undefined) {
|
|
@@ -39468,8 +40041,9 @@ var CascaderList = function CascaderList(props) {
|
|
|
39468
40041
|
|
|
39469
40042
|
|
|
39470
40043
|
|
|
40044
|
+
|
|
39471
40045
|
var FilterNode = function FilterNode(props) {
|
|
39472
|
-
var _jssStyle$cascader;
|
|
40046
|
+
var _jssStyle$cascader, _jssStyle$common;
|
|
39473
40047
|
var jssStyle = props.jssStyle,
|
|
39474
40048
|
data = props.data,
|
|
39475
40049
|
shouldFinal = props.shouldFinal,
|
|
@@ -39482,6 +40056,7 @@ var FilterNode = function FilterNode(props) {
|
|
|
39482
40056
|
onChange = props.onChange,
|
|
39483
40057
|
onPathChange = props.onPathChange;
|
|
39484
40058
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
40059
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
39485
40060
|
var handleSelectItem = function handleSelectItem(index, d, e) {
|
|
39486
40061
|
var isFinal = data && index === data.length - 1;
|
|
39487
40062
|
if (shouldFinal && !isFinal) return;
|
|
@@ -39510,6 +40085,9 @@ var FilterNode = function FilterNode(props) {
|
|
|
39510
40085
|
var handleSelect = function handleSelect() {
|
|
39511
40086
|
handleSelectItem(data.length - 1, data === null || data === void 0 ? void 0 : data[data.length - 1]);
|
|
39512
40087
|
};
|
|
40088
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
40089
|
+
filterText = _useContext.filterText,
|
|
40090
|
+
highlight = _useContext.highlight;
|
|
39513
40091
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
39514
40092
|
className: classnames_default()(styles.option, styles.filterOption),
|
|
39515
40093
|
onClick: handleSelect,
|
|
@@ -39529,11 +40107,16 @@ var FilterNode = function FilterNode(props) {
|
|
|
39529
40107
|
})) || isDisabled;
|
|
39530
40108
|
}
|
|
39531
40109
|
}
|
|
39532
|
-
var content =
|
|
39533
|
-
|
|
39534
|
-
|
|
39535
|
-
|
|
39536
|
-
|
|
40110
|
+
var content = getHighlightText({
|
|
40111
|
+
enable: highlight,
|
|
40112
|
+
nodeList: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40113
|
+
onClick: handleClick,
|
|
40114
|
+
className: classnames_default()(styles.filterOptionItem, isDisabled && styles.filterDisabledOption),
|
|
40115
|
+
children: renderItem(item)
|
|
40116
|
+
}, 'content'),
|
|
40117
|
+
searchWords: filterText,
|
|
40118
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
40119
|
+
});
|
|
39537
40120
|
if (index === 0) return content;
|
|
39538
40121
|
return [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
39539
40122
|
className: classnames_default()(styles.filterOptionSeparator),
|
|
@@ -40118,7 +40701,7 @@ var TagInput = function TagInput(props) {
|
|
|
40118
40701
|
|
|
40119
40702
|
|
|
40120
40703
|
|
|
40121
|
-
var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable"];
|
|
40704
|
+
var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable", "onMouseDown"];
|
|
40122
40705
|
|
|
40123
40706
|
|
|
40124
40707
|
|
|
@@ -40149,6 +40732,7 @@ var Tag = function Tag(props) {
|
|
|
40149
40732
|
onCompleted = props.onCompleted,
|
|
40150
40733
|
onEnterPress = props.onEnterPress,
|
|
40151
40734
|
closable = props.closable,
|
|
40735
|
+
onMouseDown = props.onMouseDown,
|
|
40152
40736
|
rest = objectWithoutProperties_default()(props, tag_excluded);
|
|
40153
40737
|
if (props.type) {
|
|
40154
40738
|
tag_devUseWarning.deprecated('type', 'color', 'Tag');
|
|
@@ -40222,6 +40806,7 @@ var Tag = function Tag(props) {
|
|
|
40222
40806
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
40223
40807
|
className: tagStyle.closeIcon,
|
|
40224
40808
|
onClick: handleClose,
|
|
40809
|
+
onMouseDown: onMouseDown,
|
|
40225
40810
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
40226
40811
|
className: tagStyle.closeIconWrapper,
|
|
40227
40812
|
children: icons_config.tag.Close
|
|
@@ -40371,7 +40956,7 @@ var More = function More(props) {
|
|
|
40371
40956
|
mode: visible ? 'fill' : 'bright',
|
|
40372
40957
|
color: visible ? 'info' : 'default',
|
|
40373
40958
|
children: shouldShowMore ? '+' : "+".concat(itemsLength)
|
|
40374
|
-
}, 'more'), /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
40959
|
+
}, 'more'), compressed !== 'hide-popover' && /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
40375
40960
|
jssStyle: jssStyle,
|
|
40376
40961
|
className: compressedClassName,
|
|
40377
40962
|
visible: visible,
|
|
@@ -40469,6 +41054,7 @@ var result_Result = function Result(props) {
|
|
|
40469
41054
|
var render = useRender();
|
|
40470
41055
|
var resultRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
40471
41056
|
var prevMore = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(more);
|
|
41057
|
+
var removeLock = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
40472
41058
|
var showInput = allowOnFilter;
|
|
40473
41059
|
var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
40474
41060
|
var styles = props.classes;
|
|
@@ -40544,6 +41130,12 @@ var result_Result = function Result(props) {
|
|
|
40544
41130
|
})
|
|
40545
41131
|
}, 'input');
|
|
40546
41132
|
};
|
|
41133
|
+
var handleCloseMouseDown = function handleCloseMouseDown() {
|
|
41134
|
+
removeLock.current = true;
|
|
41135
|
+
setTimeout(function () {
|
|
41136
|
+
removeLock.current = false;
|
|
41137
|
+
}, 0);
|
|
41138
|
+
};
|
|
40547
41139
|
var renderResultItem = function renderResultItem(item, index, nodes, v) {
|
|
40548
41140
|
var handleClose = function handleClose() {
|
|
40549
41141
|
onRemove === null || onRemove === void 0 || onRemove(item, v);
|
|
@@ -40584,6 +41176,7 @@ var result_Result = function Result(props) {
|
|
|
40584
41176
|
className: classnames_default()(styles.tag, more === 1 && styles.tagOnly, resultClassName),
|
|
40585
41177
|
closable: closeable && 'only',
|
|
40586
41178
|
onClose: closeable && handleClose,
|
|
41179
|
+
onMouseDown: closeable ? handleCloseMouseDown : undefined,
|
|
40587
41180
|
onClick: handleClick,
|
|
40588
41181
|
jssStyle: jssStyle,
|
|
40589
41182
|
inlineStyle: true
|
|
@@ -40699,6 +41292,7 @@ var result_Result = function Result(props) {
|
|
|
40699
41292
|
var handleResetMore = function handleResetMore() {
|
|
40700
41293
|
if (!compressed) return;
|
|
40701
41294
|
if (isCompressedBound()) return;
|
|
41295
|
+
if (removeLock.current) return;
|
|
40702
41296
|
setMore(-1);
|
|
40703
41297
|
setShouldResetMore(true);
|
|
40704
41298
|
};
|
|
@@ -40891,7 +41485,8 @@ var Cascader = function Cascader(props0) {
|
|
|
40891
41485
|
onCollapseProp = props.onCollapse,
|
|
40892
41486
|
size = props.size,
|
|
40893
41487
|
virtual = props.virtual,
|
|
40894
|
-
filterSameChange = props.filterSameChange
|
|
41488
|
+
filterSameChange = props.filterSameChange,
|
|
41489
|
+
beforeChange = props.beforeChange;
|
|
40895
41490
|
var showInput = isFunc(onFilterProp);
|
|
40896
41491
|
var isRealtime = cascader_isOptionalDisabled(props.disabled) ? props.disabled.isRealtime : false;
|
|
40897
41492
|
var disabled = isOptionalDisabled(disabledProp) ? disabledProp.disabled : disabledProp;
|
|
@@ -40930,7 +41525,8 @@ var Cascader = function Cascader(props0) {
|
|
|
40930
41525
|
setInputText = _useFilter.setInputText,
|
|
40931
41526
|
setFilterText = _useFilter.setFilterText,
|
|
40932
41527
|
filterFunc = _useFilter.filterFunc,
|
|
40933
|
-
onFilter = _useFilter.onFilter
|
|
41528
|
+
onFilter = _useFilter.onFilter,
|
|
41529
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
40934
41530
|
var isDataEmpty = !filterData || filterData.length === 0;
|
|
40935
41531
|
var isMultiple = multiple === true || mode !== undefined;
|
|
40936
41532
|
var updateKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
@@ -40946,6 +41542,7 @@ var Cascader = function Cascader(props0) {
|
|
|
40946
41542
|
defaultValue: defaultValue,
|
|
40947
41543
|
childrenKey: childrenKey,
|
|
40948
41544
|
value: valueProp,
|
|
41545
|
+
beforeChange: beforeChange,
|
|
40949
41546
|
onChange: onChangeProp,
|
|
40950
41547
|
filterSameChange: filterSameChange
|
|
40951
41548
|
}),
|
|
@@ -41392,11 +41989,20 @@ var Cascader = function Cascader(props0) {
|
|
|
41392
41989
|
datum.setData(data);
|
|
41393
41990
|
}
|
|
41394
41991
|
}, [data]);
|
|
41992
|
+
|
|
41993
|
+
// 修复外部受控打开的场景下,从外部修改value导致的面板勾选情况没有及时同步
|
|
41994
|
+
if (openProp && !shallowEqual(value, datum.getValue())) {
|
|
41995
|
+
datum.setValue(value);
|
|
41996
|
+
}
|
|
41997
|
+
;
|
|
41395
41998
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41396
41999
|
if (!value) return;
|
|
41397
42000
|
datum.setValue(value);
|
|
41398
42001
|
if (!open) return;
|
|
41399
42002
|
updatePathByValue();
|
|
42003
|
+
if (props.renderOptionList) {
|
|
42004
|
+
updatePath();
|
|
42005
|
+
}
|
|
41400
42006
|
}, [value, open]);
|
|
41401
42007
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41402
42008
|
if (filterText !== undefined) {
|
|
@@ -41434,39 +42040,45 @@ var Cascader = function Cascader(props0) {
|
|
|
41434
42040
|
}
|
|
41435
42041
|
return false;
|
|
41436
42042
|
};
|
|
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
|
-
|
|
42043
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
42044
|
+
value: {
|
|
42045
|
+
filterText: filterText,
|
|
42046
|
+
highlight: props.highlight
|
|
42047
|
+
},
|
|
42048
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
42049
|
+
id: fieldId,
|
|
42050
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
42051
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
42052
|
+
className: rootClass,
|
|
42053
|
+
style: rootStyle,
|
|
42054
|
+
onBlur: handleBlur,
|
|
42055
|
+
onFocus: handleFocus,
|
|
42056
|
+
onKeyDown: handleKeyDown,
|
|
42057
|
+
ref: targetRef,
|
|
42058
|
+
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
42059
|
+
adjust: adjust,
|
|
42060
|
+
focus: open,
|
|
42061
|
+
fixedWidth: getFixedWidth(),
|
|
42062
|
+
absolute: absolute,
|
|
42063
|
+
zIndex: zIndex,
|
|
42064
|
+
position: position,
|
|
42065
|
+
updateKey: updateKey,
|
|
42066
|
+
popupGap: 4,
|
|
42067
|
+
popupElRef: popupRef,
|
|
42068
|
+
parentElRef: targetRef,
|
|
42069
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
|
|
42070
|
+
onRef: popupRef,
|
|
42071
|
+
show: open,
|
|
42072
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper, open && (styles === null || styles === void 0 ? void 0 : styles.pickerWrapperShow)),
|
|
42073
|
+
display: 'block',
|
|
42074
|
+
type: "scale-y",
|
|
42075
|
+
duration: 'fast',
|
|
42076
|
+
style: pickerWrapperStyle,
|
|
42077
|
+
children: renderPanel()
|
|
42078
|
+
})
|
|
42079
|
+
})]
|
|
42080
|
+
}))
|
|
42081
|
+
});
|
|
41470
42082
|
};
|
|
41471
42083
|
/* harmony default export */ var src_cascader_cascader = (Cascader);
|
|
41472
42084
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/form-func-context.ts
|
|
@@ -41894,6 +42506,22 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41894
42506
|
});
|
|
41895
42507
|
};
|
|
41896
42508
|
/* harmony default export */ var utils_validate = ((/* unused pure expression or super */ null && (validate)));
|
|
42509
|
+
;// CONCATENATED MODULE: ../hooks/src/utils/clean-props.ts
|
|
42510
|
+
|
|
42511
|
+
var names = ['delay', 'onDatumBind', 'rules', 'formDatum', 'forceChange', 'trim', 'beforeChange', 'validateHook', 'innerFormNamePath', 'fieldSetValidate', 'combineRules', 'popoverProps', 'inputFocus', 'placeTitle', 'cancelChange', 'integerLimit', 'autoSelect', 'autoFix', 'numType'];
|
|
42512
|
+
|
|
42513
|
+
/**
|
|
42514
|
+
* delete some props if needed, will not modify the pass argument
|
|
42515
|
+
* @param props
|
|
42516
|
+
* @returns {Produced<*, *>}
|
|
42517
|
+
*/
|
|
42518
|
+
function cleanProps(props) {
|
|
42519
|
+
return utils_immer_produce(props, function (draft) {
|
|
42520
|
+
names.forEach(function (p) {
|
|
42521
|
+
return delete draft[p];
|
|
42522
|
+
});
|
|
42523
|
+
});
|
|
42524
|
+
}
|
|
41897
42525
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form-control/use-form-control.ts
|
|
41898
42526
|
|
|
41899
42527
|
|
|
@@ -41909,6 +42537,7 @@ var validate = function validate(value, formData, rules, p) {
|
|
|
41909
42537
|
|
|
41910
42538
|
|
|
41911
42539
|
|
|
42540
|
+
|
|
41912
42541
|
var getValue = function getValue(name, formValue) {
|
|
41913
42542
|
if (!name) return undefined;
|
|
41914
42543
|
if (isArray(name)) {
|
|
@@ -42037,7 +42666,7 @@ function useFormControl(props) {
|
|
|
42037
42666
|
}
|
|
42038
42667
|
};
|
|
42039
42668
|
var fullRules = (controlFunc === null || controlFunc === void 0 ? void 0 : controlFunc.combineRules(name, rules || [])) || [];
|
|
42040
|
-
return validate(v, formV, fullRules, validateProps).then(function (res) {
|
|
42669
|
+
return validate(v, formV, fullRules, cleanProps(validateProps)).then(function (res) {
|
|
42041
42670
|
var err = res === true ? undefined : res;
|
|
42042
42671
|
formFunc === null || formFunc === void 0 || formFunc.setError(name, err);
|
|
42043
42672
|
onError === null || onError === void 0 || onError(err);
|
|
@@ -42064,7 +42693,7 @@ function useFormControl(props) {
|
|
|
42064
42693
|
return e;
|
|
42065
42694
|
});
|
|
42066
42695
|
} else {
|
|
42067
|
-
return validate(v, {}, rules || [],
|
|
42696
|
+
return validate(v, {}, rules || [], cleanProps(validateProps)).then(function (res) {
|
|
42068
42697
|
var err = res === true ? undefined : res;
|
|
42069
42698
|
setErrorState(err);
|
|
42070
42699
|
onError === null || onError === void 0 || onError(err);
|
|
@@ -42106,10 +42735,14 @@ function useFormControl(props) {
|
|
|
42106
42735
|
if (isArray(name)) {
|
|
42107
42736
|
var dv = isArray(defaultValue) ? defaultValue : [];
|
|
42108
42737
|
name.forEach(function (n, index) {
|
|
42109
|
-
|
|
42738
|
+
var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(n);
|
|
42739
|
+
var bindedValue = v === undefined ? dv[index] : v;
|
|
42740
|
+
controlFunc.bind(n, context.mounted ? bindedValue : dv[index], validateField, update);
|
|
42110
42741
|
});
|
|
42111
42742
|
} else {
|
|
42112
|
-
|
|
42743
|
+
var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
42744
|
+
var bindedValue = v === undefined ? defaultValue : v;
|
|
42745
|
+
controlFunc.bind(name, context.mounted ? bindedValue : defaultValue, validateField, update);
|
|
42113
42746
|
}
|
|
42114
42747
|
if (context.mounted) {
|
|
42115
42748
|
devUseWarning.warn('Please avoid modifying the name property after the component has mounted, as this may result in unintended behavior or errors.');
|
|
@@ -42280,7 +42913,8 @@ var cascader_jssStyle = {
|
|
|
42280
42913
|
popover: usePopoverStyle,
|
|
42281
42914
|
checkbox: useCheckboxStyle,
|
|
42282
42915
|
radio: useRadioStyle,
|
|
42283
|
-
spin: useSpinStyle
|
|
42916
|
+
spin: useSpinStyle,
|
|
42917
|
+
common: useCommonStyle
|
|
42284
42918
|
};
|
|
42285
42919
|
var cascader_Cascader = function Cascader(props) {
|
|
42286
42920
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_cascader_cascader, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -44217,6 +44851,18 @@ var getDefaultMode = function getDefaultMode(type) {
|
|
|
44217
44851
|
var mode = getTypeMode(type);
|
|
44218
44852
|
return [mode, mode];
|
|
44219
44853
|
};
|
|
44854
|
+
var getFormatValueArr = function getFormatValueArr(opts) {
|
|
44855
|
+
var dateArr = opts.dateArr,
|
|
44856
|
+
format = opts.format,
|
|
44857
|
+
clearWithUndefined = opts.clearWithUndefined,
|
|
44858
|
+
options = opts.options,
|
|
44859
|
+
type = opts.type;
|
|
44860
|
+
var fmt = use_datepicker_format_getFormat(format, type);
|
|
44861
|
+
return dateArr.map(function (item) {
|
|
44862
|
+
if (!item) return clearWithUndefined ? undefined : '';
|
|
44863
|
+
return util.format(item, fmt, options);
|
|
44864
|
+
});
|
|
44865
|
+
};
|
|
44220
44866
|
var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
44221
44867
|
var value = props.value,
|
|
44222
44868
|
onChange = props.onChange,
|
|
@@ -45285,8 +45931,7 @@ var Day = function Day(props) {
|
|
|
45285
45931
|
}, 'week');
|
|
45286
45932
|
};
|
|
45287
45933
|
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]));
|
|
45934
|
+
var showLeft = props.type === 'datetime' || props.type === 'date';
|
|
45290
45935
|
var timeStr = func.getTimeStr();
|
|
45291
45936
|
if (!showLeft && !props.showSelNow) return null;
|
|
45292
45937
|
var format = props.format;
|
|
@@ -45307,7 +45952,7 @@ var Day = function Day(props) {
|
|
|
45307
45952
|
marginTop: props.needConfirm && props.range ? -16 : undefined
|
|
45308
45953
|
},
|
|
45309
45954
|
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
|
|
45955
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerFooterTime, styles === null || styles === void 0 ? void 0 : styles.datetime),
|
|
45311
45956
|
style: {
|
|
45312
45957
|
paddingRight: showNeedConfirm ? 0 : undefined
|
|
45313
45958
|
},
|
|
@@ -45319,7 +45964,7 @@ var Day = function Day(props) {
|
|
|
45319
45964
|
showTitle: false,
|
|
45320
45965
|
format: format
|
|
45321
45966
|
})), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
45322
|
-
children: timeStr
|
|
45967
|
+
children: timeStr || '00:00:00'
|
|
45323
45968
|
})]
|
|
45324
45969
|
})
|
|
45325
45970
|
}), props.showSelNow && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
@@ -46746,7 +47391,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
46746
47391
|
if (props.open) {
|
|
46747
47392
|
func.startEdit();
|
|
46748
47393
|
}
|
|
46749
|
-
}, []);
|
|
47394
|
+
}, [props.open]);
|
|
46750
47395
|
var _usePopup = use_popup({
|
|
46751
47396
|
open: props.open,
|
|
46752
47397
|
onCollapse: onCollapse,
|
|
@@ -46936,6 +47581,8 @@ var DatePicker = function DatePicker(props0) {
|
|
|
46936
47581
|
|
|
46937
47582
|
|
|
46938
47583
|
|
|
47584
|
+
|
|
47585
|
+
|
|
46939
47586
|
var date_picker_jssStyle = {
|
|
46940
47587
|
datePicker: useDatePickerStyle,
|
|
46941
47588
|
button: useButtonStyle,
|
|
@@ -46949,7 +47596,32 @@ var BaseDatePicker = function BaseDatePicker(props) {
|
|
|
46949
47596
|
}, props));
|
|
46950
47597
|
};
|
|
46951
47598
|
/* harmony default export */ var src_date_picker_date_picker_0 = (function (props) {
|
|
46952
|
-
|
|
47599
|
+
var _useConfig = useConfig(),
|
|
47600
|
+
locale = _useConfig.locale;
|
|
47601
|
+
|
|
47602
|
+
// datepicker 默认值需要提格式化前处理,否则内部会根据 format 进行格式化并再次触发 onChange,参考 v1 v2 的 value hoc 行为
|
|
47603
|
+
var defaultValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
47604
|
+
if (props.defaultValue) {
|
|
47605
|
+
var options = {
|
|
47606
|
+
timeZone: props.timeZone,
|
|
47607
|
+
weekStartsOn: Number(getLocale(locale, 'startOfWeek'))
|
|
47608
|
+
};
|
|
47609
|
+
var type = props.type || 'date';
|
|
47610
|
+
var format = use_datepicker_format_getFormat(props.format, type);
|
|
47611
|
+
var dateArr = convertValueToDateArr(props.defaultValue, format, options);
|
|
47612
|
+
var formattedDefaultValue = getFormatValueArr({
|
|
47613
|
+
dateArr: dateArr,
|
|
47614
|
+
format: format,
|
|
47615
|
+
type: type,
|
|
47616
|
+
options: options
|
|
47617
|
+
});
|
|
47618
|
+
return props.range ? formattedDefaultValue : formattedDefaultValue[0];
|
|
47619
|
+
}
|
|
47620
|
+
return props.defaultValue;
|
|
47621
|
+
}, []);
|
|
47622
|
+
return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
47623
|
+
defaultValue: defaultValue
|
|
47624
|
+
}), BaseDatePicker);
|
|
46953
47625
|
});
|
|
46954
47626
|
;// CONCATENATED MODULE: ./src/date-picker/index.ts
|
|
46955
47627
|
|
|
@@ -47478,7 +48150,8 @@ var Modal = function Modal(props) {
|
|
|
47478
48150
|
renderEd: false,
|
|
47479
48151
|
isMask: false,
|
|
47480
48152
|
mouseDownTarget: null,
|
|
47481
|
-
mouseUpTarget: null
|
|
48153
|
+
mouseUpTarget: null,
|
|
48154
|
+
content: null
|
|
47482
48155
|
}),
|
|
47483
48156
|
context = _useRef.current;
|
|
47484
48157
|
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.visible || props.autoShow),
|
|
@@ -47721,6 +48394,14 @@ var Modal = function Modal(props) {
|
|
|
47721
48394
|
if (props.moveable && !props.fullScreen) {
|
|
47722
48395
|
panelStyle.transform = "translate(".concat(moveInfo.pos.x, "px, ").concat(moveInfo.pos.y, "px)");
|
|
47723
48396
|
}
|
|
48397
|
+
var renderContent = function renderContent() {
|
|
48398
|
+
if (!props.visible && context.content !== null) return context.content;
|
|
48399
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
48400
|
+
children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
|
|
48401
|
+
});
|
|
48402
|
+
};
|
|
48403
|
+
var content = renderContent();
|
|
48404
|
+
context.content = content;
|
|
47724
48405
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFooterProvider, {
|
|
47725
48406
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
47726
48407
|
onClick: function onClick(e) {
|
|
@@ -47739,11 +48420,11 @@ var Modal = function Modal(props) {
|
|
|
47739
48420
|
onMouseUp: handleMaskMouseUp,
|
|
47740
48421
|
onClick: handleMaskClick,
|
|
47741
48422
|
onAnimationStart: updateOrigin,
|
|
47742
|
-
children: /*#__PURE__*/(0,jsx_runtime.
|
|
48423
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
47743
48424
|
ref: panelRef,
|
|
47744
48425
|
className: classnames_default()(modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.panel, props.className),
|
|
47745
48426
|
style: panelStyle,
|
|
47746
|
-
children:
|
|
48427
|
+
children: content
|
|
47747
48428
|
})
|
|
47748
48429
|
}))
|
|
47749
48430
|
})
|
|
@@ -47886,6 +48567,9 @@ var method = function method(type, jssStyle) {
|
|
|
47886
48567
|
|
|
47887
48568
|
var modal_devUseWarning = devUseWarning;
|
|
47888
48569
|
var modal_Modal = function Modal(props) {
|
|
48570
|
+
var _props$jssStyle, _props$jssStyle$modal;
|
|
48571
|
+
// inject jssStyle
|
|
48572
|
+
(_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
48573
|
if (props.maskOpacity) {
|
|
47890
48574
|
modal_devUseWarning.deprecated('maskOpacity', 'maskBackground', 'Modal');
|
|
47891
48575
|
}
|
|
@@ -49370,7 +50054,8 @@ var useForm = function useForm(props) {
|
|
|
49370
50054
|
size = props.size,
|
|
49371
50055
|
colon = props.colon,
|
|
49372
50056
|
formName = props.name,
|
|
49373
|
-
scrollParent = props.scrollParent
|
|
50057
|
+
scrollParent = props.scrollParent,
|
|
50058
|
+
isControl = props.isControl;
|
|
49374
50059
|
var deepSetOptions = {
|
|
49375
50060
|
removeUndefined: removeUndefined,
|
|
49376
50061
|
forceSet: true
|
|
@@ -49524,7 +50209,7 @@ var useForm = function useForm(props) {
|
|
|
49524
50209
|
if (errors.length > 0) {
|
|
49525
50210
|
var errorFields = [];
|
|
49526
50211
|
for (var _key in context.errors) {
|
|
49527
|
-
if (context.errors[_key]) {
|
|
50212
|
+
if (context.errors[_key] && context.names.has(_key)) {
|
|
49528
50213
|
var _context$errors$_key;
|
|
49529
50214
|
errorFields.push({
|
|
49530
50215
|
name: _key,
|
|
@@ -49626,13 +50311,16 @@ var useForm = function useForm(props) {
|
|
|
49626
50311
|
var values = Object.keys(vals);
|
|
49627
50312
|
// 针对 name 为数组模式,如 datepicker 的 name={['startTime', 'endTime']} 时,前者校验可能需要依赖后者,因此需要提前将后者数据整合至 draft 用于多字段整合校验
|
|
49628
50313
|
values.forEach(function (key) {
|
|
49629
|
-
|
|
50314
|
+
// upload组件返回的可能是函数: (prev) => [...prev, file]
|
|
50315
|
+
var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
|
|
50316
|
+
deepSet(draft, key, valueOfKey, deepSetOptions);
|
|
49630
50317
|
});
|
|
49631
50318
|
values.forEach(function (key) {
|
|
49632
50319
|
if (option.validate) {
|
|
49633
50320
|
var _context$validateMap$;
|
|
49634
50321
|
(_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
|
|
49635
|
-
|
|
50322
|
+
var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
|
|
50323
|
+
validate(key, valueOfKey, current(draft));
|
|
49636
50324
|
});
|
|
49637
50325
|
}
|
|
49638
50326
|
});
|
|
@@ -49643,7 +50331,11 @@ var useForm = function useForm(props) {
|
|
|
49643
50331
|
fullKeyPaths.forEach(function (key) {
|
|
49644
50332
|
delete context.serverErrors[key];
|
|
49645
50333
|
});
|
|
49646
|
-
|
|
50334
|
+
if (option.forceUpdate) {
|
|
50335
|
+
update();
|
|
50336
|
+
} else {
|
|
50337
|
+
update(fullKeyPaths);
|
|
50338
|
+
}
|
|
49647
50339
|
});
|
|
49648
50340
|
var updateDefaultValue = function updateDefaultValue() {
|
|
49649
50341
|
if (!context.mounted) return;
|
|
@@ -49688,6 +50380,7 @@ var useForm = function useForm(props) {
|
|
|
49688
50380
|
});
|
|
49689
50381
|
var submit = use_persist_fn(function () {
|
|
49690
50382
|
var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
50383
|
+
var callback = arguments.length > 1 ? arguments[1] : undefined;
|
|
49691
50384
|
if (disabled) return;
|
|
49692
50385
|
if (context.submitLock) {
|
|
49693
50386
|
return;
|
|
@@ -49705,32 +50398,29 @@ var useForm = function useForm(props) {
|
|
|
49705
50398
|
while (1) switch (_context.prev = _context.next) {
|
|
49706
50399
|
case 0:
|
|
49707
50400
|
if (withValidate) {
|
|
49708
|
-
_context.next =
|
|
50401
|
+
_context.next = 4;
|
|
49709
50402
|
break;
|
|
49710
50403
|
}
|
|
49711
50404
|
(_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 || _props$onSubmit.call(props, (_context$value = context.value) !== null && _context$value !== void 0 ? _context$value : {});
|
|
50405
|
+
callback === null || callback === void 0 || callback();
|
|
49712
50406
|
return _context.abrupt("return");
|
|
49713
|
-
case
|
|
49714
|
-
_context.next =
|
|
50407
|
+
case 4:
|
|
50408
|
+
_context.next = 6;
|
|
49715
50409
|
return validateFields(undefined, {
|
|
49716
50410
|
ignoreBind: true
|
|
49717
50411
|
}).catch(function (e) {
|
|
49718
50412
|
return e;
|
|
49719
50413
|
});
|
|
49720
|
-
case
|
|
50414
|
+
case 6:
|
|
49721
50415
|
result = _context.sent;
|
|
49722
|
-
if (
|
|
49723
|
-
|
|
49724
|
-
|
|
50416
|
+
if (result === true) {
|
|
50417
|
+
(_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
|
|
50418
|
+
if (activeEl) activeEl.focus();
|
|
50419
|
+
} else {
|
|
50420
|
+
handleSubmitError(result);
|
|
49725
50421
|
}
|
|
49726
|
-
|
|
49727
|
-
|
|
49728
|
-
_context.next = 13;
|
|
49729
|
-
break;
|
|
49730
|
-
case 11:
|
|
49731
|
-
handleSubmitError(result);
|
|
49732
|
-
return _context.abrupt("return");
|
|
49733
|
-
case 13:
|
|
50422
|
+
callback === null || callback === void 0 || callback();
|
|
50423
|
+
case 9:
|
|
49734
50424
|
case "end":
|
|
49735
50425
|
return _context.stop();
|
|
49736
50426
|
}
|
|
@@ -49812,10 +50502,8 @@ var useForm = function useForm(props) {
|
|
|
49812
50502
|
context.updateMap[n] = new Set();
|
|
49813
50503
|
}
|
|
49814
50504
|
context.updateMap[n].add(updateFn);
|
|
49815
|
-
var shouldTriggerResetChange = context.removeArr.has(n);
|
|
49816
50505
|
context.removeArr.delete(n);
|
|
49817
|
-
|
|
49818
|
-
if (shouldTriggerDefaultChange || shouldTriggerResetChange) {
|
|
50506
|
+
if (df !== undefined && deepGet(context.value, n) === undefined) {
|
|
49819
50507
|
if (!context.mounted) context.defaultValues[n] = df;
|
|
49820
50508
|
onChange(function (v) {
|
|
49821
50509
|
deepSet(v, n, df, deepSetOptions);
|
|
@@ -49835,7 +50523,6 @@ var useForm = function useForm(props) {
|
|
|
49835
50523
|
}
|
|
49836
50524
|
if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
|
|
49837
50525
|
context.names.delete(n);
|
|
49838
|
-
delete context.errors[n];
|
|
49839
50526
|
delete context.defaultValues[n];
|
|
49840
50527
|
}
|
|
49841
50528
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
@@ -49930,7 +50617,10 @@ var useForm = function useForm(props) {
|
|
|
49930
50617
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
49931
50618
|
context.removeLock = false;
|
|
49932
50619
|
// 内部 onChange 改的 value, 不需要更新
|
|
49933
|
-
if (props.value === context.value)
|
|
50620
|
+
if (props.value === context.value) {
|
|
50621
|
+
if (!isControl) update();
|
|
50622
|
+
return;
|
|
50623
|
+
}
|
|
49934
50624
|
if (initValidate && !context.resetTime) {
|
|
49935
50625
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
49936
50626
|
var oldValue = deepGet(preValue || emptyObj, key);
|
|
@@ -50000,11 +50690,12 @@ var Form = function Form(props) {
|
|
|
50000
50690
|
rest = objectWithoutProperties_default()(props, form_excluded);
|
|
50001
50691
|
var formClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$form = jssStyle.form) === null || _jssStyle$form === void 0 ? void 0 : _jssStyle$form.call(jssStyle);
|
|
50002
50692
|
var modalFormContext = useFormFooter();
|
|
50693
|
+
var isControl = ('value' in props);
|
|
50003
50694
|
var inputAbleParams = {
|
|
50004
50695
|
value: props.value,
|
|
50005
50696
|
onChange: props.onChange,
|
|
50006
50697
|
defaultValue: props.defaultValue,
|
|
50007
|
-
control:
|
|
50698
|
+
control: isControl,
|
|
50008
50699
|
beforeChange: undefined,
|
|
50009
50700
|
reserveAble: false
|
|
50010
50701
|
};
|
|
@@ -50015,7 +50706,8 @@ var Form = function Form(props) {
|
|
|
50015
50706
|
var _useForm = use_form(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
50016
50707
|
value: value,
|
|
50017
50708
|
onChange: onChange,
|
|
50018
|
-
formElRef: formElRef
|
|
50709
|
+
formElRef: formElRef,
|
|
50710
|
+
isControl: isControl
|
|
50019
50711
|
})),
|
|
50020
50712
|
Provider = _useForm.Provider,
|
|
50021
50713
|
ProviderProps = _useForm.ProviderProps,
|
|
@@ -50229,11 +50921,11 @@ var Tooltip = function Tooltip(props) {
|
|
|
50229
50921
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
50230
50922
|
updateKey = _React$useState2[0],
|
|
50231
50923
|
setUpdateKey = _React$useState2[1];
|
|
50232
|
-
var handleUpdateKey = function
|
|
50924
|
+
var handleUpdateKey = usePersistFn(function () {
|
|
50233
50925
|
setUpdateKey(function (prev) {
|
|
50234
50926
|
return (prev + 1) % 2;
|
|
50235
50927
|
});
|
|
50236
|
-
};
|
|
50928
|
+
});
|
|
50237
50929
|
var bindEvents = function bindEvents() {
|
|
50238
50930
|
var _window;
|
|
50239
50931
|
var targetEl = targetRef.current;
|
|
@@ -50242,10 +50934,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50242
50934
|
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
50243
50935
|
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
50244
50936
|
(_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
50937
|
};
|
|
50250
50938
|
var unbindEvents = function unbindEvents() {
|
|
50251
50939
|
var _window2;
|
|
@@ -50257,10 +50945,6 @@ var Tooltip = function Tooltip(props) {
|
|
|
50257
50945
|
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
50258
50946
|
targetEl.removeEventListener('click', closePop);
|
|
50259
50947
|
(_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
50948
|
};
|
|
50265
50949
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
50266
50950
|
if (!persistent) return;
|
|
@@ -50371,6 +51055,7 @@ var FormItem = function FormItem(props) {
|
|
|
50371
51055
|
labelVerticalAlign = _labelConfig$rest.labelVerticalAlign,
|
|
50372
51056
|
inline = _labelConfig$rest.inline,
|
|
50373
51057
|
keepErrorHeight = _labelConfig$rest.keepErrorHeight,
|
|
51058
|
+
keepErrorBelow = _labelConfig$rest.keepErrorBelow,
|
|
50374
51059
|
colon = _labelConfig$rest.colon;
|
|
50375
51060
|
var renderLabel = function renderLabel() {
|
|
50376
51061
|
if (label === undefined || label === null || label === '') return null;
|
|
@@ -50436,6 +51121,9 @@ var FormItem = function FormItem(props) {
|
|
|
50436
51121
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(Provider, {
|
|
50437
51122
|
value: ProviderValue,
|
|
50438
51123
|
children: children
|
|
51124
|
+
}), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51125
|
+
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
51126
|
+
children: tip
|
|
50439
51127
|
}), showError && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
50440
51128
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.error,
|
|
50441
51129
|
children: errors.map(function (error, index) {
|
|
@@ -50445,9 +51133,6 @@ var FormItem = function FormItem(props) {
|
|
|
50445
51133
|
})
|
|
50446
51134
|
}, index);
|
|
50447
51135
|
})
|
|
50448
|
-
}), !!tip && !showError && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
50449
|
-
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
50450
|
-
children: tip
|
|
50451
51136
|
})]
|
|
50452
51137
|
}))]
|
|
50453
51138
|
}));
|
|
@@ -50874,7 +51559,6 @@ var RESPONSIVE = {
|
|
|
50874
51559
|
xl: '1200'
|
|
50875
51560
|
};
|
|
50876
51561
|
var GridClassName = "".concat(src_config_config.prefix, "-grid");
|
|
50877
|
-
var GridFullClassName = "".concat(src_config_config.prefix, "-grid-full");
|
|
50878
51562
|
var defaultResponsive = 'md';
|
|
50879
51563
|
function util_createStyle(text, id) {
|
|
50880
51564
|
if (!is_isBrowser()) {
|
|
@@ -50888,12 +51572,12 @@ function util_createStyle(text, id) {
|
|
|
50888
51572
|
}
|
|
50889
51573
|
function generateGrid(width, className, responsive) {
|
|
50890
51574
|
var minWidth = RESPONSIVE[responsive];
|
|
50891
|
-
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(className, "{width: ").concat(width, "%} }");
|
|
51575
|
+
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(GridClassName, ".").concat(className, "{width: ").concat(width, "%} }");
|
|
50892
51576
|
util_createStyle(text, className);
|
|
50893
51577
|
}
|
|
50894
51578
|
function generateOffset(width, className, responsive) {
|
|
50895
51579
|
var minWidth = RESPONSIVE[responsive];
|
|
50896
|
-
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(className, "{margin-left: ").concat(width, "%} }");
|
|
51580
|
+
var text = "@media screen and (min-width: ".concat(minWidth, "px) { .").concat(GridClassName, ".").concat(className, "{margin-left: ").concat(width, "%} }");
|
|
50897
51581
|
util_createStyle(text, className);
|
|
50898
51582
|
}
|
|
50899
51583
|
function generate(w, type, res) {
|
|
@@ -50934,24 +51618,18 @@ function getGrid(opt) {
|
|
|
50934
51618
|
responsive = _options.responsive;
|
|
50935
51619
|
var gridClass = generate(width, 'grid', responsive);
|
|
50936
51620
|
var offsetClass = generate(offset, 'offset', responsive);
|
|
50937
|
-
return "".concat(
|
|
51621
|
+
return "".concat(gridClass, " ").concat(offsetClass);
|
|
50938
51622
|
}
|
|
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
51623
|
;// CONCATENATED MODULE: ../base/src/grid/grid.tsx
|
|
50947
51624
|
|
|
50948
51625
|
|
|
50949
|
-
var grid_excluded = ["width", "offset", "responsive", "stretch", "children", "gutter"];
|
|
51626
|
+
var grid_excluded = ["width", "offset", "responsive", "stretch", "children", "gutter", "jssStyle"];
|
|
50950
51627
|
|
|
50951
51628
|
|
|
50952
51629
|
|
|
50953
51630
|
|
|
50954
|
-
var
|
|
51631
|
+
var Grid = function Grid(props) {
|
|
51632
|
+
var _jssStyle$grid;
|
|
50955
51633
|
var _props$width = props.width,
|
|
50956
51634
|
width = _props$width === void 0 ? 1 : _props$width,
|
|
50957
51635
|
offset = props.offset,
|
|
@@ -50959,6 +51637,7 @@ var Gird = function Gird(props) {
|
|
|
50959
51637
|
stretch = props.stretch,
|
|
50960
51638
|
children = props.children,
|
|
50961
51639
|
gutter = props.gutter,
|
|
51640
|
+
jssStyle = props.jssStyle,
|
|
50962
51641
|
other = objectWithoutProperties_default()(props, grid_excluded);
|
|
50963
51642
|
var autoCount = 0;
|
|
50964
51643
|
var settleWidth = 0;
|
|
@@ -50969,7 +51648,8 @@ var Gird = function Gird(props) {
|
|
|
50969
51648
|
}
|
|
50970
51649
|
});
|
|
50971
51650
|
var autoWidth = autoCount > 0 ? (1 - settleWidth) / autoCount : 0;
|
|
50972
|
-
var
|
|
51651
|
+
var gridClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$grid = jssStyle.grid) === null || _jssStyle$grid === void 0 ? void 0 : _jssStyle$grid.call(jssStyle);
|
|
51652
|
+
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
51653
|
width: width,
|
|
50974
51654
|
offset: offset,
|
|
50975
51655
|
responsive: responsive
|
|
@@ -51007,13 +51687,28 @@ var Gird = function Gird(props) {
|
|
|
51007
51687
|
})
|
|
51008
51688
|
}));
|
|
51009
51689
|
};
|
|
51010
|
-
|
|
51011
|
-
/* harmony default export */ var
|
|
51690
|
+
Grid.isGrid = true;
|
|
51691
|
+
/* harmony default export */ var grid_grid = (Grid);
|
|
51692
|
+
;// CONCATENATED MODULE: ./src/grid/grid.tsx
|
|
51693
|
+
|
|
51694
|
+
|
|
51695
|
+
|
|
51696
|
+
|
|
51697
|
+
var GridWithStyle = function GridWithStyle(props) {
|
|
51698
|
+
var jssStyle = {
|
|
51699
|
+
grid: useGridStyle
|
|
51700
|
+
};
|
|
51701
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(grid_grid, objectSpread2_default()({
|
|
51702
|
+
jssStyle: jssStyle
|
|
51703
|
+
}, props));
|
|
51704
|
+
};
|
|
51705
|
+
GridWithStyle.isGrid = true;
|
|
51706
|
+
/* harmony default export */ var src_grid_grid = (GridWithStyle);
|
|
51012
51707
|
;// CONCATENATED MODULE: ./src/grid/index.ts
|
|
51013
51708
|
|
|
51014
|
-
var GridComp =
|
|
51709
|
+
var GridComp = src_grid_grid;
|
|
51015
51710
|
GridComp.displayName = 'ShineoutGrid';
|
|
51016
|
-
/* harmony default export */ var
|
|
51711
|
+
/* harmony default export */ var src_grid_0 = (GridComp);
|
|
51017
51712
|
;// CONCATENATED MODULE: ../base/src/icon/icon.tsx
|
|
51018
51713
|
|
|
51019
51714
|
|
|
@@ -51156,6 +51851,10 @@ var useImage = function useImage() {
|
|
|
51156
51851
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
51157
51852
|
status = _React$useState2[0],
|
|
51158
51853
|
setStatus = _React$useState2[1];
|
|
51854
|
+
var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({}),
|
|
51855
|
+
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
|
|
51856
|
+
imgCoverStyle = _React$useState4[0],
|
|
51857
|
+
setImgCoverStyle = _React$useState4[1];
|
|
51159
51858
|
var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
51160
51859
|
var getUrl = function getUrl(url) {
|
|
51161
51860
|
var auto = 'autoSSL' in props ? autoSSL : use_image_config.autoSSL;
|
|
@@ -51190,6 +51889,35 @@ var useImage = function useImage() {
|
|
|
51190
51889
|
};
|
|
51191
51890
|
img.src = getUrl(alt);
|
|
51192
51891
|
};
|
|
51892
|
+
var handleCoverStyle = function handleCoverStyle(img) {
|
|
51893
|
+
var container = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current;
|
|
51894
|
+
if (!container) return;
|
|
51895
|
+
|
|
51896
|
+
// 根据容器的宽高获取宽高比
|
|
51897
|
+
var containerWidth = container.clientWidth;
|
|
51898
|
+
var containerHeight = container.clientHeight;
|
|
51899
|
+
var containerRatio = containerWidth / containerHeight;
|
|
51900
|
+
|
|
51901
|
+
// 根据图片的自然尺寸获取宽高比
|
|
51902
|
+
var imageWidth = img.naturalWidth;
|
|
51903
|
+
var imageHeight = img.naturalHeight;
|
|
51904
|
+
var imageRatio = imageWidth / imageHeight;
|
|
51905
|
+
|
|
51906
|
+
// 判断宽高比,决定图片填充策略
|
|
51907
|
+
if (imageRatio > containerRatio) {
|
|
51908
|
+
// 图片更宽,宽度占满容器,高度自适应
|
|
51909
|
+
setImgCoverStyle({
|
|
51910
|
+
height: '100%',
|
|
51911
|
+
width: 'auto'
|
|
51912
|
+
});
|
|
51913
|
+
} else {
|
|
51914
|
+
// 图片更高,填满容器高度
|
|
51915
|
+
setImgCoverStyle({
|
|
51916
|
+
width: '100%',
|
|
51917
|
+
height: 'auto'
|
|
51918
|
+
});
|
|
51919
|
+
}
|
|
51920
|
+
};
|
|
51193
51921
|
var markToRender = function markToRender() {
|
|
51194
51922
|
if (!src) {
|
|
51195
51923
|
handleAlt();
|
|
@@ -51197,7 +51925,10 @@ var useImage = function useImage() {
|
|
|
51197
51925
|
}
|
|
51198
51926
|
var img = new window.Image();
|
|
51199
51927
|
img.onload = function () {
|
|
51200
|
-
|
|
51928
|
+
setStatus(SRC);
|
|
51929
|
+
if (props.fit === 'fill') {
|
|
51930
|
+
handleCoverStyle(img);
|
|
51931
|
+
}
|
|
51201
51932
|
};
|
|
51202
51933
|
img.onerror = function (e) {
|
|
51203
51934
|
return handleError(SRC, e);
|
|
@@ -51226,7 +51957,9 @@ var useImage = function useImage() {
|
|
|
51226
51957
|
alt: alt,
|
|
51227
51958
|
draggable: !noImgDrag
|
|
51228
51959
|
});
|
|
51229
|
-
return objectSpread2_default()({
|
|
51960
|
+
return objectSpread2_default()({
|
|
51961
|
+
style: imgCoverStyle
|
|
51962
|
+
}, mergedEventHandlers);
|
|
51230
51963
|
};
|
|
51231
51964
|
var getImageDivProps = function getImageDivProps() {
|
|
51232
51965
|
var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -51994,7 +52727,8 @@ var Image = function Image(props) {
|
|
|
51994
52727
|
href: href,
|
|
51995
52728
|
lazy: lazy,
|
|
51996
52729
|
autoSSL: autoSSL,
|
|
51997
|
-
noImgDrag: noImgDrag
|
|
52730
|
+
noImgDrag: noImgDrag,
|
|
52731
|
+
fit: fit
|
|
51998
52732
|
}, rest)),
|
|
51999
52733
|
status = _useImage.status,
|
|
52000
52734
|
getRootProps = _useImage.getRootProps,
|
|
@@ -52073,7 +52807,7 @@ var Image = function Image(props) {
|
|
|
52073
52807
|
|
|
52074
52808
|
// 渲染 img / div 类型的内部标签
|
|
52075
52809
|
var renderInner = function renderInner(src) {
|
|
52076
|
-
return fit === '
|
|
52810
|
+
return fit === 'fit' ? renderDivInnerEl(src) : renderImgeInnerEl(src);
|
|
52077
52811
|
};
|
|
52078
52812
|
|
|
52079
52813
|
// 默认占位图
|
|
@@ -53024,7 +53758,7 @@ var UseSelectGroup = function UseSelectGroup(props) {
|
|
|
53024
53758
|
|
|
53025
53759
|
|
|
53026
53760
|
var ListOption = function ListOption(props) {
|
|
53027
|
-
var _jssStyle$select;
|
|
53761
|
+
var _jssStyle$select, _jssStyle$common;
|
|
53028
53762
|
var jssStyle = props.jssStyle,
|
|
53029
53763
|
datum = props.datum,
|
|
53030
53764
|
index = props.index,
|
|
@@ -53040,6 +53774,7 @@ var ListOption = function ListOption(props) {
|
|
|
53040
53774
|
var optionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
53041
53775
|
var config = useConfig();
|
|
53042
53776
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
|
|
53777
|
+
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
53043
53778
|
var isChecked = datum.check(data);
|
|
53044
53779
|
var isDisabled = datum.disabledCheck(data);
|
|
53045
53780
|
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 +53805,15 @@ var ListOption = function ListOption(props) {
|
|
|
53070
53805
|
children: icons_config.select.Check
|
|
53071
53806
|
});
|
|
53072
53807
|
};
|
|
53073
|
-
var
|
|
53808
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
53809
|
+
filterText = _useContext.filterText,
|
|
53810
|
+
highlight = _useContext.highlight;
|
|
53811
|
+
var result = getHighlightText({
|
|
53812
|
+
enable: highlight,
|
|
53813
|
+
nodeList: renderItem(data),
|
|
53814
|
+
searchWords: filterText,
|
|
53815
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
53816
|
+
});
|
|
53074
53817
|
var title = typeof result === 'string' ? result : '';
|
|
53075
53818
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
53076
53819
|
if (!isAnimationFinish) return;
|
|
@@ -53354,7 +54097,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53354
54097
|
id = props.id,
|
|
53355
54098
|
onChange = props.onChange,
|
|
53356
54099
|
disabled = props.disabled,
|
|
53357
|
-
checked = props.checked
|
|
54100
|
+
checked = props.checked,
|
|
54101
|
+
size = props.size;
|
|
53358
54102
|
var _useTreeContext = useTreeContext(),
|
|
53359
54103
|
unBindUpdate = _useTreeContext.unBindUpdate;
|
|
53360
54104
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -53371,7 +54115,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53371
54115
|
checked: checked,
|
|
53372
54116
|
disabled: disabled,
|
|
53373
54117
|
onChange: onChange,
|
|
53374
|
-
needStopPropagation: true
|
|
54118
|
+
needStopPropagation: true,
|
|
54119
|
+
size: size
|
|
53375
54120
|
});
|
|
53376
54121
|
};
|
|
53377
54122
|
/* harmony default export */ var tree_checkbox = (TreeCheckbox);
|
|
@@ -53387,7 +54132,10 @@ var TreeCheckbox = function TreeCheckbox(props) {
|
|
|
53387
54132
|
|
|
53388
54133
|
|
|
53389
54134
|
|
|
54135
|
+
|
|
54136
|
+
|
|
53390
54137
|
var NodeContent = function NodeContent(props) {
|
|
54138
|
+
var _jssStyle$common;
|
|
53391
54139
|
var jssStyle = props.jssStyle,
|
|
53392
54140
|
id = props.id,
|
|
53393
54141
|
virtual = props.virtual,
|
|
@@ -53418,11 +54166,14 @@ var NodeContent = function NodeContent(props) {
|
|
|
53418
54166
|
var forceUpdate = useRender();
|
|
53419
54167
|
var _useTreeContext = useTreeContext(),
|
|
53420
54168
|
isDisabled = _useTreeContext.isDisabled,
|
|
53421
|
-
bindUpdate = _useTreeContext.bindUpdate
|
|
54169
|
+
bindUpdate = _useTreeContext.bindUpdate,
|
|
54170
|
+
size = _useTreeContext.size,
|
|
54171
|
+
leafIcon = _useTreeContext.leafIcon;
|
|
53422
54172
|
var config = useConfig();
|
|
53423
54173
|
var disabled = isDisabled(id);
|
|
53424
54174
|
bindUpdate(id, forceUpdate);
|
|
53425
54175
|
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
54176
|
+
var commonStyles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle)) || {};
|
|
53426
54177
|
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
54178
|
var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
|
|
53428
54179
|
var hasExpandIcons = expandIcons !== undefined;
|
|
@@ -53459,7 +54210,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
53459
54210
|
var handleNodeCheck = function handleNodeCheck(_, checked) {
|
|
53460
54211
|
set(id, checked ? 1 : 0);
|
|
53461
54212
|
if (onChange) {
|
|
53462
|
-
onChange(getValue());
|
|
54213
|
+
onChange(getValue(), id);
|
|
53463
54214
|
}
|
|
53464
54215
|
};
|
|
53465
54216
|
var checked = getChecked(id);
|
|
@@ -53538,10 +54289,30 @@ var NodeContent = function NodeContent(props) {
|
|
|
53538
54289
|
if (Array.isArray(children) || children === null) return null;
|
|
53539
54290
|
if (fetching && !children) return renderLoading();
|
|
53540
54291
|
if (loader && children === undefined) return indicator;
|
|
54292
|
+
if (leafIcon) {
|
|
54293
|
+
var $iconContent = null;
|
|
54294
|
+
if (leafIcon === true) {
|
|
54295
|
+
$iconContent = icons_config.tree.Leaf;
|
|
54296
|
+
} else if (isFunc(leafIcon)) {
|
|
54297
|
+
$iconContent = leafIcon(data);
|
|
54298
|
+
} else {
|
|
54299
|
+
$iconContent = leafIcon;
|
|
54300
|
+
}
|
|
54301
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54302
|
+
className: contentStyle.iconWrapper,
|
|
54303
|
+
dir: config.direction,
|
|
54304
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54305
|
+
className: classnames_default()(contentStyle.icon, iconClass),
|
|
54306
|
+
dir: config.direction,
|
|
54307
|
+
children: $iconContent
|
|
54308
|
+
})
|
|
54309
|
+
});
|
|
54310
|
+
}
|
|
53541
54311
|
return null;
|
|
53542
54312
|
};
|
|
53543
54313
|
var renderCheckbox = function renderCheckbox() {
|
|
53544
54314
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_checkbox, {
|
|
54315
|
+
size: size,
|
|
53545
54316
|
jssStyle: jssStyle,
|
|
53546
54317
|
id: id,
|
|
53547
54318
|
disabled: disabled,
|
|
@@ -53550,11 +54321,19 @@ var NodeContent = function NodeContent(props) {
|
|
|
53550
54321
|
onChange: handleNodeCheck
|
|
53551
54322
|
});
|
|
53552
54323
|
};
|
|
54324
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FilterContext),
|
|
54325
|
+
filterText = _useContext.filterText,
|
|
54326
|
+
highlightFilter = _useContext.highlight;
|
|
53553
54327
|
var renderNode = function renderNode() {
|
|
53554
54328
|
var render = isFunc(renderItem) ? renderItem : function (item) {
|
|
53555
54329
|
return item[renderItem];
|
|
53556
54330
|
};
|
|
53557
|
-
return
|
|
54331
|
+
return getHighlightText({
|
|
54332
|
+
enable: highlightFilter,
|
|
54333
|
+
nodeList: render(data, expanded, active, id),
|
|
54334
|
+
searchWords: filterText,
|
|
54335
|
+
highlightClassName: commonStyles === null || commonStyles === void 0 ? void 0 : commonStyles.highlight
|
|
54336
|
+
});
|
|
53558
54337
|
};
|
|
53559
54338
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
53560
54339
|
className: rootClass,
|
|
@@ -54014,6 +54793,7 @@ var useTreeVirtualNode = function useTreeVirtualNode(props) {
|
|
|
54014
54793
|
|
|
54015
54794
|
|
|
54016
54795
|
|
|
54796
|
+
|
|
54017
54797
|
var tree_virtual_node_placeElement = null;
|
|
54018
54798
|
var VirtualNode = function VirtualNode(props) {
|
|
54019
54799
|
var jssStyle = props.jssStyle,
|
|
@@ -54039,7 +54819,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54039
54819
|
onChange = props.onChange,
|
|
54040
54820
|
onNodeClick = props.onNodeClick,
|
|
54041
54821
|
onToggle = props.onToggle,
|
|
54042
|
-
actionOnClick = props.actionOnClick
|
|
54822
|
+
actionOnClick = props.actionOnClick,
|
|
54823
|
+
size = props.size;
|
|
54043
54824
|
var config = useConfig();
|
|
54044
54825
|
var datum = useTreeContext();
|
|
54045
54826
|
var element = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -54080,14 +54861,28 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54080
54861
|
});
|
|
54081
54862
|
if (onToggle) onToggle(id, nextExpanded);
|
|
54082
54863
|
};
|
|
54083
|
-
|
|
54864
|
+
var indent = size === "large" ? 32 : 24;
|
|
54865
|
+
var $indents;
|
|
54866
|
+
if (line) {
|
|
54867
|
+
$indents = Array.from({
|
|
54868
|
+
length: level - 1
|
|
54869
|
+
}).map(function (_, index) {
|
|
54870
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
54871
|
+
className: contentStyle.lineIndent,
|
|
54872
|
+
style: {
|
|
54873
|
+
left: (index + 1) * indent
|
|
54874
|
+
}
|
|
54875
|
+
}, index);
|
|
54876
|
+
});
|
|
54877
|
+
}
|
|
54878
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
54084
54879
|
ref: element,
|
|
54085
54880
|
className: rootClass,
|
|
54086
54881
|
dir: config.direction,
|
|
54087
54882
|
style: {
|
|
54088
|
-
paddingLeft: level *
|
|
54883
|
+
paddingLeft: level * indent
|
|
54089
54884
|
},
|
|
54090
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
54885
|
+
children: [$indents, /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
54091
54886
|
virtual: true,
|
|
54092
54887
|
jssStyle: jssStyle,
|
|
54093
54888
|
isControlled: isControlled,
|
|
@@ -54118,7 +54913,7 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54118
54913
|
onNodeClick: onNodeClick,
|
|
54119
54914
|
onToggle: handleToggle,
|
|
54120
54915
|
actionOnClick: actionOnClick
|
|
54121
|
-
})
|
|
54916
|
+
})]
|
|
54122
54917
|
});
|
|
54123
54918
|
};
|
|
54124
54919
|
/* harmony default export */ var tree_virtual_node = (VirtualNode);
|
|
@@ -54297,11 +55092,15 @@ var Root = function Root(props) {
|
|
|
54297
55092
|
|
|
54298
55093
|
|
|
54299
55094
|
|
|
55095
|
+
var SIZE_MAP = {
|
|
55096
|
+
'small': 28,
|
|
55097
|
+
'default': 36,
|
|
55098
|
+
'large': 42
|
|
55099
|
+
};
|
|
54300
55100
|
var TreeVirtual = function TreeVirtual(props) {
|
|
54301
55101
|
var jssStyle = props.jssStyle,
|
|
54302
55102
|
height = props.height,
|
|
54303
|
-
|
|
54304
|
-
lineHeight = _props$lineHeight === void 0 ? 36 : _props$lineHeight,
|
|
55103
|
+
lineHeightProp = props.lineHeight,
|
|
54305
55104
|
rowsInView = props.rowsInView,
|
|
54306
55105
|
line = props.line,
|
|
54307
55106
|
mode = props.mode,
|
|
@@ -54326,6 +55125,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54326
55125
|
onToggle = props.onToggle,
|
|
54327
55126
|
onChange = props.onChange;
|
|
54328
55127
|
var datum = useTreeContext();
|
|
55128
|
+
var lineHeight = lineHeightProp || SIZE_MAP[datum.size || 'default'];
|
|
54329
55129
|
var renderItem = function renderItem(item, index) {
|
|
54330
55130
|
var id = item.id,
|
|
54331
55131
|
data = item.data,
|
|
@@ -54358,7 +55158,8 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54358
55158
|
expanded: expanded,
|
|
54359
55159
|
onNodeClick: onNodeClick,
|
|
54360
55160
|
onToggle: onToggle,
|
|
54361
|
-
onChange: onChange
|
|
55161
|
+
onChange: onChange,
|
|
55162
|
+
size: datum.size
|
|
54362
55163
|
}, id);
|
|
54363
55164
|
};
|
|
54364
55165
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
@@ -54384,7 +55185,7 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
54384
55185
|
|
|
54385
55186
|
|
|
54386
55187
|
|
|
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"];
|
|
55188
|
+
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
55189
|
|
|
54389
55190
|
|
|
54390
55191
|
|
|
@@ -54450,6 +55251,7 @@ var Tree = function Tree(props) {
|
|
|
54450
55251
|
rowsInView = _props$rowsInView === void 0 ? 20 : _props$rowsInView,
|
|
54451
55252
|
actionOnClick = props.actionOnClick,
|
|
54452
55253
|
tiledData = props.tiledData,
|
|
55254
|
+
height = props.height,
|
|
54453
55255
|
rest = objectWithoutProperties_default()(props, tree_excluded);
|
|
54454
55256
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(propActive),
|
|
54455
55257
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
@@ -54490,7 +55292,7 @@ var Tree = function Tree(props) {
|
|
|
54490
55292
|
expanded = _useTree.expanded,
|
|
54491
55293
|
onExpand = _useTree.onExpand;
|
|
54492
55294
|
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));
|
|
55295
|
+
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
55296
|
var getDragImageSelector = function getDragImageSelector(data) {
|
|
54495
55297
|
if (isFunc(dragImageSelector)) return dragImageSelector(data);
|
|
54496
55298
|
return dragImageSelector;
|
|
@@ -54505,16 +55307,6 @@ var Tree = function Tree(props) {
|
|
|
54505
55307
|
}
|
|
54506
55308
|
return props.height || styleHeight;
|
|
54507
55309
|
};
|
|
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
55310
|
var handleUpdateActive = function handleUpdateActive(active, item) {
|
|
54519
55311
|
setActive(active);
|
|
54520
55312
|
if (active !== props.active) {
|
|
@@ -54663,7 +55455,7 @@ var Tree = function Tree(props) {
|
|
|
54663
55455
|
return;
|
|
54664
55456
|
}
|
|
54665
55457
|
if (!props.expanded) return;
|
|
54666
|
-
|
|
55458
|
+
datum.updateExpanded(expanded);
|
|
54667
55459
|
}, [expanded]);
|
|
54668
55460
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
54669
55461
|
// if (!active) return;
|
|
@@ -54681,7 +55473,10 @@ var Tree = function Tree(props) {
|
|
|
54681
55473
|
id: fieldId
|
|
54682
55474
|
}, rest), {}, {
|
|
54683
55475
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_context_Provider, {
|
|
54684
|
-
value: datum,
|
|
55476
|
+
value: objectSpread2_default()(objectSpread2_default()({}, datum), {}, {
|
|
55477
|
+
size: props.size,
|
|
55478
|
+
leafIcon: props.leafIcon
|
|
55479
|
+
}),
|
|
54685
55480
|
children: renderList()
|
|
54686
55481
|
})
|
|
54687
55482
|
}));
|
|
@@ -55151,6 +55946,7 @@ function Select(props0) {
|
|
|
55151
55946
|
compressed = props.compressed,
|
|
55152
55947
|
compressedBound = props.compressedBound,
|
|
55153
55948
|
compressedClassName = props.compressedClassName,
|
|
55949
|
+
renderCompressed = props.renderCompressed,
|
|
55154
55950
|
placeholder = props.placeholder,
|
|
55155
55951
|
emptyAfterSelect = props.emptyAfterSelect,
|
|
55156
55952
|
autoAdapt = props.autoAdapt,
|
|
@@ -55184,6 +55980,7 @@ function Select(props0) {
|
|
|
55184
55980
|
onEnterExpand = props.onEnterExpand,
|
|
55185
55981
|
filterSameChange = props.filterSameChange,
|
|
55186
55982
|
noCache = props.noCache,
|
|
55983
|
+
highlight = props.highlight,
|
|
55187
55984
|
_props$trigger = props.trigger,
|
|
55188
55985
|
trigger = _props$trigger === void 0 ? 'click' : _props$trigger;
|
|
55189
55986
|
var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
|
|
@@ -55230,7 +56027,8 @@ function Select(props0) {
|
|
|
55230
56027
|
setInputText = _useFilter.setInputText,
|
|
55231
56028
|
onCreate = _useFilter.onCreate,
|
|
55232
56029
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
55233
|
-
rawData = _useFilter.rawData
|
|
56030
|
+
rawData = _useFilter.rawData,
|
|
56031
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
55234
56032
|
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
|
|
55235
56033
|
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
55236
56034
|
absoluteListUpdateKey = _useState8[0],
|
|
@@ -55587,6 +56385,7 @@ function Select(props0) {
|
|
|
55587
56385
|
reFocus: reFocus,
|
|
55588
56386
|
convertBr: convertBr,
|
|
55589
56387
|
compressed: compressed,
|
|
56388
|
+
renderCompressed: renderCompressed,
|
|
55590
56389
|
compressedBound: compressedBound,
|
|
55591
56390
|
compressedClassName: compressedClassName,
|
|
55592
56391
|
multiple: multiple,
|
|
@@ -55749,43 +56548,49 @@ function Select(props0) {
|
|
|
55749
56548
|
var targetProps = getTargetProps();
|
|
55750
56549
|
var onMouseEnter = targetProps.onMouseEnter,
|
|
55751
56550
|
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
|
-
|
|
56551
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
56552
|
+
value: {
|
|
56553
|
+
filterText: filterText,
|
|
56554
|
+
highlight: highlight
|
|
56555
|
+
},
|
|
56556
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
56557
|
+
ref: targetRef,
|
|
56558
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
56559
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
56560
|
+
className: rootClass,
|
|
56561
|
+
style: rootStyle,
|
|
56562
|
+
onKeyDown: handleKeyDown,
|
|
56563
|
+
onKeyUp: handleKeyUp,
|
|
56564
|
+
onBlur: handleBlur,
|
|
56565
|
+
onFocus: handleFocus,
|
|
56566
|
+
onMouseEnter: onMouseEnter,
|
|
56567
|
+
onMouseLeave: onMouseLeave,
|
|
56568
|
+
onMouseDown: preventDefault,
|
|
56569
|
+
children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
56570
|
+
adjust: adjust,
|
|
56571
|
+
focus: open,
|
|
56572
|
+
fixedWidth: (!props.columns || props.columns <= 1) && (autoAdapt ? 'min' : true),
|
|
56573
|
+
absolute: props.absolute,
|
|
56574
|
+
zIndex: props.zIndex,
|
|
56575
|
+
position: position,
|
|
56576
|
+
popupGap: 4,
|
|
56577
|
+
popupElRef: popupRef,
|
|
56578
|
+
parentElRef: targetRef,
|
|
56579
|
+
updateKey: absoluteListUpdateKey,
|
|
56580
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(animation_list, {
|
|
56581
|
+
onRef: popupRef,
|
|
56582
|
+
show: open,
|
|
56583
|
+
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)),
|
|
56584
|
+
onAnimationAfterEnter: onAnimationAfterEnter,
|
|
56585
|
+
display: 'block',
|
|
56586
|
+
type: "scale-y",
|
|
56587
|
+
duration: 'fast',
|
|
56588
|
+
style: getListStyle(),
|
|
56589
|
+
children: [renderHeader(), renderOptions(), renderFooter()]
|
|
56590
|
+
})
|
|
56591
|
+
})]
|
|
56592
|
+
}))
|
|
56593
|
+
});
|
|
55789
56594
|
}
|
|
55790
56595
|
/* harmony default export */ var base_src_select_select = (Select);
|
|
55791
56596
|
;// CONCATENATED MODULE: ../base/src/pagination/pagination-size-list.tsx
|
|
@@ -56603,10 +57408,10 @@ var list_list_List = function List(props) {
|
|
|
56603
57408
|
return renderItem(item, index);
|
|
56604
57409
|
})
|
|
56605
57410
|
}, columnIndex);
|
|
56606
|
-
return;
|
|
56607
57411
|
});
|
|
56608
|
-
var
|
|
56609
|
-
|
|
57412
|
+
var loadingPosition = props.loadingPosition || 'center';
|
|
57413
|
+
var renderCenterLoading = function renderCenterLoading() {
|
|
57414
|
+
if (!props.loading || loadingPosition !== 'center') return null;
|
|
56610
57415
|
var Loading = props.loading === true ? /*#__PURE__*/(0,jsx_runtime.jsx)(src_spin_spin, {
|
|
56611
57416
|
size: 16,
|
|
56612
57417
|
jssStyle: props.jssStyle
|
|
@@ -56616,6 +57421,17 @@ var list_list_List = function List(props) {
|
|
|
56616
57421
|
children: Loading
|
|
56617
57422
|
});
|
|
56618
57423
|
};
|
|
57424
|
+
var renderBottomLoading = function renderBottomLoading() {
|
|
57425
|
+
if (!props.loading || loadingPosition !== 'bottom') return null;
|
|
57426
|
+
var Loading = props.loading === true ? /*#__PURE__*/(0,jsx_runtime.jsx)(src_spin_spin, {
|
|
57427
|
+
size: 16,
|
|
57428
|
+
jssStyle: props.jssStyle
|
|
57429
|
+
}) : props.loading;
|
|
57430
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
57431
|
+
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.loadingBottom,
|
|
57432
|
+
children: Loading
|
|
57433
|
+
});
|
|
57434
|
+
};
|
|
56619
57435
|
var renderEmpty = function renderEmpty() {
|
|
56620
57436
|
if ((data === null || data === void 0 ? void 0 : data.length) > 0) return null;
|
|
56621
57437
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -56677,7 +57493,7 @@ var list_list_List = function List(props) {
|
|
|
56677
57493
|
onScroll: handleListScroll,
|
|
56678
57494
|
children: [columnData.map(function (column, colIndex) {
|
|
56679
57495
|
return renderColumn(column, colIndex);
|
|
56680
|
-
}), renderFooter()]
|
|
57496
|
+
}), renderBottomLoading(), renderFooter()]
|
|
56681
57497
|
});
|
|
56682
57498
|
};
|
|
56683
57499
|
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 +57504,7 @@ var list_list_List = function List(props) {
|
|
|
56688
57504
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
56689
57505
|
className: wrapperClass,
|
|
56690
57506
|
style: wrapperStyle,
|
|
56691
|
-
children: [renderList(),
|
|
57507
|
+
children: [renderList(), renderCenterLoading(), renderEmpty()]
|
|
56692
57508
|
}), props.pagination && /*#__PURE__*/(0,jsx_runtime.jsx)(src_pagination_pagination, objectSpread2_default()(objectSpread2_default()({
|
|
56693
57509
|
className: listClasses === null || listClasses === void 0 ? void 0 : listClasses.pagination,
|
|
56694
57510
|
jssStyle: props.jssStyle
|
|
@@ -58995,7 +59811,8 @@ var select_jssStyle = {
|
|
|
58995
59811
|
checkbox: useCheckboxStyle,
|
|
58996
59812
|
radio: useRadioStyle,
|
|
58997
59813
|
tree: useTreeStyle,
|
|
58998
|
-
spin: useSpinStyle
|
|
59814
|
+
spin: useSpinStyle,
|
|
59815
|
+
common: useCommonStyle
|
|
58999
59816
|
};
|
|
59000
59817
|
function SelectComponent(props) {
|
|
59001
59818
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_select_select, objectSpread2_default()({
|
|
@@ -59011,6 +59828,164 @@ function select_Select(props) {
|
|
|
59011
59828
|
var SelectComp = src_select_select_0;
|
|
59012
59829
|
SelectComp.displayName = 'ShineoutSelect';
|
|
59013
59830
|
/* harmony default export */ var src_select_0 = (SelectComp);
|
|
59831
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/text.tsx
|
|
59832
|
+
|
|
59833
|
+
|
|
59834
|
+
|
|
59835
|
+
function Text(_ref) {
|
|
59836
|
+
var classes = _ref.classes,
|
|
59837
|
+
className = _ref.className,
|
|
59838
|
+
_ref$rows = _ref.rows,
|
|
59839
|
+
rows = _ref$rows === void 0 ? 3 : _ref$rows,
|
|
59840
|
+
width = _ref.width,
|
|
59841
|
+
height = _ref.height,
|
|
59842
|
+
style = _ref.style;
|
|
59843
|
+
var cls = classnames_default()(classes.text, className);
|
|
59844
|
+
var nodes = [];
|
|
59845
|
+
function getTextWidth(index) {
|
|
59846
|
+
if (isArray(width)) {
|
|
59847
|
+
return width[index];
|
|
59848
|
+
}
|
|
59849
|
+
if (rows - 1 === index) {
|
|
59850
|
+
return width;
|
|
59851
|
+
}
|
|
59852
|
+
return undefined;
|
|
59853
|
+
}
|
|
59854
|
+
function getTextHeight(index) {
|
|
59855
|
+
if (isArray(height)) {
|
|
59856
|
+
return height[index];
|
|
59857
|
+
}
|
|
59858
|
+
if (rows - 1 === index) {
|
|
59859
|
+
return height;
|
|
59860
|
+
}
|
|
59861
|
+
return undefined;
|
|
59862
|
+
}
|
|
59863
|
+
for (var i = 0; i < rows; i++) {
|
|
59864
|
+
nodes.push( /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
|
|
59865
|
+
className: classes.textItem,
|
|
59866
|
+
style: {
|
|
59867
|
+
width: getTextWidth(i),
|
|
59868
|
+
height: getTextHeight(i)
|
|
59869
|
+
}
|
|
59870
|
+
}, i));
|
|
59871
|
+
}
|
|
59872
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
|
|
59873
|
+
className: cls,
|
|
59874
|
+
style: style,
|
|
59875
|
+
children: nodes
|
|
59876
|
+
});
|
|
59877
|
+
}
|
|
59878
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/image.tsx
|
|
59879
|
+
|
|
59880
|
+
|
|
59881
|
+
|
|
59882
|
+
function skeleton_image_Image(_ref) {
|
|
59883
|
+
var classes = _ref.classes,
|
|
59884
|
+
className = _ref.className,
|
|
59885
|
+
size = _ref.size,
|
|
59886
|
+
position = _ref.position,
|
|
59887
|
+
_ref$shape = _ref.shape,
|
|
59888
|
+
shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
|
|
59889
|
+
style = _ref.style;
|
|
59890
|
+
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);
|
|
59891
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59892
|
+
className: cls,
|
|
59893
|
+
style: style
|
|
59894
|
+
});
|
|
59895
|
+
}
|
|
59896
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/button.tsx
|
|
59897
|
+
|
|
59898
|
+
|
|
59899
|
+
|
|
59900
|
+
function skeleton_button_Button(_ref) {
|
|
59901
|
+
var classes = _ref.classes,
|
|
59902
|
+
className = _ref.className,
|
|
59903
|
+
size = _ref.size,
|
|
59904
|
+
position = _ref.position,
|
|
59905
|
+
_ref$count = _ref.count,
|
|
59906
|
+
count = _ref$count === void 0 ? 1 : _ref$count,
|
|
59907
|
+
style = _ref.style;
|
|
59908
|
+
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);
|
|
59909
|
+
var buttons = [];
|
|
59910
|
+
for (var i = 0; i < count; i++) {
|
|
59911
|
+
buttons.push( /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59912
|
+
className: classes.buttonItem
|
|
59913
|
+
}, i));
|
|
59914
|
+
}
|
|
59915
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
59916
|
+
className: cls,
|
|
59917
|
+
style: style,
|
|
59918
|
+
children: buttons
|
|
59919
|
+
});
|
|
59920
|
+
}
|
|
59921
|
+
;// CONCATENATED MODULE: ../base/src/skeleton/skeleton.tsx
|
|
59922
|
+
|
|
59923
|
+
|
|
59924
|
+
|
|
59925
|
+
|
|
59926
|
+
|
|
59927
|
+
|
|
59928
|
+
|
|
59929
|
+
|
|
59930
|
+
|
|
59931
|
+
function getComponentProps(prop) {
|
|
59932
|
+
return is_isObject(prop) ? prop : {};
|
|
59933
|
+
}
|
|
59934
|
+
var Skeleton = function Skeleton(props) {
|
|
59935
|
+
var _jssStyle$skeleton;
|
|
59936
|
+
var animation = props.animation,
|
|
59937
|
+
image = props.image,
|
|
59938
|
+
button = props.button,
|
|
59939
|
+
_props$text = props.text,
|
|
59940
|
+
text = _props$text === void 0 ? true : _props$text,
|
|
59941
|
+
children = props.children,
|
|
59942
|
+
loading = props.loading,
|
|
59943
|
+
jssStyle = props.jssStyle;
|
|
59944
|
+
var classes = jssStyle === null || jssStyle === void 0 || (_jssStyle$skeleton = jssStyle.skeleton) === null || _jssStyle$skeleton === void 0 ? void 0 : _jssStyle$skeleton.call(jssStyle);
|
|
59945
|
+
var rootClass = classnames_default()(classes.rootClass, classes.wrapper, props.className, defineProperty_default()({}, classes.animation, animation));
|
|
59946
|
+
var imageProps = getComponentProps(image);
|
|
59947
|
+
var textProps = getComponentProps(text);
|
|
59948
|
+
var buttonProps = getComponentProps(button);
|
|
59949
|
+
if (loading) {
|
|
59950
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
59951
|
+
className: rootClass,
|
|
59952
|
+
style: props.style,
|
|
59953
|
+
children: [image && imageProps.position !== 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
|
|
59954
|
+
classes: classes
|
|
59955
|
+
}, imageProps)), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
59956
|
+
className: classes.content,
|
|
59957
|
+
children: [text && /*#__PURE__*/(0,jsx_runtime.jsx)(Text, objectSpread2_default()({
|
|
59958
|
+
classes: classes
|
|
59959
|
+
}, textProps)), button && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_button_Button, objectSpread2_default()({
|
|
59960
|
+
classes: classes
|
|
59961
|
+
}, buttonProps))]
|
|
59962
|
+
}), image && imageProps.position === 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
|
|
59963
|
+
classes: classes
|
|
59964
|
+
}, imageProps))]
|
|
59965
|
+
});
|
|
59966
|
+
}
|
|
59967
|
+
return children;
|
|
59968
|
+
};
|
|
59969
|
+
/* harmony default export */ var src_skeleton_skeleton = (Skeleton);
|
|
59970
|
+
;// CONCATENATED MODULE: ./src/skeleton/skeleton.tsx
|
|
59971
|
+
|
|
59972
|
+
|
|
59973
|
+
|
|
59974
|
+
|
|
59975
|
+
|
|
59976
|
+
var skeleton_jssStyle = {
|
|
59977
|
+
skeleton: useSkeletonStyle
|
|
59978
|
+
};
|
|
59979
|
+
/* harmony default export */ var src_skeleton_skeleton_0 = (function (props) {
|
|
59980
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_skeleton_skeleton, objectSpread2_default()({
|
|
59981
|
+
jssStyle: skeleton_jssStyle
|
|
59982
|
+
}, props));
|
|
59983
|
+
});
|
|
59984
|
+
;// CONCATENATED MODULE: ./src/skeleton/index.ts
|
|
59985
|
+
|
|
59986
|
+
var SkeletonComp = src_skeleton_skeleton_0;
|
|
59987
|
+
SkeletonComp.displayName = 'ShineoutSkeleton';
|
|
59988
|
+
/* harmony default export */ var src_skeleton_0 = (SkeletonComp);
|
|
59014
59989
|
;// CONCATENATED MODULE: ../hooks/src/components/use-slider/use-slider.ts
|
|
59015
59990
|
|
|
59016
59991
|
|
|
@@ -60313,19 +61288,16 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60313
61288
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60314
61289
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
60315
61290
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60316
|
-
|
|
60317
|
-
|
|
61291
|
+
isMouseDown: false,
|
|
61292
|
+
lastTableHeight: 0
|
|
60318
61293
|
}),
|
|
60319
61294
|
context = _useRef.current;
|
|
60320
|
-
// TODO: keepScrollTop考虑做成Table的新feat?
|
|
60321
61295
|
var _props$scrollHeight = props.scrollHeight,
|
|
60322
61296
|
scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
|
|
60323
61297
|
_props$scrollWidth = props.scrollWidth,
|
|
60324
61298
|
scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
|
|
60325
61299
|
_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;
|
|
61300
|
+
defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
|
|
60329
61301
|
var _useResize = useResize({
|
|
60330
61302
|
targetRef: containerRef,
|
|
60331
61303
|
timer: 100
|
|
@@ -60348,14 +61320,17 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60348
61320
|
display: 'flex',
|
|
60349
61321
|
position: 'sticky',
|
|
60350
61322
|
flexDirection: 'column',
|
|
61323
|
+
overflow: props.isScrollX ? 'initial' : 'hidden',
|
|
60351
61324
|
top: 0
|
|
60352
61325
|
};
|
|
60353
|
-
|
|
60354
|
-
|
|
60355
|
-
|
|
60356
|
-
|
|
60357
|
-
|
|
60358
|
-
|
|
61326
|
+
var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
|
|
61327
|
+
if (props.isEmpty) {
|
|
61328
|
+
paddingTop = 0;
|
|
61329
|
+
Object.assign(scrollerStyle, {
|
|
61330
|
+
display: 'flex',
|
|
61331
|
+
flexDirection: 'column'
|
|
61332
|
+
});
|
|
61333
|
+
}
|
|
60359
61334
|
var placeStyle = {
|
|
60360
61335
|
paddingTop: paddingTop,
|
|
60361
61336
|
width: scrollWidth,
|
|
@@ -60407,21 +61382,48 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
60407
61382
|
scrollRef.current.scrollTop += scrollTop;
|
|
60408
61383
|
}
|
|
60409
61384
|
});
|
|
61385
|
+
var scrollRoleProps = objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
61386
|
+
role: 'scroll'
|
|
61387
|
+
})), {}, {
|
|
61388
|
+
style: scrollerStyle,
|
|
61389
|
+
onScroll: handleScroll,
|
|
61390
|
+
ref: wrapperRef,
|
|
61391
|
+
onMouseDown: function onMouseDown() {
|
|
61392
|
+
context.isMouseDown = true;
|
|
61393
|
+
},
|
|
61394
|
+
onMouseUp: function onMouseUp() {
|
|
61395
|
+
context.isMouseDown = false;
|
|
61396
|
+
}
|
|
61397
|
+
});
|
|
61398
|
+
|
|
61399
|
+
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
61400
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
61401
|
+
if (!props.tableRef.current) return;
|
|
61402
|
+
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
61403
|
+
var container = containerRef.current;
|
|
61404
|
+
// 判断内容滚动高度是否真的超过了容器高度
|
|
61405
|
+
var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
|
|
61406
|
+
// 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
|
|
61407
|
+
if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight && !isRealScroll) {
|
|
61408
|
+
props.setFakeVirtual(true);
|
|
61409
|
+
context.lastTableHeight = 0;
|
|
61410
|
+
} else {
|
|
61411
|
+
context.lastTableHeight = rootTableHeight;
|
|
61412
|
+
}
|
|
61413
|
+
}, [paddingTop]);
|
|
61414
|
+
if (props.isEmpty) {
|
|
61415
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
61416
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61417
|
+
style: {
|
|
61418
|
+
width: scrollWidth
|
|
61419
|
+
}
|
|
61420
|
+
}), props.children]
|
|
61421
|
+
}));
|
|
61422
|
+
}
|
|
60410
61423
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
60411
61424
|
className: props.className,
|
|
60412
61425
|
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
|
-
},
|
|
61426
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
60425
61427
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
|
|
60426
61428
|
role: 'scroll-container'
|
|
60427
61429
|
})), {}, {
|
|
@@ -60933,7 +61935,6 @@ var useTableLayout = function useTableLayout(props) {
|
|
|
60933
61935
|
width: tableWidth,
|
|
60934
61936
|
shouldLastColAuto: props.columnResizable && !adjust,
|
|
60935
61937
|
scrollWidth: scrollWidth,
|
|
60936
|
-
// maxScrollLeft: scrollWidth - context.clientWidth,
|
|
60937
61938
|
resizeFlag: resizeFlag
|
|
60938
61939
|
};
|
|
60939
61940
|
};
|
|
@@ -60957,7 +61958,8 @@ var useTableFilter = function useTableFilter(props) {
|
|
|
60957
61958
|
}, [filterInfo]);
|
|
60958
61959
|
var filteredData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
60959
61960
|
var _props$data;
|
|
60960
|
-
|
|
61961
|
+
// why use slice: props.data引用不改变会导致后续的useMemo无法重新计算
|
|
61962
|
+
if (activeFilters.length === 0) return (props.data || []).slice();
|
|
60961
61963
|
return (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.filter(function (item) {
|
|
60962
61964
|
return activeFilters.every(function (key) {
|
|
60963
61965
|
var filter = filterInfo.get(key);
|
|
@@ -61529,7 +62531,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
61529
62531
|
var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61530
62532
|
if (props.disabled) return props.data;
|
|
61531
62533
|
return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
|
|
61532
|
-
}, [props.data, startIndex, finalRowsInView]);
|
|
62534
|
+
}, [props.data, props.disabled, startIndex, finalRowsInView]);
|
|
61533
62535
|
var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
61534
62536
|
var t = innerTop + offsetY;
|
|
61535
62537
|
if (t < 0) {
|
|
@@ -61853,6 +62855,7 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61853
62855
|
last.colSpan += colSpan;
|
|
61854
62856
|
if (col.fixed) last.fixed = col.fixed;
|
|
61855
62857
|
if (col.lastFixed) last.lastFixed = true;
|
|
62858
|
+
if (col.groupProps) last.groupProps = col.groupProps;
|
|
61856
62859
|
} else {
|
|
61857
62860
|
var sub = [];
|
|
61858
62861
|
colSpan = setColumns(sub, col, level + 1, index);
|
|
@@ -61865,7 +62868,8 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
61865
62868
|
fixed: col.fixed,
|
|
61866
62869
|
firstFixed: col.firstFixed,
|
|
61867
62870
|
index: index,
|
|
61868
|
-
columns: sub
|
|
62871
|
+
columns: sub,
|
|
62872
|
+
groupProps: col.groupProps
|
|
61869
62873
|
};
|
|
61870
62874
|
columns.push(groupCol);
|
|
61871
62875
|
}
|
|
@@ -61936,33 +62940,17 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
61936
62940
|
var config = filter.config;
|
|
61937
62941
|
var currentFilter = (_props$filterInfo = props.filterInfo) === null || _props$filterInfo === void 0 ? void 0 : _props$filterInfo.get(props.columnKey);
|
|
61938
62942
|
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
62943
|
var treeKeygen = function treeKeygen(d) {
|
|
61956
62944
|
return d.value;
|
|
61957
62945
|
};
|
|
61958
62946
|
var treeProps = config !== null && config !== void 0 && config.multiple ? {
|
|
61959
|
-
value:
|
|
62947
|
+
value: tempValue,
|
|
61960
62948
|
onChange: function onChange(v) {
|
|
61961
62949
|
setTempValue(v);
|
|
61962
62950
|
},
|
|
61963
62951
|
renderItem: (config === null || config === void 0 ? void 0 : config.renderItem) || 'label'
|
|
61964
62952
|
} : {
|
|
61965
|
-
active:
|
|
62953
|
+
active: tempValue,
|
|
61966
62954
|
setActive: function setActive(v) {
|
|
61967
62955
|
setTempValue(v);
|
|
61968
62956
|
},
|
|
@@ -61995,7 +62983,24 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
61995
62983
|
onFilter = _useFilter.onFilter,
|
|
61996
62984
|
inputText = _useFilter.inputText,
|
|
61997
62985
|
setInputText = _useFilter.setInputText;
|
|
61998
|
-
var
|
|
62986
|
+
var onReset = function onReset() {
|
|
62987
|
+
setTempValue(undefined);
|
|
62988
|
+
setInputText('');
|
|
62989
|
+
props.onFilterChange(props.columnKey, undefined);
|
|
62990
|
+
setPopoverVisible(false);
|
|
62991
|
+
};
|
|
62992
|
+
var onConfirm = function onConfirm() {
|
|
62993
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
62994
|
+
setPopoverVisible(false);
|
|
62995
|
+
};
|
|
62996
|
+
var onVisibleChange = function onVisibleChange(visible) {
|
|
62997
|
+
// 关闭popover时就提交筛选条件,包括click away触发的
|
|
62998
|
+
if (!visible) {
|
|
62999
|
+
props.onFilterChange(props.columnKey, tempValue);
|
|
63000
|
+
}
|
|
63001
|
+
setPopoverVisible(visible);
|
|
63002
|
+
};
|
|
63003
|
+
var displayData = inputText ? filterData || rawData : rawData;
|
|
61999
63004
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(base_src_button_button, {
|
|
62000
63005
|
jssStyle: props.jssStyle,
|
|
62001
63006
|
shape: "circle",
|
|
@@ -62327,6 +63332,7 @@ var thead_toNum = toNum;
|
|
|
62327
63332
|
};
|
|
62328
63333
|
};
|
|
62329
63334
|
var createTh = function createTh(trs, col, level, isLast, columnIndex) {
|
|
63335
|
+
var _colTemp2$groupProps, _colTemp2$groupProps2;
|
|
62330
63336
|
var colTemp = col;
|
|
62331
63337
|
var colTemp2 = col;
|
|
62332
63338
|
var fixedStyle = getFixedStyle(col.fixed, col.index, colTemp2.colSpan || 1, level);
|
|
@@ -62381,8 +63387,11 @@ var thead_toNum = toNum;
|
|
|
62381
63387
|
var style = typeof colTemp2.name === 'string' ? fixedStyle : objectSpread2_default()({
|
|
62382
63388
|
padding: 0
|
|
62383
63389
|
}, fixedStyle);
|
|
63390
|
+
if (colTemp2 !== null && colTemp2 !== void 0 && (_colTemp2$groupProps = colTemp2.groupProps) !== null && _colTemp2$groupProps !== void 0 && _colTemp2$groupProps.style) {
|
|
63391
|
+
style = objectSpread2_default()(objectSpread2_default()({}, style), colTemp2.groupProps.style);
|
|
63392
|
+
}
|
|
62384
63393
|
trs[level].push( /*#__PURE__*/(0,jsx_runtime.jsx)("th", {
|
|
62385
|
-
className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup),
|
|
63394
|
+
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
63395
|
style: style,
|
|
62387
63396
|
colSpan: colTemp2.colSpan,
|
|
62388
63397
|
dir: config.direction,
|
|
@@ -62579,7 +63588,7 @@ var useTableRow = function useTableRow(props) {
|
|
|
62579
63588
|
/* harmony default export */ var use_table_row = (useTableRow);
|
|
62580
63589
|
;// CONCATENATED MODULE: ../hooks/src/common/use-component-memo/use-memo.ts
|
|
62581
63590
|
|
|
62582
|
-
function
|
|
63591
|
+
function useComponentMemo(getValue, condition, shouldUpdate) {
|
|
62583
63592
|
var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
|
|
62584
63593
|
if (!shouldUpdate) return getValue();
|
|
62585
63594
|
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
|
|
@@ -62593,8 +63602,6 @@ function useMemo(getValue, condition, shouldUpdate) {
|
|
|
62593
63602
|
|
|
62594
63603
|
|
|
62595
63604
|
|
|
62596
|
-
|
|
62597
|
-
|
|
62598
63605
|
function Td(props) {
|
|
62599
63606
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
|
|
62600
63607
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
@@ -62618,9 +63625,7 @@ function Td(props) {
|
|
|
62618
63625
|
onMouseEnter = props.onMouseEnter,
|
|
62619
63626
|
onMouseLeave = props.onMouseLeave,
|
|
62620
63627
|
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 () {
|
|
63628
|
+
var $td = useComponentMemo(function () {
|
|
62624
63629
|
var content = renderContent(props.col, props.data);
|
|
62625
63630
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
|
|
62626
63631
|
colSpan: colSpan,
|
|
@@ -62634,16 +63639,13 @@ function Td(props) {
|
|
|
62634
63639
|
onClick: onClick,
|
|
62635
63640
|
children: content
|
|
62636
63641
|
}, col.key);
|
|
62637
|
-
}, [data, className, style, col.type, col.treeColumnsName]
|
|
63642
|
+
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
62638
63643
|
if (col.type || col.treeColumnsName) {
|
|
62639
63644
|
return true;
|
|
62640
63645
|
}
|
|
62641
63646
|
return prev.some(function (_, index) {
|
|
62642
|
-
|
|
62643
|
-
|
|
62644
|
-
}
|
|
62645
|
-
return !shallowEqual(prev[index], next[index]);
|
|
62646
|
-
});
|
|
63647
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
63648
|
+
}) || !props.scrolling;
|
|
62647
63649
|
} : undefined);
|
|
62648
63650
|
return $td;
|
|
62649
63651
|
}
|
|
@@ -62714,6 +63716,8 @@ var Tr = function Tr(props) {
|
|
|
62714
63716
|
});
|
|
62715
63717
|
var setVirtualRowHeight = usePersistFn(function () {
|
|
62716
63718
|
if (props.setRowHeight && trRef.current) {
|
|
63719
|
+
// 祖先元素不可见时(display: none)
|
|
63720
|
+
if (!trRef.current.offsetParent) return;
|
|
62717
63721
|
var expandHeight = expandRef.current ? expandRef.current.getBoundingClientRect().height : 0;
|
|
62718
63722
|
props.setRowHeight(props.rowIndex, trRef.current.getBoundingClientRect().height + expandHeight);
|
|
62719
63723
|
}
|
|
@@ -62885,6 +63889,7 @@ var Tr = function Tr(props) {
|
|
|
62885
63889
|
if (col.treeColumnsName) {
|
|
62886
63890
|
return renderTreeExpand(content, col.treeIndent);
|
|
62887
63891
|
}
|
|
63892
|
+
if (col.render === undefined) return null;
|
|
62888
63893
|
return content;
|
|
62889
63894
|
});
|
|
62890
63895
|
var renderTds = usePersistFn(function (cols, data) {
|
|
@@ -62931,8 +63936,9 @@ var Tr = function Tr(props) {
|
|
|
62931
63936
|
onClick: props.onCellClick ? function () {
|
|
62932
63937
|
return handleCellClick(data[i].data, i);
|
|
62933
63938
|
} : undefined,
|
|
62934
|
-
|
|
62935
|
-
|
|
63939
|
+
renderContent: renderContent,
|
|
63940
|
+
virtual: props.virtual,
|
|
63941
|
+
scrolling: props.scrolling
|
|
62936
63942
|
}, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
|
|
62937
63943
|
tds.push(td);
|
|
62938
63944
|
if (data[i].colSpan) skip = data[i].colSpan - 1;
|
|
@@ -63030,8 +64036,6 @@ var Tr = function Tr(props) {
|
|
|
63030
64036
|
|
|
63031
64037
|
|
|
63032
64038
|
|
|
63033
|
-
|
|
63034
|
-
|
|
63035
64039
|
/* harmony default export */ var tbody = (function (props) {
|
|
63036
64040
|
var _props$columns = props.columns,
|
|
63037
64041
|
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
@@ -63104,25 +64108,19 @@ var Tr = function Tr(props) {
|
|
|
63104
64108
|
resizeFlag: props.resizeFlag,
|
|
63105
64109
|
treeCheckAll: props.treeCheckAll,
|
|
63106
64110
|
onCellClick: props.onCellClick,
|
|
63107
|
-
|
|
64111
|
+
virtual: props.virtual,
|
|
64112
|
+
scrolling: props.scrolling
|
|
63108
64113
|
}, trRenderKey);
|
|
63109
64114
|
};
|
|
63110
|
-
var
|
|
63111
|
-
var updateFn = typeof_default()(props.shouldCellUpdate) === 'object' && 'update' in props.shouldCellUpdate ? props.shouldCellUpdate.update : props.shouldCellUpdate;
|
|
63112
|
-
var $tbody = useMemo(function () {
|
|
64115
|
+
var $tbody = useComponentMemo(function () {
|
|
63113
64116
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
|
|
63114
64117
|
children: (props.data || []).map(function (item, index) {
|
|
63115
64118
|
return renderRow(item, index);
|
|
63116
64119
|
})
|
|
63117
64120
|
});
|
|
63118
|
-
}, [props.data, currentIndex]
|
|
64121
|
+
}, [props.data, currentIndex], props.virtual === 'lazy' ? function (prev, next) {
|
|
63119
64122
|
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]);
|
|
64123
|
+
return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
|
|
63126
64124
|
}) || !props.scrolling;
|
|
63127
64125
|
} : undefined);
|
|
63128
64126
|
return $tbody;
|
|
@@ -63267,7 +64265,7 @@ var emptyRef = {
|
|
|
63267
64265
|
current: null
|
|
63268
64266
|
};
|
|
63269
64267
|
/* harmony default export */ var src_table_table = (function (props) {
|
|
63270
|
-
var _props$jssStyle, _props$jssStyle$table,
|
|
64268
|
+
var _props$jssStyle, _props$jssStyle$table, _columns$find;
|
|
63271
64269
|
var _props$verticalAlign = props.verticalAlign,
|
|
63272
64270
|
verticalAlign = _props$verticalAlign === void 0 ? 'top' : _props$verticalAlign,
|
|
63273
64271
|
_props$size = props.size,
|
|
@@ -63279,6 +64277,7 @@ var emptyRef = {
|
|
|
63279
64277
|
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
64278
|
var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63281
64279
|
var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
64280
|
+
var theadIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)("thead-container-".concat(generateUUID()));
|
|
63282
64281
|
var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63283
64282
|
var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
63284
64283
|
var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
@@ -63288,6 +64287,10 @@ var emptyRef = {
|
|
|
63288
64287
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63289
64288
|
scrolling = _useState2[0],
|
|
63290
64289
|
setScrolling = _useState2[1];
|
|
64290
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
64291
|
+
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
64292
|
+
fakeVirtual = _useState4[0],
|
|
64293
|
+
setFakeVirtual = _useState4[1];
|
|
63291
64294
|
var browserScrollbarWidth = useScrollbarWidth();
|
|
63292
64295
|
if (props.fixed) {
|
|
63293
64296
|
table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
|
|
@@ -63314,7 +64317,7 @@ var emptyRef = {
|
|
|
63314
64317
|
scrollingTimer: null
|
|
63315
64318
|
}),
|
|
63316
64319
|
context = _useRef.current;
|
|
63317
|
-
var virtual =
|
|
64320
|
+
var virtual = !fakeVirtual && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
|
|
63318
64321
|
|
|
63319
64322
|
// 虚拟列表高度另外计算
|
|
63320
64323
|
var _useResize = useResize({
|
|
@@ -63445,7 +64448,13 @@ var emptyRef = {
|
|
|
63445
64448
|
});
|
|
63446
64449
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63447
64450
|
var _theadRef$current, _tfootRef$current;
|
|
63448
|
-
|
|
64451
|
+
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
64452
|
+
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
64453
|
+
if (props.sticky) {
|
|
64454
|
+
context.theadAndTfootHeight = tfootHeight;
|
|
64455
|
+
} else {
|
|
64456
|
+
context.theadAndTfootHeight = theadHeight + tfootHeight;
|
|
64457
|
+
}
|
|
63449
64458
|
}, [theadRef.current, tfootRef.current]);
|
|
63450
64459
|
var virtualInfo = use_table_virtual({
|
|
63451
64460
|
disabled: !virtual,
|
|
@@ -63461,10 +64470,14 @@ var emptyRef = {
|
|
|
63461
64470
|
theadAndTfootHeight: context.theadAndTfootHeight
|
|
63462
64471
|
});
|
|
63463
64472
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
63464
|
-
var
|
|
64473
|
+
var _tableRef$current;
|
|
63465
64474
|
if (props.hideHeader || !props.sticky) return;
|
|
63466
|
-
|
|
63467
|
-
|
|
64475
|
+
|
|
64476
|
+
// why use querySelectorAll: thead经历了Sticky组件的渲染再回来时,theadRef就丢失了
|
|
64477
|
+
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, "]"));
|
|
64478
|
+
theads === null || theads === void 0 || theads.forEach(function (item) {
|
|
64479
|
+
item.scrollLeft = left;
|
|
64480
|
+
});
|
|
63468
64481
|
});
|
|
63469
64482
|
|
|
63470
64483
|
// 简单表格的滚动事件
|
|
@@ -63511,28 +64524,33 @@ var emptyRef = {
|
|
|
63511
64524
|
}, 100);
|
|
63512
64525
|
});
|
|
63513
64526
|
var renderEmpty = function renderEmpty() {
|
|
63514
|
-
var _props$
|
|
63515
|
-
if (!((_props$
|
|
64527
|
+
var _props$data;
|
|
64528
|
+
if (!((_props$data = props.data) !== null && _props$data !== void 0 && _props$data.length) || filteredData !== undefined && filteredData.length === 0) {
|
|
64529
|
+
var empty = props.empty !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
64530
|
+
children: props.empty
|
|
64531
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(src_empty_empty, {
|
|
64532
|
+
jssStyle: props.jssStyle
|
|
64533
|
+
});
|
|
63516
64534
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63517
64535
|
className: classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper, isScrollX && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyNoBorder)),
|
|
63518
64536
|
ref: function ref(el) {
|
|
63519
64537
|
context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
|
|
63520
64538
|
},
|
|
63521
|
-
children:
|
|
63522
|
-
jssStyle: props.jssStyle
|
|
63523
|
-
})
|
|
64539
|
+
children: empty
|
|
63524
64540
|
});
|
|
63525
64541
|
}
|
|
63526
64542
|
return null;
|
|
63527
64543
|
};
|
|
64544
|
+
var $empty = renderEmpty();
|
|
63528
64545
|
var renderTable = function renderTable() {
|
|
63529
|
-
var _props$summary, _sticky$top, _props$
|
|
64546
|
+
var _props$summary, _sticky$top, _props$data2;
|
|
63530
64547
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
63531
64548
|
colgroup: colgroup,
|
|
63532
64549
|
columns: columns,
|
|
63533
64550
|
shouldLastColAuto: !!shouldLastColAuto
|
|
63534
64551
|
});
|
|
63535
64552
|
var bodyCommonProps = {
|
|
64553
|
+
virtual: props.virtual,
|
|
63536
64554
|
hover: props.hover,
|
|
63537
64555
|
disabled: props.disabled,
|
|
63538
64556
|
rowClickAttr: props.rowClickAttr,
|
|
@@ -63561,8 +64579,7 @@ var emptyRef = {
|
|
|
63561
64579
|
bodyScrollWidth: scrollWidth,
|
|
63562
64580
|
resizeFlag: resizeFlag,
|
|
63563
64581
|
treeCheckAll: props.treeCheckAll,
|
|
63564
|
-
onCellClick: props.onCellClick
|
|
63565
|
-
shouldCellUpdate: props.shouldCellUpdate
|
|
64582
|
+
onCellClick: props.onCellClick
|
|
63566
64583
|
};
|
|
63567
64584
|
var headCommonProps = {
|
|
63568
64585
|
disabled: props.disabled,
|
|
@@ -63602,16 +64619,22 @@ var emptyRef = {
|
|
|
63602
64619
|
target: sticky === null || sticky === void 0 ? void 0 : sticky.target,
|
|
63603
64620
|
top: (_sticky$top = sticky === null || sticky === void 0 ? void 0 : sticky.top) !== null && _sticky$top !== void 0 ? _sticky$top : 0,
|
|
63604
64621
|
css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
|
|
63605
|
-
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
64622
|
+
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
|
|
64623
|
+
onChange: function onChange(isSticky) {
|
|
64624
|
+
if (isSticky) {
|
|
64625
|
+
var _scrollRef$current;
|
|
64626
|
+
syncHeaderScroll(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollLeft) || 0);
|
|
64627
|
+
}
|
|
64628
|
+
}
|
|
63606
64629
|
};
|
|
63607
|
-
var isRenderVirtualTable = virtual || props.sticky || !((_props$
|
|
63608
|
-
var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper);
|
|
64630
|
+
var isRenderVirtualTable = virtual || props.sticky || !((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length);
|
|
64631
|
+
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
64632
|
var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
|
|
63610
64633
|
var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
|
|
63611
|
-
var _scrollRef$
|
|
64634
|
+
var _scrollRef$current2, _scrollRef$current3, _scrollRef$current4;
|
|
63612
64635
|
if (!props.showTopScrollbar) return null;
|
|
63613
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
63614
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64636
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth) || 0;
|
|
64637
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth) || 0;
|
|
63615
64638
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
63616
64639
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
63617
64640
|
// 开启了双滚,但是没有滚动条,不显示
|
|
@@ -63636,7 +64659,7 @@ var emptyRef = {
|
|
|
63636
64659
|
ref: headMirrorScrollRef,
|
|
63637
64660
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63638
64661
|
style: {
|
|
63639
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64662
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.scrollWidth,
|
|
63640
64663
|
height: 1
|
|
63641
64664
|
}
|
|
63642
64665
|
})
|
|
@@ -63644,17 +64667,16 @@ var emptyRef = {
|
|
|
63644
64667
|
}));
|
|
63645
64668
|
};
|
|
63646
64669
|
var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
|
|
63647
|
-
var _scrollRef$
|
|
64670
|
+
var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
|
|
63648
64671
|
if (!props.showBottomScrollbar) return null;
|
|
63649
|
-
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
63650
|
-
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64672
|
+
var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
|
|
64673
|
+
var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
|
|
63651
64674
|
var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
|
|
63652
64675
|
var showScroll = scrollRefScrollWidth > scrollRefWidth;
|
|
63653
64676
|
// 开启了双滚,但是没有滚动条,不显示
|
|
63654
64677
|
if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
|
|
63655
64678
|
var options = props.showBottomScrollbar === true ? {} : props.showBottomScrollbar;
|
|
63656
64679
|
var scrollerStickyProps = {
|
|
63657
|
-
scrollContainer: options.scrollContainer || document.body,
|
|
63658
64680
|
bottom: options.bottom || 0,
|
|
63659
64681
|
zIndex: options.zIndex || defaultZIndex + 1,
|
|
63660
64682
|
parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
|
|
@@ -63676,31 +64698,32 @@ var emptyRef = {
|
|
|
63676
64698
|
ref: bottomMirrorScrollRef,
|
|
63677
64699
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
63678
64700
|
style: {
|
|
63679
|
-
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$
|
|
64701
|
+
width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
|
|
63680
64702
|
height: 1
|
|
63681
64703
|
}
|
|
63682
64704
|
})
|
|
63683
64705
|
})
|
|
63684
64706
|
}));
|
|
63685
64707
|
};
|
|
63686
|
-
var $headTable = /*#__PURE__*/(0,jsx_runtime.
|
|
63687
|
-
|
|
63688
|
-
|
|
63689
|
-
|
|
63690
|
-
|
|
63691
|
-
children:
|
|
63692
|
-
|
|
64708
|
+
var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
64709
|
+
className: headWrapperClass
|
|
64710
|
+
}, getDataAttribute({
|
|
64711
|
+
role: theadIdRef.current
|
|
64712
|
+
})), {}, {
|
|
64713
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64714
|
+
style: {
|
|
64715
|
+
width: width
|
|
64716
|
+
},
|
|
64717
|
+
ref: theadRef,
|
|
64718
|
+
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
64719
|
+
})
|
|
64720
|
+
}));
|
|
63693
64721
|
if (isRenderVirtualTable) {
|
|
63694
|
-
var _props$
|
|
64722
|
+
var _props$data3;
|
|
64723
|
+
var showStickyHeader = !props.hideHeader && props.sticky;
|
|
63695
64724
|
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
|
-
})
|
|
64725
|
+
children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
|
|
64726
|
+
children: $headTable
|
|
63704
64727
|
})), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
|
|
63705
64728
|
style: {
|
|
63706
64729
|
display: 'flex',
|
|
@@ -63714,10 +64737,11 @@ var emptyRef = {
|
|
|
63714
64737
|
onScroll: handleVirtualScroll,
|
|
63715
64738
|
defaultHeight: context.emptyHeight,
|
|
63716
64739
|
isScrollY: isScrollY,
|
|
63717
|
-
|
|
63718
|
-
|
|
63719
|
-
|
|
63720
|
-
|
|
64740
|
+
isScrollX: isScrollX,
|
|
64741
|
+
isEmpty: !!$empty,
|
|
64742
|
+
tableRef: tableRef,
|
|
64743
|
+
setFakeVirtual: setFakeVirtual,
|
|
64744
|
+
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
64745
|
style: {
|
|
63722
64746
|
width: width,
|
|
63723
64747
|
transform: virtualInfo.translateStyle
|
|
@@ -63738,7 +64762,7 @@ var emptyRef = {
|
|
|
63738
64762
|
ref: tfootRef,
|
|
63739
64763
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63740
64764
|
})
|
|
63741
|
-
}) : null,
|
|
64765
|
+
}) : null, $empty]
|
|
63742
64766
|
}), renderBottomMirrorScroller()]
|
|
63743
64767
|
});
|
|
63744
64768
|
}
|
|
@@ -63754,7 +64778,7 @@ var emptyRef = {
|
|
|
63754
64778
|
ref: tbodyRef,
|
|
63755
64779
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
63756
64780
|
children: renderEmpty()
|
|
63757
|
-
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64781
|
+
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
63758
64782
|
})
|
|
63759
64783
|
}), renderBottomMirrorScroller()]
|
|
63760
64784
|
});
|
|
@@ -63779,10 +64803,10 @@ var emptyRef = {
|
|
|
63779
64803
|
|
|
63780
64804
|
// handle head and foot scroll
|
|
63781
64805
|
var handleHeaderWheel = usePersistFn(function (e) {
|
|
63782
|
-
var _theadRef$
|
|
64806
|
+
var _theadRef$current2;
|
|
63783
64807
|
var scrollEl = scrollRef.current;
|
|
63784
64808
|
if (!scrollEl) return;
|
|
63785
|
-
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$
|
|
64809
|
+
if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$current2 = theadRef.current) !== null && _theadRef$current2 !== void 0 && _theadRef$current2.parentElement)) return;
|
|
63786
64810
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
|
63787
64811
|
var scrollLeft = scrollEl.scrollLeft + e.deltaX;
|
|
63788
64812
|
if (scrollLeft === scrollEl.scrollLeft) {
|
|
@@ -63793,6 +64817,12 @@ var emptyRef = {
|
|
|
63793
64817
|
scrollEl.scrollLeft = left;
|
|
63794
64818
|
theadRef.current.parentElement.scrollLeft = left;
|
|
63795
64819
|
});
|
|
64820
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
64821
|
+
var _scrollRef$current8;
|
|
64822
|
+
if (!props.sticky || !scrollRef.current || !isScrollX) return;
|
|
64823
|
+
// sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
|
|
64824
|
+
syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
|
|
64825
|
+
}, [isScrollX, props.sticky, $empty]);
|
|
63796
64826
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63797
64827
|
// 绑定 wheel 事件
|
|
63798
64828
|
if (props.sticky && theadRef.current && theadRef.current.parentElement) {
|
|
@@ -63970,7 +65000,8 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
63970
65000
|
active = _useTabsContext.active,
|
|
63971
65001
|
lazy = _useTabsContext.lazy,
|
|
63972
65002
|
setTabs = _useTabsContext.setTabs,
|
|
63973
|
-
color = _useTabsContext.color
|
|
65003
|
+
color = _useTabsContext.color,
|
|
65004
|
+
shape = _useTabsContext.shape;
|
|
63974
65005
|
var isActive = active === id;
|
|
63975
65006
|
var keekAlive = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
63976
65007
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
@@ -63979,7 +65010,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
63979
65010
|
tab: tab,
|
|
63980
65011
|
disabled: props.disabled,
|
|
63981
65012
|
jssStyle: jssStyle,
|
|
63982
|
-
background: background,
|
|
65013
|
+
background: shape !== 'button' && shape !== 'fill' ? background : undefined,
|
|
63983
65014
|
color: props.color || (active === id ? color : undefined)
|
|
63984
65015
|
};
|
|
63985
65016
|
setTabs(function (prev) {
|
|
@@ -64008,7 +65039,7 @@ var TabsPanel = function TabsPanel(props) {
|
|
|
64008
65039
|
});
|
|
64009
65040
|
});
|
|
64010
65041
|
};
|
|
64011
|
-
}, [id, tab, color, active, props.disabled, props.jssStyle]);
|
|
65042
|
+
}, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
|
|
64012
65043
|
if (!isActive && lazy && !keekAlive.current) {
|
|
64013
65044
|
return null;
|
|
64014
65045
|
}
|
|
@@ -65606,6 +66637,7 @@ var TransferOperate = function TransferOperate(props) {
|
|
|
65606
66637
|
|
|
65607
66638
|
|
|
65608
66639
|
|
|
66640
|
+
|
|
65609
66641
|
var Transfer = function Transfer(props) {
|
|
65610
66642
|
var _jssStyle$transfer;
|
|
65611
66643
|
var jssStyle = props.jssStyle,
|
|
@@ -65680,7 +66712,7 @@ var Transfer = function Transfer(props) {
|
|
|
65680
66712
|
sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
|
|
65681
66713
|
targetSelectedKeys = _useTransfer.targetSelectedKeys,
|
|
65682
66714
|
onFilter = _useTransfer.onFilter,
|
|
65683
|
-
|
|
66715
|
+
_onSelectChange = _useTransfer.onSelectChange;
|
|
65684
66716
|
var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
|
|
65685
66717
|
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
66718
|
var renderOperations = function renderOperations() {
|
|
@@ -65754,7 +66786,15 @@ var Transfer = function Transfer(props) {
|
|
|
65754
66786
|
searchPlaceholder: placeholder,
|
|
65755
66787
|
renderFilter: renderFilter,
|
|
65756
66788
|
onFilter: onFilterProp ? onFilter : undefined,
|
|
65757
|
-
onSelectChange: onSelectChange
|
|
66789
|
+
onSelectChange: function onSelectChange(keys) {
|
|
66790
|
+
if (isSource) {
|
|
66791
|
+
var newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(targetSelectedKeys || []))));
|
|
66792
|
+
_onSelectChange(newAllKeys, keys, targetSelectedKeys);
|
|
66793
|
+
} else {
|
|
66794
|
+
var _newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(sourceSelectedKeys || []))));
|
|
66795
|
+
_onSelectChange(_newAllKeys, sourceSelectedKeys, keys);
|
|
66796
|
+
}
|
|
66797
|
+
}
|
|
65758
66798
|
});
|
|
65759
66799
|
};
|
|
65760
66800
|
var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
|
|
@@ -65814,7 +66854,8 @@ var tree_Tree = function Tree(props) {
|
|
|
65814
66854
|
return {
|
|
65815
66855
|
tree: treeStyle,
|
|
65816
66856
|
spin: spinStyle,
|
|
65817
|
-
checkbox: checkboxStyle
|
|
66857
|
+
checkbox: checkboxStyle,
|
|
66858
|
+
common: useCommonStyle
|
|
65818
66859
|
};
|
|
65819
66860
|
}, [treeStyle, spinStyle]);
|
|
65820
66861
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_tree, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -65959,6 +67000,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65959
67000
|
onChangeProp = props.onChange,
|
|
65960
67001
|
compressedBound = props.compressedBound,
|
|
65961
67002
|
compressedClassName = props.compressedClassName,
|
|
67003
|
+
renderCompressed = props.renderCompressed,
|
|
65962
67004
|
expandedProp = props.expanded,
|
|
65963
67005
|
defaultExpanded = props.defaultExpanded,
|
|
65964
67006
|
defaultExpandAll = props.defaultExpandAll,
|
|
@@ -65971,6 +67013,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65971
67013
|
onChangeAddition = props.onChangeAddition,
|
|
65972
67014
|
onEnterExpand = props.onEnterExpand,
|
|
65973
67015
|
onExpand = props.onExpand,
|
|
67016
|
+
beforeChange = props.beforeChange,
|
|
65974
67017
|
filterSameChange = props.filterSameChange;
|
|
65975
67018
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$treeSelect = jssStyle.treeSelect) === null || _jssStyle$treeSelect === void 0 ? void 0 : _jssStyle$treeSelect.call(jssStyle);
|
|
65976
67019
|
var rootStyle = Object.assign({
|
|
@@ -65997,7 +67040,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
65997
67040
|
defaultValue: defaultValue,
|
|
65998
67041
|
control: 'value' in props,
|
|
65999
67042
|
filterSameChange: filterSameChange,
|
|
66000
|
-
multiple: multiple
|
|
67043
|
+
multiple: multiple,
|
|
67044
|
+
beforeChange: beforeChange
|
|
66001
67045
|
}),
|
|
66002
67046
|
value = _useTreeSelect.value,
|
|
66003
67047
|
onChange = _useTreeSelect.onChange;
|
|
@@ -66028,7 +67072,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66028
67072
|
rawData = _useFilter.rawData,
|
|
66029
67073
|
onFilter = _useFilter.onFilter,
|
|
66030
67074
|
onClearCreatedData = _useFilter.onClearCreatedData,
|
|
66031
|
-
setInputText = _useFilter.setInputText
|
|
67075
|
+
setInputText = _useFilter.setInputText,
|
|
67076
|
+
FilterProvider = _useFilter.FilterProvider;
|
|
66032
67077
|
var controlExpanded = 'expanded' in props || expanded !== null && expanded !== void 0 && expanded.length ? expanded : undefined;
|
|
66033
67078
|
var renderMoreIcon = function renderMoreIcon() {
|
|
66034
67079
|
return icons_config.treeSelect.More;
|
|
@@ -66366,6 +67411,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66366
67411
|
disabled: disabled,
|
|
66367
67412
|
compressed: compressed,
|
|
66368
67413
|
compressedBound: compressedBound,
|
|
67414
|
+
renderCompressed: renderCompressed,
|
|
66369
67415
|
compressedClassName: compressedClassName,
|
|
66370
67416
|
multiple: multiple,
|
|
66371
67417
|
placeholder: placeholder,
|
|
@@ -66480,7 +67526,8 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66480
67526
|
parentClickExpand: parentClickExpand,
|
|
66481
67527
|
contentClass: getContentClass,
|
|
66482
67528
|
datum: datum,
|
|
66483
|
-
actionOnClick: props.actionOnClick
|
|
67529
|
+
actionOnClick: props.actionOnClick,
|
|
67530
|
+
size: size
|
|
66484
67531
|
}))
|
|
66485
67532
|
});
|
|
66486
67533
|
};
|
|
@@ -66499,38 +67546,44 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
66499
67546
|
}, []);
|
|
66500
67547
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
66501
67548
|
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
|
-
|
|
67549
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(FilterProvider, {
|
|
67550
|
+
value: {
|
|
67551
|
+
filterText: filterText,
|
|
67552
|
+
highlight: props.highlight
|
|
67553
|
+
},
|
|
67554
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
67555
|
+
id: fieldId,
|
|
67556
|
+
ref: targetRef,
|
|
67557
|
+
tabIndex: disabled === true || showInput ? undefined : 0
|
|
67558
|
+
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
|
|
67559
|
+
className: rootClass,
|
|
67560
|
+
style: rootStyle,
|
|
67561
|
+
onBlur: handleBlur,
|
|
67562
|
+
onFocus: handleFocus,
|
|
67563
|
+
onKeyDown: handleKeyDown,
|
|
67564
|
+
children: [tipNode, renderResult(), hadOpened && /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
67565
|
+
adjust: adjust,
|
|
67566
|
+
focus: open,
|
|
67567
|
+
fixedWidth: "min",
|
|
67568
|
+
lazy: false,
|
|
67569
|
+
absolute: props.absolute,
|
|
67570
|
+
zIndex: props.zIndex,
|
|
67571
|
+
position: position,
|
|
67572
|
+
popupGap: 4,
|
|
67573
|
+
popupElRef: popupRef,
|
|
67574
|
+
parentElRef: targetRef,
|
|
67575
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
|
|
67576
|
+
onRef: popupRef,
|
|
67577
|
+
show: open,
|
|
67578
|
+
className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerWrapper),
|
|
67579
|
+
display: 'block',
|
|
67580
|
+
type: "scale-y",
|
|
67581
|
+
duration: 'fast',
|
|
67582
|
+
children: renderList()
|
|
67583
|
+
})
|
|
67584
|
+
})]
|
|
67585
|
+
}))
|
|
67586
|
+
});
|
|
66534
67587
|
};
|
|
66535
67588
|
/* harmony default export */ var src_tree_select_tree_select = (TreeSelect);
|
|
66536
67589
|
;// CONCATENATED MODULE: ./src/tree-select/tree-select.tsx
|
|
@@ -66548,7 +67601,8 @@ var tree_select_jssStyle = {
|
|
|
66548
67601
|
checkbox: useCheckboxStyle,
|
|
66549
67602
|
popover: usePopoverStyle,
|
|
66550
67603
|
treeSelect: useTreeSelectStyle,
|
|
66551
|
-
innerTitle: useInnerTitleStyle
|
|
67604
|
+
innerTitle: useInnerTitleStyle,
|
|
67605
|
+
common: useCommonStyle
|
|
66552
67606
|
};
|
|
66553
67607
|
var TreeSelectComponent = function TreeSelectComponent(props) {
|
|
66554
67608
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_select_tree_select, objectSpread2_default()({
|
|
@@ -66657,6 +67711,7 @@ function attrAccept(file, acceptedFiles) {
|
|
|
66657
67711
|
|
|
66658
67712
|
|
|
66659
67713
|
|
|
67714
|
+
|
|
66660
67715
|
var VALIDATORITEMS = [{
|
|
66661
67716
|
key: 'size',
|
|
66662
67717
|
param: function param(blob) {
|
|
@@ -66690,11 +67745,12 @@ var promised = function promised(action) {
|
|
|
66690
67745
|
resolve(true);
|
|
66691
67746
|
});
|
|
66692
67747
|
};
|
|
67748
|
+
var defaultValue = [];
|
|
66693
67749
|
var useUpload = function useUpload(props) {
|
|
66694
67750
|
var _props$limit = props.limit,
|
|
66695
67751
|
limit = _props$limit === void 0 ? 100 : _props$limit,
|
|
66696
67752
|
_props$value = props.value,
|
|
66697
|
-
value = _props$value === void 0 ?
|
|
67753
|
+
value = _props$value === void 0 ? defaultValue : _props$value;
|
|
66698
67754
|
var accept = props.forceAccept || props.accept;
|
|
66699
67755
|
var forceAccept = !!props.forceAccept;
|
|
66700
67756
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
@@ -66814,21 +67870,22 @@ var useUpload = function useUpload(props) {
|
|
|
66814
67870
|
responseType: props.responseType,
|
|
66815
67871
|
onStart: props.onStart,
|
|
66816
67872
|
onProgress: function onProgress(e, msg) {
|
|
66817
|
-
|
|
67873
|
+
var percent = typeof e.percent === 'number' ? e.percent : e.loaded / e.total * 100;
|
|
67874
|
+
if (throttle && percent !== 100) return;
|
|
66818
67875
|
throttle = true;
|
|
66819
67876
|
setTimeout(function () {
|
|
66820
67877
|
throttle = false;
|
|
66821
67878
|
}, 16);
|
|
66822
|
-
|
|
66823
|
-
|
|
66824
|
-
|
|
66825
|
-
|
|
66826
|
-
|
|
66827
|
-
|
|
66828
|
-
|
|
66829
|
-
|
|
66830
|
-
|
|
66831
|
-
}
|
|
67879
|
+
setFiles(function (files) {
|
|
67880
|
+
return utils_immer_produce(files, function (draft) {
|
|
67881
|
+
if (!draft[id]) return draft;
|
|
67882
|
+
draft[id].process = percent;
|
|
67883
|
+
if (msg) draft[id].message = msg;
|
|
67884
|
+
if (typeof props.onProgress === 'function') {
|
|
67885
|
+
props.onProgress(draft[id]);
|
|
67886
|
+
}
|
|
67887
|
+
});
|
|
67888
|
+
});
|
|
66832
67889
|
},
|
|
66833
67890
|
onLoad: function onLoad(xhr) {
|
|
66834
67891
|
if (!/^2|1223/.test("".concat(xhr.status))) {
|
|
@@ -66856,11 +67913,17 @@ var useUpload = function useUpload(props) {
|
|
|
66856
67913
|
delete draft[id];
|
|
66857
67914
|
});
|
|
66858
67915
|
});
|
|
66859
|
-
|
|
66860
|
-
|
|
66861
|
-
|
|
66862
|
-
|
|
66863
|
-
|
|
67916
|
+
if (props.functionalOnChange) {
|
|
67917
|
+
// 回调型 setState不会丢值
|
|
67918
|
+
props.onChange(function (prev) {
|
|
67919
|
+
return [].concat(toConsumableArray_default()(prev || []), [result]);
|
|
67920
|
+
});
|
|
67921
|
+
} else {
|
|
67922
|
+
var latestValue = latestState.value;
|
|
67923
|
+
var newValue = toConsumableArray_default()(latestValue);
|
|
67924
|
+
newValue.push(result);
|
|
67925
|
+
props.onChange(newValue);
|
|
67926
|
+
}
|
|
66864
67927
|
}
|
|
66865
67928
|
},
|
|
66866
67929
|
onError: function onError(xhr) {
|
|
@@ -66978,48 +68041,60 @@ var useUpload = function useUpload(props) {
|
|
|
66978
68041
|
error = _context2.sent;
|
|
66979
68042
|
case 21:
|
|
66980
68043
|
if (!(error instanceof Error)) {
|
|
66981
|
-
_context2.next =
|
|
68044
|
+
_context2.next = 29;
|
|
66982
68045
|
break;
|
|
66983
68046
|
}
|
|
66984
68047
|
if (validatorHandle(error, blob)) {
|
|
66985
|
-
_context2.next =
|
|
68048
|
+
_context2.next = 25;
|
|
66986
68049
|
break;
|
|
66987
68050
|
}
|
|
66988
|
-
|
|
66989
|
-
|
|
68051
|
+
setFiles(function (prev) {
|
|
68052
|
+
return utils_immer_produce(prev, function (draft) {
|
|
68053
|
+
delete draft[id];
|
|
68054
|
+
});
|
|
68055
|
+
});
|
|
66990
68056
|
return _context2.abrupt("return", 0);
|
|
66991
|
-
case
|
|
68057
|
+
case 25:
|
|
66992
68058
|
fileRecord.message = error.message;
|
|
66993
68059
|
fileRecord.status = 3;
|
|
66994
|
-
setFiles(
|
|
68060
|
+
setFiles(function (prev) {
|
|
68061
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68062
|
+
});
|
|
66995
68063
|
return _context2.abrupt("return", 0);
|
|
66996
|
-
case
|
|
68064
|
+
case 29:
|
|
66997
68065
|
if (!props.beforeUpload) {
|
|
66998
|
-
_context2.next =
|
|
68066
|
+
_context2.next = 36;
|
|
66999
68067
|
break;
|
|
67000
68068
|
}
|
|
67001
68069
|
beforeUploadResult = props.beforeUpload(blob); // @ts-ignoreq
|
|
67002
68070
|
if (!(beforeUploadResult && beforeUploadResult.then)) {
|
|
67003
|
-
_context2.next =
|
|
68071
|
+
_context2.next = 34;
|
|
67004
68072
|
break;
|
|
67005
68073
|
}
|
|
67006
68074
|
props.beforeUpload(blob).then(function (args) {
|
|
67007
68075
|
if (args.status !== 'error') {
|
|
67008
68076
|
newFiles[id].xhr = uploadFile(id, blob, fileRecord.src);
|
|
67009
|
-
setFiles(
|
|
68077
|
+
setFiles(function (prev) {
|
|
68078
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68079
|
+
});
|
|
67010
68080
|
}
|
|
67011
68081
|
}).catch(function () {
|
|
67012
|
-
|
|
67013
|
-
|
|
68082
|
+
setFiles(function (prev) {
|
|
68083
|
+
return utils_immer_produce(prev, function (draft) {
|
|
68084
|
+
delete draft[id];
|
|
68085
|
+
});
|
|
68086
|
+
});
|
|
67014
68087
|
});
|
|
67015
68088
|
return _context2.abrupt("return", 0);
|
|
67016
|
-
case
|
|
67017
|
-
_context2.next =
|
|
68089
|
+
case 34:
|
|
68090
|
+
_context2.next = 38;
|
|
67018
68091
|
break;
|
|
67019
|
-
case
|
|
68092
|
+
case 36:
|
|
67020
68093
|
fileRecord.xhr = uploadFile(id, blob, fileRecord.src);
|
|
67021
|
-
setFiles(
|
|
67022
|
-
|
|
68094
|
+
setFiles(function (prev) {
|
|
68095
|
+
return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
|
|
68096
|
+
});
|
|
68097
|
+
case 38:
|
|
67023
68098
|
case "end":
|
|
67024
68099
|
return _context2.stop();
|
|
67025
68100
|
}
|
|
@@ -67123,23 +68198,53 @@ var useUpload = function useUpload(props) {
|
|
|
67123
68198
|
|
|
67124
68199
|
|
|
67125
68200
|
|
|
68201
|
+
|
|
68202
|
+
|
|
67126
68203
|
var useDrop = function useDrop(props) {
|
|
67127
68204
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
67128
68205
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
67129
68206
|
isoOver = _useState2[0],
|
|
67130
68207
|
setOver = _useState2[1];
|
|
67131
|
-
var handleFileDrop = function
|
|
67132
|
-
var
|
|
67133
|
-
|
|
67134
|
-
|
|
67135
|
-
|
|
67136
|
-
|
|
67137
|
-
|
|
67138
|
-
|
|
67139
|
-
|
|
67140
|
-
|
|
67141
|
-
|
|
67142
|
-
|
|
68208
|
+
var handleFileDrop = /*#__PURE__*/function () {
|
|
68209
|
+
var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
|
|
68210
|
+
var accept, multiple, beforeDrop, onDrop, dropData, files, filter;
|
|
68211
|
+
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
68212
|
+
while (1) switch (_context.prev = _context.next) {
|
|
68213
|
+
case 0:
|
|
68214
|
+
accept = props.accept, multiple = props.multiple, beforeDrop = props.beforeDrop, onDrop = props.onDrop, dropData = props.dropData;
|
|
68215
|
+
if (!(beforeDrop && isFunc(beforeDrop))) {
|
|
68216
|
+
_context.next = 7;
|
|
68217
|
+
break;
|
|
68218
|
+
}
|
|
68219
|
+
_context.next = 4;
|
|
68220
|
+
return beforeDrop(e);
|
|
68221
|
+
case 4:
|
|
68222
|
+
files = _context.sent;
|
|
68223
|
+
_context.next = 8;
|
|
68224
|
+
break;
|
|
68225
|
+
case 7:
|
|
68226
|
+
files = e.dataTransfer.files;
|
|
68227
|
+
case 8:
|
|
68228
|
+
filter = accept ? Array.prototype.filter.call(files, function (f) {
|
|
68229
|
+
return attrAccept(f, accept);
|
|
68230
|
+
}) : Array.from(files);
|
|
68231
|
+
if (!(!filter || filter.length === 0)) {
|
|
68232
|
+
_context.next = 11;
|
|
68233
|
+
break;
|
|
68234
|
+
}
|
|
68235
|
+
return _context.abrupt("return");
|
|
68236
|
+
case 11:
|
|
68237
|
+
if (onDrop) onDrop(multiple ? filter : [filter[0]], dropData);
|
|
68238
|
+
case 12:
|
|
68239
|
+
case "end":
|
|
68240
|
+
return _context.stop();
|
|
68241
|
+
}
|
|
68242
|
+
}, _callee);
|
|
68243
|
+
}));
|
|
68244
|
+
return function handleFileDrop(_x) {
|
|
68245
|
+
return _ref.apply(this, arguments);
|
|
68246
|
+
};
|
|
68247
|
+
}();
|
|
67143
68248
|
var handleDrag = function handleDrag(e) {
|
|
67144
68249
|
var disabled = props.disabled;
|
|
67145
68250
|
if (disabled) return;
|
|
@@ -67417,7 +68522,8 @@ var Upload = function Upload(props0) {
|
|
|
67417
68522
|
invalidImage: getLocale(locale, 'invalidImage')
|
|
67418
68523
|
},
|
|
67419
68524
|
value: value,
|
|
67420
|
-
onChange: onChange
|
|
68525
|
+
onChange: onChange,
|
|
68526
|
+
functionalOnChange: props.functionalOnChange
|
|
67421
68527
|
})),
|
|
67422
68528
|
func = _useUpload.func,
|
|
67423
68529
|
files = _useUpload.files,
|
|
@@ -67463,6 +68569,7 @@ var Upload = function Upload(props0) {
|
|
|
67463
68569
|
accept: accept,
|
|
67464
68570
|
disabled: props.disabled,
|
|
67465
68571
|
onDrop: func.addFiles,
|
|
68572
|
+
beforeDrop: props.beforeDrop,
|
|
67466
68573
|
multiple: !!props.multiple || limit > 1,
|
|
67467
68574
|
className: classnames_default()(uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.dropItem),
|
|
67468
68575
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", objectSpread2_default()(objectSpread2_default()({
|
|
@@ -70009,6 +71116,8 @@ var rate_interface = __webpack_require__(4188);
|
|
|
70009
71116
|
var rule_interface = __webpack_require__(1645);
|
|
70010
71117
|
// EXTERNAL MODULE: ./src/select/interface.ts
|
|
70011
71118
|
var select_interface = __webpack_require__(7640);
|
|
71119
|
+
// EXTERNAL MODULE: ./src/skeleton/interface.ts
|
|
71120
|
+
var skeleton_interface = __webpack_require__(6599);
|
|
70012
71121
|
// EXTERNAL MODULE: ./src/slider/interface.ts
|
|
70013
71122
|
var slider_interface = __webpack_require__(5864);
|
|
70014
71123
|
// EXTERNAL MODULE: ./src/spin/interface.ts
|
|
@@ -70135,6 +71244,8 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70135
71244
|
|
|
70136
71245
|
|
|
70137
71246
|
|
|
71247
|
+
|
|
71248
|
+
|
|
70138
71249
|
|
|
70139
71250
|
|
|
70140
71251
|
|
|
@@ -70198,10 +71309,11 @@ var upload_interface = __webpack_require__(8821);
|
|
|
70198
71309
|
|
|
70199
71310
|
|
|
70200
71311
|
|
|
71312
|
+
|
|
70201
71313
|
|
|
70202
71314
|
|
|
70203
71315
|
/* harmony default export */ var src_0 = ({
|
|
70204
|
-
version: '3.7.0
|
|
71316
|
+
version: '3.7.0'
|
|
70205
71317
|
});
|
|
70206
71318
|
}();
|
|
70207
71319
|
/******/ return __webpack_exports__;
|