@douyinfe/semi-ui 2.5.0 → 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/index.tsx +21 -3
- package/cascader/item.tsx +25 -5
- package/datePicker/dateInput.tsx +8 -5
- package/datePicker/datePicker.tsx +6 -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 +21 -8
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +232 -92
- 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/calendar/monthCalendar.js +21 -5
- package/lib/cjs/cascader/index.d.ts +9 -2
- package/lib/cjs/cascader/index.js +14 -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 +15 -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/form/baseForm.js +2 -2
- 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/es/_base/base.css +5 -5
- package/lib/es/calendar/monthCalendar.js +22 -5
- package/lib/es/cascader/index.d.ts +9 -2
- package/lib/es/cascader/index.js +14 -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 +15 -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/form/baseForm.js +2 -2
- 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/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/table/_story/Perf/Virtualized/index.jsx +6 -0
- package/table/_story/v2/FixedHeaderMerge/index.jsx +1 -1
- package/table/_story/v2/defaultFilteredValue.tsx +0 -9
package/dist/umd/semi-ui.js
CHANGED
|
@@ -41517,6 +41517,8 @@ weekCalendar_WeekCalendar.contextType = locale_context;
|
|
|
41517
41517
|
|
|
41518
41518
|
|
|
41519
41519
|
|
|
41520
|
+
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
|
|
41521
|
+
|
|
41520
41522
|
|
|
41521
41523
|
|
|
41522
41524
|
|
|
@@ -41572,11 +41574,13 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41572
41574
|
} = this.props;
|
|
41573
41575
|
this.monthlyData = this.foundation.getMonthlyData(displayValue, dateFnsLocale);
|
|
41574
41576
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41575
|
-
className: "".concat(monthCalendar_prefixCls, "-header")
|
|
41577
|
+
className: "".concat(monthCalendar_prefixCls, "-header"),
|
|
41578
|
+
role: "presentation"
|
|
41576
41579
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41577
|
-
role: "
|
|
41580
|
+
role: "presentation",
|
|
41578
41581
|
className: "".concat(monthCalendar_prefixCls, "-grid")
|
|
41579
41582
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41583
|
+
role: "row",
|
|
41580
41584
|
className: "".concat(monthCalendar_prefixCls, "-grid-row")
|
|
41581
41585
|
}, map_default()(_context = this.monthlyData[0]).call(_context, day => {
|
|
41582
41586
|
const {
|
|
@@ -41586,6 +41590,8 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41586
41590
|
["".concat(calendar_constants_cssClasses.PREFIX, "-weekend")]: markWeekend && day.isWeekend
|
|
41587
41591
|
});
|
|
41588
41592
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
41593
|
+
role: "columnheader",
|
|
41594
|
+
"aria-label": weekday,
|
|
41589
41595
|
key: "".concat(weekday, "-monthheader"),
|
|
41590
41596
|
className: listCls
|
|
41591
41597
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, weekday));
|
|
@@ -41668,7 +41674,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41668
41674
|
const pos = showCard && showCard[key] ? showCard[key][1] : 'leftTopOver';
|
|
41669
41675
|
const text = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
41670
41676
|
componentName: "Calendar"
|
|
41671
|
-
}, 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", {
|
|
41672
41681
|
className: "".concat(cardCls, "-wrapper"),
|
|
41673
41682
|
style: {
|
|
41674
41683
|
bottom: 0
|
|
@@ -41736,11 +41745,12 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41736
41745
|
day
|
|
41737
41746
|
} = events;
|
|
41738
41747
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41739
|
-
role: "
|
|
41748
|
+
role: "presentation",
|
|
41740
41749
|
className: "".concat(monthCalendar_prefixCls, "-weekrow"),
|
|
41741
41750
|
ref: _this.cellDom,
|
|
41742
41751
|
key: "".concat(index, "-weekrow")
|
|
41743
41752
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41753
|
+
role: "row",
|
|
41744
41754
|
className: "".concat(monthCalendar_prefixCls, "-skeleton")
|
|
41745
41755
|
}, map_default()(weekDay).call(weekDay, each => {
|
|
41746
41756
|
const {
|
|
@@ -41759,6 +41769,9 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41759
41769
|
});
|
|
41760
41770
|
const shouldRenderCollapsed = Boolean(day && day[ind] && day[ind].length > itemLimit);
|
|
41761
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,
|
|
41762
41775
|
key: "".concat(date, "-weeksk"),
|
|
41763
41776
|
className: listCls,
|
|
41764
41777
|
onClick: e => _this.handleClick(e, [date])
|
|
@@ -41781,9 +41794,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41781
41794
|
parsedEvents
|
|
41782
41795
|
} = this.state;
|
|
41783
41796
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41784
|
-
role: "
|
|
41797
|
+
role: "presentation",
|
|
41785
41798
|
className: "".concat(monthCalendar_prefixCls, "-week")
|
|
41786
41799
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
41800
|
+
role: "presentation",
|
|
41787
41801
|
className: "".concat(monthCalendar_prefixCls, "-grid-col")
|
|
41788
41802
|
}, map_default()(_context3 = keys_default()(this.monthlyData)).call(_context3, weekInd => this.renderWeekRow(weekInd, this.monthlyData[weekInd], parsedEvents[weekInd]))));
|
|
41789
41803
|
};
|
|
@@ -41914,12 +41928,15 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
|
|
|
41914
41928
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
|
|
41915
41929
|
componentName: "Calendar"
|
|
41916
41930
|
}, (locale, localeCode, dateFnsLocale) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41931
|
+
role: "grid",
|
|
41917
41932
|
className: monthCls,
|
|
41918
41933
|
key: this.state.itemLimit,
|
|
41919
41934
|
style: monthStyle
|
|
41920
41935
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41936
|
+
role: "presentation",
|
|
41921
41937
|
className: "".concat(monthCalendar_prefixCls, "-sticky-top")
|
|
41922
41938
|
}, header, this.renderHeader(dateFnsLocale)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
41939
|
+
role: "presentation",
|
|
41923
41940
|
className: "".concat(monthCalendar_prefixCls, "-grid-wrapper")
|
|
41924
41941
|
}, this.renderMonthGrid())));
|
|
41925
41942
|
}
|
|
@@ -43912,6 +43929,7 @@ function calcMergeType(autoMergeValue, leafOnly) {
|
|
|
43912
43929
|
|
|
43913
43930
|
|
|
43914
43931
|
|
|
43932
|
+
|
|
43915
43933
|
|
|
43916
43934
|
|
|
43917
43935
|
// eslint-disable-next-line max-len
|
|
@@ -44421,6 +44439,16 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44421
44439
|
this.close(e);
|
|
44422
44440
|
}
|
|
44423
44441
|
}
|
|
44442
|
+
/**
|
|
44443
|
+
* A11y: simulate selection click
|
|
44444
|
+
*/
|
|
44445
|
+
|
|
44446
|
+
|
|
44447
|
+
handleSelectionEnterPress(keyboardEvent) {
|
|
44448
|
+
if (utils_isEnterPress(keyboardEvent)) {
|
|
44449
|
+
this.handleClick(keyboardEvent);
|
|
44450
|
+
}
|
|
44451
|
+
}
|
|
44424
44452
|
|
|
44425
44453
|
toggleHoverState(bool) {
|
|
44426
44454
|
this._adapter.toggleHovering(bool);
|
|
@@ -44852,6 +44880,16 @@ class foundation_CascaderFoundation extends foundation {
|
|
|
44852
44880
|
|
|
44853
44881
|
this._adapter.rePositionDropdown();
|
|
44854
44882
|
}
|
|
44883
|
+
/**
|
|
44884
|
+
* A11y: simulate clear button click
|
|
44885
|
+
*/
|
|
44886
|
+
|
|
44887
|
+
|
|
44888
|
+
handleClearEnterPress(keyboardEvent) {
|
|
44889
|
+
if (utils_isEnterPress(keyboardEvent)) {
|
|
44890
|
+
this.handleClear();
|
|
44891
|
+
}
|
|
44892
|
+
}
|
|
44855
44893
|
|
|
44856
44894
|
getRenderData() {
|
|
44857
44895
|
var _context9, _context10;
|
|
@@ -45686,6 +45724,8 @@ checkbox_CheckboxWithGroup.Group = checkboxGroup;
|
|
|
45686
45724
|
|
|
45687
45725
|
|
|
45688
45726
|
|
|
45727
|
+
|
|
45728
|
+
|
|
45689
45729
|
const item_prefixcls = cascader_constants_cssClasses.PREFIX_OPTION;
|
|
45690
45730
|
class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
|
|
45691
45731
|
constructor() {
|
|
@@ -45702,6 +45742,16 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45702
45742
|
|
|
45703
45743
|
onItemClick(e, item);
|
|
45704
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
|
+
};
|
|
45705
45755
|
|
|
45706
45756
|
this.onHover = (e, item) => {
|
|
45707
45757
|
const {
|
|
@@ -45781,6 +45831,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45781
45831
|
|
|
45782
45832
|
case 'empty':
|
|
45783
45833
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45834
|
+
"aria-hidden": true,
|
|
45784
45835
|
className: concat_default()(_context3 = "".concat(item_prefixcls, "-icon ")).call(_context3, item_prefixcls, "-icon-empty")
|
|
45785
45836
|
});
|
|
45786
45837
|
|
|
@@ -45844,11 +45895,13 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45844
45895
|
["".concat(item_prefixcls, "-disabled")]: disabled
|
|
45845
45896
|
});
|
|
45846
45897
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
|
|
45898
|
+
role: 'menuitem',
|
|
45847
45899
|
className: className,
|
|
45848
45900
|
key: key,
|
|
45849
45901
|
onClick: e => {
|
|
45850
45902
|
this.onClick(e, item);
|
|
45851
|
-
}
|
|
45903
|
+
},
|
|
45904
|
+
onKeyPress: e => this.handleItemEnterPress(e, item)
|
|
45852
45905
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
|
|
45853
45906
|
className: "".concat(item_prefixcls, "-label")
|
|
45854
45907
|
}, !multiple && this.renderIcon('empty'), multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_0, {
|
|
@@ -45873,13 +45926,15 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45873
45926
|
let showChildItem;
|
|
45874
45927
|
const ind = content.length;
|
|
45875
45928
|
content.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
|
|
45929
|
+
role: 'menu',
|
|
45876
45930
|
className: "".concat(item_prefixcls, "-list"),
|
|
45877
45931
|
key: renderData[0].key,
|
|
45878
45932
|
onScroll: e => this.props.onListScroll(e, ind)
|
|
45879
45933
|
}, map_default()(renderData).call(renderData, item => {
|
|
45880
45934
|
const {
|
|
45881
45935
|
data,
|
|
45882
|
-
key
|
|
45936
|
+
key,
|
|
45937
|
+
parentKey
|
|
45883
45938
|
} = item;
|
|
45884
45939
|
const {
|
|
45885
45940
|
children,
|
|
@@ -45904,16 +45959,26 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
|
|
|
45904
45959
|
["".concat(item_prefixcls, "-select")]: selected && !multiple,
|
|
45905
45960
|
["".concat(item_prefixcls, "-disabled")]: disabled
|
|
45906
45961
|
});
|
|
45907
|
-
|
|
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, {
|
|
45908
45972
|
className: className,
|
|
45909
45973
|
key: key,
|
|
45910
45974
|
onClick: e => {
|
|
45911
45975
|
this.onClick(e, item);
|
|
45912
45976
|
},
|
|
45977
|
+
onKeyPress: e => this.handleItemEnterPress(e, item),
|
|
45913
45978
|
onMouseEnter: e => {
|
|
45914
45979
|
this.onHover(e, item);
|
|
45915
45980
|
}
|
|
45916
|
-
}, /*#__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", {
|
|
45917
45982
|
className: "".concat(item_prefixcls, "-label")
|
|
45918
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, {
|
|
45919
45984
|
onChange: e => this.onCheckboxChange(e, item),
|
|
@@ -47237,6 +47302,15 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47237
47302
|
e && e.stopPropagation();
|
|
47238
47303
|
this.foundation.handleClear();
|
|
47239
47304
|
};
|
|
47305
|
+
/**
|
|
47306
|
+
* A11y: simulate clear button click
|
|
47307
|
+
*/
|
|
47308
|
+
|
|
47309
|
+
|
|
47310
|
+
this.handleClearEnterPress = e => {
|
|
47311
|
+
e && e.stopPropagation();
|
|
47312
|
+
this.foundation.handleClearEnterPress();
|
|
47313
|
+
};
|
|
47240
47314
|
|
|
47241
47315
|
this.showClearBtn = () => {
|
|
47242
47316
|
const {
|
|
@@ -47263,6 +47337,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47263
47337
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
47264
47338
|
className: clearCls,
|
|
47265
47339
|
onClick: this.handleClear,
|
|
47340
|
+
onKeyPress: this.handleClearEnterPress,
|
|
47266
47341
|
role: 'button',
|
|
47267
47342
|
tabIndex: 0
|
|
47268
47343
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, null));
|
|
@@ -47352,6 +47427,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
|
|
|
47352
47427
|
style: style,
|
|
47353
47428
|
ref: this.triggerRef,
|
|
47354
47429
|
onClick: e => this.foundation.handleClick(e),
|
|
47430
|
+
onKeyPress: e => this.foundation.handleSelectionEnterPress(e),
|
|
47355
47431
|
"aria-invalid": this.props['aria-invalid'],
|
|
47356
47432
|
"aria-errormessage": this.props['aria-errormessage'],
|
|
47357
47433
|
"aria-label": this.props['aria-label'],
|
|
@@ -47794,6 +47870,7 @@ cascader_Cascader.propTypes = {
|
|
|
47794
47870
|
'aria-errormessage': prop_types_default.a.string,
|
|
47795
47871
|
'aria-describedby': prop_types_default.a.string,
|
|
47796
47872
|
'aria-required': prop_types_default.a.bool,
|
|
47873
|
+
'aria-label': prop_types_default.a.string,
|
|
47797
47874
|
arrowIcon: prop_types_default.a.node,
|
|
47798
47875
|
changeOnSelect: prop_types_default.a.bool,
|
|
47799
47876
|
defaultValue: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
|
|
@@ -47888,7 +47965,8 @@ cascader_Cascader.defaultProps = {
|
|
|
47888
47965
|
onClear: noop_default.a,
|
|
47889
47966
|
onDropdownVisibleChange: noop_default.a,
|
|
47890
47967
|
onListScroll: noop_default.a,
|
|
47891
|
-
enableLeafClick: false
|
|
47968
|
+
enableLeafClick: false,
|
|
47969
|
+
'aria-label': 'Cascader'
|
|
47892
47970
|
};
|
|
47893
47971
|
/* harmony default export */ var cascader_0 = (cascader_Cascader);
|
|
47894
47972
|
// CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
|
|
@@ -54108,6 +54186,8 @@ var dateInput_rest = undefined && undefined.__rest || function (s, e) {
|
|
|
54108
54186
|
}
|
|
54109
54187
|
return t;
|
|
54110
54188
|
};
|
|
54189
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/interactive-supports-focus */
|
|
54190
|
+
|
|
54111
54191
|
/* eslint-disable max-lines-per-function */
|
|
54112
54192
|
|
|
54113
54193
|
/* eslint-disable no-unused-vars */
|
|
@@ -54263,9 +54343,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54263
54343
|
} = this.props;
|
|
54264
54344
|
const allowClear = (rangeStart || rangeEnd) && showClear;
|
|
54265
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",
|
|
54266
54349
|
className: "".concat(prefixCls, "-range-input-clearbtn"),
|
|
54267
54350
|
onMouseDown: e => !disabled && this.handleRangeInputClear(e)
|
|
54268
|
-
}, /*#__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;
|
|
54269
54354
|
}
|
|
54270
54355
|
|
|
54271
54356
|
renderRangeSuffix(suffix) {
|
|
@@ -54366,6 +54451,8 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54366
54451
|
validateStatus,
|
|
54367
54452
|
block,
|
|
54368
54453
|
prefixCls,
|
|
54454
|
+
multiple,
|
|
54455
|
+
// Whether to allow multiple values for email and file types
|
|
54369
54456
|
dateFnsLocale,
|
|
54370
54457
|
// No need to pass to input
|
|
54371
54458
|
onBlur,
|
|
@@ -54383,10 +54470,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
|
|
|
54383
54470
|
rangeInputFocus,
|
|
54384
54471
|
rangeSeparator
|
|
54385
54472
|
} = _a,
|
|
54386
|
-
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"]);
|
|
54387
54474
|
|
|
54388
|
-
const dateIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar,
|
|
54389
|
-
|
|
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
|
+
});
|
|
54390
54481
|
const suffix = includes_default()(type).call(type, 'Time') ? dateTimeIcon : dateIcon;
|
|
54391
54482
|
let text = '';
|
|
54392
54483
|
|
|
@@ -54441,7 +54532,6 @@ dateInput_DateInput.propTypes = {
|
|
|
54441
54532
|
value: prop_types_default.a.array,
|
|
54442
54533
|
disabled: prop_types_default.a.bool,
|
|
54443
54534
|
type: prop_types_default.a.oneOf(datePicker_constants_strings.TYPE_SET),
|
|
54444
|
-
multiple: prop_types_default.a.bool,
|
|
54445
54535
|
showClear: prop_types_default.a.bool,
|
|
54446
54536
|
format: prop_types_default.a.string,
|
|
54447
54537
|
inputStyle: prop_types_default.a.object,
|
|
@@ -54465,7 +54555,6 @@ dateInput_DateInput.defaultProps = {
|
|
|
54465
54555
|
onBlur: function_noop,
|
|
54466
54556
|
onClear: function_noop,
|
|
54467
54557
|
onFocus: function_noop,
|
|
54468
|
-
multiple: false,
|
|
54469
54558
|
type: 'date',
|
|
54470
54559
|
inputStyle: {},
|
|
54471
54560
|
inputReadOnly: false,
|
|
@@ -56120,7 +56209,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56120
56209
|
ref: ref
|
|
56121
56210
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56122
56211
|
key: "double-chevron-left",
|
|
56212
|
+
"aria-label": "Previous year",
|
|
56123
56213
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
|
|
56214
|
+
"aria-hidden": true,
|
|
56124
56215
|
size: iconBtnSize
|
|
56125
56216
|
}),
|
|
56126
56217
|
size: buttonSize,
|
|
@@ -56130,7 +56221,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56130
56221
|
style: leftButtonStyle
|
|
56131
56222
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56132
56223
|
key: "chevron-left",
|
|
56224
|
+
"aria-label": "Previous month",
|
|
56133
56225
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
56226
|
+
"aria-hidden": true,
|
|
56134
56227
|
size: iconBtnSize
|
|
56135
56228
|
}),
|
|
56136
56229
|
size: buttonSize,
|
|
@@ -56146,7 +56239,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56146
56239
|
size: buttonSize
|
|
56147
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, {
|
|
56148
56241
|
key: "chevron-right",
|
|
56242
|
+
"aria-label": "Next month",
|
|
56149
56243
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
|
|
56244
|
+
"aria-hidden": true,
|
|
56150
56245
|
size: iconBtnSize
|
|
56151
56246
|
}),
|
|
56152
56247
|
size: buttonSize,
|
|
@@ -56156,7 +56251,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
|
|
|
56156
56251
|
style: rightButtonStyle
|
|
56157
56252
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
56158
56253
|
key: "double-chevron-right",
|
|
56254
|
+
"aria-label": "Next year",
|
|
56159
56255
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
|
|
56256
|
+
"aria-hidden": true,
|
|
56160
56257
|
size: iconBtnSize
|
|
56161
56258
|
}),
|
|
56162
56259
|
size: buttonSize,
|
|
@@ -56426,6 +56523,8 @@ function isBetween(day, _ref) {
|
|
|
56426
56523
|
|
|
56427
56524
|
|
|
56428
56525
|
|
|
56526
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
|
|
56527
|
+
|
|
56429
56528
|
/* eslint-disable max-len */
|
|
56430
56529
|
|
|
56431
56530
|
|
|
@@ -56748,8 +56847,10 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56748
56847
|
const weekdaysText = map_default()(weekdays).call(weekdays, key => locale.weeks[key]);
|
|
56749
56848
|
|
|
56750
56849
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56850
|
+
role: "row",
|
|
56751
56851
|
className: weekdayCls
|
|
56752
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",
|
|
56753
56854
|
key: E + i,
|
|
56754
56855
|
className: weekdayItemCls
|
|
56755
56856
|
}, E)));
|
|
@@ -56784,6 +56885,7 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56784
56885
|
renderWeek(week, weekIndex) {
|
|
56785
56886
|
const weekCls = datePicker_constants_cssClasses.WEEK;
|
|
56786
56887
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56888
|
+
role: "row",
|
|
56787
56889
|
className: weekCls,
|
|
56788
56890
|
key: weekIndex
|
|
56789
56891
|
}, map_default()(week).call(week, (day, dayIndex) => this.renderDay(day, dayIndex)));
|
|
@@ -56804,6 +56906,8 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56804
56906
|
|
|
56805
56907
|
if (!fullDate) {
|
|
56806
56908
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56909
|
+
role: "gridcell",
|
|
56910
|
+
tabIndex: -1,
|
|
56807
56911
|
key: dayNumber + dayIndex,
|
|
56808
56912
|
className: datePicker_constants_cssClasses.DAY
|
|
56809
56913
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null));
|
|
@@ -56841,6 +56945,11 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56841
56945
|
const customRender = isFunction_default()(renderFullDate);
|
|
56842
56946
|
|
|
56843
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,
|
|
56844
56953
|
className: !customRender ? dayCls : datePicker_constants_cssClasses.DAY,
|
|
56845
56954
|
title: fullDate,
|
|
56846
56955
|
key: dayNumber + dayIndex,
|
|
@@ -56854,13 +56963,16 @@ class month_Month extends baseComponent_BaseComponent {
|
|
|
56854
56963
|
|
|
56855
56964
|
render() {
|
|
56856
56965
|
const {
|
|
56857
|
-
forwardRef
|
|
56966
|
+
forwardRef,
|
|
56967
|
+
multiple
|
|
56858
56968
|
} = this.props;
|
|
56859
56969
|
const weekday = this.renderDayOfWeek();
|
|
56860
56970
|
const weeks = this.renderWeeks();
|
|
56861
56971
|
const monthCls = classnames_default()(datePicker_constants_cssClasses.MONTH);
|
|
56862
56972
|
const ref = forwardRef || this.monthRef;
|
|
56863
56973
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
|
|
56974
|
+
role: "grid",
|
|
56975
|
+
"aria-multiselectable": multiple,
|
|
56864
56976
|
ref: ref,
|
|
56865
56977
|
className: monthCls
|
|
56866
56978
|
}, weekday, weeks);
|
|
@@ -56886,7 +56998,8 @@ month_Month.propTypes = {
|
|
|
56886
56998
|
startDateOffset: prop_types_default.a.func,
|
|
56887
56999
|
endDateOffset: prop_types_default.a.func,
|
|
56888
57000
|
rangeInputFocus: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]),
|
|
56889
|
-
focusRecordsRef: prop_types_default.a.object
|
|
57001
|
+
focusRecordsRef: prop_types_default.a.object,
|
|
57002
|
+
multiple: prop_types_default.a.bool
|
|
56890
57003
|
};
|
|
56891
57004
|
month_Month.defaultProps = {
|
|
56892
57005
|
month: new Date(),
|
|
@@ -57573,13 +57686,14 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57573
57686
|
transform: itemTrans
|
|
57574
57687
|
} = item;
|
|
57575
57688
|
const transform = typeof itemTrans === 'function' ? itemTrans : commonTrans;
|
|
57689
|
+
const selected = selectedIndex === index;
|
|
57576
57690
|
const cls = classnames_default()({
|
|
57577
|
-
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]:
|
|
57691
|
+
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]: selected && mode !== wheelMode,
|
|
57578
57692
|
["".concat(scrollList_constants_cssClasses.PREFIX, "-item-disabled")]: Boolean(item.disabled)
|
|
57579
57693
|
});
|
|
57580
57694
|
let text = '';
|
|
57581
57695
|
|
|
57582
|
-
if (
|
|
57696
|
+
if (selected) {
|
|
57583
57697
|
if (typeof transform === 'function') {
|
|
57584
57698
|
text = transform(item.value, item.text);
|
|
57585
57699
|
} else {
|
|
@@ -57603,7 +57717,10 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57603
57717
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", assign_default()({
|
|
57604
57718
|
key: prefixKey + index
|
|
57605
57719
|
}, events, {
|
|
57606
|
-
className: cls
|
|
57720
|
+
className: cls,
|
|
57721
|
+
role: "option",
|
|
57722
|
+
"aria-selected": selected,
|
|
57723
|
+
"aria-disabled": item.disabled
|
|
57607
57724
|
}), text)
|
|
57608
57725
|
);
|
|
57609
57726
|
});
|
|
@@ -57622,6 +57739,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57622
57739
|
className: wrapperCls,
|
|
57623
57740
|
ref: this._cacheWrapperNode
|
|
57624
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'],
|
|
57625
57745
|
ref: this._cacheListNode
|
|
57626
57746
|
}, inner));
|
|
57627
57747
|
};
|
|
@@ -57679,6 +57799,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
|
|
|
57679
57799
|
ref: this._cacheWrapperNode,
|
|
57680
57800
|
onScroll: this.scrollToSelectItem
|
|
57681
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,
|
|
57682
57805
|
ref: this._cacheListNode,
|
|
57683
57806
|
onClick: this.clickToSelectItem
|
|
57684
57807
|
}, prependList, inner, appendList)));
|
|
@@ -58701,6 +58824,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
|
|
|
58701
58824
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
|
|
58702
58825
|
noHorizontalPadding: false,
|
|
58703
58826
|
icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
|
|
58827
|
+
"aria-hidden": true,
|
|
58704
58828
|
size: iconSize
|
|
58705
58829
|
}),
|
|
58706
58830
|
size: buttonSize,
|
|
@@ -58740,6 +58864,8 @@ yearAndMonth_YearAndMonth.defaultProps = {
|
|
|
58740
58864
|
|
|
58741
58865
|
|
|
58742
58866
|
|
|
58867
|
+
/* eslint-disable jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events */
|
|
58868
|
+
|
|
58743
58869
|
/* eslint-disable react/no-did-update-set-state */
|
|
58744
58870
|
|
|
58745
58871
|
/* eslint-disable max-len */
|
|
@@ -59095,7 +59221,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59095
59221
|
endDateOffset,
|
|
59096
59222
|
density,
|
|
59097
59223
|
rangeInputFocus,
|
|
59098
|
-
syncSwitchMonth
|
|
59224
|
+
syncSwitchMonth,
|
|
59225
|
+
multiple
|
|
59099
59226
|
} = this.props;
|
|
59100
59227
|
let monthText = ''; // i18n monthText
|
|
59101
59228
|
|
|
@@ -59161,7 +59288,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59161
59288
|
onWeeksRowNumChange: weeksRowNum => this.handleWeeksRowNumChange(weeksRowNum, panelType),
|
|
59162
59289
|
startDateOffset: startDateOffset,
|
|
59163
59290
|
endDateOffset: endDateOffset,
|
|
59164
|
-
focusRecordsRef: this.props.focusRecordsRef
|
|
59291
|
+
focusRecordsRef: this.props.focusRecordsRef,
|
|
59292
|
+
multiple: multiple
|
|
59165
59293
|
}));
|
|
59166
59294
|
}
|
|
59167
59295
|
|
|
@@ -59317,14 +59445,22 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
|
|
|
59317
59445
|
className: switchCls,
|
|
59318
59446
|
ref: current => this.adapter.setCache("switch-".concat(panelType), current)
|
|
59319
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",
|
|
59320
59450
|
className: dateCls,
|
|
59321
59451
|
onClick: e => this.foundation.showDatePanel(panelType)
|
|
59322
|
-
}, 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", {
|
|
59323
59455
|
className: textCls
|
|
59324
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",
|
|
59325
59459
|
className: timeCls,
|
|
59326
59460
|
onClick: e => this.foundation.showTimePicker(panelType, true)
|
|
59327
|
-
}, 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", {
|
|
59328
59464
|
className: textCls
|
|
59329
59465
|
}, timeText)));
|
|
59330
59466
|
}
|
|
@@ -59413,6 +59549,8 @@ monthsGrid_MonthsGrid.defaultProps = {
|
|
|
59413
59549
|
|
|
59414
59550
|
|
|
59415
59551
|
|
|
59552
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */
|
|
59553
|
+
|
|
59416
59554
|
|
|
59417
59555
|
|
|
59418
59556
|
|
|
@@ -59506,6 +59644,8 @@ var datePicker = __webpack_require__("IJ0B");
|
|
|
59506
59644
|
|
|
59507
59645
|
|
|
59508
59646
|
|
|
59647
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
|
|
59648
|
+
|
|
59509
59649
|
/* eslint-disable max-len */
|
|
59510
59650
|
|
|
59511
59651
|
|
|
@@ -60073,18 +60213,19 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
|
|
|
60073
60213
|
onRangeEndTabPress: this.handleRangeEndTabPress
|
|
60074
60214
|
});
|
|
60075
60215
|
|
|
60076
|
-
return (
|
|
60077
|
-
|
|
60078
|
-
// eslint-disable-next-line jsx-a11y/
|
|
60079
|
-
|
|
60080
|
-
|
|
60081
|
-
|
|
60082
|
-
|
|
60083
|
-
|
|
60084
|
-
|
|
60085
|
-
|
|
60086
|
-
|
|
60087
|
-
|
|
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)));
|
|
60088
60229
|
}
|
|
60089
60230
|
|
|
60090
60231
|
render() {
|
|
@@ -101249,7 +101390,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101249
101390
|
} // update formState value
|
|
101250
101391
|
|
|
101251
101392
|
|
|
101252
|
-
updateStateValue(field, value, opts) {
|
|
101393
|
+
updateStateValue(field, value, opts, callback) {
|
|
101253
101394
|
const notNotify = opts && opts.notNotify;
|
|
101254
101395
|
const notUpdate = opts && opts.notUpdate;
|
|
101255
101396
|
const fieldAllowEmpty = opts && opts.fieldAllowEmpty;
|
|
@@ -101281,7 +101422,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101281
101422
|
}
|
|
101282
101423
|
|
|
101283
101424
|
if (!notUpdate) {
|
|
101284
|
-
this._adapter.forceUpdate();
|
|
101425
|
+
this._adapter.forceUpdate(callback);
|
|
101285
101426
|
}
|
|
101286
101427
|
} // get touched from formState
|
|
101287
101428
|
|
|
@@ -101295,7 +101436,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101295
101436
|
} // update formState touched
|
|
101296
101437
|
|
|
101297
101438
|
|
|
101298
|
-
updateStateTouched(field, isTouched, opts) {
|
|
101439
|
+
updateStateTouched(field, isTouched, opts, callback) {
|
|
101299
101440
|
const notNotify = opts && opts.notNotify;
|
|
101300
101441
|
const notUpdate = opts && opts.notUpdate;
|
|
101301
101442
|
object_set(this.data.touched, field, isTouched);
|
|
@@ -101305,7 +101446,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101305
101446
|
}
|
|
101306
101447
|
|
|
101307
101448
|
if (!notUpdate) {
|
|
101308
|
-
this._adapter.forceUpdate();
|
|
101449
|
+
this._adapter.forceUpdate(callback);
|
|
101309
101450
|
}
|
|
101310
101451
|
} // get error from formState
|
|
101311
101452
|
|
|
@@ -101319,7 +101460,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101319
101460
|
} // update formState error
|
|
101320
101461
|
|
|
101321
101462
|
|
|
101322
|
-
updateStateError(field, error, opts) {
|
|
101463
|
+
updateStateError(field, error, opts, callback) {
|
|
101323
101464
|
const notNotify = opts && opts.notNotify;
|
|
101324
101465
|
const notUpdate = opts && opts.notUpdate;
|
|
101325
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
|
|
@@ -101330,7 +101471,7 @@ class foundation_FormFoundation extends foundation {
|
|
|
101330
101471
|
}
|
|
101331
101472
|
|
|
101332
101473
|
if (!notUpdate) {
|
|
101333
|
-
this._adapter.forceUpdate();
|
|
101474
|
+
this._adapter.forceUpdate(callback);
|
|
101334
101475
|
}
|
|
101335
101476
|
} // For internal use in the FormApi Operating Field
|
|
101336
101477
|
|
|
@@ -101349,22 +101490,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101349
101490
|
// At this time, first modify formState directly, then find out the subordinate fields and drive them to update
|
|
101350
101491
|
// Eg: peoples: [0, 2, 3]. Each value of the peoples array corresponds to an Input Field
|
|
101351
101492
|
// When the user directly calls formA pi.set Value ('peoples', [2,3])
|
|
101352
|
-
this.updateStateValue(field, newValue, opts)
|
|
101353
|
-
|
|
101354
|
-
|
|
101355
|
-
|
|
101356
|
-
|
|
101357
|
-
|
|
101358
|
-
|
|
101359
|
-
|
|
101360
|
-
|
|
101361
|
-
|
|
101362
|
-
|
|
101363
|
-
|
|
101364
|
-
|
|
101365
|
-
}
|
|
101366
|
-
} // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
|
|
101367
|
-
|
|
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
|
|
101368
101508
|
|
|
101369
101509
|
if (this.getArrayField(field)) {
|
|
101370
101510
|
this.updateArrayField(field, {
|
|
@@ -101382,21 +101522,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101382
101522
|
if (fieldApi) {
|
|
101383
101523
|
fieldApi.setError(newError, opts);
|
|
101384
101524
|
} else {
|
|
101385
|
-
this.updateStateError(field, newError, opts)
|
|
101386
|
-
|
|
101387
|
-
|
|
101388
|
-
|
|
101389
|
-
|
|
101390
|
-
|
|
101391
|
-
|
|
101392
|
-
|
|
101393
|
-
|
|
101394
|
-
|
|
101395
|
-
|
|
101396
|
-
|
|
101397
|
-
|
|
101398
|
-
}
|
|
101399
|
-
}
|
|
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
|
+
});
|
|
101400
101540
|
|
|
101401
101541
|
if (this.getArrayField(field)) {
|
|
101402
101542
|
this.updateArrayField(field, {
|
|
@@ -101412,21 +101552,21 @@ class foundation_FormFoundation extends foundation {
|
|
|
101412
101552
|
if (fieldApi) {
|
|
101413
101553
|
fieldApi.setTouched(isTouched, opts);
|
|
101414
101554
|
} else {
|
|
101415
|
-
this.updateStateTouched(field, isTouched, opts)
|
|
101416
|
-
|
|
101417
|
-
|
|
101418
|
-
|
|
101419
|
-
|
|
101420
|
-
|
|
101421
|
-
|
|
101422
|
-
|
|
101423
|
-
|
|
101424
|
-
|
|
101425
|
-
|
|
101426
|
-
|
|
101427
|
-
|
|
101428
|
-
}
|
|
101429
|
-
}
|
|
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
|
+
});
|
|
101430
101570
|
|
|
101431
101571
|
if (this.getArrayField(field)) {
|
|
101432
101572
|
this.updateArrayField(field, {
|
|
@@ -102582,7 +102722,7 @@ function withField(Component, opts) {
|
|
|
102582
102722
|
text: label || field,
|
|
102583
102723
|
id: labelId,
|
|
102584
102724
|
required: required,
|
|
102585
|
-
name: name || field,
|
|
102725
|
+
name: a11yId || name || field,
|
|
102586
102726
|
width: mergeLabelWidth,
|
|
102587
102727
|
align: mergeLabelAlign
|
|
102588
102728
|
}, needSpread));
|
|
@@ -102784,8 +102924,8 @@ class baseForm_Form extends baseComponent_BaseComponent {
|
|
|
102784
102924
|
notifySubmitFail: (errors, values) => {
|
|
102785
102925
|
this.props.onSubmitFail(errors, values);
|
|
102786
102926
|
},
|
|
102787
|
-
forceUpdate:
|
|
102788
|
-
this.forceUpdate();
|
|
102927
|
+
forceUpdate: callback => {
|
|
102928
|
+
this.forceUpdate(callback);
|
|
102789
102929
|
},
|
|
102790
102930
|
notifyChange: formState => {
|
|
102791
102931
|
this.props.onChange(formState);
|