@douyinfe/semi-ui 2.6.0-beta.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/__test__/button.test.js +7 -0
- package/button/buttonGroup.tsx +5 -2
- package/button/index.tsx +1 -1
- package/cascader/__test__/cascader.test.js +159 -81
- package/cascader/_story/cascader.stories.js +36 -23
- package/cascader/index.tsx +26 -5
- package/datePicker/_story/v2/InsetInput.jsx +104 -0
- package/datePicker/_story/v2/InsetInputE2E.jsx +69 -0
- package/datePicker/_story/v2/index.js +2 -0
- package/datePicker/dateInput.tsx +95 -9
- package/datePicker/datePicker.tsx +89 -15
- package/datePicker/index.tsx +15 -0
- package/datePicker/insetInput.tsx +76 -0
- package/datePicker/monthsGrid.tsx +14 -7
- package/dist/css/semi.css +105 -2
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +949 -163
- 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/hooks/useFormApi.tsx +3 -2
- package/input/_story/input.stories.js +13 -0
- package/lib/cjs/button/Button.d.ts +4 -4
- package/lib/cjs/button/buttonGroup.d.ts +3 -2
- package/lib/cjs/button/buttonGroup.js +6 -2
- package/lib/cjs/button/index.d.ts +5 -6
- package/lib/cjs/cascader/index.d.ts +1 -0
- package/lib/cjs/cascader/index.js +38 -9
- package/lib/cjs/datePicker/dateInput.d.ts +9 -2
- package/lib/cjs/datePicker/dateInput.js +92 -9
- package/lib/cjs/datePicker/datePicker.d.ts +7 -2
- package/lib/cjs/datePicker/datePicker.js +123 -18
- package/lib/cjs/datePicker/index.js +24 -2
- package/lib/cjs/datePicker/insetInput.d.ts +21 -0
- package/lib/cjs/datePicker/insetInput.js +80 -0
- package/lib/cjs/datePicker/monthsGrid.js +19 -7
- package/lib/cjs/form/hooks/useFormApi.d.ts +2 -1
- package/lib/cjs/iconButton/index.d.ts +2 -2
- package/lib/cjs/navigation/Item.d.ts +2 -2
- package/lib/cjs/navigation/Item.js +8 -6
- package/lib/cjs/navigation/SubNav.js +2 -2
- package/lib/cjs/radio/radioGroup.js +6 -0
- package/lib/cjs/select/index.js +5 -2
- package/lib/cjs/table/Body/index.d.ts +2 -0
- package/lib/cjs/table/Body/index.js +13 -4
- package/lib/cjs/tag/group.d.ts +2 -0
- package/lib/cjs/tag/group.js +4 -2
- package/lib/cjs/tooltip/index.js +6 -2
- package/lib/cjs/tree/index.js +5 -3
- package/lib/cjs/tree/interface.d.ts +1 -0
- package/lib/cjs/tree/nodeList.js +3 -1
- package/lib/cjs/treeSelect/index.js +11 -3
- package/lib/es/button/Button.d.ts +4 -4
- package/lib/es/button/buttonGroup.d.ts +3 -2
- package/lib/es/button/buttonGroup.js +5 -2
- package/lib/es/button/index.d.ts +5 -6
- package/lib/es/cascader/index.d.ts +1 -0
- package/lib/es/cascader/index.js +35 -6
- package/lib/es/datePicker/dateInput.d.ts +9 -2
- package/lib/es/datePicker/dateInput.js +91 -9
- package/lib/es/datePicker/datePicker.d.ts +7 -2
- package/lib/es/datePicker/datePicker.js +124 -18
- package/lib/es/datePicker/index.js +20 -0
- package/lib/es/datePicker/insetInput.d.ts +21 -0
- package/lib/es/datePicker/insetInput.js +65 -0
- package/lib/es/datePicker/monthsGrid.js +19 -7
- package/lib/es/form/hooks/useFormApi.d.ts +2 -1
- package/lib/es/iconButton/index.d.ts +2 -2
- package/lib/es/navigation/Item.d.ts +2 -2
- package/lib/es/navigation/Item.js +8 -6
- package/lib/es/navigation/SubNav.js +2 -2
- package/lib/es/radio/radioGroup.js +6 -0
- package/lib/es/select/index.js +5 -2
- package/lib/es/table/Body/index.d.ts +2 -0
- package/lib/es/table/Body/index.js +13 -4
- package/lib/es/tag/group.d.ts +2 -0
- package/lib/es/tag/group.js +4 -2
- package/lib/es/tooltip/index.js +6 -2
- package/lib/es/tree/index.js +5 -3
- package/lib/es/tree/interface.d.ts +1 -0
- package/lib/es/tree/nodeList.js +3 -1
- package/lib/es/treeSelect/index.js +11 -3
- package/navigation/Item.tsx +15 -12
- package/navigation/SubNav.tsx +4 -4
- package/package.json +9 -9
- package/radio/__test__/radioGroup.test.jsx +9 -1
- package/radio/_story/radio.stories.js +22 -1
- package/radio/radioGroup.tsx +9 -0
- package/select/_story/select.stories.js +73 -2
- package/select/index.tsx +5 -3
- package/table/Body/index.tsx +15 -4
- package/table/__test__/table.test.js +18 -0
- package/table/_story/v2/FixedExpandedRow/index.jsx +95 -0
- package/table/_story/v2/index.js +2 -1
- package/tag/group.tsx +5 -3
- package/tooltip/_story/tooltip.stories.js +702 -625
- package/tooltip/index.tsx +2 -2
- package/tree/__test__/tree.test.js +87 -2
- package/tree/_story/tree.stories.js +65 -5
- package/tree/index.tsx +4 -2
- package/tree/interface.ts +1 -0
- package/tree/nodeList.tsx +3 -2
- package/treeSelect/__test__/treeSelect.test.js +28 -0
- package/treeSelect/_story/treeSelect.stories.js +55 -2
- package/treeSelect/index.tsx +14 -3
|
@@ -20,6 +20,8 @@ var _setTimeout2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-j
|
|
|
20
20
|
|
|
21
21
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
22
22
|
|
|
23
|
+
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
|
24
|
+
|
|
23
25
|
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
|
24
26
|
|
|
25
27
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
@@ -65,6 +67,10 @@ require("@douyinfe/semi-foundation/lib/cjs/datePicker/datePicker.css");
|
|
|
65
67
|
/* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
|
|
66
68
|
|
|
67
69
|
/* eslint-disable max-len */
|
|
70
|
+
|
|
71
|
+
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
72
|
+
|
|
73
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
68
74
|
class DatePicker extends _baseComponent.default {
|
|
69
75
|
constructor(props) {
|
|
70
76
|
var _this;
|
|
@@ -102,6 +108,8 @@ class DatePicker extends _baseComponent.default {
|
|
|
102
108
|
return _this.foundation.handleInputChange(...arguments);
|
|
103
109
|
};
|
|
104
110
|
|
|
111
|
+
this.handleInsetInputChange = options => this.foundation.handleInsetInputChange(options);
|
|
112
|
+
|
|
105
113
|
this.handleInputComplete = v => this.foundation.handleInputComplete(v);
|
|
106
114
|
|
|
107
115
|
this.handleInputBlur = e => this.foundation.handleInputBlur((0, _get2.default)(e, 'nativeEvent.target.value'), e);
|
|
@@ -130,6 +138,30 @@ class DatePicker extends _baseComponent.default {
|
|
|
130
138
|
}
|
|
131
139
|
};
|
|
132
140
|
|
|
141
|
+
this.handleInsetDateFocus = (e, rangeType) => {
|
|
142
|
+
const monthGridFoundation = (0, _get2.default)(this, 'monthGrid.current.foundation');
|
|
143
|
+
|
|
144
|
+
if (monthGridFoundation) {
|
|
145
|
+
monthGridFoundation.showDatePanel(_constants.strings.PANEL_TYPE_LEFT);
|
|
146
|
+
monthGridFoundation.showDatePanel(_constants.strings.PANEL_TYPE_RIGHT);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
this.handleInputFocus(e, rangeType);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
this.handleInsetTimeFocus = () => {
|
|
153
|
+
const monthGridFoundation = (0, _get2.default)(this, 'monthGrid.current.foundation');
|
|
154
|
+
|
|
155
|
+
if (monthGridFoundation) {
|
|
156
|
+
monthGridFoundation.showTimePicker(_constants.strings.PANEL_TYPE_LEFT);
|
|
157
|
+
monthGridFoundation.showTimePicker(_constants.strings.PANEL_TYPE_RIGHT);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
this.handlePanelVisibleChange = visible => {
|
|
162
|
+
this.foundation.handlePanelVisibleChange(visible);
|
|
163
|
+
};
|
|
164
|
+
|
|
133
165
|
this.handleConfirm = e => this.foundation.handleConfirm();
|
|
134
166
|
|
|
135
167
|
this.handleCancel = e => this.foundation.handleCancel();
|
|
@@ -153,19 +185,43 @@ class DatePicker extends _baseComponent.default {
|
|
|
153
185
|
dropdownStyle,
|
|
154
186
|
density,
|
|
155
187
|
topSlot,
|
|
156
|
-
bottomSlot
|
|
188
|
+
bottomSlot,
|
|
189
|
+
insetInput,
|
|
190
|
+
type,
|
|
191
|
+
format,
|
|
192
|
+
rangeSeparator
|
|
157
193
|
} = this.props;
|
|
194
|
+
const {
|
|
195
|
+
insetInputValue,
|
|
196
|
+
value
|
|
197
|
+
} = this.state;
|
|
158
198
|
const wrapCls = (0, _classnames.default)(_constants.cssClasses.PREFIX, {
|
|
159
199
|
[_constants.cssClasses.PANEL_YAM]: this.adapter.typeIsYearOrMonth(),
|
|
160
200
|
["".concat(_constants.cssClasses.PREFIX, "-compact")]: density === 'compact'
|
|
161
201
|
}, dropdownClassName);
|
|
202
|
+
const insetInputProps = {
|
|
203
|
+
dateFnsLocale,
|
|
204
|
+
format,
|
|
205
|
+
insetInputValue,
|
|
206
|
+
rangeSeparator,
|
|
207
|
+
type,
|
|
208
|
+
value: value,
|
|
209
|
+
handleInsetDateFocus: this.handleInsetDateFocus,
|
|
210
|
+
handleInsetTimeFocus: this.handleInsetTimeFocus,
|
|
211
|
+
onInsetInputChange: this.handleInsetInputChange,
|
|
212
|
+
rangeInputStartRef: this.rangeInputStartRef,
|
|
213
|
+
rangeInputEndRef: this.rangeInputEndRef,
|
|
214
|
+
density
|
|
215
|
+
};
|
|
162
216
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
163
217
|
ref: this.panelRef,
|
|
164
218
|
className: wrapCls,
|
|
165
219
|
style: dropdownStyle
|
|
166
220
|
}, topSlot && /*#__PURE__*/_react.default.createElement("div", {
|
|
167
221
|
className: "".concat(_constants.cssClasses.PREFIX, "-topSlot")
|
|
168
|
-
}, topSlot),
|
|
222
|
+
}, topSlot), insetInput && /*#__PURE__*/_react.default.createElement(_dateInput.default, (0, _assign.default)({}, insetInputProps, {
|
|
223
|
+
insetInput: true
|
|
224
|
+
})), this.adapter.typeIsYearOrMonth() ? this.renderYearMonthPanel(locale, localeCode) : this.renderMonthGrid(locale, localeCode, dateFnsLocale), this.renderQuickControls(), bottomSlot && /*#__PURE__*/_react.default.createElement("div", {
|
|
169
225
|
className: "".concat(_constants.cssClasses.PREFIX, "-bottomSlot")
|
|
170
226
|
}, bottomSlot), this.renderFooter(locale, localeCode));
|
|
171
227
|
};
|
|
@@ -229,7 +285,8 @@ class DatePicker extends _baseComponent.default {
|
|
|
229
285
|
position: position,
|
|
230
286
|
visible: panelShow,
|
|
231
287
|
stopPropagation: stopPropagation,
|
|
232
|
-
spacing: spacing
|
|
288
|
+
spacing: spacing,
|
|
289
|
+
onVisibleChange: this.handlePanelVisibleChange
|
|
233
290
|
}, children);
|
|
234
291
|
};
|
|
235
292
|
|
|
@@ -242,7 +299,9 @@ class DatePicker extends _baseComponent.default {
|
|
|
242
299
|
prevTimeZone: null,
|
|
243
300
|
motionEnd: false,
|
|
244
301
|
rangeInputFocus: undefined,
|
|
245
|
-
autofocus: props.autoFocus || this.isRangeType(props.type, props.triggerRender) && (props.open || props.defaultOpen)
|
|
302
|
+
autofocus: props.autoFocus || this.isRangeType(props.type, props.triggerRender) && (props.open || props.defaultOpen),
|
|
303
|
+
insetInputValue: null,
|
|
304
|
+
triggerDisabled: undefined
|
|
246
305
|
};
|
|
247
306
|
this.adapter.setCache('cachedSelectedValue', null);
|
|
248
307
|
this.triggerElRef = /*#__PURE__*/_react.default.createRef();
|
|
@@ -345,6 +404,17 @@ class DatePicker extends _baseComponent.default {
|
|
|
345
404
|
inputValue
|
|
346
405
|
});
|
|
347
406
|
},
|
|
407
|
+
updateInsetInputValue: insetInputValue => {
|
|
408
|
+
const {
|
|
409
|
+
insetInput
|
|
410
|
+
} = this.props;
|
|
411
|
+
|
|
412
|
+
if (insetInput && !(0, _isEqual2.default)(insetInputValue, this.state.insetInputValue)) {
|
|
413
|
+
this.setState({
|
|
414
|
+
insetInputValue
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
},
|
|
348
418
|
needConfirm: () => {
|
|
349
419
|
var _context;
|
|
350
420
|
|
|
@@ -415,7 +485,36 @@ class DatePicker extends _baseComponent.default {
|
|
|
415
485
|
}
|
|
416
486
|
},
|
|
417
487
|
couldPanelClosed: () => this.focusRecordsRef.current.rangeStart && this.focusRecordsRef.current.rangeEnd,
|
|
418
|
-
isEventTarget: e => e && e.target === e.currentTarget
|
|
488
|
+
isEventTarget: e => e && e.target === e.currentTarget,
|
|
489
|
+
setInsetInputFocus: () => {
|
|
490
|
+
const {
|
|
491
|
+
rangeInputFocus
|
|
492
|
+
} = this.state;
|
|
493
|
+
|
|
494
|
+
switch (rangeInputFocus) {
|
|
495
|
+
case 'rangeEnd':
|
|
496
|
+
if (document.activeElement !== this.rangeInputEndRef.current) {
|
|
497
|
+
const inputEndNode = (0, _get2.default)(this, 'rangeInputEndRef.current');
|
|
498
|
+
inputEndNode && inputEndNode.focus();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
break;
|
|
502
|
+
|
|
503
|
+
case 'rangeStart':
|
|
504
|
+
default:
|
|
505
|
+
if (document.activeElement !== this.rangeInputStartRef.current) {
|
|
506
|
+
const inputStartNode = (0, _get2.default)(this, 'rangeInputStartRef.current');
|
|
507
|
+
inputStartNode && inputStartNode.focus();
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
break;
|
|
511
|
+
}
|
|
512
|
+
},
|
|
513
|
+
setTriggerDisabled: disabled => {
|
|
514
|
+
this.setState({
|
|
515
|
+
triggerDisabled: disabled
|
|
516
|
+
});
|
|
517
|
+
}
|
|
419
518
|
});
|
|
420
519
|
}
|
|
421
520
|
|
|
@@ -473,7 +572,8 @@ class DatePicker extends _baseComponent.default {
|
|
|
473
572
|
syncSwitchMonth,
|
|
474
573
|
onPanelChange,
|
|
475
574
|
timeZone,
|
|
476
|
-
triggerRender
|
|
575
|
+
triggerRender,
|
|
576
|
+
insetInput
|
|
477
577
|
} = this.props;
|
|
478
578
|
const {
|
|
479
579
|
value,
|
|
@@ -521,7 +621,8 @@ class DatePicker extends _baseComponent.default {
|
|
|
521
621
|
onPanelChange: onPanelChange,
|
|
522
622
|
timeZone: timeZone,
|
|
523
623
|
focusRecordsRef: this.focusRecordsRef,
|
|
524
|
-
triggerRender: triggerRender
|
|
624
|
+
triggerRender: triggerRender,
|
|
625
|
+
insetInput: insetInput
|
|
525
626
|
});
|
|
526
627
|
}
|
|
527
628
|
|
|
@@ -557,20 +658,23 @@ class DatePicker extends _baseComponent.default {
|
|
|
557
658
|
triggerRender,
|
|
558
659
|
size,
|
|
559
660
|
inputReadOnly,
|
|
560
|
-
rangeSeparator
|
|
661
|
+
rangeSeparator,
|
|
662
|
+
insetInput
|
|
561
663
|
} = this.props;
|
|
562
664
|
const {
|
|
563
665
|
value,
|
|
564
666
|
inputValue,
|
|
565
|
-
rangeInputFocus
|
|
667
|
+
rangeInputFocus,
|
|
668
|
+
triggerDisabled
|
|
566
669
|
} = this.state; // This class is not needed when triggerRender is function
|
|
567
670
|
|
|
568
671
|
const isRangeType = this.isRangeType(type, triggerRender);
|
|
672
|
+
const inputDisabled = disabled || insetInput && triggerDisabled;
|
|
569
673
|
const inputCls = (0, _classnames.default)("".concat(_constants.cssClasses.PREFIX, "-input"), {
|
|
570
674
|
["".concat(_constants.cssClasses.PREFIX, "-range-input")]: isRangeType,
|
|
571
675
|
[(0, _concat.default)(_context3 = "".concat(_constants.cssClasses.PREFIX, "-range-input-")).call(_context3, size)]: isRangeType && size,
|
|
572
|
-
["".concat(_constants.cssClasses.PREFIX, "-range-input-active")]: isRangeType && rangeInputFocus && !
|
|
573
|
-
["".concat(_constants.cssClasses.PREFIX, "-range-input-disabled")]: isRangeType &&
|
|
676
|
+
["".concat(_constants.cssClasses.PREFIX, "-range-input-active")]: isRangeType && rangeInputFocus && !inputDisabled,
|
|
677
|
+
["".concat(_constants.cssClasses.PREFIX, "-range-input-disabled")]: isRangeType && inputDisabled,
|
|
574
678
|
[(0, _concat.default)(_context4 = "".concat(_constants.cssClasses.PREFIX, "-range-input-")).call(_context4, validateStatus)]: isRangeType && validateStatus
|
|
575
679
|
});
|
|
576
680
|
const phText = placeholder || locale.placeholder[type]; // i18n
|
|
@@ -578,9 +682,9 @@ class DatePicker extends _baseComponent.default {
|
|
|
578
682
|
|
|
579
683
|
const props = (0, _assign.default)((0, _assign.default)({}, extraProps), {
|
|
580
684
|
placeholder: phText,
|
|
581
|
-
disabled,
|
|
685
|
+
disabled: inputDisabled,
|
|
582
686
|
inputValue,
|
|
583
|
-
value,
|
|
687
|
+
value: value,
|
|
584
688
|
onChange: this.handleInputChange,
|
|
585
689
|
onEnterPress: this.handleInputComplete,
|
|
586
690
|
// TODO: remove in next major version
|
|
@@ -593,7 +697,7 @@ class DatePicker extends _baseComponent.default {
|
|
|
593
697
|
format,
|
|
594
698
|
multiple,
|
|
595
699
|
validateStatus,
|
|
596
|
-
inputReadOnly,
|
|
700
|
+
inputReadOnly: inputReadOnly || insetInput,
|
|
597
701
|
// onClick: this.handleOpenPanel,
|
|
598
702
|
onBlur: this.handleInputBlur,
|
|
599
703
|
onFocus: this.handleInputFocus,
|
|
@@ -602,13 +706,13 @@ class DatePicker extends _baseComponent.default {
|
|
|
602
706
|
size,
|
|
603
707
|
autofocus: this.state.autofocus,
|
|
604
708
|
dateFnsLocale,
|
|
605
|
-
rangeInputStartRef: this.rangeInputStartRef,
|
|
606
|
-
rangeInputEndRef: this.rangeInputEndRef,
|
|
607
709
|
rangeInputFocus,
|
|
608
710
|
rangeSeparator,
|
|
609
711
|
onRangeBlur: this.handleRangeInputBlur,
|
|
610
712
|
onRangeClear: this.handleRangeInputClear,
|
|
611
|
-
onRangeEndTabPress: this.handleRangeEndTabPress
|
|
713
|
+
onRangeEndTabPress: this.handleRangeEndTabPress,
|
|
714
|
+
rangeInputStartRef: insetInput ? null : this.rangeInputStartRef,
|
|
715
|
+
rangeInputEndRef: insetInput ? null : this.rangeInputEndRef
|
|
612
716
|
});
|
|
613
717
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
614
718
|
// tooltip will mount a11y props to children
|
|
@@ -757,5 +861,6 @@ DatePicker.defaultProps = {
|
|
|
757
861
|
spacing: _constants.numbers.SPACING,
|
|
758
862
|
autoSwitchDate: true,
|
|
759
863
|
syncSwitchMonth: false,
|
|
760
|
-
rangeSeparator: _constants.strings.DEFAULT_SEPARATOR_RANGE
|
|
864
|
+
rangeSeparator: _constants.strings.DEFAULT_SEPARATOR_RANGE,
|
|
865
|
+
insetInput: false
|
|
761
866
|
};
|
|
@@ -14,13 +14,17 @@ var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-sta
|
|
|
14
14
|
|
|
15
15
|
var _trim = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/trim"));
|
|
16
16
|
|
|
17
|
+
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
18
|
+
|
|
17
19
|
var _react = _interopRequireDefault(require("react"));
|
|
18
20
|
|
|
19
21
|
var _object = require("@douyinfe/semi-foundation/lib/cjs/utils/object");
|
|
20
22
|
|
|
23
|
+
var _constants = require("@douyinfe/semi-foundation/lib/cjs/datePicker/constants");
|
|
24
|
+
|
|
21
25
|
var _datePicker = _interopRequireDefault(require("./datePicker"));
|
|
22
26
|
|
|
23
|
-
var
|
|
27
|
+
var _context2 = _interopRequireDefault(require("../configProvider/context"));
|
|
24
28
|
|
|
25
29
|
var _localeConsumer = _interopRequireDefault(require("../locale/localeConsumer"));
|
|
26
30
|
|
|
@@ -47,7 +51,25 @@ var _default = (0, _object.forwardStatics)( /*#__PURE__*/_react.default.forwardR
|
|
|
47
51
|
propsObj.rangeSeparator = " ".concat((0, _trim.default)(rangeSeparator).call(rangeSeparator), " ");
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
if (propsObj.insetInput) {
|
|
55
|
+
var _context;
|
|
56
|
+
|
|
57
|
+
if (!propsObj.position) {
|
|
58
|
+
propsObj.position = _constants.strings.POSITION_INLINE_INPUT;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* When insetInput is `true` and `position` includes `over`, use 1px `spacing` to solve the problem of border-radius leakage in the upper left corner
|
|
62
|
+
*
|
|
63
|
+
* @see https://user-images.githubusercontent.com/26477537/158817185-126a5f33-41f7-414a-8e36-8d1be2dda5cd.png
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
if ((0, _includes.default)(_context = propsObj.position).call(_context, 'Over') && !propsObj.spacing) {
|
|
68
|
+
propsObj.spacing = _constants.numbers.SPACING_INSET_INPUT;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_context2.default.Consumer, null, _ref => {
|
|
51
73
|
let {
|
|
52
74
|
timeZone
|
|
53
75
|
} = _ref;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InsetInputValue, Type, InsetInputChangeFoundationProps } from '@douyinfe/semi-foundation/lib/cjs/datePicker/inputFoundation';
|
|
2
|
+
import { InputProps } from '../input';
|
|
3
|
+
export interface InsetDateInputProps {
|
|
4
|
+
forwardRef: InputProps['forwardRef'];
|
|
5
|
+
insetInputValue: InsetInputValue;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
valuePath: string;
|
|
8
|
+
onChange: (options: InsetInputChangeFoundationProps) => void;
|
|
9
|
+
onFocus: InputProps['onFocus'];
|
|
10
|
+
}
|
|
11
|
+
export interface InsetTimeInputProps {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
insetInputValue: InsetInputValue;
|
|
14
|
+
placeholder: string;
|
|
15
|
+
valuePath: string;
|
|
16
|
+
type: Type;
|
|
17
|
+
onChange: (options: InsetInputChangeFoundationProps) => void;
|
|
18
|
+
onFocus: InputProps['onFocus'];
|
|
19
|
+
}
|
|
20
|
+
export declare function InsetDateInput(props: InsetDateInputProps): JSX.Element;
|
|
21
|
+
export declare function InsetTimeInput(props: InsetTimeInputProps): JSX.Element;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.InsetDateInput = InsetDateInput;
|
|
12
|
+
exports.InsetTimeInput = InsetTimeInput;
|
|
13
|
+
|
|
14
|
+
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
|
15
|
+
|
|
16
|
+
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
|
+
|
|
20
|
+
var _input = _interopRequireDefault(require("../input"));
|
|
21
|
+
|
|
22
|
+
function InsetDateInput(props) {
|
|
23
|
+
const {
|
|
24
|
+
insetInputValue,
|
|
25
|
+
valuePath,
|
|
26
|
+
onFocus,
|
|
27
|
+
onChange,
|
|
28
|
+
placeholder,
|
|
29
|
+
forwardRef
|
|
30
|
+
} = props;
|
|
31
|
+
const value = (0, _get2.default)(insetInputValue, valuePath);
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
33
|
+
value: value,
|
|
34
|
+
onChange: (value, event) => {
|
|
35
|
+
onChange({
|
|
36
|
+
value,
|
|
37
|
+
event,
|
|
38
|
+
insetInputValue,
|
|
39
|
+
valuePath
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
onFocus: onFocus,
|
|
43
|
+
placeholder: placeholder,
|
|
44
|
+
ref: forwardRef
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function InsetTimeInput(props) {
|
|
49
|
+
const {
|
|
50
|
+
insetInputValue,
|
|
51
|
+
valuePath,
|
|
52
|
+
type,
|
|
53
|
+
onFocus,
|
|
54
|
+
onChange,
|
|
55
|
+
placeholder,
|
|
56
|
+
disabled
|
|
57
|
+
} = props;
|
|
58
|
+
|
|
59
|
+
const _isTimeType = (0, _includes.default)(type).call(type, 'Time');
|
|
60
|
+
|
|
61
|
+
if (!_isTimeType) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const value = (0, _get2.default)(insetInputValue, valuePath);
|
|
66
|
+
return /*#__PURE__*/_react.default.createElement(_input.default, {
|
|
67
|
+
value: value,
|
|
68
|
+
onChange: (value, event) => {
|
|
69
|
+
onChange({
|
|
70
|
+
value,
|
|
71
|
+
event,
|
|
72
|
+
insetInputValue,
|
|
73
|
+
valuePath
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
onFocus: onFocus,
|
|
77
|
+
placeholder: placeholder,
|
|
78
|
+
disabled: disabled
|
|
79
|
+
});
|
|
80
|
+
}
|
|
@@ -56,6 +56,8 @@ var _getDefaultFormatToken = require("@douyinfe/semi-foundation/lib/cjs/datePick
|
|
|
56
56
|
|
|
57
57
|
/* eslint-disable jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events */
|
|
58
58
|
|
|
59
|
+
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
60
|
+
|
|
59
61
|
/* eslint-disable react/no-did-update-set-state */
|
|
60
62
|
|
|
61
63
|
/* eslint-disable max-len */
|
|
@@ -317,6 +319,9 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
317
319
|
monthRight,
|
|
318
320
|
currentPanelHeight
|
|
319
321
|
} = this.state;
|
|
322
|
+
const {
|
|
323
|
+
insetInput
|
|
324
|
+
} = this.props;
|
|
320
325
|
const panelDetail = panelType === _constants.strings.PANEL_TYPE_RIGHT ? monthRight : monthLeft;
|
|
321
326
|
const {
|
|
322
327
|
isTimePickerOpen,
|
|
@@ -339,7 +344,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
339
344
|
style.minWidth = wrap.getBoundingClientRect().width;
|
|
340
345
|
}
|
|
341
346
|
|
|
342
|
-
if (this.leftIsYearOrTime() && this.rightIsYearOrTime()) {
|
|
347
|
+
if (this.leftIsYearOrTime() && this.rightIsYearOrTime() && !insetInput) {
|
|
343
348
|
/**
|
|
344
349
|
* left和right同时为tpk时,panel会有一个minHeight
|
|
345
350
|
* 如果缓存的currentPanelHeight为0,则需要计算滚动列表的高度
|
|
@@ -349,7 +354,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
349
354
|
* When left and right are tpk at the same time, the panel will have a minHeight
|
|
350
355
|
* If the cached currentPanelHeight is 0, you need to calculate the height of the scrolling list
|
|
351
356
|
* If there is a cached value, use currentPanelHeight (if this height is less than the actual value, it will affect the number of cycles in the ScrollList to render the list)
|
|
352
|
-
* See packages/semi-foundation/scrollList/
|
|
357
|
+
* See packages/semi-foundation/scrollList/itemFoundation.js initWheelList function
|
|
353
358
|
*/
|
|
354
359
|
style.minHeight = currentPanelHeight ? currentPanelHeight : this.calcScrollListHeight();
|
|
355
360
|
}
|
|
@@ -357,10 +362,14 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
357
362
|
monthCls = (0, _classnames.default)(monthCls, "".concat(prefixCls, "-yam-showing"));
|
|
358
363
|
}
|
|
359
364
|
|
|
365
|
+
const _isDatePanelOpen = !(isYearPickerOpen || isTimePickerOpen);
|
|
366
|
+
|
|
367
|
+
const xOpenType = _isDatePanelOpen ? 'date' : isYearPickerOpen ? 'year' : 'time';
|
|
360
368
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
361
369
|
className: monthCls,
|
|
362
370
|
key: panelType,
|
|
363
|
-
style: style
|
|
371
|
+
style: style,
|
|
372
|
+
"x-open-type": xOpenType
|
|
364
373
|
}, yearAndMonthLayer, timePickerLayer, this.foundation.isRangeType() ? panelContent : isYearPickerOpen || isTimePickerOpen ? null : panelContent, this.renderSwitch(panelType));
|
|
365
374
|
}
|
|
366
375
|
|
|
@@ -569,10 +578,11 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
569
578
|
locale,
|
|
570
579
|
disabledTimePicker,
|
|
571
580
|
density,
|
|
572
|
-
dateFnsLocale
|
|
573
|
-
|
|
581
|
+
dateFnsLocale,
|
|
582
|
+
insetInput
|
|
583
|
+
} = this.props; // Type: date, dateRange, year, month, inset input no rendering required
|
|
574
584
|
|
|
575
|
-
if (!(0, _includes.default)(type).call(type, 'Time')) {
|
|
585
|
+
if (!(0, _includes.default)(type).call(type, 'Time') || insetInput) {
|
|
576
586
|
return null;
|
|
577
587
|
} // switch year/month & time
|
|
578
588
|
|
|
@@ -643,7 +653,8 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
643
653
|
monthRight
|
|
644
654
|
} = this.state;
|
|
645
655
|
const {
|
|
646
|
-
type
|
|
656
|
+
type,
|
|
657
|
+
insetInput
|
|
647
658
|
} = this.props;
|
|
648
659
|
const monthGridCls = (0, _classnames.default)({
|
|
649
660
|
["".concat(prefixCls, "-month-grid")]: true
|
|
@@ -665,6 +676,7 @@ class MonthsGrid extends _baseComponent.default {
|
|
|
665
676
|
className: monthGridCls,
|
|
666
677
|
"x-type": type,
|
|
667
678
|
"x-panel-yearandmonth-open-type": yearOpenType,
|
|
679
|
+
"x-insetInput": insetInput ? "true" : "false",
|
|
668
680
|
ref: current => this.cacheRefCurrent('monthGrid', current)
|
|
669
681
|
}, content);
|
|
670
682
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseFormApi } from '@douyinfe/semi-foundation/lib/cjs/form/interface';
|
|
2
|
+
export default function useFormApi<T extends Record<string, any> = any>(): BaseFormApi<T>;
|
|
@@ -19,7 +19,7 @@ export interface IconButtonProps extends ButtonProps {
|
|
|
19
19
|
}
|
|
20
20
|
declare class IconButton extends PureComponent<IconButtonProps> {
|
|
21
21
|
static defaultProps: {
|
|
22
|
-
iconPosition:
|
|
22
|
+
iconPosition: "left";
|
|
23
23
|
prefixCls: string;
|
|
24
24
|
loading: boolean;
|
|
25
25
|
noHorizontalPadding: boolean;
|
|
@@ -36,7 +36,7 @@ declare class IconButton extends PureComponent<IconButtonProps> {
|
|
|
36
36
|
noHorizontalPadding: PropTypes.Requireable<string | boolean | any[]>;
|
|
37
37
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
38
38
|
theme: PropTypes.Requireable<string>;
|
|
39
|
-
iconPosition: PropTypes.Requireable<
|
|
39
|
+
iconPosition: PropTypes.Requireable<"left" | "right">;
|
|
40
40
|
className: PropTypes.Requireable<string>;
|
|
41
41
|
onMouseEnter: PropTypes.Requireable<(...args: any[]) => any>;
|
|
42
42
|
onMouseLeave: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import BaseComponent, { BaseProps } from '../_base/baseComponent';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
-
import ItemFoundation, { ItemProps, SelectedItemProps
|
|
4
|
+
import ItemFoundation, { ItemAdapter, ItemProps, SelectedItemProps } from '@douyinfe/semi-foundation/lib/cjs/navigation/itemFoundation';
|
|
5
5
|
export interface NavItemProps extends ItemProps, BaseProps {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -63,7 +63,7 @@ export default class NavItem extends BaseComponent<NavItemProps, NavItemState> {
|
|
|
63
63
|
constructor(props: NavItemProps);
|
|
64
64
|
_invokeContextFunc(funcName: string, ...args: any[]): any;
|
|
65
65
|
get adapter(): ItemAdapter<NavItemProps, NavItemState>;
|
|
66
|
-
renderIcon(icon: React.ReactNode, pos: string, isToggleIcon?: boolean): JSX.Element;
|
|
66
|
+
renderIcon(icon: React.ReactNode, pos: string, isToggleIcon?: boolean, key?: number | string): JSX.Element;
|
|
67
67
|
setItemRef: (ref: HTMLLIElement) => void;
|
|
68
68
|
wrapTooltip: (node: React.ReactNode) => JSX.Element;
|
|
69
69
|
handleClick: (e: React.MouseEvent) => void;
|
|
@@ -16,10 +16,10 @@ var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-s
|
|
|
16
16
|
|
|
17
17
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
18
18
|
|
|
19
|
-
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
20
|
-
|
|
21
19
|
var _times2 = _interopRequireDefault(require("lodash/times"));
|
|
22
20
|
|
|
21
|
+
var _noop2 = _interopRequireDefault(require("lodash/noop"));
|
|
22
|
+
|
|
23
23
|
var _baseComponent = _interopRequireDefault(require("../_base/baseComponent"));
|
|
24
24
|
|
|
25
25
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -146,6 +146,7 @@ class NavItem extends _baseComponent.default {
|
|
|
146
146
|
var _context3;
|
|
147
147
|
|
|
148
148
|
let isToggleIcon = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
149
|
+
let key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
149
150
|
|
|
150
151
|
if (this.props.isSubNav) {
|
|
151
152
|
return null;
|
|
@@ -166,7 +167,8 @@ class NavItem extends _baseComponent.default {
|
|
|
166
167
|
["".concat(clsPrefix, "-icon-info")]: !isToggleIcon
|
|
167
168
|
});
|
|
168
169
|
return /*#__PURE__*/_react.default.createElement("i", {
|
|
169
|
-
className: className
|
|
170
|
+
className: className,
|
|
171
|
+
key: key
|
|
170
172
|
}, (0, _utils.isSemiIcon)(icon) ? /*#__PURE__*/_react.default.cloneElement(icon, {
|
|
171
173
|
size: icon.props.size || iconSize
|
|
172
174
|
}) : icon);
|
|
@@ -206,12 +208,12 @@ class NavItem extends _baseComponent.default {
|
|
|
206
208
|
|
|
207
209
|
if (mode === _constants.strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
208
210
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
209
|
-
placeholderIcons = (0, _times2.default)(iconAmount,
|
|
211
|
+
placeholderIcons = (0, _times2.default)(iconAmount, index => this.renderIcon(null, _constants.strings.ICON_POS_RIGHT, false, index));
|
|
210
212
|
}
|
|
211
213
|
|
|
212
|
-
itemChildren = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, placeholderIcons, this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIcon, _constants.strings.ICON_POS_RIGHT, true), icon || indent || isInSubNav ? this.renderIcon(icon, _constants.strings.ICON_POS_LEFT) : null, !(0, _isNullOrUndefined.default)(text) ? /*#__PURE__*/_react.default.createElement("span", {
|
|
214
|
+
itemChildren = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, placeholderIcons, this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIcon, _constants.strings.ICON_POS_RIGHT, true, 'key-toggle-pos-right'), icon || indent || isInSubNav ? this.renderIcon(icon, _constants.strings.ICON_POS_LEFT, false, 'key-position-left') : null, !(0, _isNullOrUndefined.default)(text) ? /*#__PURE__*/_react.default.createElement("span", {
|
|
213
215
|
className: "".concat(_constants.cssClasses.PREFIX, "-item-text")
|
|
214
|
-
}, text) : '', this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIcon, _constants.strings.ICON_POS_RIGHT, true));
|
|
216
|
+
}, text) : '', this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIcon, _constants.strings.ICON_POS_RIGHT, true, 'key-toggle-pos-right'));
|
|
215
217
|
}
|
|
216
218
|
|
|
217
219
|
if (typeof link === 'string') {
|
|
@@ -233,7 +233,7 @@ class SubNav extends _baseComponent.default {
|
|
|
233
233
|
if (mode === _constants.strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
|
|
234
234
|
/* Different icons' amount means different indents.*/
|
|
235
235
|
const iconAmount = icon && !indent ? level : level - 1;
|
|
236
|
-
placeholderIcons = (0, _times2.default)(iconAmount, index => this.renderIcon(null, _constants.strings.ICON_POS_RIGHT, false,
|
|
236
|
+
placeholderIcons = (0, _times2.default)(iconAmount, index => this.renderIcon(null, _constants.strings.ICON_POS_RIGHT, false, false, index));
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
const titleDiv = /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -245,7 +245,7 @@ class SubNav extends _baseComponent.default {
|
|
|
245
245
|
onKeyPress: this.handleKeyPress
|
|
246
246
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
247
247
|
className: "".concat(prefixCls, "-item-inner")
|
|
248
|
-
}, placeholderIcons, this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIconType, _constants.strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== _constants.strings.MODE_HORIZONTAL ? this.renderIcon(icon, _constants.strings.ICON_POS_LEFT,
|
|
248
|
+
}, placeholderIcons, this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIconType, _constants.strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== _constants.strings.MODE_HORIZONTAL ? this.renderIcon(icon, _constants.strings.ICON_POS_LEFT, false, false, 'key-inSubNav-position-left') : null, /*#__PURE__*/_react.default.createElement("span", {
|
|
249
249
|
className: "".concat(prefixCls, "-item-text")
|
|
250
250
|
}, text), this.context.toggleIconPosition === _constants.strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIconType, _constants.strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-right')));
|
|
251
251
|
|
|
@@ -55,6 +55,12 @@ class RadioGroup extends _baseComponent.default {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
componentDidUpdate(prevProps) {
|
|
58
|
+
if (typeof prevProps.value === 'number' && isNaN(prevProps.value) && typeof this.props.value === 'number' && isNaN(this.props.value)) {
|
|
59
|
+
// `NaN === NaN` returns false, and this will fail the next if check
|
|
60
|
+
// therefore triggering an infinite loop
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
58
64
|
if (prevProps.value !== this.props.value) {
|
|
59
65
|
this.foundation.handlePropValueChange(this.props.value);
|
|
60
66
|
}
|
package/lib/cjs/select/index.js
CHANGED
|
@@ -742,7 +742,9 @@ class Select extends _baseComponent.default {
|
|
|
742
742
|
});
|
|
743
743
|
}
|
|
744
744
|
|
|
745
|
-
const
|
|
745
|
+
const mapItems = maxTagCount ? (0, _slice.default)(selectedItems).call(selectedItems, 0, maxTagCount) : selectedItems; // no need to render rest tag when maxTagCount is setting
|
|
746
|
+
|
|
747
|
+
const tags = (0, _map2.default)(mapItems).call(mapItems, (item, i) => {
|
|
746
748
|
const label = item[0];
|
|
747
749
|
const {
|
|
748
750
|
value
|
|
@@ -800,12 +802,13 @@ class Select extends _baseComponent.default {
|
|
|
800
802
|
const placeholderText = placeholder && !inputValue ? /*#__PURE__*/_react.default.createElement("span", {
|
|
801
803
|
className: spanCls
|
|
802
804
|
}, placeholder) : null;
|
|
803
|
-
const n =
|
|
805
|
+
const n = selectedItems.length > maxTagCount ? maxTagCount : undefined;
|
|
804
806
|
const NotOneLine = !maxTagCount; // Multiple lines (that is, do not set maxTagCount), do not use TagGroup, directly traverse with Tag, otherwise Input cannot follow the correct position
|
|
805
807
|
|
|
806
808
|
const tagContent = NotOneLine ? tags : /*#__PURE__*/_react.default.createElement(_group.default, {
|
|
807
809
|
tagList: tags,
|
|
808
810
|
maxTagCount: n,
|
|
811
|
+
restCount: maxTagCount ? selectedItems.length - maxTagCount : undefined,
|
|
809
812
|
size: "large",
|
|
810
813
|
mode: "custom"
|
|
811
814
|
});
|
|
@@ -43,6 +43,8 @@ export interface BodyState {
|
|
|
43
43
|
}
|
|
44
44
|
export interface BodyContext {
|
|
45
45
|
getVirtualizedListRef: GetVirtualizedListRef;
|
|
46
|
+
flattenedColumns: ColumnProps[];
|
|
47
|
+
getCellWidths: (flattenedColumns: ColumnProps[]) => number[];
|
|
46
48
|
}
|
|
47
49
|
declare const _default: React.ForwardRefExoticComponent<Omit<BodyProps, "forwardedRef"> & React.RefAttributes<HTMLDivElement>>;
|
|
48
50
|
export default _default;
|