@douyinfe/semi-ui 2.51.3 → 2.52.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/semi.css +285 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +434 -111
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_utils/index.d.ts +2 -1
- package/lib/cjs/_utils/index.js +0 -5
- package/lib/cjs/avatar/TopSlotSvg.d.ts +5 -0
- package/lib/cjs/avatar/TopSlotSvg.js +74 -0
- package/lib/cjs/avatar/index.d.ts +25 -0
- package/lib/cjs/avatar/index.js +126 -8
- package/lib/cjs/avatar/interface.d.ts +24 -1
- package/lib/cjs/dropdown/dropdownItem.js +2 -1
- package/lib/cjs/input/index.d.ts +1 -0
- package/lib/cjs/input/index.js +12 -4
- package/lib/cjs/modal/Modal.d.ts +1 -0
- package/lib/cjs/modal/Modal.js +11 -3
- package/lib/cjs/modal/confirm.d.ts +5 -0
- package/lib/cjs/slider/index.js +33 -1
- package/lib/cjs/table/ColumnFilter.d.ts +34 -18
- package/lib/cjs/table/ColumnFilter.js +134 -73
- package/lib/cjs/table/Table.d.ts +5 -5
- package/lib/cjs/table/Table.js +38 -13
- package/lib/cjs/table/index.d.ts +1 -1
- package/lib/cjs/table/interface.d.ts +30 -10
- package/lib/cjs/treeSelect/index.d.ts +2 -0
- package/lib/cjs/treeSelect/index.js +4 -0
- package/lib/es/_utils/index.d.ts +2 -1
- package/lib/es/_utils/index.js +0 -5
- package/lib/es/avatar/TopSlotSvg.d.ts +5 -0
- package/lib/es/avatar/TopSlotSvg.js +66 -0
- package/lib/es/avatar/index.d.ts +25 -0
- package/lib/es/avatar/index.js +126 -8
- package/lib/es/avatar/interface.d.ts +24 -1
- package/lib/es/dropdown/dropdownItem.js +2 -1
- package/lib/es/input/index.d.ts +1 -0
- package/lib/es/input/index.js +12 -4
- package/lib/es/modal/Modal.d.ts +1 -0
- package/lib/es/modal/Modal.js +11 -3
- package/lib/es/modal/confirm.d.ts +5 -0
- package/lib/es/slider/index.js +33 -1
- package/lib/es/table/ColumnFilter.d.ts +34 -18
- package/lib/es/table/ColumnFilter.js +135 -74
- package/lib/es/table/Table.d.ts +5 -5
- package/lib/es/table/Table.js +38 -13
- package/lib/es/table/index.d.ts +1 -1
- package/lib/es/table/interface.d.ts +30 -10
- package/lib/es/treeSelect/index.d.ts +2 -0
- package/lib/es/treeSelect/index.js +4 -0
- package/package.json +8 -8
package/dist/umd/semi-ui.js
CHANGED
|
@@ -19596,11 +19596,6 @@ function stopPropagation(e, noImmediate) {
|
|
|
19596
19596
|
e.nativeEvent.stopImmediatePropagation();
|
|
19597
19597
|
}
|
|
19598
19598
|
}
|
|
19599
|
-
/**
|
|
19600
|
-
* use in Table, Form, Navigation
|
|
19601
|
-
*
|
|
19602
|
-
* skip clone function and react element
|
|
19603
|
-
*/
|
|
19604
19599
|
function cloneDeep(value, customizer) {
|
|
19605
19600
|
return cloneDeepWith_default()(value, v => {
|
|
19606
19601
|
if (typeof customizer === 'function') {
|
|
@@ -26495,9 +26490,10 @@ class Input extends BaseComponent {
|
|
|
26495
26490
|
getValueLength,
|
|
26496
26491
|
preventScroll,
|
|
26497
26492
|
borderless,
|
|
26498
|
-
showClearIgnoreDisabled
|
|
26493
|
+
showClearIgnoreDisabled,
|
|
26494
|
+
onlyBorder
|
|
26499
26495
|
} = _a,
|
|
26500
|
-
rest = input_rest(_a, ["addonAfter", "addonBefore", "autoFocus", "clearIcon", "className", "disabled", "defaultValue", "placeholder", "prefix", "mode", "insetLabel", "insetLabelId", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength", "preventScroll", "borderless", "showClearIgnoreDisabled"]);
|
|
26496
|
+
rest = input_rest(_a, ["addonAfter", "addonBefore", "autoFocus", "clearIcon", "className", "disabled", "defaultValue", "placeholder", "prefix", "mode", "insetLabel", "insetLabelId", "validateStatus", "type", "readonly", "size", "suffix", "style", "showClear", "onEnterPress", "onClear", "hideSuffix", "inputStyle", "forwardRef", "maxLength", "getValueLength", "preventScroll", "borderless", "showClearIgnoreDisabled", "onlyBorder"]);
|
|
26501
26497
|
const {
|
|
26502
26498
|
value,
|
|
26503
26499
|
isFocus,
|
|
@@ -26525,7 +26521,8 @@ class Input extends BaseComponent {
|
|
|
26525
26521
|
[`${wrapperPrefix}-modebtn`]: mode === 'password',
|
|
26526
26522
|
[`${wrapperPrefix}-hidden`]: type === 'hidden',
|
|
26527
26523
|
[`${wrapperPrefix}-${size}`]: size,
|
|
26528
|
-
[`${input_prefixCls}-borderless`]: borderless
|
|
26524
|
+
[`${input_prefixCls}-borderless`]: borderless,
|
|
26525
|
+
[`${input_prefixCls}-only_border`]: onlyBorder !== undefined && onlyBorder !== null
|
|
26529
26526
|
});
|
|
26530
26527
|
const inputCls = classnames_default()(input_prefixCls, {
|
|
26531
26528
|
[`${input_prefixCls}-${size}`]: size,
|
|
@@ -26559,12 +26556,18 @@ class Input extends BaseComponent {
|
|
|
26559
26556
|
if (validateStatus === 'error') {
|
|
26560
26557
|
inputProps['aria-invalid'] = 'true';
|
|
26561
26558
|
}
|
|
26559
|
+
let wrapperStyle = Object.assign({}, style);
|
|
26560
|
+
if (onlyBorder !== undefined) {
|
|
26561
|
+
wrapperStyle = Object.assign({
|
|
26562
|
+
borderWidth: onlyBorder
|
|
26563
|
+
}, style);
|
|
26564
|
+
}
|
|
26562
26565
|
return (
|
|
26563
26566
|
/*#__PURE__*/
|
|
26564
26567
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions
|
|
26565
26568
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
26566
26569
|
className: wrapperCls,
|
|
26567
|
-
style:
|
|
26570
|
+
style: wrapperStyle,
|
|
26568
26571
|
onMouseEnter: e => this.handleMouseOver(e),
|
|
26569
26572
|
onMouseLeave: e => this.handleMouseLeave(e),
|
|
26570
26573
|
onClick: e => this.handleClick(e)
|
|
@@ -27345,6 +27348,73 @@ class AvatarFoundation extends foundation {
|
|
|
27345
27348
|
}
|
|
27346
27349
|
// EXTERNAL MODULE: ../semi-foundation/avatar/avatar.scss
|
|
27347
27350
|
var avatar = __webpack_require__("mW/5");
|
|
27351
|
+
;// CONCATENATED MODULE: ./avatar/TopSlotSvg.tsx
|
|
27352
|
+
|
|
27353
|
+
|
|
27354
|
+
const TopSlotSvg = _ref => {
|
|
27355
|
+
let {
|
|
27356
|
+
gradientStart,
|
|
27357
|
+
gradientEnd
|
|
27358
|
+
} = _ref;
|
|
27359
|
+
const id = getUuidShort();
|
|
27360
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
27361
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
27362
|
+
width: "51",
|
|
27363
|
+
height: "52",
|
|
27364
|
+
viewBox: "0 0 51 52",
|
|
27365
|
+
fill: "none"
|
|
27366
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("g", {
|
|
27367
|
+
filter: "url(#filter0_d_6_2)"
|
|
27368
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
27369
|
+
d: "M40.4918 46.5592C44.6795 43.176 46.261 34.1333 47.5301 25.6141C49.5854 11.8168 39.6662 1 25.8097 1C11.2857 1 3 11.4279 3 25.3518C3 33.7866 6.29361 43.8947 10.4602 46.5592C12.5868 47.9192 12.5868 47.9051 25.8097 47.9192C38.3651 47.9282 38.5352 48.14 40.4918 46.5592Z",
|
|
27370
|
+
fill: `url(#${id})`
|
|
27371
|
+
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("defs", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("filter", {
|
|
27372
|
+
id: "filter0_d_6_2",
|
|
27373
|
+
x: "0.789215",
|
|
27374
|
+
y: "0.447304",
|
|
27375
|
+
width: "49.2216",
|
|
27376
|
+
height: "51.3549",
|
|
27377
|
+
filterUnits: "userSpaceOnUse",
|
|
27378
|
+
colorInterpolationFilters: "sRGB"
|
|
27379
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feFlood", {
|
|
27380
|
+
floodOpacity: "0",
|
|
27381
|
+
result: "BackgroundImageFix"
|
|
27382
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feColorMatrix", {
|
|
27383
|
+
in: "SourceAlpha",
|
|
27384
|
+
type: "matrix",
|
|
27385
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
27386
|
+
result: "hardAlpha"
|
|
27387
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feOffset", {
|
|
27388
|
+
dy: "1.65809"
|
|
27389
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feGaussianBlur", {
|
|
27390
|
+
stdDeviation: "1.10539"
|
|
27391
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feColorMatrix", {
|
|
27392
|
+
type: "matrix",
|
|
27393
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"
|
|
27394
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feBlend", {
|
|
27395
|
+
mode: "normal",
|
|
27396
|
+
in2: "BackgroundImageFix",
|
|
27397
|
+
result: "effect1_dropShadow_6_2"
|
|
27398
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("feBlend", {
|
|
27399
|
+
mode: "normal",
|
|
27400
|
+
in: "SourceGraphic",
|
|
27401
|
+
in2: "effect1_dropShadow_6_2",
|
|
27402
|
+
result: "shape"
|
|
27403
|
+
})), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("linearGradient", {
|
|
27404
|
+
id: id,
|
|
27405
|
+
x1: "17.671",
|
|
27406
|
+
y1: "31.7392",
|
|
27407
|
+
x2: "17.671",
|
|
27408
|
+
y2: "47.9333",
|
|
27409
|
+
gradientUnits: "userSpaceOnUse"
|
|
27410
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("stop", {
|
|
27411
|
+
stopColor: gradientStart
|
|
27412
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("stop", {
|
|
27413
|
+
offset: "1",
|
|
27414
|
+
stopColor: gradientEnd
|
|
27415
|
+
}))));
|
|
27416
|
+
};
|
|
27417
|
+
/* harmony default export */ const avatar_TopSlotSvg = (TopSlotSvg);
|
|
27348
27418
|
;// CONCATENATED MODULE: ./avatar/index.tsx
|
|
27349
27419
|
var avatar_rest = undefined && undefined.__rest || function (s, e) {
|
|
27350
27420
|
var t = {};
|
|
@@ -27363,6 +27433,7 @@ var avatar_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
27363
27433
|
|
|
27364
27434
|
|
|
27365
27435
|
|
|
27436
|
+
|
|
27366
27437
|
const avatar_sizeSet = avatar_constants_strings.SIZE;
|
|
27367
27438
|
const shapeSet = avatar_constants_strings.SHAPE;
|
|
27368
27439
|
const colorSet = avatar_constants_strings.COLOR;
|
|
@@ -27436,6 +27507,64 @@ class Avatar extends BaseComponent {
|
|
|
27436
27507
|
}
|
|
27437
27508
|
return content;
|
|
27438
27509
|
};
|
|
27510
|
+
this.renderBottomSlot = () => {
|
|
27511
|
+
var _a, _b;
|
|
27512
|
+
if (!this.props.bottomSlot) {
|
|
27513
|
+
return null;
|
|
27514
|
+
}
|
|
27515
|
+
if (this.props.bottomSlot.render) {
|
|
27516
|
+
return this.props.bottomSlot.render();
|
|
27517
|
+
}
|
|
27518
|
+
const renderContent = (_a = this.props.bottomSlot.render) !== null && _a !== void 0 ? _a : () => {
|
|
27519
|
+
var _a;
|
|
27520
|
+
const style = {};
|
|
27521
|
+
if (this.props.bottomSlot.bgColor) {
|
|
27522
|
+
style['backgroundColor'] = this.props.bottomSlot.bgColor;
|
|
27523
|
+
}
|
|
27524
|
+
if (this.props.bottomSlot.textColor) {
|
|
27525
|
+
style['color'] = this.props.bottomSlot.textColor;
|
|
27526
|
+
}
|
|
27527
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
27528
|
+
style: style,
|
|
27529
|
+
className: classnames_default()(`${avatar_prefixCls}-bottom_slot-shape_${this.props.bottomSlot.shape}`, `${avatar_prefixCls}-bottom_slot-shape_${this.props.bottomSlot.shape}-${this.props.size}`, (_a = this.props.bottomSlot.className) !== null && _a !== void 0 ? _a : "")
|
|
27530
|
+
}, this.props.bottomSlot.text);
|
|
27531
|
+
};
|
|
27532
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27533
|
+
className: classnames_default()([`${avatar_prefixCls}-bottom_slot`]),
|
|
27534
|
+
style: (_b = this.props.bottomSlot.style) !== null && _b !== void 0 ? _b : {}
|
|
27535
|
+
}, renderContent());
|
|
27536
|
+
};
|
|
27537
|
+
this.renderTopSlot = () => {
|
|
27538
|
+
var _a, _b, _c, _d;
|
|
27539
|
+
if (!this.props.topSlot) {
|
|
27540
|
+
return null;
|
|
27541
|
+
}
|
|
27542
|
+
if (this.props.topSlot.render) {
|
|
27543
|
+
return this.props.topSlot.render();
|
|
27544
|
+
}
|
|
27545
|
+
const textStyle = {};
|
|
27546
|
+
if (this.props.topSlot.textColor) {
|
|
27547
|
+
textStyle['color'] = this.props.topSlot.textColor;
|
|
27548
|
+
}
|
|
27549
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27550
|
+
style: (_a = this.props.topSlot.style) !== null && _a !== void 0 ? _a : {},
|
|
27551
|
+
className: classnames_default()([`${avatar_prefixCls}-top_slot-wrapper`, (_b = this.props.topSlot.className) !== null && _b !== void 0 ? _b : "", {
|
|
27552
|
+
[`${avatar_prefixCls}-animated`]: this.props.contentMotion
|
|
27553
|
+
}])
|
|
27554
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27555
|
+
className: classnames_default()([`${avatar_prefixCls}-top_slot-bg`, `${avatar_prefixCls}-top_slot-bg-${this.props.size}`])
|
|
27556
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27557
|
+
className: classnames_default()([`${avatar_prefixCls}-top_slot-bg-svg`, `${avatar_prefixCls}-top_slot-bg-svg-${this.props.size}`])
|
|
27558
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(avatar_TopSlotSvg, {
|
|
27559
|
+
gradientStart: (_c = this.props.topSlot.gradientStart) !== null && _c !== void 0 ? _c : "var(--semi-color-primary)",
|
|
27560
|
+
gradientEnd: (_d = this.props.topSlot.gradientEnd) !== null && _d !== void 0 ? _d : "var(--semi-color-primary)"
|
|
27561
|
+
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27562
|
+
className: classnames_default()([`${avatar_prefixCls}-top_slot`])
|
|
27563
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27564
|
+
style: textStyle,
|
|
27565
|
+
className: classnames_default()([`${avatar_prefixCls}-top_slot-content`, `${avatar_prefixCls}-top_slot-content-${this.props.size}`])
|
|
27566
|
+
}, this.props.topSlot.text)));
|
|
27567
|
+
};
|
|
27439
27568
|
this.state = {
|
|
27440
27569
|
isImgExist: true,
|
|
27441
27570
|
hoverContent: '',
|
|
@@ -27553,7 +27682,8 @@ class Avatar extends BaseComponent {
|
|
|
27553
27682
|
}
|
|
27554
27683
|
}
|
|
27555
27684
|
render() {
|
|
27556
|
-
|
|
27685
|
+
var _a, _b;
|
|
27686
|
+
const _c = this.props,
|
|
27557
27687
|
{
|
|
27558
27688
|
shape,
|
|
27559
27689
|
children,
|
|
@@ -27567,9 +27697,13 @@ class Avatar extends BaseComponent {
|
|
|
27567
27697
|
srcSet,
|
|
27568
27698
|
style,
|
|
27569
27699
|
alt,
|
|
27570
|
-
gap
|
|
27571
|
-
|
|
27572
|
-
|
|
27700
|
+
gap,
|
|
27701
|
+
bottomSlot,
|
|
27702
|
+
topSlot,
|
|
27703
|
+
border,
|
|
27704
|
+
contentMotion
|
|
27705
|
+
} = _c,
|
|
27706
|
+
others = avatar_rest(_c, ["shape", "children", "size", "color", "className", "hoverMask", "onClick", "imgAttr", "src", "srcSet", "style", "alt", "gap", "bottomSlot", "topSlot", "border", "contentMotion"]);
|
|
27573
27707
|
const {
|
|
27574
27708
|
isImgExist,
|
|
27575
27709
|
hoverContent,
|
|
@@ -27581,14 +27715,15 @@ class Avatar extends BaseComponent {
|
|
|
27581
27715
|
[`${avatar_prefixCls}-${size}`]: size,
|
|
27582
27716
|
[`${avatar_prefixCls}-${color}`]: color && !isImg,
|
|
27583
27717
|
[`${avatar_prefixCls}-img`]: isImg,
|
|
27584
|
-
[`${avatar_prefixCls}-focus`]: focusVisible
|
|
27718
|
+
[`${avatar_prefixCls}-focus`]: focusVisible,
|
|
27719
|
+
[`${avatar_prefixCls}-animated`]: contentMotion
|
|
27585
27720
|
}, className);
|
|
27586
27721
|
const hoverRender = hoverContent ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27587
27722
|
className: `${avatar_prefixCls}-hover`,
|
|
27588
27723
|
"x-semi-prop": "hoverContent"
|
|
27589
27724
|
}, hoverContent) : null;
|
|
27590
|
-
|
|
27591
|
-
style: style,
|
|
27725
|
+
let avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", Object.assign({}, others, {
|
|
27726
|
+
style: border || bottomSlot || topSlot || border ? {} : style,
|
|
27592
27727
|
className: avatarCls,
|
|
27593
27728
|
onClick: onClick,
|
|
27594
27729
|
onMouseEnter: this.onEnter,
|
|
@@ -27596,6 +27731,36 @@ class Avatar extends BaseComponent {
|
|
|
27596
27731
|
role: 'listitem',
|
|
27597
27732
|
ref: this.avatarRef
|
|
27598
27733
|
}), this.getContent(), hoverRender);
|
|
27734
|
+
if (border) {
|
|
27735
|
+
const borderStyle = {};
|
|
27736
|
+
if (border === null || border === void 0 ? void 0 : border.color) {
|
|
27737
|
+
borderStyle['borderColor'] = border.color;
|
|
27738
|
+
}
|
|
27739
|
+
avatar = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
27740
|
+
style: Object.assign({
|
|
27741
|
+
position: "relative"
|
|
27742
|
+
}, style)
|
|
27743
|
+
}, avatar, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
27744
|
+
style: borderStyle,
|
|
27745
|
+
className: classnames_default()([`${avatar_prefixCls}-additionalBorder`, `${avatar_prefixCls}-additionalBorder-${size}`, {
|
|
27746
|
+
[`${avatar_prefixCls}-${shape}`]: shape
|
|
27747
|
+
}])
|
|
27748
|
+
}), ((_a = this.props.border) === null || _a === void 0 ? void 0 : _a.motion) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
27749
|
+
style: borderStyle,
|
|
27750
|
+
className: classnames_default()([`${avatar_prefixCls}-additionalBorder`, `${avatar_prefixCls}-additionalBorder-${size}`, {
|
|
27751
|
+
[`${avatar_prefixCls}-${shape}`]: shape,
|
|
27752
|
+
[`${avatar_prefixCls}-additionalBorder-animated`]: (_b = this.props.border) === null || _b === void 0 ? void 0 : _b.motion
|
|
27753
|
+
}])
|
|
27754
|
+
}));
|
|
27755
|
+
}
|
|
27756
|
+
if (bottomSlot || topSlot || border) {
|
|
27757
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
|
|
27758
|
+
className: classnames_default()([`${avatar_prefixCls}-wrapper`]),
|
|
27759
|
+
style: style
|
|
27760
|
+
}, avatar, topSlot && ["small", "default", "medium", "large", "extra-large"].includes(size) && shape === "circle" && this.renderTopSlot(), bottomSlot && ["small", "default", "medium", "large", "extra-large"].includes(size) && this.renderBottomSlot());
|
|
27761
|
+
} else {
|
|
27762
|
+
return avatar;
|
|
27763
|
+
}
|
|
27599
27764
|
}
|
|
27600
27765
|
}
|
|
27601
27766
|
Avatar.defaultProps = {
|
|
@@ -27623,7 +27788,30 @@ Avatar.propTypes = {
|
|
|
27623
27788
|
onError: (prop_types_default()).func,
|
|
27624
27789
|
onClick: (prop_types_default()).func,
|
|
27625
27790
|
onMouseEnter: (prop_types_default()).func,
|
|
27626
|
-
onMouseLeave: (prop_types_default()).func
|
|
27791
|
+
onMouseLeave: (prop_types_default()).func,
|
|
27792
|
+
bottomSlot: prop_types_default().shape({
|
|
27793
|
+
render: (prop_types_default()).func,
|
|
27794
|
+
shape: prop_types_default().oneOf(['circle', 'square']),
|
|
27795
|
+
text: (prop_types_default()).node,
|
|
27796
|
+
bgColor: (prop_types_default()).string,
|
|
27797
|
+
textColor: (prop_types_default()).string,
|
|
27798
|
+
className: (prop_types_default()).string,
|
|
27799
|
+
style: (prop_types_default()).object
|
|
27800
|
+
}),
|
|
27801
|
+
topSlot: prop_types_default().shape({
|
|
27802
|
+
render: (prop_types_default()).func,
|
|
27803
|
+
gradientStart: (prop_types_default()).string,
|
|
27804
|
+
gradientEnd: (prop_types_default()).string,
|
|
27805
|
+
text: (prop_types_default()).node,
|
|
27806
|
+
textColor: (prop_types_default()).string,
|
|
27807
|
+
className: (prop_types_default()).string,
|
|
27808
|
+
style: (prop_types_default()).object
|
|
27809
|
+
}),
|
|
27810
|
+
border: prop_types_default().oneOfType([prop_types_default().shape({
|
|
27811
|
+
color: (prop_types_default()).string,
|
|
27812
|
+
motion: (prop_types_default()).bool
|
|
27813
|
+
}), (prop_types_default()).bool]),
|
|
27814
|
+
contentMotion: (prop_types_default()).bool
|
|
27627
27815
|
};
|
|
27628
27816
|
Avatar.elementType = 'Avatar';
|
|
27629
27817
|
;// CONCATENATED MODULE: ./avatar/avatarGroup.tsx
|
|
@@ -54049,17 +54237,19 @@ class DatePickerFoundation extends foundation {
|
|
|
54049
54237
|
timeZone
|
|
54050
54238
|
} = this.getProps();
|
|
54051
54239
|
const prevTimeZone = this.getState('prevTimezone');
|
|
54240
|
+
const start = typeof item.start === 'function' ? item.start() : item.start;
|
|
54241
|
+
const end = typeof item.end === 'function' ? item.end() : item.end;
|
|
54052
54242
|
let value;
|
|
54053
54243
|
switch (type) {
|
|
54054
54244
|
case 'month':
|
|
54055
54245
|
case 'dateTime':
|
|
54056
54246
|
case 'date':
|
|
54057
|
-
value = this.parseWithTimezone([
|
|
54247
|
+
value = this.parseWithTimezone([start], timeZone, prevTimeZone);
|
|
54058
54248
|
this.handleSelectedChange(value);
|
|
54059
54249
|
break;
|
|
54060
54250
|
case 'dateTimeRange':
|
|
54061
54251
|
case 'dateRange':
|
|
54062
|
-
value = this.parseWithTimezone([
|
|
54252
|
+
value = this.parseWithTimezone([start, end], timeZone, prevTimeZone);
|
|
54063
54253
|
this.handleSelectedChange(value, {
|
|
54064
54254
|
needCheckFocusRecord: false
|
|
54065
54255
|
});
|
|
@@ -62165,7 +62355,8 @@ class Modal extends BaseComponent {
|
|
|
62165
62355
|
cancelText,
|
|
62166
62356
|
confirmLoading,
|
|
62167
62357
|
cancelLoading,
|
|
62168
|
-
hasCancel
|
|
62358
|
+
hasCancel,
|
|
62359
|
+
footerFill
|
|
62169
62360
|
} = this.props;
|
|
62170
62361
|
const getCancelButton = locale => {
|
|
62171
62362
|
if (!hasCancel) {
|
|
@@ -62176,6 +62367,7 @@ class Modal extends BaseComponent {
|
|
|
62176
62367
|
onClick: this.handleCancel,
|
|
62177
62368
|
loading: cancelLoading === undefined ? this.state.onCancelReturnPromiseStatus === "pending" : cancelLoading,
|
|
62178
62369
|
type: "tertiary",
|
|
62370
|
+
block: footerFill,
|
|
62179
62371
|
autoFocus: true
|
|
62180
62372
|
}, this.props.cancelButtonProps, {
|
|
62181
62373
|
"x-semi-children-alias": "cancelText"
|
|
@@ -62184,10 +62376,15 @@ class Modal extends BaseComponent {
|
|
|
62184
62376
|
};
|
|
62185
62377
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(LocaleConsumer, {
|
|
62186
62378
|
componentName: "Modal"
|
|
62187
|
-
}, (locale, localeCode) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div",
|
|
62379
|
+
}, (locale, localeCode) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
62380
|
+
className: classnames_default()({
|
|
62381
|
+
[`${modal_constants_cssClasses.DIALOG}-footerfill`]: footerFill
|
|
62382
|
+
})
|
|
62383
|
+
}, getCancelButton(locale), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(button_0, Object.assign({
|
|
62188
62384
|
"aria-label": "confirm",
|
|
62189
62385
|
type: okType,
|
|
62190
62386
|
theme: "solid",
|
|
62387
|
+
block: footerFill,
|
|
62191
62388
|
loading: confirmLoading === undefined ? this.state.onOKReturnPromiseStatus === "pending" : confirmLoading,
|
|
62192
62389
|
onClick: this.handleOk
|
|
62193
62390
|
}, this.props.okButtonProps, {
|
|
@@ -62421,7 +62618,8 @@ Modal.propTypes = {
|
|
|
62421
62618
|
keepDOM: (prop_types_default()).bool,
|
|
62422
62619
|
lazyRender: (prop_types_default()).bool,
|
|
62423
62620
|
direction: prop_types_default().oneOf(modal_constants_strings.directions),
|
|
62424
|
-
fullScreen: (prop_types_default()).bool
|
|
62621
|
+
fullScreen: (prop_types_default()).bool,
|
|
62622
|
+
footerFill: (prop_types_default()).bool
|
|
62425
62623
|
};
|
|
62426
62624
|
Modal.defaultProps = {
|
|
62427
62625
|
zIndex: 1000,
|
|
@@ -62706,7 +62904,8 @@ class DropdownItem extends BaseComponent {
|
|
|
62706
62904
|
const events = {};
|
|
62707
62905
|
if (!disabled) {
|
|
62708
62906
|
['onClick', 'onMouseEnter', 'onMouseLeave', 'onContextMenu'].forEach(eventName => {
|
|
62709
|
-
|
|
62907
|
+
const isInAnotherDropdown = this.context.level !== 1;
|
|
62908
|
+
if (isInAnotherDropdown && eventName === "onClick") {
|
|
62710
62909
|
events["onMouseDown"] = e => {
|
|
62711
62910
|
var _a, _b;
|
|
62712
62911
|
if (e.button === 0) {
|
|
@@ -75464,7 +75663,8 @@ const slider_constants_cssClasses = {
|
|
|
75464
75663
|
TRACK: `${BASE_CLASS_PREFIX}-slider-track`,
|
|
75465
75664
|
DOTS: `${BASE_CLASS_PREFIX}-slider-dots`,
|
|
75466
75665
|
MARKS: `${BASE_CLASS_PREFIX}-slider-marks`,
|
|
75467
|
-
HANDLE: `${BASE_CLASS_PREFIX}-slider-handle
|
|
75666
|
+
HANDLE: `${BASE_CLASS_PREFIX}-slider-handle`,
|
|
75667
|
+
HANDLE_DOT: `${BASE_CLASS_PREFIX}-slider-handle-dot`
|
|
75468
75668
|
};
|
|
75469
75669
|
const slider_constants_strings = {
|
|
75470
75670
|
SIZE: ['small', 'large', 'default'],
|
|
@@ -76283,6 +76483,7 @@ class Slider extends BaseComponent {
|
|
|
76283
76483
|
constructor(props) {
|
|
76284
76484
|
super(props);
|
|
76285
76485
|
this.renderHandle = () => {
|
|
76486
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
76286
76487
|
const {
|
|
76287
76488
|
vertical,
|
|
76288
76489
|
range,
|
|
@@ -76381,6 +76582,14 @@ class Slider extends BaseComponent {
|
|
|
76381
76582
|
"aria-valuenow": currentValue,
|
|
76382
76583
|
"aria-valuemax": max,
|
|
76383
76584
|
"aria-valuemin": min
|
|
76585
|
+
}), this.props.handleDot && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
76586
|
+
className: slider_constants_cssClasses.HANDLE_DOT,
|
|
76587
|
+
style: Object.assign(Object.assign({}, ((_a = this.props.handleDot) === null || _a === void 0 ? void 0 : _a.size) ? {
|
|
76588
|
+
width: this.props.handleDot.size,
|
|
76589
|
+
height: this.props.handleDot.size
|
|
76590
|
+
} : {}), ((_b = this.props.handleDot) === null || _b === void 0 ? void 0 : _b.color) ? {
|
|
76591
|
+
backgroundColor: this.props.handleDot.color
|
|
76592
|
+
} : {})
|
|
76384
76593
|
}))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tooltip, {
|
|
76385
76594
|
content: tipChildren.min,
|
|
76386
76595
|
position: "top",
|
|
@@ -76432,6 +76641,14 @@ class Slider extends BaseComponent {
|
|
|
76432
76641
|
"aria-valuenow": currentValue[0],
|
|
76433
76642
|
"aria-valuemax": currentValue[1],
|
|
76434
76643
|
"aria-valuemin": min
|
|
76644
|
+
}), ((_c = this.props.handleDot) === null || _c === void 0 ? void 0 : _c[0]) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
76645
|
+
className: slider_constants_cssClasses.HANDLE_DOT,
|
|
76646
|
+
style: Object.assign(Object.assign({}, ((_d = this.props.handleDot[0]) === null || _d === void 0 ? void 0 : _d.size) ? {
|
|
76647
|
+
width: this.props.handleDot[0].size,
|
|
76648
|
+
height: this.props.handleDot[0].size
|
|
76649
|
+
} : {}), ((_e = this.props.handleDot[0]) === null || _e === void 0 ? void 0 : _e.color) ? {
|
|
76650
|
+
backgroundColor: this.props.handleDot[0].color
|
|
76651
|
+
} : {})
|
|
76435
76652
|
}))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tooltip, {
|
|
76436
76653
|
content: tipChildren.max,
|
|
76437
76654
|
position: "top",
|
|
@@ -76483,6 +76700,14 @@ class Slider extends BaseComponent {
|
|
|
76483
76700
|
"aria-valuenow": currentValue[1],
|
|
76484
76701
|
"aria-valuemax": max,
|
|
76485
76702
|
"aria-valuemin": currentValue[0]
|
|
76703
|
+
}), ((_f = this.props.handleDot) === null || _f === void 0 ? void 0 : _f[1]) && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
76704
|
+
className: slider_constants_cssClasses.HANDLE_DOT,
|
|
76705
|
+
style: Object.assign(Object.assign({}, ((_g = this.props.handleDot[1]) === null || _g === void 0 ? void 0 : _g.size) ? {
|
|
76706
|
+
width: this.props.handleDot[1].size,
|
|
76707
|
+
height: this.props.handleDot[1].size
|
|
76708
|
+
} : {}), ((_h = this.props.handleDot[1]) === null || _h === void 0 ? void 0 : _h.color) ? {
|
|
76709
|
+
backgroundColor: this.props.handleDot[1].color
|
|
76710
|
+
} : {})
|
|
76486
76711
|
}))));
|
|
76487
76712
|
return handleContents;
|
|
76488
76713
|
};
|
|
@@ -76899,7 +77124,14 @@ Slider.propTypes = {
|
|
|
76899
77124
|
showBoundary: (prop_types_default()).bool,
|
|
76900
77125
|
railStyle: (prop_types_default()).object,
|
|
76901
77126
|
verticalReverse: (prop_types_default()).bool,
|
|
76902
|
-
getAriaValueText: (prop_types_default()).func
|
|
77127
|
+
getAriaValueText: (prop_types_default()).func,
|
|
77128
|
+
handleDot: prop_types_default().oneOfType([prop_types_default().shape({
|
|
77129
|
+
size: (prop_types_default()).string,
|
|
77130
|
+
color: (prop_types_default()).string
|
|
77131
|
+
}), prop_types_default().arrayOf(prop_types_default().shape({
|
|
77132
|
+
size: (prop_types_default()).string,
|
|
77133
|
+
color: (prop_types_default()).string
|
|
77134
|
+
}))])
|
|
76903
77135
|
};
|
|
76904
77136
|
Slider.defaultProps = {
|
|
76905
77137
|
// allowClear: false,
|
|
@@ -79816,8 +80048,9 @@ const IconFilter_IconComponent = convertIcon(IconFilter_SvgComponent, 'filter');
|
|
|
79816
80048
|
|
|
79817
80049
|
|
|
79818
80050
|
|
|
79819
|
-
|
|
79820
|
-
|
|
80051
|
+
|
|
80052
|
+
|
|
80053
|
+
function renderDropdown(props) {
|
|
79821
80054
|
let nestedElem = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
79822
80055
|
let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
79823
80056
|
const {
|
|
@@ -79829,77 +80062,80 @@ function renderDropdown() {
|
|
|
79829
80062
|
onFilterDropdownVisibleChange = (noop_default()),
|
|
79830
80063
|
trigger = 'click',
|
|
79831
80064
|
position = 'bottom',
|
|
80065
|
+
renderFilterDropdown,
|
|
79832
80066
|
renderFilterDropdownItem
|
|
79833
|
-
} = props;
|
|
80067
|
+
} = props !== null && props !== void 0 ? props : {};
|
|
80068
|
+
const renderFilterDropdownProps = pick_default()(props, ['tempFilteredValue', 'setTempFilteredValue', 'confirm', 'clear', 'close', 'filters']);
|
|
80069
|
+
const render = typeof renderFilterDropdown === 'function' ? renderFilterDropdown(renderFilterDropdownProps) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(dropdown_0.Menu, null, Array.isArray(filters) && filters.map((filter, index) => {
|
|
80070
|
+
const changeFn = e => {
|
|
80071
|
+
const domEvent = e && e.nativeEvent;
|
|
80072
|
+
if (domEvent) {
|
|
80073
|
+
// Block this event to prevent the pop-up layer from closing
|
|
80074
|
+
domEvent.stopImmediatePropagation();
|
|
80075
|
+
// Prevent bubbling and default events to prevent label click events from triggering twice
|
|
80076
|
+
domEvent.stopPropagation();
|
|
80077
|
+
domEvent.preventDefault();
|
|
80078
|
+
}
|
|
80079
|
+
let values = [...filteredValue];
|
|
80080
|
+
const included = values.includes(filter.value);
|
|
80081
|
+
const idx = values.indexOf(filter.value);
|
|
80082
|
+
if (idx > -1) {
|
|
80083
|
+
values.splice(idx, 1);
|
|
80084
|
+
} else if (filterMultiple) {
|
|
80085
|
+
values.push(filter.value);
|
|
80086
|
+
} else {
|
|
80087
|
+
values = [filter.value];
|
|
80088
|
+
}
|
|
80089
|
+
return onSelect({
|
|
80090
|
+
value: filter.value,
|
|
80091
|
+
filteredValue: values,
|
|
80092
|
+
included: !included,
|
|
80093
|
+
domEvent
|
|
80094
|
+
});
|
|
80095
|
+
};
|
|
80096
|
+
const checked = filteredValue.includes(filter.value);
|
|
80097
|
+
const {
|
|
80098
|
+
text
|
|
80099
|
+
} = filter;
|
|
80100
|
+
const {
|
|
80101
|
+
value
|
|
80102
|
+
} = filter;
|
|
80103
|
+
const key = `${level}_${index}`;
|
|
80104
|
+
const dropdownItem = typeof renderFilterDropdownItem === 'function' ? renderFilterDropdownItem({
|
|
80105
|
+
onChange: changeFn,
|
|
80106
|
+
filterMultiple,
|
|
80107
|
+
value,
|
|
80108
|
+
text,
|
|
80109
|
+
checked,
|
|
80110
|
+
filteredValue,
|
|
80111
|
+
level
|
|
80112
|
+
}) : null;
|
|
80113
|
+
let item = dropdownItem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(dropdownItem) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(dropdownItem, {
|
|
80114
|
+
key
|
|
80115
|
+
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(dropdown_0.Item, {
|
|
80116
|
+
key: key,
|
|
80117
|
+
onClick: changeFn
|
|
80118
|
+
}, filterMultiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(checkbox_checkbox_0, {
|
|
80119
|
+
checked: checked
|
|
80120
|
+
}, text) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(radio_radio_0, {
|
|
80121
|
+
checked: checked
|
|
80122
|
+
}, text));
|
|
80123
|
+
if (Array.isArray(filter.children) && filter.children.length) {
|
|
80124
|
+
const childrenDropdownProps = Object.assign(Object.assign({}, props), {
|
|
80125
|
+
filters: filter.children,
|
|
80126
|
+
trigger: 'hover',
|
|
80127
|
+
position: 'right'
|
|
80128
|
+
});
|
|
80129
|
+
delete childrenDropdownProps.filterDropdownVisible;
|
|
80130
|
+
item = renderDropdown(childrenDropdownProps, item, level + 1);
|
|
80131
|
+
}
|
|
80132
|
+
return item;
|
|
80133
|
+
}));
|
|
79834
80134
|
const dropdownProps = Object.assign(Object.assign({}, props), {
|
|
79835
80135
|
onVisibleChange: visible => onFilterDropdownVisibleChange(visible),
|
|
79836
80136
|
trigger,
|
|
79837
80137
|
position,
|
|
79838
|
-
render
|
|
79839
|
-
const changeFn = e => {
|
|
79840
|
-
const domEvent = e && e.nativeEvent;
|
|
79841
|
-
if (domEvent) {
|
|
79842
|
-
// Block this event to prevent the pop-up layer from closing
|
|
79843
|
-
domEvent.stopImmediatePropagation();
|
|
79844
|
-
// Prevent bubbling and default events to prevent label click events from triggering twice
|
|
79845
|
-
domEvent.stopPropagation();
|
|
79846
|
-
domEvent.preventDefault();
|
|
79847
|
-
}
|
|
79848
|
-
let values = [...filteredValue];
|
|
79849
|
-
const included = values.includes(filter.value);
|
|
79850
|
-
const idx = values.indexOf(filter.value);
|
|
79851
|
-
if (idx > -1) {
|
|
79852
|
-
values.splice(idx, 1);
|
|
79853
|
-
} else if (filterMultiple) {
|
|
79854
|
-
values.push(filter.value);
|
|
79855
|
-
} else {
|
|
79856
|
-
values = [filter.value];
|
|
79857
|
-
}
|
|
79858
|
-
return onSelect({
|
|
79859
|
-
value: filter.value,
|
|
79860
|
-
filteredValue: values,
|
|
79861
|
-
included: !included,
|
|
79862
|
-
domEvent
|
|
79863
|
-
});
|
|
79864
|
-
};
|
|
79865
|
-
const checked = filteredValue.includes(filter.value);
|
|
79866
|
-
const {
|
|
79867
|
-
text
|
|
79868
|
-
} = filter;
|
|
79869
|
-
const {
|
|
79870
|
-
value
|
|
79871
|
-
} = filter;
|
|
79872
|
-
const key = `${level}_${index}`;
|
|
79873
|
-
const dropdownItem = typeof renderFilterDropdownItem === 'function' ? renderFilterDropdownItem({
|
|
79874
|
-
onChange: changeFn,
|
|
79875
|
-
filterMultiple,
|
|
79876
|
-
value,
|
|
79877
|
-
text,
|
|
79878
|
-
checked,
|
|
79879
|
-
filteredValue,
|
|
79880
|
-
level
|
|
79881
|
-
}) : null;
|
|
79882
|
-
let item = dropdownItem && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(dropdownItem) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(dropdownItem, {
|
|
79883
|
-
key
|
|
79884
|
-
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(dropdown_0.Item, {
|
|
79885
|
-
key: key,
|
|
79886
|
-
onClick: changeFn
|
|
79887
|
-
}, filterMultiple ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(checkbox_checkbox_0, {
|
|
79888
|
-
checked: checked
|
|
79889
|
-
}, text) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(radio_radio_0, {
|
|
79890
|
-
checked: checked
|
|
79891
|
-
}, text));
|
|
79892
|
-
if (Array.isArray(filter.children) && filter.children.length) {
|
|
79893
|
-
const childrenDropdownProps = Object.assign(Object.assign({}, props), {
|
|
79894
|
-
filters: filter.children,
|
|
79895
|
-
trigger: 'hover',
|
|
79896
|
-
position: 'right'
|
|
79897
|
-
});
|
|
79898
|
-
delete childrenDropdownProps.filterDropdownVisible;
|
|
79899
|
-
item = renderDropdown(childrenDropdownProps, item, level + 1);
|
|
79900
|
-
}
|
|
79901
|
-
return item;
|
|
79902
|
-
}))
|
|
80138
|
+
render
|
|
79903
80139
|
});
|
|
79904
80140
|
if (filterDropdownVisible != null) {
|
|
79905
80141
|
dropdownProps.visible = filterDropdownVisible;
|
|
@@ -79915,12 +80151,68 @@ function ColumnFilter() {
|
|
|
79915
80151
|
prefixCls = table_constants_cssClasses.PREFIX,
|
|
79916
80152
|
filteredValue,
|
|
79917
80153
|
filterIcon = 'filter',
|
|
80154
|
+
filterDropdownProps,
|
|
80155
|
+
onSelect,
|
|
80156
|
+
filterDropdownVisible,
|
|
79918
80157
|
renderFilterDropdown,
|
|
79919
|
-
|
|
80158
|
+
onFilterDropdownVisibleChange
|
|
79920
80159
|
} = props;
|
|
79921
80160
|
let {
|
|
79922
80161
|
filterDropdown = null
|
|
79923
80162
|
} = props;
|
|
80163
|
+
// custom filter related status
|
|
80164
|
+
const isFilterDropdownVisibleControlled = typeof filterDropdownVisible !== 'undefined';
|
|
80165
|
+
const isCustomFilterDropdown = typeof renderFilterDropdown === 'function';
|
|
80166
|
+
const isCustomDropdownVisible = !isFilterDropdownVisibleControlled && isCustomFilterDropdown;
|
|
80167
|
+
const [tempFilteredValue, setTempFilteredValue] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(filteredValue);
|
|
80168
|
+
const dropdownVisibleInitValue = isCustomDropdownVisible ? false : filterDropdownVisible;
|
|
80169
|
+
const [dropdownVisible, setDropdownVisible] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(dropdownVisibleInitValue);
|
|
80170
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
80171
|
+
if (typeof filterDropdownVisible !== 'undefined') {
|
|
80172
|
+
setDropdownVisible(filterDropdownVisible);
|
|
80173
|
+
}
|
|
80174
|
+
}, [filterDropdownVisible]);
|
|
80175
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
80176
|
+
setTempFilteredValue(filteredValue);
|
|
80177
|
+
}, [filteredValue]);
|
|
80178
|
+
const confirm = function () {
|
|
80179
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
80180
|
+
const newFilteredValue = (props === null || props === void 0 ? void 0 : props.filteredValue) || tempFilteredValue;
|
|
80181
|
+
if (!isEqual_default()(newFilteredValue, filteredValue)) {
|
|
80182
|
+
onSelect({
|
|
80183
|
+
filteredValue: newFilteredValue
|
|
80184
|
+
});
|
|
80185
|
+
}
|
|
80186
|
+
if (props.closeDropdown) {
|
|
80187
|
+
setDropdownVisible(false);
|
|
80188
|
+
}
|
|
80189
|
+
};
|
|
80190
|
+
const clear = function () {
|
|
80191
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
80192
|
+
setTempFilteredValue([]);
|
|
80193
|
+
onSelect({
|
|
80194
|
+
filteredValue: []
|
|
80195
|
+
});
|
|
80196
|
+
if (props.closeDropdown) {
|
|
80197
|
+
setDropdownVisible(false);
|
|
80198
|
+
}
|
|
80199
|
+
};
|
|
80200
|
+
const close = () => {
|
|
80201
|
+
setDropdownVisible(false);
|
|
80202
|
+
};
|
|
80203
|
+
const handleFilterDropdownVisibleChange = visible => {
|
|
80204
|
+
if (isCustomDropdownVisible) {
|
|
80205
|
+
setDropdownVisible(visible);
|
|
80206
|
+
}
|
|
80207
|
+
onFilterDropdownVisibleChange(visible);
|
|
80208
|
+
};
|
|
80209
|
+
const renderFilterDropdownProps = {
|
|
80210
|
+
tempFilteredValue,
|
|
80211
|
+
setTempFilteredValue,
|
|
80212
|
+
confirm,
|
|
80213
|
+
clear,
|
|
80214
|
+
close
|
|
80215
|
+
};
|
|
79924
80216
|
const finalCls = classnames_default()(`${prefixCls}-column-filter`, {
|
|
79925
80217
|
on: Array.isArray(filteredValue) && filteredValue.length
|
|
79926
80218
|
});
|
|
@@ -79940,10 +80232,11 @@ function ColumnFilter() {
|
|
|
79940
80232
|
size: "default"
|
|
79941
80233
|
}));
|
|
79942
80234
|
}
|
|
79943
|
-
const renderProps = Object.assign(Object.assign({}, props), filterDropdownProps)
|
|
79944
|
-
|
|
79945
|
-
|
|
79946
|
-
})
|
|
80235
|
+
const renderProps = Object.assign(Object.assign(Object.assign(Object.assign({}, props), filterDropdownProps), renderFilterDropdownProps), {
|
|
80236
|
+
filterDropdownVisible: isFilterDropdownVisibleControlled ? filterDropdownVisible : dropdownVisible,
|
|
80237
|
+
onFilterDropdownVisibleChange: handleFilterDropdownVisibleChange
|
|
80238
|
+
});
|
|
80239
|
+
filterDropdown = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(filterDropdown) ? filterDropdown : renderDropdown(renderProps, iconElem);
|
|
79947
80240
|
return filterDropdown;
|
|
79948
80241
|
}
|
|
79949
80242
|
;// CONCATENATED MODULE: ../semi-icons/lib/es/icons/IconCaretup.js
|
|
@@ -83180,6 +83473,7 @@ class Table extends BaseComponent {
|
|
|
83180
83473
|
this.renderSelection = function () {
|
|
83181
83474
|
let record = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
83182
83475
|
let inHeader = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
83476
|
+
let index = arguments.length > 2 ? arguments[2] : undefined;
|
|
83183
83477
|
const {
|
|
83184
83478
|
rowSelection,
|
|
83185
83479
|
allDisabledRowKeysSet
|
|
@@ -83189,43 +83483,67 @@ class Table extends BaseComponent {
|
|
|
83189
83483
|
selectedRowKeys = [],
|
|
83190
83484
|
selectedRowKeysSet = new Set(),
|
|
83191
83485
|
getCheckboxProps,
|
|
83192
|
-
disabled
|
|
83486
|
+
disabled,
|
|
83487
|
+
renderCell
|
|
83193
83488
|
} = rowSelection;
|
|
83489
|
+
const allRowKeys = _this2.cachedFilteredSortedRowKeys;
|
|
83490
|
+
const allRowKeysSet = _this2.cachedFilteredSortedRowKeysSet;
|
|
83491
|
+
const allIsSelected = _this2.foundation.allIsSelected(selectedRowKeysSet, allDisabledRowKeysSet, allRowKeys);
|
|
83492
|
+
const hasRowSelected = _this2.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
|
|
83493
|
+
const indeterminate = hasRowSelected && !allIsSelected;
|
|
83194
83494
|
if (inHeader) {
|
|
83195
83495
|
const columnKey = get_default()(rowSelection, 'key', table_constants_strings.DEFAULT_KEY_COLUMN_SELECTION);
|
|
83196
|
-
const
|
|
83197
|
-
const allRowKeysSet = _this2.cachedFilteredSortedRowKeysSet;
|
|
83198
|
-
const allIsSelected = _this2.foundation.allIsSelected(selectedRowKeysSet, allDisabledRowKeysSet, allRowKeys);
|
|
83199
|
-
const hasRowSelected = _this2.foundation.hasRowSelected(selectedRowKeys, allRowKeysSet);
|
|
83200
|
-
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TableSelectionCell, {
|
|
83496
|
+
const originNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TableSelectionCell, {
|
|
83201
83497
|
"aria-label": `${allIsSelected ? 'Deselect' : 'Select'} all rows`,
|
|
83202
83498
|
disabled: disabled,
|
|
83203
83499
|
key: columnKey,
|
|
83204
83500
|
selected: allIsSelected,
|
|
83205
|
-
indeterminate:
|
|
83501
|
+
indeterminate: indeterminate,
|
|
83206
83502
|
onChange: (selected, e) => {
|
|
83207
83503
|
_this2.toggleSelectAllRow(selected, e);
|
|
83208
83504
|
}
|
|
83209
83505
|
});
|
|
83506
|
+
const selectAll = (selected, e) => _this2.toggleSelectAllRow(selected, e);
|
|
83507
|
+
return isFunction_default()(renderCell) ? renderCell({
|
|
83508
|
+
selected: allIsSelected,
|
|
83509
|
+
record,
|
|
83510
|
+
originNode,
|
|
83511
|
+
inHeader,
|
|
83512
|
+
disabled,
|
|
83513
|
+
indeterminate,
|
|
83514
|
+
selectAll
|
|
83515
|
+
}) : originNode;
|
|
83210
83516
|
} else {
|
|
83211
83517
|
const key = _this2.foundation.getRecordKey(record);
|
|
83212
83518
|
const selected = selectedRowKeysSet.has(key);
|
|
83213
83519
|
const checkboxPropsFn = () => typeof getCheckboxProps === 'function' ? getCheckboxProps(record) : {};
|
|
83214
|
-
|
|
83520
|
+
const originNode = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TableSelectionCell, {
|
|
83215
83521
|
"aria-label": `${selected ? 'Deselect' : 'Select'} this row`,
|
|
83216
83522
|
getCheckboxProps: checkboxPropsFn,
|
|
83217
83523
|
selected: selected,
|
|
83218
83524
|
onChange: (status, e) => _this2.toggleSelectRow(status, key, e)
|
|
83219
83525
|
});
|
|
83526
|
+
const selectRow = (selected, e) => _this2.toggleSelectRow(selected, key, e);
|
|
83527
|
+
return isFunction_default()(renderCell) ? renderCell({
|
|
83528
|
+
selected,
|
|
83529
|
+
record,
|
|
83530
|
+
index,
|
|
83531
|
+
originNode,
|
|
83532
|
+
inHeader: false,
|
|
83533
|
+
disabled,
|
|
83534
|
+
indeterminate,
|
|
83535
|
+
selectRow
|
|
83536
|
+
}) : originNode;
|
|
83220
83537
|
}
|
|
83221
83538
|
}
|
|
83222
83539
|
return null;
|
|
83223
83540
|
};
|
|
83224
83541
|
this.renderRowSelectionCallback = function (text) {
|
|
83225
83542
|
let record = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
83226
|
-
|
|
83543
|
+
let index = arguments.length > 2 ? arguments[2] : undefined;
|
|
83544
|
+
return _this2.renderSelection(record, false, index);
|
|
83227
83545
|
};
|
|
83228
|
-
this.renderTitleSelectionCallback = () => this.renderSelection(
|
|
83546
|
+
this.renderTitleSelectionCallback = () => this.renderSelection(undefined, true);
|
|
83229
83547
|
this.normalizeSelectionColumn = function () {
|
|
83230
83548
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
83231
83549
|
const {
|
|
@@ -83320,7 +83638,7 @@ class Table extends BaseComponent {
|
|
|
83320
83638
|
const {
|
|
83321
83639
|
prefixCls
|
|
83322
83640
|
} = _this2.props;
|
|
83323
|
-
if (column && (column.sorter || column.filters || column.useFullRender)) {
|
|
83641
|
+
if (column && (column.sorter || column.filters || column.onFilter || column.useFullRender)) {
|
|
83324
83642
|
let hasSorterOrFilter = false;
|
|
83325
83643
|
const {
|
|
83326
83644
|
dataIndex,
|
|
@@ -83362,10 +83680,10 @@ class Table extends BaseComponent {
|
|
|
83362
83680
|
const stateFilteredValue = get_default()(curQuery, 'filteredValue');
|
|
83363
83681
|
const defaultFilteredValue = get_default()(curQuery, 'defaultFilteredValue');
|
|
83364
83682
|
const filteredValue = stateFilteredValue ? stateFilteredValue : defaultFilteredValue;
|
|
83365
|
-
if (Array.isArray(column.filters) && column.filters.length || /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(column.filterDropdown)) {
|
|
83683
|
+
if (Array.isArray(column.filters) && column.filters.length || /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(column.filterDropdown) || typeof column.renderFilterDropdown === 'function') {
|
|
83366
83684
|
const filter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ColumnFilter, Object.assign({
|
|
83367
83685
|
key: table_constants_strings.DEFAULT_KEY_COLUMN_FILTER
|
|
83368
|
-
}, curQuery, {
|
|
83686
|
+
}, omit_default()(curQuery, 'children'), {
|
|
83369
83687
|
filteredValue: filteredValue,
|
|
83370
83688
|
onFilterDropdownVisibleChange: visible => _this2.foundation.toggleShowFilter(dataIndex, visible),
|
|
83371
83689
|
onSelect: data => _this2.foundation.handleFilterSelect(dataIndex, data)
|
|
@@ -90083,6 +90401,7 @@ class TreeSelectFoundation extends foundation {
|
|
|
90083
90401
|
}
|
|
90084
90402
|
}
|
|
90085
90403
|
}
|
|
90404
|
+
this._adapter.notifyClear(e);
|
|
90086
90405
|
}
|
|
90087
90406
|
/**
|
|
90088
90407
|
* A11y: simulate clear button click
|
|
@@ -91649,6 +91968,9 @@ class TreeSelect extends BaseComponent {
|
|
|
91649
91968
|
onLoad
|
|
91650
91969
|
} = this.props;
|
|
91651
91970
|
isFunction_default()(onLoad) && onLoad(newLoadedKeys, data);
|
|
91971
|
+
},
|
|
91972
|
+
notifyClear: e => {
|
|
91973
|
+
this.props.onClear && this.props.onClear(e);
|
|
91652
91974
|
}
|
|
91653
91975
|
};
|
|
91654
91976
|
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, super.adapter), filterAdapter), treeSelectAdapter), treeAdapter), {
|
|
@@ -91820,6 +92142,7 @@ TreeSelect.propTypes = {
|
|
|
91820
92142
|
virtualize: (prop_types_default()).object,
|
|
91821
92143
|
treeNodeFilterProp: (prop_types_default()).string,
|
|
91822
92144
|
onChange: (prop_types_default()).func,
|
|
92145
|
+
onClear: (prop_types_default()).func,
|
|
91823
92146
|
onSearch: (prop_types_default()).func,
|
|
91824
92147
|
onSelect: (prop_types_default()).func,
|
|
91825
92148
|
onExpand: (prop_types_default()).func,
|