shineout 3.8.0-beta.2 → 3.8.0-beta.21
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/README-zh_CN.md +1 -1
- package/README.md +1 -1
- package/cjs/breadcrumb/breadcrumb.js +2 -1
- package/cjs/date-picker/date-picker.js +2 -2
- package/cjs/form/form.type.d.ts +22 -5
- package/cjs/form/interface.d.ts +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +5 -5
- package/cjs/rate/rate.js +4 -4
- package/cjs/select/select.d.ts +3 -3
- package/cjs/select/select.js +4 -4
- package/cjs/transfer/transfer.js +2 -1
- package/dist/shineout.js +1985 -777
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/breadcrumb/breadcrumb.js +3 -2
- package/esm/date-picker/date-picker.js +4 -4
- package/esm/form/form.type.d.ts +22 -5
- package/esm/form/interface.d.ts +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -3
- package/esm/rate/rate.js +4 -4
- package/esm/select/select.d.ts +3 -3
- package/esm/select/select.js +4 -4
- package/esm/transfer/transfer.js +3 -2
- package/package.json +10 -10
package/dist/shineout.js
CHANGED
|
@@ -6487,7 +6487,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6487
6487
|
setToken: function() { return /* reexport */ token_setter; },
|
|
6488
6488
|
style: function() { return /* reexport */ deprecated_style; },
|
|
6489
6489
|
useToken: function() { return /* reexport */ use_token; },
|
|
6490
|
-
|
|
6490
|
+
utils: function() { return /* reexport */ src_utils_namespaceObject; }
|
|
6491
6491
|
});
|
|
6492
6492
|
|
|
6493
6493
|
// NAMESPACE OBJECT: ./src/utils/func.ts
|
|
@@ -7389,7 +7389,7 @@ var Alert = function Alert(props) {
|
|
|
7389
7389
|
if (dismiss === HIDE) {
|
|
7390
7390
|
return null;
|
|
7391
7391
|
}
|
|
7392
|
-
if (
|
|
7392
|
+
if (title) {
|
|
7393
7393
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
7394
7394
|
className: rootClass
|
|
7395
7395
|
}, getRootProps()), {}, {
|
|
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12234
12234
|
};
|
|
12235
12235
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12236
12236
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12237
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12237
|
+
/* harmony default export */ var version = ('3.8.0-beta.21');
|
|
12238
12238
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12239
12239
|
|
|
12240
12240
|
|
|
@@ -14352,19 +14352,26 @@ var selectTokens = {
|
|
|
14352
14352
|
selectIconMarginLeft: 'Spacing-8',
|
|
14353
14353
|
selectTagMarginY: 'Spacing-2',
|
|
14354
14354
|
selectTagMarginRight: 'Spacing-4',
|
|
14355
|
+
selectTagHeight: 'Line-height-dynamic',
|
|
14356
|
+
selectTagLineHeight: 'Line-height-dynamic',
|
|
14355
14357
|
selectSmallFontSize: 'Font-12',
|
|
14356
14358
|
selectSmallPaddingX: 'Spacing-8',
|
|
14357
14359
|
selectSmallPaddingY: 'Spacing-1',
|
|
14358
14360
|
selectSmallOptionInnerPaddingX: 'Spacing-8',
|
|
14359
14361
|
selectSmallOptionInnerPaddingY: 'Spacing-2',
|
|
14362
|
+
selectSmallTagHeight: 'Size-9',
|
|
14363
|
+
selectSmallTagLineHeight: 'Size-8',
|
|
14360
14364
|
selectLargeFontSize: 'Font-16',
|
|
14361
14365
|
selectLargePaddingX: 'Spacing-12',
|
|
14362
14366
|
selectLargePaddingY: 'Spacing-3',
|
|
14363
14367
|
selectLargeOptionInnerPaddingX: 'Spacing-12',
|
|
14364
14368
|
selectLargeOptionInnerPaddingY: 'Spacing-8',
|
|
14365
14369
|
selectLargePlaceholderMarginY: 'Spacing-4',
|
|
14370
|
+
selectLargeTagHeight: 'Line-height-dynamic',
|
|
14371
|
+
selectLargeTagLineHeight: 'Line-height-dynamic',
|
|
14366
14372
|
selectInnerPaddingX: 'Spacing-8',
|
|
14367
14373
|
selectInnerPaddingY: 'Spacing-5',
|
|
14374
|
+
selectInnerTitleMarginY: 'Spacing-2',
|
|
14368
14375
|
selectPlaceholderColor: 'Neutral-text-2',
|
|
14369
14376
|
selectPlaceholderMarginY: 'Spacing-2',
|
|
14370
14377
|
selectBackgroundColor: 'Neutral-fill-1',
|
|
@@ -15903,6 +15910,9 @@ var breadcrumbStyle = {
|
|
|
15903
15910
|
}
|
|
15904
15911
|
}
|
|
15905
15912
|
},
|
|
15913
|
+
wrapperPopover: {
|
|
15914
|
+
flexWrap: 'wrap'
|
|
15915
|
+
},
|
|
15906
15916
|
content: {
|
|
15907
15917
|
'&&': {
|
|
15908
15918
|
display: 'flex',
|
|
@@ -15912,10 +15922,23 @@ var breadcrumbStyle = {
|
|
|
15912
15922
|
color: src.breadcrumbDefaultLinkActiveColor
|
|
15913
15923
|
}
|
|
15914
15924
|
},
|
|
15925
|
+
contentMaxWidth: {
|
|
15926
|
+
maxWidth: '150px',
|
|
15927
|
+
overflow: 'hidden',
|
|
15928
|
+
textOverflow: 'ellipsis',
|
|
15929
|
+
whiteSpace: 'nowrap',
|
|
15930
|
+
'&&': {
|
|
15931
|
+
display: 'block'
|
|
15932
|
+
}
|
|
15933
|
+
},
|
|
15915
15934
|
ellipsis: {
|
|
15916
15935
|
color: src.breadcrumbLinkColor,
|
|
15917
15936
|
position: 'relative',
|
|
15918
|
-
top: '-
|
|
15937
|
+
top: '-0.25em',
|
|
15938
|
+
cursor: 'pointer',
|
|
15939
|
+
'&:hover': {
|
|
15940
|
+
color: src.breadcrumbLinkHoverColor
|
|
15941
|
+
}
|
|
15919
15942
|
},
|
|
15920
15943
|
itemWrapper: {
|
|
15921
15944
|
// padding: `0 ${token.breadcrumbListItemWrapperPaddingX}`,
|
|
@@ -16712,7 +16735,7 @@ var useCardGroupStyle = styled(card_group_card_group, 'cardGroup');
|
|
|
16712
16735
|
/* harmony default export */ var shineout_style_src_card_group = ((/* unused pure expression or super */ null && (useCardGroupStyle)));
|
|
16713
16736
|
;// CONCATENATED MODULE: ../shineout-style/src/common/common.ts
|
|
16714
16737
|
|
|
16715
|
-
var
|
|
16738
|
+
var commonStyle = {
|
|
16716
16739
|
highlight: {
|
|
16717
16740
|
color: src.tagWarningFontColor
|
|
16718
16741
|
}
|
|
@@ -16807,9 +16830,17 @@ var animations = {
|
|
|
16807
16830
|
opacity: 1,
|
|
16808
16831
|
transform: 'translateY(-100%) scaleY(1)'
|
|
16809
16832
|
}
|
|
16833
|
+
},
|
|
16834
|
+
'@keyframes bounce-in-center': {
|
|
16835
|
+
'0%': {
|
|
16836
|
+
transform: 'translate(-50%, -50%) scale(0)'
|
|
16837
|
+
},
|
|
16838
|
+
'100%': {
|
|
16839
|
+
transform: 'translate(-50%, -50%) scale(1)'
|
|
16840
|
+
}
|
|
16810
16841
|
}
|
|
16811
16842
|
};
|
|
16812
|
-
/* harmony default export */ var src_common_common = (
|
|
16843
|
+
/* harmony default export */ var src_common_common = (commonStyle);
|
|
16813
16844
|
;// CONCATENATED MODULE: ../shineout-style/src/carousel/carousel.ts
|
|
16814
16845
|
|
|
16815
16846
|
|
|
@@ -17253,6 +17284,7 @@ var useCarouselStyle = styled(carousel_carousel, 'carousel');
|
|
|
17253
17284
|
|
|
17254
17285
|
|
|
17255
17286
|
|
|
17287
|
+
|
|
17256
17288
|
var inputBorderToken = {
|
|
17257
17289
|
lineHeight: src.lineHeightDynamic,
|
|
17258
17290
|
borderRadius: src.inputBorderRadius,
|
|
@@ -17296,6 +17328,12 @@ var inputBorder = input_border('wrapper', inputBorderToken);
|
|
|
17296
17328
|
var wrapper = inputBorder.wrapper,
|
|
17297
17329
|
wrapperDisabled = inputBorder.wrapperDisabled,
|
|
17298
17330
|
resetWrapper = objectWithoutProperties_default()(inputBorder, ["wrapper", "wrapperDisabled"]);
|
|
17331
|
+
var selectTagHeightCssvar = "--select-tag-height";
|
|
17332
|
+
var selectSmallTagHeightCssvar = "--select-small-tag-height";
|
|
17333
|
+
var selectLargeTagHeightCssvar = "--select-large-tag-height";
|
|
17334
|
+
var selectTagHeight = "var(".concat(selectTagHeightCssvar, ")");
|
|
17335
|
+
var selectSmallTagHeight = "var(".concat(selectSmallTagHeightCssvar, ")");
|
|
17336
|
+
var selectLargeTagHeight = "var(".concat(selectLargeTagHeightCssvar, ")");
|
|
17299
17337
|
var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
|
|
17300
17338
|
rootClass: {},
|
|
17301
17339
|
wrapperEmpty: {},
|
|
@@ -17305,95 +17343,100 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17305
17343
|
width: '100%',
|
|
17306
17344
|
outline: 'none',
|
|
17307
17345
|
cursor: 'pointer'
|
|
17308
|
-
}, wrapper), {}, {
|
|
17309
|
-
'
|
|
17310
|
-
|
|
17311
|
-
|
|
17312
|
-
|
|
17313
|
-
|
|
17314
|
-
|
|
17315
|
-
|
|
17316
|
-
|
|
17317
|
-
|
|
17318
|
-
|
|
17319
|
-
|
|
17320
|
-
|
|
17321
|
-
|
|
17322
|
-
}
|
|
17323
|
-
},
|
|
17324
|
-
'&$wrapperSmall $tag': {
|
|
17325
|
-
height: 18,
|
|
17326
|
-
marginBottom: 2,
|
|
17327
|
-
'&$tag *': {
|
|
17328
|
-
lineHeight: '18px'
|
|
17329
|
-
}
|
|
17346
|
+
}, wrapper), {}, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, selectTagHeightCssvar, src.selectTagHeight), selectSmallTagHeightCssvar, src.selectSmallTagHeight), selectLargeTagHeightCssvar, src.selectLargeTagHeight), '&$wrapperInnerTitle', {
|
|
17347
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
17348
|
+
marginTop: 0,
|
|
17349
|
+
marginBottom: 0
|
|
17350
|
+
},
|
|
17351
|
+
'& $tag': {
|
|
17352
|
+
marginTop: 0,
|
|
17353
|
+
marginBottom: src.selectInnerTitleMarginY,
|
|
17354
|
+
paddingTop: 0,
|
|
17355
|
+
paddingBottom: 0,
|
|
17356
|
+
height: selectTagHeight,
|
|
17357
|
+
border: 'none',
|
|
17358
|
+
'& *': {
|
|
17359
|
+
lineHeight: selectTagHeight
|
|
17330
17360
|
}
|
|
17331
17361
|
},
|
|
17332
|
-
'&$wrapperSmall': {
|
|
17333
|
-
|
|
17334
|
-
|
|
17335
|
-
|
|
17336
|
-
|
|
17337
|
-
marginBottom: 1
|
|
17338
|
-
},
|
|
17339
|
-
'& $placeholder,$ellipsis,$space,input': {
|
|
17340
|
-
marginTop: 0,
|
|
17341
|
-
marginBottom: 0
|
|
17342
|
-
},
|
|
17343
|
-
'& $optionInner': {
|
|
17344
|
-
paddingTop: src.cascaderSmallOptionInnerPaddingY,
|
|
17345
|
-
paddingBottom: src.cascaderSmallOptionInnerPaddingY,
|
|
17346
|
-
paddingLeft: src.cascaderSmallOptionInnerPaddingX,
|
|
17347
|
-
// padding: `${token.cascaderSmallOptionInnerPaddingY} ${token.cascaderSmallOptionInnerPaddingX}`,
|
|
17348
|
-
fontSize: src.cascaderSmallFontSize
|
|
17349
|
-
},
|
|
17350
|
-
'& $clearIcon': {
|
|
17351
|
-
right: src.cascaderSmallPaddingX
|
|
17362
|
+
'&$wrapperSmall $tag': {
|
|
17363
|
+
height: selectSmallTagHeight,
|
|
17364
|
+
marginBottom: 2,
|
|
17365
|
+
'&$tag *': {
|
|
17366
|
+
lineHeight: selectSmallTagHeight
|
|
17352
17367
|
}
|
|
17353
17368
|
},
|
|
17354
|
-
'&$wrapperLarge': {
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
'& $arrowIcon': {
|
|
17360
|
-
width: src.cascaderLargeFontSize
|
|
17361
|
-
},
|
|
17362
|
-
'& $optionInner': {
|
|
17363
|
-
// padding: `${token.cascaderLargeOptionInnerPaddingY} ${token.cascaderLargeOptionInnerPaddingX}`,
|
|
17364
|
-
paddingTop: src.cascaderLargeOptionInnerPaddingY,
|
|
17365
|
-
paddingBottom: src.cascaderLargeOptionInnerPaddingY,
|
|
17366
|
-
paddingLeft: src.cascaderLargeOptionInnerPaddingX,
|
|
17367
|
-
fontSize: src.cascaderLargeFontSize
|
|
17368
|
-
},
|
|
17369
|
-
'& $clearIcon': {
|
|
17370
|
-
right: src.cascaderLargePaddingX
|
|
17369
|
+
'&$wrapperLarge $tag': {
|
|
17370
|
+
height: selectLargeTagHeight,
|
|
17371
|
+
marginBottom: 2,
|
|
17372
|
+
'&$tag *': {
|
|
17373
|
+
lineHeight: selectLargeTagHeight
|
|
17371
17374
|
}
|
|
17375
|
+
}
|
|
17376
|
+
}), '&$wrapperSmall', {
|
|
17377
|
+
'& $tag': {
|
|
17378
|
+
height: selectSmallTagHeight,
|
|
17379
|
+
lineHeight: '16px',
|
|
17380
|
+
marginTop: 1,
|
|
17381
|
+
marginBottom: 1
|
|
17372
17382
|
},
|
|
17373
|
-
|
|
17374
|
-
|
|
17375
|
-
|
|
17376
|
-
|
|
17377
|
-
|
|
17378
|
-
|
|
17379
|
-
|
|
17380
|
-
|
|
17381
|
-
|
|
17382
|
-
|
|
17383
|
-
|
|
17384
|
-
|
|
17383
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
17384
|
+
marginTop: 0,
|
|
17385
|
+
marginBottom: 0
|
|
17386
|
+
},
|
|
17387
|
+
'& $optionInner': {
|
|
17388
|
+
paddingTop: src.cascaderSmallOptionInnerPaddingY,
|
|
17389
|
+
paddingBottom: src.cascaderSmallOptionInnerPaddingY,
|
|
17390
|
+
paddingLeft: src.cascaderSmallOptionInnerPaddingX,
|
|
17391
|
+
// padding: `${token.cascaderSmallOptionInnerPaddingY} ${token.cascaderSmallOptionInnerPaddingX}`,
|
|
17392
|
+
fontSize: src.cascaderSmallFontSize
|
|
17393
|
+
},
|
|
17394
|
+
'& $clearIcon': {
|
|
17395
|
+
right: src.cascaderSmallPaddingX
|
|
17396
|
+
}
|
|
17397
|
+
}), '&$wrapperLarge', {
|
|
17398
|
+
'& $tag': {
|
|
17399
|
+
height: selectLargeTagHeight,
|
|
17400
|
+
'& *': {
|
|
17401
|
+
lineHeight: selectLargeTagHeight
|
|
17385
17402
|
}
|
|
17386
|
-
}),
|
|
17387
|
-
'&:has($pickerWrapperShow)': {
|
|
17388
|
-
borderColor: src.cascaderFocusBorderColor
|
|
17389
17403
|
},
|
|
17390
|
-
|
|
17391
|
-
|
|
17392
|
-
|
|
17404
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
17405
|
+
marginTop: src.cascaderLargePlaceholderMarginY,
|
|
17406
|
+
marginBottom: src.cascaderLargePlaceholderMarginY
|
|
17407
|
+
},
|
|
17408
|
+
'& $arrowIcon': {
|
|
17409
|
+
width: src.cascaderLargeFontSize
|
|
17410
|
+
},
|
|
17411
|
+
'& $optionInner': {
|
|
17412
|
+
// padding: `${token.cascaderLargeOptionInnerPaddingY} ${token.cascaderLargeOptionInnerPaddingX}`,
|
|
17413
|
+
paddingTop: src.cascaderLargeOptionInnerPaddingY,
|
|
17414
|
+
paddingBottom: src.cascaderLargeOptionInnerPaddingY,
|
|
17415
|
+
paddingLeft: src.cascaderLargeOptionInnerPaddingX,
|
|
17416
|
+
fontSize: src.cascaderLargeFontSize
|
|
17417
|
+
},
|
|
17418
|
+
'& $clearIcon': {
|
|
17419
|
+
right: src.cascaderLargePaddingX
|
|
17420
|
+
}
|
|
17421
|
+
}), '&:hover', objectSpread2_default()(objectSpread2_default()({}, wrapper['&:hover']), {}, {
|
|
17422
|
+
'& $clearIcon': {
|
|
17423
|
+
display: 'inline-block'
|
|
17424
|
+
},
|
|
17425
|
+
'&$clearable:not($wrapperEmpty)': {
|
|
17426
|
+
'& :not($compressedIcon)$arrowIcon': {
|
|
17427
|
+
display: 'none'
|
|
17428
|
+
},
|
|
17429
|
+
'& $compressedIcon': {
|
|
17393
17430
|
display: 'none'
|
|
17394
17431
|
}
|
|
17395
17432
|
}
|
|
17396
|
-
}),
|
|
17433
|
+
})), '&:has($pickerWrapperShow)', {
|
|
17434
|
+
borderColor: src.cascaderFocusBorderColor
|
|
17435
|
+
}), '&:not($wrapperFocus)', {
|
|
17436
|
+
'& $clearIcon': {
|
|
17437
|
+
display: 'none'
|
|
17438
|
+
}
|
|
17439
|
+
})),
|
|
17397
17440
|
virtual: {
|
|
17398
17441
|
'& $filterList': {
|
|
17399
17442
|
overflow: 'hidden'
|
|
@@ -17526,6 +17569,9 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17526
17569
|
},
|
|
17527
17570
|
compressedWrapper: {
|
|
17528
17571
|
width: 0,
|
|
17572
|
+
overflow: 'hidden'
|
|
17573
|
+
},
|
|
17574
|
+
compressedBoundWrapper: {
|
|
17529
17575
|
overflow: 'auto'
|
|
17530
17576
|
},
|
|
17531
17577
|
controlMouse: {
|
|
@@ -17815,7 +17861,9 @@ var useCascaderStyle = styled(cascader_cascader, 'cascader');
|
|
|
17815
17861
|
/* harmony default export */ var shineout_style_src_cascader = ((/* unused pure expression or super */ null && (useCascaderStyle)));
|
|
17816
17862
|
;// CONCATENATED MODULE: ../shineout-style/src/checkbox/checkbox.ts
|
|
17817
17863
|
|
|
17818
|
-
|
|
17864
|
+
|
|
17865
|
+
|
|
17866
|
+
var checkboxStyle = objectSpread2_default()(objectSpread2_default()({}, animations), {}, {
|
|
17819
17867
|
rootClass: {},
|
|
17820
17868
|
wrapper: {
|
|
17821
17869
|
display: 'inline-flex',
|
|
@@ -17904,7 +17952,8 @@ var checkboxStyle = {
|
|
|
17904
17952
|
width: '80%',
|
|
17905
17953
|
top: '50%',
|
|
17906
17954
|
left: '50%',
|
|
17907
|
-
transform: '
|
|
17955
|
+
transform: 'translate(-50%, -50%)',
|
|
17956
|
+
animation: '$bounce-in-center 0.2s cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
17908
17957
|
},
|
|
17909
17958
|
'$wrapperChecked &, $wrapperIndeterminate &': {
|
|
17910
17959
|
borderColor: src.checkboxIconCheckedBorderColor,
|
|
@@ -17954,7 +18003,7 @@ var checkboxStyle = {
|
|
|
17954
18003
|
marginRight: 0
|
|
17955
18004
|
}
|
|
17956
18005
|
}
|
|
17957
|
-
};
|
|
18006
|
+
});
|
|
17958
18007
|
/* harmony default export */ var src_checkbox_checkbox = (checkboxStyle);
|
|
17959
18008
|
;// CONCATENATED MODULE: ../shineout-style/src/checkbox/index.ts
|
|
17960
18009
|
|
|
@@ -17964,7 +18013,7 @@ var useCheckboxStyle = styled(src_checkbox_checkbox, 'checkbox');
|
|
|
17964
18013
|
/* harmony default export */ var shineout_style_src_checkbox = ((/* unused pure expression or super */ null && (useCheckboxStyle)));
|
|
17965
18014
|
;// CONCATENATED MODULE: ../shineout-style/src/collapse/collapse.ts
|
|
17966
18015
|
|
|
17967
|
-
var
|
|
18016
|
+
var collapseStyle = {
|
|
17968
18017
|
rootClass: {},
|
|
17969
18018
|
wrapper: {
|
|
17970
18019
|
overflow: 'hidden',
|
|
@@ -17976,7 +18025,7 @@ var collapse_collapseStyle = {
|
|
|
17976
18025
|
border: 'none'
|
|
17977
18026
|
}
|
|
17978
18027
|
};
|
|
17979
|
-
/* harmony default export */ var collapse_collapse = (
|
|
18028
|
+
/* harmony default export */ var collapse_collapse = (collapseStyle);
|
|
17980
18029
|
;// CONCATENATED MODULE: ../shineout-style/src/collapse/collapse-item.ts
|
|
17981
18030
|
|
|
17982
18031
|
var collapseItemStyle = {
|
|
@@ -19606,6 +19655,11 @@ var formItemStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
19606
19655
|
top: '2px'
|
|
19607
19656
|
}
|
|
19608
19657
|
},
|
|
19658
|
+
wrapperHideRequired: {
|
|
19659
|
+
'& $label::before': {
|
|
19660
|
+
display: 'none'
|
|
19661
|
+
}
|
|
19662
|
+
},
|
|
19609
19663
|
wrapperKeepHeight: {
|
|
19610
19664
|
marginBottom: src.formItemTipMinHeight,
|
|
19611
19665
|
'&$wrapperTip': {
|
|
@@ -20524,6 +20578,17 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20524
20578
|
fontSize: 'inherit'
|
|
20525
20579
|
}
|
|
20526
20580
|
},
|
|
20581
|
+
wrapperShowClear: {
|
|
20582
|
+
'& $clearWrapper': {
|
|
20583
|
+
display: 'flex',
|
|
20584
|
+
opacity: 0
|
|
20585
|
+
}
|
|
20586
|
+
},
|
|
20587
|
+
wrapperHasValue: {
|
|
20588
|
+
'& $clearWrapper': {
|
|
20589
|
+
opacity: 1
|
|
20590
|
+
}
|
|
20591
|
+
},
|
|
20527
20592
|
clearWrapper: {
|
|
20528
20593
|
position: 'relative',
|
|
20529
20594
|
flexBasis: "calc(".concat(src.inputIconSize, " + 8px)"),
|
|
@@ -20641,54 +20706,10 @@ var input_input = objectSpread2_default()(objectSpread2_default()(objectSpread2_
|
|
|
20641
20706
|
'&:hover svg': {
|
|
20642
20707
|
color: src.inputHoverToggleColor
|
|
20643
20708
|
}
|
|
20644
|
-
// marginRight: token.inputPaddingX,
|
|
20645
20709
|
},
|
|
20646
20710
|
info: {
|
|
20647
|
-
position: 'absolute',
|
|
20648
|
-
'&[dir=ltr]': {
|
|
20649
|
-
right: '0'
|
|
20650
|
-
},
|
|
20651
|
-
'&[dir=rtl]': {
|
|
20652
|
-
left: '0'
|
|
20653
|
-
},
|
|
20654
|
-
top: '100%',
|
|
20655
|
-
zIndex: 1000,
|
|
20656
|
-
transformOrigin: '100% 0',
|
|
20657
|
-
marginTop: '10px',
|
|
20658
|
-
animation: 'so-input-fade .16s ease-in',
|
|
20659
|
-
maxWidth: '400px',
|
|
20660
|
-
padding: '5px 8px',
|
|
20661
20711
|
background: src.inputInfoBackgroundColor,
|
|
20662
|
-
|
|
20663
|
-
boxShadow: "0 0 0 1px ".concat(src.inputBorderColor),
|
|
20664
|
-
fontSize: '12px',
|
|
20665
|
-
color: src.inputInfoFontColor,
|
|
20666
|
-
'&::before': {
|
|
20667
|
-
display: 'block',
|
|
20668
|
-
position: 'absolute',
|
|
20669
|
-
bottom: '100%',
|
|
20670
|
-
transform: 'rotate(45deg) translateY(3px)',
|
|
20671
|
-
width: '6px',
|
|
20672
|
-
height: '6px',
|
|
20673
|
-
borderTop: "1px solid ".concat(src.inputBorderColor),
|
|
20674
|
-
borderLeft: "1px solid ".concat(src.inputBorderColor),
|
|
20675
|
-
background: 'inherit',
|
|
20676
|
-
content: "' '"
|
|
20677
|
-
},
|
|
20678
|
-
'&[dir=ltr]::before': {
|
|
20679
|
-
right: '4px'
|
|
20680
|
-
},
|
|
20681
|
-
'&[dir=rtl]::before': {
|
|
20682
|
-
left: '8px'
|
|
20683
|
-
}
|
|
20684
|
-
},
|
|
20685
|
-
infoError: {
|
|
20686
|
-
boxShadow: "0 0 0 1px ".concat(src.inputInfoErrorBorderColor),
|
|
20687
|
-
color: src.inputInfoErrorFontColor,
|
|
20688
|
-
background: src.inputInfoErrorBackgroundColor,
|
|
20689
|
-
'&::before': {
|
|
20690
|
-
borderColor: src.inputInfoErrorBorderColor
|
|
20691
|
-
}
|
|
20712
|
+
color: src.inputInfoFontColor
|
|
20692
20713
|
}
|
|
20693
20714
|
});
|
|
20694
20715
|
/* harmony default export */ var src_input_input = (input_input);
|
|
@@ -22183,7 +22204,9 @@ var setToken = function setToken(options) {
|
|
|
22183
22204
|
attributes = _ref.attributes,
|
|
22184
22205
|
onlyExtra = _ref.onlyExtra,
|
|
22185
22206
|
update = _ref.update,
|
|
22186
|
-
customExtraToken = _ref.extraToken
|
|
22207
|
+
customExtraToken = _ref.extraToken,
|
|
22208
|
+
_ref$ignoreExtra = _ref.ignoreExtra,
|
|
22209
|
+
ignoreExtra = _ref$ignoreExtra === void 0 ? false : _ref$ignoreExtra;
|
|
22187
22210
|
var _getConfig = getConfig(),
|
|
22188
22211
|
prefix = _getConfig.prefix;
|
|
22189
22212
|
if (typeof window === 'undefined') return;
|
|
@@ -22222,7 +22245,7 @@ var setToken = function setToken(options) {
|
|
|
22222
22245
|
tag.setAttribute('data-token', tokenName || '');
|
|
22223
22246
|
tag.setAttribute('data-token-id', id);
|
|
22224
22247
|
tag.setAttribute('data-token-selector', selector);
|
|
22225
|
-
tag.innerHTML = "".concat(selector, " {").concat(tokens.concat(extraToken).join(';'), "}");
|
|
22248
|
+
tag.innerHTML = ignoreExtra ? "".concat(selector, " {").concat(tokens.join(';'), "}") : "".concat(selector, " {").concat(tokens.concat(extraToken).join(';'), "}");
|
|
22226
22249
|
if (!target) {
|
|
22227
22250
|
document.head.appendChild(tag);
|
|
22228
22251
|
return;
|
|
@@ -22249,6 +22272,7 @@ var setToken = function setToken(options) {
|
|
|
22249
22272
|
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
|
22250
22273
|
// 6. Change the default tap highlight to be completely transparent in iOS.
|
|
22251
22274
|
|
|
22275
|
+
|
|
22252
22276
|
var normalize_token = {
|
|
22253
22277
|
fontFamily: 'var(--common-body-font-family, PingFang SC, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Helvetica, Hiragino KaKu Gothic Pro, Microsoft YaHei, Arial, sans-serif )',
|
|
22254
22278
|
color: 'var(--common-body-color, #141737)',
|
|
@@ -22266,19 +22290,29 @@ var normalize_token = {
|
|
|
22266
22290
|
var lineHeightComputed = '20px';
|
|
22267
22291
|
var lineHeightComputed2 = '10px';
|
|
22268
22292
|
var normalizeStyle = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
|
|
22293
|
+
var normalizeStyleId = 'shineout-next-normalize__' + Math.random().toString(36).substring(2, 15);
|
|
22294
|
+
var jssInsertionPointId = 'shineout-next-jss-insertion-point__' + Math.random().toString(36).substring(2, 15);
|
|
22269
22295
|
function appendNormalizeStyle(styleString, id) {
|
|
22270
22296
|
var style = document.createElement('style');
|
|
22271
22297
|
style.id = id;
|
|
22272
22298
|
style.innerHTML = styleString;
|
|
22273
|
-
document.head.
|
|
22299
|
+
document.head.insertBefore(style, document.head.firstChild);
|
|
22300
|
+
}
|
|
22301
|
+
function appendJssInsertionPoint() {
|
|
22302
|
+
var insertionPoint = document.createElement('style');
|
|
22303
|
+
insertionPoint.id = jssInsertionPointId;
|
|
22304
|
+
document.head.insertBefore(insertionPoint, document.head.firstChild);
|
|
22305
|
+
react_jss_esm_defaultJss.setup({
|
|
22306
|
+
insertionPoint: insertionPoint
|
|
22307
|
+
});
|
|
22274
22308
|
}
|
|
22275
|
-
var uniqueStyleId = 'shineout-next-normalize__' + Math.random().toString(36).substring(2, 15);
|
|
22276
22309
|
if (typeof window !== 'undefined') {
|
|
22277
|
-
|
|
22310
|
+
appendJssInsertionPoint();
|
|
22311
|
+
appendNormalizeStyle(normalizeStyle, normalizeStyleId);
|
|
22278
22312
|
}
|
|
22279
22313
|
var scopeNormalizeStyle = function scopeNormalizeStyle() {
|
|
22280
22314
|
var csScopePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#app';
|
|
22281
|
-
var styleElement = document.getElementById(
|
|
22315
|
+
var styleElement = document.getElementById(normalizeStyleId);
|
|
22282
22316
|
// 移除styleElement
|
|
22283
22317
|
|
|
22284
22318
|
var styleSheet = styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet;
|
|
@@ -22307,7 +22341,7 @@ var scopeNormalizeStyle = function scopeNormalizeStyle() {
|
|
|
22307
22341
|
return rule.cssText;
|
|
22308
22342
|
}).join('') : '';
|
|
22309
22343
|
document.head.removeChild(styleElement);
|
|
22310
|
-
appendNormalizeStyle(scopedStyleString,
|
|
22344
|
+
appendNormalizeStyle(scopedStyleString, normalizeStyleId);
|
|
22311
22345
|
};
|
|
22312
22346
|
token_setter({
|
|
22313
22347
|
selector: 'html'
|
|
@@ -22416,6 +22450,26 @@ var tooltipAnimation = {
|
|
|
22416
22450
|
transform: "var(--soui-popup-transform) scale(1)"
|
|
22417
22451
|
}
|
|
22418
22452
|
},
|
|
22453
|
+
'@keyframes moveRightTop': {
|
|
22454
|
+
'0%': {
|
|
22455
|
+
transformOrigin: 'left top',
|
|
22456
|
+
transform: "var(--soui-popup-transform) scale(0.5)"
|
|
22457
|
+
},
|
|
22458
|
+
'100%': {
|
|
22459
|
+
transformOrigin: 'left top',
|
|
22460
|
+
transform: "var(--soui-popup-transform) scale(1)"
|
|
22461
|
+
}
|
|
22462
|
+
},
|
|
22463
|
+
'@keyframes moveRightBottom': {
|
|
22464
|
+
'0%': {
|
|
22465
|
+
transformOrigin: 'left bottom',
|
|
22466
|
+
transform: "var(--soui-popup-transform) scale(0.5)"
|
|
22467
|
+
},
|
|
22468
|
+
'100%': {
|
|
22469
|
+
transformOrigin: 'left bottom',
|
|
22470
|
+
transform: "var(--soui-popup-transform) scale(1)"
|
|
22471
|
+
}
|
|
22472
|
+
},
|
|
22419
22473
|
'@keyframes moveLeft': {
|
|
22420
22474
|
'0%': {
|
|
22421
22475
|
transformOrigin: 'right center',
|
|
@@ -22426,6 +22480,26 @@ var tooltipAnimation = {
|
|
|
22426
22480
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22427
22481
|
}
|
|
22428
22482
|
},
|
|
22483
|
+
'@keyframes moveLeftTop': {
|
|
22484
|
+
'0%': {
|
|
22485
|
+
transformOrigin: 'right top',
|
|
22486
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22487
|
+
},
|
|
22488
|
+
'100%': {
|
|
22489
|
+
transformOrigin: 'right top',
|
|
22490
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22491
|
+
}
|
|
22492
|
+
},
|
|
22493
|
+
'@keyframes moveLeftBottom': {
|
|
22494
|
+
'0%': {
|
|
22495
|
+
transformOrigin: 'right bottom',
|
|
22496
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22497
|
+
},
|
|
22498
|
+
'100%': {
|
|
22499
|
+
transformOrigin: 'right bottom',
|
|
22500
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22501
|
+
}
|
|
22502
|
+
},
|
|
22429
22503
|
'@keyframes moveTop': {
|
|
22430
22504
|
'0%': {
|
|
22431
22505
|
transformOrigin: 'center bottom',
|
|
@@ -22436,6 +22510,26 @@ var tooltipAnimation = {
|
|
|
22436
22510
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22437
22511
|
}
|
|
22438
22512
|
},
|
|
22513
|
+
'@keyframes moveTopLeft': {
|
|
22514
|
+
'0%': {
|
|
22515
|
+
transformOrigin: 'left bottom',
|
|
22516
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22517
|
+
},
|
|
22518
|
+
'100%': {
|
|
22519
|
+
transformOrigin: 'left bottom',
|
|
22520
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22521
|
+
}
|
|
22522
|
+
},
|
|
22523
|
+
'@keyframes moveTopRight': {
|
|
22524
|
+
'0%': {
|
|
22525
|
+
transformOrigin: 'right bottom',
|
|
22526
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22527
|
+
},
|
|
22528
|
+
'100%': {
|
|
22529
|
+
transformOrigin: 'right bottom',
|
|
22530
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22531
|
+
}
|
|
22532
|
+
},
|
|
22439
22533
|
'@keyframes moveBottom': {
|
|
22440
22534
|
'0%': {
|
|
22441
22535
|
transformOrigin: 'center top',
|
|
@@ -22445,6 +22539,26 @@ var tooltipAnimation = {
|
|
|
22445
22539
|
transformOrigin: 'center top',
|
|
22446
22540
|
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22447
22541
|
}
|
|
22542
|
+
},
|
|
22543
|
+
'@keyframes moveBottomLeft': {
|
|
22544
|
+
'0%': {
|
|
22545
|
+
transformOrigin: 'left top',
|
|
22546
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22547
|
+
},
|
|
22548
|
+
'100%': {
|
|
22549
|
+
transformOrigin: 'left top',
|
|
22550
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22551
|
+
}
|
|
22552
|
+
},
|
|
22553
|
+
'@keyframes moveBottomRight': {
|
|
22554
|
+
'0%': {
|
|
22555
|
+
transformOrigin: 'right top',
|
|
22556
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(0.5)"
|
|
22557
|
+
},
|
|
22558
|
+
'100%': {
|
|
22559
|
+
transformOrigin: 'right top',
|
|
22560
|
+
transform: "var(--soui-popup-transform, rotate(0deg)) scale(1)"
|
|
22561
|
+
}
|
|
22448
22562
|
}
|
|
22449
22563
|
};
|
|
22450
22564
|
var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
@@ -22472,6 +22586,16 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
22472
22586
|
},
|
|
22473
22587
|
'&[data-soui-position^="bottom"] $arrow': {
|
|
22474
22588
|
transform: 'translate(0, calc(-100% + 1px)) rotate(0deg)'
|
|
22589
|
+
},
|
|
22590
|
+
'& $arrow:before': {
|
|
22591
|
+
clipPath: 'none',
|
|
22592
|
+
borderTop: "1px solid ".concat(src.tooltipLightBorderColor),
|
|
22593
|
+
borderLeft: "1px solid ".concat(src.tooltipLightBorderColor),
|
|
22594
|
+
borderRight: 'transparent',
|
|
22595
|
+
borderBottom: 'transparent',
|
|
22596
|
+
width: 8.4,
|
|
22597
|
+
height: 8.4,
|
|
22598
|
+
transform: 'translate(50%, 27.5%) rotate(45deg)'
|
|
22475
22599
|
}
|
|
22476
22600
|
},
|
|
22477
22601
|
'&[data-soui-type^="primary"]': {
|
|
@@ -22696,7 +22820,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22696
22820
|
borderRadius: src.popoverRadius,
|
|
22697
22821
|
border: "1px solid ".concat(src.popoverBorderColor),
|
|
22698
22822
|
wordWrap: 'break-word',
|
|
22699
|
-
'& $arrow': {
|
|
22823
|
+
'& > $arrow': {
|
|
22700
22824
|
'z-index': 1,
|
|
22701
22825
|
position: 'absolute',
|
|
22702
22826
|
content: '" "',
|
|
@@ -22717,7 +22841,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22717
22841
|
'&$hideArrow': defineProperty_default()({}, popover_cssvar, '4px'),
|
|
22718
22842
|
'&[data-soui-position^="bottom"]': {
|
|
22719
22843
|
marginTop: "calc(".concat(hideArrowGap, " - 2px)"),
|
|
22720
|
-
'& $arrow': {
|
|
22844
|
+
'& > $arrow': {
|
|
22721
22845
|
top: '0',
|
|
22722
22846
|
transform: 'translate(0, -50%) rotate(-45deg)',
|
|
22723
22847
|
left: '0',
|
|
@@ -22737,7 +22861,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22737
22861
|
'&[data-soui-position^="top"]': {
|
|
22738
22862
|
// marginTop: (arrowGap - 2) * -1,
|
|
22739
22863
|
marginTop: "calc((".concat(hideArrowGap, " - 2px) * -1)"),
|
|
22740
|
-
'& $arrow': {
|
|
22864
|
+
'& > $arrow': {
|
|
22741
22865
|
bottom: '0',
|
|
22742
22866
|
transform: 'translate(0, 50%) rotate(135deg)',
|
|
22743
22867
|
left: '0',
|
|
@@ -22763,7 +22887,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22763
22887
|
'&[dir=rtl]': {
|
|
22764
22888
|
marginLeft: "calc((".concat(hideArrowGap, " - 2px))")
|
|
22765
22889
|
},
|
|
22766
|
-
'& $arrow': {
|
|
22890
|
+
'& > $arrow': {
|
|
22767
22891
|
right: src.popoverBorderWidth,
|
|
22768
22892
|
transform: 'translate(50%, 0) rotate(45deg)',
|
|
22769
22893
|
top: '0',
|
|
@@ -22787,7 +22911,7 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22787
22911
|
'&[dir=rtl]': {
|
|
22788
22912
|
marginRight: "calc(".concat(hideArrowGap, " - 2px)")
|
|
22789
22913
|
},
|
|
22790
|
-
'& $arrow': {
|
|
22914
|
+
'& > $arrow': {
|
|
22791
22915
|
left: '0',
|
|
22792
22916
|
transform: 'translate(-50%, 0) rotate(-135deg)',
|
|
22793
22917
|
top: '0',
|
|
@@ -22806,19 +22930,19 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22806
22930
|
position: 'absolute'
|
|
22807
22931
|
}
|
|
22808
22932
|
},
|
|
22809
|
-
'&&[data-soui-position$="-left"] $arrow': {
|
|
22933
|
+
'&&[data-soui-position$="-left"] > $arrow': {
|
|
22810
22934
|
left: arrowMargin,
|
|
22811
22935
|
right: 'auto'
|
|
22812
22936
|
},
|
|
22813
|
-
'&&[data-soui-position$="-right"] $arrow': {
|
|
22937
|
+
'&&[data-soui-position$="-right"] > $arrow': {
|
|
22814
22938
|
right: arrowMargin,
|
|
22815
22939
|
left: 'auto'
|
|
22816
22940
|
},
|
|
22817
|
-
'&&[data-soui-position$="-top"] $arrow': {
|
|
22941
|
+
'&&[data-soui-position$="-top"] > $arrow': {
|
|
22818
22942
|
top: arrowMargin,
|
|
22819
22943
|
bottom: 'auto'
|
|
22820
22944
|
},
|
|
22821
|
-
'&&[data-soui-position$="-bottom"] $arrow': {
|
|
22945
|
+
'&&[data-soui-position$="-bottom"] > $arrow': {
|
|
22822
22946
|
bottom: arrowMargin,
|
|
22823
22947
|
top: 'auto'
|
|
22824
22948
|
},
|
|
@@ -22851,14 +22975,38 @@ var popoverStyle = objectSpread2_default()(objectSpread2_default()({}, tooltipAn
|
|
|
22851
22975
|
'&[data-soui-position^="bottom"]': {
|
|
22852
22976
|
animation: '$fadeIn 200ms ease, $moveBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22853
22977
|
},
|
|
22978
|
+
'&[data-soui-position^="bottom-left"]': {
|
|
22979
|
+
animation: '$fadeIn 200ms ease, $moveBottomLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22980
|
+
},
|
|
22981
|
+
'&[data-soui-position^="bottom-right"]': {
|
|
22982
|
+
animation: '$fadeIn 200ms ease, $moveBottomRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22983
|
+
},
|
|
22854
22984
|
'&[data-soui-position^="top"]': {
|
|
22855
22985
|
animation: '$fadeIn 200ms ease, $moveTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22856
22986
|
},
|
|
22987
|
+
'&[data-soui-position^="top-left"]': {
|
|
22988
|
+
animation: '$fadeIn 200ms ease, $moveTopLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22989
|
+
},
|
|
22990
|
+
'&[data-soui-position^="top-right"]': {
|
|
22991
|
+
animation: '$fadeIn 200ms ease, $moveTopRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
22992
|
+
},
|
|
22857
22993
|
'&[data-soui-position^="left"]': {
|
|
22858
22994
|
animation: '$fadeIn 200ms ease, $moveLeft 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22859
22995
|
},
|
|
22996
|
+
'&[data-soui-position^="left-top"]': {
|
|
22997
|
+
animation: '$fadeIn 200ms ease, $moveLeftTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22998
|
+
},
|
|
22999
|
+
'&[data-soui-position^="left-bottom"]': {
|
|
23000
|
+
animation: '$fadeIn 200ms ease, $moveLeftBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23001
|
+
},
|
|
22860
23002
|
'&[data-soui-position^="right"]': {
|
|
22861
23003
|
animation: '$fadeIn 200ms ease, $moveRight 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23004
|
+
},
|
|
23005
|
+
'&[data-soui-position^="right-top"]': {
|
|
23006
|
+
animation: '$fadeIn 200ms ease, $moveRightTop 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
23007
|
+
},
|
|
23008
|
+
'&[data-soui-position^="right-bottom"]': {
|
|
23009
|
+
animation: '$fadeIn 200ms ease, $moveRightBottom 200ms cubic-bezier(0.22, 0.61, 0.36, 1);'
|
|
22862
23010
|
}
|
|
22863
23011
|
},
|
|
22864
23012
|
arrow: {},
|
|
@@ -23103,19 +23251,10 @@ var useProgressStyle = styled(progress_progress, 'progress');
|
|
|
23103
23251
|
/* harmony default export */ var shineout_style_src_progress = ((/* unused pure expression or super */ null && (useProgressStyle)));
|
|
23104
23252
|
;// CONCATENATED MODULE: ../shineout-style/src/radio/radio.ts
|
|
23105
23253
|
|
|
23106
|
-
|
|
23254
|
+
|
|
23255
|
+
|
|
23256
|
+
var radioStyle = objectSpread2_default()(objectSpread2_default()({}, animations), {}, {
|
|
23107
23257
|
rootClass: {},
|
|
23108
|
-
// '@keyframes so-checkinput-focus': {
|
|
23109
|
-
// '0%': {
|
|
23110
|
-
// boxShadow: `0 0 0 0 ${cssVars.primaryColorFade50}`,
|
|
23111
|
-
// },
|
|
23112
|
-
// '50%': {
|
|
23113
|
-
// boxShadow: `0 0 0 4px ${cssVars.primaryColorFade0}`,
|
|
23114
|
-
// },
|
|
23115
|
-
// '100%': {
|
|
23116
|
-
// boxShadow: `0 0 0 8px ${cssVars.primaryColorFade0}`,
|
|
23117
|
-
// },
|
|
23118
|
-
// },
|
|
23119
23258
|
wrapper: {
|
|
23120
23259
|
display: 'inline-flex',
|
|
23121
23260
|
position: 'relative',
|
|
@@ -23215,7 +23354,8 @@ var radioStyle = {
|
|
|
23215
23354
|
position: 'absolute',
|
|
23216
23355
|
top: '50%',
|
|
23217
23356
|
left: '50%',
|
|
23218
|
-
transform: 'translate(-50%, -50%)'
|
|
23357
|
+
transform: 'translate(-50%, -50%)',
|
|
23358
|
+
animation: '$bounce-in-center 0.2s cubic-bezier(0.22, 0.61, 0.36, 1)'
|
|
23219
23359
|
}
|
|
23220
23360
|
},
|
|
23221
23361
|
'$wrapperDisabled:not($wrapperChecked) &': {
|
|
@@ -23271,7 +23411,7 @@ var radioStyle = {
|
|
|
23271
23411
|
margin: 0
|
|
23272
23412
|
}
|
|
23273
23413
|
}
|
|
23274
|
-
};
|
|
23414
|
+
});
|
|
23275
23415
|
/* harmony default export */ var src_radio_radio = (radioStyle);
|
|
23276
23416
|
;// CONCATENATED MODULE: ../shineout-style/src/radio/index.ts
|
|
23277
23417
|
|
|
@@ -23404,6 +23544,7 @@ var useRateStyle = styled(rate_rate, 'rate');
|
|
|
23404
23544
|
|
|
23405
23545
|
|
|
23406
23546
|
|
|
23547
|
+
|
|
23407
23548
|
var select_inputBorderToken = {
|
|
23408
23549
|
lineHeight: src.lineHeightDynamic,
|
|
23409
23550
|
borderRadius: src.inputBorderRadius,
|
|
@@ -23447,6 +23588,12 @@ var select_inputBorder = input_border('wrapper', select_inputBorderToken);
|
|
|
23447
23588
|
var select_wrapper = select_inputBorder.wrapper,
|
|
23448
23589
|
select_wrapperDisabled = select_inputBorder.wrapperDisabled,
|
|
23449
23590
|
select_resetWrapper = objectWithoutProperties_default()(select_inputBorder, ["wrapper", "wrapperDisabled"]);
|
|
23591
|
+
var select_selectTagHeightCssvar = "--select-tag-height";
|
|
23592
|
+
var select_selectSmallTagHeightCssvar = "--select-small-tag-height";
|
|
23593
|
+
var select_selectLargeTagHeightCssvar = "--select-large-tag-height";
|
|
23594
|
+
var select_selectTagHeight = "var(".concat(select_selectTagHeightCssvar, ")");
|
|
23595
|
+
var select_selectSmallTagHeight = "var(".concat(select_selectSmallTagHeightCssvar, ")");
|
|
23596
|
+
var select_selectLargeTagHeight = "var(".concat(select_selectLargeTagHeightCssvar, ")");
|
|
23450
23597
|
var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
23451
23598
|
rootClass: {},
|
|
23452
23599
|
wrapper: objectSpread2_default()(objectSpread2_default()({
|
|
@@ -23455,68 +23602,76 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23455
23602
|
width: '100%',
|
|
23456
23603
|
outline: 'none',
|
|
23457
23604
|
cursor: 'pointer'
|
|
23458
|
-
}, select_wrapper), {}, {
|
|
23459
|
-
'
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
}
|
|
23473
|
-
},
|
|
23474
|
-
'&$wrapperSmall $tag': {
|
|
23475
|
-
height: 18,
|
|
23476
|
-
marginBottom: 2,
|
|
23477
|
-
'&$tag *': {
|
|
23478
|
-
lineHeight: '18px'
|
|
23479
|
-
}
|
|
23605
|
+
}, select_wrapper), {}, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, select_selectTagHeightCssvar, src.selectTagHeight), select_selectSmallTagHeightCssvar, src.selectSmallTagHeight), select_selectLargeTagHeightCssvar, src.selectLargeTagHeight), '&$wrapperInnerTitle', {
|
|
23606
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
23607
|
+
marginTop: 0,
|
|
23608
|
+
marginBottom: 0
|
|
23609
|
+
},
|
|
23610
|
+
'& $tag': {
|
|
23611
|
+
marginTop: 0,
|
|
23612
|
+
marginBottom: src.selectInnerTitleMarginY,
|
|
23613
|
+
paddingTop: 0,
|
|
23614
|
+
paddingBottom: 0,
|
|
23615
|
+
height: select_selectTagHeight,
|
|
23616
|
+
border: 'none',
|
|
23617
|
+
'& *': {
|
|
23618
|
+
lineHeight: select_selectTagHeight
|
|
23480
23619
|
}
|
|
23481
23620
|
},
|
|
23482
|
-
'&$wrapperSmall': {
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
marginBottom: 1
|
|
23488
|
-
},
|
|
23489
|
-
'& $placeholder,$ellipsis,$space,input': {
|
|
23490
|
-
marginTop: 0,
|
|
23491
|
-
marginBottom: 0
|
|
23621
|
+
'&$wrapperSmall $tag': {
|
|
23622
|
+
height: select_selectSmallTagHeight,
|
|
23623
|
+
marginBottom: 2,
|
|
23624
|
+
'&$tag *': {
|
|
23625
|
+
lineHeight: select_selectSmallTagHeight
|
|
23492
23626
|
}
|
|
23493
23627
|
},
|
|
23494
|
-
'&$wrapperLarge': {
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
'& $arrowIcon': {
|
|
23500
|
-
width: src.selectLargeFontSize
|
|
23628
|
+
'&$wrapperLarge $tag': {
|
|
23629
|
+
height: select_selectLargeTagHeight,
|
|
23630
|
+
marginBottom: 2,
|
|
23631
|
+
'&$tag *': {
|
|
23632
|
+
lineHeight: select_selectLargeTagHeight
|
|
23501
23633
|
}
|
|
23634
|
+
}
|
|
23635
|
+
}), '&$wrapperSmall', {
|
|
23636
|
+
'& $tag': {
|
|
23637
|
+
height: select_selectSmallTagHeight,
|
|
23638
|
+
lineHeight: '16px',
|
|
23639
|
+
marginTop: 1,
|
|
23640
|
+
marginBottom: 1
|
|
23502
23641
|
},
|
|
23503
|
-
'
|
|
23504
|
-
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23642
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
23643
|
+
marginTop: 0,
|
|
23644
|
+
marginBottom: 0
|
|
23645
|
+
}
|
|
23646
|
+
}), '&$wrapperLarge', {
|
|
23647
|
+
'& $tag': {
|
|
23648
|
+
height: select_selectLargeTagHeight,
|
|
23649
|
+
'& *': {
|
|
23650
|
+
lineHeight: select_selectLargeTagHeight
|
|
23512
23651
|
}
|
|
23513
|
-
}
|
|
23514
|
-
'
|
|
23652
|
+
},
|
|
23653
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
23654
|
+
marginTop: src.selectLargePlaceholderMarginY,
|
|
23655
|
+
marginBottom: src.selectLargePlaceholderMarginY
|
|
23656
|
+
},
|
|
23657
|
+
'& $arrowIcon': {
|
|
23658
|
+
width: src.selectLargeFontSize
|
|
23659
|
+
}
|
|
23660
|
+
}), '&:hover', objectSpread2_default()(objectSpread2_default()({}, select_wrapper['&:hover']), {}, {
|
|
23661
|
+
cursor: 'pointer',
|
|
23662
|
+
'&$clearable:not($wrapperEmpty):not($wrapperDisabled)': {
|
|
23515
23663
|
'& $clearIcon': {
|
|
23664
|
+
display: 'block'
|
|
23665
|
+
},
|
|
23666
|
+
'& $arrowIcon': {
|
|
23516
23667
|
display: 'none'
|
|
23517
23668
|
}
|
|
23518
23669
|
}
|
|
23519
|
-
}),
|
|
23670
|
+
})), '&:not($wrapperEmpty):not($wrapperOpen)', {
|
|
23671
|
+
'& $clearIcon': {
|
|
23672
|
+
display: 'none'
|
|
23673
|
+
}
|
|
23674
|
+
})),
|
|
23520
23675
|
wrapperEmpty: {},
|
|
23521
23676
|
wrapperOpen: {},
|
|
23522
23677
|
wrapperDisabled: objectSpread2_default()(objectSpread2_default()({}, select_wrapperDisabled), {}, {
|
|
@@ -23645,6 +23800,9 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23645
23800
|
},
|
|
23646
23801
|
compressedWrapper: {
|
|
23647
23802
|
width: 0,
|
|
23803
|
+
overflow: 'hidden'
|
|
23804
|
+
},
|
|
23805
|
+
compressedBoundWrapper: {
|
|
23648
23806
|
overflow: 'auto'
|
|
23649
23807
|
},
|
|
23650
23808
|
controlMouse: {
|
|
@@ -23926,7 +24084,6 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
23926
24084
|
height: 32,
|
|
23927
24085
|
padding: "".concat(src.selectHeaderPaddingY, " ").concat(src.selectHeaderPaddingX),
|
|
23928
24086
|
borderBottom: "1px solid ".concat(src.selectHeaderBorderColor),
|
|
23929
|
-
marginBottom: 4,
|
|
23930
24087
|
'& $columnsCheckbox': {
|
|
23931
24088
|
marginRight: 0,
|
|
23932
24089
|
marginLeft: 4,
|
|
@@ -23996,8 +24153,6 @@ var useSelectStyle = styled(src_select_select, 'select');
|
|
|
23996
24153
|
/* harmony default export */ var shineout_style_src_select = ((/* unused pure expression or super */ null && (useSelectStyle)));
|
|
23997
24154
|
;// CONCATENATED MODULE: ../shineout-style/src/skeleton/skeleton.ts
|
|
23998
24155
|
|
|
23999
|
-
// import token from '@sheinx/theme';
|
|
24000
|
-
|
|
24001
24156
|
|
|
24002
24157
|
var skeleton_animation = {
|
|
24003
24158
|
'@keyframes skeleton-animation': {
|
|
@@ -24016,7 +24171,7 @@ var skeletonStyle = objectSpread2_default()(objectSpread2_default()({}, skeleton
|
|
|
24016
24171
|
},
|
|
24017
24172
|
animation: {
|
|
24018
24173
|
'& $textItem, & $image, & $buttonItem': {
|
|
24019
|
-
|
|
24174
|
+
backgroundImage: "linear-gradient(90deg, ".concat(src.skeletonAnimationFromColor, " 25%, ").concat(src.skeletonAnimationToColor, " 37%, ").concat(src.skeletonAnimationFromColor, " 63%)"),
|
|
24020
24175
|
backgroundSize: '400% 100%',
|
|
24021
24176
|
animation: '$skeleton-animation 1.4s ease infinite'
|
|
24022
24177
|
}
|
|
@@ -26200,7 +26355,7 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26200
26355
|
boxSizing: 'border-box',
|
|
26201
26356
|
lineHeight: src.lineHeightDynamic,
|
|
26202
26357
|
'$bordered&': {
|
|
26203
|
-
'
|
|
26358
|
+
'&:not(:last-child)::after': {
|
|
26204
26359
|
content: '""',
|
|
26205
26360
|
position: 'absolute',
|
|
26206
26361
|
zIndex: cellBaseIndex,
|
|
@@ -26544,6 +26699,9 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26544
26699
|
color: src.tableFilterIconActiveColor
|
|
26545
26700
|
}
|
|
26546
26701
|
},
|
|
26702
|
+
filterOpened: {
|
|
26703
|
+
background: src.buttonSecondaryHoverBackgroundColor
|
|
26704
|
+
},
|
|
26547
26705
|
filterContainer: {
|
|
26548
26706
|
minWidth: '120px'
|
|
26549
26707
|
},
|
|
@@ -26556,7 +26714,19 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26556
26714
|
filterBody: {
|
|
26557
26715
|
padding: "".concat(src.tableFilterBodyPaddingY, " ").concat(src.tableFilterBodyPaddingX),
|
|
26558
26716
|
maxHeight: '300px',
|
|
26559
|
-
overflow: 'auto'
|
|
26717
|
+
overflow: 'auto',
|
|
26718
|
+
// 特调Tree在Table filter中样式,以满足设计要求
|
|
26719
|
+
'& [class*=tree-content-wrapper]': {
|
|
26720
|
+
paddingTop: 1,
|
|
26721
|
+
paddingBottom: 1
|
|
26722
|
+
},
|
|
26723
|
+
'&& [class*=tree-checkbox]': {
|
|
26724
|
+
alignSelf: 'center'
|
|
26725
|
+
},
|
|
26726
|
+
'& [class*=tree-text]': {
|
|
26727
|
+
paddingTop: 5,
|
|
26728
|
+
paddingBottom: 5
|
|
26729
|
+
}
|
|
26560
26730
|
},
|
|
26561
26731
|
filterFooter: {
|
|
26562
26732
|
display: 'flex',
|
|
@@ -26684,6 +26854,12 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26684
26854
|
display: 'none'
|
|
26685
26855
|
}
|
|
26686
26856
|
},
|
|
26857
|
+
cellSortable: {
|
|
26858
|
+
cursor: 'pointer',
|
|
26859
|
+
'&:hover': {
|
|
26860
|
+
background: src.tableTbodyHoverBackgroundColor
|
|
26861
|
+
}
|
|
26862
|
+
},
|
|
26687
26863
|
sticky: {},
|
|
26688
26864
|
expandIcon: {
|
|
26689
26865
|
position: 'relative',
|
|
@@ -27800,7 +27976,8 @@ var TagStyle = {
|
|
|
27800
27976
|
alignItems: 'center',
|
|
27801
27977
|
display: 'inline-flex',
|
|
27802
27978
|
cursor: 'pointer',
|
|
27803
|
-
height: src.lineHeightDynamic
|
|
27979
|
+
height: src.lineHeightDynamic,
|
|
27980
|
+
maxHeight: '100%'
|
|
27804
27981
|
},
|
|
27805
27982
|
closeIconWrapper: {
|
|
27806
27983
|
display: 'inline-flex',
|
|
@@ -27923,6 +28100,9 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
|
|
|
27923
28100
|
scrollbarColor: "".concat(src.inputBorderColor, " transparent"),
|
|
27924
28101
|
'&$resize': {
|
|
27925
28102
|
resize: 'vertical'
|
|
28103
|
+
},
|
|
28104
|
+
'&:not($shadow)': {
|
|
28105
|
+
minHeight: '-webkit-fill-available'
|
|
27926
28106
|
}
|
|
27927
28107
|
},
|
|
27928
28108
|
resize: {
|
|
@@ -28687,6 +28867,12 @@ var tree_select_inputBorder = input_border('wrapper', tree_select_inputBorderTok
|
|
|
28687
28867
|
var tree_select_wrapper = tree_select_inputBorder.wrapper,
|
|
28688
28868
|
tree_select_wrapperDisabled = tree_select_inputBorder.wrapperDisabled,
|
|
28689
28869
|
tree_select_resetWrapper = objectWithoutProperties_default()(tree_select_inputBorder, ["wrapper", "wrapperDisabled"]);
|
|
28870
|
+
var tree_select_selectTagHeightCssvar = "--select-tag-height";
|
|
28871
|
+
var tree_select_selectSmallTagHeightCssvar = "--select-small-tag-height";
|
|
28872
|
+
var tree_select_selectLargeTagHeightCssvar = "--select-large-tag-height";
|
|
28873
|
+
var tree_select_selectTagHeight = "var(".concat(tree_select_selectTagHeightCssvar, ")");
|
|
28874
|
+
var tree_select_selectSmallTagHeight = "var(".concat(tree_select_selectSmallTagHeightCssvar, ")");
|
|
28875
|
+
var tree_select_selectLargeTagHeight = "var(".concat(tree_select_selectLargeTagHeightCssvar, ")");
|
|
28690
28876
|
var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
28691
28877
|
rootClass: {},
|
|
28692
28878
|
wrapper: objectSpread2_default()(objectSpread2_default()({
|
|
@@ -28695,88 +28881,96 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28695
28881
|
width: '100%',
|
|
28696
28882
|
outline: 'none',
|
|
28697
28883
|
cursor: 'pointer'
|
|
28698
|
-
}, tree_select_wrapper), {}, {
|
|
28699
|
-
'
|
|
28700
|
-
|
|
28701
|
-
|
|
28702
|
-
|
|
28703
|
-
|
|
28704
|
-
|
|
28705
|
-
|
|
28706
|
-
|
|
28707
|
-
|
|
28708
|
-
|
|
28709
|
-
|
|
28710
|
-
|
|
28711
|
-
|
|
28712
|
-
}
|
|
28713
|
-
},
|
|
28714
|
-
'&$wrapperSmall $tag': {
|
|
28715
|
-
height: 18,
|
|
28716
|
-
marginBottom: 2,
|
|
28717
|
-
'&$tag *': {
|
|
28718
|
-
lineHeight: '18px'
|
|
28719
|
-
}
|
|
28884
|
+
}, tree_select_wrapper), {}, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, tree_select_selectTagHeightCssvar, src.selectTagHeight), tree_select_selectSmallTagHeightCssvar, src.selectSmallTagHeight), tree_select_selectLargeTagHeightCssvar, src.selectLargeTagHeight), '&$wrapperInnerTitle', {
|
|
28885
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
28886
|
+
marginTop: 0,
|
|
28887
|
+
marginBottom: 0
|
|
28888
|
+
},
|
|
28889
|
+
'& $tag': {
|
|
28890
|
+
marginTop: 0,
|
|
28891
|
+
marginBottom: src.selectInnerTitleMarginY,
|
|
28892
|
+
paddingTop: 0,
|
|
28893
|
+
paddingBottom: 0,
|
|
28894
|
+
height: tree_select_selectTagHeight,
|
|
28895
|
+
border: 'none',
|
|
28896
|
+
'& *': {
|
|
28897
|
+
lineHeight: tree_select_selectTagHeight
|
|
28720
28898
|
}
|
|
28721
28899
|
},
|
|
28722
|
-
'&$wrapperSmall': {
|
|
28723
|
-
|
|
28724
|
-
|
|
28725
|
-
|
|
28726
|
-
|
|
28727
|
-
marginBottom: 1
|
|
28728
|
-
},
|
|
28729
|
-
'& $placeholder,$ellipsis,$space,input': {
|
|
28730
|
-
marginTop: 0,
|
|
28731
|
-
marginBottom: 0
|
|
28732
|
-
},
|
|
28733
|
-
'& $optionInner': {
|
|
28734
|
-
paddingTop: src.treeSelectSmallOptionInnerPaddingY,
|
|
28735
|
-
paddingBottom: src.treeSelectSmallOptionInnerPaddingY,
|
|
28736
|
-
paddingLeft: src.treeSelectSmallOptionInnerPaddingX,
|
|
28737
|
-
// padding: `${token.treeSelectSmallOptionInnerPaddingY} ${token.treeSelectSmallOptionInnerPaddingX}`,
|
|
28738
|
-
fontSize: src.treeSelectSmallFontSize
|
|
28739
|
-
},
|
|
28740
|
-
'& $clearIcon': {
|
|
28741
|
-
right: src.treeSelectSmallPaddingX
|
|
28900
|
+
'&$wrapperSmall $tag': {
|
|
28901
|
+
height: tree_select_selectSmallTagHeight,
|
|
28902
|
+
marginBottom: 2,
|
|
28903
|
+
'&$tag *': {
|
|
28904
|
+
lineHeight: tree_select_selectSmallTagHeight
|
|
28742
28905
|
}
|
|
28743
28906
|
},
|
|
28744
|
-
'&$wrapperLarge': {
|
|
28745
|
-
|
|
28746
|
-
|
|
28747
|
-
|
|
28748
|
-
|
|
28749
|
-
'& $optionInner': {
|
|
28750
|
-
// padding: `${token.treeSelectLargeOptionInnerPaddingY} ${token.treeSelectLargeOptionInnerPaddingX}`,
|
|
28751
|
-
paddingTop: src.treeSelectLargeOptionInnerPaddingY,
|
|
28752
|
-
paddingBottom: src.treeSelectLargeOptionInnerPaddingY,
|
|
28753
|
-
paddingLeft: src.treeSelectLargeOptionInnerPaddingX,
|
|
28754
|
-
fontSize: src.treeSelectLargeFontSize
|
|
28755
|
-
},
|
|
28756
|
-
'& $arrowIcon': {
|
|
28757
|
-
width: src.treeSelectLargeFontSize
|
|
28758
|
-
},
|
|
28759
|
-
'& $clearIcon': {
|
|
28760
|
-
right: src.treeSelectLargePaddingX
|
|
28907
|
+
'&$wrapperLarge $tag': {
|
|
28908
|
+
height: tree_select_selectLargeTagHeight,
|
|
28909
|
+
marginBottom: 2,
|
|
28910
|
+
'&$tag *': {
|
|
28911
|
+
lineHeight: tree_select_selectLargeTagHeight
|
|
28761
28912
|
}
|
|
28913
|
+
}
|
|
28914
|
+
}), '&$wrapperSmall', {
|
|
28915
|
+
'& $tag': {
|
|
28916
|
+
height: tree_select_selectSmallTagHeight,
|
|
28917
|
+
lineHeight: '16px',
|
|
28918
|
+
marginTop: 1,
|
|
28919
|
+
marginBottom: 1
|
|
28762
28920
|
},
|
|
28763
|
-
'
|
|
28764
|
-
|
|
28765
|
-
|
|
28766
|
-
|
|
28767
|
-
|
|
28768
|
-
|
|
28769
|
-
|
|
28770
|
-
|
|
28771
|
-
|
|
28921
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
28922
|
+
marginTop: 0,
|
|
28923
|
+
marginBottom: 0
|
|
28924
|
+
},
|
|
28925
|
+
'& $optionInner': {
|
|
28926
|
+
paddingTop: src.treeSelectSmallOptionInnerPaddingY,
|
|
28927
|
+
paddingBottom: src.treeSelectSmallOptionInnerPaddingY,
|
|
28928
|
+
paddingLeft: src.treeSelectSmallOptionInnerPaddingX,
|
|
28929
|
+
// padding: `${token.treeSelectSmallOptionInnerPaddingY} ${token.treeSelectSmallOptionInnerPaddingX}`,
|
|
28930
|
+
fontSize: src.treeSelectSmallFontSize
|
|
28931
|
+
},
|
|
28932
|
+
'& $clearIcon': {
|
|
28933
|
+
right: src.treeSelectSmallPaddingX
|
|
28934
|
+
}
|
|
28935
|
+
}), '&$wrapperLarge', {
|
|
28936
|
+
'& $tag': {
|
|
28937
|
+
height: tree_select_selectLargeTagHeight,
|
|
28938
|
+
'& *': {
|
|
28939
|
+
lineHeight: tree_select_selectLargeTagHeight
|
|
28772
28940
|
}
|
|
28773
28941
|
},
|
|
28774
|
-
'
|
|
28942
|
+
'& $placeholder,$ellipsis,$space,input': {
|
|
28943
|
+
marginTop: src.treeSelectLargePlaceholderMarginY,
|
|
28944
|
+
marginBottom: src.treeSelectLargePlaceholderMarginY
|
|
28945
|
+
},
|
|
28946
|
+
'& $optionInner': {
|
|
28947
|
+
// padding: `${token.treeSelectLargeOptionInnerPaddingY} ${token.treeSelectLargeOptionInnerPaddingX}`,
|
|
28948
|
+
paddingTop: src.treeSelectLargeOptionInnerPaddingY,
|
|
28949
|
+
paddingBottom: src.treeSelectLargeOptionInnerPaddingY,
|
|
28950
|
+
paddingLeft: src.treeSelectLargeOptionInnerPaddingX,
|
|
28951
|
+
fontSize: src.treeSelectLargeFontSize
|
|
28952
|
+
},
|
|
28953
|
+
'& $arrowIcon': {
|
|
28954
|
+
width: src.treeSelectLargeFontSize
|
|
28955
|
+
},
|
|
28956
|
+
'& $clearIcon': {
|
|
28957
|
+
right: src.treeSelectLargePaddingX
|
|
28958
|
+
}
|
|
28959
|
+
}), '&:hover', {
|
|
28960
|
+
cursor: 'pointer',
|
|
28961
|
+
'&$clearable:not($wrapperEmpty)': {
|
|
28775
28962
|
'& $clearIcon': {
|
|
28963
|
+
display: 'block'
|
|
28964
|
+
},
|
|
28965
|
+
'& $arrowIcon': {
|
|
28776
28966
|
display: 'none'
|
|
28777
28967
|
}
|
|
28778
28968
|
}
|
|
28779
|
-
}),
|
|
28969
|
+
}), '&:not($wrapperEmpty):not($wrapperOpen)', {
|
|
28970
|
+
'& $clearIcon': {
|
|
28971
|
+
display: 'none'
|
|
28972
|
+
}
|
|
28973
|
+
})),
|
|
28780
28974
|
treeWrapper: defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, getTokenName('treeFontColor'), src.treeSelectOptionFontColor), getTokenName('treeContentHoverFontColor'), src.treeSelectContentHoverFontColor), getTokenName('treeContentHoverBackgroundColor'), src.treeSelectContentHoverBackgroundColor), getTokenName('treeContentActiveBackgroundColor'), src.treeSelectContentActiveBackgroundColor), getTokenName('treeContentActiveFontColor'), src.treeSelectContentActiveFontColor), getTokenName('treeContentDisabledFontColor'), src.treeSelectContentDisabledFontColor), getTokenName('treeContentDisabledBackgroundColor'), src.treeSelectContentDisabledBackgroundColor),
|
|
28781
28975
|
wrapperEmpty: {},
|
|
28782
28976
|
wrapperOpen: {},
|
|
@@ -28885,6 +29079,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
28885
29079
|
},
|
|
28886
29080
|
compressedWrapper: {
|
|
28887
29081
|
width: 0,
|
|
29082
|
+
overflow: 'hidden'
|
|
29083
|
+
},
|
|
29084
|
+
compressedBoundWrapper: {
|
|
28888
29085
|
overflow: 'auto'
|
|
28889
29086
|
},
|
|
28890
29087
|
controlMouse: {
|
|
@@ -29112,6 +29309,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
29112
29309
|
color: src.treeSelectOptionDisabledColor,
|
|
29113
29310
|
backgroundColor: src.treeSelectOptionDisabledBackgroundColor
|
|
29114
29311
|
},
|
|
29312
|
+
'&&:not([data-active="true"]) > [data-role="text"]': {
|
|
29313
|
+
backgroundColor: src.treeSelectContentDisabledBackgroundColor
|
|
29314
|
+
},
|
|
29115
29315
|
'&&:not([data-active="true"]) > [data-role="text"]:hover': {
|
|
29116
29316
|
backgroundColor: src.treeSelectContentDisabledHoverBackgroundColor
|
|
29117
29317
|
}
|
|
@@ -29250,7 +29450,11 @@ var uploadStyle = {
|
|
|
29250
29450
|
border: "1px dashed ".concat(src.uploadImageHandlerBorderColor),
|
|
29251
29451
|
backgroundColor: src.uploadImageHandlerBackgroundColor,
|
|
29252
29452
|
color: src.uploadImageHandlerFontColor,
|
|
29253
|
-
'&:hover, &:hover
|
|
29453
|
+
'&:hover, &:hover': {
|
|
29454
|
+
borderColor: src.uploadImageHandlerHoverBorderColor,
|
|
29455
|
+
color: src.uploadImageHandlerHoverFontColor
|
|
29456
|
+
},
|
|
29457
|
+
'&:hover, &:hover svg': {
|
|
29254
29458
|
borderColor: src.uploadImageHandlerHoverBorderColor,
|
|
29255
29459
|
color: src.uploadImageHandlerHoverFontColor
|
|
29256
29460
|
},
|
|
@@ -29371,7 +29575,7 @@ var uploadStyle = {
|
|
|
29371
29575
|
borderColor: src.uploadImageHandlerHoverBorderColor,
|
|
29372
29576
|
color: src.uploadImageHandlerHoverFontColor
|
|
29373
29577
|
},
|
|
29374
|
-
'$wrapper:not($wrapperDisabled) &:hover
|
|
29578
|
+
'$wrapper:not($wrapperDisabled) &:hover svg': {
|
|
29375
29579
|
color: "".concat(src.uploadImageHandlerHoverFontColor, " !important")
|
|
29376
29580
|
},
|
|
29377
29581
|
'$wrapper:not($wrapperDisabled) &:active, $wrapper:not($wrapperDisabled) &:active *': {
|
|
@@ -30330,17 +30534,20 @@ var usePopup = function usePopup(props) {
|
|
|
30330
30534
|
}
|
|
30331
30535
|
};
|
|
30332
30536
|
var handleMouseEnter = use_persist_fn(function (e) {
|
|
30333
|
-
var _targetEvents$onMouse;
|
|
30537
|
+
var _targetEvents$onMouse, _targetRef$current, _popupRef$current2;
|
|
30334
30538
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse = targetEvents.onMouseEnter) === null || _targetEvents$onMouse === void 0 || _targetEvents$onMouse.call(targetEvents, e);
|
|
30335
30539
|
if (trigger !== 'hover') return;
|
|
30336
|
-
|
|
30540
|
+
var isParentContainsCurrent = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.contains(e.target);
|
|
30541
|
+
if (isParentContainsCurrent || popupRef !== null && popupRef !== void 0 && (_popupRef$current2 = popupRef.current) !== null && _popupRef$current2 !== void 0 && _popupRef$current2.contains(e.target)) {
|
|
30542
|
+
handleHoverToggle(true);
|
|
30543
|
+
}
|
|
30337
30544
|
});
|
|
30338
30545
|
var handleMouseLeave = use_persist_fn(function (e) {
|
|
30339
|
-
var _targetEvents$onMouse2, _popupRef$
|
|
30546
|
+
var _targetEvents$onMouse2, _popupRef$current3;
|
|
30340
30547
|
targetEvents === null || targetEvents === void 0 || (_targetEvents$onMouse2 = targetEvents.onMouseLeave) === null || _targetEvents$onMouse2 === void 0 || _targetEvents$onMouse2.call(targetEvents, e);
|
|
30341
30548
|
if (trigger !== 'hover') return;
|
|
30342
30549
|
// @ts-ignore
|
|
30343
|
-
if (e.relatedTarget instanceof HTMLElement && (_popupRef$
|
|
30550
|
+
if (e.relatedTarget instanceof HTMLElement && (_popupRef$current3 = popupRef.current) !== null && _popupRef$current3 !== void 0 && _popupRef$current3.contains(e.relatedTarget)) {
|
|
30344
30551
|
return;
|
|
30345
30552
|
}
|
|
30346
30553
|
handleHoverToggle(false);
|
|
@@ -30639,6 +30846,10 @@ var getFieldId = function getFieldId(name, formName) {
|
|
|
30639
30846
|
if (!name) return undefined;
|
|
30640
30847
|
return "".concat(formName ? "".concat(formName, "_") : '').concat(name);
|
|
30641
30848
|
};
|
|
30849
|
+
var getOriginField = function getOriginField(name, formName) {
|
|
30850
|
+
if (!name || !formName) return '';
|
|
30851
|
+
return name.replace("".concat(formName, "_"), '');
|
|
30852
|
+
};
|
|
30642
30853
|
;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
|
|
30643
30854
|
var getDataAttribute = function getDataAttribute(attrs) {
|
|
30644
30855
|
return Object.keys(attrs).reduce(function (acc, key) {
|
|
@@ -30805,14 +31016,14 @@ var useCheckElementBorderWidth = function useCheckElementBorderWidth(elementRef)
|
|
|
30805
31016
|
|
|
30806
31017
|
// 获取指定方向上的border宽度之和
|
|
30807
31018
|
var getBorderWidth = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
|
|
30808
|
-
if (elementRef.current) {
|
|
31019
|
+
if (elementRef.current && options.enable) {
|
|
30809
31020
|
var _options$direction = options.direction,
|
|
30810
31021
|
direction = _options$direction === void 0 ? 'horizontal' : _options$direction;
|
|
30811
31022
|
var style = window.getComputedStyle(elementRef.current);
|
|
30812
31023
|
var _borderWidth = direction === 'horizontal' ? parseFloat(style.borderLeftWidth) + parseFloat(style.borderRightWidth) : parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);
|
|
30813
31024
|
setBorderWidth(_borderWidth);
|
|
30814
31025
|
}
|
|
30815
|
-
}, [elementRef]);
|
|
31026
|
+
}, [elementRef, options.enable]);
|
|
30816
31027
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
30817
31028
|
getBorderWidth();
|
|
30818
31029
|
}, [getBorderWidth]);
|
|
@@ -30944,6 +31155,14 @@ function shallowEqual(objA, objB) {
|
|
|
30944
31155
|
}
|
|
30945
31156
|
return true;
|
|
30946
31157
|
}
|
|
31158
|
+
function shallowEqualExceptFalsely(objA, objB) {
|
|
31159
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
31160
|
+
var falselys = [false, 0, '', null, undefined, NaN];
|
|
31161
|
+
if (falselys.includes(objA) && falselys.includes(objB)) {
|
|
31162
|
+
return true;
|
|
31163
|
+
}
|
|
31164
|
+
return shallowEqual(objA, objB, options);
|
|
31165
|
+
}
|
|
30947
31166
|
/* harmony default export */ var shallow_equal = (shallowEqual);
|
|
30948
31167
|
;// CONCATENATED MODULE: ../hooks/src/utils/dom/document.ts
|
|
30949
31168
|
var cachedZoom = 0;
|
|
@@ -30989,6 +31208,23 @@ var getCurrentCSSZoom = function getCurrentCSSZoom() {
|
|
|
30989
31208
|
// height: rect.height * zoomRatio,
|
|
30990
31209
|
// }
|
|
30991
31210
|
// }
|
|
31211
|
+
|
|
31212
|
+
var getScrollPosition = function getScrollPosition(element) {
|
|
31213
|
+
if (!element) return {
|
|
31214
|
+
scrollTop: 0,
|
|
31215
|
+
scrollLeft: 0
|
|
31216
|
+
};
|
|
31217
|
+
if (element === document.documentElement || element === document.body) {
|
|
31218
|
+
return {
|
|
31219
|
+
scrollTop: document.documentElement.scrollTop || document.body.scrollTop,
|
|
31220
|
+
scrollLeft: document.documentElement.scrollLeft || document.body.scrollLeft
|
|
31221
|
+
};
|
|
31222
|
+
}
|
|
31223
|
+
return {
|
|
31224
|
+
scrollTop: element.scrollTop,
|
|
31225
|
+
scrollLeft: element.scrollLeft
|
|
31226
|
+
};
|
|
31227
|
+
};
|
|
30992
31228
|
;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/index.ts
|
|
30993
31229
|
|
|
30994
31230
|
|
|
@@ -31065,7 +31301,8 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31065
31301
|
enable: show && adjust
|
|
31066
31302
|
});
|
|
31067
31303
|
var parentElBorderWidth = useCheckElementBorderWidth(parentElRef, {
|
|
31068
|
-
direction: 'horizontal'
|
|
31304
|
+
direction: 'horizontal',
|
|
31305
|
+
enable: show
|
|
31069
31306
|
});
|
|
31070
31307
|
var popupElSize = useCheckElementSize(popupElRef, {
|
|
31071
31308
|
enable: show
|
|
@@ -31221,7 +31458,7 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31221
31458
|
_v = _targetPosition$split4[1];
|
|
31222
31459
|
if (_v === 'top') {
|
|
31223
31460
|
style.top = rect.top - containerRect.top + containerScroll.top - (offset ? offset[1] : 0);
|
|
31224
|
-
setTransform(style, '');
|
|
31461
|
+
setTransform(style, 'translateX(0%)');
|
|
31225
31462
|
} else if (_v === 'bottom') {
|
|
31226
31463
|
style.top = rect.bottom - containerRect.top + containerScroll.top + (offset ? offset[1] : 0);
|
|
31227
31464
|
setTransform(style, 'translateY(-100%)');
|
|
@@ -31250,10 +31487,13 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31250
31487
|
};
|
|
31251
31488
|
var rect = context.parentRect;
|
|
31252
31489
|
var needCheck = !show || !shallow_equal(context.prevParentPosition, parentElNewPosition);
|
|
31490
|
+
var _getScrollPosition = getScrollPosition(scrollElRef === null || scrollElRef === void 0 ? void 0 : scrollElRef.current),
|
|
31491
|
+
scrollTop = _getScrollPosition.scrollTop,
|
|
31492
|
+
scrollLeft = _getScrollPosition.scrollLeft;
|
|
31253
31493
|
if (needCheck && scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current && (_scrollElRef$current = scrollElRef.current) !== null && _scrollElRef$current !== void 0 && _scrollElRef$current.contains(parentElRef.current)) {
|
|
31254
31494
|
var _scrollElRef$current2;
|
|
31255
31495
|
var visibleRect = ((_scrollElRef$current2 = scrollElRef.current) === null || _scrollElRef$current2 === void 0 ? void 0 : _scrollElRef$current2.getBoundingClientRect()) || {};
|
|
31256
|
-
if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
|
|
31496
|
+
if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom + scrollTop || rect.right < visibleRect.left || rect.left > visibleRect.right + scrollLeft) {
|
|
31257
31497
|
return {
|
|
31258
31498
|
style: hideStyle
|
|
31259
31499
|
};
|
|
@@ -31326,7 +31566,9 @@ var usePositionStyle = function usePositionStyle(config) {
|
|
|
31326
31566
|
}
|
|
31327
31567
|
|
|
31328
31568
|
// 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
|
|
31329
|
-
|
|
31569
|
+
if (show) {
|
|
31570
|
+
context.prevParentPosition = parentElNewPosition;
|
|
31571
|
+
}
|
|
31330
31572
|
});
|
|
31331
31573
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize]);
|
|
31332
31574
|
return {
|
|
@@ -32008,12 +32250,12 @@ var AbsoluteList = function AbsoluteList(props) {
|
|
|
32008
32250
|
return scrollElRefProp || scrollElRefContext || closestScrollContainerRef;
|
|
32009
32251
|
}, [scrollElRefProp, scrollElRefContext]);
|
|
32010
32252
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
32011
|
-
if (scrollElRefProp || scrollElRefContext) return;
|
|
32253
|
+
if (scrollElRefProp || scrollElRefContext || !focus) return;
|
|
32012
32254
|
var closestScrollContainer = getClosestScrollContainer(parentElRef.current);
|
|
32013
32255
|
if (closestScrollContainer) {
|
|
32014
32256
|
closestScrollContainerRef.current = closestScrollContainer;
|
|
32015
32257
|
}
|
|
32016
|
-
}, [parentElRef, scrollElRefProp, scrollElRefContext]);
|
|
32258
|
+
}, [parentElRef, scrollElRefProp, scrollElRefContext, focus]);
|
|
32017
32259
|
var _usePositionStyle = usePositionStyle({
|
|
32018
32260
|
getContainer: getRoot,
|
|
32019
32261
|
position: position,
|
|
@@ -32299,7 +32541,7 @@ var AvatarGroup = function AvatarGroup(props) {
|
|
|
32299
32541
|
children: childrenHidden
|
|
32300
32542
|
})
|
|
32301
32543
|
}))]
|
|
32302
|
-
}));
|
|
32544
|
+
}, "more-avatar"));
|
|
32303
32545
|
}
|
|
32304
32546
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(AvatarProvider, {
|
|
32305
32547
|
shape: shape,
|
|
@@ -32898,6 +33140,225 @@ var List = function List(props) {
|
|
|
32898
33140
|
}));
|
|
32899
33141
|
};
|
|
32900
33142
|
/* harmony default export */ var breadcrumb_list = (List);
|
|
33143
|
+
;// CONCATENATED MODULE: ../base/src/tooltip/tooltip.tsx
|
|
33144
|
+
|
|
33145
|
+
|
|
33146
|
+
|
|
33147
|
+
|
|
33148
|
+
|
|
33149
|
+
|
|
33150
|
+
|
|
33151
|
+
|
|
33152
|
+
|
|
33153
|
+
|
|
33154
|
+
var tooltip_devUseWarning = devUseWarning;
|
|
33155
|
+
var defaultDelay = 0;
|
|
33156
|
+
var Tooltip = function Tooltip(props) {
|
|
33157
|
+
var _jssStyle$tooltip, _config$tooltip;
|
|
33158
|
+
var _props$trigger = props.trigger,
|
|
33159
|
+
trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
|
|
33160
|
+
priorityDirection = props.priorityDirection,
|
|
33161
|
+
children = props.children,
|
|
33162
|
+
tip = props.tip,
|
|
33163
|
+
disabledChild = props.disabledChild,
|
|
33164
|
+
jssStyle = props.jssStyle,
|
|
33165
|
+
className = props.className,
|
|
33166
|
+
style = props.style,
|
|
33167
|
+
zIndex = props.zIndex,
|
|
33168
|
+
_props$showArrow = props.showArrow,
|
|
33169
|
+
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
|
|
33170
|
+
persistentProp = props.persistent,
|
|
33171
|
+
_props$type = props.type,
|
|
33172
|
+
type = _props$type === void 0 ? 'default' : _props$type,
|
|
33173
|
+
_props$position = props.position,
|
|
33174
|
+
popsitionProps = _props$position === void 0 ? 'auto' : _props$position,
|
|
33175
|
+
_props$popupGap = props.popupGap,
|
|
33176
|
+
popupGap = _props$popupGap === void 0 ? 0 : _props$popupGap;
|
|
33177
|
+
var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
|
|
33178
|
+
var config = useConfig();
|
|
33179
|
+
var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
|
|
33180
|
+
var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
|
|
33181
|
+
var delay = props.delay || props.mouseEnterDelay || defaultDelay;
|
|
33182
|
+
var _usePopup = use_popup({
|
|
33183
|
+
position: popsitionProps,
|
|
33184
|
+
trigger: trigger,
|
|
33185
|
+
autoMode: 'popover',
|
|
33186
|
+
priorityDirection: priorityDirection,
|
|
33187
|
+
mouseEnterDelay: delay,
|
|
33188
|
+
targetEvents: disabledChild ? {} : childrenProps
|
|
33189
|
+
}),
|
|
33190
|
+
open = _usePopup.open,
|
|
33191
|
+
position = _usePopup.position,
|
|
33192
|
+
getTargetProps = _usePopup.getTargetProps,
|
|
33193
|
+
targetRef = _usePopup.targetRef,
|
|
33194
|
+
popupRef = _usePopup.popupRef,
|
|
33195
|
+
closePop = _usePopup.closePop;
|
|
33196
|
+
var events = getTargetProps();
|
|
33197
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
33198
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
33199
|
+
updateKey = _React$useState2[0],
|
|
33200
|
+
setUpdateKey = _React$useState2[1];
|
|
33201
|
+
var handleUpdateKey = usePersistFn(function () {
|
|
33202
|
+
setUpdateKey(function (prev) {
|
|
33203
|
+
return (prev + 1) % 2;
|
|
33204
|
+
});
|
|
33205
|
+
});
|
|
33206
|
+
var bindEvents = function bindEvents() {
|
|
33207
|
+
var _window;
|
|
33208
|
+
var targetEl = targetRef.current;
|
|
33209
|
+
if (!targetEl) return;
|
|
33210
|
+
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
33211
|
+
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
33212
|
+
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
33213
|
+
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
33214
|
+
};
|
|
33215
|
+
var unbindEvents = function unbindEvents() {
|
|
33216
|
+
var _window2;
|
|
33217
|
+
var targetEl = targetRef.current;
|
|
33218
|
+
if (!targetEl) return;
|
|
33219
|
+
var events = getTargetProps();
|
|
33220
|
+
if (events.onMouseEnter) targetEl.removeEventListener('mouseenter', events.onMouseEnter);
|
|
33221
|
+
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
33222
|
+
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
33223
|
+
targetEl.removeEventListener('click', closePop);
|
|
33224
|
+
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
33225
|
+
};
|
|
33226
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
33227
|
+
if (!persistent) return;
|
|
33228
|
+
bindEvents();
|
|
33229
|
+
return function () {
|
|
33230
|
+
unbindEvents();
|
|
33231
|
+
};
|
|
33232
|
+
}, [persistent]);
|
|
33233
|
+
if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
|
|
33234
|
+
tooltip_devUseWarning.error('Tooltip children expect a single ReactElement.');
|
|
33235
|
+
return null;
|
|
33236
|
+
}
|
|
33237
|
+
if (!tip) return children;
|
|
33238
|
+
var inner = disabledChild ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
33239
|
+
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.target,
|
|
33240
|
+
style: {
|
|
33241
|
+
cursor: 'not-allowed'
|
|
33242
|
+
},
|
|
33243
|
+
children: /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
33244
|
+
style: objectSpread2_default()(objectSpread2_default()({}, childrenProps.style), {}, {
|
|
33245
|
+
pointerEvents: 'none'
|
|
33246
|
+
})
|
|
33247
|
+
})
|
|
33248
|
+
}) : children;
|
|
33249
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
33250
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
|
|
33251
|
+
ref: function ref(el) {
|
|
33252
|
+
if (!el) return;
|
|
33253
|
+
var targetEl = el.nextElementSibling;
|
|
33254
|
+
if (!targetEl) return;
|
|
33255
|
+
if (targetRef.current === targetEl) return;
|
|
33256
|
+
targetRef.current = targetEl;
|
|
33257
|
+
}
|
|
33258
|
+
}, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, events), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
33259
|
+
focus: open,
|
|
33260
|
+
parentElRef: targetRef,
|
|
33261
|
+
popupElRef: popupRef,
|
|
33262
|
+
absolute: true,
|
|
33263
|
+
position: position,
|
|
33264
|
+
fixedWidth: false,
|
|
33265
|
+
popupGap: popupGap,
|
|
33266
|
+
zIndex: zIndex,
|
|
33267
|
+
adjust: popsitionProps === 'auto',
|
|
33268
|
+
updateKey: updateKey,
|
|
33269
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
33270
|
+
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
|
|
33271
|
+
style: {
|
|
33272
|
+
pointerEvents: persistent ? 'initial' : undefined
|
|
33273
|
+
}
|
|
33274
|
+
}, getDataAttribute({
|
|
33275
|
+
type: type,
|
|
33276
|
+
position: position
|
|
33277
|
+
})), {}, {
|
|
33278
|
+
ref: popupRef,
|
|
33279
|
+
onMouseLeave: events.onMouseLeave,
|
|
33280
|
+
dir: config.direction,
|
|
33281
|
+
children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
33282
|
+
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
|
|
33283
|
+
}, getDataAttribute({
|
|
33284
|
+
role: 'arrow'
|
|
33285
|
+
}))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
33286
|
+
style: style,
|
|
33287
|
+
className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
|
|
33288
|
+
children: tip
|
|
33289
|
+
})]
|
|
33290
|
+
}))
|
|
33291
|
+
})]
|
|
33292
|
+
});
|
|
33293
|
+
};
|
|
33294
|
+
/* harmony default export */ var src_tooltip_tooltip = (Tooltip);
|
|
33295
|
+
;// CONCATENATED MODULE: ../base/src/breadcrumb/breadcrumb-item.tsx
|
|
33296
|
+
|
|
33297
|
+
|
|
33298
|
+
|
|
33299
|
+
|
|
33300
|
+
|
|
33301
|
+
|
|
33302
|
+
|
|
33303
|
+
|
|
33304
|
+
var BreadcrumbItem = function BreadcrumbItem(_ref) {
|
|
33305
|
+
var _jssStyle$breadcrumb;
|
|
33306
|
+
var dataItem = _ref.dataItem,
|
|
33307
|
+
renderItem = _ref.renderItem,
|
|
33308
|
+
jssStyle = _ref.jssStyle,
|
|
33309
|
+
max = _ref.max;
|
|
33310
|
+
var contentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
33311
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
33312
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
33313
|
+
isOverflow = _useState2[0],
|
|
33314
|
+
setIsOverflow = _useState2[1];
|
|
33315
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
33316
|
+
if (contentRef.current && max !== undefined) {
|
|
33317
|
+
setIsOverflow(contentRef.current.offsetWidth > 150);
|
|
33318
|
+
}
|
|
33319
|
+
}, [max, dataItem]);
|
|
33320
|
+
var breadcrumbClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$breadcrumb = jssStyle.breadcrumb) === null || _jssStyle$breadcrumb === void 0 ? void 0 : _jssStyle$breadcrumb.call(jssStyle);
|
|
33321
|
+
var contentClass = classnames_default()(breadcrumbClasses.content, isOverflow && (breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.contentMaxWidth));
|
|
33322
|
+
var d = dataItem;
|
|
33323
|
+
var item = d.title;
|
|
33324
|
+
if (! /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(item)) {
|
|
33325
|
+
if (d.onClick || d.url) {
|
|
33326
|
+
var props = {
|
|
33327
|
+
onClick: d.onClick
|
|
33328
|
+
};
|
|
33329
|
+
if (d.url) props.href = d.url;
|
|
33330
|
+
item = /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
33331
|
+
className: contentClass,
|
|
33332
|
+
role: "button",
|
|
33333
|
+
ref: contentRef,
|
|
33334
|
+
children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
33335
|
+
children: "\xA0"
|
|
33336
|
+
}), d.title]
|
|
33337
|
+
}));
|
|
33338
|
+
} else {
|
|
33339
|
+
item = /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
33340
|
+
className: contentClass,
|
|
33341
|
+
ref: contentRef,
|
|
33342
|
+
children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
33343
|
+
children: "\xA0"
|
|
33344
|
+
}), d.title]
|
|
33345
|
+
});
|
|
33346
|
+
}
|
|
33347
|
+
}
|
|
33348
|
+
if (renderItem) {
|
|
33349
|
+
return renderItem(dataItem);
|
|
33350
|
+
}
|
|
33351
|
+
if (isOverflow && d.title && max !== undefined) {
|
|
33352
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tooltip_tooltip, {
|
|
33353
|
+
jssStyle: jssStyle,
|
|
33354
|
+
type: "light",
|
|
33355
|
+
tip: d.title,
|
|
33356
|
+
children: item
|
|
33357
|
+
});
|
|
33358
|
+
}
|
|
33359
|
+
return item;
|
|
33360
|
+
};
|
|
33361
|
+
/* harmony default export */ var breadcrumb_item = (BreadcrumbItem);
|
|
32901
33362
|
;// CONCATENATED MODULE: ../base/src/breadcrumb/breadcrumb.tsx
|
|
32902
33363
|
|
|
32903
33364
|
|
|
@@ -32908,6 +33369,7 @@ var List = function List(props) {
|
|
|
32908
33369
|
|
|
32909
33370
|
|
|
32910
33371
|
|
|
33372
|
+
|
|
32911
33373
|
var breadcrumb_getKey = getKey;
|
|
32912
33374
|
var Breadcrumb = function Breadcrumb(props) {
|
|
32913
33375
|
var _props$jssStyle, _props$jssStyle$bread;
|
|
@@ -32918,32 +33380,14 @@ var Breadcrumb = function Breadcrumb(props) {
|
|
|
32918
33380
|
_props$maxHeight = props.maxHeight,
|
|
32919
33381
|
maxHeight = _props$maxHeight === void 0 ? '50vh' : _props$maxHeight;
|
|
32920
33382
|
var breadcrumbClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$bread = _props$jssStyle.breadcrumb) === null || _props$jssStyle$bread === void 0 ? void 0 : _props$jssStyle$bread.call(_props$jssStyle);
|
|
33383
|
+
var maxCount = props.max ? Math.max(2, props.max) : undefined;
|
|
32921
33384
|
var renderItem = function renderItem(dataItem) {
|
|
32922
|
-
|
|
32923
|
-
|
|
32924
|
-
|
|
32925
|
-
|
|
32926
|
-
|
|
32927
|
-
|
|
32928
|
-
};
|
|
32929
|
-
if (d.url) _props.href = d.url;
|
|
32930
|
-
item = /*#__PURE__*/(0,jsx_runtime.jsxs)("a", objectSpread2_default()(objectSpread2_default()({}, _props), {}, {
|
|
32931
|
-
className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
|
|
32932
|
-
role: "button",
|
|
32933
|
-
children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
32934
|
-
children: "\xA0"
|
|
32935
|
-
}), d.title]
|
|
32936
|
-
}));
|
|
32937
|
-
} else {
|
|
32938
|
-
item = /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
32939
|
-
className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content,
|
|
32940
|
-
children: [d.icon, d.icon && d.title && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
32941
|
-
children: "\xA0"
|
|
32942
|
-
}), d.title]
|
|
32943
|
-
});
|
|
32944
|
-
}
|
|
32945
|
-
}
|
|
32946
|
-
return props.renderItem ? props.renderItem(dataItem) : item;
|
|
33385
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_item, {
|
|
33386
|
+
dataItem: dataItem,
|
|
33387
|
+
renderItem: props.renderItem,
|
|
33388
|
+
jssStyle: props.jssStyle,
|
|
33389
|
+
max: maxCount
|
|
33390
|
+
});
|
|
32947
33391
|
};
|
|
32948
33392
|
var renderArray = function renderArray(data) {
|
|
32949
33393
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_list, {
|
|
@@ -32955,14 +33399,27 @@ var Breadcrumb = function Breadcrumb(props) {
|
|
|
32955
33399
|
};
|
|
32956
33400
|
var className = classnames_default()(breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.rootClass, breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.wrapper, props.className);
|
|
32957
33401
|
var getRenderData = function getRenderData() {
|
|
32958
|
-
if (!
|
|
32959
|
-
if (data.length <=
|
|
33402
|
+
if (!maxCount) return data;
|
|
33403
|
+
if (data.length <= maxCount) return data;
|
|
32960
33404
|
var first = data[0];
|
|
32961
|
-
var
|
|
33405
|
+
var sliceIndex = data.length - maxCount + 1;
|
|
33406
|
+
var reset = data.slice(sliceIndex);
|
|
33407
|
+
var moreData = data.slice(1, sliceIndex);
|
|
33408
|
+
var moreClassName = classnames_default()(props.className, breadcrumbClasses.wrapperPopover);
|
|
32962
33409
|
var more = {
|
|
32963
|
-
title: /*#__PURE__*/(0,jsx_runtime.
|
|
33410
|
+
title: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
32964
33411
|
className: classnames_default()(breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.content, breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.ellipsis),
|
|
32965
|
-
children: "..."
|
|
33412
|
+
children: ["...", /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
33413
|
+
jssStyle: props.jssStyle,
|
|
33414
|
+
useTextStyle: true,
|
|
33415
|
+
offset: [8, 0],
|
|
33416
|
+
popupGap: -4,
|
|
33417
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(Breadcrumb, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
33418
|
+
className: moreClassName,
|
|
33419
|
+
data: moreData,
|
|
33420
|
+
max: undefined
|
|
33421
|
+
}))
|
|
33422
|
+
})]
|
|
32966
33423
|
})
|
|
32967
33424
|
};
|
|
32968
33425
|
return [first, more].concat(toConsumableArray_default()(reset));
|
|
@@ -32972,10 +33429,15 @@ var Breadcrumb = function Breadcrumb(props) {
|
|
|
32972
33429
|
style: props.style,
|
|
32973
33430
|
children: data && getRenderData().map(function (d, index) {
|
|
32974
33431
|
var itemFirst = Array.isArray(d) ? d[0] : d;
|
|
32975
|
-
var isLastItem = index === (
|
|
33432
|
+
var isLastItem = index === (maxCount !== undefined ? maxCount : data.length - 1);
|
|
32976
33433
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
32977
33434
|
className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.item,
|
|
32978
|
-
children: [Array.isArray(d) ? renderArray(d) :
|
|
33435
|
+
children: [Array.isArray(d) ? renderArray(d) : /*#__PURE__*/(0,jsx_runtime.jsx)(breadcrumb_item, {
|
|
33436
|
+
dataItem: d,
|
|
33437
|
+
renderItem: renderItem,
|
|
33438
|
+
jssStyle: props.jssStyle,
|
|
33439
|
+
max: maxCount
|
|
33440
|
+
}), !isLastItem && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
32979
33441
|
className: breadcrumbClasses === null || breadcrumbClasses === void 0 ? void 0 : breadcrumbClasses.separator,
|
|
32980
33442
|
children: separator
|
|
32981
33443
|
})]
|
|
@@ -32992,7 +33454,8 @@ var Breadcrumb = function Breadcrumb(props) {
|
|
|
32992
33454
|
|
|
32993
33455
|
var breadcrumb_jssStyle = {
|
|
32994
33456
|
breadcrumb: useBreadcrumbStyle,
|
|
32995
|
-
popover: usePopoverStyle
|
|
33457
|
+
popover: usePopoverStyle,
|
|
33458
|
+
tooltip: useTooltipStyle
|
|
32996
33459
|
};
|
|
32997
33460
|
/* harmony default export */ var src_breadcrumb_breadcrumb_0 = (function (props) {
|
|
32998
33461
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_breadcrumb_breadcrumb, objectSpread2_default()({
|
|
@@ -33207,6 +33670,103 @@ function toNum(v) {
|
|
|
33207
33670
|
}
|
|
33208
33671
|
return 0;
|
|
33209
33672
|
}
|
|
33673
|
+
|
|
33674
|
+
/**
|
|
33675
|
+
* 在字符串层面实现四舍五入
|
|
33676
|
+
* @param {string} numStr 数字字符串
|
|
33677
|
+
* @param {number} precision 精度
|
|
33678
|
+
* @returns {string} 四舍五入后的字符串
|
|
33679
|
+
*/
|
|
33680
|
+
function roundString(numStr, precision) {
|
|
33681
|
+
if (precision < 0) return numStr;
|
|
33682
|
+
var parts = numStr.split('.');
|
|
33683
|
+
var intPart = parts[0];
|
|
33684
|
+
var decimalPart = parts[1] || '';
|
|
33685
|
+
if (decimalPart.length <= precision) {
|
|
33686
|
+
return intPart + (decimalPart ? ".".concat(decimalPart.padEnd(precision, '0')) : '');
|
|
33687
|
+
}
|
|
33688
|
+
|
|
33689
|
+
// 需要进行四舍五入
|
|
33690
|
+
var roundPos = precision;
|
|
33691
|
+
var carry = 0;
|
|
33692
|
+
|
|
33693
|
+
// 确定是否需要进位
|
|
33694
|
+
if (parseInt(decimalPart[roundPos], 10) >= 5) carry = 1;
|
|
33695
|
+
|
|
33696
|
+
// 如果不需要进位,直接截断
|
|
33697
|
+
if (carry === 0) {
|
|
33698
|
+
return intPart + (precision > 0 ? ".".concat(decimalPart.slice(0, precision)) : '');
|
|
33699
|
+
}
|
|
33700
|
+
|
|
33701
|
+
// 处理进位
|
|
33702
|
+
var digits = (intPart + (decimalPart ? ".".concat(decimalPart) : '')).replace('.', '').split('');
|
|
33703
|
+
var dotPos = intPart.length;
|
|
33704
|
+
|
|
33705
|
+
// 从小数位开始向前进位
|
|
33706
|
+
var i = dotPos + precision - 1;
|
|
33707
|
+
while (carry > 0 && i >= 0) {
|
|
33708
|
+
// 跳过小数点
|
|
33709
|
+
if (i === dotPos - 1) {
|
|
33710
|
+
i -= 1;
|
|
33711
|
+
continue;
|
|
33712
|
+
}
|
|
33713
|
+
var d = parseInt(digits[i], 10) + carry;
|
|
33714
|
+
digits[i] = (d % 10).toString();
|
|
33715
|
+
carry = Math.floor(d / 10);
|
|
33716
|
+
i -= 1;
|
|
33717
|
+
}
|
|
33718
|
+
|
|
33719
|
+
// 处理最高位进位
|
|
33720
|
+
var result = '';
|
|
33721
|
+
if (carry > 0) result = '1';
|
|
33722
|
+
|
|
33723
|
+
// 重建数字字符串
|
|
33724
|
+
for (var j = 0; j < digits.length; j++) {
|
|
33725
|
+
// 插入小数点
|
|
33726
|
+
if (j === dotPos && precision > 0) result += '.';
|
|
33727
|
+
// 只添加到所需精度
|
|
33728
|
+
if (j < dotPos || j < dotPos + precision) {
|
|
33729
|
+
result += digits[j];
|
|
33730
|
+
}
|
|
33731
|
+
}
|
|
33732
|
+
return result;
|
|
33733
|
+
}
|
|
33734
|
+
|
|
33735
|
+
/**
|
|
33736
|
+
* 格式化数字字符串到指定小数位
|
|
33737
|
+
* @param {string} value 数字字符串
|
|
33738
|
+
* @param {number} precision 小数位数
|
|
33739
|
+
* @returns {string} 格式化后的字符串
|
|
33740
|
+
* @example
|
|
33741
|
+
* console.log(preciseString('111111111111111.888', 2)) // "111111111111111.89"
|
|
33742
|
+
* console.log(preciseString('9.999', 2)) // "10.00"
|
|
33743
|
+
*/
|
|
33744
|
+
var preciseString = function preciseString(value) {
|
|
33745
|
+
var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
|
|
33746
|
+
// 如果不是数字字符串,则返回原值
|
|
33747
|
+
if (!/^-?\d+(\.\d+)?$/.test(value)) {
|
|
33748
|
+
return value;
|
|
33749
|
+
}
|
|
33750
|
+
|
|
33751
|
+
// 如果不需要格式化精度,直接返回
|
|
33752
|
+
if (precision < 0) return value;
|
|
33753
|
+
|
|
33754
|
+
// 分离整数和小数部分
|
|
33755
|
+
var parts = value.split('.');
|
|
33756
|
+
var intPart = parts[0];
|
|
33757
|
+
var decimalPart = parts[1] || '';
|
|
33758
|
+
|
|
33759
|
+
// 截断或补零
|
|
33760
|
+
if (decimalPart.length > precision) {
|
|
33761
|
+
// 需要四舍五入
|
|
33762
|
+
if (precision < decimalPart.length && parseInt(decimalPart[precision], 10) >= 5) {
|
|
33763
|
+
// 手动实现字符串层面的四舍五入
|
|
33764
|
+
return roundString("".concat(intPart, ".").concat(decimalPart), precision);
|
|
33765
|
+
}
|
|
33766
|
+
return intPart + (precision > 0 ? ".".concat(decimalPart.slice(0, precision)) : '');
|
|
33767
|
+
}
|
|
33768
|
+
return intPart + (precision > 0 ? ".".concat(decimalPart.padEnd(precision, '0')) : '');
|
|
33769
|
+
};
|
|
33210
33770
|
;// CONCATENATED MODULE: ../base/src/spin/base.tsx
|
|
33211
33771
|
|
|
33212
33772
|
|
|
@@ -35174,6 +35734,26 @@ var getCompleteFieldKeys = function getCompleteFieldKeys(fields, allFields) {
|
|
|
35174
35734
|
// 返回之前去重
|
|
35175
35735
|
return Array.from(new Set(completeFields));
|
|
35176
35736
|
};
|
|
35737
|
+
|
|
35738
|
+
/**
|
|
35739
|
+
* 将对象中的所有值设置为空, 如果值是数组,重置为空数组,如果是对象,重置为空对象,如果是基础类型,重置为undefined
|
|
35740
|
+
* @param obj 对象
|
|
35741
|
+
* @returns 空对象
|
|
35742
|
+
*/
|
|
35743
|
+
var clearValue = function clearValue(obj) {
|
|
35744
|
+
if (isArray(obj)) {
|
|
35745
|
+
return obj.map(function (item) {
|
|
35746
|
+
return clearValue(item);
|
|
35747
|
+
});
|
|
35748
|
+
}
|
|
35749
|
+
if (is_isObject(obj)) {
|
|
35750
|
+
return Object.keys(obj).reduce(function (acc, key) {
|
|
35751
|
+
acc[key] = clearValue(obj[key]);
|
|
35752
|
+
return acc;
|
|
35753
|
+
}, {});
|
|
35754
|
+
}
|
|
35755
|
+
return undefined;
|
|
35756
|
+
};
|
|
35177
35757
|
;// CONCATENATED MODULE: ../hooks/src/components/use-check/use-check.ts
|
|
35178
35758
|
|
|
35179
35759
|
|
|
@@ -35565,7 +36145,10 @@ var useInput = function useInput(params) {
|
|
|
35565
36145
|
(_otherHandlers$onFocu = otherHandlers.onFocus) === null || _otherHandlers$onFocu === void 0 || _otherHandlers$onFocu.call(otherHandlers, event);
|
|
35566
36146
|
setFocused(true);
|
|
35567
36147
|
if (autoSelect) {
|
|
35568
|
-
|
|
36148
|
+
// why requestAnimationFrame: 当在文字身体上hover后立即点击,select()与浏览器的光标定位逻辑产生竞争,有可能导致只选中的部分文本,所以需要延迟一下
|
|
36149
|
+
requestAnimationFrame(function () {
|
|
36150
|
+
event.target.select();
|
|
36151
|
+
});
|
|
35569
36152
|
}
|
|
35570
36153
|
};
|
|
35571
36154
|
};
|
|
@@ -35668,7 +36251,7 @@ var simple_input_excluded = ["jssStyle", "className", "style", "status", "clearI
|
|
|
35668
36251
|
|
|
35669
36252
|
|
|
35670
36253
|
var Input = function Input(props) {
|
|
35671
|
-
var _jssStyle$input;
|
|
36254
|
+
var _jssStyle$input, _inputElProps$value;
|
|
35672
36255
|
var jssStyle = props.jssStyle,
|
|
35673
36256
|
className = props.className,
|
|
35674
36257
|
style = props.style,
|
|
@@ -35686,20 +36269,41 @@ var Input = function Input(props) {
|
|
|
35686
36269
|
addEnd = props.addEnd,
|
|
35687
36270
|
hasSuffix = props.hasSuffix,
|
|
35688
36271
|
rest = objectWithoutProperties_default()(props, simple_input_excluded);
|
|
36272
|
+
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
36273
|
+
needTriggerEnter: false
|
|
36274
|
+
}),
|
|
36275
|
+
context = _useRef.current;
|
|
35689
36276
|
var inputStyle = jssStyle === null || jssStyle === void 0 || (_jssStyle$input = jssStyle.input) === null || _jssStyle$input === void 0 ? void 0 : _jssStyle$input.call(jssStyle);
|
|
35690
36277
|
var config = useConfig();
|
|
35691
36278
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
35692
36279
|
fieldId = _useContext.fieldId;
|
|
36280
|
+
var showClearFromProp = props.showClear && !props.disabled;
|
|
35693
36281
|
var _useInput = use_input(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
35694
|
-
onFocusedChange: onFocusedChange
|
|
36282
|
+
onFocusedChange: onFocusedChange,
|
|
36283
|
+
// 由于form的原生submit事件是在keydown中触发的,submit校验后触发scrollToError会导致当前焦点的input立即失焦,导致input的回车事件无法触发
|
|
36284
|
+
// 所以这里在onKeyDown时机记录下needTriggerEnter标志,在onBlur时机判断是否需要触发onEnterPress
|
|
36285
|
+
onKeyDown: function onKeyDown(e) {
|
|
36286
|
+
var _props$onKeyDown;
|
|
36287
|
+
if (e.key === 'Enter') {
|
|
36288
|
+
context.needTriggerEnter = true;
|
|
36289
|
+
}
|
|
36290
|
+
(_props$onKeyDown = props.onKeyDown) === null || _props$onKeyDown === void 0 || _props$onKeyDown.call(props, e);
|
|
36291
|
+
},
|
|
36292
|
+
onBlur: function onBlur(e) {
|
|
36293
|
+
var _props$onBlur;
|
|
36294
|
+
if (context.needTriggerEnter) {
|
|
36295
|
+
context.needTriggerEnter = false;
|
|
36296
|
+
_onEnterPress === null || _onEnterPress === void 0 || _onEnterPress(e.target.value || '', e);
|
|
36297
|
+
}
|
|
36298
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
36299
|
+
}
|
|
35695
36300
|
})),
|
|
35696
36301
|
getRootProps = _useInput.getRootProps,
|
|
35697
36302
|
getClearProps = _useInput.getClearProps,
|
|
35698
36303
|
getInputProps = _useInput.getInputProps,
|
|
35699
|
-
|
|
36304
|
+
showClearFromClearable = _useInput.showClear,
|
|
35700
36305
|
focused = _useInput.focused,
|
|
35701
36306
|
disabled = _useInput.disabled;
|
|
35702
|
-
var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.rootClass, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapper, !!focused && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperFocus), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperDisabled), status === 'error' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperError), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperLarge), !!underline && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperUnderline), !border && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperNoBorder), hasSuffix && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.password));
|
|
35703
36307
|
var keyHandler = useKeyEvent({
|
|
35704
36308
|
onEnterPress: function onEnterPress(e) {
|
|
35705
36309
|
_onEnterPress === null || _onEnterPress === void 0 || _onEnterPress(e.target.value || '', e);
|
|
@@ -35707,6 +36311,10 @@ var Input = function Input(props) {
|
|
|
35707
36311
|
});
|
|
35708
36312
|
var onKeyUp = usePersistFn(function (e) {
|
|
35709
36313
|
var _props$onKeyUp;
|
|
36314
|
+
if (e.key === 'Enter') {
|
|
36315
|
+
context.needTriggerEnter = false;
|
|
36316
|
+
}
|
|
36317
|
+
;
|
|
35710
36318
|
(_props$onKeyUp = props.onKeyUp) === null || _props$onKeyUp === void 0 || _props$onKeyUp.call(props, e);
|
|
35711
36319
|
keyHandler(e);
|
|
35712
36320
|
});
|
|
@@ -35723,6 +36331,7 @@ var Input = function Input(props) {
|
|
|
35723
36331
|
if (typeof renderInput === 'function') {
|
|
35724
36332
|
inputEl = renderInput(inputEl);
|
|
35725
36333
|
}
|
|
36334
|
+
var rootClass = classnames_default()(className, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.rootClass, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapper, !!focused && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperFocus), !!disabled && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperDisabled), status === 'error' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperError), size === 'small' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperSmall), size === 'large' && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperLarge), !!underline && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperUnderline), !border && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperNoBorder), hasSuffix && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.password), showClearFromProp && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperShowClear), showClearFromProp && ((_inputElProps$value = inputElProps.value) === null || _inputElProps$value === void 0 ? void 0 : _inputElProps$value.length) > 0 && (inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperHasValue));
|
|
35726
36335
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
|
|
35727
36336
|
id: fieldId
|
|
35728
36337
|
}, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), getRootProps({
|
|
@@ -35731,7 +36340,7 @@ var Input = function Input(props) {
|
|
|
35731
36340
|
})), {}, {
|
|
35732
36341
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
35733
36342
|
className: classnames_default()(inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperInnerTitleTop, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperInnerTitleBottom, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.wrapperPaddingBox, inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.content),
|
|
35734
|
-
children: [prefix, inputEl,
|
|
36343
|
+
children: [prefix, inputEl, (showClearFromProp || showClearFromClearable) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
35735
36344
|
className: inputStyle === null || inputStyle === void 0 ? void 0 : inputStyle.clearWrapper
|
|
35736
36345
|
}, getClearProps()), {}, {
|
|
35737
36346
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
@@ -35749,6 +36358,7 @@ Input.displayName = 'SimpleInput';
|
|
|
35749
36358
|
|
|
35750
36359
|
|
|
35751
36360
|
|
|
36361
|
+
|
|
35752
36362
|
function regLength(size) {
|
|
35753
36363
|
return /\d+/.test(String(size)) && size > 0 ? "{0,".concat(size, "}") : '*';
|
|
35754
36364
|
}
|
|
@@ -35832,7 +36442,7 @@ var useInputFormat = function useInputFormat(props) {
|
|
|
35832
36442
|
if (numType === 'positive' && Number(value) <= 0) value = '';
|
|
35833
36443
|
if (digits !== undefined && autoFix) {
|
|
35834
36444
|
if (digits > 0) {
|
|
35835
|
-
value =
|
|
36445
|
+
value = preciseString(value, digits);
|
|
35836
36446
|
} else if (digits === 0) {
|
|
35837
36447
|
value = parseInt(value, 10).toString();
|
|
35838
36448
|
}
|
|
@@ -36067,9 +36677,11 @@ function escapeRegExp() {
|
|
|
36067
36677
|
timeOfDayValues: ['上午', '下午'],
|
|
36068
36678
|
ok: '确定',
|
|
36069
36679
|
cancel: '取消',
|
|
36680
|
+
reset: '重置',
|
|
36070
36681
|
noData: '暂无数据',
|
|
36071
36682
|
selectAll: '全选',
|
|
36072
36683
|
loading: '加载中...',
|
|
36684
|
+
searchPlaceholder: '在筛选项中搜索',
|
|
36073
36685
|
rules: {
|
|
36074
36686
|
required: {
|
|
36075
36687
|
array: '{title} 不能为空',
|
|
@@ -36094,6 +36706,7 @@ function escapeRegExp() {
|
|
|
36094
36706
|
search: '搜索',
|
|
36095
36707
|
urlInvalidMsg: '图片格式不正确,请重新上传',
|
|
36096
36708
|
invalidAccept: '文件格式不正确',
|
|
36709
|
+
invalidImage: '图片格式不正确',
|
|
36097
36710
|
notFound: '未找到'
|
|
36098
36711
|
});
|
|
36099
36712
|
;// CONCATENATED MODULE: ../base/src/config/locale/en_US.ts
|
|
@@ -36132,9 +36745,11 @@ function escapeRegExp() {
|
|
|
36132
36745
|
timeOfDayValues: ['a.m.', 'p.m.'],
|
|
36133
36746
|
ok: 'Ok',
|
|
36134
36747
|
cancel: 'Cancel',
|
|
36748
|
+
reset: 'Reset',
|
|
36135
36749
|
noData: 'Data not found',
|
|
36136
36750
|
selectAll: 'Select All',
|
|
36137
36751
|
loading: 'loading...',
|
|
36752
|
+
searchPlaceholder: 'Search in filter options',
|
|
36138
36753
|
rules: {
|
|
36139
36754
|
required: {
|
|
36140
36755
|
array: 'Please select {title}',
|
|
@@ -36159,6 +36774,7 @@ function escapeRegExp() {
|
|
|
36159
36774
|
search: 'search',
|
|
36160
36775
|
urlInvalidMsg: 'Picture format is incorrect, please upload again',
|
|
36161
36776
|
invalidAccept: 'Invalid file format',
|
|
36777
|
+
invalidImage: 'Invalid image format',
|
|
36162
36778
|
notFound: 'not found'
|
|
36163
36779
|
});
|
|
36164
36780
|
;// CONCATENATED MODULE: ../base/src/config/locale/index.ts
|
|
@@ -36255,7 +36871,7 @@ var useTip = function useTip(props) {
|
|
|
36255
36871
|
if (tip && focused || popover && errorMessage) {
|
|
36256
36872
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, objectSpread2_default()(objectSpread2_default()({
|
|
36257
36873
|
jssStyle: jssStyle,
|
|
36258
|
-
getPopupContainer: function
|
|
36874
|
+
getPopupContainer: (popoverProps === null || popoverProps === void 0 ? void 0 : popoverProps.getPopupContainer) || function () {
|
|
36259
36875
|
return rootRef.current;
|
|
36260
36876
|
},
|
|
36261
36877
|
useTextStyle: true
|
|
@@ -36300,6 +36916,7 @@ var useWithFormConfig = function useWithFormConfig(props) {
|
|
|
36300
36916
|
|
|
36301
36917
|
|
|
36302
36918
|
|
|
36919
|
+
|
|
36303
36920
|
var use_input_common_excluded = ["forwardRef", "forwardedRef", "htmlName", "value", "onChange", "defaultValue", "beforeChange", "clearable", "clearToUndefined", "style", "suffix", "info", "innerTitle", "placeTitle", "width", "delay", "onBlur", "tip", "error", "popover", "popoverProps", "status", "disabled", "size"];
|
|
36304
36921
|
|
|
36305
36922
|
|
|
@@ -36318,7 +36935,7 @@ var defaultInfo = function defaultInfo(num, msg) {
|
|
|
36318
36935
|
return new Error(text);
|
|
36319
36936
|
};
|
|
36320
36937
|
var useInputCommon = function useInputCommon(props0) {
|
|
36321
|
-
var _ref, _props$jssStyle, _props$jssStyle$input;
|
|
36938
|
+
var _ref, _props$jssStyle, _props$jssStyle$input, _infoState$error;
|
|
36322
36939
|
var config = useConfig();
|
|
36323
36940
|
var props = use_with_form_config(props0);
|
|
36324
36941
|
var forwardRef = props.forwardRef,
|
|
@@ -36347,7 +36964,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36347
36964
|
size = props.size,
|
|
36348
36965
|
rest = objectWithoutProperties_default()(props, use_input_common_excluded);
|
|
36349
36966
|
var delay = (_ref = delayProps !== null && delayProps !== void 0 ? delayProps : config.delay) !== null && _ref !== void 0 ? _ref : 0;
|
|
36350
|
-
var
|
|
36967
|
+
var inputClasses = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$input = _props$jssStyle.input) === null || _props$jssStyle$input === void 0 ? void 0 : _props$jssStyle$input.call(_props$jssStyle);
|
|
36351
36968
|
var rootRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
|
|
36352
36969
|
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
|
|
36353
36970
|
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
@@ -36389,27 +37006,50 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36389
37006
|
value: inputAbleProps.value,
|
|
36390
37007
|
onChange: inputAbleProps.onChange
|
|
36391
37008
|
});
|
|
36392
|
-
var
|
|
37009
|
+
var getInfoState = function getInfoState() {
|
|
36393
37010
|
var notNumber = typeof info !== 'number';
|
|
36394
|
-
if (typeof info !== 'function' && notNumber) return null;
|
|
36395
|
-
var
|
|
36396
|
-
|
|
36397
|
-
|
|
36398
|
-
|
|
36399
|
-
|
|
36400
|
-
|
|
37011
|
+
if (typeof info !== 'function' && typeof_default()(info) !== 'object' && notNumber) return null;
|
|
37012
|
+
var infoContent;
|
|
37013
|
+
if (typeof_default()(info) === 'object') {
|
|
37014
|
+
infoContent = info.content;
|
|
37015
|
+
} else {
|
|
37016
|
+
infoContent = info;
|
|
37017
|
+
}
|
|
37018
|
+
var notContentNumber = typeof infoContent !== 'number';
|
|
37019
|
+
var textInfo = notContentNumber ? infoContent : defaultInfo.bind(null, infoContent);
|
|
37020
|
+
var error = textInfo(inputAbleProps.value);
|
|
37021
|
+
if (!error) return null;
|
|
37022
|
+
var isError = error instanceof Error;
|
|
37023
|
+
var text = isError ? error.message : error;
|
|
36401
37024
|
if (!isError && !focused) return null;
|
|
36402
|
-
return
|
|
37025
|
+
return {
|
|
37026
|
+
text: text,
|
|
37027
|
+
error: error
|
|
37028
|
+
};
|
|
37029
|
+
};
|
|
37030
|
+
var infoState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(getInfoState, [info, inputAbleProps.value, focused]);
|
|
37031
|
+
var infoPopoverProps = {
|
|
37032
|
+
popover: props.popover || (typeof_default()(info) === 'object' ? info.position : 'bottom-right'),
|
|
37033
|
+
popoverProps: Object.assign({
|
|
36403
37034
|
style: {
|
|
36404
|
-
|
|
37035
|
+
width: 'auto',
|
|
37036
|
+
fontSize: 12
|
|
36405
37037
|
},
|
|
36406
|
-
|
|
36407
|
-
|
|
36408
|
-
|
|
36409
|
-
|
|
37038
|
+
adjust: true
|
|
37039
|
+
}, props.popoverProps),
|
|
37040
|
+
error: infoState !== null && infoState !== void 0 && infoState.error && (infoState === null || infoState === void 0 ? void 0 : infoState.error) instanceof Error ? infoState === null || infoState === void 0 || (_infoState$error = infoState.error) === null || _infoState$error === void 0 ? void 0 : _infoState$error.message : undefined,
|
|
37041
|
+
tip: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
37042
|
+
className: inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.info,
|
|
37043
|
+
children: infoState === null || infoState === void 0 ? void 0 : infoState.text
|
|
37044
|
+
})
|
|
36410
37045
|
};
|
|
37046
|
+
var infoPopoverNode = use_tip(objectSpread2_default()(objectSpread2_default()({}, infoPopoverProps), {}, {
|
|
37047
|
+
focused: focused,
|
|
37048
|
+
rootRef: rootRef,
|
|
37049
|
+
jssStyle: props.jssStyle
|
|
37050
|
+
}));
|
|
36411
37051
|
var mergeSuffix = /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
36412
|
-
children: [suffix,
|
|
37052
|
+
children: [suffix, (infoState === null || infoState === void 0 ? void 0 : infoState.text) && infoPopoverNode, tipNode]
|
|
36413
37053
|
});
|
|
36414
37054
|
var onFocusedChange = usePersistFn(function (focused) {
|
|
36415
37055
|
setFocused(!!focused);
|
|
@@ -36425,7 +37065,7 @@ var useInputCommon = function useInputCommon(props0) {
|
|
|
36425
37065
|
});
|
|
36426
37066
|
return objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
|
|
36427
37067
|
value: inputAbleProps.value,
|
|
36428
|
-
className: classnames_default()(props.className, innerTitle && (
|
|
37068
|
+
className: classnames_default()(props.className, innerTitle && (inputClasses === null || inputClasses === void 0 ? void 0 : inputClasses.wrapperInnerTitle)),
|
|
36429
37069
|
onChange: inputAbleProps.onChange,
|
|
36430
37070
|
onBlur: handleBlur
|
|
36431
37071
|
}, clearProps), {}, {
|
|
@@ -36473,6 +37113,7 @@ var input_Input = function Input(props) {
|
|
|
36473
37113
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(simple_input, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, forwardProps), inputFormatProps), {}, {
|
|
36474
37114
|
value: (_inputFormatProps$val = inputFormatProps.value) !== null && _inputFormatProps$val !== void 0 ? _inputFormatProps$val : '',
|
|
36475
37115
|
hasSuffix: !!props.suffix,
|
|
37116
|
+
showClear: props.showClear,
|
|
36476
37117
|
onKeyDown: function onKeyDown(e) {
|
|
36477
37118
|
var _props$onKeyDown;
|
|
36478
37119
|
if (e.key === 'Enter' && !e.defaultPrevented) {
|
|
@@ -39123,9 +39764,9 @@ var useTree = function useTree(props) {
|
|
|
39123
39764
|
var _context$value;
|
|
39124
39765
|
if (mode !== MODE.MODE_0) return;
|
|
39125
39766
|
(_context$value = context.value) === null || _context$value === void 0 || _context$value.forEach(function (id) {
|
|
39126
|
-
var
|
|
39127
|
-
|
|
39128
|
-
if (children.length) {
|
|
39767
|
+
var node = context.pathMap.get(id);
|
|
39768
|
+
var children = node === null || node === void 0 ? void 0 : node.children;
|
|
39769
|
+
if (children && children.length) {
|
|
39129
39770
|
var noCheckedChildren = children.filter(function (cid) {
|
|
39130
39771
|
var _context$value2;
|
|
39131
39772
|
return !((_context$value2 = context.value) !== null && _context$value2 !== void 0 && _context$value2.includes(cid));
|
|
@@ -39236,14 +39877,18 @@ var useTree = function useTree(props) {
|
|
|
39236
39877
|
var getFlatData = function getFlatData() {
|
|
39237
39878
|
return context.dataFlat;
|
|
39238
39879
|
};
|
|
39239
|
-
var updateExpanded = usePersistFn(function (expanded) {
|
|
39880
|
+
var updateExpanded = usePersistFn(function (expanded, ignoreExpanded) {
|
|
39240
39881
|
var tempExpandMap = new Set(expanded);
|
|
39241
39882
|
if (!expanded) return;
|
|
39242
39883
|
if (virtual) {
|
|
39243
39884
|
expandedFlat(expanded);
|
|
39244
39885
|
}
|
|
39245
|
-
context.updateMap.forEach(function (
|
|
39246
|
-
|
|
39886
|
+
context.updateMap.forEach(function (call, id) {
|
|
39887
|
+
if (ignoreExpanded) {
|
|
39888
|
+
var nodeStatus = call('get', true);
|
|
39889
|
+
if (nodeStatus && nodeStatus.hasTriggered) return;
|
|
39890
|
+
}
|
|
39891
|
+
call('expanded', tempExpandMap.has(id));
|
|
39247
39892
|
});
|
|
39248
39893
|
});
|
|
39249
39894
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -39255,16 +39900,17 @@ var useTree = function useTree(props) {
|
|
|
39255
39900
|
}
|
|
39256
39901
|
});
|
|
39257
39902
|
onExpand(nextExpanded);
|
|
39903
|
+
updateExpanded(nextExpanded, true);
|
|
39258
39904
|
}
|
|
39259
|
-
}, [context.dataMap]);
|
|
39905
|
+
}, [context.dataMap, props.data]);
|
|
39260
39906
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
39261
39907
|
if (props.datum) return;
|
|
39262
39908
|
if (!dataUpdate) return;
|
|
39263
39909
|
setData(data);
|
|
39264
39910
|
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
|
39265
|
-
if (!shallowEqual(nextExpanded, expanded)) {
|
|
39911
|
+
if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
|
|
39266
39912
|
onExpand(nextExpanded);
|
|
39267
|
-
updateExpanded(nextExpanded);
|
|
39913
|
+
updateExpanded(nextExpanded, true);
|
|
39268
39914
|
}
|
|
39269
39915
|
updateInnerCheckStatus();
|
|
39270
39916
|
}, [props.data]);
|
|
@@ -39568,6 +40214,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
39568
40214
|
className = props.className,
|
|
39569
40215
|
lineHeight = props.lineHeight,
|
|
39570
40216
|
height = props.height,
|
|
40217
|
+
keepScrollTop = props.keepScrollTop,
|
|
39571
40218
|
keepScrollHeight = props.keepScrollHeight,
|
|
39572
40219
|
renderItem = props.renderItem,
|
|
39573
40220
|
customRenderItem = props.customRenderItem,
|
|
@@ -39603,7 +40250,8 @@ var VirtualList = function VirtualList(props) {
|
|
|
39603
40250
|
preIndex: null,
|
|
39604
40251
|
topTimer: null,
|
|
39605
40252
|
rateTimer: null,
|
|
39606
|
-
shouldUpdateHeight: true
|
|
40253
|
+
shouldUpdateHeight: true,
|
|
40254
|
+
prevWrapperRefHeight: 0
|
|
39607
40255
|
}),
|
|
39608
40256
|
context = _useRef.current;
|
|
39609
40257
|
var getContentHeight = function getContentHeight(index) {
|
|
@@ -39763,10 +40411,14 @@ var VirtualList = function VirtualList(props) {
|
|
|
39763
40411
|
context.preIndex = startIndex;
|
|
39764
40412
|
}, [startIndex]);
|
|
39765
40413
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
39766
|
-
|
|
40414
|
+
var _wrapperRef$current2;
|
|
40415
|
+
var currentWrapperRefHeight = ((_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 ? void 0 : _wrapperRef$current2.clientHeight) || 0;
|
|
40416
|
+
if (keepScrollHeight && currentWrapperRefHeight === context.prevWrapperRefHeight) return;
|
|
40417
|
+
if (keepScrollTop) return;
|
|
39767
40418
|
// 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
|
|
39768
40419
|
setTop(0);
|
|
39769
40420
|
setStartIndex(0);
|
|
40421
|
+
context.prevWrapperRefHeight = currentWrapperRefHeight;
|
|
39770
40422
|
return function () {
|
|
39771
40423
|
context.preIndex = null;
|
|
39772
40424
|
};
|
|
@@ -39808,6 +40460,7 @@ var VirtualList = function VirtualList(props) {
|
|
|
39808
40460
|
|
|
39809
40461
|
|
|
39810
40462
|
|
|
40463
|
+
|
|
39811
40464
|
function getHighlightText(_ref) {
|
|
39812
40465
|
var nodeList = _ref.nodeList,
|
|
39813
40466
|
searchWords = _ref.searchWords,
|
|
@@ -39816,22 +40469,31 @@ function getHighlightText(_ref) {
|
|
|
39816
40469
|
if (!enable || !searchWords) {
|
|
39817
40470
|
return nodeList;
|
|
39818
40471
|
}
|
|
39819
|
-
|
|
39820
|
-
|
|
39821
|
-
|
|
39822
|
-
|
|
39823
|
-
|
|
40472
|
+
|
|
40473
|
+
// 递归转换节点
|
|
40474
|
+
var transformNode = function transformNode(node, index) {
|
|
40475
|
+
// 如果是合法的 React 元素
|
|
40476
|
+
if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(node) && node.props && node.props.children) {
|
|
40477
|
+
// 对 children 递归调用 getHighlightText 进行转换
|
|
40478
|
+
var transformedChildren = getHighlightText({
|
|
40479
|
+
nodeList: node.props.children,
|
|
39824
40480
|
searchWords: searchWords,
|
|
39825
|
-
highlightClassName: highlightClassName
|
|
39826
|
-
|
|
40481
|
+
highlightClassName: highlightClassName,
|
|
40482
|
+
enable: enable
|
|
40483
|
+
});
|
|
40484
|
+
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(node, objectSpread2_default()(objectSpread2_default()({}, node.props), {}, {
|
|
40485
|
+
key: index
|
|
40486
|
+
}), transformedChildren);
|
|
39827
40487
|
}
|
|
39828
|
-
|
|
40488
|
+
// 如果节点为字符串,则直接高亮替换
|
|
40489
|
+
if (typeof node === 'string') {
|
|
39829
40490
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(HighlightText, {
|
|
39830
40491
|
textToHighlight: node,
|
|
39831
40492
|
searchWords: searchWords,
|
|
39832
40493
|
highlightClassName: highlightClassName
|
|
39833
40494
|
});
|
|
39834
40495
|
}
|
|
40496
|
+
// 其他情况直接返回原节点
|
|
39835
40497
|
return node;
|
|
39836
40498
|
};
|
|
39837
40499
|
return isArray(nodeList) ? nodeList.map(transformNode) : transformNode(nodeList);
|
|
@@ -39847,8 +40509,7 @@ function HighlightText(_ref2) {
|
|
|
39847
40509
|
searchWords = searchWords.slice(0, 500);
|
|
39848
40510
|
}
|
|
39849
40511
|
|
|
39850
|
-
//
|
|
39851
|
-
// 从而在strArr中可以保留匹配文本
|
|
40512
|
+
// 带 capture group 的正则用于 split 保留匹配文本
|
|
39852
40513
|
var re = new RegExp("(".concat(escapeRegExp(searchWords), ")"), 'i');
|
|
39853
40514
|
var strArr = textToHighlight.split(re);
|
|
39854
40515
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
@@ -39891,22 +40552,20 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39891
40552
|
shouldFinal = props.shouldFinal,
|
|
39892
40553
|
onChange = props.onChange,
|
|
39893
40554
|
onPathChange = props.onPathChange,
|
|
39894
|
-
mode = props.mode
|
|
39895
|
-
activeLeaf = props.activeLeaf,
|
|
39896
|
-
setActiveLeaf = props.setActiveLeaf;
|
|
40555
|
+
mode = props.mode;
|
|
39897
40556
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
39898
40557
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
39899
40558
|
loading = _useState2[0],
|
|
39900
40559
|
setLoading = _useState2[1];
|
|
39901
|
-
// const [activeState, setActiveState] = useState(false);
|
|
39902
40560
|
var checkboxRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
|
|
40561
|
+
var hasHandleSelectRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
39903
40562
|
var isDisabled = datum.isDisabled(id);
|
|
39904
40563
|
var children = data[childrenKey];
|
|
39905
40564
|
var hasChildren = children && children.length > 0;
|
|
39906
40565
|
var uncertainChildren = loader && !loading && children === undefined;
|
|
39907
40566
|
var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
|
|
39908
40567
|
var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
|
|
39909
|
-
var rootClass = classnames_default()(styles.option,
|
|
40568
|
+
var rootClass = classnames_default()(styles.option, active && styles.activeOption, isDisabled && mode !== 4 && styles.optionDisabled);
|
|
39910
40569
|
var handlePathChange = function handlePathChange() {
|
|
39911
40570
|
onPathChange === null || onPathChange === void 0 || onPathChange(id, data, path);
|
|
39912
40571
|
};
|
|
@@ -39930,9 +40589,6 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39930
40589
|
if (getParent(e.target, checkboxRef.current)) return;
|
|
39931
40590
|
var checked = datum.getChecked(id);
|
|
39932
40591
|
handleChange(null, !checked);
|
|
39933
|
-
if (setActiveLeaf) {
|
|
39934
|
-
setActiveLeaf(id);
|
|
39935
|
-
}
|
|
39936
40592
|
};
|
|
39937
40593
|
var isHoverAble = expandTrigger === 'hover' || expandTrigger === 'hover-only';
|
|
39938
40594
|
var isRealLeafNode = !hasChildren && !uncertainChildren;
|
|
@@ -39943,10 +40599,17 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
39943
40599
|
}
|
|
39944
40600
|
if (isHoverAble) {
|
|
39945
40601
|
events.onMouseEnter = handlePathChange;
|
|
39946
|
-
if (multiple)
|
|
40602
|
+
if (multiple) {
|
|
40603
|
+
events.onClick = handleSelect;
|
|
40604
|
+
hasHandleSelectRef.current = true;
|
|
40605
|
+
}
|
|
39947
40606
|
} else if (isRealLeafNode && multiple) {
|
|
39948
40607
|
// 非hover模式下: 末级节点支持整个节点区域点击选中checkbox
|
|
39949
|
-
events.onClick =
|
|
40608
|
+
events.onClick = function (e) {
|
|
40609
|
+
handleClick(e);
|
|
40610
|
+
handleSelect(e);
|
|
40611
|
+
};
|
|
40612
|
+
hasHandleSelectRef.current = true;
|
|
39950
40613
|
}
|
|
39951
40614
|
return events;
|
|
39952
40615
|
};
|
|
@@ -40002,7 +40665,7 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
40002
40665
|
className: styles.optionCheckbox,
|
|
40003
40666
|
checked: datum.getChecked(id),
|
|
40004
40667
|
disabled: isDisabled,
|
|
40005
|
-
onChange:
|
|
40668
|
+
onChange: hasHandleSelectRef.current ? undefined : handleChange
|
|
40006
40669
|
}), renderContent(), renderIcon()]
|
|
40007
40670
|
})
|
|
40008
40671
|
}));
|
|
@@ -40015,7 +40678,6 @@ var CascaderNode = function CascaderNode(props) {
|
|
|
40015
40678
|
|
|
40016
40679
|
|
|
40017
40680
|
|
|
40018
|
-
|
|
40019
40681
|
var list_devUseWarning = devUseWarning;
|
|
40020
40682
|
var CascaderList = function CascaderList(props) {
|
|
40021
40683
|
var _jssStyle$cascader;
|
|
@@ -40072,18 +40734,11 @@ var CascaderList = function CascaderList(props) {
|
|
|
40072
40734
|
children: "noData"
|
|
40073
40735
|
});
|
|
40074
40736
|
};
|
|
40075
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
|
|
40076
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
40077
|
-
activeLeaf = _useState2[0],
|
|
40078
|
-
setActiveLeaf = _useState2[1];
|
|
40079
|
-
var needSetActiveLeaf = (multiple || mode !== undefined) && props.id === undefined;
|
|
40080
40737
|
var renderItem = function renderItem(item, index) {
|
|
40081
40738
|
var id = getKey(item, index);
|
|
40082
40739
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(node, {
|
|
40083
40740
|
jssStyle: jssStyle,
|
|
40084
40741
|
active: props.id === id,
|
|
40085
|
-
activeLeaf: activeLeaf,
|
|
40086
|
-
setActiveLeaf: needSetActiveLeaf ? setActiveLeaf : undefined,
|
|
40087
40742
|
id: id,
|
|
40088
40743
|
data: item,
|
|
40089
40744
|
datum: datum,
|
|
@@ -40494,7 +41149,7 @@ var Result = function Result(props) {
|
|
|
40494
41149
|
var _props$onBlur, _inputRef$current$upd, _inputRef$current;
|
|
40495
41150
|
e.stopPropagation();
|
|
40496
41151
|
if (e.relatedTarget === context.inputRefs[1 - info.index]) return;
|
|
40497
|
-
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
41152
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e, info.index);
|
|
40498
41153
|
if (inputRef.current) (_inputRef$current$upd = (_inputRef$current = inputRef.current).updateValue) === null || _inputRef$current$upd === void 0 || _inputRef$current$upd.call(_inputRef$current);
|
|
40499
41154
|
context.clickIndex = 0;
|
|
40500
41155
|
},
|
|
@@ -40927,7 +41582,7 @@ function getResetMore(onFilter, container, doms) {
|
|
|
40927
41582
|
var paddingLeft = parsePxToNumber(style.paddingLeft);
|
|
40928
41583
|
var paddingRight = parsePxToNumber(style.paddingRight);
|
|
40929
41584
|
var minFilterWidth = onFilter ? 16 : 0;
|
|
40930
|
-
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth
|
|
41585
|
+
var contentWidth = clientWidth - paddingLeft - paddingRight - minFilterWidth;
|
|
40931
41586
|
var hideEl = items.pop();
|
|
40932
41587
|
var hideElStyle = getComputedStyle(hideEl);
|
|
40933
41588
|
var hideMargin = parsePxToNumber(hideElStyle.marginLeft) + parsePxToNumber(hideElStyle.marginRight);
|
|
@@ -40992,16 +41647,7 @@ var More = function More(props) {
|
|
|
40992
41647
|
var shouldShowMore = showNum < 0 || showNum >= data.length;
|
|
40993
41648
|
var before = [];
|
|
40994
41649
|
var after = [];
|
|
40995
|
-
var
|
|
40996
|
-
var tagStyle = shouldShowMore ? {
|
|
40997
|
-
position: 'absolute',
|
|
40998
|
-
zIndex: -100,
|
|
40999
|
-
userSelect: 'none',
|
|
41000
|
-
msUserSelect: 'none',
|
|
41001
|
-
contain: 'layout',
|
|
41002
|
-
opacity: 0,
|
|
41003
|
-
pointerEvents: 'none'
|
|
41004
|
-
} : {};
|
|
41650
|
+
var afterLength = 0;
|
|
41005
41651
|
if (!shouldShowMore) {
|
|
41006
41652
|
before = new Array(showNum).fill(undefined).map(function (_item, index) {
|
|
41007
41653
|
return data[index];
|
|
@@ -41009,9 +41655,9 @@ var More = function More(props) {
|
|
|
41009
41655
|
after = new Array(data.length - showNum).fill(undefined).map(function (_item, index) {
|
|
41010
41656
|
return data[showNum + index];
|
|
41011
41657
|
});
|
|
41012
|
-
|
|
41658
|
+
afterLength = after.length;
|
|
41013
41659
|
}
|
|
41014
|
-
if (
|
|
41660
|
+
if (shouldShowMore) {
|
|
41015
41661
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
41016
41662
|
children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(src_tag_tag, {
|
|
41017
41663
|
className: styles.tag,
|
|
@@ -41038,10 +41684,9 @@ var More = function More(props) {
|
|
|
41038
41684
|
className: styles.tag,
|
|
41039
41685
|
jssStyle: jssStyle,
|
|
41040
41686
|
size: size,
|
|
41041
|
-
style: tagStyle,
|
|
41042
41687
|
mode: visible ? 'fill' : 'bright',
|
|
41043
41688
|
color: visible ? 'info' : 'default',
|
|
41044
|
-
children: shouldShowMore ? '+' : "+".concat(
|
|
41689
|
+
children: shouldShowMore ? '+' : "+".concat(afterLength)
|
|
41045
41690
|
}, 'more'), compressed !== 'hide-popover' && /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
|
|
41046
41691
|
jssStyle: jssStyle,
|
|
41047
41692
|
className: compressedClassName,
|
|
@@ -41139,12 +41784,16 @@ var result_Result = function Result(props) {
|
|
|
41139
41784
|
setShouldResetMore = _useState4[1];
|
|
41140
41785
|
var render = useRender();
|
|
41141
41786
|
var resultRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
41142
|
-
var
|
|
41787
|
+
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
41788
|
+
prevMore: more,
|
|
41789
|
+
maxMore: 0
|
|
41790
|
+
}),
|
|
41791
|
+
context = _useRef.current;
|
|
41143
41792
|
var removeLock = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
41144
41793
|
var showInput = allowOnFilter;
|
|
41145
41794
|
var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
41146
41795
|
var styles = props.classes;
|
|
41147
|
-
var rootClass = classnames_default()(styles.resultTextWrapper, compressed && styles.compressedWrapper, multiple && styles.multipleResultWrapper, multiple && compressed && styles.multipleCompressedWrapper);
|
|
41796
|
+
var rootClass = classnames_default()(styles.resultTextWrapper, compressed && styles.compressedWrapper, compressedBound && compressedBound > 0 && styles.compressedBoundWrapper, multiple && styles.multipleResultWrapper, multiple && compressed && styles.multipleCompressedWrapper);
|
|
41148
41797
|
var renderResultContent = function renderResultContent(data, index, nodes) {
|
|
41149
41798
|
if (checkUnMatched(data)) {
|
|
41150
41799
|
var _data = data;
|
|
@@ -41342,7 +41991,6 @@ var result_Result = function Result(props) {
|
|
|
41342
41991
|
data: result,
|
|
41343
41992
|
datas: renderMultipleResult.datas,
|
|
41344
41993
|
size: size,
|
|
41345
|
-
more: moreNumber,
|
|
41346
41994
|
compressed: compressed,
|
|
41347
41995
|
renderCompressed: renderCompressed,
|
|
41348
41996
|
compressedClassName: compressedClassName,
|
|
@@ -41372,15 +42020,27 @@ var result_Result = function Result(props) {
|
|
|
41372
42020
|
}
|
|
41373
42021
|
return result;
|
|
41374
42022
|
};
|
|
41375
|
-
var handleResetMore = function handleResetMore() {
|
|
42023
|
+
var handleResetMore = function handleResetMore(valueLength) {
|
|
41376
42024
|
if (!compressed) return;
|
|
41377
42025
|
if (isCompressedBound()) return;
|
|
41378
42026
|
if (removeLock.current) {
|
|
41379
42027
|
removeLock.current = false;
|
|
41380
42028
|
return;
|
|
41381
42029
|
}
|
|
41382
|
-
|
|
41383
|
-
|
|
42030
|
+
|
|
42031
|
+
// why requestIdleCallback: 当选项数量远超容器承载能力时,延迟昂贵的DOM计算,在1000+选项时,同步的重新计算会导致INP超过1000ms
|
|
42032
|
+
var hasExistingCompression = context.prevMore > 0;
|
|
42033
|
+
var hasValidEstimate = context.maxMore > 0;
|
|
42034
|
+
var exceedsCapacity = valueLength && valueLength > context.maxMore;
|
|
42035
|
+
if (hasExistingCompression && hasValidEstimate && exceedsCapacity && typeof requestIdleCallback !== 'undefined') {
|
|
42036
|
+
requestIdleCallback(function () {
|
|
42037
|
+
setMore(-1);
|
|
42038
|
+
setShouldResetMore(true);
|
|
42039
|
+
});
|
|
42040
|
+
} else {
|
|
42041
|
+
setMore(-1);
|
|
42042
|
+
setShouldResetMore(true);
|
|
42043
|
+
}
|
|
41384
42044
|
};
|
|
41385
42045
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41386
42046
|
if (!focus && mounted.current) {
|
|
@@ -41435,7 +42095,7 @@ var result_Result = function Result(props) {
|
|
|
41435
42095
|
}
|
|
41436
42096
|
}, [focus, multiple]);
|
|
41437
42097
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
41438
|
-
handleResetMore();
|
|
42098
|
+
handleResetMore((valueProp === null || valueProp === void 0 ? void 0 : valueProp.length) || 0);
|
|
41439
42099
|
}, [valueProp, data]);
|
|
41440
42100
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
41441
42101
|
// datum.getDataByValues(value); 需要等待 useTree useEffect 执行完毕 才能获取到
|
|
@@ -41446,7 +42106,7 @@ var result_Result = function Result(props) {
|
|
|
41446
42106
|
var tagClassName = ".".concat(styles.tag.split(' ')[0]);
|
|
41447
42107
|
if (shouldResetMore && result_isArray(value) && (value || []).length) {
|
|
41448
42108
|
var newMore = getResetMore(showInput, resultRef.current, resultRef.current.querySelectorAll(tagClassName));
|
|
41449
|
-
prevMore
|
|
42109
|
+
context.prevMore = newMore;
|
|
41450
42110
|
setMore(newMore);
|
|
41451
42111
|
setShouldResetMore(false);
|
|
41452
42112
|
} else {
|
|
@@ -41460,6 +42120,7 @@ var result_Result = function Result(props) {
|
|
|
41460
42120
|
if (!resultRef.current) return;
|
|
41461
42121
|
if (!compressed) return;
|
|
41462
42122
|
if (isCompressedBound()) return;
|
|
42123
|
+
context.maxMore = Math.floor(resultRef.current.clientWidth / 20);
|
|
41463
42124
|
var cancelObserver = addResizeObserver(resultRef.current, handleResetMore, {
|
|
41464
42125
|
direction: 'x'
|
|
41465
42126
|
});
|
|
@@ -41690,8 +42351,33 @@ var Cascader = function Cascader(props0) {
|
|
|
41690
42351
|
var shouldFinal = getFinal();
|
|
41691
42352
|
var renderItem = getRenderItem;
|
|
41692
42353
|
var getRenderResult = function getRenderResult(data, index, nodes) {
|
|
41693
|
-
|
|
41694
|
-
|
|
42354
|
+
var _map, _datum$getPath$path, _datum$getPath;
|
|
42355
|
+
// 计算渲染项数组,包含父节点或不含
|
|
42356
|
+
var items = props.showParent ? [].concat(toConsumableArray_default()((_map = ((_datum$getPath$path = (_datum$getPath = datum.getPath(datum.getKey(data))) === null || _datum$getPath === void 0 ? void 0 : _datum$getPath.path) !== null && _datum$getPath$path !== void 0 ? _datum$getPath$path : []).map(function (p) {
|
|
42357
|
+
return datum.getDataByValues(p);
|
|
42358
|
+
})) !== null && _map !== void 0 ? _map : []), [data]) : [data];
|
|
42359
|
+
|
|
42360
|
+
// 根据 renderResultProp 不同类型,返回处理单个元素的函数
|
|
42361
|
+
var renderSingle = function renderSingle(d) {
|
|
42362
|
+
if (!renderResultProp) {
|
|
42363
|
+
return renderItem(d);
|
|
42364
|
+
}
|
|
42365
|
+
if (typeof renderResultProp === 'function') {
|
|
42366
|
+
return renderResultProp(d, nodes);
|
|
42367
|
+
}
|
|
42368
|
+
// renderResultProp 作为属性字符串提取对应字段
|
|
42369
|
+
return d === null || d === void 0 ? void 0 : d[renderResultProp];
|
|
42370
|
+
};
|
|
42371
|
+
|
|
42372
|
+
// 如果包含多个待渲染元素,拼接渲染结果并添加分隔符
|
|
42373
|
+
if (items.length > 1) {
|
|
42374
|
+
return items.map(function (d, i) {
|
|
42375
|
+
return i > 0 ? [' / ', renderSingle(d)] : renderSingle(d);
|
|
42376
|
+
});
|
|
42377
|
+
}
|
|
42378
|
+
|
|
42379
|
+
// 单一项直接渲染
|
|
42380
|
+
return renderSingle(items[0]);
|
|
41695
42381
|
};
|
|
41696
42382
|
|
|
41697
42383
|
// 点击结果框的处理方法
|
|
@@ -42076,8 +42762,8 @@ var Cascader = function Cascader(props0) {
|
|
|
42076
42762
|
}
|
|
42077
42763
|
}, [data]);
|
|
42078
42764
|
|
|
42079
|
-
//
|
|
42080
|
-
if (openProp && !shallowEqual(value, datum.getValue())) {
|
|
42765
|
+
// 修复外部受控打开或renderOptionList做全选的场景下,从外部修改value导致的面板勾选情况没有及时同步
|
|
42766
|
+
if ((openProp || props.renderOptionList) && !shallowEqual(value, datum.getValue())) {
|
|
42081
42767
|
datum.setValue(value);
|
|
42082
42768
|
}
|
|
42083
42769
|
;
|
|
@@ -42086,9 +42772,6 @@ var Cascader = function Cascader(props0) {
|
|
|
42086
42772
|
datum.setValue(value);
|
|
42087
42773
|
if (!open) return;
|
|
42088
42774
|
updatePathByValue();
|
|
42089
|
-
if (props.renderOptionList) {
|
|
42090
|
-
updatePath();
|
|
42091
|
-
}
|
|
42092
42775
|
}, [value, open]);
|
|
42093
42776
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
42094
42777
|
if (filterText !== undefined) {
|
|
@@ -42213,6 +42896,7 @@ var useFormBind = function useFormBind() {
|
|
|
42213
42896
|
var FormItemContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
|
|
42214
42897
|
updateError: function updateError() {}
|
|
42215
42898
|
});
|
|
42899
|
+
FormItemContext.displayName = 'FormItemContext';
|
|
42216
42900
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form-fieldset/fieldset-context.ts
|
|
42217
42901
|
'use client';
|
|
42218
42902
|
|
|
@@ -42651,7 +43335,8 @@ function useFormControl(props) {
|
|
|
42651
43335
|
defaultValue = props.defaultValue,
|
|
42652
43336
|
rules = props.rules,
|
|
42653
43337
|
onError = props.onError,
|
|
42654
|
-
getValidateProps = props.getValidateProps
|
|
43338
|
+
getValidateProps = props.getValidateProps,
|
|
43339
|
+
clearToUndefined = props.clearToUndefined;
|
|
42655
43340
|
var _useFieldSetConsumer = useFieldSetConsumer({
|
|
42656
43341
|
name: props.name,
|
|
42657
43342
|
bind: props.bind
|
|
@@ -42709,7 +43394,11 @@ function useFormControl(props) {
|
|
|
42709
43394
|
var nextValue = [];
|
|
42710
43395
|
name.forEach(function (n, index) {
|
|
42711
43396
|
if (_value[index] === undefined && dv[index] !== undefined) {
|
|
42712
|
-
|
|
43397
|
+
if (clearToUndefined) {
|
|
43398
|
+
nextValue[index] = undefined;
|
|
43399
|
+
} else {
|
|
43400
|
+
nextValue[index] = dv[index];
|
|
43401
|
+
}
|
|
42713
43402
|
} else {
|
|
42714
43403
|
nextValue[index] = _value[index];
|
|
42715
43404
|
}
|
|
@@ -42723,7 +43412,11 @@ function useFormControl(props) {
|
|
|
42723
43412
|
}
|
|
42724
43413
|
if (!shallowEqual(_value2, latestInfo.valueState)) {
|
|
42725
43414
|
if (_value2 === undefined && defaultValue !== undefined) {
|
|
42726
|
-
|
|
43415
|
+
if (clearToUndefined) {
|
|
43416
|
+
setValueState(undefined);
|
|
43417
|
+
} else {
|
|
43418
|
+
setValueState(defaultValue);
|
|
43419
|
+
}
|
|
42727
43420
|
} else {
|
|
42728
43421
|
setValueState(_value2);
|
|
42729
43422
|
}
|
|
@@ -42861,6 +43554,15 @@ function useFormControl(props) {
|
|
|
42861
43554
|
name: name
|
|
42862
43555
|
};
|
|
42863
43556
|
}
|
|
43557
|
+
;// CONCATENATED MODULE: ../hooks/src/components/use-form/form-schema-context.ts
|
|
43558
|
+
"use client";
|
|
43559
|
+
|
|
43560
|
+
|
|
43561
|
+
var FormSchemaContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
43562
|
+
var useFormSchema = function useFormSchema() {
|
|
43563
|
+
return external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext(FormSchemaContext);
|
|
43564
|
+
};
|
|
43565
|
+
FormSchemaContext.displayName = 'FormSchemaContext';
|
|
42864
43566
|
;// CONCATENATED MODULE: ../base/src/form/form-field.tsx
|
|
42865
43567
|
|
|
42866
43568
|
|
|
@@ -42882,7 +43584,8 @@ var FormField = function FormField(props) {
|
|
|
42882
43584
|
rules: props.rules,
|
|
42883
43585
|
onError: props.onError,
|
|
42884
43586
|
bind: props.bind,
|
|
42885
|
-
getValidateProps: getValidateProps
|
|
43587
|
+
getValidateProps: getValidateProps,
|
|
43588
|
+
clearToUndefined: props.clearToUndefined
|
|
42886
43589
|
});
|
|
42887
43590
|
var handleChange = usePersistFn(function (value) {
|
|
42888
43591
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -42937,9 +43640,31 @@ var FormField = function FormField(props) {
|
|
|
42937
43640
|
} else {
|
|
42938
43641
|
finalChildren = children;
|
|
42939
43642
|
}
|
|
43643
|
+
var formSchema = useFormSchema();
|
|
43644
|
+
var _useContext3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormItemContext),
|
|
43645
|
+
label = _useContext3.label;
|
|
43646
|
+
var finalFieldId = formFieldId || fieldId || fieldsetPathId;
|
|
43647
|
+
|
|
43648
|
+
// 只有当 formConfig.formName 存在时才运行 schema 逻辑
|
|
43649
|
+
if (formConfig.formName && formSchema && finalFieldId) {
|
|
43650
|
+
var schemaFields = finalFieldId.split(separator) || [];
|
|
43651
|
+
var schemaMeta = formSchema.buildSchemaFromComponent({
|
|
43652
|
+
componentElement: finalChildren,
|
|
43653
|
+
rules: props.rules,
|
|
43654
|
+
label: label,
|
|
43655
|
+
finalFieldId: finalFieldId,
|
|
43656
|
+
separator: separator
|
|
43657
|
+
});
|
|
43658
|
+
schemaFields.forEach(function (field) {
|
|
43659
|
+
formSchema.updateSchema({
|
|
43660
|
+
path: getOriginField(field, formConfig.formName),
|
|
43661
|
+
meta: schemaMeta
|
|
43662
|
+
});
|
|
43663
|
+
});
|
|
43664
|
+
}
|
|
42940
43665
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFieldContext.Provider, {
|
|
42941
43666
|
value: {
|
|
42942
|
-
fieldId:
|
|
43667
|
+
fieldId: finalFieldId,
|
|
42943
43668
|
separator: separator
|
|
42944
43669
|
},
|
|
42945
43670
|
children: finalChildren
|
|
@@ -44627,8 +45352,18 @@ function isValid(date) {
|
|
|
44627
45352
|
if (!(date instanceof Date)) return false;
|
|
44628
45353
|
return dayjs_min_default()(date).isValid();
|
|
44629
45354
|
}
|
|
44630
|
-
|
|
45355
|
+
|
|
45356
|
+
/**
|
|
45357
|
+
* @param date 日期字符串
|
|
45358
|
+
* @param fmt 日期格式
|
|
45359
|
+
* @param isLoose 是否为宽松模式
|
|
45360
|
+
* @returns 是否为有效日期
|
|
45361
|
+
*/
|
|
45362
|
+
function isValidString(date, fmt, isLoose) {
|
|
44631
45363
|
if (!date) return false;
|
|
45364
|
+
if (isLoose) {
|
|
45365
|
+
return dayjs_min_default()(date).isValid();
|
|
45366
|
+
}
|
|
44632
45367
|
return dayjs_min_default()(date, fmt, true).isValid();
|
|
44633
45368
|
}
|
|
44634
45369
|
function util_parse(d, fmt, options) {
|
|
@@ -45095,6 +45830,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
45095
45830
|
return getFormatValueArr(dateArr, props.formatResult);
|
|
45096
45831
|
} else if (typeof props.formatResult === 'function') {
|
|
45097
45832
|
return dateArr.map(function (item) {
|
|
45833
|
+
if (!item) return '';
|
|
45098
45834
|
return props.formatResult(item);
|
|
45099
45835
|
});
|
|
45100
45836
|
} else {
|
|
@@ -45116,8 +45852,15 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
45116
45852
|
}
|
|
45117
45853
|
var formatValue = getFormatValueArr(dateArr);
|
|
45118
45854
|
var v = range ? formatValue : formatValue[0];
|
|
45119
|
-
if (
|
|
45120
|
-
|
|
45855
|
+
if (Array.isArray(value) && value.length && Array.isArray(v) && v.length) {
|
|
45856
|
+
// 针对 range 的情况,['2025-01-01',''] 和 ['2025-01-01',undefined] 无法通过 shallowEqual 出来,这边需要放行
|
|
45857
|
+
if (!shallowEqualExceptFalsely(v[0], value[0]) || !shallowEqualExceptFalsely(v[1], value[1])) {
|
|
45858
|
+
onChange === null || onChange === void 0 || onChange(v);
|
|
45859
|
+
}
|
|
45860
|
+
} else {
|
|
45861
|
+
if (!shallow_equal(v, value)) {
|
|
45862
|
+
onChange === null || onChange === void 0 || onChange(v);
|
|
45863
|
+
}
|
|
45121
45864
|
}
|
|
45122
45865
|
};
|
|
45123
45866
|
var getDateArr = function getDateArr() {
|
|
@@ -45190,9 +45933,9 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
45190
45933
|
}
|
|
45191
45934
|
(_props$onClear = props.onClear) === null || _props$onClear === void 0 || _props$onClear.call(props);
|
|
45192
45935
|
});
|
|
45193
|
-
var handleInputChange = usePersistFn(function (str, index) {
|
|
45936
|
+
var handleInputChange = usePersistFn(function (str, index, isFromBlur) {
|
|
45194
45937
|
// 比较 日期字符串是否符合format格式, 如果符合返回 true 否则返回 false
|
|
45195
|
-
var isValid = util.isValidString(str, format);
|
|
45938
|
+
var isValid = util.isValidString(str, format, isFromBlur);
|
|
45196
45939
|
if (!isValid) return;
|
|
45197
45940
|
var date = util.toDateWithFormat(str, format, undefined, options);
|
|
45198
45941
|
setInputArr(function (prev) {
|
|
@@ -45216,6 +45959,11 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
45216
45959
|
return arr;
|
|
45217
45960
|
});
|
|
45218
45961
|
});
|
|
45962
|
+
|
|
45963
|
+
// 失焦时,需要宽松模式校验,eg: 2025-06-16 18:00 和 2025-06-16 18 都可以校验通过
|
|
45964
|
+
var handleInputBlur = usePersistFn(function (str, index) {
|
|
45965
|
+
handleInputChange(str, index, true);
|
|
45966
|
+
});
|
|
45219
45967
|
var handleClearInputArr = usePersistFn(function (index) {
|
|
45220
45968
|
if (index !== undefined) {
|
|
45221
45969
|
setInputArr(function (prev) {
|
|
@@ -45259,6 +46007,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
|
|
|
45259
46007
|
handleClear: handleClear,
|
|
45260
46008
|
handleClearInputArr: handleClearInputArr,
|
|
45261
46009
|
handleInputChange: handleInputChange,
|
|
46010
|
+
handleInputBlur: handleInputBlur,
|
|
45262
46011
|
registerModeDisabled: registerModeDisabled,
|
|
45263
46012
|
setCurrentArrWithParams: setCurrentArrWithParams,
|
|
45264
46013
|
isDisabledDate: isDisabledDate
|
|
@@ -45297,14 +46046,16 @@ var useDate = function useDate(props) {
|
|
|
45297
46046
|
cachedDays: []
|
|
45298
46047
|
}),
|
|
45299
46048
|
context = _useRef.current;
|
|
45300
|
-
var current = props.current === undefined ? currentState : props.current;
|
|
46049
|
+
var current = props.current === undefined || !props.current ? currentState : props.current;
|
|
45301
46050
|
var setCurrent = function setCurrent(date) {
|
|
45302
46051
|
var _props$onCurrentChang2;
|
|
45303
46052
|
if (props.current !== undefined) {
|
|
45304
46053
|
var _props$onCurrentChang;
|
|
45305
46054
|
(_props$onCurrentChang = props.onCurrentChange) === null || _props$onCurrentChang === void 0 || _props$onCurrentChang.call(props, date);
|
|
45306
46055
|
} else {
|
|
45307
|
-
|
|
46056
|
+
if (date) {
|
|
46057
|
+
setCurrentState(date);
|
|
46058
|
+
}
|
|
45308
46059
|
}
|
|
45309
46060
|
(_props$onCurrentChang2 = props.onCurrentChange) === null || _props$onCurrentChang2 === void 0 || _props$onCurrentChang2.call(props, date);
|
|
45310
46061
|
};
|
|
@@ -45379,9 +46130,15 @@ var useDate = function useDate(props) {
|
|
|
45379
46130
|
var _props$onChange;
|
|
45380
46131
|
if (isDisabled(date)) return;
|
|
45381
46132
|
var newDate = getDateWithTime(date);
|
|
45382
|
-
|
|
46133
|
+
var index = position === 'start' ? 0 : 1;
|
|
46134
|
+
if (props.allowSingle && props.rangeDate && Array.isArray(props.rangeDate) && props.rangeDate[index] && util.clearHMS(newDate, options).getTime() === util.clearHMS(props.rangeDate[index], options).getTime()) {
|
|
46135
|
+
newDate = '';
|
|
46136
|
+
}
|
|
46137
|
+
props === null || props === void 0 || props.onClearInputArr(index);
|
|
45383
46138
|
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, noClose);
|
|
45384
|
-
|
|
46139
|
+
if (newDate) {
|
|
46140
|
+
setCurrent(newDate);
|
|
46141
|
+
}
|
|
45385
46142
|
};
|
|
45386
46143
|
var getTimeStr = function getTimeStr() {
|
|
45387
46144
|
var format = props.format,
|
|
@@ -45461,7 +46218,9 @@ var useTime = function useTime(props) {
|
|
|
45461
46218
|
_props$secondStep = props.secondStep,
|
|
45462
46219
|
secondStep = _props$secondStep === void 0 ? 1 : _props$secondStep,
|
|
45463
46220
|
staticMin = props.staticMin,
|
|
45464
|
-
staticMax = props.staticMax
|
|
46221
|
+
staticMax = props.staticMax,
|
|
46222
|
+
position = props.position,
|
|
46223
|
+
rangeDate = props.rangeDate;
|
|
45465
46224
|
var min = util.resetTimeByFormat(mi, format, options);
|
|
45466
46225
|
var max = util.resetTimeByFormat(ma, format, options);
|
|
45467
46226
|
var current = props.value || util.newDate(undefined, options);
|
|
@@ -45487,7 +46246,7 @@ var useTime = function useTime(props) {
|
|
|
45487
46246
|
disabledTime = props.disabledTime;
|
|
45488
46247
|
if (disabledTime) {
|
|
45489
46248
|
var _time = util.format(date, util.TIME_FORMAT, options);
|
|
45490
|
-
if (typeof disabledTime === 'function') return disabledTime(_time);
|
|
46249
|
+
if (typeof disabledTime === 'function') return disabledTime(_time, position, rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[0], rangeDate === null || rangeDate === void 0 ? void 0 : rangeDate[1]);
|
|
45491
46250
|
return disabledTime === _time;
|
|
45492
46251
|
}
|
|
45493
46252
|
var isDis = disabled && typeof disabled === 'function' ? disabled(date) : false;
|
|
@@ -45838,7 +46597,9 @@ var Time = function Time(props) {
|
|
|
45838
46597
|
disabledTime: props.disabledTime,
|
|
45839
46598
|
hourStep: props.hourStep,
|
|
45840
46599
|
minuteStep: props.minuteStep,
|
|
45841
|
-
secondStep: props.secondStep
|
|
46600
|
+
secondStep: props.secondStep,
|
|
46601
|
+
position: props.position,
|
|
46602
|
+
rangeDate: props.rangeDate
|
|
45842
46603
|
}),
|
|
45843
46604
|
func = _useTimePick.func,
|
|
45844
46605
|
times = _useTimePick.times;
|
|
@@ -45872,6 +46633,7 @@ var Time = function Time(props) {
|
|
|
45872
46633
|
})]
|
|
45873
46634
|
});
|
|
45874
46635
|
};
|
|
46636
|
+
var shouldRenderTimes = times && times.length > 0;
|
|
45875
46637
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
45876
46638
|
onMouseEnter: props.onMouseEnter,
|
|
45877
46639
|
onMouseLeave: props.onMouseLeave,
|
|
@@ -45880,7 +46642,7 @@ var Time = function Time(props) {
|
|
|
45880
46642
|
children: [props.showTitle && /*#__PURE__*/(0,jsx_runtime.jsx)(pickerTitle, {
|
|
45881
46643
|
position: props.position,
|
|
45882
46644
|
jssStyle: props.jssStyle
|
|
45883
|
-
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
46645
|
+
}), shouldRenderTimes && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
45884
46646
|
className: styles === null || styles === void 0 ? void 0 : styles.pickerBody,
|
|
45885
46647
|
children: times.map(function (item) {
|
|
45886
46648
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(TimeScroll, {
|
|
@@ -45912,7 +46674,8 @@ var Time = function Time(props) {
|
|
|
45912
46674
|
|
|
45913
46675
|
var Day = function Day(props) {
|
|
45914
46676
|
var _jssStyle$datePicker;
|
|
45915
|
-
var jssStyle = props.jssStyle
|
|
46677
|
+
var jssStyle = props.jssStyle,
|
|
46678
|
+
allowSingle = props.allowSingle;
|
|
45916
46679
|
var _useConfig = useConfig(),
|
|
45917
46680
|
locale = _useConfig.locale,
|
|
45918
46681
|
direction = _useConfig.direction;
|
|
@@ -45931,6 +46694,7 @@ var Day = function Day(props) {
|
|
|
45931
46694
|
value: props.value,
|
|
45932
46695
|
range: props.range,
|
|
45933
46696
|
onChange: onChange,
|
|
46697
|
+
allowSingle: allowSingle,
|
|
45934
46698
|
onClearInputArr: props.onClearInputArr,
|
|
45935
46699
|
position: props.position,
|
|
45936
46700
|
min: props.min,
|
|
@@ -46957,7 +47721,7 @@ var useRangePick = function useRangePick(props) {
|
|
|
46957
47721
|
setDateArr(function (arr) {
|
|
46958
47722
|
var newArr = toConsumableArray_default()(arr);
|
|
46959
47723
|
newArr[index] = date;
|
|
46960
|
-
if (range && index === 0 && newArr[1]) {
|
|
47724
|
+
if (date && range && index === 0 && newArr[1]) {
|
|
46961
47725
|
if (typeof range === 'number') {
|
|
46962
47726
|
var rangeMax = util.addSeconds(date, range, options);
|
|
46963
47727
|
if (rangeMax.getTime() < newArr[1].getTime()) {
|
|
@@ -46986,7 +47750,7 @@ var useRangePick = function useRangePick(props) {
|
|
|
46986
47750
|
var newArr = toConsumableArray_default()(arr);
|
|
46987
47751
|
newArr[index] = date;
|
|
46988
47752
|
var modeCache = context.modeCache;
|
|
46989
|
-
if (modeCache[0] === modeCache[1]) {
|
|
47753
|
+
if (date && modeCache[0] === modeCache[1]) {
|
|
46990
47754
|
var mode = modeCache[0];
|
|
46991
47755
|
if (range && index === 0 && newArr[1]) {
|
|
46992
47756
|
if (mode === 'year') {
|
|
@@ -47231,6 +47995,7 @@ var Picker = function Picker(props) {
|
|
|
47231
47995
|
format: props.format,
|
|
47232
47996
|
disabled: position === 'end' ? func.endDisabled : func.startDisabled,
|
|
47233
47997
|
rangeDate: dateArr,
|
|
47998
|
+
allowSingle: props.allowSingle,
|
|
47234
47999
|
min: position === 'end' ? endMin : startMin,
|
|
47235
48000
|
staticMin: position === 'end' ? endMin : staticStartMin,
|
|
47236
48001
|
max: position === 'end' ? endMax : startMax,
|
|
@@ -47513,11 +48278,14 @@ var DatePicker = function DatePicker(props0) {
|
|
|
47513
48278
|
setFocused(true);
|
|
47514
48279
|
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, e);
|
|
47515
48280
|
});
|
|
47516
|
-
var handleBlur = usePersistFn(function (e) {
|
|
48281
|
+
var handleBlur = usePersistFn(function (e, index) {
|
|
47517
48282
|
var _props$onBlur;
|
|
47518
48283
|
setFocused(false);
|
|
47519
|
-
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e);
|
|
48284
|
+
(_props$onBlur = props.onBlur) === null || _props$onBlur === void 0 || _props$onBlur.call(props, e, index);
|
|
47520
48285
|
if (props.needConfirm) return;
|
|
48286
|
+
if (props.inputable && !props.quickSelect && index !== undefined) {
|
|
48287
|
+
func.handleInputBlur(e.target.value, index);
|
|
48288
|
+
}
|
|
47521
48289
|
|
|
47522
48290
|
// 当输入框有值时,失焦时需要立即触发 onChange,否则触控板的轻触模拟出来的click事件就获取不到最新的值
|
|
47523
48291
|
if (inputArr.some(function (d) {
|
|
@@ -47636,6 +48404,7 @@ var DatePicker = function DatePicker(props0) {
|
|
|
47636
48404
|
type: type,
|
|
47637
48405
|
options: options,
|
|
47638
48406
|
disabled: disabled,
|
|
48407
|
+
allowSingle: props.allowSingle,
|
|
47639
48408
|
jssStyle: jssStyle,
|
|
47640
48409
|
closePop: handleClose,
|
|
47641
48410
|
defaultTime: props.defaultTime,
|
|
@@ -47676,7 +48445,7 @@ var date_picker_jssStyle = {
|
|
|
47676
48445
|
popover: usePopoverStyle,
|
|
47677
48446
|
link: useLinkStyle
|
|
47678
48447
|
};
|
|
47679
|
-
var
|
|
48448
|
+
var date_picker_DatePicker = function DatePicker(props) {
|
|
47680
48449
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_date_picker_date_picker, objectSpread2_default()({
|
|
47681
48450
|
jssStyle: date_picker_jssStyle
|
|
47682
48451
|
}, props));
|
|
@@ -47707,7 +48476,7 @@ var BaseDatePicker = function BaseDatePicker(props) {
|
|
|
47707
48476
|
}, []);
|
|
47708
48477
|
return use_field_common(objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
47709
48478
|
defaultValue: defaultValue
|
|
47710
|
-
}),
|
|
48479
|
+
}), date_picker_DatePicker);
|
|
47711
48480
|
});
|
|
47712
48481
|
;// CONCATENATED MODULE: ./src/date-picker/index.ts
|
|
47713
48482
|
|
|
@@ -48237,7 +49006,11 @@ var Modal = function Modal(props) {
|
|
|
48237
49006
|
isMask: false,
|
|
48238
49007
|
mouseDownTarget: null,
|
|
48239
49008
|
mouseUpTarget: null,
|
|
48240
|
-
content: null
|
|
49009
|
+
content: null,
|
|
49010
|
+
originDocumentStyle: {
|
|
49011
|
+
overflow: '',
|
|
49012
|
+
paddingRight: ''
|
|
49013
|
+
}
|
|
48241
49014
|
}),
|
|
48242
49015
|
context = _useRef.current;
|
|
48243
49016
|
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.visible || props.autoShow),
|
|
@@ -48337,18 +49110,33 @@ var Modal = function Modal(props) {
|
|
|
48337
49110
|
setAnimation(true);
|
|
48338
49111
|
}
|
|
48339
49112
|
}, [props.visible]);
|
|
49113
|
+
|
|
49114
|
+
// 设置 document.body.style.overflow 和 document.body.style.paddingRight,并记录原始值到 context 中
|
|
49115
|
+
var setDocumentOverflow = usePersistFn(function () {
|
|
49116
|
+
var doc = document.body.parentNode;
|
|
49117
|
+
if (context.isMask) {
|
|
49118
|
+
context.originDocumentStyle.overflow = doc.style.overflow;
|
|
49119
|
+
context.originDocumentStyle.paddingRight = doc.style.paddingRight;
|
|
49120
|
+
}
|
|
49121
|
+
doc.style.overflow = 'hidden';
|
|
49122
|
+
if (!doc.style.paddingRight) {
|
|
49123
|
+
doc.style.paddingRight = "".concat(window.innerWidth - docSize.width, "px");
|
|
49124
|
+
}
|
|
49125
|
+
});
|
|
49126
|
+
|
|
49127
|
+
// 还原 document.body.style.overflow 和 document.body.style.paddingRight
|
|
49128
|
+
var resetDocumentOverflow = usePersistFn(function () {
|
|
49129
|
+
var doc = document.body.parentNode;
|
|
49130
|
+
doc.style.overflow = context.originDocumentStyle.overflow;
|
|
49131
|
+
doc.style.paddingRight = context.originDocumentStyle.paddingRight;
|
|
49132
|
+
});
|
|
48340
49133
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
48341
49134
|
if (!props.hideMask) {
|
|
48342
|
-
var doc = document.body.parentNode;
|
|
48343
49135
|
if (visible) {
|
|
48344
|
-
|
|
48345
|
-
if (!doc.style.paddingRight) {
|
|
48346
|
-
doc.style.paddingRight = "".concat(window.innerWidth - docSize.width, "px");
|
|
48347
|
-
}
|
|
49136
|
+
setDocumentOverflow();
|
|
48348
49137
|
} else {
|
|
48349
49138
|
if (!context.isMask) return;
|
|
48350
|
-
|
|
48351
|
-
doc.style.overflow = '';
|
|
49139
|
+
resetDocumentOverflow();
|
|
48352
49140
|
}
|
|
48353
49141
|
}
|
|
48354
49142
|
}, [visible]);
|
|
@@ -48362,20 +49150,15 @@ var Modal = function Modal(props) {
|
|
|
48362
49150
|
// unmount
|
|
48363
49151
|
return function () {
|
|
48364
49152
|
var _props$shouldDestroy2;
|
|
49153
|
+
if (context.isMask) {
|
|
49154
|
+
resetDocumentOverflow();
|
|
49155
|
+
}
|
|
49156
|
+
;
|
|
48365
49157
|
(_props$shouldDestroy2 = props.shouldDestroy) === null || _props$shouldDestroy2 === void 0 || _props$shouldDestroy2.call(props, true);
|
|
48366
|
-
// if (props.autoShow) {
|
|
48367
|
-
// props.onClose?.();
|
|
48368
|
-
// }
|
|
48369
49158
|
if (context.isMask) {
|
|
48370
49159
|
context.isMask = false;
|
|
48371
49160
|
hasMask = false;
|
|
48372
49161
|
}
|
|
48373
|
-
{
|
|
48374
|
-
if (!context.isMask) return;
|
|
48375
|
-
var doc = document.body.parentNode;
|
|
48376
|
-
doc.style.paddingRight = '';
|
|
48377
|
-
doc.style.overflow = '';
|
|
48378
|
-
}
|
|
48379
49162
|
};
|
|
48380
49163
|
}, []);
|
|
48381
49164
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
@@ -48824,7 +49607,9 @@ var Item_Item = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
48824
49607
|
contentPropsClassName = _ref2$className === void 0 ? '' : _ref2$className,
|
|
48825
49608
|
contentPropsOnClick = _ref2.onClick,
|
|
48826
49609
|
otherContentProps = objectWithoutProperties_default()(_ref2, Item_excluded2);
|
|
48827
|
-
var className = classnames_default()(
|
|
49610
|
+
var className = classnames_default()(
|
|
49611
|
+
// 如果content是Tooltip,则不传递className(就是dropdown-item的className)
|
|
49612
|
+
content.type.displayName !== 'ShineoutTooltip' ? propsClassName : '', contentPropsClassName);
|
|
48828
49613
|
return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(content, Object.assign(otherProps, otherContentProps, {
|
|
48829
49614
|
className: className,
|
|
48830
49615
|
onClick: function onClick(e) {
|
|
@@ -49247,7 +50032,10 @@ var Textarea = function Textarea(props) {
|
|
|
49247
50032
|
});
|
|
49248
50033
|
}
|
|
49249
50034
|
}, [focused]);
|
|
49250
|
-
var
|
|
50035
|
+
var textareaElProps = removeProps(textareaProps, {
|
|
50036
|
+
formName: undefined
|
|
50037
|
+
});
|
|
50038
|
+
var textareaEl = /*#__PURE__*/(0,jsx_runtime.jsx)("textarea", objectSpread2_default()({}, textareaElProps));
|
|
49251
50039
|
if (typeof renderTextarea === 'function') {
|
|
49252
50040
|
textareaEl = renderTextarea(textareaEl);
|
|
49253
50041
|
}
|
|
@@ -49519,7 +50307,8 @@ var textarea_Textarea = function Textarea(props0) {
|
|
|
49519
50307
|
style: {
|
|
49520
50308
|
width: 'auto',
|
|
49521
50309
|
fontSize: 12
|
|
49522
|
-
}
|
|
50310
|
+
},
|
|
50311
|
+
adjust: true
|
|
49523
50312
|
}, resetProps.popoverProps),
|
|
49524
50313
|
error: infoState !== null && infoState !== void 0 && infoState.error && (infoState === null || infoState === void 0 ? void 0 : infoState.error) instanceof Error ? infoState === null || infoState === void 0 || (_infoState$error = infoState.error) === null || _infoState$error === void 0 ? void 0 : _infoState$error.message : undefined,
|
|
49525
50314
|
tip: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -49988,6 +50777,7 @@ EmptyComp.displayName = 'ShineoutEmpty';
|
|
|
49988
50777
|
|
|
49989
50778
|
|
|
49990
50779
|
|
|
50780
|
+
|
|
49991
50781
|
var topPath = {
|
|
49992
50782
|
path: '',
|
|
49993
50783
|
validateFieldSet: function validateFieldSet() {}
|
|
@@ -49996,7 +50786,8 @@ var Provider = function Provider(props) {
|
|
|
49996
50786
|
var children = props.children,
|
|
49997
50787
|
formConfig = props.formConfig,
|
|
49998
50788
|
formValue = props.formValue,
|
|
49999
|
-
formFunc = props.formFunc
|
|
50789
|
+
formFunc = props.formFunc,
|
|
50790
|
+
formSchema = props.formSchema;
|
|
50000
50791
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFuncContext.Provider, {
|
|
50001
50792
|
value: formFunc,
|
|
50002
50793
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormBindContext.Provider, {
|
|
@@ -50005,7 +50796,10 @@ var Provider = function Provider(props) {
|
|
|
50005
50796
|
value: topPath,
|
|
50006
50797
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormConfigContext.Provider, {
|
|
50007
50798
|
value: formConfig,
|
|
50008
|
-
children:
|
|
50799
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(FormSchemaContext.Provider, {
|
|
50800
|
+
value: formSchema,
|
|
50801
|
+
children: children
|
|
50802
|
+
})
|
|
50009
50803
|
})
|
|
50010
50804
|
})
|
|
50011
50805
|
})
|
|
@@ -50104,6 +50898,303 @@ function use_previous_usePrevious(value) {
|
|
|
50104
50898
|
});
|
|
50105
50899
|
return ref.current;
|
|
50106
50900
|
}
|
|
50901
|
+
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form-schema/form-schema-builder.ts
|
|
50902
|
+
|
|
50903
|
+
|
|
50904
|
+
|
|
50905
|
+
|
|
50906
|
+
|
|
50907
|
+
|
|
50908
|
+
var form_schema_builder_excluded = ["required"];
|
|
50909
|
+
var SchemaBuilder = /*#__PURE__*/function () {
|
|
50910
|
+
function SchemaBuilder(formName) {
|
|
50911
|
+
classCallCheck_default()(this, SchemaBuilder);
|
|
50912
|
+
defineProperty_default()(this, "schema", void 0);
|
|
50913
|
+
this.schema = {
|
|
50914
|
+
type: 'object',
|
|
50915
|
+
title: formName,
|
|
50916
|
+
properties: {}
|
|
50917
|
+
};
|
|
50918
|
+
}
|
|
50919
|
+
createClass_default()(SchemaBuilder, [{
|
|
50920
|
+
key: "updateSchema",
|
|
50921
|
+
value: function updateSchema(_ref) {
|
|
50922
|
+
var path = _ref.path,
|
|
50923
|
+
meta = _ref.meta;
|
|
50924
|
+
var pathSegments = this.parsePath(path);
|
|
50925
|
+
if (!pathSegments) return;
|
|
50926
|
+
this.mergeSchema(this.schema, pathSegments, meta);
|
|
50927
|
+
}
|
|
50928
|
+
|
|
50929
|
+
/**
|
|
50930
|
+
* 根据组件信息构建 schema meta
|
|
50931
|
+
*/
|
|
50932
|
+
}, {
|
|
50933
|
+
key: "buildSchemaFromComponent",
|
|
50934
|
+
value: function buildSchemaFromComponent(params) {
|
|
50935
|
+
var _componentElement$pro;
|
|
50936
|
+
var componentElement = params.componentElement,
|
|
50937
|
+
rules = params.rules,
|
|
50938
|
+
label = params.label,
|
|
50939
|
+
finalFieldId = params.finalFieldId,
|
|
50940
|
+
separator = params.separator;
|
|
50941
|
+
var fieldSchemaInfo = {
|
|
50942
|
+
title: label
|
|
50943
|
+
};
|
|
50944
|
+
var data = componentElement.props.data;
|
|
50945
|
+
var isRequired = rules === null || rules === void 0 ? void 0 : rules.some(function (rule) {
|
|
50946
|
+
return rule.required;
|
|
50947
|
+
});
|
|
50948
|
+
fieldSchemaInfo.required = isRequired;
|
|
50949
|
+
fieldSchemaInfo.description = '';
|
|
50950
|
+
if (rules !== null && rules !== void 0 && rules.length) {
|
|
50951
|
+
var messageRules = rules.filter(function (rule) {
|
|
50952
|
+
return typeof rule.message === 'string';
|
|
50953
|
+
});
|
|
50954
|
+
if (messageRules.length) {
|
|
50955
|
+
fieldSchemaInfo.description += "rules: ".concat(messageRules.map(function (rule) {
|
|
50956
|
+
return rule.message;
|
|
50957
|
+
}).join(', '), ";");
|
|
50958
|
+
}
|
|
50959
|
+
}
|
|
50960
|
+
var itemType;
|
|
50961
|
+
if (typeof componentElement.type === 'function') {
|
|
50962
|
+
switch (componentElement.type.name) {
|
|
50963
|
+
case 'Input':
|
|
50964
|
+
fieldSchemaInfo.type = 'string';
|
|
50965
|
+
break;
|
|
50966
|
+
case 'InputNumber':
|
|
50967
|
+
fieldSchemaInfo.type = 'number';
|
|
50968
|
+
break;
|
|
50969
|
+
case 'InputPassword':
|
|
50970
|
+
fieldSchemaInfo.type = 'string';
|
|
50971
|
+
break;
|
|
50972
|
+
case 'Textarea':
|
|
50973
|
+
fieldSchemaInfo.type = 'string';
|
|
50974
|
+
break;
|
|
50975
|
+
case 'Select':
|
|
50976
|
+
case 'TreeSelect':
|
|
50977
|
+
{
|
|
50978
|
+
var format = componentElement.props.format || componentElement.props.keygen;
|
|
50979
|
+
if (typeof componentElement.props.keygen !== 'boolean') {
|
|
50980
|
+
if (typeof format === 'string') {
|
|
50981
|
+
var _data$;
|
|
50982
|
+
itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]) === 'object' ? typeof_default()(data === null || data === void 0 || (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$[format]) : typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
|
|
50983
|
+
} else if (typeof format === 'function') {
|
|
50984
|
+
itemType = typeof_default()(format(data === null || data === void 0 ? void 0 : data[0]));
|
|
50985
|
+
} else {
|
|
50986
|
+
itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
|
|
50987
|
+
}
|
|
50988
|
+
} else {
|
|
50989
|
+
itemType = typeof_default()(data === null || data === void 0 ? void 0 : data[0]);
|
|
50990
|
+
}
|
|
50991
|
+
if (componentElement.props.multiple) {
|
|
50992
|
+
fieldSchemaInfo.type = 'array';
|
|
50993
|
+
fieldSchemaInfo.items = {
|
|
50994
|
+
type: itemType
|
|
50995
|
+
};
|
|
50996
|
+
} else {
|
|
50997
|
+
fieldSchemaInfo.type = itemType;
|
|
50998
|
+
}
|
|
50999
|
+
// props.data格式: [
|
|
51000
|
+
// { "value": 1, "title": "年假" },
|
|
51001
|
+
// { "value": 2, "title": "调休" },
|
|
51002
|
+
// { "value": 3, "title": "事假" },
|
|
51003
|
+
// { "value": 4, "title": "病假" },
|
|
51004
|
+
// { "value": 5, "title": "其他" }
|
|
51005
|
+
// ]
|
|
51006
|
+
// 转换为jsonschema中的enum格式:
|
|
51007
|
+
// "enum": {
|
|
51008
|
+
// "anyOf": [
|
|
51009
|
+
// { "const": 1, "title": "年假" },
|
|
51010
|
+
// { "const": 2, "title": "调休" },
|
|
51011
|
+
// { "const": 3, "title": "事假" },
|
|
51012
|
+
// { "const": 4, "title": "病假" },
|
|
51013
|
+
// { "const": 5, "title": "其他" }
|
|
51014
|
+
// ]
|
|
51015
|
+
// }
|
|
51016
|
+
fieldSchemaInfo.enum = {
|
|
51017
|
+
anyOf: componentElement.props.data.map(function (item) {
|
|
51018
|
+
return {
|
|
51019
|
+
const: (item === null || item === void 0 ? void 0 : item[format]) || item,
|
|
51020
|
+
title: (item === null || item === void 0 ? void 0 : item.title) || item
|
|
51021
|
+
};
|
|
51022
|
+
})
|
|
51023
|
+
};
|
|
51024
|
+
break;
|
|
51025
|
+
}
|
|
51026
|
+
case 'DatePicker':
|
|
51027
|
+
if (componentElement.props.range) {
|
|
51028
|
+
if (finalFieldId !== null && finalFieldId !== void 0 && finalFieldId.includes(separator || '')) {
|
|
51029
|
+
fieldSchemaInfo.type = 'string';
|
|
51030
|
+
fieldSchemaInfo.format = 'date';
|
|
51031
|
+
} else {
|
|
51032
|
+
fieldSchemaInfo.type = 'array';
|
|
51033
|
+
fieldSchemaInfo.items = {
|
|
51034
|
+
type: 'string',
|
|
51035
|
+
format: 'date'
|
|
51036
|
+
};
|
|
51037
|
+
}
|
|
51038
|
+
} else {
|
|
51039
|
+
fieldSchemaInfo.type = 'string';
|
|
51040
|
+
fieldSchemaInfo.format = 'date';
|
|
51041
|
+
}
|
|
51042
|
+
fieldSchemaInfo.description += "\u9ED8\u8BA4\u65F6\u95F4\uFF1A".concat(((_componentElement$pro = componentElement.props.defaultTime) === null || _componentElement$pro === void 0 ? void 0 : _componentElement$pro.toString()) || '', "; \u683C\u5F0F\uFF1A").concat(componentElement.props.format || '', " ");
|
|
51043
|
+
break;
|
|
51044
|
+
case 'Checkbox':
|
|
51045
|
+
fieldSchemaInfo.type = 'array';
|
|
51046
|
+
fieldSchemaInfo.items = {
|
|
51047
|
+
type: 'string'
|
|
51048
|
+
};
|
|
51049
|
+
break;
|
|
51050
|
+
case 'Radio':
|
|
51051
|
+
fieldSchemaInfo.type = 'string';
|
|
51052
|
+
break;
|
|
51053
|
+
case 'Rate':
|
|
51054
|
+
fieldSchemaInfo.type = 'number';
|
|
51055
|
+
break;
|
|
51056
|
+
default:
|
|
51057
|
+
if (Array.isArray(componentElement.props.value) && componentElement.props.value.length === 0) {
|
|
51058
|
+
fieldSchemaInfo.type = 'array';
|
|
51059
|
+
fieldSchemaInfo.items = {
|
|
51060
|
+
type: 'string'
|
|
51061
|
+
};
|
|
51062
|
+
} else {
|
|
51063
|
+
fieldSchemaInfo.type = typeof_default()(componentElement.props.value);
|
|
51064
|
+
}
|
|
51065
|
+
break;
|
|
51066
|
+
}
|
|
51067
|
+
}
|
|
51068
|
+
return fieldSchemaInfo;
|
|
51069
|
+
}
|
|
51070
|
+
|
|
51071
|
+
// 解析路径字符串,如 'a[0].b1' -> ['a', '[0]', 'b1']
|
|
51072
|
+
}, {
|
|
51073
|
+
key: "parsePath",
|
|
51074
|
+
value: function parsePath(path) {
|
|
51075
|
+
if (!path) return null;
|
|
51076
|
+
var segments = [];
|
|
51077
|
+
var current = '';
|
|
51078
|
+
var inBracket = false;
|
|
51079
|
+
for (var i = 0; i < path.length; i++) {
|
|
51080
|
+
var char = path[i];
|
|
51081
|
+
if (char === '[') {
|
|
51082
|
+
if (current) {
|
|
51083
|
+
segments.push(current);
|
|
51084
|
+
current = '';
|
|
51085
|
+
}
|
|
51086
|
+
current = '[';
|
|
51087
|
+
inBracket = true;
|
|
51088
|
+
} else if (char === ']') {
|
|
51089
|
+
current += ']';
|
|
51090
|
+
segments.push(current);
|
|
51091
|
+
current = '';
|
|
51092
|
+
inBracket = false;
|
|
51093
|
+
} else if (char === '.' && !inBracket) {
|
|
51094
|
+
if (current) {
|
|
51095
|
+
segments.push(current);
|
|
51096
|
+
current = '';
|
|
51097
|
+
}
|
|
51098
|
+
} else {
|
|
51099
|
+
current += char;
|
|
51100
|
+
}
|
|
51101
|
+
}
|
|
51102
|
+
if (current) {
|
|
51103
|
+
segments.push(current);
|
|
51104
|
+
}
|
|
51105
|
+
return segments;
|
|
51106
|
+
}
|
|
51107
|
+
|
|
51108
|
+
// 递归合并 schema
|
|
51109
|
+
}, {
|
|
51110
|
+
key: "mergeSchema",
|
|
51111
|
+
value: function mergeSchema(currentSchema, pathSegments, meta) {
|
|
51112
|
+
if (pathSegments.length === 0) {
|
|
51113
|
+
// 到达叶子节点,应用元数据
|
|
51114
|
+
Object.assign(currentSchema, meta);
|
|
51115
|
+
return;
|
|
51116
|
+
}
|
|
51117
|
+
var _pathSegments = toArray_default()(pathSegments),
|
|
51118
|
+
currentSegment = _pathSegments[0],
|
|
51119
|
+
remainingSegments = _pathSegments.slice(1);
|
|
51120
|
+
if (currentSegment.startsWith('[') && currentSegment.endsWith(']')) {
|
|
51121
|
+
// 处理数组索引,如 [0]
|
|
51122
|
+
this.handleArraySegment(currentSchema, remainingSegments, meta);
|
|
51123
|
+
} else {
|
|
51124
|
+
// 处理对象属性
|
|
51125
|
+
this.handleObjectProperty(currentSchema, currentSegment, remainingSegments, meta);
|
|
51126
|
+
}
|
|
51127
|
+
}
|
|
51128
|
+
}, {
|
|
51129
|
+
key: "handleArraySegment",
|
|
51130
|
+
value: function handleArraySegment(currentSchema, remainingSegments, meta) {
|
|
51131
|
+
// 当前节点应该是数组类型
|
|
51132
|
+
if (!currentSchema.items) {
|
|
51133
|
+
currentSchema.type = 'array';
|
|
51134
|
+
currentSchema.items = {
|
|
51135
|
+
type: 'object',
|
|
51136
|
+
properties: {}
|
|
51137
|
+
};
|
|
51138
|
+
}
|
|
51139
|
+
this.mergeSchema(currentSchema.items, remainingSegments, meta);
|
|
51140
|
+
}
|
|
51141
|
+
}, {
|
|
51142
|
+
key: "handleObjectProperty",
|
|
51143
|
+
value: function handleObjectProperty(currentSchema, propertyName, remainingSegments, meta) {
|
|
51144
|
+
// 确保当前节点有 properties
|
|
51145
|
+
if (!currentSchema.properties) {
|
|
51146
|
+
currentSchema.properties = {};
|
|
51147
|
+
}
|
|
51148
|
+
|
|
51149
|
+
// 如果属性不存在,创建它
|
|
51150
|
+
if (!currentSchema.properties[propertyName]) {
|
|
51151
|
+
currentSchema.properties[propertyName] = remainingSegments.length > 0 ? {
|
|
51152
|
+
type: 'object'
|
|
51153
|
+
} : {};
|
|
51154
|
+
}
|
|
51155
|
+
if (remainingSegments.length === 0) {
|
|
51156
|
+
// 叶子节点,应用元数据并处理 required
|
|
51157
|
+
var required = meta.required,
|
|
51158
|
+
restMeta = objectWithoutProperties_default()(meta, form_schema_builder_excluded);
|
|
51159
|
+
Object.assign(currentSchema.properties[propertyName], restMeta);
|
|
51160
|
+
if (typeof required === 'boolean') {
|
|
51161
|
+
this.handleRequired(currentSchema, propertyName, required);
|
|
51162
|
+
}
|
|
51163
|
+
} else {
|
|
51164
|
+
// 继续递归
|
|
51165
|
+
this.mergeSchema(currentSchema.properties[propertyName], remainingSegments, meta);
|
|
51166
|
+
}
|
|
51167
|
+
}
|
|
51168
|
+
}, {
|
|
51169
|
+
key: "handleRequired",
|
|
51170
|
+
value: function handleRequired(parentSchema, propertyName, isRequired) {
|
|
51171
|
+
// 如果required是布尔值,转换为数组形式
|
|
51172
|
+
if (typeof parentSchema.required === 'boolean') {
|
|
51173
|
+
return;
|
|
51174
|
+
}
|
|
51175
|
+
if (!parentSchema.required) {
|
|
51176
|
+
parentSchema.required = [];
|
|
51177
|
+
}
|
|
51178
|
+
var requiredIndex = parentSchema.required.indexOf(propertyName);
|
|
51179
|
+
if (isRequired && requiredIndex === -1) {
|
|
51180
|
+
parentSchema.required.push(propertyName);
|
|
51181
|
+
} else if (!isRequired && requiredIndex !== -1) {
|
|
51182
|
+
parentSchema.required.splice(requiredIndex, 1);
|
|
51183
|
+
}
|
|
51184
|
+
|
|
51185
|
+
// 如果 required 数组为空,删除它
|
|
51186
|
+
if (parentSchema.required.length === 0) {
|
|
51187
|
+
delete parentSchema.required;
|
|
51188
|
+
}
|
|
51189
|
+
}
|
|
51190
|
+
}, {
|
|
51191
|
+
key: "getFormSchema",
|
|
51192
|
+
value: function getFormSchema() {
|
|
51193
|
+
return this.schema;
|
|
51194
|
+
}
|
|
51195
|
+
}]);
|
|
51196
|
+
return SchemaBuilder;
|
|
51197
|
+
}();
|
|
50107
51198
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form.ts
|
|
50108
51199
|
|
|
50109
51200
|
|
|
@@ -50116,7 +51207,9 @@ function use_previous_usePrevious(value) {
|
|
|
50116
51207
|
|
|
50117
51208
|
|
|
50118
51209
|
|
|
51210
|
+
|
|
50119
51211
|
var globalKey = '__global__&&@@';
|
|
51212
|
+
var SUBMIT_TIMEOUT = 10;
|
|
50120
51213
|
|
|
50121
51214
|
|
|
50122
51215
|
var emptyObj = {};
|
|
@@ -50163,7 +51256,8 @@ var useForm = function useForm(props) {
|
|
|
50163
51256
|
resetTime: 0,
|
|
50164
51257
|
mounted: false,
|
|
50165
51258
|
unmounted: false,
|
|
50166
|
-
removeLock: false
|
|
51259
|
+
removeLock: false,
|
|
51260
|
+
schema: props.name ? new SchemaBuilder(props.name) : null
|
|
50167
51261
|
}),
|
|
50168
51262
|
context = _React$useRef.current;
|
|
50169
51263
|
var getValue = use_persist_fn(function (name) {
|
|
@@ -50322,13 +51416,13 @@ var useForm = function useForm(props) {
|
|
|
50322
51416
|
docScroll.top -= scrollToError;
|
|
50323
51417
|
}
|
|
50324
51418
|
}
|
|
50325
|
-
});
|
|
51419
|
+
}, SUBMIT_TIMEOUT + 10);
|
|
50326
51420
|
};
|
|
50327
51421
|
var onChange = use_persist_fn(function (change) {
|
|
50328
51422
|
var _props$onChange;
|
|
50329
51423
|
var newValue = typeof change === 'function' ? utils_immer_produce(context.value, change) : change;
|
|
50330
51424
|
context.value = newValue;
|
|
50331
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props,
|
|
51425
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newValue);
|
|
50332
51426
|
});
|
|
50333
51427
|
var scrollToField = use_persist_fn(function (name) {
|
|
50334
51428
|
var _document;
|
|
@@ -50431,6 +51525,10 @@ var useForm = function useForm(props) {
|
|
|
50431
51525
|
Object.keys(context.defaultValues).forEach(function (df) {
|
|
50432
51526
|
var latestDefaultValue = getValue(df);
|
|
50433
51527
|
if (latestDefaultValue === undefined) {
|
|
51528
|
+
// todo: Form组件传了clearToUndefined时,加入这部分判断?
|
|
51529
|
+
// if(context.value.hasOwnProperty(df) && clearToUndefined){
|
|
51530
|
+
// return;
|
|
51531
|
+
// }
|
|
50434
51532
|
setValue(defineProperty_default()({}, df, context.defaultValues[df]), {
|
|
50435
51533
|
validate: false
|
|
50436
51534
|
});
|
|
@@ -50523,7 +51621,7 @@ var useForm = function useForm(props) {
|
|
|
50523
51621
|
var _other$onSubmit;
|
|
50524
51622
|
submit();
|
|
50525
51623
|
other === null || other === void 0 || (_other$onSubmit = other.onSubmit) === null || _other$onSubmit === void 0 || _other$onSubmit.call(other, e);
|
|
50526
|
-
},
|
|
51624
|
+
}, SUBMIT_TIMEOUT);
|
|
50527
51625
|
};
|
|
50528
51626
|
};
|
|
50529
51627
|
var validateFieldset = function validateFieldset(name, config) {
|
|
@@ -50614,6 +51712,9 @@ var useForm = function useForm(props) {
|
|
|
50614
51712
|
context.names.delete(n);
|
|
50615
51713
|
delete context.defaultValues[n];
|
|
50616
51714
|
}
|
|
51715
|
+
if (context.errors[n]) {
|
|
51716
|
+
delete context.errors[n];
|
|
51717
|
+
}
|
|
50617
51718
|
var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
|
|
50618
51719
|
if (!finalReserveAble && !context.removeLock) {
|
|
50619
51720
|
addRemove(n);
|
|
@@ -50667,7 +51768,11 @@ var useForm = function useForm(props) {
|
|
|
50667
51768
|
validateFieldset: validateFieldset,
|
|
50668
51769
|
insertError: insertError,
|
|
50669
51770
|
spliceError: spliceError,
|
|
50670
|
-
scrollToField: scrollToField
|
|
51771
|
+
scrollToField: scrollToField,
|
|
51772
|
+
getFormSchema: function getFormSchema() {
|
|
51773
|
+
var _context$schema;
|
|
51774
|
+
return (_context$schema = context.schema) === null || _context$schema === void 0 ? void 0 : _context$schema.getFormSchema();
|
|
51775
|
+
}
|
|
50671
51776
|
});
|
|
50672
51777
|
var formConfig = external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo(function () {
|
|
50673
51778
|
return {
|
|
@@ -50705,11 +51810,6 @@ var useForm = function useForm(props) {
|
|
|
50705
51810
|
// 默认值更新
|
|
50706
51811
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
50707
51812
|
context.removeLock = false;
|
|
50708
|
-
// 内部 onChange 改的 value, 不需要更新
|
|
50709
|
-
if (props.value === context.value) {
|
|
50710
|
-
if (!isControl) update();
|
|
50711
|
-
return;
|
|
50712
|
-
}
|
|
50713
51813
|
if (initValidate && !context.resetTime) {
|
|
50714
51814
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
50715
51815
|
var oldValue = deepGet(preValue || emptyObj, key);
|
|
@@ -50719,6 +51819,7 @@ var useForm = function useForm(props) {
|
|
|
50719
51819
|
validateFields(keys).catch(function () {});
|
|
50720
51820
|
}
|
|
50721
51821
|
update();
|
|
51822
|
+
if (!isControl) return;
|
|
50722
51823
|
// 默认值上位时会提前触发外部的onChange, 导致外部的多次setFormValue不能合并后生效的问题(ReactDOM.render方式渲染)
|
|
50723
51824
|
setTimeout(updateDefaultValue);
|
|
50724
51825
|
context.resetTime = 0;
|
|
@@ -50740,7 +51841,8 @@ var useForm = function useForm(props) {
|
|
|
50740
51841
|
ProviderProps: {
|
|
50741
51842
|
formValue: formValue,
|
|
50742
51843
|
formConfig: formConfig,
|
|
50743
|
-
formFunc: formFunc
|
|
51844
|
+
formFunc: formFunc,
|
|
51845
|
+
formSchema: context.schema
|
|
50744
51846
|
},
|
|
50745
51847
|
formFunc: formFunc
|
|
50746
51848
|
};
|
|
@@ -50748,13 +51850,14 @@ var useForm = function useForm(props) {
|
|
|
50748
51850
|
/* harmony default export */ var use_form = (useForm);
|
|
50749
51851
|
;// CONCATENATED MODULE: ../hooks/src/components/use-form/use-form-context.ts
|
|
50750
51852
|
|
|
51853
|
+
|
|
50751
51854
|
var FormContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext({});
|
|
50752
51855
|
function useFormRef() {
|
|
50753
|
-
var
|
|
50754
|
-
|
|
50755
|
-
|
|
50756
|
-
|
|
50757
|
-
return [
|
|
51856
|
+
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({}),
|
|
51857
|
+
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
51858
|
+
formRef = _React$useState2[0],
|
|
51859
|
+
setFormRef = _React$useState2[1];
|
|
51860
|
+
return [formRef, setFormRef];
|
|
50758
51861
|
}
|
|
50759
51862
|
function useFormInstance() {
|
|
50760
51863
|
var formCtx = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useContext(FormContext);
|
|
@@ -50823,7 +51926,8 @@ var Form = function Form(props) {
|
|
|
50823
51926
|
validateFieldsWithValue: validateFieldsWithValue,
|
|
50824
51927
|
validateFieldsWithError: formFunc.validateFields,
|
|
50825
51928
|
set: formFunc.setValue,
|
|
50826
|
-
scrollToField: formFunc.scrollToField
|
|
51929
|
+
scrollToField: formFunc.scrollToField,
|
|
51930
|
+
getFormSchema: formFunc.getFormSchema
|
|
50827
51931
|
});
|
|
50828
51932
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default().useEffect(function () {
|
|
50829
51933
|
if (formRef) {
|
|
@@ -50954,158 +52058,6 @@ var UseFormItem = function UseFormItem() {
|
|
|
50954
52058
|
};
|
|
50955
52059
|
};
|
|
50956
52060
|
/* harmony default export */ var use_form_item = (UseFormItem);
|
|
50957
|
-
;// CONCATENATED MODULE: ../base/src/tooltip/tooltip.tsx
|
|
50958
|
-
|
|
50959
|
-
|
|
50960
|
-
|
|
50961
|
-
|
|
50962
|
-
|
|
50963
|
-
|
|
50964
|
-
|
|
50965
|
-
|
|
50966
|
-
|
|
50967
|
-
|
|
50968
|
-
var tooltip_devUseWarning = devUseWarning;
|
|
50969
|
-
var defaultDelay = 0;
|
|
50970
|
-
var Tooltip = function Tooltip(props) {
|
|
50971
|
-
var _jssStyle$tooltip, _config$tooltip;
|
|
50972
|
-
var _props$trigger = props.trigger,
|
|
50973
|
-
trigger = _props$trigger === void 0 ? 'hover' : _props$trigger,
|
|
50974
|
-
priorityDirection = props.priorityDirection,
|
|
50975
|
-
children = props.children,
|
|
50976
|
-
tip = props.tip,
|
|
50977
|
-
disabledChild = props.disabledChild,
|
|
50978
|
-
jssStyle = props.jssStyle,
|
|
50979
|
-
className = props.className,
|
|
50980
|
-
style = props.style,
|
|
50981
|
-
zIndex = props.zIndex,
|
|
50982
|
-
_props$showArrow = props.showArrow,
|
|
50983
|
-
showArrow = _props$showArrow === void 0 ? true : _props$showArrow,
|
|
50984
|
-
persistentProp = props.persistent,
|
|
50985
|
-
_props$type = props.type,
|
|
50986
|
-
type = _props$type === void 0 ? 'default' : _props$type,
|
|
50987
|
-
_props$position = props.position,
|
|
50988
|
-
popsitionProps = _props$position === void 0 ? 'auto' : _props$position,
|
|
50989
|
-
_props$popupGap = props.popupGap,
|
|
50990
|
-
popupGap = _props$popupGap === void 0 ? 0 : _props$popupGap;
|
|
50991
|
-
var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
|
|
50992
|
-
var config = useConfig();
|
|
50993
|
-
var persistent = persistentProp !== null && persistentProp !== void 0 ? persistentProp : (_config$tooltip = config.tooltip) === null || _config$tooltip === void 0 ? void 0 : _config$tooltip.persistent;
|
|
50994
|
-
var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
|
|
50995
|
-
var delay = props.delay || props.mouseEnterDelay || defaultDelay;
|
|
50996
|
-
var _usePopup = use_popup({
|
|
50997
|
-
position: popsitionProps,
|
|
50998
|
-
trigger: trigger,
|
|
50999
|
-
autoMode: 'popover',
|
|
51000
|
-
priorityDirection: priorityDirection,
|
|
51001
|
-
mouseEnterDelay: delay,
|
|
51002
|
-
targetEvents: disabledChild ? {} : childrenProps
|
|
51003
|
-
}),
|
|
51004
|
-
open = _usePopup.open,
|
|
51005
|
-
position = _usePopup.position,
|
|
51006
|
-
getTargetProps = _usePopup.getTargetProps,
|
|
51007
|
-
targetRef = _usePopup.targetRef,
|
|
51008
|
-
popupRef = _usePopup.popupRef,
|
|
51009
|
-
closePop = _usePopup.closePop;
|
|
51010
|
-
var events = getTargetProps();
|
|
51011
|
-
var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
|
|
51012
|
-
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
51013
|
-
updateKey = _React$useState2[0],
|
|
51014
|
-
setUpdateKey = _React$useState2[1];
|
|
51015
|
-
var handleUpdateKey = usePersistFn(function () {
|
|
51016
|
-
setUpdateKey(function (prev) {
|
|
51017
|
-
return (prev + 1) % 2;
|
|
51018
|
-
});
|
|
51019
|
-
});
|
|
51020
|
-
var bindEvents = function bindEvents() {
|
|
51021
|
-
var _window;
|
|
51022
|
-
var targetEl = targetRef.current;
|
|
51023
|
-
if (!targetEl) return;
|
|
51024
|
-
if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
|
|
51025
|
-
if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
|
|
51026
|
-
if (events.onClick) targetEl.addEventListener('click', events.onClick);
|
|
51027
|
-
(_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
|
|
51028
|
-
};
|
|
51029
|
-
var unbindEvents = function unbindEvents() {
|
|
51030
|
-
var _window2;
|
|
51031
|
-
var targetEl = targetRef.current;
|
|
51032
|
-
if (!targetEl) return;
|
|
51033
|
-
var events = getTargetProps();
|
|
51034
|
-
if (events.onMouseEnter) targetEl.removeEventListener('mouseenter', events.onMouseEnter);
|
|
51035
|
-
if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
|
|
51036
|
-
if (events.onClick) targetEl.removeEventListener('click', events.onClick);
|
|
51037
|
-
targetEl.removeEventListener('click', closePop);
|
|
51038
|
-
(_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
|
|
51039
|
-
};
|
|
51040
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
51041
|
-
if (!persistent) return;
|
|
51042
|
-
bindEvents();
|
|
51043
|
-
return function () {
|
|
51044
|
-
unbindEvents();
|
|
51045
|
-
};
|
|
51046
|
-
}, [persistent]);
|
|
51047
|
-
if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
|
|
51048
|
-
tooltip_devUseWarning.error('Tooltip children expect a single ReactElement.');
|
|
51049
|
-
return null;
|
|
51050
|
-
}
|
|
51051
|
-
if (!tip) return children;
|
|
51052
|
-
var inner = disabledChild ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
51053
|
-
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.target,
|
|
51054
|
-
style: {
|
|
51055
|
-
cursor: 'not-allowed'
|
|
51056
|
-
},
|
|
51057
|
-
children: /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
51058
|
-
style: objectSpread2_default()(objectSpread2_default()({}, childrenProps.style), {}, {
|
|
51059
|
-
pointerEvents: 'none'
|
|
51060
|
-
})
|
|
51061
|
-
})
|
|
51062
|
-
}) : children;
|
|
51063
|
-
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
51064
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("noscript", {
|
|
51065
|
-
ref: function ref(el) {
|
|
51066
|
-
if (!el) return;
|
|
51067
|
-
var targetEl = el.nextElementSibling;
|
|
51068
|
-
if (!targetEl) return;
|
|
51069
|
-
if (targetRef.current === targetEl) return;
|
|
51070
|
-
targetRef.current = targetEl;
|
|
51071
|
-
}
|
|
51072
|
-
}, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, events), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
|
|
51073
|
-
focus: open,
|
|
51074
|
-
parentElRef: targetRef,
|
|
51075
|
-
popupElRef: popupRef,
|
|
51076
|
-
absolute: true,
|
|
51077
|
-
position: position,
|
|
51078
|
-
fixedWidth: false,
|
|
51079
|
-
popupGap: popupGap,
|
|
51080
|
-
zIndex: zIndex,
|
|
51081
|
-
adjust: popsitionProps === 'auto',
|
|
51082
|
-
updateKey: updateKey,
|
|
51083
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
51084
|
-
className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
|
|
51085
|
-
style: {
|
|
51086
|
-
pointerEvents: persistent ? 'initial' : undefined
|
|
51087
|
-
}
|
|
51088
|
-
}, getDataAttribute({
|
|
51089
|
-
type: type,
|
|
51090
|
-
position: position
|
|
51091
|
-
})), {}, {
|
|
51092
|
-
ref: popupRef,
|
|
51093
|
-
onMouseLeave: events.onMouseLeave,
|
|
51094
|
-
dir: config.direction,
|
|
51095
|
-
children: [showArrow && /*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
|
|
51096
|
-
className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
|
|
51097
|
-
}, getDataAttribute({
|
|
51098
|
-
role: 'arrow'
|
|
51099
|
-
}))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51100
|
-
style: style,
|
|
51101
|
-
className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
|
|
51102
|
-
children: tip
|
|
51103
|
-
})]
|
|
51104
|
-
}))
|
|
51105
|
-
})]
|
|
51106
|
-
});
|
|
51107
|
-
};
|
|
51108
|
-
/* harmony default export */ var src_tooltip_tooltip = (Tooltip);
|
|
51109
52061
|
;// CONCATENATED MODULE: ../base/src/form/form-item.tsx
|
|
51110
52062
|
|
|
51111
52063
|
|
|
@@ -51123,7 +52075,7 @@ var form_item_excluded = ["children", "jssStyle", "className", "style", "label",
|
|
|
51123
52075
|
|
|
51124
52076
|
|
|
51125
52077
|
var FormItem = function FormItem(props) {
|
|
51126
|
-
var _jssStyle$formItem;
|
|
52078
|
+
var _jssStyle$formItem, _labelRef$current, _labelTipRef$current;
|
|
51127
52079
|
var children = props.children,
|
|
51128
52080
|
jssStyle = props.jssStyle,
|
|
51129
52081
|
className = props.className,
|
|
@@ -51134,7 +52086,7 @@ var FormItem = function FormItem(props) {
|
|
|
51134
52086
|
rest = objectWithoutProperties_default()(props, form_item_excluded);
|
|
51135
52087
|
var formItemClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$formItem = jssStyle.formItem) === null || _jssStyle$formItem === void 0 ? void 0 : _jssStyle$formItem.call(jssStyle);
|
|
51136
52088
|
var _useFormItem = use_form_item(),
|
|
51137
|
-
|
|
52089
|
+
FormItemContextProvider = _useFormItem.Provider,
|
|
51138
52090
|
ProviderValue = _useFormItem.ProviderValue,
|
|
51139
52091
|
labelConfig = _useFormItem.labelConfig,
|
|
51140
52092
|
errors = _useFormItem.errors,
|
|
@@ -51194,11 +52146,19 @@ var FormItem = function FormItem(props) {
|
|
|
51194
52146
|
children: label
|
|
51195
52147
|
});
|
|
51196
52148
|
};
|
|
52149
|
+
var labelRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
52150
|
+
var labelTipRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
52151
|
+
var labelText = (_labelRef$current = labelRef.current) === null || _labelRef$current === void 0 ? void 0 : _labelRef$current.textContent;
|
|
52152
|
+
if ((_labelTipRef$current = labelTipRef.current) !== null && _labelTipRef$current !== void 0 && _labelTipRef$current.textContent) {
|
|
52153
|
+
var _labelTipRef$current2;
|
|
52154
|
+
labelText += " (tip: ".concat((_labelTipRef$current2 = labelTipRef.current) === null || _labelTipRef$current2 === void 0 ? void 0 : _labelTipRef$current2.textContent, ")");
|
|
52155
|
+
}
|
|
51197
52156
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
51198
|
-
className: classnames_default()(className, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelTop, labelAlign === 'top'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalMiddle, labelAlign !== 'top' && labelVerticalAlign === 'middle'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalBottom, labelAlign !== 'top' && labelVerticalAlign === 'bottom'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperInline, inline), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperKeepHeight, keepErrorHeight), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperRequired, required), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperTip, showError || tip))
|
|
52157
|
+
className: classnames_default()(className, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelTop, labelAlign === 'top'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalMiddle, labelAlign !== 'top' && labelVerticalAlign === 'middle'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperLabelVerticalBottom, labelAlign !== 'top' && labelVerticalAlign === 'bottom'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperInline, inline), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperKeepHeight, keepErrorHeight), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperRequired, required), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperHideRequired, required === false), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.wrapperTip, showError || tip))
|
|
51199
52158
|
}, attributes), {}, {
|
|
51200
52159
|
style: style,
|
|
51201
52160
|
children: [label !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
52161
|
+
ref: labelRef,
|
|
51202
52162
|
className: classnames_default()(formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.label, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelLeft, labelAlign === 'left'), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelWithColon, colon), formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelWithTooltip, label && typeof_default()(label) === 'object' && 'tooltip' in label)),
|
|
51203
52163
|
style: labelAlign !== 'top' || inline ? {
|
|
51204
52164
|
width: labelWidth
|
|
@@ -51209,10 +52169,13 @@ var FormItem = function FormItem(props) {
|
|
|
51209
52169
|
}, getDataAttribute({
|
|
51210
52170
|
role: 'form-control'
|
|
51211
52171
|
})), {}, {
|
|
51212
|
-
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
51213
|
-
value: ProviderValue,
|
|
52172
|
+
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(FormItemContextProvider, {
|
|
52173
|
+
value: objectSpread2_default()(objectSpread2_default()({}, ProviderValue), {}, {
|
|
52174
|
+
label: labelText
|
|
52175
|
+
}),
|
|
51214
52176
|
children: children
|
|
51215
52177
|
}), !!tip && (!showError || keepErrorBelow) && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
52178
|
+
ref: labelTipRef,
|
|
51216
52179
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.tip,
|
|
51217
52180
|
children: tip
|
|
51218
52181
|
}), showError && /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -51375,8 +52338,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51375
52338
|
},
|
|
51376
52339
|
onInsert: function onInsert(val) {
|
|
51377
52340
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
52341
|
+
var insertValue = val;
|
|
52342
|
+
var valueTemplate = oldValue[i];
|
|
52343
|
+
if (insertValue === undefined) {
|
|
52344
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
52345
|
+
}
|
|
51378
52346
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51379
|
-
draft.splice(i, 0,
|
|
52347
|
+
draft.splice(i, 0, insertValue);
|
|
51380
52348
|
});
|
|
51381
52349
|
_onChange(newValue);
|
|
51382
52350
|
// context.ids.splice(i, 0, util.generateUUID());
|
|
@@ -51384,8 +52352,13 @@ var FormFieldSet = function FormFieldSet(props) {
|
|
|
51384
52352
|
},
|
|
51385
52353
|
onAppend: function onAppend(val) {
|
|
51386
52354
|
var oldValue = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
|
|
52355
|
+
var insertValue = val;
|
|
52356
|
+
var valueTemplate = oldValue[i];
|
|
52357
|
+
if (insertValue === undefined) {
|
|
52358
|
+
insertValue = clearValue(deepClone(valueTemplate));
|
|
52359
|
+
}
|
|
51387
52360
|
var newValue = form_fieldset_produce(oldValue, function (draft) {
|
|
51388
|
-
draft.splice(i + 1, 0,
|
|
52361
|
+
draft.splice(i + 1, 0, insertValue);
|
|
51389
52362
|
});
|
|
51390
52363
|
_onChange(newValue);
|
|
51391
52364
|
// context.ids.splice(i + 1, 0, util.generateUUID());
|
|
@@ -53258,7 +54231,8 @@ var Password = function Password(props) {
|
|
|
53258
54231
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(simple_input, objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, forwardProps), inputProps), {}, {
|
|
53259
54232
|
className: props.className,
|
|
53260
54233
|
suffix: suffix,
|
|
53261
|
-
hasSuffix: true
|
|
54234
|
+
hasSuffix: true,
|
|
54235
|
+
showClear: props.showClear
|
|
53262
54236
|
}));
|
|
53263
54237
|
};
|
|
53264
54238
|
/* harmony default export */ var input_password = (/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().memo(Password));
|
|
@@ -53961,6 +54935,7 @@ var list_List = function List(props) {
|
|
|
53961
54935
|
lineHeightProp = props.lineHeight,
|
|
53962
54936
|
threshold = props.threshold,
|
|
53963
54937
|
controlType = props.controlType,
|
|
54938
|
+
keepScrollTop = props.keepScrollTop,
|
|
53964
54939
|
hideCreateOption = props.hideCreateOption,
|
|
53965
54940
|
optionListRef = props.optionListRef,
|
|
53966
54941
|
isAnimationFinish = props.isAnimationFinish,
|
|
@@ -54136,6 +55111,7 @@ var list_List = function List(props) {
|
|
|
54136
55111
|
dynamicVirtual: dynamicVirtual,
|
|
54137
55112
|
tagClassName: styles.virtualList,
|
|
54138
55113
|
height: height,
|
|
55114
|
+
keepScrollTop: keepScrollTop,
|
|
54139
55115
|
onScroll: handleVirtualScroll,
|
|
54140
55116
|
lineHeight: lineHeight,
|
|
54141
55117
|
rowsInView: itemsInView,
|
|
@@ -54253,6 +55229,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
54253
55229
|
onToggle = props.onToggle,
|
|
54254
55230
|
onDragOver = props.onDragOver,
|
|
54255
55231
|
onNodeClick = props.onNodeClick,
|
|
55232
|
+
onTriggered = props.onTriggered,
|
|
54256
55233
|
actionOnClick = props.actionOnClick;
|
|
54257
55234
|
var forceUpdate = useRender();
|
|
54258
55235
|
var _useTreeContext = useTreeContext(),
|
|
@@ -54282,6 +55259,7 @@ var NodeContent = function NodeContent(props) {
|
|
|
54282
55259
|
};
|
|
54283
55260
|
var handleNodeExpand = function handleNodeExpand() {
|
|
54284
55261
|
onToggle === null || onToggle === void 0 || onToggle(id);
|
|
55262
|
+
onTriggered === null || onTriggered === void 0 || onTriggered();
|
|
54285
55263
|
if (data[childrenKey] !== undefined) return;
|
|
54286
55264
|
if (loader) {
|
|
54287
55265
|
setFetching(true);
|
|
@@ -54470,6 +55448,18 @@ var useTreeNode = function useTreeNode(props) {
|
|
|
54470
55448
|
_useState6 = slicedToArray_default()(_useState5, 2),
|
|
54471
55449
|
fetching = _useState6[0],
|
|
54472
55450
|
setFetching = _useState6[1];
|
|
55451
|
+
var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
55452
|
+
_useState8 = slicedToArray_default()(_useState7, 2),
|
|
55453
|
+
hasTriggered = _useState8[0],
|
|
55454
|
+
setHasTriggered = _useState8[1];
|
|
55455
|
+
var get = function get() {
|
|
55456
|
+
return {
|
|
55457
|
+
hasTriggered: hasTriggered,
|
|
55458
|
+
active: active,
|
|
55459
|
+
expanded: expanded,
|
|
55460
|
+
fetching: fetching
|
|
55461
|
+
};
|
|
55462
|
+
};
|
|
54473
55463
|
var update = use_persist_fn(function (key, value) {
|
|
54474
55464
|
switch (key) {
|
|
54475
55465
|
case 'active':
|
|
@@ -54485,9 +55475,14 @@ var useTreeNode = function useTreeNode(props) {
|
|
|
54485
55475
|
setFetching(value);
|
|
54486
55476
|
}
|
|
54487
55477
|
break;
|
|
55478
|
+
case 'get':
|
|
55479
|
+
return get();
|
|
54488
55480
|
}
|
|
54489
55481
|
});
|
|
54490
55482
|
var handleToggle = function handleToggle() {};
|
|
55483
|
+
var handleTriggered = function handleTriggered() {
|
|
55484
|
+
setHasTriggered(true);
|
|
55485
|
+
};
|
|
54491
55486
|
var isLeaf = function isLeaf() {
|
|
54492
55487
|
var children = data[childrenKey];
|
|
54493
55488
|
if (children && children.length > 0) return false;
|
|
@@ -54511,7 +55506,8 @@ var useTreeNode = function useTreeNode(props) {
|
|
|
54511
55506
|
isLeaf: isLeaf,
|
|
54512
55507
|
setFetching: setFetching,
|
|
54513
55508
|
setExpanded: setExpanded,
|
|
54514
|
-
onToggle: handleToggle
|
|
55509
|
+
onToggle: handleToggle,
|
|
55510
|
+
onTriggered: handleTriggered
|
|
54515
55511
|
};
|
|
54516
55512
|
};
|
|
54517
55513
|
/* harmony default export */ var use_tree_node = (useTreeNode);
|
|
@@ -54602,7 +55598,8 @@ var Node = function Node(props) {
|
|
|
54602
55598
|
fetching = _useTreeNode.fetching,
|
|
54603
55599
|
setFetching = _useTreeNode.setFetching,
|
|
54604
55600
|
expanded = _useTreeNode.expanded,
|
|
54605
|
-
setExpanded = _useTreeNode.setExpanded
|
|
55601
|
+
setExpanded = _useTreeNode.setExpanded,
|
|
55602
|
+
onTriggered = _useTreeNode.onTriggered;
|
|
54606
55603
|
var children = data[childrenKey];
|
|
54607
55604
|
var hasChildren = children && children.length > 0;
|
|
54608
55605
|
var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
|
|
@@ -54788,6 +55785,7 @@ var Node = function Node(props) {
|
|
|
54788
55785
|
onChange: onChange,
|
|
54789
55786
|
onFetch: handleFetch,
|
|
54790
55787
|
onNodeClick: onNodeClick,
|
|
55788
|
+
onTriggered: onTriggered,
|
|
54791
55789
|
onDragOver: handleDragOver,
|
|
54792
55790
|
onToggle: handleToggle,
|
|
54793
55791
|
actionOnClick: actionOnClick
|
|
@@ -54953,7 +55951,19 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54953
55951
|
});
|
|
54954
55952
|
if (onToggle) onToggle(id, nextExpanded);
|
|
54955
55953
|
};
|
|
54956
|
-
var
|
|
55954
|
+
var getIndent = function getIndent() {
|
|
55955
|
+
if (size === "large") {
|
|
55956
|
+
if (line && level === 1) {
|
|
55957
|
+
return 16;
|
|
55958
|
+
}
|
|
55959
|
+
return 32;
|
|
55960
|
+
}
|
|
55961
|
+
if (line && level === 1) {
|
|
55962
|
+
return 8;
|
|
55963
|
+
}
|
|
55964
|
+
return 24;
|
|
55965
|
+
};
|
|
55966
|
+
var indent = getIndent();
|
|
54957
55967
|
var $indents;
|
|
54958
55968
|
if (line) {
|
|
54959
55969
|
$indents = Array.from({
|
|
@@ -54972,7 +55982,8 @@ var VirtualNode = function VirtualNode(props) {
|
|
|
54972
55982
|
className: rootClass,
|
|
54973
55983
|
dir: config.direction,
|
|
54974
55984
|
style: {
|
|
54975
|
-
paddingLeft: level * indent
|
|
55985
|
+
paddingLeft: level * indent,
|
|
55986
|
+
height: props.lineHeight
|
|
54976
55987
|
},
|
|
54977
55988
|
children: [$indents, /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
|
|
54978
55989
|
virtual: true,
|
|
@@ -55189,6 +56200,11 @@ var SIZE_MAP = {
|
|
|
55189
56200
|
'default': 36,
|
|
55190
56201
|
'large': 42
|
|
55191
56202
|
};
|
|
56203
|
+
var PADDING_Y_MAP = {
|
|
56204
|
+
'small': 3,
|
|
56205
|
+
'default': 0,
|
|
56206
|
+
'large': 0
|
|
56207
|
+
};
|
|
55192
56208
|
var TreeVirtual = function TreeVirtual(props) {
|
|
55193
56209
|
var jssStyle = props.jssStyle,
|
|
55194
56210
|
height = props.height,
|
|
@@ -55251,7 +56267,8 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
55251
56267
|
onNodeClick: onNodeClick,
|
|
55252
56268
|
onToggle: onToggle,
|
|
55253
56269
|
onChange: onChange,
|
|
55254
|
-
size: datum.size
|
|
56270
|
+
size: datum.size,
|
|
56271
|
+
lineHeight: lineHeight
|
|
55255
56272
|
}, id);
|
|
55256
56273
|
};
|
|
55257
56274
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
|
|
@@ -55267,7 +56284,8 @@ var TreeVirtual = function TreeVirtual(props) {
|
|
|
55267
56284
|
keepScrollHeight: true,
|
|
55268
56285
|
dynamicVirtual: true,
|
|
55269
56286
|
lineHeight: lineHeight,
|
|
55270
|
-
renderItem: renderItem
|
|
56287
|
+
renderItem: renderItem,
|
|
56288
|
+
paddingY: PADDING_Y_MAP[datum.size || 'default']
|
|
55271
56289
|
});
|
|
55272
56290
|
};
|
|
55273
56291
|
/* harmony default export */ var tree_virtual = (TreeVirtual);
|
|
@@ -55933,7 +56951,8 @@ var ColumnsList = function ColumnsList(props) {
|
|
|
55933
56951
|
colNum: columns,
|
|
55934
56952
|
lineHeight: lineHeight,
|
|
55935
56953
|
rowsInView: itemsInView,
|
|
55936
|
-
renderItem: renderItem
|
|
56954
|
+
renderItem: renderItem,
|
|
56955
|
+
paddingY: 4
|
|
55937
56956
|
});
|
|
55938
56957
|
};
|
|
55939
56958
|
var renderSelectAll = function renderSelectAll() {
|
|
@@ -56074,7 +57093,9 @@ function Select(props0) {
|
|
|
56074
57093
|
noCache = props.noCache,
|
|
56075
57094
|
highlight = props.highlight,
|
|
56076
57095
|
_props$trigger = props.trigger,
|
|
56077
|
-
trigger = _props$trigger === void 0 ? 'click' : _props$trigger
|
|
57096
|
+
trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
|
|
57097
|
+
_props$preventEnterSe = props.preventEnterSelect,
|
|
57098
|
+
preventEnterSelect = _props$preventEnterSe === void 0 ? false : _props$preventEnterSe;
|
|
56078
57099
|
var hasFilter = isFunc(props.onAdvancedFilter || onFilterProp);
|
|
56079
57100
|
var showInput = hasFilter || isFunc(onCreateProp) || onCreateProp === true;
|
|
56080
57101
|
var positionProp = props.position || (direction === 'rtl' ? 'bottom-right' : 'bottom-left');
|
|
@@ -56298,6 +57319,11 @@ function Select(props0) {
|
|
|
56298
57319
|
return;
|
|
56299
57320
|
}
|
|
56300
57321
|
}
|
|
57322
|
+
|
|
57323
|
+
// 当开启 preventEnterSelect 且存在 onCreate 功能时,阻止选中已有选项
|
|
57324
|
+
if (preventEnterSelect && onCreate && !createdData) {
|
|
57325
|
+
return;
|
|
57326
|
+
}
|
|
56301
57327
|
var currentDataItem = filterData === null || filterData === void 0 ? void 0 : filterData[hoverIndex];
|
|
56302
57328
|
if (currentDataItem && !currentDataItem[groupKey]) {
|
|
56303
57329
|
handleChange(currentDataItem);
|
|
@@ -56334,7 +57360,8 @@ function Select(props0) {
|
|
|
56334
57360
|
if (hideCreate) {
|
|
56335
57361
|
// optionListRef.current?.hoverMove(filterData.length - 1, true);
|
|
56336
57362
|
}
|
|
56337
|
-
|
|
57363
|
+
// onFilter?.(trim ? text.trim() : text, from);
|
|
57364
|
+
onFilter === null || onFilter === void 0 || onFilter(text.trim(), from);
|
|
56338
57365
|
};
|
|
56339
57366
|
var handleOptionClick = function handleOptionClick() {
|
|
56340
57367
|
if (multiple) return;
|
|
@@ -56540,6 +57567,7 @@ function Select(props0) {
|
|
|
56540
57567
|
renderItem: renderItem,
|
|
56541
57568
|
controlType: controlType,
|
|
56542
57569
|
onLoadMore: onLoadMore,
|
|
57570
|
+
keepScrollTop: !!filterText ? false : true,
|
|
56543
57571
|
isAnimationFinish: isAnimationFinish,
|
|
56544
57572
|
threshold: threshold,
|
|
56545
57573
|
onControlTypeChange: setControlType,
|
|
@@ -57248,7 +58276,8 @@ var usePagination = function usePagination(props) {
|
|
|
57248
58276
|
return objectSpread2_default()({}, mergedEventHandlers);
|
|
57249
58277
|
};
|
|
57250
58278
|
return {
|
|
57251
|
-
|
|
58279
|
+
// current,
|
|
58280
|
+
current: currentProp !== undefined ? currentProp : current,
|
|
57252
58281
|
pageSize: pageSize,
|
|
57253
58282
|
total: total,
|
|
57254
58283
|
onChange: handleChange,
|
|
@@ -59674,17 +60703,17 @@ var Rate = function Rate(props0) {
|
|
|
59674
60703
|
var rate_jssStyle = {
|
|
59675
60704
|
rate: useRateStyle
|
|
59676
60705
|
};
|
|
59677
|
-
var
|
|
60706
|
+
var rate_Rate = function Rate(props) {
|
|
59678
60707
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_rate_rate, objectSpread2_default()({
|
|
59679
60708
|
jssStyle: rate_jssStyle
|
|
59680
60709
|
}, props));
|
|
59681
60710
|
};
|
|
59682
|
-
var
|
|
59683
|
-
return use_field_common(props,
|
|
60711
|
+
var WrappedRate = function WrappedRate(props) {
|
|
60712
|
+
return use_field_common(props, rate_Rate, 'number');
|
|
59684
60713
|
};
|
|
59685
60714
|
/* harmony default export */ var src_rate_rate_0 = (function (background, front, opts) {
|
|
59686
60715
|
var RateIns = function RateIns(props) {
|
|
59687
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(
|
|
60716
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(WrappedRate, objectSpread2_default()(objectSpread2_default()({}, opts), {}, {
|
|
59688
60717
|
background: background,
|
|
59689
60718
|
front: front || background
|
|
59690
60719
|
}, props));
|
|
@@ -59905,15 +60934,15 @@ var select_jssStyle = {
|
|
|
59905
60934
|
spin: useSpinStyle,
|
|
59906
60935
|
common: useCommonStyle
|
|
59907
60936
|
};
|
|
59908
|
-
function
|
|
60937
|
+
function select_Select(props) {
|
|
59909
60938
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_select_select, objectSpread2_default()({
|
|
59910
60939
|
jssStyle: select_jssStyle
|
|
59911
60940
|
}, props));
|
|
59912
60941
|
}
|
|
59913
|
-
function
|
|
59914
|
-
return use_field_common(props,
|
|
60942
|
+
function SelectComponent(props) {
|
|
60943
|
+
return use_field_common(props, select_Select, 'array');
|
|
59915
60944
|
}
|
|
59916
|
-
/* harmony default export */ var src_select_select_0 = (
|
|
60945
|
+
/* harmony default export */ var src_select_select_0 = (SelectComponent);
|
|
59917
60946
|
;// CONCATENATED MODULE: ./src/select/index.ts
|
|
59918
60947
|
|
|
59919
60948
|
var SelectComp = src_select_select_0;
|
|
@@ -60834,24 +61863,18 @@ var sticky_cssSupport = cssSupport,
|
|
|
60834
61863
|
var supportSticky = sticky_cssSupport('position', 'sticky');
|
|
60835
61864
|
var defaultZIndex = 900;
|
|
60836
61865
|
var events = ['scroll', 'pageshow', 'load', 'resize'];
|
|
60837
|
-
|
|
60838
|
-
|
|
60839
|
-
|
|
60840
|
-
|
|
60841
|
-
|
|
60842
|
-
|
|
60843
|
-
|
|
60844
|
-
|
|
60845
|
-
|
|
60846
|
-
|
|
60847
|
-
// break;
|
|
60848
|
-
// }
|
|
60849
|
-
// parent = parent.parentNode as HTMLElement;
|
|
60850
|
-
// }
|
|
60851
|
-
// return parent;
|
|
60852
|
-
// };
|
|
60853
|
-
|
|
61866
|
+
function getStaticTop(el) {
|
|
61867
|
+
var stopper = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document.body;
|
|
61868
|
+
var top = 0;
|
|
61869
|
+
var currentEl = el;
|
|
61870
|
+
while (currentEl && currentEl !== stopper) {
|
|
61871
|
+
top += currentEl.offsetTop;
|
|
61872
|
+
currentEl = currentEl.offsetParent;
|
|
61873
|
+
}
|
|
61874
|
+
return top;
|
|
61875
|
+
}
|
|
60854
61876
|
var Sticky = function Sticky(props) {
|
|
61877
|
+
var _props$style;
|
|
60855
61878
|
if (props.target) {
|
|
60856
61879
|
sticky_devUseWarning.deprecated('target', 'scrollContainer', 'Sticky');
|
|
60857
61880
|
}
|
|
@@ -60861,13 +61884,16 @@ var Sticky = function Sticky(props) {
|
|
|
60861
61884
|
// 是否使用css sticky
|
|
60862
61885
|
var css = (props.css || props.target) && supportSticky;
|
|
60863
61886
|
var forceUpdate = useRender();
|
|
61887
|
+
var fixedStickyElRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
60864
61888
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
60865
61889
|
target: null,
|
|
60866
61890
|
div: null,
|
|
60867
61891
|
position: '',
|
|
60868
61892
|
targetObserver: null,
|
|
60869
61893
|
parentObserver: null,
|
|
60870
|
-
fixedObserver: null
|
|
61894
|
+
fixedObserver: null,
|
|
61895
|
+
stoped: false,
|
|
61896
|
+
originPosition: null
|
|
60871
61897
|
}),
|
|
60872
61898
|
context = _useRef.current;
|
|
60873
61899
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
|
|
@@ -60883,6 +61909,77 @@ var Sticky = function Sticky(props) {
|
|
|
60883
61909
|
parentVisible = _useState6[0],
|
|
60884
61910
|
setParentVisible = _useState6[1];
|
|
60885
61911
|
var elementRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
61912
|
+
var onStickyBoundaryChange = usePersistFn(function (e) {
|
|
61913
|
+
var target = e.target;
|
|
61914
|
+
var isDocument = !context.target || context.target === document.documentElement;
|
|
61915
|
+
var scrollTop = isDocument ? window.scrollY : target.scrollTop;
|
|
61916
|
+
if (!target || typeof scrollTop !== 'number') return;
|
|
61917
|
+
var stopStickyPoint = -1;
|
|
61918
|
+
var baseTop = 0;
|
|
61919
|
+
var absoluteTop = 0;
|
|
61920
|
+
var absoluteLeft = 0;
|
|
61921
|
+
var stopStickyElement = null;
|
|
61922
|
+
if (typeof props.stickyBoundary === 'number') {
|
|
61923
|
+
stopStickyPoint = props.stickyBoundary;
|
|
61924
|
+
} else if (typeof props.stickyBoundary === 'function') {
|
|
61925
|
+
stopStickyElement = props.stickyBoundary();
|
|
61926
|
+
if (!stopStickyElement) return;
|
|
61927
|
+
var stopStickyRect = stopStickyElement.getBoundingClientRect();
|
|
61928
|
+
var targetRect = elementRef.current.getBoundingClientRect();
|
|
61929
|
+
if (context.target === document.documentElement || !context.target) {
|
|
61930
|
+
baseTop = getStaticTop(elementRef.current) - (props.top || 0);
|
|
61931
|
+
absoluteTop = stopStickyRect.bottom - targetRect.bottom;
|
|
61932
|
+
absoluteLeft = stopStickyRect.left - targetRect.left;
|
|
61933
|
+
}
|
|
61934
|
+
stopStickyPoint = stopStickyRect.bottom - targetRect.bottom + baseTop;
|
|
61935
|
+
}
|
|
61936
|
+
if (stopStickyPoint < 0) return;
|
|
61937
|
+
if (scrollTop > stopStickyPoint) {
|
|
61938
|
+
if (context.stoped) return;
|
|
61939
|
+
context.stoped = true;
|
|
61940
|
+
|
|
61941
|
+
// 把 div 移动到 target 内部,使用 absolute 定位跟随滚动
|
|
61942
|
+
if (context.div && context.target) {
|
|
61943
|
+
context.target.insertBefore(context.div, context.target.firstChild);
|
|
61944
|
+
var paddingLeft = Number(window.getComputedStyle(context.target).paddingLeft.replace('px', '')) || 0;
|
|
61945
|
+
var borderLeftWidth = Number(window.getComputedStyle(context.target).borderLeftWidth.replace('px', '')) || 0;
|
|
61946
|
+
var left = paddingLeft + borderLeftWidth;
|
|
61947
|
+
context.div.style.transform = "translate(-".concat(left, "px, ").concat(stopStickyPoint, "px)");
|
|
61948
|
+
} else {
|
|
61949
|
+
if (stopStickyElement) {
|
|
61950
|
+
if (!fixedStickyElRef.current) return;
|
|
61951
|
+
// 存储原始位置到 context 中
|
|
61952
|
+
if (!context.originPosition) {
|
|
61953
|
+
var originStyle = window.getComputedStyle(fixedStickyElRef.current);
|
|
61954
|
+
context.originPosition = {
|
|
61955
|
+
top: originStyle.top,
|
|
61956
|
+
left: originStyle.left
|
|
61957
|
+
};
|
|
61958
|
+
}
|
|
61959
|
+
|
|
61960
|
+
// 直接操作DOM的原因是:不闪烁且性能更好
|
|
61961
|
+
stopStickyElement.style.transform = "translateZ(0)";
|
|
61962
|
+
fixedStickyElRef.current.style.top = "".concat(absoluteTop, "px");
|
|
61963
|
+
fixedStickyElRef.current.style.left = "".concat(absoluteLeft, "px");
|
|
61964
|
+
}
|
|
61965
|
+
// 暂不支持 props.stickyBoundary 为 number 的fixed定位情况
|
|
61966
|
+
}
|
|
61967
|
+
} else {
|
|
61968
|
+
if (!context.stoped) return;
|
|
61969
|
+
context.stoped = false;
|
|
61970
|
+
|
|
61971
|
+
// 恢复正常吸附模式:把 div 移动到 target 外部
|
|
61972
|
+
if (context.div && context.target && context.target.parentNode) {
|
|
61973
|
+
context.target.parentNode.insertBefore(context.div, context.target);
|
|
61974
|
+
context.div.style.transform = 'none';
|
|
61975
|
+
} else if (stopStickyElement && fixedStickyElRef.current && context.originPosition) {
|
|
61976
|
+
stopStickyElement.style.transform = "none";
|
|
61977
|
+
fixedStickyElRef.current.style.top = context.originPosition.top;
|
|
61978
|
+
fixedStickyElRef.current.style.left = context.originPosition.left;
|
|
61979
|
+
context.originPosition = null; // 清理状态
|
|
61980
|
+
}
|
|
61981
|
+
}
|
|
61982
|
+
});
|
|
60886
61983
|
var getTarget = function getTarget() {
|
|
60887
61984
|
var scrollContainer = props.scrollContainer;
|
|
60888
61985
|
if (typeof scrollContainer === 'string') {
|
|
@@ -61124,6 +62221,10 @@ var Sticky = function Sticky(props) {
|
|
|
61124
62221
|
context.div.remove();
|
|
61125
62222
|
context.div = null;
|
|
61126
62223
|
}
|
|
62224
|
+
if (props.stickyBoundary) {
|
|
62225
|
+
var _context$target;
|
|
62226
|
+
(_context$target = context.target) === null || _context$target === void 0 || _context$target.removeEventListener('scroll', onStickyBoundaryChange);
|
|
62227
|
+
}
|
|
61127
62228
|
};
|
|
61128
62229
|
var createFixedEvents = function createFixedEvents() {
|
|
61129
62230
|
createFixedObserver();
|
|
@@ -61136,6 +62237,10 @@ var Sticky = function Sticky(props) {
|
|
|
61136
62237
|
events.forEach(function (event) {
|
|
61137
62238
|
window.removeEventListener(event, handleFixedPosition);
|
|
61138
62239
|
});
|
|
62240
|
+
if (props.stickyBoundary) {
|
|
62241
|
+
var _context$target2;
|
|
62242
|
+
(_context$target2 = context.target) === null || _context$target2 === void 0 || _context$target2.removeEventListener('scroll', onStickyBoundaryChange);
|
|
62243
|
+
}
|
|
61139
62244
|
};
|
|
61140
62245
|
var handleElementRef = function handleElementRef(el) {
|
|
61141
62246
|
if (el) {
|
|
@@ -61163,7 +62268,15 @@ var Sticky = function Sticky(props) {
|
|
|
61163
62268
|
context.target = target;
|
|
61164
62269
|
forceUpdate();
|
|
61165
62270
|
}
|
|
61166
|
-
if (
|
|
62271
|
+
if (props.stickyBoundary) {
|
|
62272
|
+
if (!context.target || context.target === document.documentElement) {
|
|
62273
|
+
window.addEventListener('scroll', onStickyBoundaryChange);
|
|
62274
|
+
} else {
|
|
62275
|
+
var _context$target3;
|
|
62276
|
+
(_context$target3 = context.target) === null || _context$target3 === void 0 || _context$target3.addEventListener('scroll', onStickyBoundaryChange);
|
|
62277
|
+
}
|
|
62278
|
+
}
|
|
62279
|
+
if (context.target && context.target !== document.documentElement) {
|
|
61167
62280
|
createTargetEvents();
|
|
61168
62281
|
return cancelTargetEvents;
|
|
61169
62282
|
} else {
|
|
@@ -61184,7 +62297,6 @@ var Sticky = function Sticky(props) {
|
|
|
61184
62297
|
if (props.onChange) {
|
|
61185
62298
|
props.onChange(show);
|
|
61186
62299
|
}
|
|
61187
|
-
;
|
|
61188
62300
|
}, [show]);
|
|
61189
62301
|
|
|
61190
62302
|
// 纯css方法 直接使用css
|
|
@@ -61207,7 +62319,7 @@ var Sticky = function Sticky(props) {
|
|
|
61207
62319
|
}
|
|
61208
62320
|
var StickyEl = show && parentVisible ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61209
62321
|
style: objectSpread2_default()(objectSpread2_default()({
|
|
61210
|
-
zIndex: defaultZIndex
|
|
62322
|
+
zIndex: ((_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.zIndex) || defaultZIndex
|
|
61211
62323
|
}, style), elementSize),
|
|
61212
62324
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
61213
62325
|
className: props.className,
|
|
@@ -61380,7 +62492,8 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
61380
62492
|
var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
|
|
61381
62493
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
61382
62494
|
isMouseDown: false,
|
|
61383
|
-
lastTableHeight: 0
|
|
62495
|
+
lastTableHeight: 0,
|
|
62496
|
+
unmounted: false
|
|
61384
62497
|
}),
|
|
61385
62498
|
context = _useRef.current;
|
|
61386
62499
|
var _props$scrollHeight = props.scrollHeight,
|
|
@@ -61489,7 +62602,7 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
61489
62602
|
|
|
61490
62603
|
// 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
|
|
61491
62604
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
61492
|
-
if (!props.tableRef.current) return;
|
|
62605
|
+
if (!props.tableRef.current || context.unmounted) return;
|
|
61493
62606
|
var rootTableHeight = props.tableRef.current.clientHeight;
|
|
61494
62607
|
var container = containerRef.current;
|
|
61495
62608
|
// 判断内容滚动高度是否真的超过了容器高度
|
|
@@ -61501,6 +62614,9 @@ var scroll_table_Scroll = function Scroll(props) {
|
|
|
61501
62614
|
} else {
|
|
61502
62615
|
context.lastTableHeight = rootTableHeight;
|
|
61503
62616
|
}
|
|
62617
|
+
return function () {
|
|
62618
|
+
context.unmounted = true;
|
|
62619
|
+
};
|
|
61504
62620
|
}, [paddingTop]);
|
|
61505
62621
|
if (props.isEmpty) {
|
|
61506
62622
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
|
|
@@ -62387,7 +63503,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62387
63503
|
for (var i = 0; i <= index; i++) {
|
|
62388
63504
|
sum += context.cachedHeight[i] || props.rowHeight;
|
|
62389
63505
|
}
|
|
62390
|
-
return sum + props.
|
|
63506
|
+
return sum + props.theadHeight + props.tfootHeight;
|
|
62391
63507
|
};
|
|
62392
63508
|
var setRowHeight = usePersistFn(function (index, height) {
|
|
62393
63509
|
if (props.disabled) return;
|
|
@@ -62530,7 +63646,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62530
63646
|
callback();
|
|
62531
63647
|
}
|
|
62532
63648
|
};
|
|
62533
|
-
props.scrollRef.current.scrollTop = beforeHeight;
|
|
63649
|
+
props.scrollRef.current.scrollTop = beforeHeight - props.theadHeight;
|
|
62534
63650
|
}
|
|
62535
63651
|
});
|
|
62536
63652
|
var scrollColumnByLeft = usePersistFn(function (targetLeft) {
|
|
@@ -62607,7 +63723,7 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
62607
63723
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
62608
63724
|
if (props.disabled) return;
|
|
62609
63725
|
setHeight(getContentHeight(props.data.length - 1));
|
|
62610
|
-
}, [props.data.length, props.
|
|
63726
|
+
}, [props.data.length, props.theadHeight, props.tfootHeight]);
|
|
62611
63727
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
62612
63728
|
if (props.disabled) return;
|
|
62613
63729
|
if (context.heightCallback) {
|
|
@@ -62996,8 +64112,11 @@ var useTableGroup = function useTableGroup(props) {
|
|
|
62996
64112
|
|
|
62997
64113
|
|
|
62998
64114
|
|
|
64115
|
+
|
|
62999
64116
|
var FilterFooter = function FilterFooter(props) {
|
|
63000
64117
|
var tableClasses = props.tableClasses;
|
|
64118
|
+
var _useConfig = useConfig(),
|
|
64119
|
+
locale = _useConfig.locale;
|
|
63001
64120
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("footer", {
|
|
63002
64121
|
className: tableClasses.filterFooter,
|
|
63003
64122
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
@@ -63006,18 +64125,21 @@ var FilterFooter = function FilterFooter(props) {
|
|
|
63006
64125
|
size: "small",
|
|
63007
64126
|
onClick: props.onReset,
|
|
63008
64127
|
disabled: !props.resetable,
|
|
63009
|
-
|
|
64128
|
+
mode: "outline",
|
|
64129
|
+
children: getLocale(locale, 'reset')
|
|
63010
64130
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, {
|
|
63011
64131
|
jssStyle: props.jssStyle,
|
|
63012
64132
|
size: "small",
|
|
63013
64133
|
type: "primary",
|
|
63014
64134
|
onClick: props.onConfirm,
|
|
63015
|
-
children:
|
|
64135
|
+
children: getLocale(locale, 'ok')
|
|
63016
64136
|
})]
|
|
63017
64137
|
});
|
|
63018
64138
|
};
|
|
63019
64139
|
var FilterSelect = function FilterSelect(props) {
|
|
63020
64140
|
var _props$filterInfo;
|
|
64141
|
+
var _useConfig2 = useConfig(),
|
|
64142
|
+
locale = _useConfig2.locale;
|
|
63021
64143
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
63022
64144
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
63023
64145
|
popoverVisible = _useState2[0],
|
|
@@ -63096,7 +64218,7 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63096
64218
|
jssStyle: props.jssStyle,
|
|
63097
64219
|
shape: "circle",
|
|
63098
64220
|
size: "small",
|
|
63099
|
-
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
64221
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
|
|
63100
64222
|
style: {
|
|
63101
64223
|
border: 'none'
|
|
63102
64224
|
},
|
|
@@ -63114,13 +64236,14 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63114
64236
|
children: [(config === null || config === void 0 ? void 0 : config.search) && /*#__PURE__*/(0,jsx_runtime.jsx)("header", {
|
|
63115
64237
|
className: tableClasses.filterHeader,
|
|
63116
64238
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
64239
|
+
showClear: true,
|
|
63117
64240
|
value: inputText,
|
|
63118
64241
|
onChange: function onChange(v) {
|
|
63119
64242
|
if (onFilter) onFilter(v || '');
|
|
63120
64243
|
setInputText(v);
|
|
63121
64244
|
},
|
|
63122
64245
|
jssStyle: props.jssStyle,
|
|
63123
|
-
placeholder:
|
|
64246
|
+
placeholder: getLocale(locale, 'searchPlaceholder'),
|
|
63124
64247
|
className: tableClasses.filterInput,
|
|
63125
64248
|
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
63126
64249
|
className: tableClasses.filterInputIcon,
|
|
@@ -63156,6 +64279,8 @@ var FilterSelect = function FilterSelect(props) {
|
|
|
63156
64279
|
};
|
|
63157
64280
|
var FilterSearch = function FilterSearch(props) {
|
|
63158
64281
|
var _props$filterInfo2;
|
|
64282
|
+
var _useConfig3 = useConfig(),
|
|
64283
|
+
locale = _useConfig3.locale;
|
|
63159
64284
|
var tableClasses = props.tableClasses,
|
|
63160
64285
|
filter = props.filter;
|
|
63161
64286
|
var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
@@ -63202,7 +64327,7 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63202
64327
|
jssStyle: props.jssStyle,
|
|
63203
64328
|
shape: "circle",
|
|
63204
64329
|
size: "small",
|
|
63205
|
-
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive),
|
|
64330
|
+
className: classnames_default()(tableClasses.filterIconContainer, (currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.value) && tableClasses.filterActive, popoverVisible && tableClasses.filterOpened),
|
|
63206
64331
|
style: {
|
|
63207
64332
|
border: 'none'
|
|
63208
64333
|
},
|
|
@@ -63221,7 +64346,7 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63221
64346
|
className: tableClasses.filterHeader,
|
|
63222
64347
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
63223
64348
|
jssStyle: props.jssStyle,
|
|
63224
|
-
placeholder:
|
|
64349
|
+
placeholder: getLocale(locale, 'searchPlaceholder'),
|
|
63225
64350
|
className: tableClasses.filterInput,
|
|
63226
64351
|
prefix: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
63227
64352
|
className: tableClasses.filterInputIcon,
|
|
@@ -63230,7 +64355,8 @@ var FilterSearch = function FilterSearch(props) {
|
|
|
63230
64355
|
value: tempValue,
|
|
63231
64356
|
onChange: setTempValue,
|
|
63232
64357
|
onEnterPress: onConfirm,
|
|
63233
|
-
forwardRef: inputRef
|
|
64358
|
+
forwardRef: inputRef,
|
|
64359
|
+
showClear: true
|
|
63234
64360
|
})
|
|
63235
64361
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(FilterFooter, {
|
|
63236
64362
|
jssStyle: props.jssStyle,
|
|
@@ -63427,7 +64553,7 @@ var thead_toNum = toNum;
|
|
|
63427
64553
|
var colTemp = col;
|
|
63428
64554
|
var colTemp2 = col;
|
|
63429
64555
|
var fixedStyle = getFixedStyle(col.fixed, col.index, colTemp2.colSpan || 1, level);
|
|
63430
|
-
var cellClassName = classnames_default()(colTemp.className, colTemp.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), colTemp.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), colTemp.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), colTemp.align !== 'right' && colTemp.align !== 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignLeft), (col.lastFixed || col.firstFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), isLast && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder));
|
|
64556
|
+
var cellClassName = classnames_default()(colTemp.className, colTemp.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), colTemp.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), colTemp.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), colTemp.align !== 'right' && colTemp.align !== 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignLeft), (col.lastFixed || col.firstFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), isLast && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), colTemp.sorter && props.cellSortable && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellSortable));
|
|
63431
64557
|
var isExpand = colTemp.type === 'expand' || colTemp.type === 'row-expand';
|
|
63432
64558
|
if (colTemp.title || isExpand) {
|
|
63433
64559
|
var sorter = renderSort(colTemp);
|
|
@@ -63437,6 +64563,22 @@ var thead_toNum = toNum;
|
|
|
63437
64563
|
rowSpan: columnLevel - level + 1,
|
|
63438
64564
|
style: fixedStyle,
|
|
63439
64565
|
dir: config.direction,
|
|
64566
|
+
onClick: function onClick(e) {
|
|
64567
|
+
e.stopPropagation();
|
|
64568
|
+
if (props.cellSortable && colTemp.sorter) {
|
|
64569
|
+
var _sortInfo$get2;
|
|
64570
|
+
var currentOrder = (_sortInfo$get2 = sortInfo.get(colTemp.key)) === null || _sortInfo$get2 === void 0 ? void 0 : _sortInfo$get2.order;
|
|
64571
|
+
var order = null;
|
|
64572
|
+
if (!currentOrder) {
|
|
64573
|
+
order = 'asc';
|
|
64574
|
+
} else if (currentOrder === 'asc') {
|
|
64575
|
+
order = 'desc';
|
|
64576
|
+
} else if (currentOrder === 'desc') {
|
|
64577
|
+
order = null;
|
|
64578
|
+
}
|
|
64579
|
+
onSorterChange === null || onSorterChange === void 0 || onSorterChange(colTemp.key, order, true, colTemp.sorter);
|
|
64580
|
+
}
|
|
64581
|
+
},
|
|
63440
64582
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
63441
64583
|
className: classnames_default()(sorter && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.hasSorter), filter && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.hasFilter)),
|
|
63442
64584
|
children: [renderTitle(colTemp.title), sorter, filter, colTemp.columnResizable !== false && renderDrag(colTemp.index)]
|
|
@@ -63692,19 +64834,8 @@ function useComponentMemo(getValue, condition, shouldUpdate) {
|
|
|
63692
64834
|
|
|
63693
64835
|
|
|
63694
64836
|
|
|
63695
|
-
|
|
63696
64837
|
function Td(props) {
|
|
63697
|
-
var
|
|
63698
|
-
_React$useState2 = slicedToArray_default()(_React$useState, 2),
|
|
63699
|
-
style = _React$useState2[0],
|
|
63700
|
-
setStyle = _React$useState2[1];
|
|
63701
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
63702
|
-
if (!props.style) return;
|
|
63703
|
-
if (shallowEqual(props.style, style)) {
|
|
63704
|
-
return;
|
|
63705
|
-
}
|
|
63706
|
-
setStyle(props.style);
|
|
63707
|
-
}, [props.style]);
|
|
64838
|
+
var _props$style, _props$style2;
|
|
63708
64839
|
var col = props.col,
|
|
63709
64840
|
colSpan = props.colSpan,
|
|
63710
64841
|
rowSpan = props.rowSpan,
|
|
@@ -63724,13 +64855,13 @@ function Td(props) {
|
|
|
63724
64855
|
onMouseEnter: onMouseEnter,
|
|
63725
64856
|
onMouseLeave: onMouseLeave,
|
|
63726
64857
|
className: className,
|
|
63727
|
-
style: style,
|
|
64858
|
+
style: props.style,
|
|
63728
64859
|
dir: direction,
|
|
63729
64860
|
"data-role": role,
|
|
63730
64861
|
onClick: onClick,
|
|
63731
64862
|
children: content
|
|
63732
64863
|
}, col.key);
|
|
63733
|
-
}, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
64864
|
+
}, [data, className, (_props$style = props.style) === null || _props$style === void 0 ? void 0 : _props$style.left, (_props$style2 = props.style) === null || _props$style2 === void 0 ? void 0 : _props$style2.right, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
|
|
63734
64865
|
if (col.type || col.treeColumnsName) {
|
|
63735
64866
|
return true;
|
|
63736
64867
|
}
|
|
@@ -64278,8 +65409,12 @@ var tfoot_isArray = isArray,
|
|
|
64278
65409
|
}, index);
|
|
64279
65410
|
};
|
|
64280
65411
|
var getTrs = function getTrs() {
|
|
64281
|
-
var _props$summary
|
|
64282
|
-
|
|
65412
|
+
var _props$summary, _props$data;
|
|
65413
|
+
if (props !== null && props !== void 0 && (_props$summary = props.summary) !== null && _props$summary !== void 0 && _props$summary.length && (props === null || props === void 0 || (_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) === 0) {
|
|
65414
|
+
return [];
|
|
65415
|
+
}
|
|
65416
|
+
var _props$summary2 = props.summary,
|
|
65417
|
+
summary = _props$summary2 === void 0 ? [] : _props$summary2;
|
|
64283
65418
|
if (!tfoot_isArray(summary[0])) {
|
|
64284
65419
|
summary = [summary];
|
|
64285
65420
|
}
|
|
@@ -64404,7 +65539,8 @@ var emptyRef = {
|
|
|
64404
65539
|
};
|
|
64405
65540
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
64406
65541
|
emptyHeight: 0,
|
|
64407
|
-
|
|
65542
|
+
theadHeight: 0,
|
|
65543
|
+
tfootHeight: 0,
|
|
64408
65544
|
scrollingTimer: null
|
|
64409
65545
|
}),
|
|
64410
65546
|
context = _useRef.current;
|
|
@@ -64537,15 +65673,38 @@ var emptyRef = {
|
|
|
64537
65673
|
onChange: inputableData.onChange,
|
|
64538
65674
|
disabled: props.disabled
|
|
64539
65675
|
});
|
|
64540
|
-
(
|
|
65676
|
+
var handleTheadAndTfootHeight = usePersistFn(function () {
|
|
64541
65677
|
var _theadRef$current, _tfootRef$current;
|
|
64542
65678
|
var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
|
|
64543
65679
|
var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
|
|
64544
65680
|
if (props.sticky) {
|
|
64545
|
-
context.
|
|
65681
|
+
context.tfootHeight = tfootHeight;
|
|
64546
65682
|
} else {
|
|
64547
|
-
context.
|
|
65683
|
+
context.theadHeight = theadHeight;
|
|
65684
|
+
context.tfootHeight = tfootHeight;
|
|
65685
|
+
}
|
|
65686
|
+
});
|
|
65687
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
65688
|
+
handleTheadAndTfootHeight();
|
|
65689
|
+
var cancelFunc1;
|
|
65690
|
+
if (theadRef !== null && theadRef !== void 0 && theadRef.current) {
|
|
65691
|
+
cancelFunc1 = addResizeObserver(theadRef === null || theadRef === void 0 ? void 0 : theadRef.current, handleTheadAndTfootHeight, {
|
|
65692
|
+
direction: 'y',
|
|
65693
|
+
timer: 10
|
|
65694
|
+
});
|
|
65695
|
+
}
|
|
65696
|
+
var cancelFunc2;
|
|
65697
|
+
if (tfootRef !== null && tfootRef !== void 0 && tfootRef.current) {
|
|
65698
|
+
cancelFunc2 = addResizeObserver(tfootRef === null || tfootRef === void 0 ? void 0 : tfootRef.current, handleTheadAndTfootHeight, {
|
|
65699
|
+
direction: 'y',
|
|
65700
|
+
timer: 10
|
|
65701
|
+
});
|
|
64548
65702
|
}
|
|
65703
|
+
return function () {
|
|
65704
|
+
var _cancelFunc, _cancelFunc2;
|
|
65705
|
+
(_cancelFunc = cancelFunc1) === null || _cancelFunc === void 0 || _cancelFunc();
|
|
65706
|
+
(_cancelFunc2 = cancelFunc2) === null || _cancelFunc2 === void 0 || _cancelFunc2();
|
|
65707
|
+
};
|
|
64549
65708
|
}, [theadRef.current, tfootRef.current]);
|
|
64550
65709
|
var virtualInfo = use_table_virtual({
|
|
64551
65710
|
disabled: !virtual,
|
|
@@ -64558,7 +65717,8 @@ var emptyRef = {
|
|
|
64558
65717
|
innerRef: tbodyRef,
|
|
64559
65718
|
scrollLeft: props.scrollLeft,
|
|
64560
65719
|
isRtl: isRtl,
|
|
64561
|
-
|
|
65720
|
+
theadHeight: context.theadHeight,
|
|
65721
|
+
tfootHeight: context.tfootHeight
|
|
64562
65722
|
});
|
|
64563
65723
|
var syncHeaderScroll = usePersistFn(function (left) {
|
|
64564
65724
|
var _tableRef$current;
|
|
@@ -64633,6 +65793,10 @@ var emptyRef = {
|
|
|
64633
65793
|
return null;
|
|
64634
65794
|
};
|
|
64635
65795
|
var $empty = renderEmpty();
|
|
65796
|
+
var tableStyle = {
|
|
65797
|
+
width: width,
|
|
65798
|
+
borderSpacing: 0
|
|
65799
|
+
};
|
|
64636
65800
|
var renderTable = function renderTable() {
|
|
64637
65801
|
var _props$summary, _sticky$top, _props$data2;
|
|
64638
65802
|
var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
|
|
@@ -64682,6 +65846,7 @@ var emptyRef = {
|
|
|
64682
65846
|
onFilterChange: onFilterChange,
|
|
64683
65847
|
sortInfo: sortInfo,
|
|
64684
65848
|
sortDirections: props.sortDirections,
|
|
65849
|
+
cellSortable: props.cellSortable,
|
|
64685
65850
|
onSorterChange: onSorterChange,
|
|
64686
65851
|
dragCol: layoutFunc.dragCol,
|
|
64687
65852
|
resizeCol: layoutFunc.resizeCol,
|
|
@@ -64699,7 +65864,8 @@ var emptyRef = {
|
|
|
64699
65864
|
summary: props.summary,
|
|
64700
65865
|
columns: columns,
|
|
64701
65866
|
jssStyle: props.jssStyle,
|
|
64702
|
-
colgroup: colgroup
|
|
65867
|
+
colgroup: colgroup,
|
|
65868
|
+
data: props.data
|
|
64703
65869
|
};
|
|
64704
65870
|
var StickyWrapper = props.sticky ? src_sticky_sticky : (external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment;
|
|
64705
65871
|
var sticky = typeof_default()(props.sticky) === 'object' ? props.sticky : {
|
|
@@ -64802,9 +65968,7 @@ var emptyRef = {
|
|
|
64802
65968
|
role: theadIdRef.current
|
|
64803
65969
|
})), {}, {
|
|
64804
65970
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64805
|
-
style:
|
|
64806
|
-
width: width
|
|
64807
|
-
},
|
|
65971
|
+
style: tableStyle,
|
|
64808
65972
|
ref: theadRef,
|
|
64809
65973
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
|
|
64810
65974
|
})
|
|
@@ -64833,10 +65997,9 @@ var emptyRef = {
|
|
|
64833
65997
|
tableRef: tableRef,
|
|
64834
65998
|
setFakeVirtual: setFakeVirtual,
|
|
64835
65999
|
children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64836
|
-
style: {
|
|
64837
|
-
width: width,
|
|
66000
|
+
style: objectSpread2_default()(objectSpread2_default()({}, tableStyle), {}, {
|
|
64838
66001
|
transform: virtualInfo.translateStyle
|
|
64839
|
-
},
|
|
66002
|
+
}),
|
|
64840
66003
|
ref: tbodyRef,
|
|
64841
66004
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
|
|
64842
66005
|
currentIndex: virtualInfo.startIndex,
|
|
@@ -64847,9 +66010,7 @@ var emptyRef = {
|
|
|
64847
66010
|
}), showFoot ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
64848
66011
|
className: footWrapperClass,
|
|
64849
66012
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64850
|
-
style:
|
|
64851
|
-
width: width
|
|
64852
|
-
},
|
|
66013
|
+
style: tableStyle,
|
|
64853
66014
|
ref: tfootRef,
|
|
64854
66015
|
children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
|
|
64855
66016
|
})
|
|
@@ -64863,9 +66024,7 @@ var emptyRef = {
|
|
|
64863
66024
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.bodyWrapper,
|
|
64864
66025
|
onScroll: handleBodyScroll,
|
|
64865
66026
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
|
|
64866
|
-
style:
|
|
64867
|
-
width: width
|
|
64868
|
-
},
|
|
66027
|
+
style: tableStyle,
|
|
64869
66028
|
ref: tbodyRef,
|
|
64870
66029
|
children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
|
|
64871
66030
|
children: renderEmpty()
|
|
@@ -64954,9 +66113,7 @@ var emptyRef = {
|
|
|
64954
66113
|
}, props.style),
|
|
64955
66114
|
dir: config.direction,
|
|
64956
66115
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("table", {
|
|
64957
|
-
style:
|
|
64958
|
-
width: width
|
|
64959
|
-
},
|
|
66116
|
+
style: tableStyle,
|
|
64960
66117
|
children: props.children
|
|
64961
66118
|
})
|
|
64962
66119
|
});
|
|
@@ -65549,36 +66706,43 @@ var TabsHeader = function TabsHeader(props) {
|
|
|
65549
66706
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
65550
66707
|
currentTabOffset = _useState2[0],
|
|
65551
66708
|
setCurrentTabOffset = _useState2[1];
|
|
65552
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(
|
|
66709
|
+
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
66710
|
+
width: 0,
|
|
66711
|
+
height: 0
|
|
66712
|
+
}),
|
|
65553
66713
|
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
65554
|
-
|
|
65555
|
-
|
|
66714
|
+
currentTabSize = _useState4[0],
|
|
66715
|
+
setCurrentTabSize = _useState4[1];
|
|
65556
66716
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
|
|
65557
|
-
var _currentTab$getBoundi;
|
|
65558
66717
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
65559
66718
|
var currentTab = tabRef.current[active];
|
|
65560
66719
|
setCurrentTabOffset({
|
|
65561
66720
|
offsetTop: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetTop) || 0,
|
|
65562
66721
|
offsetLeft: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetLeft) || 0
|
|
65563
66722
|
});
|
|
65564
|
-
|
|
65565
|
-
|
|
66723
|
+
|
|
66724
|
+
// 使用 offsetWidth/offsetHeight 而不是 getBoundingClientRect()
|
|
66725
|
+
// 这样可以避免受到外部容器 CSS transform scale 的影响
|
|
66726
|
+
setCurrentTabSize({
|
|
66727
|
+
width: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetWidth) || 0,
|
|
66728
|
+
height: (currentTab === null || currentTab === void 0 ? void 0 : currentTab.offsetHeight) || 0
|
|
66729
|
+
});
|
|
65566
66730
|
}, [active, tabs]);
|
|
65567
66731
|
var renderHeaderScrollBar = function renderHeaderScrollBar() {
|
|
65568
66732
|
if (shape !== 'line' && shape !== 'dash') return;
|
|
65569
|
-
if (!
|
|
66733
|
+
if (!currentTabSize.width || !currentTabSize.height) return;
|
|
65570
66734
|
var scrollBarStyle = isVertical ? {
|
|
65571
66735
|
right: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('left') ? 0 : 'auto',
|
|
65572
66736
|
left: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('right') ? 0 : 'auto',
|
|
65573
|
-
top: currentTabOffset.offsetTop +
|
|
65574
|
-
height: shape === 'line' ?
|
|
66737
|
+
top: currentTabOffset.offsetTop + currentTabSize.height / 2,
|
|
66738
|
+
height: shape === 'line' ? currentTabSize.height : 24,
|
|
65575
66739
|
width: 2,
|
|
65576
66740
|
transform: 'translateY(-50%)'
|
|
65577
66741
|
} : {
|
|
65578
66742
|
bottom: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('top') ? 0 : 'auto',
|
|
65579
66743
|
top: getPosition !== null && getPosition !== void 0 && getPosition.startsWith('bottom') ? 0 : 'auto',
|
|
65580
|
-
left: currentTabOffset.offsetLeft +
|
|
65581
|
-
width: shape === 'line' ?
|
|
66744
|
+
left: currentTabOffset.offsetLeft + currentTabSize.width / 2,
|
|
66745
|
+
width: shape === 'line' ? currentTabSize.width : 24,
|
|
65582
66746
|
height: 2,
|
|
65583
66747
|
transform: 'translateX(-50%)'
|
|
65584
66748
|
};
|
|
@@ -66213,6 +67377,13 @@ var useTransfer = function useTransfer(props) {
|
|
|
66213
67377
|
};
|
|
66214
67378
|
};
|
|
66215
67379
|
/* harmony default export */ var use_transfer = (useTransfer);
|
|
67380
|
+
;// CONCATENATED MODULE: ../hooks/src/components/use-transfer/transfer-context.ts
|
|
67381
|
+
|
|
67382
|
+
var TransferContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({
|
|
67383
|
+
filterSourceText: '',
|
|
67384
|
+
filterTargetText: '',
|
|
67385
|
+
highlight: false
|
|
67386
|
+
});
|
|
66216
67387
|
;// CONCATENATED MODULE: ../base/src/transfer/transfer-list-item.tsx
|
|
66217
67388
|
|
|
66218
67389
|
|
|
@@ -66222,7 +67393,7 @@ var useTransfer = function useTransfer(props) {
|
|
|
66222
67393
|
|
|
66223
67394
|
|
|
66224
67395
|
var TransferListItem = function TransferListItem(props) {
|
|
66225
|
-
var _jssStyle$transfer;
|
|
67396
|
+
var _jssStyle$transfer, _jssStyle$common;
|
|
66226
67397
|
var jssStyle = props.jssStyle,
|
|
66227
67398
|
size = props.size,
|
|
66228
67399
|
data = props.data,
|
|
@@ -66237,6 +67408,7 @@ var TransferListItem = function TransferListItem(props) {
|
|
|
66237
67408
|
// const listItemHeight = useRef(lineHeight);
|
|
66238
67409
|
|
|
66239
67410
|
var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
|
|
67411
|
+
var commonStyles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle)) || {};
|
|
66240
67412
|
var isChecked = listDatum.check(data);
|
|
66241
67413
|
var disabled = listDatum.disabledCheck(data);
|
|
66242
67414
|
var rootClass = classnames_default()(styles.item, itemClass, disabled && styles.disabled);
|
|
@@ -66266,10 +67438,20 @@ var TransferListItem = function TransferListItem(props) {
|
|
|
66266
67438
|
children: icons_config.transfer.DeleteItem
|
|
66267
67439
|
});
|
|
66268
67440
|
};
|
|
67441
|
+
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(TransferContext),
|
|
67442
|
+
filterSourceText = _useContext.filterSourceText,
|
|
67443
|
+
filterTargetText = _useContext.filterTargetText,
|
|
67444
|
+
highlight = _useContext.highlight;
|
|
67445
|
+
var $item = getHighlightText({
|
|
67446
|
+
enable: highlight,
|
|
67447
|
+
nodeList: renderItem(),
|
|
67448
|
+
searchWords: listType === 'target' ? filterTargetText : filterSourceText,
|
|
67449
|
+
highlightClassName: commonStyles.highlight
|
|
67450
|
+
});
|
|
66269
67451
|
var renderCheckbox = function renderCheckbox() {
|
|
66270
67452
|
if (simple && listType === 'target') return /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
66271
67453
|
className: classnames_default()(styles.simpleTarget, disabled && styles.disabled),
|
|
66272
|
-
children: [
|
|
67454
|
+
children: [$item, renderRemove()]
|
|
66273
67455
|
});
|
|
66274
67456
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_checkbox_checkbox
|
|
66275
67457
|
// @ts-ignore
|
|
@@ -66281,7 +67463,7 @@ var TransferListItem = function TransferListItem(props) {
|
|
|
66281
67463
|
checked: isChecked,
|
|
66282
67464
|
disabled: disabled,
|
|
66283
67465
|
onChange: handleChange,
|
|
66284
|
-
children:
|
|
67466
|
+
children: $item
|
|
66285
67467
|
});
|
|
66286
67468
|
};
|
|
66287
67469
|
|
|
@@ -66565,7 +67747,7 @@ var TransferList = function TransferList(props) {
|
|
|
66565
67747
|
className: styles.inputWrapper,
|
|
66566
67748
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, {
|
|
66567
67749
|
className: styles.input,
|
|
66568
|
-
|
|
67750
|
+
showClear: true,
|
|
66569
67751
|
jssStyle: jssStyle,
|
|
66570
67752
|
value: filterText,
|
|
66571
67753
|
suffix: icons_config.transfer.Search,
|
|
@@ -66896,11 +68078,18 @@ var Transfer = function Transfer(props) {
|
|
|
66896
68078
|
}, [target, loading, size, filterTargetText, targetSelectedKeys, renderFilter, children]);
|
|
66897
68079
|
var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
|
|
66898
68080
|
fieldId = _useContext.fieldId;
|
|
66899
|
-
return /*#__PURE__*/(0,jsx_runtime.
|
|
66900
|
-
|
|
66901
|
-
|
|
66902
|
-
|
|
66903
|
-
|
|
68081
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(TransferContext.Provider, {
|
|
68082
|
+
value: {
|
|
68083
|
+
filterSourceText: filterSourceText,
|
|
68084
|
+
filterTargetText: filterTargetText,
|
|
68085
|
+
highlight: props.highlight
|
|
68086
|
+
},
|
|
68087
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
68088
|
+
className: rootClass,
|
|
68089
|
+
style: style,
|
|
68090
|
+
id: fieldId,
|
|
68091
|
+
children: [renderSourceList, !simple && renderOperations(), renderTargetList]
|
|
68092
|
+
})
|
|
66904
68093
|
});
|
|
66905
68094
|
};
|
|
66906
68095
|
/* harmony default export */ var src_transfer_transfer = (Transfer);
|
|
@@ -66917,7 +68106,8 @@ var transfer_jssStyle = {
|
|
|
66917
68106
|
checkbox: useCheckboxStyle,
|
|
66918
68107
|
empty: useEmptyStyle,
|
|
66919
68108
|
input: useInputStyle,
|
|
66920
|
-
spin: useSpinStyle
|
|
68109
|
+
spin: useSpinStyle,
|
|
68110
|
+
common: useCommonStyle
|
|
66921
68111
|
};
|
|
66922
68112
|
var transfer_Transfer = function Transfer(props) {
|
|
66923
68113
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(src_transfer_transfer, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
|
|
@@ -67027,6 +68217,9 @@ var useTreeSelect = function useTreeSelect(props) {
|
|
|
67027
68217
|
|
|
67028
68218
|
|
|
67029
68219
|
|
|
68220
|
+
var defaultProps = {
|
|
68221
|
+
data: []
|
|
68222
|
+
};
|
|
67030
68223
|
var TreeSelect = function TreeSelect(props0) {
|
|
67031
68224
|
var _jssStyle$treeSelect;
|
|
67032
68225
|
var props = use_with_form_config(props0);
|
|
@@ -67043,7 +68236,7 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
67043
68236
|
valueProp = props.value,
|
|
67044
68237
|
defaultValue = props.defaultValue,
|
|
67045
68238
|
_props$data = props.data,
|
|
67046
|
-
data = _props$data === void 0 ?
|
|
68239
|
+
data = _props$data === void 0 ? defaultProps.data : _props$data,
|
|
67047
68240
|
multiple = props.multiple,
|
|
67048
68241
|
_props$mode = props.mode,
|
|
67049
68242
|
mode = _props$mode === void 0 ? 1 : _props$mode,
|
|
@@ -67587,13 +68780,25 @@ var TreeSelect = function TreeSelect(props0) {
|
|
|
67587
68780
|
var style = {
|
|
67588
68781
|
maxHeight: height
|
|
67589
68782
|
};
|
|
68783
|
+
var rootStyle = {
|
|
68784
|
+
padding: '0 4px'
|
|
68785
|
+
};
|
|
68786
|
+
if (!virtual) {
|
|
68787
|
+
if (size === 'small') {
|
|
68788
|
+
rootStyle = {
|
|
68789
|
+
padding: '3px 4px'
|
|
68790
|
+
};
|
|
68791
|
+
} else if (size === 'large') {
|
|
68792
|
+
rootStyle = {
|
|
68793
|
+
padding: '0 5px'
|
|
68794
|
+
};
|
|
68795
|
+
}
|
|
68796
|
+
}
|
|
67590
68797
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
67591
68798
|
className: classnames_default()(styles.tree, styles.treeWrapper),
|
|
67592
68799
|
style: style,
|
|
67593
68800
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_tree_tree, objectSpread2_default()(objectSpread2_default()({
|
|
67594
|
-
rootStyle:
|
|
67595
|
-
padding: '0 4px'
|
|
67596
|
-
},
|
|
68801
|
+
rootStyle: rootStyle,
|
|
67597
68802
|
jssStyle: jssStyle,
|
|
67598
68803
|
renderItem: renderItem
|
|
67599
68804
|
}, treeProps), {}, {
|
|
@@ -68524,6 +69729,10 @@ var useInputClick = function useInputClick() {
|
|
|
68524
69729
|
type: 'file',
|
|
68525
69730
|
style: {
|
|
68526
69731
|
display: 'none'
|
|
69732
|
+
},
|
|
69733
|
+
onClick: function onClick(event) {
|
|
69734
|
+
// 阻止程序化触发(inputRef.current.click())的input点击事件冒泡
|
|
69735
|
+
event.stopPropagation();
|
|
68527
69736
|
}
|
|
68528
69737
|
};
|
|
68529
69738
|
var wrapperProps = {
|
|
@@ -68892,7 +70101,6 @@ var UploadButton = function UploadButton(props) {
|
|
|
68892
70101
|
canDelete: undefined,
|
|
68893
70102
|
showUploadList: false,
|
|
68894
70103
|
customResult: undefined,
|
|
68895
|
-
drop: false,
|
|
68896
70104
|
multiple: false,
|
|
68897
70105
|
leftHandler: false,
|
|
68898
70106
|
onPreview: undefined,
|
|
@@ -71398,7 +72606,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
71398
72606
|
|
|
71399
72607
|
|
|
71400
72608
|
/* harmony default export */ var src_0 = ({
|
|
71401
|
-
version: '3.8.0-beta.
|
|
72609
|
+
version: '3.8.0-beta.21'
|
|
71402
72610
|
});
|
|
71403
72611
|
}();
|
|
71404
72612
|
/******/ return __webpack_exports__;
|