@douyinfe/semi-ui 2.4.1 → 2.6.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/calendar/monthCalendar.tsx +14 -13
- package/cascader/__test__/cascader.test.js +24 -0
- package/cascader/_story/cascader.stories.js +73 -0
- package/cascader/index.tsx +26 -5
- package/cascader/item.tsx +25 -5
- package/datePicker/_story/v2/FixInputRangeFocus.jsx +25 -0
- package/datePicker/_story/v2/index.js +2 -1
- package/datePicker/dateInput.tsx +8 -5
- package/datePicker/datePicker.tsx +9 -1
- package/datePicker/month.tsx +14 -7
- package/datePicker/monthsGrid.tsx +17 -5
- package/datePicker/navigation.tsx +8 -4
- package/datePicker/quickControl.tsx +1 -0
- package/datePicker/yearAndMonth.tsx +1 -1
- package/dist/css/semi.css +71 -35
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +696 -263
- 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/form/__test__/formApi.test.js +182 -0
- package/form/_story/FormApi/arrayDemo.jsx +4 -7
- package/form/_story/Layout/slotDemo.jsx +2 -2
- package/form/_story/demo.jsx +18 -1
- package/form/_story/form.stories.js +6 -6
- package/form/baseForm.tsx +2 -2
- package/form/hoc/withField.tsx +1 -1
- package/lib/cjs/_base/base.css +5 -5
- package/lib/cjs/autoComplete/index.d.ts +1 -1
- package/lib/cjs/calendar/monthCalendar.js +21 -5
- package/lib/cjs/cascader/index.d.ts +9 -2
- package/lib/cjs/cascader/index.js +20 -1
- package/lib/cjs/cascader/item.d.ts +6 -2
- package/lib/cjs/cascader/item.js +33 -4
- package/lib/cjs/datePicker/dateInput.d.ts +0 -2
- package/lib/cjs/datePicker/dateInput.js +17 -6
- package/lib/cjs/datePicker/datePicker.js +19 -12
- package/lib/cjs/datePicker/month.d.ts +1 -0
- package/lib/cjs/datePicker/month.js +18 -2
- package/lib/cjs/datePicker/monthsGrid.js +16 -4
- package/lib/cjs/datePicker/navigation.js +8 -0
- package/lib/cjs/datePicker/quickControl.js +1 -0
- package/lib/cjs/datePicker/yearAndMonth.js +1 -0
- package/lib/cjs/dropdown/index.d.ts +1 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/baseForm.js +2 -2
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/form/hoc/withField.js +1 -1
- package/lib/cjs/scrollList/scrollItem.d.ts +2 -1
- package/lib/cjs/scrollList/scrollItem.js +13 -3
- package/lib/cjs/select/index.d.ts +3 -3
- package/lib/cjs/select/index.js +32 -28
- package/lib/cjs/select/option.js +2 -2
- package/lib/cjs/select/virtualRow.js +2 -2
- package/lib/cjs/table/Table.d.ts +1 -1
- package/lib/cjs/table/Table.js +8 -2
- package/lib/cjs/table/interface.d.ts +1 -0
- package/lib/cjs/tabs/interface.d.ts +1 -1
- package/lib/cjs/tooltip/index.d.ts +1 -1
- package/lib/cjs/tooltip/index.js +6 -2
- package/lib/cjs/tree/index.d.ts +2 -0
- package/lib/cjs/tree/index.js +15 -8
- package/lib/cjs/treeSelect/index.d.ts +2 -0
- package/lib/cjs/treeSelect/index.js +64 -27
- package/lib/cjs/upload/fileCard.js +31 -22
- package/lib/cjs/upload/index.d.ts +6 -0
- package/lib/cjs/upload/index.js +15 -8
- package/lib/cjs/upload/interface.d.ts +8 -6
- package/lib/es/_base/base.css +5 -5
- package/lib/es/autoComplete/index.d.ts +1 -1
- package/lib/es/calendar/monthCalendar.js +22 -5
- package/lib/es/cascader/index.d.ts +9 -2
- package/lib/es/cascader/index.js +19 -1
- package/lib/es/cascader/item.d.ts +6 -2
- package/lib/es/cascader/item.js +31 -4
- package/lib/es/datePicker/dateInput.d.ts +0 -2
- package/lib/es/datePicker/dateInput.js +17 -6
- package/lib/es/datePicker/datePicker.js +19 -12
- package/lib/es/datePicker/month.d.ts +1 -0
- package/lib/es/datePicker/month.js +18 -2
- package/lib/es/datePicker/monthsGrid.js +16 -4
- package/lib/es/datePicker/navigation.js +8 -0
- package/lib/es/datePicker/quickControl.js +2 -0
- package/lib/es/datePicker/yearAndMonth.js +1 -0
- package/lib/es/dropdown/index.d.ts +1 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/baseForm.js +2 -2
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/form/hoc/withField.js +1 -1
- package/lib/es/scrollList/scrollItem.d.ts +2 -1
- package/lib/es/scrollList/scrollItem.js +13 -3
- package/lib/es/select/index.d.ts +3 -3
- package/lib/es/select/index.js +30 -26
- package/lib/es/select/option.js +2 -2
- package/lib/es/select/virtualRow.js +2 -2
- package/lib/es/table/Table.d.ts +1 -1
- package/lib/es/table/Table.js +10 -2
- package/lib/es/table/interface.d.ts +1 -0
- package/lib/es/tabs/interface.d.ts +1 -1
- package/lib/es/tooltip/index.d.ts +1 -1
- package/lib/es/tooltip/index.js +6 -2
- package/lib/es/tree/index.d.ts +2 -0
- package/lib/es/tree/index.js +15 -8
- package/lib/es/treeSelect/index.d.ts +2 -0
- package/lib/es/treeSelect/index.js +64 -27
- package/lib/es/upload/fileCard.js +31 -24
- package/lib/es/upload/index.d.ts +6 -0
- package/lib/es/upload/index.js +14 -8
- package/lib/es/upload/interface.d.ts +8 -6
- package/package.json +9 -9
- package/scrollList/_story/ScrollList/index.js +3 -0
- package/scrollList/_story/WheelList/index.js +3 -0
- package/scrollList/scrollItem.tsx +30 -9
- package/select/index.tsx +18 -19
- package/select/option.tsx +2 -2
- package/select/virtualRow.tsx +2 -2
- package/table/Table.tsx +7 -2
- package/table/_story/Perf/Virtualized/index.jsx +6 -0
- package/table/_story/table.stories.js +1 -2
- package/table/_story/v2/FixedHeaderMerge/index.jsx +98 -0
- package/table/_story/v2/FixedResizable/index.jsx +114 -0
- package/table/_story/v2/defaultFilteredValue.tsx +114 -0
- package/table/_story/v2/index.js +5 -0
- package/table/interface.ts +1 -0
- package/tabs/interface.ts +1 -1
- package/tooltip/__test__/tooltip.test.js +48 -4
- package/tooltip/_story/tooltip.stories.js +83 -1
- package/tooltip/index.tsx +4 -4
- package/tree/__test__/treeMultiple.test.js +94 -0
- package/tree/_story/tree.stories.js +169 -0
- package/tree/index.tsx +12 -5
- package/treeSelect/__test__/treeMultiple.test.js +94 -0
- package/treeSelect/_story/treeSelect.stories.js +242 -0
- package/treeSelect/index.tsx +72 -40
- package/upload/_story/upload.stories.js +22 -6
- package/upload/fileCard.tsx +23 -23
- package/upload/index.tsx +15 -6
- package/upload/interface.ts +7 -5
package/dist/umd/semi-ui.js
CHANGED
|
@@ -24257,6 +24257,19 @@ class foundation_Tooltip extends foundation {
|
|
|
24257
24257
|
translateX = -1;
|
|
24258
24258
|
break;
|
|
24259
24259
|
|
|
24260
|
+
case 'leftBottomOver':
|
|
24261
|
+
left = triggerRect.left;
|
|
24262
|
+
top = triggerRect.bottom;
|
|
24263
|
+
translateY = -1;
|
|
24264
|
+
break;
|
|
24265
|
+
|
|
24266
|
+
case 'rightBottomOver':
|
|
24267
|
+
left = triggerRect.right;
|
|
24268
|
+
top = triggerRect.bottom;
|
|
24269
|
+
translateX = -1;
|
|
24270
|
+
translateY = -1;
|
|
24271
|
+
break;
|
|
24272
|
+
|
|
24260
24273
|
default:
|
|
24261
24274
|
break;
|
|
24262
24275
|
}
|
|
@@ -24380,12 +24393,16 @@ class foundation_Tooltip extends foundation {
|
|
|
24380
24393
|
|
|
24381
24394
|
const shouldReverseTop = clientTop < wrapperRect.height + spacing && restClientBottom > wrapperRect.height + spacing;
|
|
24382
24395
|
const shouldReverseLeft = clientLeft < wrapperRect.width + spacing && restClientRight > wrapperRect.width + spacing;
|
|
24383
|
-
const
|
|
24396
|
+
const shouldReverseBottom = restClientBottom < wrapperRect.height + spacing && clientTop > wrapperRect.height + spacing;
|
|
24384
24397
|
const shouldReverseRight = restClientRight < wrapperRect.width + spacing && clientLeft > wrapperRect.width + spacing;
|
|
24398
|
+
const shouldReverseTopOver = restClientTop < wrapperRect.height + spacing && clientBottom > wrapperRect.height + spacing;
|
|
24399
|
+
const shouldReverseBottomOver = clientBottom < wrapperRect.height + spacing && restClientTop > wrapperRect.height + spacing;
|
|
24385
24400
|
const shouldReverseTopSide = restClientTop < wrapperRect.height && clientBottom > wrapperRect.height;
|
|
24386
24401
|
const shouldReverseBottomSide = clientBottom < wrapperRect.height && restClientTop > wrapperRect.height;
|
|
24387
24402
|
const shouldReverseLeftSide = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
|
|
24388
24403
|
const shouldReverseRightSide = clientRight < wrapperRect.width && restClientLeft > wrapperRect.width;
|
|
24404
|
+
const shouldReverseLeftOver = restClientLeft < wrapperRect.width && clientRight > wrapperRect.width;
|
|
24405
|
+
const shouldReverseRightOver = clientRight < wrapperRect.width && restClientLeft > wrapperRect.width;
|
|
24389
24406
|
|
|
24390
24407
|
switch (position) {
|
|
24391
24408
|
case 'top':
|
|
@@ -24447,14 +24464,14 @@ class foundation_Tooltip extends foundation {
|
|
|
24447
24464
|
break;
|
|
24448
24465
|
|
|
24449
24466
|
case 'bottom':
|
|
24450
|
-
if (
|
|
24467
|
+
if (shouldReverseBottom) {
|
|
24451
24468
|
position = this._reversePos(position, true);
|
|
24452
24469
|
}
|
|
24453
24470
|
|
|
24454
24471
|
break;
|
|
24455
24472
|
|
|
24456
24473
|
case 'bottomLeft':
|
|
24457
|
-
if (
|
|
24474
|
+
if (shouldReverseBottom) {
|
|
24458
24475
|
position = this._reversePos(position, true);
|
|
24459
24476
|
}
|
|
24460
24477
|
|
|
@@ -24465,7 +24482,7 @@ class foundation_Tooltip extends foundation {
|
|
|
24465
24482
|
break;
|
|
24466
24483
|
|
|
24467
24484
|
case 'bottomRight':
|
|
24468
|
-
if (
|
|
24485
|
+
if (shouldReverseBottom) {
|
|
24469
24486
|
position = this._reversePos(position, true);
|
|
24470
24487
|
}
|
|
24471
24488
|
|
|
@@ -24504,6 +24521,50 @@ class foundation_Tooltip extends foundation {
|
|
|
24504
24521
|
|
|
24505
24522
|
break;
|
|
24506
24523
|
|
|
24524
|
+
case 'leftTopOver':
|
|
24525
|
+
if (shouldReverseTopOver) {
|
|
24526
|
+
position = this._reversePos(position, true);
|
|
24527
|
+
}
|
|
24528
|
+
|
|
24529
|
+
if (shouldReverseLeftOver) {
|
|
24530
|
+
position = this._reversePos(position);
|
|
24531
|
+
}
|
|
24532
|
+
|
|
24533
|
+
break;
|
|
24534
|
+
|
|
24535
|
+
case 'leftBottomOver':
|
|
24536
|
+
if (shouldReverseBottomOver) {
|
|
24537
|
+
position = this._reversePos(position, true);
|
|
24538
|
+
}
|
|
24539
|
+
|
|
24540
|
+
if (shouldReverseLeftOver) {
|
|
24541
|
+
position = this._reversePos(position);
|
|
24542
|
+
}
|
|
24543
|
+
|
|
24544
|
+
break;
|
|
24545
|
+
|
|
24546
|
+
case 'rightTopOver':
|
|
24547
|
+
if (shouldReverseTopOver) {
|
|
24548
|
+
position = this._reversePos(position, true);
|
|
24549
|
+
}
|
|
24550
|
+
|
|
24551
|
+
if (shouldReverseRightOver) {
|
|
24552
|
+
position = this._reversePos(position);
|
|
24553
|
+
}
|
|
24554
|
+
|
|
24555
|
+
break;
|
|
24556
|
+
|
|
24557
|
+
case 'rightBottomOver':
|
|
24558
|
+
if (shouldReverseBottomOver) {
|
|
24559
|
+
position = this._reversePos(position, true);
|
|
24560
|
+
}
|
|
24561
|
+
|
|
24562
|
+
if (shouldReverseRightOver) {
|
|
24563
|
+
position = this._reversePos(position);
|
|
24564
|
+
}
|
|
24565
|
+
|
|
24566
|
+
break;
|
|
24567
|
+
|
|
24507
24568
|
default:
|
|
24508
24569
|
break;
|
|
24509
24570
|
}
|
|
@@ -24533,7 +24594,7 @@ const tooltip_constants_cssClasses = {
|
|
|
24533
24594
|
PREFIX: "".concat(BASE_CLASS_PREFIX, "-tooltip")
|
|
24534
24595
|
};
|
|
24535
24596
|
const tooltip_constants_strings = {
|
|
24536
|
-
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
|
|
24597
|
+
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver', 'leftBottomOver', 'rightBottomOver'],
|
|
24537
24598
|
TRIGGER_SET: ['hover', 'focus', 'click', 'custom'],
|
|
24538
24599
|
STATUS_DISABLED: 'disabled',
|
|
24539
24600
|
STATUS_LOADING: 'loading'
|
|
@@ -27093,11 +27154,15 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
|
|
|
27093
27154
|
}
|
|
27094
27155
|
};
|
|
27095
27156
|
|
|
27096
|
-
document.addEventListener('
|
|
27157
|
+
document.addEventListener('mousedown', this.clickOutsideHandler, {
|
|
27158
|
+
capture: true
|
|
27159
|
+
});
|
|
27097
27160
|
},
|
|
27098
27161
|
unregisterClickOutsideHandler: () => {
|
|
27099
27162
|
if (this.clickOutsideHandler) {
|
|
27100
|
-
document.removeEventListener('
|
|
27163
|
+
document.removeEventListener('mousedown', this.clickOutsideHandler, {
|
|
27164
|
+
capture: true
|
|
27165
|
+
});
|
|
27101
27166
|
this.clickOutsideHandler = null;
|
|
27102
27167
|
}
|
|
27103
27168
|
},
|
|
@@ -33915,9 +33980,9 @@ class option_Option extends external_root_React_commonjs2_react_commonjs_react_a
|
|
|
33915
33980
|
const {
|
|
33916
33981
|
props
|
|
33917
33982
|
} = this;
|
|
33918
|
-
const
|
|
33983
|
+
const isDisabled = props.disabled;
|
|
33919
33984
|
|
|
33920
|
-
if (!
|
|
33985
|
+
if (!isDisabled) {
|
|
33921
33986
|
props.onSelect(assign_default()(assign_default()({}, rest), {
|
|
33922
33987
|
value,
|
|
33923
33988
|
label: label || children
|
|
@@ -41452,6 +41517,8 @@ weekCalendar_WeekCalendar.contextType = locale_context;
|
|
|
41452
41517
|
|
|
41453
41518
|
|
|
41454
41519
|
|
|
41520
|
+
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
|
|
41521
|
+
|
|
41455
41522
|
|
|
41456
41523
|
|
|
41457
41524
|
|
|
@@ -41507,11 +41574,13 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41507
41574
|
} = this.props;
|
|
41508
41575
|
this.monthlyData = this.foundation.getMonthlyData(displayValue, dateFnsLocale);
|
|
41509
41576
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41510
|
-
className: "".concat(monthCalendar_prefixCls, "-header")
|
|
41577
|
+
className: "".concat(monthCalendar_prefixCls, "-header"),
|
|
41578
|
+
role: "presentation"
|
|
41511
41579
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41512
|
-
role: "
|
|
41580
|
+
role: "presentation",
|
|
41513
41581
|
className: "".concat(monthCalendar_prefixCls, "-grid")
|
|
41514
41582
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41583
|
+
role: "row",
|
|
41515
41584
|
className: "".concat(monthCalendar_prefixCls, "-grid-row")
|
|
41516
41585
|
}, map_default()(_context = this.monthlyData[0]).call(_context, day => {
|
|
41517
41586
|
const {
|
|
@@ -41521,6 +41590,8 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41521
41590
|
["".concat(calendar_constants_cssClasses.PREFIX, "-weekend")]: markWeekend && day.isWeekend
|
|
41522
41591
|
});
|
|
41523
41592
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
41593
|
+
role: "columnheader",
|
|
41594
|
+
"aria-label": weekday,
|
|
41524
41595
|
key: "".concat(weekday, "-monthheader"),
|
|
41525
41596
|
className: listCls
|
|
41526
41597
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, weekday));
|
|
@@ -41603,7 +41674,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41603
41674
|
const pos = showCard && showCard[key] ? showCard[key][1] : 'leftTopOver';
|
|
41604
41675
|
const text = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
41605
41676
|
componentName: "Calendar"
|
|
41606
|
-
}, locale =>
|
|
41677
|
+
}, locale =>
|
|
41678
|
+
/*#__PURE__*/
|
|
41679
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
41680
|
+
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41607
41681
|
className: "".concat(cardCls, "-wrapper"),
|
|
41608
41682
|
style: {
|
|
41609
41683
|
bottom: 0
|
|
@@ -41671,11 +41745,12 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41671
41745
|
day
|
|
41672
41746
|
} = events;
|
|
41673
41747
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41674
|
-
role: "
|
|
41748
|
+
role: "presentation",
|
|
41675
41749
|
className: "".concat(monthCalendar_prefixCls, "-weekrow"),
|
|
41676
41750
|
ref: _this.cellDom,
|
|
41677
41751
|
key: "".concat(index, "-weekrow")
|
|
41678
41752
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41753
|
+
role: "row",
|
|
41679
41754
|
className: "".concat(monthCalendar_prefixCls, "-skeleton")
|
|
41680
41755
|
}, map_default()(weekDay).call(weekDay, each => {
|
|
41681
41756
|
const {
|
|
@@ -41694,6 +41769,9 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41694
41769
|
});
|
|
41695
41770
|
const shouldRenderCollapsed = Boolean(day && day[ind] && day[ind].length > itemLimit);
|
|
41696
41771
|
const inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
41772
|
+
role: "gridcell",
|
|
41773
|
+
"aria-label": date.toLocaleDateString(),
|
|
41774
|
+
"aria-current": isToday ? "date" : false,
|
|
41697
41775
|
key: "".concat(date, "-weeksk"),
|
|
41698
41776
|
className: listCls,
|
|
41699
41777
|
onClick: e => _this.handleClick(e, [date])
|
|
@@ -41716,9 +41794,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41716
41794
|
parsedEvents
|
|
41717
41795
|
} = this.state;
|
|
41718
41796
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41719
|
-
role: "
|
|
41797
|
+
role: "presentation",
|
|
41720
41798
|
className: "".concat(monthCalendar_prefixCls, "-week")
|
|
41721
41799
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41800
|
+
role: "presentation",
|
|
41722
41801
|
className: "".concat(monthCalendar_prefixCls, "-grid-col")
|
|
41723
41802
|
}, map_default()(_context3 = keys_default()(this.monthlyData)).call(_context3, weekInd => this.renderWeekRow(weekInd, this.monthlyData[weekInd], parsedEvents[weekInd]))));
|
|
41724
41803
|
};
|
|
@@ -41849,12 +41928,15 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41849
41928
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
41850
41929
|
componentName: "Calendar"
|
|
41851
41930
|
}, (locale, localeCode, dateFnsLocale) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41931
|
+
role: "grid",
|
|
41852
41932
|
className: monthCls,
|
|
41853
41933
|
key: this.state.itemLimit,
|
|
41854
41934
|
style: monthStyle
|
|
41855
41935
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41936
|
+
role: "presentation",
|
|
41856
41937
|
className: "".concat(monthCalendar_prefixCls, "-sticky-top")
|
|
41857
41938
|
}, header, this.renderHeader(dateFnsLocale)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41939
|
+
role: "presentation",
|
|
41858
41940
|
className: "".concat(monthCalendar_prefixCls, "-grid-wrapper")
|
|
41859
41941
|
}, this.renderMonthGrid())));
|
|
41860
41942
|
}
|
|
@@ -42911,6 +42993,10 @@ cardGroup_CardGroup.defaultProps = {
|
|
|
42911
42993
|
var lodash_flatten = __webpack_require__("1xil");
|
|
42912
42994
|
var flatten_default = /*#__PURE__*/__webpack_require__.n(lodash_flatten);
|
|
42913
42995
|
|
|
42996
|
+
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/isSet.js
|
|
42997
|
+
var isSet = __webpack_require__("/iLo");
|
|
42998
|
+
var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
|
|
42999
|
+
|
|
42914
43000
|
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/@babel/runtime-corejs3/core-js-stable/promise.js
|
|
42915
43001
|
var promise = __webpack_require__("kNzS");
|
|
42916
43002
|
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);
|
|
@@ -43843,6 +43929,7 @@ function calcMergeType(autoMergeValue, leafOnly) {
|
|
|
43843
43929
|
|
|
43844
43930
|
|
|
43845
43931
|
|
|
43932
|
+
|
|
43846
43933
|
|
|
43847
43934
|
|
|
43848
43935
|
// eslint-disable-next-line max-len
|
|
@@ -44352,6 +44439,16 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44352
44439
|
this.close(e);
|
|
44353
44440
|
}
|
|
44354
44441
|
}
|
|
44442
|
+
/**
|
|
44443
|
+
* A11y: simulate selection click
|
|
44444
|
+
*/
|
|
44445
|
+
|
|
44446
|
+
|
|
44447
|
+
handleSelectionEnterPress(keyboardEvent) {
|
|
44448
|
+
if (utils_isEnterPress(keyboardEvent)) {
|
|
44449
|
+
this.handleClick(keyboardEvent);
|
|
44450
|
+
}
|
|
44451
|
+
}
|
|
44355
44452
|
|
|
44356
44453
|
toggleHoverState(bool) {
|
|
44357
44454
|
this._adapter.toggleHovering(bool);
|
|
@@ -44783,6 +44880,16 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44783
44880
|
|
|
44784
44881
|
this._adapter.rePositionDropdown();
|
|
44785
44882
|
}
|
|
44883
|
+
/**
|
|
44884
|
+
* A11y: simulate clear button click
|
|
44885
|
+
*/
|
|
44886
|
+
|
|
44887
|
+
|
|
44888
|
+
handleClearEnterPress(keyboardEvent) {
|
|
44889
|
+
if (utils_isEnterPress(keyboardEvent)) {
|
|
44890
|
+
this.handleClear();
|
|
44891
|
+
}
|
|
44892
|
+
}
|
|
44786
44893
|
|
|
44787
44894
|
getRenderData() {
|
|
44788
44895
|
var _context9, _context10;
|
|
@@ -45617,6 +45724,8 @@ checkbox_CheckboxWithGroup.Group = checkboxGroup;
|
|
|
45617
45724
|
|
|
45618
45725
|
|
|
45619
45726
|
|
|
45727
|
+
|
|
45728
|
+
|
|
45620
45729
|
const item_prefixcls = cascader_constants_cssClasses.PREFIX_OPTION;
|
|
45621
45730
|
class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
45622
45731
|
constructor() {
|
|
@@ -45633,6 +45742,16 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45633
45742
|
|
|
45634
45743
|
onItemClick(e, item);
|
|
45635
45744
|
};
|
|
45745
|
+
/**
|
|
45746
|
+
* A11y: simulate item click
|
|
45747
|
+
*/
|
|
45748
|
+
|
|
45749
|
+
|
|
45750
|
+
this.handleItemEnterPress = (keyboardEvent, item) => {
|
|
45751
|
+
if (utils_isEnterPress(keyboardEvent)) {
|
|
45752
|
+
this.onClick(keyboardEvent, item);
|
|
45753
|
+
}
|
|
45754
|
+
};
|
|
45636
45755
|
|
|
45637
45756
|
this.onHover = (e, item) => {
|
|
45638
45757
|
const {
|
|
@@ -45712,6 +45831,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45712
45831
|
|
|
45713
45832
|
case 'empty':
|
|
45714
45833
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45834
|
+
"aria-hidden": true,
|
|
45715
45835
|
className: concat_default()(_context3 = "".concat(item_prefixcls, "-icon ")).call(_context3, item_prefixcls, "-icon-empty")
|
|
45716
45836
|
});
|
|
45717
45837
|
|
|
@@ -45775,11 +45895,13 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45775
45895
|
["".concat(item_prefixcls, "-disabled")]: disabled
|
|
45776
45896
|
});
|
|
45777
45897
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
45898
|
+
role: 'menuitem',
|
|
45778
45899
|
className: className,
|
|
45779
45900
|
key: key,
|
|
45780
45901
|
onClick: e => {
|
|
45781
45902
|
this.onClick(e, item);
|
|
45782
|
-
}
|
|
45903
|
+
},
|
|
45904
|
+
onKeyPress: e => this.handleItemEnterPress(e, item)
|
|
45783
45905
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45784
45906
|
className: "".concat(item_prefixcls, "-label")
|
|
45785
45907
|
}, !multiple && this.renderIcon('empty'), multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_0, {
|
|
@@ -45804,13 +45926,15 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45804
45926
|
let showChildItem;
|
|
45805
45927
|
const ind = content.length;
|
|
45806
45928
|
content.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
45929
|
+
role: 'menu',
|
|
45807
45930
|
className: "".concat(item_prefixcls, "-list"),
|
|
45808
45931
|
key: renderData[0].key,
|
|
45809
45932
|
onScroll: e => this.props.onListScroll(e, ind)
|
|
45810
45933
|
}, map_default()(renderData).call(renderData, item => {
|
|
45811
45934
|
const {
|
|
45812
45935
|
data,
|
|
45813
|
-
key
|
|
45936
|
+
key,
|
|
45937
|
+
parentKey
|
|
45814
45938
|
} = item;
|
|
45815
45939
|
const {
|
|
45816
45940
|
children,
|
|
@@ -45835,16 +45959,26 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45835
45959
|
["".concat(item_prefixcls, "-select")]: selected && !multiple,
|
|
45836
45960
|
["".concat(item_prefixcls, "-disabled")]: disabled
|
|
45837
45961
|
});
|
|
45838
|
-
|
|
45962
|
+
const otherAriaProps = parentKey ? {
|
|
45963
|
+
['aria-owns']: "cascaderItem-".concat(parentKey)
|
|
45964
|
+
} : {};
|
|
45965
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", assign_default()({
|
|
45966
|
+
role: 'menuitem',
|
|
45967
|
+
id: "cascaderItem-".concat(key),
|
|
45968
|
+
"aria-expanded": active,
|
|
45969
|
+
"aria-haspopup": Boolean(showExpand),
|
|
45970
|
+
"aria-disabled": disabled
|
|
45971
|
+
}, otherAriaProps, {
|
|
45839
45972
|
className: className,
|
|
45840
45973
|
key: key,
|
|
45841
45974
|
onClick: e => {
|
|
45842
45975
|
this.onClick(e, item);
|
|
45843
45976
|
},
|
|
45977
|
+
onKeyPress: e => this.handleItemEnterPress(e, item),
|
|
45844
45978
|
onMouseEnter: e => {
|
|
45845
45979
|
this.onHover(e, item);
|
|
45846
45980
|
}
|
|
45847
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45981
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45848
45982
|
className: "".concat(item_prefixcls, "-label")
|
|
45849
45983
|
}, selected && !multiple && this.renderIcon('tick'), !selected && !multiple && this.renderIcon('empty'), multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_0, {
|
|
45850
45984
|
onChange: e => this.onCheckboxChange(e, item),
|
|
@@ -46868,6 +47002,7 @@ tagInput_TagInput.defaultProps = {
|
|
|
46868
47002
|
|
|
46869
47003
|
|
|
46870
47004
|
|
|
47005
|
+
|
|
46871
47006
|
|
|
46872
47007
|
|
|
46873
47008
|
const cascader_prefixcls = cascader_constants_cssClasses.PREFIX;
|
|
@@ -47167,6 +47302,15 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47167
47302
|
e && e.stopPropagation();
|
|
47168
47303
|
this.foundation.handleClear();
|
|
47169
47304
|
};
|
|
47305
|
+
/**
|
|
47306
|
+
* A11y: simulate clear button click
|
|
47307
|
+
*/
|
|
47308
|
+
|
|
47309
|
+
|
|
47310
|
+
this.handleClearEnterPress = e => {
|
|
47311
|
+
e && e.stopPropagation();
|
|
47312
|
+
this.foundation.handleClearEnterPress();
|
|
47313
|
+
};
|
|
47170
47314
|
|
|
47171
47315
|
this.showClearBtn = () => {
|
|
47172
47316
|
const {
|
|
@@ -47193,6 +47337,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47193
47337
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
47194
47338
|
className: clearCls,
|
|
47195
47339
|
onClick: this.handleClear,
|
|
47340
|
+
onKeyPress: this.handleClearEnterPress,
|
|
47196
47341
|
role: 'button',
|
|
47197
47342
|
tabIndex: 0
|
|
47198
47343
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, null));
|
|
@@ -47282,6 +47427,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47282
47427
|
style: style,
|
|
47283
47428
|
ref: this.triggerRef,
|
|
47284
47429
|
onClick: e => this.foundation.handleClick(e),
|
|
47430
|
+
onKeyPress: e => this.foundation.handleSelectionEnterPress(e),
|
|
47285
47431
|
"aria-invalid": this.props['aria-invalid'],
|
|
47286
47432
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
47287
47433
|
"aria-label": this.props['aria-label'],
|
|
@@ -47560,6 +47706,10 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47560
47706
|
realKeys = formatKeys;
|
|
47561
47707
|
}
|
|
47562
47708
|
|
|
47709
|
+
if (isSet_default()(realKeys)) {
|
|
47710
|
+
realKeys = [...realKeys];
|
|
47711
|
+
}
|
|
47712
|
+
|
|
47563
47713
|
const calRes = calcCheckedKeys(flatten_default()(realKeys), keyEntities);
|
|
47564
47714
|
const checkedKeys = new set_default.a(calRes.checkedKeys);
|
|
47565
47715
|
const halfCheckedKeys = new set_default.a(calRes.halfCheckedKeys); // disableStrictly
|
|
@@ -47720,6 +47870,7 @@ cascader_Cascader.propTypes = {
|
|
|
47720
47870
|
'aria-errormessage': prop_types_default.a.string,
|
|
47721
47871
|
'aria-describedby': prop_types_default.a.string,
|
|
47722
47872
|
'aria-required': prop_types_default.a.bool,
|
|
47873
|
+
'aria-label': prop_types_default.a.string,
|
|
47723
47874
|
arrowIcon: prop_types_default.a.node,
|
|
47724
47875
|
changeOnSelect: prop_types_default.a.bool,
|
|
47725
47876
|
defaultValue: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
|
|
@@ -47814,7 +47965,8 @@ cascader_Cascader.defaultProps = {
|
|
|
47814
47965
|
onClear: noop_default.a,
|
|
47815
47966
|
onDropdownVisibleChange: noop_default.a,
|
|
47816
47967
|
onListScroll: noop_default.a,
|
|
47817
|
-
enableLeafClick: false
|
|
47968
|
+
enableLeafClick: false,
|
|
47969
|
+
'aria-label': 'Cascader'
|
|
47818
47970
|
};
|
|
47819
47971
|
/* harmony default export */ var cascader_0 = (cascader_Cascader);
|
|
47820
47972
|
// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
@@ -52710,6 +52862,24 @@ function getDefaultFormatTokenByType(type) {
|
|
|
52710
52862
|
class foundation_DatePickerFoundation extends foundation {
|
|
52711
52863
|
constructor(adapter) {
|
|
52712
52864
|
super(assign_default()({}, adapter));
|
|
52865
|
+
/**
|
|
52866
|
+
* clear range input focus when open is controlled
|
|
52867
|
+
* fixed github 1375
|
|
52868
|
+
*/
|
|
52869
|
+
|
|
52870
|
+
this.clearRangeInputFocus = () => {
|
|
52871
|
+
const {
|
|
52872
|
+
type
|
|
52873
|
+
} = this._adapter.getProps();
|
|
52874
|
+
|
|
52875
|
+
const {
|
|
52876
|
+
rangeInputFocus
|
|
52877
|
+
} = this._adapter.getStates();
|
|
52878
|
+
|
|
52879
|
+
if (type === 'dateTimeRange' && rangeInputFocus) {
|
|
52880
|
+
this._adapter.setRangeInputFocus(false);
|
|
52881
|
+
}
|
|
52882
|
+
};
|
|
52713
52883
|
|
|
52714
52884
|
this.getMergedMotion = motion => {
|
|
52715
52885
|
const mergedMotion = typeof motion === 'undefined' || motion ? assign_default()(assign_default()({}, motion), {
|
|
@@ -54016,6 +54186,8 @@ var dateInput_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
54016
54186
|
}
|
|
54017
54187
|
return t;
|
|
54018
54188
|
};
|
|
54189
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/interactive-supports-focus */
|
|
54190
|
+
|
|
54019
54191
|
/* eslint-disable max-lines-per-function */
|
|
54020
54192
|
|
|
54021
54193
|
/* eslint-disable no-unused-vars */
|
|
@@ -54171,9 +54343,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54171
54343
|
} = this.props;
|
|
54172
54344
|
const allowClear = (rangeStart || rangeEnd) && showClear;
|
|
54173
54345
|
return allowClear && !disabled ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
54346
|
+
role: "button",
|
|
54347
|
+
tabIndex: 0,
|
|
54348
|
+
"aria-label": "Clear range input value",
|
|
54174
54349
|
className: "".concat(prefixCls, "-range-input-clearbtn"),
|
|
54175
54350
|
onMouseDown: e => !disabled && this.handleRangeInputClear(e)
|
|
54176
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear,
|
|
54351
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, {
|
|
54352
|
+
"aria-hidden": true
|
|
54353
|
+
})) : null;
|
|
54177
54354
|
}
|
|
54178
54355
|
|
|
54179
54356
|
renderRangeSuffix(suffix) {
|
|
@@ -54274,6 +54451,8 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54274
54451
|
validateStatus,
|
|
54275
54452
|
block,
|
|
54276
54453
|
prefixCls,
|
|
54454
|
+
multiple,
|
|
54455
|
+
// Whether to allow multiple values for email and file types
|
|
54277
54456
|
dateFnsLocale,
|
|
54278
54457
|
// No need to pass to input
|
|
54279
54458
|
onBlur,
|
|
@@ -54291,10 +54470,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54291
54470
|
rangeInputFocus,
|
|
54292
54471
|
rangeSeparator
|
|
54293
54472
|
} = _a,
|
|
54294
|
-
rest = dateInput_rest(_a, ["placeholder", "type", "value", "inputValue", "inputStyle", "disabled", "showClear", "inputReadOnly", "insetLabel", "validateStatus", "block", "prefixCls", "dateFnsLocale", "onBlur", "onClear", "onFocus", "prefix", "autofocus", "size", "rangeInputStartRef", "rangeInputEndRef", "onRangeClear", "onRangeBlur", "onRangeEndTabPress", "rangeInputFocus", "rangeSeparator"]);
|
|
54473
|
+
rest = dateInput_rest(_a, ["placeholder", "type", "value", "inputValue", "inputStyle", "disabled", "showClear", "inputReadOnly", "insetLabel", "validateStatus", "block", "prefixCls", "multiple", "dateFnsLocale", "onBlur", "onClear", "onFocus", "prefix", "autofocus", "size", "rangeInputStartRef", "rangeInputEndRef", "onRangeClear", "onRangeBlur", "onRangeEndTabPress", "rangeInputFocus", "rangeSeparator"]);
|
|
54295
54474
|
|
|
54296
|
-
const dateIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar,
|
|
54297
|
-
|
|
54475
|
+
const dateIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, {
|
|
54476
|
+
"aria-hidden": true
|
|
54477
|
+
});
|
|
54478
|
+
const dateTimeIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendarClock, {
|
|
54479
|
+
"aria-hidden": true
|
|
54480
|
+
});
|
|
54298
54481
|
const suffix = includes_default()(type).call(type, 'Time') ? dateTimeIcon : dateIcon;
|
|
54299
54482
|
let text = '';
|
|
54300
54483
|
|
|
@@ -54349,7 +54532,6 @@ dateInput_DateInput.propTypes = {
|
|
|
54349
54532
|
value: prop_types_default.a.array,
|
|
54350
54533
|
disabled: prop_types_default.a.bool,
|
|
54351
54534
|
type: prop_types_default.a.oneOf(datePicker_constants_strings.TYPE_SET),
|
|
54352
|
-
multiple: prop_types_default.a.bool,
|
|
54353
54535
|
showClear: prop_types_default.a.bool,
|
|
54354
54536
|
format: prop_types_default.a.string,
|
|
54355
54537
|
inputStyle: prop_types_default.a.object,
|
|
@@ -54373,7 +54555,6 @@ dateInput_DateInput.defaultProps = {
|
|
|
54373
54555
|
onBlur: function_noop,
|
|
54374
54556
|
onClear: function_noop,
|
|
54375
54557
|
onFocus: function_noop,
|
|
54376
|
-
multiple: false,
|
|
54377
54558
|
type: 'date',
|
|
54378
54559
|
inputStyle: {},
|
|
54379
54560
|
inputReadOnly: false,
|
|
@@ -54450,10 +54631,6 @@ function addMonths(dirtyDate, dirtyAmount) {
|
|
|
54450
54631
|
return date;
|
|
54451
54632
|
}
|
|
54452
54633
|
}
|
|
54453
|
-
// EXTERNAL MODULE: /home/runner/work/semi-design/semi-design/node_modules/lodash/isSet.js
|
|
54454
|
-
var isSet = __webpack_require__("/iLo");
|
|
54455
|
-
var isSet_default = /*#__PURE__*/__webpack_require__.n(isSet);
|
|
54456
|
-
|
|
54457
54634
|
// CONCATENATED MODULE: /home/runner/work/semi-design/semi-design/node_modules/date-fns/esm/differenceInCalendarMonths/index.js
|
|
54458
54635
|
|
|
54459
54636
|
|
|
@@ -56032,7 +56209,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56032
56209
|
ref: ref
|
|
56033
56210
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56034
56211
|
key: "double-chevron-left",
|
|
56212
|
+
"aria-label": "Previous year",
|
|
56035
56213
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
|
|
56214
|
+
"aria-hidden": true,
|
|
56036
56215
|
size: iconBtnSize
|
|
56037
56216
|
}),
|
|
56038
56217
|
size: buttonSize,
|
|
@@ -56042,7 +56221,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56042
56221
|
style: leftButtonStyle
|
|
56043
56222
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56044
56223
|
key: "chevron-left",
|
|
56224
|
+
"aria-label": "Previous month",
|
|
56045
56225
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
56226
|
+
"aria-hidden": true,
|
|
56046
56227
|
size: iconBtnSize
|
|
56047
56228
|
}),
|
|
56048
56229
|
size: buttonSize,
|
|
@@ -56058,7 +56239,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56058
56239
|
size: buttonSize
|
|
56059
56240
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56060
56241
|
key: "chevron-right",
|
|
56242
|
+
"aria-label": "Next month",
|
|
56061
56243
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
|
|
56244
|
+
"aria-hidden": true,
|
|
56062
56245
|
size: iconBtnSize
|
|
56063
56246
|
}),
|
|
56064
56247
|
size: buttonSize,
|
|
@@ -56068,7 +56251,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56068
56251
|
style: rightButtonStyle
|
|
56069
56252
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56070
56253
|
key: "double-chevron-right",
|
|
56254
|
+
"aria-label": "Next year",
|
|
56071
56255
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
|
|
56256
|
+
"aria-hidden": true,
|
|
56072
56257
|
size: iconBtnSize
|
|
56073
56258
|
}),
|
|
56074
56259
|
size: buttonSize,
|
|
@@ -56338,6 +56523,8 @@ function isBetween(day, _ref) {
|
|
|
56338
56523
|
|
|
56339
56524
|
|
|
56340
56525
|
|
|
56526
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
|
|
56527
|
+
|
|
56341
56528
|
/* eslint-disable max-len */
|
|
56342
56529
|
|
|
56343
56530
|
|
|
@@ -56660,8 +56847,10 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56660
56847
|
const weekdaysText = map_default()(weekdays).call(weekdays, key => locale.weeks[key]);
|
|
56661
56848
|
|
|
56662
56849
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56850
|
+
role: "row",
|
|
56663
56851
|
className: weekdayCls
|
|
56664
56852
|
}, map_default()(weekdaysText).call(weekdaysText, (E, i) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56853
|
+
role: "columnheader",
|
|
56665
56854
|
key: E + i,
|
|
56666
56855
|
className: weekdayItemCls
|
|
56667
56856
|
}, E)));
|
|
@@ -56696,6 +56885,7 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56696
56885
|
renderWeek(week, weekIndex) {
|
|
56697
56886
|
const weekCls = datePicker_constants_cssClasses.WEEK;
|
|
56698
56887
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56888
|
+
role: "row",
|
|
56699
56889
|
className: weekCls,
|
|
56700
56890
|
key: weekIndex
|
|
56701
56891
|
}, map_default()(week).call(week, (day, dayIndex) => this.renderDay(day, dayIndex)));
|
|
@@ -56716,6 +56906,8 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56716
56906
|
|
|
56717
56907
|
if (!fullDate) {
|
|
56718
56908
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56909
|
+
role: "gridcell",
|
|
56910
|
+
tabIndex: -1,
|
|
56719
56911
|
key: dayNumber + dayIndex,
|
|
56720
56912
|
className: datePicker_constants_cssClasses.DAY
|
|
56721
56913
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null));
|
|
@@ -56753,6 +56945,11 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56753
56945
|
const customRender = isFunction_default()(renderFullDate);
|
|
56754
56946
|
|
|
56755
56947
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56948
|
+
role: "gridcell",
|
|
56949
|
+
tabIndex: dayStatus.isDisabled ? -1 : 0,
|
|
56950
|
+
"aria-disabled": dayStatus.isDisabled,
|
|
56951
|
+
"aria-selected": dayStatus.isSelected,
|
|
56952
|
+
"aria-label": fullDate,
|
|
56756
56953
|
className: !customRender ? dayCls : datePicker_constants_cssClasses.DAY,
|
|
56757
56954
|
title: fullDate,
|
|
56758
56955
|
key: dayNumber + dayIndex,
|
|
@@ -56766,13 +56963,16 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56766
56963
|
|
|
56767
56964
|
render() {
|
|
56768
56965
|
const {
|
|
56769
|
-
forwardRef
|
|
56966
|
+
forwardRef,
|
|
56967
|
+
multiple
|
|
56770
56968
|
} = this.props;
|
|
56771
56969
|
const weekday = this.renderDayOfWeek();
|
|
56772
56970
|
const weeks = this.renderWeeks();
|
|
56773
56971
|
const monthCls = classnames_default()(datePicker_constants_cssClasses.MONTH);
|
|
56774
56972
|
const ref = forwardRef || this.monthRef;
|
|
56775
56973
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56974
|
+
role: "grid",
|
|
56975
|
+
"aria-multiselectable": multiple,
|
|
56776
56976
|
ref: ref,
|
|
56777
56977
|
className: monthCls
|
|
56778
56978
|
}, weekday, weeks);
|
|
@@ -56798,7 +56998,8 @@ month_Month.propTypes = {
|
|
|
56798
56998
|
startDateOffset: prop_types_default.a.func,
|
|
56799
56999
|
endDateOffset: prop_types_default.a.func,
|
|
56800
57000
|
rangeInputFocus: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]),
|
|
56801
|
-
focusRecordsRef: prop_types_default.a.object
|
|
57001
|
+
focusRecordsRef: prop_types_default.a.object,
|
|
57002
|
+
multiple: prop_types_default.a.bool
|
|
56802
57003
|
};
|
|
56803
57004
|
month_Month.defaultProps = {
|
|
56804
57005
|
month: new Date(),
|
|
@@ -57485,13 +57686,14 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57485
57686
|
transform: itemTrans
|
|
57486
57687
|
} = item;
|
|
57487
57688
|
const transform = typeof itemTrans === 'function' ? itemTrans : commonTrans;
|
|
57689
|
+
const selected = selectedIndex === index;
|
|
57488
57690
|
const cls = classnames_default()({
|
|
57489
|
-
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]:
|
|
57691
|
+
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]: selected && mode !== wheelMode,
|
|
57490
57692
|
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-disabled")]: Boolean(item.disabled)
|
|
57491
57693
|
});
|
|
57492
57694
|
let text = '';
|
|
57493
57695
|
|
|
57494
|
-
if (
|
|
57696
|
+
if (selected) {
|
|
57495
57697
|
if (typeof transform === 'function') {
|
|
57496
57698
|
text = transform(item.value, item.text);
|
|
57497
57699
|
} else {
|
|
@@ -57515,7 +57717,10 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57515
57717
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", assign_default()({
|
|
57516
57718
|
key: prefixKey + index
|
|
57517
57719
|
}, events, {
|
|
57518
|
-
className: cls
|
|
57720
|
+
className: cls,
|
|
57721
|
+
role: "option",
|
|
57722
|
+
"aria-selected": selected,
|
|
57723
|
+
"aria-disabled": item.disabled
|
|
57519
57724
|
}), text)
|
|
57520
57725
|
);
|
|
57521
57726
|
});
|
|
@@ -57534,6 +57739,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57534
57739
|
className: wrapperCls,
|
|
57535
57740
|
ref: this._cacheWrapperNode
|
|
57536
57741
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
57742
|
+
role: "listbox",
|
|
57743
|
+
"aria-multiselectable": false,
|
|
57744
|
+
"aria-label": this.props['aria-label'],
|
|
57537
57745
|
ref: this._cacheListNode
|
|
57538
57746
|
}, inner));
|
|
57539
57747
|
};
|
|
@@ -57591,6 +57799,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57591
57799
|
ref: this._cacheWrapperNode,
|
|
57592
57800
|
onScroll: this.scrollToSelectItem
|
|
57593
57801
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
57802
|
+
role: "listbox",
|
|
57803
|
+
"aria-label": this.props['aria-label'],
|
|
57804
|
+
"aria-multiselectable": false,
|
|
57594
57805
|
ref: this._cacheListNode,
|
|
57595
57806
|
onClick: this.clickToSelectItem
|
|
57596
57807
|
}, prependList, inner, appendList)));
|
|
@@ -58613,6 +58824,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
|
|
|
58613
58824
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
58614
58825
|
noHorizontalPadding: false,
|
|
58615
58826
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
58827
|
+
"aria-hidden": true,
|
|
58616
58828
|
size: iconSize
|
|
58617
58829
|
}),
|
|
58618
58830
|
size: buttonSize,
|
|
@@ -58652,6 +58864,8 @@ yearAndMonth_YearAndMonth.defaultProps = {
|
|
|
58652
58864
|
|
|
58653
58865
|
|
|
58654
58866
|
|
|
58867
|
+
/* eslint-disable jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events */
|
|
58868
|
+
|
|
58655
58869
|
/* eslint-disable react/no-did-update-set-state */
|
|
58656
58870
|
|
|
58657
58871
|
/* eslint-disable max-len */
|
|
@@ -59007,7 +59221,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59007
59221
|
endDateOffset,
|
|
59008
59222
|
density,
|
|
59009
59223
|
rangeInputFocus,
|
|
59010
|
-
syncSwitchMonth
|
|
59224
|
+
syncSwitchMonth,
|
|
59225
|
+
multiple
|
|
59011
59226
|
} = this.props;
|
|
59012
59227
|
let monthText = ''; // i18n monthText
|
|
59013
59228
|
|
|
@@ -59073,7 +59288,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59073
59288
|
onWeeksRowNumChange: weeksRowNum => this.handleWeeksRowNumChange(weeksRowNum, panelType),
|
|
59074
59289
|
startDateOffset: startDateOffset,
|
|
59075
59290
|
endDateOffset: endDateOffset,
|
|
59076
|
-
focusRecordsRef: this.props.focusRecordsRef
|
|
59291
|
+
focusRecordsRef: this.props.focusRecordsRef,
|
|
59292
|
+
multiple: multiple
|
|
59077
59293
|
}));
|
|
59078
59294
|
}
|
|
59079
59295
|
|
|
@@ -59229,14 +59445,22 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59229
59445
|
className: switchCls,
|
|
59230
59446
|
ref: current => this.adapter.setCache("switch-".concat(panelType), current)
|
|
59231
59447
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
59448
|
+
role: "button",
|
|
59449
|
+
"aria-label": "Switch to date panel",
|
|
59232
59450
|
className: dateCls,
|
|
59233
59451
|
onClick: e => this.foundation.showDatePanel(panelType)
|
|
59234
|
-
}, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar,
|
|
59452
|
+
}, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, {
|
|
59453
|
+
"aria-hidden": true
|
|
59454
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59235
59455
|
className: textCls
|
|
59236
59456
|
}, dateText || monthText)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
59457
|
+
role: "button",
|
|
59458
|
+
"aria-label": "Switch to time panel",
|
|
59237
59459
|
className: timeCls,
|
|
59238
59460
|
onClick: e => this.foundation.showTimePicker(panelType, true)
|
|
59239
|
-
}, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClock,
|
|
59461
|
+
}, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClock, {
|
|
59462
|
+
"aria-hidden": true
|
|
59463
|
+
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
59240
59464
|
className: textCls
|
|
59241
59465
|
}, timeText)));
|
|
59242
59466
|
}
|
|
@@ -59325,6 +59549,8 @@ monthsGrid_MonthsGrid.defaultProps = {
|
|
|
59325
59549
|
|
|
59326
59550
|
|
|
59327
59551
|
|
|
59552
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */
|
|
59553
|
+
|
|
59328
59554
|
|
|
59329
59555
|
|
|
59330
59556
|
|
|
@@ -59418,6 +59644,8 @@ var datePicker = __webpack_require__("IJ0B");
|
|
|
59418
59644
|
|
|
59419
59645
|
|
|
59420
59646
|
|
|
59647
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
|
|
59648
|
+
|
|
59421
59649
|
/* eslint-disable max-len */
|
|
59422
59650
|
|
|
59423
59651
|
|
|
@@ -59810,6 +60038,10 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
59810
60038
|
|
|
59811
60039
|
if (prevProps.open !== this.props.open) {
|
|
59812
60040
|
this.foundation.initPanelOpenStatus();
|
|
60041
|
+
|
|
60042
|
+
if (!this.props.open) {
|
|
60043
|
+
this.foundation.clearRangeInputFocus();
|
|
60044
|
+
}
|
|
59813
60045
|
}
|
|
59814
60046
|
}
|
|
59815
60047
|
|
|
@@ -59981,18 +60213,19 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
59981
60213
|
onRangeEndTabPress: this.handleRangeEndTabPress
|
|
59982
60214
|
});
|
|
59983
60215
|
|
|
59984
|
-
return (
|
|
59985
|
-
|
|
59986
|
-
// eslint-disable-next-line jsx-a11y/
|
|
59987
|
-
|
|
59988
|
-
|
|
59989
|
-
|
|
59990
|
-
|
|
59991
|
-
|
|
59992
|
-
|
|
59993
|
-
|
|
59994
|
-
|
|
59995
|
-
|
|
60216
|
+
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
60217
|
+
// tooltip will mount a11y props to children
|
|
60218
|
+
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
60219
|
+
role: "combobox",
|
|
60220
|
+
"aria-label": is_array_default()(value) && value.length ? "Change date" : "Choose date",
|
|
60221
|
+
"aria-disabled": disabled,
|
|
60222
|
+
onClick: this.handleTriggerWrapperClick,
|
|
60223
|
+
className: inputCls
|
|
60224
|
+
}, typeof triggerRender === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, assign_default()({}, props, {
|
|
60225
|
+
triggerRender: triggerRender,
|
|
60226
|
+
componentName: "DatePicker",
|
|
60227
|
+
componentProps: assign_default()({}, this.props)
|
|
60228
|
+
})) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(dateInput_DateInput, assign_default()({}, props)));
|
|
59996
60229
|
}
|
|
59997
60230
|
|
|
59998
60231
|
render() {
|
|
@@ -72358,8 +72591,9 @@ class foundation_SelectFoundation extends foundation {
|
|
|
72358
72591
|
} // console.log('new:' + index);
|
|
72359
72592
|
|
|
72360
72593
|
|
|
72361
|
-
this._adapter.updateFocusIndex(index);
|
|
72594
|
+
this._adapter.updateFocusIndex(index);
|
|
72362
72595
|
|
|
72596
|
+
this._adapter.updateScrollTop(index);
|
|
72363
72597
|
}
|
|
72364
72598
|
|
|
72365
72599
|
_handleArrowKeyDown(offset) {
|
|
@@ -72921,9 +73155,9 @@ const VirtualRow = _ref => {
|
|
|
72921
73155
|
style
|
|
72922
73156
|
} = _ref;
|
|
72923
73157
|
const {
|
|
72924
|
-
|
|
73158
|
+
visibleOptions
|
|
72925
73159
|
} = data;
|
|
72926
|
-
const option =
|
|
73160
|
+
const option = visibleOptions[index];
|
|
72927
73161
|
return data.renderOption(option, index, style);
|
|
72928
73162
|
};
|
|
72929
73163
|
|
|
@@ -73261,11 +73495,19 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73261
73495
|
el.focus();
|
|
73262
73496
|
} catch (error) {}
|
|
73263
73497
|
},
|
|
73264
|
-
updateScrollTop:
|
|
73265
|
-
var
|
|
73498
|
+
updateScrollTop: index => {
|
|
73499
|
+
var _context10, _context11;
|
|
73266
73500
|
|
|
73267
73501
|
// eslint-disable-next-line max-len
|
|
73268
|
-
let
|
|
73502
|
+
let optionClassName = ".".concat(select_prefixcls, "-option-selected");
|
|
73503
|
+
|
|
73504
|
+
if (index !== undefined) {
|
|
73505
|
+
var _context9;
|
|
73506
|
+
|
|
73507
|
+
optionClassName = concat_default()(_context9 = ".".concat(select_prefixcls, "-option:nth-child(")).call(_context9, index, ")");
|
|
73508
|
+
}
|
|
73509
|
+
|
|
73510
|
+
let destNode = document.querySelector(concat_default()(_context10 = concat_default()(_context11 = "#".concat(select_prefixcls, "-")).call(_context11, this.selectOptionListID, " ")).call(_context10, optionClassName));
|
|
73269
73511
|
|
|
73270
73512
|
if (is_array_default()(destNode)) {
|
|
73271
73513
|
// eslint-disable-next-line prefer-destructuring
|
|
@@ -73293,11 +73535,11 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73293
73535
|
}
|
|
73294
73536
|
|
|
73295
73537
|
componentDidUpdate(prevProps, prevState) {
|
|
73296
|
-
var
|
|
73538
|
+
var _context12, _context13;
|
|
73297
73539
|
|
|
73298
|
-
const prevChildrenKeys = map_default()(
|
|
73540
|
+
const prevChildrenKeys = map_default()(_context12 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(prevProps.children)).call(_context12, child => child.key);
|
|
73299
73541
|
|
|
73300
|
-
const nowChildrenKeys = map_default()(
|
|
73542
|
+
const nowChildrenKeys = map_default()(_context13 = external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.toArray(this.props.children)).call(_context13, child => child.key);
|
|
73301
73543
|
|
|
73302
73544
|
let isOptionsChanged = false;
|
|
73303
73545
|
|
|
@@ -73491,34 +73733,30 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73491
73733
|
this.foundation.handleOptionMouseEnter(optionIndex);
|
|
73492
73734
|
}
|
|
73493
73735
|
|
|
73494
|
-
renderWithGroup(
|
|
73736
|
+
renderWithGroup(visibleOptions) {
|
|
73495
73737
|
const content = [];
|
|
73496
73738
|
const groupStatus = new core_js_stable_map_default.a();
|
|
73497
73739
|
|
|
73498
|
-
for_each_default()(
|
|
73740
|
+
for_each_default()(visibleOptions).call(visibleOptions, (option, optionIndex) => {
|
|
73499
73741
|
const parentGroup = option._parentGroup;
|
|
73500
73742
|
const optionContent = this.renderOption(option, optionIndex);
|
|
73501
73743
|
|
|
73502
|
-
if (parentGroup && groupStatus.has(parentGroup.label)) {
|
|
73503
|
-
// group content already insert
|
|
73504
|
-
content.push(optionContent);
|
|
73505
|
-
} else if (parentGroup) {
|
|
73744
|
+
if (parentGroup && !groupStatus.has(parentGroup.label)) {
|
|
73745
|
+
// when use with OptionGroup and group content not already insert
|
|
73506
73746
|
const groupContent = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(optionGroup, assign_default()({}, parentGroup, {
|
|
73507
73747
|
key: parentGroup.label
|
|
73508
73748
|
}));
|
|
73509
73749
|
groupStatus.set(parentGroup.label, true);
|
|
73510
73750
|
content.push(groupContent);
|
|
73511
|
-
content.push(optionContent);
|
|
73512
|
-
} else {
|
|
73513
|
-
// when not use with OptionGroup
|
|
73514
|
-
content.push(optionContent);
|
|
73515
73751
|
}
|
|
73752
|
+
|
|
73753
|
+
content.push(optionContent);
|
|
73516
73754
|
});
|
|
73517
73755
|
|
|
73518
73756
|
return content;
|
|
73519
73757
|
}
|
|
73520
73758
|
|
|
73521
|
-
renderVirtualizeList(
|
|
73759
|
+
renderVirtualizeList(visibleOptions) {
|
|
73522
73760
|
const {
|
|
73523
73761
|
virtualize
|
|
73524
73762
|
} = this.props;
|
|
@@ -73533,10 +73771,10 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73533
73771
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(FixedSizeList, {
|
|
73534
73772
|
ref: this.virtualizeListRef,
|
|
73535
73773
|
height: height || select_constants_numbers.LIST_HEIGHT,
|
|
73536
|
-
itemCount:
|
|
73774
|
+
itemCount: visibleOptions.length,
|
|
73537
73775
|
itemSize: itemSize,
|
|
73538
73776
|
itemData: {
|
|
73539
|
-
|
|
73777
|
+
visibleOptions,
|
|
73540
73778
|
renderOption: this.renderOption
|
|
73541
73779
|
},
|
|
73542
73780
|
width: width || '100%',
|
|
@@ -73547,7 +73785,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73547
73785
|
}
|
|
73548
73786
|
|
|
73549
73787
|
renderOptions(children) {
|
|
73550
|
-
var
|
|
73788
|
+
var _context14;
|
|
73551
73789
|
|
|
73552
73790
|
const {
|
|
73553
73791
|
dropdownMinWidth,
|
|
@@ -73567,12 +73805,12 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73567
73805
|
multiple
|
|
73568
73806
|
} = this.props; // Do a filter first, instead of directly judging in forEach, so that the focusIndex can correspond to
|
|
73569
73807
|
|
|
73570
|
-
const
|
|
73808
|
+
const visibleOptions = filter_default()(options).call(options, item => item._show);
|
|
73571
73809
|
|
|
73572
|
-
let listContent = this.renderWithGroup(
|
|
73810
|
+
let listContent = this.renderWithGroup(visibleOptions);
|
|
73573
73811
|
|
|
73574
73812
|
if (virtualize) {
|
|
73575
|
-
listContent = this.renderVirtualizeList(
|
|
73813
|
+
listContent = this.renderVirtualizeList(visibleOptions);
|
|
73576
73814
|
}
|
|
73577
73815
|
|
|
73578
73816
|
const style = assign_default()({
|
|
@@ -73585,7 +73823,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73585
73823
|
});
|
|
73586
73824
|
const isEmpty = !options.length || !some_default()(options).call(options, item => item._show);
|
|
73587
73825
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
73588
|
-
id: concat_default()(
|
|
73826
|
+
id: concat_default()(_context14 = "".concat(select_prefixcls, "-")).call(_context14, this.selectOptionListID),
|
|
73589
73827
|
className: dropdownClassName,
|
|
73590
73828
|
style: style
|
|
73591
73829
|
}, outerTopSlot, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
@@ -73816,7 +74054,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73816
74054
|
}
|
|
73817
74055
|
|
|
73818
74056
|
renderSelection() {
|
|
73819
|
-
var
|
|
74057
|
+
var _context15;
|
|
73820
74058
|
|
|
73821
74059
|
const {
|
|
73822
74060
|
disabled,
|
|
@@ -73900,7 +74138,7 @@ class select_Select extends baseComponent_BaseComponent {
|
|
|
73900
74138
|
role: "combobox",
|
|
73901
74139
|
"aria-disabled": disabled,
|
|
73902
74140
|
"aria-expanded": isOpen,
|
|
73903
|
-
"aria-controls": concat_default()(
|
|
74141
|
+
"aria-controls": concat_default()(_context15 = "".concat(select_prefixcls, "-")).call(_context15, this.selectOptionListID),
|
|
73904
74142
|
"aria-haspopup": "listbox",
|
|
73905
74143
|
"aria-label": "select value",
|
|
73906
74144
|
"aria-invalid": this.props['aria-invalid'],
|
|
@@ -77388,7 +77626,7 @@ class foundation_SliderFoundation extends foundation {
|
|
|
77388
77626
|
|
|
77389
77627
|
const scroll = node => regex.test(style(node, 'overflow') + style(node, 'overflow-y') + style(node, 'overflow-x'));
|
|
77390
77628
|
|
|
77391
|
-
const scrollParent = node => !node || node === document.body ? document.body : scroll(node) ? node : scrollParent(node.parentNode);
|
|
77629
|
+
const scrollParent = node => !node || node === document.body || !(node instanceof Element) ? document.body : scroll(node) ? node : scrollParent(node.parentNode);
|
|
77392
77630
|
|
|
77393
77631
|
return scrollParent(el);
|
|
77394
77632
|
};
|
|
@@ -77512,7 +77750,7 @@ class foundation_SliderFoundation extends foundation {
|
|
|
77512
77750
|
}
|
|
77513
77751
|
|
|
77514
77752
|
if (step !== 1) {
|
|
77515
|
-
// Find nearest step point
|
|
77753
|
+
// Find nearest step point
|
|
77516
77754
|
stepValue = Math.round(stepValue / step) * step;
|
|
77517
77755
|
}
|
|
77518
77756
|
|
|
@@ -80149,7 +80387,10 @@ function assignColumnKeys(columns) {
|
|
|
80149
80387
|
if (column.key == null) {
|
|
80150
80388
|
var _context4;
|
|
80151
80389
|
|
|
80152
|
-
|
|
80390
|
+
// if user give column a dataIndex, use it for backup
|
|
80391
|
+
const _index = column.dataIndex || index;
|
|
80392
|
+
|
|
80393
|
+
column.key = concat_default()(_context4 = "".concat(level, "-")).call(_context4, _index);
|
|
80153
80394
|
}
|
|
80154
80395
|
|
|
80155
80396
|
if (is_array_default()(column[childrenColumnName]) && column[childrenColumnName].length) {
|
|
@@ -80710,7 +80951,17 @@ class foundation_TableFoundation extends foundation {
|
|
|
80710
80951
|
|
|
80711
80952
|
|
|
80712
80953
|
getFilteredSortedDataSource(dataSource, queries) {
|
|
80713
|
-
const filteredDataSource = this.filterDataSource(dataSource, filter_default()(queries).call(queries, query =>
|
|
80954
|
+
const filteredDataSource = this.filterDataSource(dataSource, filter_default()(queries).call(queries, query => {
|
|
80955
|
+
/**
|
|
80956
|
+
* 这里无需判断 filteredValue 是否为数组,初始化时它是 `undefined`,点击选择空时为 `[]`
|
|
80957
|
+
* 初始化时我们应该用 `defaultFilteredValue`,点击后我们应该用 `filteredValue`
|
|
80958
|
+
*
|
|
80959
|
+
* There is no need to judge whether `filteredValue` is an array here, because it is `undefined` when initialized, and `[]` when you click to select empty
|
|
80960
|
+
* When initializing we should use `defaultFilteredValue`, after clicking we should use `filteredValue`
|
|
80961
|
+
*/
|
|
80962
|
+
const currentFilteredValue = query.filteredValue ? query.filteredValue : query.defaultFilteredValue;
|
|
80963
|
+
return isFunction_default()(query.onFilter) && is_array_default()(query.filters) && query.filters.length && is_array_default()(currentFilteredValue) && currentFilteredValue.length;
|
|
80964
|
+
}));
|
|
80714
80965
|
const sortedDataSource = this.sortDataSource(filteredDataSource, filter_default()(queries).call(queries, query => query && isFunction_default()(query.sorter)));
|
|
80715
80966
|
return sortedDataSource;
|
|
80716
80967
|
}
|
|
@@ -80869,10 +81120,12 @@ class foundation_TableFoundation extends foundation {
|
|
|
80869
81120
|
const {
|
|
80870
81121
|
onFilter,
|
|
80871
81122
|
filteredValue,
|
|
80872
|
-
filterChildrenRecord
|
|
81123
|
+
filterChildrenRecord,
|
|
81124
|
+
defaultFilteredValue
|
|
80873
81125
|
} = filterObj;
|
|
81126
|
+
const currentFilteredValue = is_array_default()(filteredValue) ? filteredValue : defaultFilteredValue;
|
|
80874
81127
|
|
|
80875
|
-
if (typeof onFilter === 'function' && is_array_default()(
|
|
81128
|
+
if (typeof onFilter === 'function' && is_array_default()(currentFilteredValue) && currentFilteredValue.length) {
|
|
80876
81129
|
hasValidFilters = true;
|
|
80877
81130
|
|
|
80878
81131
|
if (filteredData === null) {
|
|
@@ -80882,7 +81135,7 @@ class foundation_TableFoundation extends foundation {
|
|
|
80882
81135
|
filteredData = new core_js_stable_map_default.a();
|
|
80883
81136
|
}
|
|
80884
81137
|
|
|
80885
|
-
each_default()(
|
|
81138
|
+
each_default()(currentFilteredValue, value => {
|
|
80886
81139
|
each_default()(dataSource, record => {
|
|
80887
81140
|
const childrenRecords = get_default()(record, childrenRecordName);
|
|
80888
81141
|
|
|
@@ -85692,10 +85945,17 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
85692
85945
|
titleArr.push(sorter);
|
|
85693
85946
|
}
|
|
85694
85947
|
|
|
85948
|
+
const stateFilteredValue = get_default()(curQuery, 'filteredValue');
|
|
85949
|
+
|
|
85950
|
+
const defaultFilteredValue = get_default()(curQuery, 'defaultFilteredValue');
|
|
85951
|
+
|
|
85952
|
+
const filteredValue = stateFilteredValue ? stateFilteredValue : defaultFilteredValue;
|
|
85953
|
+
|
|
85695
85954
|
if (is_array_default()(column.filters) && column.filters.length || /*#__PURE__*/Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["isValidElement"])(column.filterDropdown)) {
|
|
85696
85955
|
const filter = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ColumnFilter, assign_default()({
|
|
85697
85956
|
key: table_constants_strings.DEFAULT_KEY_COLUMN_FILTER
|
|
85698
85957
|
}, curQuery, {
|
|
85958
|
+
filteredValue: filteredValue,
|
|
85699
85959
|
onFilterDropdownVisibleChange: visible => _this.foundation.toggleShowFilter(dataIndex, visible),
|
|
85700
85960
|
onSelect: data => _this.foundation.handleFilterSelect(dataIndex, data)
|
|
85701
85961
|
}));
|
|
@@ -86284,11 +86544,12 @@ class Table_Table extends baseComponent_BaseComponent {
|
|
|
86284
86544
|
willUpdateStates.cachedColumns = props.columns;
|
|
86285
86545
|
willUpdateStates.cachedChildren = null;
|
|
86286
86546
|
} else if (props.children && props.children !== state.cachedChildren) {
|
|
86287
|
-
const
|
|
86547
|
+
const newNestedColumns = getColumns(props.children);
|
|
86548
|
+
const newFlattenColumns = flattenColumns(newNestedColumns);
|
|
86288
86549
|
const columns = mergeColumns(state.queries, newFlattenColumns, null, false);
|
|
86289
86550
|
willUpdateStates.flattenColumns = newFlattenColumns;
|
|
86290
86551
|
willUpdateStates.queries = [...columns];
|
|
86291
|
-
willUpdateStates.cachedColumns = [...
|
|
86552
|
+
willUpdateStates.cachedColumns = [...newNestedColumns];
|
|
86292
86553
|
willUpdateStates.cachedChildren = props.children;
|
|
86293
86554
|
} // Update controlled selection column
|
|
86294
86555
|
|
|
@@ -90552,6 +90813,7 @@ class foundation_TreeFoundation extends foundation {
|
|
|
90552
90813
|
selectedKeys = [],
|
|
90553
90814
|
checkedKeys = new set_default.a([]),
|
|
90554
90815
|
halfCheckedKeys = new set_default.a([]),
|
|
90816
|
+
realCheckedKeys = new set_default.a([]),
|
|
90555
90817
|
keyEntities = {},
|
|
90556
90818
|
filteredKeys = new set_default.a([]),
|
|
90557
90819
|
inputValue = '',
|
|
@@ -90561,13 +90823,26 @@ class foundation_TreeFoundation extends foundation {
|
|
|
90561
90823
|
disabledKeys = new set_default.a([])
|
|
90562
90824
|
} = this.getStates();
|
|
90563
90825
|
const {
|
|
90564
|
-
treeNodeFilterProp
|
|
90826
|
+
treeNodeFilterProp,
|
|
90827
|
+
checkRelation
|
|
90565
90828
|
} = this.getProps();
|
|
90566
90829
|
const entity = keyEntities[key];
|
|
90567
90830
|
const notExist = !entity;
|
|
90568
90831
|
|
|
90569
90832
|
if (notExist) {
|
|
90570
90833
|
return null;
|
|
90834
|
+
} // if checkRelation is invalid, the checked status of node will be false
|
|
90835
|
+
|
|
90836
|
+
|
|
90837
|
+
let realChecked = false;
|
|
90838
|
+
let realHalfChecked = false;
|
|
90839
|
+
|
|
90840
|
+
if (checkRelation === 'related') {
|
|
90841
|
+
realChecked = checkedKeys.has(key);
|
|
90842
|
+
realHalfChecked = halfCheckedKeys.has(key);
|
|
90843
|
+
} else if (checkRelation === 'unRelated') {
|
|
90844
|
+
realChecked = realCheckedKeys.has(key);
|
|
90845
|
+
realHalfChecked = false;
|
|
90571
90846
|
}
|
|
90572
90847
|
|
|
90573
90848
|
const isSearching = Boolean(inputValue);
|
|
@@ -90575,8 +90850,8 @@ class foundation_TreeFoundation extends foundation {
|
|
|
90575
90850
|
eventKey: key,
|
|
90576
90851
|
expanded: isSearching ? filteredExpandedKeys.has(key) : expandedKeys.has(key),
|
|
90577
90852
|
selected: includes_default()(selectedKeys).call(selectedKeys, key),
|
|
90578
|
-
checked:
|
|
90579
|
-
halfChecked:
|
|
90853
|
+
checked: realChecked,
|
|
90854
|
+
halfChecked: realHalfChecked,
|
|
90580
90855
|
pos: String(entity ? entity.pos : ''),
|
|
90581
90856
|
level: entity.level,
|
|
90582
90857
|
filtered: filteredKeys.has(key),
|
|
@@ -90610,10 +90885,17 @@ class foundation_TreeFoundation extends foundation {
|
|
|
90610
90885
|
keyEntities
|
|
90611
90886
|
} = this.getStates();
|
|
90612
90887
|
const {
|
|
90613
|
-
leafOnly
|
|
90888
|
+
leafOnly,
|
|
90889
|
+
checkRelation
|
|
90614
90890
|
} = this.getProps();
|
|
90615
90891
|
let value;
|
|
90616
|
-
|
|
90892
|
+
let keyList = [];
|
|
90893
|
+
|
|
90894
|
+
if (checkRelation === 'related') {
|
|
90895
|
+
keyList = normalizeKeyList(key, keyEntities, leafOnly);
|
|
90896
|
+
} else if (checkRelation === 'unRelated') {
|
|
90897
|
+
keyList = key;
|
|
90898
|
+
}
|
|
90617
90899
|
|
|
90618
90900
|
if (this.getProp('onChangeWithObject')) {
|
|
90619
90901
|
value = map_default()(keyList).call(keyList, itemKey => keyEntities[itemKey].data);
|
|
@@ -90828,30 +91110,58 @@ class foundation_TreeFoundation extends foundation {
|
|
|
90828
91110
|
|
|
90829
91111
|
handleMultipleSelect(e, treeNode) {
|
|
90830
91112
|
const {
|
|
90831
|
-
disableStrictly
|
|
90832
|
-
|
|
91113
|
+
disableStrictly,
|
|
91114
|
+
checkRelation
|
|
91115
|
+
} = this.getProps();
|
|
91116
|
+
const {
|
|
91117
|
+
realCheckedKeys
|
|
91118
|
+
} = this.getStates(); // eventKey: The key value of the currently clicked node
|
|
90833
91119
|
|
|
90834
91120
|
const {
|
|
90835
91121
|
checked,
|
|
90836
91122
|
eventKey,
|
|
90837
91123
|
data
|
|
90838
|
-
} = treeNode;
|
|
91124
|
+
} = treeNode;
|
|
90839
91125
|
|
|
90840
|
-
|
|
90841
|
-
|
|
90842
|
-
|
|
90843
|
-
|
|
90844
|
-
|
|
91126
|
+
if (checkRelation === 'related') {
|
|
91127
|
+
// Find the checked state of the current node
|
|
91128
|
+
const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
|
|
91129
|
+
const {
|
|
91130
|
+
checkedKeys,
|
|
91131
|
+
halfCheckedKeys
|
|
91132
|
+
} = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
|
|
90845
91133
|
|
|
90846
|
-
|
|
91134
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
90847
91135
|
|
|
90848
|
-
|
|
91136
|
+
this.notifyChange([...checkedKeys], e);
|
|
90849
91137
|
|
|
90850
|
-
|
|
90851
|
-
|
|
90852
|
-
|
|
90853
|
-
|
|
90854
|
-
|
|
91138
|
+
if (!this._isControlledComponent()) {
|
|
91139
|
+
this._adapter.updateState({
|
|
91140
|
+
checkedKeys,
|
|
91141
|
+
halfCheckedKeys
|
|
91142
|
+
});
|
|
91143
|
+
}
|
|
91144
|
+
} else if (checkRelation === 'unRelated') {
|
|
91145
|
+
const newRealCheckedKeys = new set_default.a(realCheckedKeys);
|
|
91146
|
+
let targetStatus;
|
|
91147
|
+
|
|
91148
|
+
if (realCheckedKeys.has(eventKey)) {
|
|
91149
|
+
newRealCheckedKeys.delete(eventKey);
|
|
91150
|
+
targetStatus = false;
|
|
91151
|
+
} else {
|
|
91152
|
+
newRealCheckedKeys.add(eventKey);
|
|
91153
|
+
targetStatus = true;
|
|
91154
|
+
}
|
|
91155
|
+
|
|
91156
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
91157
|
+
|
|
91158
|
+
this.notifyChange([...newRealCheckedKeys], e);
|
|
91159
|
+
|
|
91160
|
+
if (!this._isControlledComponent()) {
|
|
91161
|
+
this._adapter.updateState({
|
|
91162
|
+
realCheckedKeys: newRealCheckedKeys
|
|
91163
|
+
});
|
|
91164
|
+
}
|
|
90855
91165
|
}
|
|
90856
91166
|
}
|
|
90857
91167
|
|
|
@@ -92262,6 +92572,7 @@ class tree_Tree extends baseComponent_BaseComponent {
|
|
|
92262
92572
|
selectedKeys: [],
|
|
92263
92573
|
checkedKeys: new set_default.a(),
|
|
92264
92574
|
halfCheckedKeys: new set_default.a(),
|
|
92575
|
+
realCheckedKeys: new set_default.a([]),
|
|
92265
92576
|
motionKeys: new set_default.a([]),
|
|
92266
92577
|
motionType: 'hide',
|
|
92267
92578
|
expandedKeys: new set_default.a(props.expandedKeys),
|
|
@@ -92472,12 +92783,16 @@ class tree_Tree extends baseComponent_BaseComponent {
|
|
|
92472
92783
|
}
|
|
92473
92784
|
|
|
92474
92785
|
if (checkedKeyValues) {
|
|
92475
|
-
|
|
92476
|
-
|
|
92477
|
-
|
|
92478
|
-
|
|
92479
|
-
|
|
92480
|
-
|
|
92786
|
+
if (props.checkRelation === 'unRelated') {
|
|
92787
|
+
newState.realCheckedKeys = new set_default.a(checkedKeyValues);
|
|
92788
|
+
} else if (props.checkRelation === 'related') {
|
|
92789
|
+
const {
|
|
92790
|
+
checkedKeys,
|
|
92791
|
+
halfCheckedKeys
|
|
92792
|
+
} = calcCheckedKeys(checkedKeyValues, keyEntities);
|
|
92793
|
+
newState.checkedKeys = checkedKeys;
|
|
92794
|
+
newState.halfCheckedKeys = halfCheckedKeys;
|
|
92795
|
+
}
|
|
92481
92796
|
}
|
|
92482
92797
|
} // update loadedKeys
|
|
92483
92798
|
|
|
@@ -92487,7 +92802,7 @@ class tree_Tree extends baseComponent_BaseComponent {
|
|
|
92487
92802
|
} // update disableStrictly
|
|
92488
92803
|
|
|
92489
92804
|
|
|
92490
|
-
if (treeData && props.disableStrictly) {
|
|
92805
|
+
if (treeData && props.disableStrictly && props.checkRelation === 'related') {
|
|
92491
92806
|
newState.disabledKeys = calcDisabledKeys(keyEntities);
|
|
92492
92807
|
}
|
|
92493
92808
|
|
|
@@ -92808,6 +93123,7 @@ tree_Tree.propTypes = {
|
|
|
92808
93123
|
onDragStart: prop_types_default.a.func,
|
|
92809
93124
|
onDrop: prop_types_default.a.func,
|
|
92810
93125
|
labelEllipsis: prop_types_default.a.bool,
|
|
93126
|
+
checkRelation: prop_types_default.a.string,
|
|
92811
93127
|
'aria-label': prop_types_default.a.string
|
|
92812
93128
|
};
|
|
92813
93129
|
tree_Tree.defaultProps = {
|
|
@@ -92827,7 +93143,8 @@ tree_Tree.defaultProps = {
|
|
|
92827
93143
|
expandAction: false,
|
|
92828
93144
|
disableStrictly: false,
|
|
92829
93145
|
draggable: false,
|
|
92830
|
-
autoExpandWhenDragEnter: true
|
|
93146
|
+
autoExpandWhenDragEnter: true,
|
|
93147
|
+
checkRelation: 'related'
|
|
92831
93148
|
};
|
|
92832
93149
|
tree_Tree.TreeNode = treeNode_TreeNode;
|
|
92833
93150
|
/* harmony default export */ var tree_0 = (tree_Tree);
|
|
@@ -92973,6 +93290,7 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
92973
93290
|
selectedKeys = [],
|
|
92974
93291
|
checkedKeys = new set_default.a([]),
|
|
92975
93292
|
halfCheckedKeys = new set_default.a([]),
|
|
93293
|
+
realCheckedKeys = new set_default.a([]),
|
|
92976
93294
|
keyEntities = {},
|
|
92977
93295
|
filteredKeys = new set_default.a([]),
|
|
92978
93296
|
inputValue = '',
|
|
@@ -92982,13 +93300,26 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
92982
93300
|
disabledKeys = new set_default.a([])
|
|
92983
93301
|
} = this.getStates();
|
|
92984
93302
|
const {
|
|
92985
|
-
treeNodeFilterProp
|
|
93303
|
+
treeNodeFilterProp,
|
|
93304
|
+
checkRelation
|
|
92986
93305
|
} = this.getProps();
|
|
92987
93306
|
const entity = keyEntities[key];
|
|
92988
93307
|
const notExist = !entity;
|
|
92989
93308
|
|
|
92990
93309
|
if (notExist) {
|
|
92991
93310
|
return null;
|
|
93311
|
+
} // if checkRelation is invalid, the checked status of node will be false
|
|
93312
|
+
|
|
93313
|
+
|
|
93314
|
+
let realChecked = false;
|
|
93315
|
+
let realHalfChecked = false;
|
|
93316
|
+
|
|
93317
|
+
if (checkRelation === 'related') {
|
|
93318
|
+
realChecked = checkedKeys.has(key);
|
|
93319
|
+
realHalfChecked = halfCheckedKeys.has(key);
|
|
93320
|
+
} else if (checkRelation === 'unRelated') {
|
|
93321
|
+
realChecked = realCheckedKeys.has(key);
|
|
93322
|
+
realHalfChecked = false;
|
|
92992
93323
|
}
|
|
92993
93324
|
|
|
92994
93325
|
const isSearching = Boolean(inputValue);
|
|
@@ -92996,8 +93327,8 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
92996
93327
|
eventKey: key,
|
|
92997
93328
|
expanded: isSearching ? filteredExpandedKeys.has(key) : expandedKeys.has(key),
|
|
92998
93329
|
selected: includes_default()(selectedKeys).call(selectedKeys, key),
|
|
92999
|
-
checked:
|
|
93000
|
-
halfChecked:
|
|
93330
|
+
checked: realChecked,
|
|
93331
|
+
halfChecked: realHalfChecked,
|
|
93001
93332
|
pos: String(entity ? entity.pos : ''),
|
|
93002
93333
|
level: entity.level,
|
|
93003
93334
|
filtered: filteredKeys.has(key),
|
|
@@ -93063,9 +93394,16 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
93063
93394
|
keyEntities
|
|
93064
93395
|
} = this.getStates();
|
|
93065
93396
|
const {
|
|
93066
|
-
leafOnly
|
|
93397
|
+
leafOnly,
|
|
93398
|
+
checkRelation
|
|
93067
93399
|
} = this.getProps();
|
|
93068
|
-
|
|
93400
|
+
let keyList = [];
|
|
93401
|
+
|
|
93402
|
+
if (checkRelation === 'related') {
|
|
93403
|
+
keyList = normalizeKeyList(key, keyEntities, leafOnly);
|
|
93404
|
+
} else if (checkRelation === 'unRelated') {
|
|
93405
|
+
keyList = key;
|
|
93406
|
+
}
|
|
93069
93407
|
|
|
93070
93408
|
const nodes = map_default()(keyList).call(keyList, i => keyEntities[i].data);
|
|
93071
93409
|
|
|
@@ -93192,7 +93530,8 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
93192
93530
|
this._adapter.updateState({
|
|
93193
93531
|
selectedKeys: [],
|
|
93194
93532
|
checkedKeys: new set_default.a(),
|
|
93195
|
-
halfCheckedKeys: new set_default.a()
|
|
93533
|
+
halfCheckedKeys: new set_default.a(),
|
|
93534
|
+
realCheckedKeys: new set_default.a([])
|
|
93196
93535
|
});
|
|
93197
93536
|
} // When triggerSearch, clicking the clear button will trigger to clear Input
|
|
93198
93537
|
|
|
@@ -93220,11 +93559,13 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
93220
93559
|
|
|
93221
93560
|
removeTag(eventKey) {
|
|
93222
93561
|
const {
|
|
93223
|
-
disableStrictly
|
|
93562
|
+
disableStrictly,
|
|
93563
|
+
checkRelation
|
|
93224
93564
|
} = this.getProps();
|
|
93225
93565
|
const {
|
|
93226
93566
|
keyEntities,
|
|
93227
|
-
disabledKeys
|
|
93567
|
+
disabledKeys,
|
|
93568
|
+
realCheckedKeys
|
|
93228
93569
|
} = this.getStates();
|
|
93229
93570
|
const item = keyEntities[eventKey].data;
|
|
93230
93571
|
|
|
@@ -93232,20 +93573,35 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
93232
93573
|
return;
|
|
93233
93574
|
}
|
|
93234
93575
|
|
|
93235
|
-
|
|
93236
|
-
|
|
93237
|
-
|
|
93238
|
-
} = this.calcCheckedKeys(eventKey, false);
|
|
93576
|
+
if (checkRelation === 'unRelated') {
|
|
93577
|
+
const newRealCheckedKeys = new set_default.a(realCheckedKeys);
|
|
93578
|
+
newRealCheckedKeys.delete(eventKey);
|
|
93239
93579
|
|
|
93240
|
-
|
|
93580
|
+
this._notifyChange([...newRealCheckedKeys], null);
|
|
93241
93581
|
|
|
93242
|
-
|
|
93243
|
-
|
|
93582
|
+
if (!this._isControlledComponent()) {
|
|
93583
|
+
this._adapter.updateState({
|
|
93584
|
+
realCheckedKeys: newRealCheckedKeys
|
|
93585
|
+
});
|
|
93586
|
+
|
|
93587
|
+
this._adapter.rePositionDropdown();
|
|
93588
|
+
}
|
|
93589
|
+
} else if (checkRelation === 'related') {
|
|
93590
|
+
const {
|
|
93244
93591
|
checkedKeys,
|
|
93245
93592
|
halfCheckedKeys
|
|
93246
|
-
});
|
|
93593
|
+
} = this.calcCheckedKeys(eventKey, false);
|
|
93247
93594
|
|
|
93248
|
-
this.
|
|
93595
|
+
this._notifyChange([...checkedKeys], null);
|
|
93596
|
+
|
|
93597
|
+
if (!this._isControlledComponent()) {
|
|
93598
|
+
this._adapter.updateState({
|
|
93599
|
+
checkedKeys,
|
|
93600
|
+
halfCheckedKeys
|
|
93601
|
+
});
|
|
93602
|
+
|
|
93603
|
+
this._adapter.rePositionDropdown();
|
|
93604
|
+
}
|
|
93249
93605
|
}
|
|
93250
93606
|
|
|
93251
93607
|
this._adapter.notifySelect(eventKey, false, item); // reposition dropdown when selected values change
|
|
@@ -93396,39 +93752,67 @@ class foundation_TreeSelectFoundation extends foundation {
|
|
|
93396
93752
|
handleMultipleSelect(e, treeNode) {
|
|
93397
93753
|
const {
|
|
93398
93754
|
searchPosition,
|
|
93399
|
-
disableStrictly
|
|
93755
|
+
disableStrictly,
|
|
93756
|
+
checkRelation
|
|
93400
93757
|
} = this.getProps();
|
|
93401
93758
|
const {
|
|
93402
|
-
inputValue
|
|
93759
|
+
inputValue,
|
|
93760
|
+
realCheckedKeys
|
|
93403
93761
|
} = this.getStates();
|
|
93404
93762
|
const {
|
|
93405
93763
|
checked,
|
|
93406
93764
|
eventKey,
|
|
93407
93765
|
data
|
|
93408
93766
|
} = treeNode;
|
|
93409
|
-
const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
|
|
93410
|
-
const {
|
|
93411
|
-
checkedKeys,
|
|
93412
|
-
halfCheckedKeys
|
|
93413
|
-
} = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
|
|
93414
93767
|
|
|
93415
|
-
|
|
93768
|
+
if (checkRelation === 'related') {
|
|
93769
|
+
const targetStatus = disableStrictly ? this.calcChekcedStatus(!checked, eventKey) : !checked;
|
|
93770
|
+
const {
|
|
93771
|
+
checkedKeys,
|
|
93772
|
+
halfCheckedKeys
|
|
93773
|
+
} = disableStrictly ? this.calcNonDisabedCheckedKeys(eventKey, targetStatus) : this.calcCheckedKeys(eventKey, targetStatus);
|
|
93416
93774
|
|
|
93417
|
-
|
|
93775
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
93418
93776
|
|
|
93419
|
-
|
|
93420
|
-
|
|
93421
|
-
|
|
93422
|
-
|
|
93777
|
+
this._notifyChange([...checkedKeys], e);
|
|
93778
|
+
|
|
93779
|
+
if (!this._isControlledComponent()) {
|
|
93780
|
+
this._adapter.updateState({
|
|
93781
|
+
checkedKeys,
|
|
93782
|
+
halfCheckedKeys
|
|
93783
|
+
});
|
|
93784
|
+
|
|
93785
|
+
this._adapter.rePositionDropdown();
|
|
93786
|
+
}
|
|
93787
|
+
} else if (checkRelation === 'unRelated') {
|
|
93788
|
+
const newRealCheckedKeys = new set_default.a(realCheckedKeys);
|
|
93789
|
+
let targetStatus;
|
|
93790
|
+
|
|
93791
|
+
if (realCheckedKeys.has(eventKey)) {
|
|
93792
|
+
newRealCheckedKeys.delete(eventKey);
|
|
93793
|
+
targetStatus = false;
|
|
93794
|
+
} else {
|
|
93795
|
+
newRealCheckedKeys.add(eventKey);
|
|
93796
|
+
targetStatus = true;
|
|
93797
|
+
}
|
|
93798
|
+
|
|
93799
|
+
this._adapter.notifySelect(eventKey, targetStatus, data);
|
|
93800
|
+
|
|
93801
|
+
this._notifyChange([...newRealCheckedKeys], e);
|
|
93802
|
+
|
|
93803
|
+
if (!this._isControlledComponent()) {
|
|
93804
|
+
this._adapter.updateState({
|
|
93805
|
+
realCheckedKeys: newRealCheckedKeys
|
|
93806
|
+
});
|
|
93807
|
+
|
|
93808
|
+
this._adapter.rePositionDropdown();
|
|
93809
|
+
}
|
|
93423
93810
|
}
|
|
93424
93811
|
|
|
93425
|
-
if (
|
|
93812
|
+
if (searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue !== '') {
|
|
93426
93813
|
this._adapter.updateState({
|
|
93427
|
-
|
|
93428
|
-
halfCheckedKeys
|
|
93814
|
+
inputValue: ''
|
|
93429
93815
|
});
|
|
93430
|
-
|
|
93431
|
-
this._adapter.rePositionDropdown();
|
|
93432
93816
|
}
|
|
93433
93817
|
}
|
|
93434
93818
|
|
|
@@ -93756,34 +94140,52 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
93756
94140
|
this.foundation.handleSelectionEnterPress(e);
|
|
93757
94141
|
};
|
|
93758
94142
|
|
|
93759
|
-
this.
|
|
94143
|
+
this.hasValue = () => {
|
|
93760
94144
|
const {
|
|
93761
|
-
|
|
94145
|
+
multiple,
|
|
94146
|
+
checkRelation
|
|
93762
94147
|
} = this.props;
|
|
93763
94148
|
const {
|
|
93764
|
-
|
|
94149
|
+
realCheckedKeys,
|
|
94150
|
+
checkedKeys,
|
|
94151
|
+
selectedKeys
|
|
93765
94152
|
} = this.state;
|
|
93766
|
-
|
|
94153
|
+
let hasValue = false;
|
|
94154
|
+
|
|
94155
|
+
if (multiple) {
|
|
94156
|
+
if (checkRelation === 'related') {
|
|
94157
|
+
hasValue = Boolean(checkedKeys.size);
|
|
94158
|
+
} else if (checkRelation === 'unRelated') {
|
|
94159
|
+
hasValue = Boolean(realCheckedKeys.size);
|
|
94160
|
+
}
|
|
94161
|
+
} else {
|
|
94162
|
+
hasValue = Boolean(selectedKeys.length);
|
|
94163
|
+
}
|
|
94164
|
+
|
|
94165
|
+
return hasValue;
|
|
94166
|
+
};
|
|
94167
|
+
|
|
94168
|
+
this.showClearBtn = () => {
|
|
93767
94169
|
const {
|
|
93768
94170
|
showClear,
|
|
93769
94171
|
disabled,
|
|
93770
|
-
|
|
94172
|
+
searchPosition
|
|
93771
94173
|
} = this.props;
|
|
93772
94174
|
const {
|
|
93773
|
-
|
|
93774
|
-
checkedKeys,
|
|
94175
|
+
inputValue,
|
|
93775
94176
|
isOpen,
|
|
93776
94177
|
isHovering
|
|
93777
94178
|
} = this.state;
|
|
93778
|
-
const
|
|
93779
|
-
return showClear && (hasValue || triggerSearchHasInputValue) && !disabled && (isOpen || isHovering);
|
|
94179
|
+
const triggerSearchHasInputValue = searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER && inputValue;
|
|
94180
|
+
return showClear && (this.hasValue() || triggerSearchHasInputValue) && !disabled && (isOpen || isHovering);
|
|
93780
94181
|
};
|
|
93781
94182
|
|
|
93782
94183
|
this.renderTagList = () => {
|
|
93783
94184
|
const {
|
|
93784
94185
|
checkedKeys,
|
|
93785
94186
|
keyEntities,
|
|
93786
|
-
disabledKeys
|
|
94187
|
+
disabledKeys,
|
|
94188
|
+
realCheckedKeys
|
|
93787
94189
|
} = this.state;
|
|
93788
94190
|
const {
|
|
93789
94191
|
treeNodeLabelProp,
|
|
@@ -93791,13 +94193,21 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
93791
94193
|
disabled,
|
|
93792
94194
|
disableStrictly,
|
|
93793
94195
|
size,
|
|
94196
|
+
checkRelation,
|
|
93794
94197
|
renderSelectedItem: propRenderSelectedItem
|
|
93795
94198
|
} = this.props;
|
|
93796
94199
|
const renderSelectedItem = isFunction_default()(propRenderSelectedItem) ? propRenderSelectedItem : item => ({
|
|
93797
94200
|
isRenderInTag: true,
|
|
93798
94201
|
content: get_default()(item, treeNodeLabelProp, null)
|
|
93799
94202
|
});
|
|
93800
|
-
|
|
94203
|
+
let renderKeys = [];
|
|
94204
|
+
|
|
94205
|
+
if (checkRelation === 'related') {
|
|
94206
|
+
renderKeys = normalizeKeyList([...checkedKeys], keyEntities, leafOnly);
|
|
94207
|
+
} else if (checkRelation === 'unRelated') {
|
|
94208
|
+
renderKeys = [...realCheckedKeys];
|
|
94209
|
+
}
|
|
94210
|
+
|
|
93801
94211
|
const tagList = []; // eslint-disable-next-line @typescript-eslint/no-shadow
|
|
93802
94212
|
|
|
93803
94213
|
for_each_default()(renderKeys).call(renderKeys, key => {
|
|
@@ -93886,11 +94296,6 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
93886
94296
|
searchPosition,
|
|
93887
94297
|
filterTreeNode
|
|
93888
94298
|
} = this.props;
|
|
93889
|
-
const {
|
|
93890
|
-
selectedKeys,
|
|
93891
|
-
checkedKeys
|
|
93892
|
-
} = this.state;
|
|
93893
|
-
const hasValue = multiple ? Boolean(checkedKeys.size) : Boolean(selectedKeys.length);
|
|
93894
94299
|
const isTriggerPositionSearch = filterTreeNode && searchPosition === treeSelect_constants_strings.SEARCH_POSITION_TRIGGER; // searchPosition = trigger
|
|
93895
94300
|
|
|
93896
94301
|
if (isTriggerPositionSearch) {
|
|
@@ -93898,7 +94303,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
93898
94303
|
} // searchPosition = dropdown and single seleciton
|
|
93899
94304
|
|
|
93900
94305
|
|
|
93901
|
-
if (!multiple || !hasValue) {
|
|
94306
|
+
if (!multiple || !this.hasValue()) {
|
|
93902
94307
|
const renderText = this.foundation.getRenderTextInSingle();
|
|
93903
94308
|
const spanCls = classnames_default()({
|
|
93904
94309
|
["".concat(treeSelect_prefixcls, "-selection-placeholder")]: !renderText
|
|
@@ -94155,14 +94560,23 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94155
94560
|
size,
|
|
94156
94561
|
searchAutoFocus,
|
|
94157
94562
|
placeholder,
|
|
94158
|
-
maxTagCount
|
|
94563
|
+
maxTagCount,
|
|
94564
|
+
checkRelation
|
|
94159
94565
|
} = this.props;
|
|
94160
94566
|
const {
|
|
94161
94567
|
keyEntities,
|
|
94162
94568
|
checkedKeys,
|
|
94163
|
-
inputValue
|
|
94569
|
+
inputValue,
|
|
94570
|
+
realCheckedKeys
|
|
94164
94571
|
} = this.state;
|
|
94165
|
-
|
|
94572
|
+
let keyList = [];
|
|
94573
|
+
|
|
94574
|
+
if (checkRelation === 'related') {
|
|
94575
|
+
keyList = normalizeKeyList(checkedKeys, keyEntities, leafOnly);
|
|
94576
|
+
} else if (checkRelation === 'unRelated') {
|
|
94577
|
+
keyList = [...realCheckedKeys];
|
|
94578
|
+
}
|
|
94579
|
+
|
|
94166
94580
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tagInput_0, {
|
|
94167
94581
|
maxTagCount: maxTagCount,
|
|
94168
94582
|
disabled: disabled,
|
|
@@ -94487,6 +94901,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94487
94901
|
selectedKeys: [],
|
|
94488
94902
|
checkedKeys: new set_default.a(),
|
|
94489
94903
|
halfCheckedKeys: new set_default.a(),
|
|
94904
|
+
realCheckedKeys: new set_default.a([]),
|
|
94490
94905
|
disabledKeys: new set_default.a(),
|
|
94491
94906
|
motionKeys: new set_default.a([]),
|
|
94492
94907
|
motionType: 'hide',
|
|
@@ -94607,12 +95022,16 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94607
95022
|
}
|
|
94608
95023
|
|
|
94609
95024
|
if (checkedKeyValues) {
|
|
94610
|
-
|
|
94611
|
-
|
|
94612
|
-
|
|
94613
|
-
|
|
94614
|
-
|
|
94615
|
-
|
|
95025
|
+
if (props.checkRelation === 'unRelated') {
|
|
95026
|
+
newState.realCheckedKeys = new set_default.a(checkedKeyValues);
|
|
95027
|
+
} else if (props.checkRelation === 'related') {
|
|
95028
|
+
const {
|
|
95029
|
+
checkedKeys,
|
|
95030
|
+
halfCheckedKeys
|
|
95031
|
+
} = calcCheckedKeys(checkedKeyValues, keyEntities);
|
|
95032
|
+
newState.checkedKeys = checkedKeys;
|
|
95033
|
+
newState.halfCheckedKeys = halfCheckedKeys;
|
|
95034
|
+
}
|
|
94616
95035
|
}
|
|
94617
95036
|
} // loadedKeys
|
|
94618
95037
|
|
|
@@ -94627,7 +95046,7 @@ class treeSelect_TreeSelect extends baseComponent_BaseComponent {
|
|
|
94627
95046
|
} // ================ disableStrictly =================
|
|
94628
95047
|
|
|
94629
95048
|
|
|
94630
|
-
if (treeData && props.disableStrictly) {
|
|
95049
|
+
if (treeData && props.disableStrictly && props.checkRelation === 'related') {
|
|
94631
95050
|
newState.disabledKeys = calcDisabledKeys(keyEntities);
|
|
94632
95051
|
}
|
|
94633
95052
|
|
|
@@ -94893,6 +95312,7 @@ treeSelect_TreeSelect.propTypes = {
|
|
|
94893
95312
|
optionListStyle: prop_types_default.a.object,
|
|
94894
95313
|
searchRender: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.bool]),
|
|
94895
95314
|
renderSelectedItem: prop_types_default.a.func,
|
|
95315
|
+
checkRelation: prop_types_default.a.string,
|
|
94896
95316
|
'aria-label': prop_types_default.a.string
|
|
94897
95317
|
};
|
|
94898
95318
|
treeSelect_TreeSelect.defaultProps = {
|
|
@@ -94921,6 +95341,7 @@ treeSelect_TreeSelect.defaultProps = {
|
|
|
94921
95341
|
expandAction: false,
|
|
94922
95342
|
clickToHide: true,
|
|
94923
95343
|
searchAutoFocus: false,
|
|
95344
|
+
checkRelation: 'related',
|
|
94924
95345
|
'aria-label': 'TreeSelect'
|
|
94925
95346
|
};
|
|
94926
95347
|
/* harmony default export */ var treeSelect_0 = (treeSelect_TreeSelect);
|
|
@@ -96492,6 +96913,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96492
96913
|
onPreviewClick,
|
|
96493
96914
|
showPicInfo,
|
|
96494
96915
|
renderPicInfo,
|
|
96916
|
+
renderPicPreviewIcon,
|
|
96495
96917
|
renderThumbnail,
|
|
96496
96918
|
name,
|
|
96497
96919
|
index
|
|
@@ -96499,6 +96921,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96499
96921
|
const showProgress = status === upload_constants_strings.FILE_STATUS_UPLOADING && percent !== 100;
|
|
96500
96922
|
const showRetry = status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL && this.props.showRetry;
|
|
96501
96923
|
const showReplace = status === upload_constants_strings.FILE_STATUS_SUCCESS && this.props.showReplace;
|
|
96924
|
+
const showPreview = status === upload_constants_strings.FILE_STATUS_SUCCESS && !this.props.showReplace;
|
|
96502
96925
|
const filePicCardCls = classnames_default()({
|
|
96503
96926
|
["".concat(fileCard_prefixCls, "-picture-file-card")]: true,
|
|
96504
96927
|
["".concat(fileCard_prefixCls, "-picture-file-card-disabled")]: disabled,
|
|
@@ -96506,7 +96929,6 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96506
96929
|
["".concat(fileCard_prefixCls, "-picture-file-card-error")]: status === upload_constants_strings.FILE_STATUS_UPLOAD_FAIL,
|
|
96507
96930
|
["".concat(fileCard_prefixCls, "-picture-file-card-uploading")]: showProgress
|
|
96508
96931
|
});
|
|
96509
|
-
const closeCls = "".concat(fileCard_prefixCls, "-picture-file-card-close");
|
|
96510
96932
|
const retry = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
96511
96933
|
role: "button",
|
|
96512
96934
|
tabIndex: 0,
|
|
@@ -96529,6 +96951,17 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96529
96951
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ReplaceSvg, {
|
|
96530
96952
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-replace")
|
|
96531
96953
|
})));
|
|
96954
|
+
const preview = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
96955
|
+
className: "".concat(fileCard_prefixCls, "-picture-file-card-preview")
|
|
96956
|
+
}, typeof renderPicPreviewIcon === 'function' ? renderPicPreviewIcon(this.props) : null);
|
|
96957
|
+
const close = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
96958
|
+
role: "button",
|
|
96959
|
+
tabIndex: 0,
|
|
96960
|
+
className: "".concat(fileCard_prefixCls, "-picture-file-card-close"),
|
|
96961
|
+
onClick: e => this.onRemove(e)
|
|
96962
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, {
|
|
96963
|
+
className: "".concat(fileCard_prefixCls, "-picture-file-card-icon-close")
|
|
96964
|
+
}));
|
|
96532
96965
|
const picInfo = typeof renderPicInfo === 'function' ? renderPicInfo(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
96533
96966
|
className: "".concat(fileCard_prefixCls, "-picture-file-card-pic-info")
|
|
96534
96967
|
}, index + 1);
|
|
@@ -96547,14 +96980,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96547
96980
|
size: "small",
|
|
96548
96981
|
orbitStroke: '#FFF',
|
|
96549
96982
|
"aria-label": "uploading file progress"
|
|
96550
|
-
}) : null, showRetry ? retry : null, showReplace && replace, showPicInfo && picInfo, !disabled &&
|
|
96551
|
-
className: closeCls,
|
|
96552
|
-
onClick: e => this.onRemove(e)
|
|
96553
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, {
|
|
96554
|
-
tabIndex: 0,
|
|
96555
|
-
role: "button",
|
|
96556
|
-
size: "extra-small"
|
|
96557
|
-
})), this.renderPicValidateMsg());
|
|
96983
|
+
}) : null, showRetry ? retry : null, showReplace && replace, showPreview && preview, showPicInfo && picInfo, !disabled && close, this.renderPicValidateMsg());
|
|
96558
96984
|
}
|
|
96559
96985
|
|
|
96560
96986
|
renderFile(locale) {
|
|
@@ -96569,7 +96995,8 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96569
96995
|
previewFile,
|
|
96570
96996
|
status,
|
|
96571
96997
|
style,
|
|
96572
|
-
onPreviewClick
|
|
96998
|
+
onPreviewClick,
|
|
96999
|
+
renderFileOperation
|
|
96573
97000
|
} = this.props;
|
|
96574
97001
|
const fileCardCls = classnames_default()({
|
|
96575
97002
|
["".concat(fileCard_prefixCls, "-file-card")]: true,
|
|
@@ -96599,6 +97026,14 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96599
97026
|
previewContent = previewFile(this.props);
|
|
96600
97027
|
}
|
|
96601
97028
|
|
|
97029
|
+
const operation = typeof renderFileOperation === 'function' ? renderFileOperation(this.props) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
97030
|
+
onClick: e => this.onRemove(e),
|
|
97031
|
+
type: "tertiary",
|
|
97032
|
+
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
|
|
97033
|
+
theme: "borderless",
|
|
97034
|
+
size: "small",
|
|
97035
|
+
className: closeCls
|
|
97036
|
+
});
|
|
96602
97037
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
96603
97038
|
role: "listitem",
|
|
96604
97039
|
className: fileCardCls,
|
|
@@ -96619,7 +97054,7 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96619
97054
|
position: "top",
|
|
96620
97055
|
showArrow: false,
|
|
96621
97056
|
content: locale.replace
|
|
96622
|
-
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(
|
|
97057
|
+
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(button_0, {
|
|
96623
97058
|
onClick: e => this.onReplace(e),
|
|
96624
97059
|
type: "tertiary",
|
|
96625
97060
|
theme: "borderless",
|
|
@@ -96641,29 +97076,22 @@ class fileCard_FileCard extends external_root_React_commonjs2_react_commonjs_rea
|
|
|
96641
97076
|
tabIndex: 0,
|
|
96642
97077
|
className: "".concat(infoCls, "-retry"),
|
|
96643
97078
|
onClick: e => this.onRetry(e)
|
|
96644
|
-
}, locale.retry) : null)),
|
|
96645
|
-
onClick: e => this.onRemove(e),
|
|
96646
|
-
type: "tertiary",
|
|
96647
|
-
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClose, null),
|
|
96648
|
-
theme: "borderless",
|
|
96649
|
-
size: "small",
|
|
96650
|
-
className: closeCls
|
|
96651
|
-
}));
|
|
97079
|
+
}, locale.retry) : null)), operation);
|
|
96652
97080
|
}
|
|
96653
97081
|
|
|
96654
97082
|
onRemove(e) {
|
|
96655
97083
|
e.stopPropagation();
|
|
96656
|
-
this.props.onRemove(
|
|
97084
|
+
this.props.onRemove();
|
|
96657
97085
|
}
|
|
96658
97086
|
|
|
96659
97087
|
onReplace(e) {
|
|
96660
97088
|
e.stopPropagation();
|
|
96661
|
-
this.props.onReplace(
|
|
97089
|
+
this.props.onReplace();
|
|
96662
97090
|
}
|
|
96663
97091
|
|
|
96664
97092
|
onRetry(e) {
|
|
96665
97093
|
e.stopPropagation();
|
|
96666
|
-
this.props.onRetry(
|
|
97094
|
+
this.props.onRetry();
|
|
96667
97095
|
}
|
|
96668
97096
|
|
|
96669
97097
|
render() {
|
|
@@ -96727,6 +97155,7 @@ var upload = __webpack_require__("/t7F");
|
|
|
96727
97155
|
|
|
96728
97156
|
|
|
96729
97157
|
|
|
97158
|
+
|
|
96730
97159
|
/* eslint-disable max-len */
|
|
96731
97160
|
|
|
96732
97161
|
|
|
@@ -96837,14 +97266,14 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
96837
97266
|
previewFile,
|
|
96838
97267
|
listType,
|
|
96839
97268
|
itemStyle,
|
|
96840
|
-
showRetry,
|
|
96841
97269
|
showPicInfo,
|
|
96842
97270
|
renderPicInfo,
|
|
97271
|
+
renderPicPreviewIcon,
|
|
97272
|
+
renderFileOperation,
|
|
96843
97273
|
renderFileItem,
|
|
96844
97274
|
renderThumbnail,
|
|
96845
97275
|
disabled,
|
|
96846
|
-
onPreviewClick
|
|
96847
|
-
showReplace
|
|
97276
|
+
onPreviewClick
|
|
96848
97277
|
} = this.props;
|
|
96849
97278
|
|
|
96850
97279
|
const onRemove = () => this.remove(file);
|
|
@@ -96857,20 +97286,20 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
96857
97286
|
this.replace(index);
|
|
96858
97287
|
};
|
|
96859
97288
|
|
|
96860
|
-
const fileCardProps = assign_default()(assign_default()({}, file), {
|
|
97289
|
+
const fileCardProps = assign_default()(assign_default()(assign_default()({}, pick_default()(this.props, ['showRetry', 'showReplace', ''])), file), {
|
|
96861
97290
|
previewFile,
|
|
96862
97291
|
listType,
|
|
96863
97292
|
onRemove,
|
|
96864
97293
|
onRetry,
|
|
96865
97294
|
index,
|
|
96866
97295
|
key: uid || concat_default()(_context = "".concat(name)).call(_context, index),
|
|
96867
|
-
showRetry: typeof file.showRetry !== 'undefined' ? file.showRetry : showRetry,
|
|
96868
97296
|
style: itemStyle,
|
|
96869
97297
|
disabled,
|
|
96870
97298
|
showPicInfo,
|
|
96871
97299
|
renderPicInfo,
|
|
97300
|
+
renderPicPreviewIcon,
|
|
97301
|
+
renderFileOperation,
|
|
96872
97302
|
renderThumbnail,
|
|
96873
|
-
showReplace: typeof file.showReplace !== 'undefined' ? file.showReplace : showReplace,
|
|
96874
97303
|
onReplace,
|
|
96875
97304
|
onPreviewClick: typeof onPreviewClick !== 'undefined' ? () => this.foundation.handlePreviewClick(file) : undefined
|
|
96876
97305
|
});
|
|
@@ -96912,7 +97341,8 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
96912
97341
|
limit,
|
|
96913
97342
|
disabled,
|
|
96914
97343
|
children,
|
|
96915
|
-
draggable
|
|
97344
|
+
draggable,
|
|
97345
|
+
hotSpotLocation
|
|
96916
97346
|
} = this.props;
|
|
96917
97347
|
const {
|
|
96918
97348
|
fileList: stateFileList,
|
|
@@ -96970,7 +97400,7 @@ class upload_Upload extends baseComponent_BaseComponent {
|
|
|
96970
97400
|
className: mainCls,
|
|
96971
97401
|
role: "list",
|
|
96972
97402
|
"aria-label": "picture list"
|
|
96973
|
-
}, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList ? addContent : null)));
|
|
97403
|
+
}, showAddTriggerInList && hotSpotLocation === 'start' ? addContent : null, map_default()(fileList).call(fileList, (file, index) => this.renderFile(file, index, locale)), showAddTriggerInList && hotSpotLocation === 'end' ? addContent : null)));
|
|
96974
97404
|
};
|
|
96975
97405
|
|
|
96976
97406
|
this.renderFileListDefault = () => {
|
|
@@ -97310,6 +97740,7 @@ upload_Upload.propTypes = {
|
|
|
97310
97740
|
fileList: prop_types_default.a.array,
|
|
97311
97741
|
fileName: prop_types_default.a.string,
|
|
97312
97742
|
headers: prop_types_default.a.oneOfType([prop_types_default.a.object, prop_types_default.a.func]),
|
|
97743
|
+
hotSpotLocation: prop_types_default.a.oneOf(['start', 'end']),
|
|
97313
97744
|
itemStyle: prop_types_default.a.object,
|
|
97314
97745
|
limit: prop_types_default.a.number,
|
|
97315
97746
|
listType: prop_types_default.a.oneOf(upload_constants_strings.LIST_TYPE),
|
|
@@ -97335,6 +97766,8 @@ upload_Upload.propTypes = {
|
|
|
97335
97766
|
prompt: prop_types_default.a.node,
|
|
97336
97767
|
promptPosition: prop_types_default.a.oneOf(upload_constants_strings.PROMPT_POSITION),
|
|
97337
97768
|
renderFileItem: prop_types_default.a.func,
|
|
97769
|
+
renderPicPreviewIcon: prop_types_default.a.func,
|
|
97770
|
+
renderFileOperation: prop_types_default.a.func,
|
|
97338
97771
|
renderPicInfo: prop_types_default.a.func,
|
|
97339
97772
|
renderThumbnail: prop_types_default.a.func,
|
|
97340
97773
|
showClear: prop_types_default.a.bool,
|
|
@@ -97354,6 +97787,7 @@ upload_Upload.defaultProps = {
|
|
|
97354
97787
|
defaultFileList: [],
|
|
97355
97788
|
disabled: false,
|
|
97356
97789
|
listType: 'list',
|
|
97790
|
+
hotSpotLocation: 'end',
|
|
97357
97791
|
multiple: false,
|
|
97358
97792
|
onAcceptInvalid: noop_default.a,
|
|
97359
97793
|
onChange: noop_default.a,
|
|
@@ -100956,7 +101390,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
100956
101390
|
} // update formState value
|
|
100957
101391
|
|
|
100958
101392
|
|
|
100959
|
-
updateStateValue(field, value, opts) {
|
|
101393
|
+
updateStateValue(field, value, opts, callback) {
|
|
100960
101394
|
const notNotify = opts && opts.notNotify;
|
|
100961
101395
|
const notUpdate = opts && opts.notUpdate;
|
|
100962
101396
|
const fieldAllowEmpty = opts && opts.fieldAllowEmpty;
|
|
@@ -100988,7 +101422,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
100988
101422
|
}
|
|
100989
101423
|
|
|
100990
101424
|
if (!notUpdate) {
|
|
100991
|
-
this._adapter.forceUpdate();
|
|
101425
|
+
this._adapter.forceUpdate(callback);
|
|
100992
101426
|
}
|
|
100993
101427
|
} // get touched from formState
|
|
100994
101428
|
|
|
@@ -101002,7 +101436,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101002
101436
|
} // update formState touched
|
|
101003
101437
|
|
|
101004
101438
|
|
|
101005
|
-
updateStateTouched(field, isTouched, opts) {
|
|
101439
|
+
updateStateTouched(field, isTouched, opts, callback) {
|
|
101006
101440
|
const notNotify = opts && opts.notNotify;
|
|
101007
101441
|
const notUpdate = opts && opts.notUpdate;
|
|
101008
101442
|
object_set(this.data.touched, field, isTouched);
|
|
@@ -101012,7 +101446,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101012
101446
|
}
|
|
101013
101447
|
|
|
101014
101448
|
if (!notUpdate) {
|
|
101015
|
-
this._adapter.forceUpdate();
|
|
101449
|
+
this._adapter.forceUpdate(callback);
|
|
101016
101450
|
}
|
|
101017
101451
|
} // get error from formState
|
|
101018
101452
|
|
|
@@ -101026,7 +101460,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101026
101460
|
} // update formState error
|
|
101027
101461
|
|
|
101028
101462
|
|
|
101029
|
-
updateStateError(field, error, opts) {
|
|
101463
|
+
updateStateError(field, error, opts, callback) {
|
|
101030
101464
|
const notNotify = opts && opts.notNotify;
|
|
101031
101465
|
const notUpdate = opts && opts.notUpdate;
|
|
101032
101466
|
object_set(this.data.errors, field, error); // The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
|
|
@@ -101037,7 +101471,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101037
101471
|
}
|
|
101038
101472
|
|
|
101039
101473
|
if (!notUpdate) {
|
|
101040
|
-
this._adapter.forceUpdate();
|
|
101474
|
+
this._adapter.forceUpdate(callback);
|
|
101041
101475
|
}
|
|
101042
101476
|
} // For internal use in the FormApi Operating Field
|
|
101043
101477
|
|
|
@@ -101056,22 +101490,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101056
101490
|
// At this time, first modify formState directly, then find out the subordinate fields and drive them to update
|
|
101057
101491
|
// Eg: peoples: [0, 2, 3]. Each value of the peoples array corresponds to an Input Field
|
|
101058
101492
|
// When the user directly calls formA pi.set Value ('peoples', [2,3])
|
|
101059
|
-
this.updateStateValue(field, newValue, opts)
|
|
101060
|
-
|
|
101061
|
-
|
|
101062
|
-
|
|
101063
|
-
|
|
101064
|
-
|
|
101065
|
-
|
|
101066
|
-
|
|
101067
|
-
|
|
101068
|
-
|
|
101069
|
-
|
|
101070
|
-
|
|
101071
|
-
|
|
101072
|
-
}
|
|
101073
|
-
} // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
|
|
101074
|
-
|
|
101493
|
+
this.updateStateValue(field, newValue, opts, () => {
|
|
101494
|
+
let nestedFields = this._getNestedField(field);
|
|
101495
|
+
|
|
101496
|
+
if (nestedFields.size) {
|
|
101497
|
+
for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
|
|
101498
|
+
let fieldPath = fieldStaff.field;
|
|
101499
|
+
let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
|
|
101500
|
+
let nestedBatchUpdateOpts = {
|
|
101501
|
+
notNotify: true,
|
|
101502
|
+
notUpdate: true
|
|
101503
|
+
};
|
|
101504
|
+
fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
|
|
101505
|
+
});
|
|
101506
|
+
}
|
|
101507
|
+
}); // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
|
|
101075
101508
|
|
|
101076
101509
|
if (this.getArrayField(field)) {
|
|
101077
101510
|
this.updateArrayField(field, {
|
|
@@ -101089,21 +101522,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101089
101522
|
if (fieldApi) {
|
|
101090
101523
|
fieldApi.setError(newError, opts);
|
|
101091
101524
|
} else {
|
|
101092
|
-
this.updateStateError(field, newError, opts)
|
|
101093
|
-
|
|
101094
|
-
|
|
101095
|
-
|
|
101096
|
-
|
|
101097
|
-
|
|
101098
|
-
|
|
101099
|
-
|
|
101100
|
-
|
|
101101
|
-
|
|
101102
|
-
|
|
101103
|
-
|
|
101104
|
-
|
|
101105
|
-
}
|
|
101106
|
-
}
|
|
101525
|
+
this.updateStateError(field, newError, opts, () => {
|
|
101526
|
+
let nestedFields = this._getNestedField(field);
|
|
101527
|
+
|
|
101528
|
+
if (nestedFields.size) {
|
|
101529
|
+
for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
|
|
101530
|
+
let fieldPath = fieldStaff.field;
|
|
101531
|
+
let newFieldError = object_get(this.data.errors, fieldPath);
|
|
101532
|
+
let nestedBatchUpdateOpts = {
|
|
101533
|
+
notNotify: true,
|
|
101534
|
+
notUpdate: true
|
|
101535
|
+
};
|
|
101536
|
+
fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
|
|
101537
|
+
});
|
|
101538
|
+
}
|
|
101539
|
+
});
|
|
101107
101540
|
|
|
101108
101541
|
if (this.getArrayField(field)) {
|
|
101109
101542
|
this.updateArrayField(field, {
|
|
@@ -101119,21 +101552,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101119
101552
|
if (fieldApi) {
|
|
101120
101553
|
fieldApi.setTouched(isTouched, opts);
|
|
101121
101554
|
} else {
|
|
101122
|
-
this.updateStateTouched(field, isTouched, opts)
|
|
101123
|
-
|
|
101124
|
-
|
|
101125
|
-
|
|
101126
|
-
|
|
101127
|
-
|
|
101128
|
-
|
|
101129
|
-
|
|
101130
|
-
|
|
101131
|
-
|
|
101132
|
-
|
|
101133
|
-
|
|
101134
|
-
|
|
101135
|
-
}
|
|
101136
|
-
}
|
|
101555
|
+
this.updateStateTouched(field, isTouched, opts, () => {
|
|
101556
|
+
let nestedFields = this._getNestedField(field);
|
|
101557
|
+
|
|
101558
|
+
if (nestedFields.size) {
|
|
101559
|
+
for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
|
|
101560
|
+
let fieldPath = fieldStaff.field;
|
|
101561
|
+
let newFieldTouch = object_get(this.data.touched, fieldPath);
|
|
101562
|
+
let nestedBatchUpdateOpts = {
|
|
101563
|
+
notNotify: true,
|
|
101564
|
+
notUpdate: true
|
|
101565
|
+
};
|
|
101566
|
+
fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
|
|
101567
|
+
});
|
|
101568
|
+
}
|
|
101569
|
+
});
|
|
101137
101570
|
|
|
101138
101571
|
if (this.getArrayField(field)) {
|
|
101139
101572
|
this.updateArrayField(field, {
|
|
@@ -102289,7 +102722,7 @@ function withField(Component, opts) {
|
|
|
102289
102722
|
text: label || field,
|
|
102290
102723
|
id: labelId,
|
|
102291
102724
|
required: required,
|
|
102292
|
-
name: name || field,
|
|
102725
|
+
name: a11yId || name || field,
|
|
102293
102726
|
width: mergeLabelWidth,
|
|
102294
102727
|
align: mergeLabelAlign
|
|
102295
102728
|
}, needSpread));
|
|
@@ -102491,8 +102924,8 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
102491
102924
|
notifySubmitFail: (errors, values) => {
|
|
102492
102925
|
this.props.onSubmitFail(errors, values);
|
|
102493
102926
|
},
|
|
102494
|
-
forceUpdate:
|
|
102495
|
-
this.forceUpdate();
|
|
102927
|
+
forceUpdate: callback => {
|
|
102928
|
+
this.forceUpdate(callback);
|
|
102496
102929
|
},
|
|
102497
102930
|
notifyChange: formState => {
|
|
102498
102931
|
this.props.onChange(formState);
|